Change in osmo-trx[master]: VTY: add extended (11-bit) RACH detection toggle

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/.

Max gerrit-no-reply at lists.osmocom.org
Thu Jan 24 16:23:20 UTC 2019


Max has submitted this change and it was merged. ( https://gerrit.osmocom.org/11423 )

Change subject: VTY: add extended (11-bit) RACH detection toggle
......................................................................

VTY: add extended (11-bit) RACH detection toggle

Since I838c21db29c54f1924dd478c2b34b46b70aab2cd we have both TS1
and TS2 synch. sequences, in addition to "default" TS0. Let's
finally introduce the VTY configuration parameter, that can
be used to toggle optional detection of both TS1 and TS2.

Note: we keep this optional because of potentially bad impact on
performance. There's no point in paying the performance penalty
unless upper levels (BTS, PCU) actually make use of it.

Change-Id: I1aee998d83b06692d76a83f79748f9129a2547e8
Related: OS#3054
---
M CommonLibs/trx_vty.c
M CommonLibs/trx_vty.h
M Transceiver52M/Transceiver.cpp
M Transceiver52M/Transceiver.h
M Transceiver52M/osmo-trx.cpp
5 files changed, 36 insertions(+), 10 deletions(-)

Approvals:
  Max: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/CommonLibs/trx_vty.c b/CommonLibs/trx_vty.c
index 45b58eb..3b1b979 100644
--- a/CommonLibs/trx_vty.c
+++ b/CommonLibs/trx_vty.c
@@ -304,6 +304,21 @@
 	return CMD_SUCCESS;
 }
 
+DEFUN(cfg_ext_rach, cfg_ext_rach_cmd,
+	"ext-rach (disable|enable)",
+	"Enable extended (11-bit) RACH (default=disable)\n")
+{
+	struct trx_ctx *trx = trx_from_vty(vty);
+
+	if (strcmp("disable", argv[0]) == 0)
+		trx->cfg.ext_rach = false;
+
+	if (strcmp("enable", argv[0]) == 0)
+		trx->cfg.ext_rach = true;
+
+	return CMD_SUCCESS;
+}
+
 DEFUN(cfg_rt_prio, cfg_rt_prio_cmd,
 	"rt-prio <1-32>",
 	"Set the SCHED_RR real-time priority\n"
@@ -417,6 +432,7 @@
 		vty_out(vty, " rssi-offset %f%s", trx->cfg.rssi_offset, VTY_NEWLINE);
 	vty_out(vty, " swap-channels %s%s", trx->cfg.swap_channels ? "enable" : "disable", VTY_NEWLINE);
 	vty_out(vty, " egprs %s%s", trx->cfg.egprs ? "enable" : "disable", VTY_NEWLINE);
+	vty_out(vty, " ext-rach %s%s", trx->cfg.ext_rach ? "enable" : "disable", VTY_NEWLINE);
 	if (trx->cfg.sched_rr != 0)
 		vty_out(vty, " rt-prio %u%s", trx->cfg.sched_rr, VTY_NEWLINE);
 
@@ -454,6 +470,7 @@
 	vty_out(vty, " RSSI to dBm offset: %f%s", trx->cfg.rssi_offset, VTY_NEWLINE);
 	vty_out(vty, " Swap channels: %s%s", trx->cfg.swap_channels ? "Enabled" : "Disabled", VTY_NEWLINE);
 	vty_out(vty, " EDGE support: %s%s", trx->cfg.egprs ? "Enabled" : "Disabled", VTY_NEWLINE);
+	vty_out(vty, " Extended RACH support: %s%s", trx->cfg.ext_rach ? "Enabled" : "Disabled", VTY_NEWLINE);
 	vty_out(vty, " Real Time Priority: %u (%s)%s", trx->cfg.sched_rr,
 		trx->cfg.sched_rr ? "Enabled" : "Disabled", VTY_NEWLINE);
 	vty_out(vty, " Channels: %u%s", trx->cfg.num_chans, VTY_NEWLINE);
@@ -564,6 +581,7 @@
 	install_element(TRX_NODE, &cfg_rssi_offset_cmd);
 	install_element(TRX_NODE, &cfg_swap_channels_cmd);
 	install_element(TRX_NODE, &cfg_egprs_cmd);
+	install_element(TRX_NODE, &cfg_ext_rach_cmd);
 	install_element(TRX_NODE, &cfg_rt_prio_cmd);
 	install_element(TRX_NODE, &cfg_filler_cmd);
 
diff --git a/CommonLibs/trx_vty.h b/CommonLibs/trx_vty.h
index c921722..8d251ee 100644
--- a/CommonLibs/trx_vty.h
+++ b/CommonLibs/trx_vty.h
@@ -57,6 +57,7 @@
 		double offset;
 		double rssi_offset;
 		bool swap_channels;
+		bool ext_rach;
 		bool egprs;
 		unsigned int sched_rr;
 		unsigned int num_chans;
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index df1c0bd..cfb36c3 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -159,7 +159,8 @@
  * are still expected to report clock indications through control channel
  * activity.
  */
-bool Transceiver::init(FillerType filler, size_t rtsc, unsigned rach_delay, bool edge)
+bool Transceiver::init(FillerType filler, size_t rtsc, unsigned rach_delay,
+                       bool edge, bool ext_rach)
 {
   int d_srcport, d_dstport, c_srcport, c_dstport;
 
@@ -173,6 +174,7 @@
     return false;
   }
 
+  mExtRACH = ext_rach;
   mEdge = edge;
 
   mDataSockets.resize(mChans);
@@ -497,16 +499,16 @@
     break;
   case IV:
   case VI:
-    return RACH;
+    return mExtRACH ? EXT_RACH : RACH;
     break;
   case V: {
     int mod51 = burstFN % 51;
     if ((mod51 <= 36) && (mod51 >= 14))
-      return RACH;
+      return mExtRACH ? EXT_RACH : RACH;
     else if ((mod51 == 4) || (mod51 == 5))
-      return RACH;
+      return mExtRACH ? EXT_RACH : RACH;
     else if ((mod51 == 45) || (mod51 == 46))
-      return RACH;
+      return mExtRACH ? EXT_RACH : RACH;
     else if (mHandover[burstTN][sdcch4_subslot[burstFN % 102]])
       return RACH;
     else
@@ -524,7 +526,7 @@
   case XIII: {
     int mod52 = burstFN % 52;
     if ((mod52 == 12) || (mod52 == 38))
-      return RACH;
+      return mExtRACH ? EXT_RACH : RACH;
     else if ((mod52 == 25) || (mod52 == 51))
       return IDLE;
     else
@@ -635,9 +637,11 @@
     noise = 20.0 * log10(rxFullScale / state->mNoiseLev);
   }
 
+  unsigned max_toa = (type == RACH || type == EXT_RACH) ?
+                      mMaxExpectedDelayAB : mMaxExpectedDelayNB;
+
   /* Detect normal or RACH bursts */
-  rc = detectAnyBurst(*burst, mTSC, BURST_THRESH, mSPSRx, type, amp, toa,
-                      (type==RACH)?mMaxExpectedDelayAB:mMaxExpectedDelayNB);
+  rc = detectAnyBurst(*burst, mTSC, BURST_THRESH, mSPSRx, type, amp, toa, max_toa);
 
   if (rc > 0) {
     type = (CorrType) rc;
diff --git a/Transceiver52M/Transceiver.h b/Transceiver52M/Transceiver.h
index e250adc..432e3b4 100644
--- a/Transceiver52M/Transceiver.h
+++ b/Transceiver52M/Transceiver.h
@@ -114,7 +114,8 @@
   ~Transceiver();
 
   /** Start the control loop */
-  bool init(FillerType filler, size_t rtsc, unsigned rach_delay, bool edge);
+  bool init(FillerType filler, size_t rtsc, unsigned rach_delay,
+            bool edge, bool ext_rach);
 
   /** attach the radioInterface receive FIFO */
   bool receiveFIFO(VectorFIFO *wFIFO, size_t chan)
@@ -210,6 +211,7 @@
   int mSPSRx;                          ///< number of samples per Rx symbol
   size_t mChans;
 
+  bool mExtRACH;
   bool mEdge;
   bool mOn;	                           ///< flag to indicate that transceiver is powered on
   bool mForceClockInterface;           ///< flag to indicate whether IND CLOCK shall be sent unconditionally after transceiver is started
diff --git a/Transceiver52M/osmo-trx.cpp b/Transceiver52M/osmo-trx.cpp
index 0e63020..1f35cd8 100644
--- a/Transceiver52M/osmo-trx.cpp
+++ b/Transceiver52M/osmo-trx.cpp
@@ -144,7 +144,7 @@
 			      trx->cfg.rx_sps, trx->cfg.num_chans, GSM::Time(3,0),
 			      radio, trx->cfg.rssi_offset);
 	if (!transceiver->init(trx->cfg.filler, trx->cfg.rtsc,
-		       trx->cfg.rach_delay, trx->cfg.egprs)) {
+		       trx->cfg.rach_delay, trx->cfg.egprs, trx->cfg.ext_rach)) {
 		LOG(ALERT) << "Failed to initialize transceiver";
 		return -1;
 	}
@@ -408,6 +408,7 @@
 	ost << "   Tx Samples-per-Symbol... " << trx->cfg.tx_sps << std::endl;
 	ost << "   Rx Samples-per-Symbol... " << trx->cfg.rx_sps << std::endl;
 	ost << "   EDGE support............ " << trx->cfg.egprs << std::endl;
+	ost << "   Extended RACH support... " << trx->cfg.ext_rach << std::endl;
 	ost << "   Reference............... " << trx->cfg.clock_ref << std::endl;
 	ost << "   C0 Filler Table......... " << trx->cfg.filler << std::endl;
 	ost << "   Multi-Carrier........... " << trx->cfg.multi_arfcn << std::endl;

-- 
To view, visit https://gerrit.osmocom.org/11423
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: I1aee998d83b06692d76a83f79748f9129a2547e8
Gerrit-Change-Number: 11423
Gerrit-PatchSet: 5
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: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-CC: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-CC: Tom Tsou <tom at tsou.cc>
Gerrit-CC: tnt <tnt at 246tNt.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190124/a79f9ead/attachment.htm>


More information about the gerrit-log mailing list