Transceiver52M: Setup dual sample rate transceiver

This patch applies oversampling, when selected with 4 sps,
to the downlink only, while running the receiver with
minimal sampling at 1 sps. These split sample rates allow
us to run a highly accurate downlink signal with minimal
distortion, while keeping receive path channel filtering
on the FPGA.

Without this patch, we oversample the receive path and
require a steep receive filter to get similar adjacent
channel suppression as the FPGA halfband / CIC filter
combination, which comes with a high computational cost.

Signed-off-by: Thomas Tsou <tom@tsou.cc>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6747 19bc5d8c-e614-43d4-8b26-e1612bc8e597
This commit is contained in:
Thomas Tsou
2013-10-17 06:19:05 +00:00
parent 8652b22386
commit 22bc28edc4
10 changed files with 229 additions and 162 deletions

View File

@@ -28,14 +28,6 @@ extern "C" {
#include "convert.h"
}
/* New chunk sizes for resampled rate */
#ifdef INCHUNK
#undef INCHUNK
#endif
#ifdef OUTCHUNK
#undef OUTCHUNK
#endif
/* Resampling parameters for 100 MHz clocking */
#define RESAMP_INRATE 52
#define RESAMP_OUTRATE 75
@@ -104,7 +96,7 @@ bool RadioInterfaceResamp::init()
cutoff = RESAMP_TX4_FILTER;
dnsampler = new Resampler(RESAMP_INRATE, RESAMP_OUTRATE);
if (!dnsampler->init(cutoff)) {
if (!dnsampler->init()) {
LOG(ALERT) << "Rx resampler failed to initialize";
return false;
}
@@ -121,10 +113,10 @@ bool RadioInterfaceResamp::init()
* and requires headroom equivalent to the filter length. Low
* rate buffers are allocated in the main radio interface code.
*/
innerSendBuffer = new signalVector(INCHUNK * 20, RESAMP_FILT_LEN);
innerSendBuffer = new signalVector(INCHUNK * 20, upsampler->len());
outerSendBuffer = new signalVector(OUTCHUNK * 20);
outerRecvBuffer = new signalVector(OUTCHUNK * 2, RESAMP_FILT_LEN);
outerRecvBuffer = new signalVector(OUTCHUNK * 2, dnsampler->len());
innerRecvBuffer = new signalVector(INCHUNK * 20);
convertSendBuffer = new short[OUTCHUNK * 2 * 20];