aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M/radioInterface.h
diff options
context:
space:
mode:
authorThomas Tsou <tom@tsou.cc>2013-08-20 20:54:54 -0400
committerThomas Tsou <tom@tsou.cc>2013-10-18 13:10:17 -0400
commit03e6ecf9771ea029e69fd4cdc2f2e289e93d3978 (patch)
tree9bd4abdc74ba979a051386b1d730378ae254bdab /Transceiver52M/radioInterface.h
parent3eaae80c90752abe3173c43a5dae5cdf17493764 (diff)
Transceiver52M: Replace resampler with SSE enabled implementation
Replace the polyphase filter and resampler with a separate implementation using SSE enabled convolution. The USRP2 (including derived devices N200, N210) are the only supported devices that require sample rate conversion, so set the default resampling parameters for the 100 MHz FPGA clock. This changes the previous resampling ratios. 270.833 kHz -> 400 kHz (65 / 96) 270.833 kHz -> 390.625 kHz (52 / 75) The new resampling factor uses a USRP resampling factor of 256 instead of 250. On the device, this allows two halfband filters to be used rather than one. The end result is reduced distortial and aliasing effecits from CIC filter rolloff. B100 and USRP1 will no be supported at 400 ksps with these changes. Signed-off-by: Thomas Tsou <tom@tsou.cc>
Diffstat (limited to 'Transceiver52M/radioInterface.h')
-rw-r--r--Transceiver52M/radioInterface.h25
1 files changed, 20 insertions, 5 deletions
diff --git a/Transceiver52M/radioInterface.h b/Transceiver52M/radioInterface.h
index a64702b..690d572 100644
--- a/Transceiver52M/radioInterface.h
+++ b/Transceiver52M/radioInterface.h
@@ -39,12 +39,14 @@ protected:
RadioDevice *mRadio; ///< the USRP object
- float *sendBuffer;
+ signalVector *sendBuffer;
+ signalVector *recvBuffer;
unsigned sendCursor;
+ unsigned recvCursor;
+
+ short *convertRecvBuffer;
+ short *convertSendBuffer;
- float *rcvBuffer;
- unsigned rcvCursor;
-
bool underrun; ///< indicates writes to USRP are too slow
bool overrun; ///< indicates reads from USRP are too slow
TIMESTAMP writeTimestamp; ///< sample timestamp of next packet written to USRP
@@ -85,6 +87,10 @@ public:
/** start the interface */
void start();
+ /** intialization */
+ virtual bool init();
+ virtual void close();
+
/** constructor */
RadioInterface(RadioDevice* wRadio = NULL,
int receiveOffset = 3,
@@ -92,7 +98,7 @@ public:
GSM::Time wStartTime = GSM::Time(0));
/** destructor */
- ~RadioInterface();
+ virtual ~RadioInterface();
/** check for underrun, resets underrun value */
bool isUnderrun();
@@ -156,6 +162,10 @@ void *AlignRadioServiceLoopAdapter(RadioInterface*);
class RadioInterfaceResamp : public RadioInterface {
private:
+ signalVector *innerSendBuffer;
+ signalVector *outerSendBuffer;
+ signalVector *innerRecvBuffer;
+ signalVector *outerRecvBuffer;
void pushBuffer();
void pullBuffer();
@@ -166,4 +176,9 @@ public:
int receiveOffset = 3,
int wSPS = SAMPSPERSYM,
GSM::Time wStartTime = GSM::Time(0));
+
+ ~RadioInterfaceResamp();
+
+ bool init();
+ void close();
};