FreeCalypso > hg > vband-misc
view efr-sid/Unit-test-desc @ 56:e95e145f4b32
fr-sid: generate test sequence
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 22 Aug 2024 06:39:12 +0000 |
parents | 0832b5ac62b2 |
children |
line wrap: on
line source
Unit test for EFR SID detector: test data ========================================= The test sequence generated here consists of 175 frames in total: 1 perfect (error-free) SID frame: should classify as SID=2 95 frames with 1 bit in the SID field cleared: should classify as SID=2 48 frames with 2 bits in the SID field cleared: should classify as SID=1 11 frames with 15 bits in the SID field cleared: should classify as SID=1 20 frames with 16 bits in the SID field cleared: should classify as SID=0 (The error-free SID frame used as the starting point is frame #71 from dtx01.cod in the official test sequence set from ETSI.) The goal is to ensure perfect agreement among the following parties: * The program used to generate these test frames; * EFR_sid_classify() function in Themyscira libgsmefr; * osmo_efr_sid_classify() function in libosmocodec (part of libosmocore); * SID classification performed by TI Calypso DSP; * SID classification performed by Nokia InSite BTS (E1 Abis output). The official reference (source of truth) is GSM 06.62 spec for the definition of SID field bits and GSM 06.81 spec for SID classification thresholds; all implementations listed above are supposed to follow these spec definitions. However, any time a human developer has to read a spec and write code based on that spec, errors can occur at any step in that process; a cross-check between our implementation and those made by others before us provides an important assurance of correctness. The test frames generated here have been chosen with the goal of maximizing the chance of catching errors in these two areas: * Wrong bits being set by tools aiming to generate or corrupt the SID field, or wrong bits being checked by the SID detector; * Wrong thresholds being applied for SID classification. The generator program in this directory and Themyscira libgsmefr were already in agreement since the beginning of this test data project. The test sequence generated in this directory has now been tested on TI Calypso DSP (fed via TCH DL) and on Nokia InSite BTS (fed via TCH UL); both of these pre-existing historical implementations of TCH Rx produce SID classifications that are identical to our expectations. The present set of test patterns has also been added as a unit test to libosmocore, regression-testing osmo_efr_sid_classify() function.