aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M/radioInterface.cpp
diff options
context:
space:
mode:
authorTom Tsou <tom.tsou@ettus.com>2016-03-06 01:28:40 -0800
committerTom Tsou <tom.tsou@ettus.com>2016-03-06 19:11:05 -0800
commit5cd70dc4ec6a658c2835c805a8b941351c90ccb0 (patch)
tree571f45571df6ed78ec04fb19a607aabcc4feb815 /Transceiver52M/radioInterface.cpp
parent465694027b297d624f1a87803c46b1ed46d5be95 (diff)
EDGE: Setup variable sampling on receive path
Allow setting the device to non single SPS sample rates - mainly running at 4 SPS as the signal processing library does not support other rates. Wider bandwith support is required on the receive path to avoid 8-PSK bandlimiting distortion for EDGE. Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Diffstat (limited to 'Transceiver52M/radioInterface.cpp')
-rw-r--r--Transceiver52M/radioInterface.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/Transceiver52M/radioInterface.cpp b/Transceiver52M/radioInterface.cpp
index 14a4fc2..7256b9b 100644
--- a/Transceiver52M/radioInterface.cpp
+++ b/Transceiver52M/radioInterface.cpp
@@ -33,12 +33,12 @@ extern "C" {
#define CHUNK 625
#define NUMCHUNKS 4
-RadioInterface::RadioInterface(RadioDevice *wRadio,
- size_t sps, size_t chans, size_t diversity,
+RadioInterface::RadioInterface(RadioDevice *wRadio, size_t tx_sps,
+ size_t rx_sps, size_t chans, size_t diversity,
int wReceiveOffset, GSM::Time wStartTime)
- : mRadio(wRadio), mSPSTx(sps), mSPSRx(1), mChans(chans), mMIMO(diversity),
- sendCursor(0), recvCursor(0), underrun(false), overrun(false),
- receiveOffset(wReceiveOffset), mOn(false)
+ : mRadio(wRadio), mSPSTx(tx_sps), mSPSRx(rx_sps), mChans(chans),
+ mMIMO(diversity), sendCursor(0), recvCursor(0), underrun(false),
+ overrun(false), receiveOffset(wReceiveOffset), mOn(false)
{
mClock.set(wStartTime);
}
@@ -262,7 +262,12 @@ bool RadioInterface::driveReceiveRadio()
int recvSz = recvCursor;
int readSz = 0;
const int symbolsPerSlot = gSlotLen + 8;
- int burstSize = (symbolsPerSlot + (tN % 4 == 0)) * mSPSRx;
+ int burstSize;
+
+ if (mSPSRx == 4)
+ burstSize = 625;
+ else
+ burstSize = symbolsPerSlot + (tN % 4 == 0);
/*
* Pre-allocate head room for the largest correlation size
@@ -297,7 +302,8 @@ bool RadioInterface::driveReceiveRadio()
tN = rcvClock.TN();
- burstSize = (symbolsPerSlot + (tN % 4 == 0)) * mSPSRx;
+ if (mSPSRx != 4)
+ burstSize = (symbolsPerSlot + (tN % 4 == 0)) * mSPSRx;
}
if (readSz > 0) {