aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M/DriveLoop.h
diff options
context:
space:
mode:
authorThomas Tsou <ttsou@vt.edu>2012-06-05 20:31:28 -0400
committerAlexander Chemeris <Alexander.Chemeris@gmail.com>2013-06-24 01:51:02 +0400
commit41c6657938e930a1c20070d5a8952e6dea12ec32 (patch)
tree37245a030b3e44e1e3d25086af9fa29b94f6054e /Transceiver52M/DriveLoop.h
parentcd576c9636244938a42d8c69da012e45e9fdd4f5 (diff)
multi-arfcn: refactor to match upstream GSM core
This patch aligns the multicarrier (MC) USRP code with released GSM core changes that accommodate the MC RAD1. Primary changes are: 1. Runtime setting of number of channelizer paths 2. Matching channelizer path to ARFCN mapping of GSM core 3. Use a single clock update socket on the drive loop 4. Match transceiver data and control socket ports Setting of channelizer paths (or width) was previously fixed at compile time. In either case, channelizer width is limited by the sample rate of the device and channel spacing of the maximally decimated filterbank. Available settings are 1, 5, and 10 channels, which accommodate any number of ARFCN's in between. Also add the frequency offsets to handle the effective shift in setting RF frequency. Previous assumption was to place C0 at the center frequency, but RAD1 assumes C0 at the leftmost carrier, so adjust accordingly. The rest is general consolidation to mostly match the RAD1 interaction with GSM core. There is some loss of flexibility to run, say, multiple independent instances of OpenBTS through a single bank of channelized transceivers. But, the better compatibility and reduction in code is the appropriate tradeoff. Signed-off-by: Thomas Tsou <ttsou@vt.edu>
Diffstat (limited to 'Transceiver52M/DriveLoop.h')
-rw-r--r--Transceiver52M/DriveLoop.h33
1 files changed, 20 insertions, 13 deletions
diff --git a/Transceiver52M/DriveLoop.h b/Transceiver52M/DriveLoop.h
index 593ef58..442d27c 100644
--- a/Transceiver52M/DriveLoop.h
+++ b/Transceiver52M/DriveLoop.h
@@ -50,10 +50,11 @@ private:
GSM::Time mTransmitLatency; ///< latency between basestation clock and transmit deadline clock
GSM::Time mLatencyUpdateTime; ///< last time latency was updated
+ GSM::Time mLastClockUpdateTime; ///< last time clock update was sent up to core
UDPSocket mClockSocket; ///< socket for writing clock updates to GSM core
- VectorQueue mTransmitPriorityQueue[CHAN_M]; ///< priority queue of transmit bursts received from GSM core
+ VectorQueue mTransmitPriorityQueue[CHAN_MAX]; ///< priority queue of transmit bursts received from GSM core
Thread *mRadioDriveLoopThread; ///< thread to push/pull bursts into transmit/receive FIFO
@@ -64,6 +65,8 @@ private:
double txFullScale; ///< full scale input to radio
double rxFullScale; ///< full scale output to radio
+ /** Number of channels supported by the channelizer */
+ int mChanM;
/** unmodulate a modulated burst */
#ifdef TRANSMIT_LOGGING
@@ -79,20 +82,20 @@ private:
/** Pull and demodulate a burst from the receive FIFO */
SoftVector *pullRadioVector(GSM::Time &wTime, int &RSSI, int &timingOffset);
- /** send messages over the clock socket */
- void writeClockInterface(void);
-
signalVector *gsmPulse; ///< the GSM shaping pulse for modulation
int mSamplesPerSymbol; ///< number of samples per GSM symbol
bool mOn; ///< flag to indicate that transceiver is powered on
- int fillerModulus[CHAN_M][8]; ///< modulus values of all timeslots, in frames
- signalVector *fillerTable[CHAN_M][102][8]; ///< table of modulated filler waveforms for all timeslots
+ int fillerModulus[CHAN_MAX][8]; ///< modulus values of all timeslots, in frames
+ signalVector *fillerTable[CHAN_MAX][102][8]; ///< table of modulated filler waveforms for all timeslots
+
+ /** Channelizer path for primary ARFCN */
+ int mC0;
- signalVector *mTxBursts[CHAN_M];
- bool mIsFiller[CHAN_M];
- bool mIsZero[CHAN_M];
+ signalVector *mTxBursts[CHAN_MAX];
+ bool mIsFiller[CHAN_MAX];
+ bool mIsZero[CHAN_MAX];
public:
@@ -103,7 +106,8 @@ public:
@param wTransmitLatency initial setting of transmit latency
@param radioInterface associated radioInterface object
*/
- DriveLoop(int wSamplesPerSymbol,
+ DriveLoop(int wBasePort, const char *TRXAddress,
+ int wChanM, int wC0, int wSamplesPerSymbol,
GSM::Time wTransmitLatency,
RadioInterface *wRadioInterface);
@@ -115,8 +119,6 @@ public:
VectorQueue *priorityQueue(int m) { return &mTransmitPriorityQueue[m]; }
- GSM::Time *deadlineClock() { return &mTransmitDeadlineClock; }
-
/** Codes for burst types of received bursts*/
typedef enum {
OFF, ///< timeslot is off
@@ -151,10 +153,15 @@ public:
}
GSM::Time getStartTime() { return mStartTime; }
+ GSM::Time getLastClockUpdate() { return mLastClockUpdateTime; }
+ GSM::Time getDeadlineClock() { return mTransmitDeadlineClock; }
+
+ /** send messages over the clock socket */
+ void writeClockInterface(void);
private:
- ChannelCombination mChanType[CHAN_M][8]; ///< channel types for all timeslots
+ ChannelCombination mChanType[CHAN_MAX][8]; ///< channel types for all timeslots
protected: