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>
This commit is contained in:
parent
c8c4eac55e
commit
2e4ed10722
|
@ -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]))
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue