Change in osmo-trx[master]: sigProcLib: introduce both TS1 and TS2 RACH synch. sequences

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Wed Oct 24 19:28:47 UTC 2018


Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/11390 )

Change subject: sigProcLib: introduce both TS1 and TS2 RACH synch. sequences
......................................................................

sigProcLib: introduce both TS1 and TS2 RACH synch. sequences

According to 3GPP TS 05.02, section 5.2.7, there are three
synch. sequences for Access Bursts:

  - TS0: GSM, GMSK (default),
  - TS1: EGPRS, 8-PSK,
  - TS2: EGPRS, GMSK.

Let's prepare everythyng to be able to detect all TS0-3 synch.
sequences, but keep detection of both TS1 and TS2 disabled
until the corresponding VTY option is introduced.

Change-Id: I838c21db29c54f1924dd478c2b34b46b70aab2cd
Related: OS#3054
---
M GSM/GSMCommon.cpp
M GSM/GSMCommon.h
M Transceiver52M/radioInterface.cpp
M Transceiver52M/sigProcLib.cpp
4 files changed, 31 insertions(+), 19 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/GSM/GSMCommon.cpp b/GSM/GSMCommon.cpp
index 8aba3be..711ca70 100644
--- a/GSM/GSMCommon.cpp
+++ b/GSM/GSMCommon.cpp
@@ -54,7 +54,10 @@
 
 const BitVector GSM::gDummyBurst("0001111101101110110000010100100111000001001000100000001111100011100010111000101110001010111010010100011001100111001111010011111000100101111101010000");
 
-const BitVector GSM::gRACHSynchSequence("01001011011111111001100110101010001111000");
+/* 3GPP TS 05.02, section 5.2.7 "Access burst (AB)", synch. sequence bits */
+const BitVector GSM::gRACHSynchSequenceTS0("01001011011111111001100110101010001111000");  /* GSM, GMSK (default) */
+const BitVector GSM::gRACHSynchSequenceTS1("01010100111110001000011000101111001001101");  /* EGPRS, 8-PSK */
+const BitVector GSM::gRACHSynchSequenceTS2("11101111001001110101011000001101101110111");  /* EGPRS, GMSK */
 
 //                               |-head-||---------midamble----------------------||--------------data----------------||t|
 const BitVector GSM::gRACHBurst("0011101001001011011111111001100110101010001111000110111101111110000111001001010110011000");
diff --git a/GSM/GSMCommon.h b/GSM/GSMCommon.h
index 8b8d5e8..f703c30 100644
--- a/GSM/GSMCommon.h
+++ b/GSM/GSMCommon.h
@@ -52,7 +52,9 @@
 extern const BitVector gDummyBurst;
 
 /** Random access burst synch. sequence */
-extern const BitVector gRACHSynchSequence;
+extern const BitVector gRACHSynchSequenceTS0;
+extern const BitVector gRACHSynchSequenceTS1;
+extern const BitVector gRACHSynchSequenceTS2;
 /** Random access burst synch. sequence, GSM 05.02 5.2.7 */
 extern const BitVector gRACHBurst;
 
diff --git a/Transceiver52M/radioInterface.cpp b/Transceiver52M/radioInterface.cpp
index 0f949d7..6245cfc 100644
--- a/Transceiver52M/radioInterface.cpp
+++ b/Transceiver52M/radioInterface.cpp
@@ -245,7 +245,7 @@
    * Pre-allocate head room for the largest correlation size
    * so we can later avoid a re-allocation and copy
    * */
-  size_t head = GSM::gRACHSynchSequence.size();
+  size_t head = GSM::gRACHSynchSequenceTS0.size();
 
   /*
    * Form receive bursts and pass up to transceiver. Use repeating
diff --git a/Transceiver52M/sigProcLib.cpp b/Transceiver52M/sigProcLib.cpp
index 692fbe0..072fb3b 100644
--- a/Transceiver52M/sigProcLib.cpp
+++ b/Transceiver52M/sigProcLib.cpp
@@ -132,7 +132,7 @@
 
 static CorrelationSequence *gMidambles[] = {NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL};
 static CorrelationSequence *gEdgeMidambles[] = {NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL};
-static CorrelationSequence *gRACHSequence = NULL;
+static CorrelationSequence *gRACHSequences[] = {NULL,NULL,NULL};
 static PulseSequence *GSMPulse1 = NULL;
 static PulseSequence *GSMPulse4 = NULL;
 
@@ -150,11 +150,15 @@
     delayFilters[i] = NULL;
   }
 
+  for (int i = 0; i < 3; i++) {
+    delete gRACHSequences[i];
+    gRACHSequences[i] = NULL;
+  }
+
   delete GMSKRotation1;
   delete GMSKReverseRotation1;
   delete GMSKRotation4;
   delete GMSKReverseRotation4;
-  delete gRACHSequence;
   delete GSMPulse1;
   delete GSMPulse4;
   delete dnsampler;
@@ -163,7 +167,6 @@
   GMSKRotation4 = NULL;
   GMSKReverseRotation4 = NULL;
   GMSKReverseRotation1 = NULL;
-  gRACHSequence = NULL;
   GSMPulse1 = NULL;
   GSMPulse4 = NULL;
 }
@@ -1332,7 +1335,7 @@
   return seq;
 }
 
-static bool generateRACHSequence(int sps)
+static bool generateRACHSequence(CorrelationSequence **seq, const BitVector &bv, int sps)
 {
   bool status = true;
   float toa;
@@ -1340,13 +1343,14 @@
   signalVector *autocorr = NULL;
   signalVector *seq0 = NULL, *seq1 = NULL, *_seq1 = NULL;
 
-  delete gRACHSequence;
+  if (*seq != NULL)
+    delete *seq;
 
-  seq0 = modulateBurst(gRACHSynchSequence, 0, sps, false);
+  seq0 = modulateBurst(bv, 0, sps, false);
   if (!seq0)
     return false;
 
-  seq1 = modulateBurst(gRACHSynchSequence.segment(0, 40), 0, sps, true);
+  seq1 = modulateBurst(bv.segment(0, 40), 0, sps, true);
   if (!seq1) {
     status = false;
     goto release;
@@ -1366,19 +1370,19 @@
     goto release;
   }
 
-  gRACHSequence = new CorrelationSequence;
-  gRACHSequence->sequence = _seq1;
-  gRACHSequence->buffer = data;
-  gRACHSequence->gain = peakDetect(*autocorr, &toa, NULL);
+  *seq = new CorrelationSequence;
+  (*seq)->sequence = _seq1;
+  (*seq)->buffer = data;
+  (*seq)->gain = peakDetect(*autocorr, &toa, NULL);
 
   /* For 1 sps only
    *     (Half of correlation length - 1) + midpoint of pulse shaping filer
    *     20.5 = (40 / 2 - 1) + 1.5
    */
   if (sps == 1)
-    gRACHSequence->toa = toa - 20.5;
+    (*seq)->toa = toa - 20.5;
   else
-    gRACHSequence->toa = 0.0;
+    (*seq)->toa = 0.0;
 
 release:
   delete autocorr;
@@ -1388,7 +1392,7 @@
   if (!status) {
     delete _seq1;
     free(data);
-    gRACHSequence = NULL;
+    *seq = NULL;
   }
 
   return status;
@@ -1606,7 +1610,7 @@
   target = 8 + 40;
   head = 8;
   tail = 8 + max_toa;
-  sync = gRACHSequence;
+  sync = gRACHSequences[0];
 
   rc = detectGeneralBurst(burst, threshold, sps, amplitude, toa,
                           target, head, tail, sync);
@@ -1858,7 +1862,10 @@
   GSMPulse1 = generateGSMPulse(1);
   GSMPulse4 = generateGSMPulse(4);
 
-  generateRACHSequence(1);
+  generateRACHSequence(&gRACHSequences[0], gRACHSynchSequenceTS0, 1);
+  generateRACHSequence(&gRACHSequences[1], gRACHSynchSequenceTS1, 1);
+  generateRACHSequence(&gRACHSequences[2], gRACHSynchSequenceTS2, 1);
+
   for (int tsc = 0; tsc < 8; tsc++) {
     generateMidamble(1, tsc);
     gEdgeMidambles[tsc] = generateEdgeMidamble(tsc);

-- 
To view, visit https://gerrit.osmocom.org/11390
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I838c21db29c54f1924dd478c2b34b46b70aab2cd
Gerrit-Change-Number: 11390
Gerrit-PatchSet: 4
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Assignee: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Tom Tsou <tom at tsou.cc>
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181024/dcd1a740/attachment.htm>


More information about the gerrit-log mailing list