diff options
author | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2017-03-24 23:24:22 -0700 |
---|---|---|
committer | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2017-05-29 15:15:36 +0300 |
commit | 5e65b531e0b9253c33a476f50bffc23eb4f0afa0 (patch) | |
tree | 9e0613b2e30bf903ec148ad45ef1c95b351ce4b1 | |
parent | b992d0a51511598e37ed89aaf286e985f88ff5ec (diff) |
sigProcLib: Fix number of tail bits in random Normal Bursts and zero Stealing Bits.
This bug only affects generation of normal bursts filled with random bits which
are used in test mode. It doesn't affect operation of osmo-trx during normal
operation. That's why it has stayed unnoticed for so long.
Each Normal Burst has 3 tail bits, not 4.
Also it's better to set stealing bits to 0 for maximum compatibility. We may want to
introduce a selector for each bit whether to set it to 0, to 1 or to a random number.
Change-Id: I0377029556c8b681b3ba3b635bf19572b34546ea
-rw-r--r-- | Transceiver52M/sigProcLib.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Transceiver52M/sigProcLib.cpp b/Transceiver52M/sigProcLib.cpp index c51d094..9a8c824 100644 --- a/Transceiver52M/sigProcLib.cpp +++ b/Transceiver52M/sigProcLib.cpp @@ -927,19 +927,25 @@ signalVector *genRandNormalBurst(int tsc, int sps, int tn) signalVector *burst; /* Tail bits */ - for (; i < 4; i++) + for (; i < 3; i++) (*bits)[i] = 0; /* Random bits */ - for (; i < 61; i++) + for (; i < 60; i++) (*bits)[i] = rand() % 2; + /* Stealing bit */ + (*bits)[i++] = 0; + /* Training sequence */ for (int n = 0; i < 87; i++, n++) (*bits)[i] = gTrainingSequence[tsc][n]; + /* Stealing bit */ + (*bits)[i++] = 0; + /* Random bits */ - for (; i < 144; i++) + for (; i < 145; i++) (*bits)[i] = rand() % 2; /* Tail bits */ |