aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Tsou <tom.tsou@ettus.com>2016-06-27 15:39:16 -0700
committerTom Tsou <tom.tsou@ettus.com>2016-07-01 03:02:56 -0700
commit2e4ed1072227350ab8dd31a8458316e2a9355453 (patch)
tree0f220fd2679979bb455632a110dbef122527fb80
parentc8c4eac55e4f44ead12489bda308ba361bb723f2 (diff)
transceiver: Add Rx samples-per-symbol option
Previous approach was to enable 4 SPS on the receive path only for EDGE use, which is not a requirement for 4 SPS operation. Make the 4 SPS configuration setting directly settable. Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
-rw-r--r--Transceiver52M/UHDDevice.cpp18
-rw-r--r--Transceiver52M/osmo-trx.cpp24
2 files changed, 21 insertions, 21 deletions
diff --git a/Transceiver52M/UHDDevice.cpp b/Transceiver52M/UHDDevice.cpp
index b3d65a4..0dc0549 100644
--- a/Transceiver52M/UHDDevice.cpp
+++ b/Transceiver52M/UHDDevice.cpp
@@ -105,20 +105,20 @@ static struct uhd_dev_offset uhd_offsets[] = {
{ B100, 1, 1, 1.2104e-4, "B100 1 SPS" },
{ B100, 4, 1, 7.9307e-5, "B100 4 SPS" },
{ B200, 1, 1, B2XX_TIMING_1SPS, "B200 1 SPS" },
- { B200, 4, 1, B2XX_TIMING_4SPS, "B200 4 SPS" },
+ { B200, 4, 1, B2XX_TIMING_4SPS, "B200 4/1 Tx/Rx SPS" },
{ B210, 1, 1, B2XX_TIMING_1SPS, "B210 1 SPS" },
- { B210, 4, 1, B2XX_TIMING_4SPS, "B210 4 SPS" },
+ { B210, 4, 1, B2XX_TIMING_4SPS, "B210 4/1 Tx/Rx SPS" },
{ E1XX, 1, 1, 9.5192e-5, "E1XX 1 SPS" },
- { E1XX, 4, 1, 6.5571e-5, "E1XX 4 SPS" },
+ { E1XX, 4, 1, 6.5571e-5, "E1XX 4/1 Tx/Rx SPS" },
{ E3XX, 1, 1, 1.84616e-4, "E3XX 1 SPS" },
- { E3XX, 4, 1, 1.29231e-4, "E3XX 4 SPS" },
+ { E3XX, 4, 1, 1.29231e-4, "E3XX 4/1 Tx/Rx SPS" },
{ X3XX, 1, 1, 1.5360e-4, "X3XX 1 SPS"},
- { X3XX, 4, 1, 1.1264e-4, "X3XX 4 SPS"},
+ { X3XX, 4, 1, 1.1264e-4, "X3XX 4/1 Tx/Rx SPS"},
{ UMTRX, 1, 1, 9.9692e-5, "UmTRX 1 SPS" },
- { UMTRX, 4, 1, 7.3846e-5, "UmTRX 4 SPS" },
- { B200, 4, 4, B2XX_TIMING_4_4SPS, "B200/B210 EDGE mode (4 SPS TX/RX)" },
- { B210, 4, 4, B2XX_TIMING_4_4SPS, "B200/B210 EDGE mode (4 SPS TX/RX)" },
- { UMTRX, 4, 4, 5.1503e-5, "UmTRX EDGE mode (4 SPS TX/RX)" },
+ { UMTRX, 4, 1, 7.3846e-5, "UmTRX 4/1 Tx/Rx SPS" },
+ { B200, 4, 4, B2XX_TIMING_4_4SPS, "B200/B210 4 SPS" },
+ { B210, 4, 4, B2XX_TIMING_4_4SPS, "B200/B210 4 SPS" },
+ { UMTRX, 4, 4, 5.1503e-5, "UmTRX 4 SPS" },
};
#define NUM_UHD_OFFSETS (sizeof(uhd_offsets)/sizeof(uhd_offsets[0]))
diff --git a/Transceiver52M/osmo-trx.cpp b/Transceiver52M/osmo-trx.cpp
index f4b585e..241e69c 100644
--- a/Transceiver52M/osmo-trx.cpp
+++ b/Transceiver52M/osmo-trx.cpp
@@ -221,10 +221,6 @@ RadioInterface *makeRadioInterface(struct trx_config *config,
{
RadioInterface *radio = NULL;
- if ((config->rx_sps != 1) && (type != RadioDevice::NORMAL)) {
- LOG(ALERT) << "Unsupported radio interface configuration";
- }
-
switch (type) {
case RadioDevice::NORMAL:
radio = new RadioInterface(usrp, config->tx_sps,
@@ -314,7 +310,8 @@ static void print_help()
" -e Enable EDGE receiver\n"
" -d Enable dual channel diversity receiver\n"
" -x Enable external 10 MHz reference\n"
- " -s Samples-per-symbol (1 or 4)\n"
+ " -s Tx samples-per-symbol (1 or 4)\n"
+ " -b Rx samples-per-symbol (1 or 4)\n"
" -c Number of ARFCN channels (default=1)\n"
" -f Enable C0 filler table\n"
" -o Set baseband frequency offset (default=auto)\n"
@@ -343,7 +340,7 @@ static void handle_options(int argc, char **argv, struct trx_config *config)
config->swap_channels = false;
config->edge = false;
- while ((option = getopt(argc, argv, "ha:l:i:p:c:dxfo:s:r:A:R:Se")) != -1) {
+ while ((option = getopt(argc, argv, "ha:l:i:p:c:dxfo:s:b:r:A:R:Se")) != -1) {
switch (option) {
case 'h':
print_help();
@@ -379,6 +376,9 @@ static void handle_options(int argc, char **argv, struct trx_config *config)
case 's':
config->tx_sps = atoi(optarg);
break;
+ case 'b':
+ config->rx_sps = atoi(optarg);
+ break;
case 'r':
config->rtsc = atoi(optarg);
config->filler = Transceiver::FILLER_NORM_RAND;
@@ -403,6 +403,12 @@ static void handle_options(int argc, char **argv, struct trx_config *config)
}
}
+ /* Force 4 SPS for EDGE configurations */
+ if (config->edge) {
+ config->tx_sps = 4;
+ config->rx_sps = 4;
+ }
+
if (config->edge && (config->filler == Transceiver::FILLER_NORM_RAND))
config->filler = Transceiver::FILLER_EDGE_RAND;
@@ -412,12 +418,6 @@ static void handle_options(int argc, char **argv, struct trx_config *config)
exit(0);
}
- if (config->edge && (config->tx_sps != 4)) {
- printf("EDGE only supported at 4 samples per symbol\n\n");
- print_help();
- exit(0);
- }
-
if (config->rtsc > 7) {
printf("Invalid training sequence %i\n\n", config->rtsc);
print_help();