annotate efr-sid/Unit-test-desc @ 57:a64e5ed217c0 default tip

top Makefile: add fr-sid
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 22 Aug 2024 06:43:31 +0000
parents 0832b5ac62b2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
53
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 Unit test for EFR SID detector: test data
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 =========================================
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 The test sequence generated here consists of 175 frames in total:
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 1 perfect (error-free) SID frame: should classify as SID=2
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 95 frames with 1 bit in the SID field cleared: should classify as SID=2
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 48 frames with 2 bits in the SID field cleared: should classify as SID=1
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 11 frames with 15 bits in the SID field cleared: should classify as SID=1
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 20 frames with 16 bits in the SID field cleared: should classify as SID=0
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 (The error-free SID frame used as the starting point is frame #71 from
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 dtx01.cod in the official test sequence set from ETSI.)
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 The goal is to ensure perfect agreement among the following parties:
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 * The program used to generate these test frames;
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 * EFR_sid_classify() function in Themyscira libgsmefr;
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 * osmo_efr_sid_classify() function in libosmocodec (part of libosmocore);
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 * SID classification performed by TI Calypso DSP;
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 * SID classification performed by Nokia InSite BTS (E1 Abis output).
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 The official reference (source of truth) is GSM 06.62 spec for the definition
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 of SID field bits and GSM 06.81 spec for SID classification thresholds; all
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 implementations listed above are supposed to follow these spec definitions.
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 However, any time a human developer has to read a spec and write code based on
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 that spec, errors can occur at any step in that process; a cross-check between
54
0832b5ac62b2 efr-sid/Unit-test-desc: update for complete status
Mychaela Falconia <falcon@freecalypso.org>
parents: 53
diff changeset
28 our implementation and those made by others before us provides an important
53
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 assurance of correctness.
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 The test frames generated here have been chosen with the goal of maximizing
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 the chance of catching errors in these two areas:
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 * Wrong bits being set by tools aiming to generate or corrupt the SID field,
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 or wrong bits being checked by the SID detector;
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 * Wrong thresholds being applied for SID classification.
637ee027999b efr-sid/Unit-test-desc: blurb written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37
54
0832b5ac62b2 efr-sid/Unit-test-desc: update for complete status
Mychaela Falconia <falcon@freecalypso.org>
parents: 53
diff changeset
38 The generator program in this directory and Themyscira libgsmefr were already
0832b5ac62b2 efr-sid/Unit-test-desc: update for complete status
Mychaela Falconia <falcon@freecalypso.org>
parents: 53
diff changeset
39 in agreement since the beginning of this test data project. The test sequence
0832b5ac62b2 efr-sid/Unit-test-desc: update for complete status
Mychaela Falconia <falcon@freecalypso.org>
parents: 53
diff changeset
40 generated in this directory has now been tested on TI Calypso DSP (fed via TCH
0832b5ac62b2 efr-sid/Unit-test-desc: update for complete status
Mychaela Falconia <falcon@freecalypso.org>
parents: 53
diff changeset
41 DL) and on Nokia InSite BTS (fed via TCH UL); both of these pre-existing
0832b5ac62b2 efr-sid/Unit-test-desc: update for complete status
Mychaela Falconia <falcon@freecalypso.org>
parents: 53
diff changeset
42 historical implementations of TCH Rx produce SID classifications that are
0832b5ac62b2 efr-sid/Unit-test-desc: update for complete status
Mychaela Falconia <falcon@freecalypso.org>
parents: 53
diff changeset
43 identical to our expectations. The present set of test patterns has also been
0832b5ac62b2 efr-sid/Unit-test-desc: update for complete status
Mychaela Falconia <falcon@freecalypso.org>
parents: 53
diff changeset
44 added as a unit test to libosmocore, regression-testing osmo_efr_sid_classify()
0832b5ac62b2 efr-sid/Unit-test-desc: update for complete status
Mychaela Falconia <falcon@freecalypso.org>
parents: 53
diff changeset
45 function.