From d0c162bc7a4ac82f6104506b17d7be05e1780336 Mon Sep 17 00:00:00 2001 From: Michael West Date: Thu, 19 Mar 2020 12:29:29 -0700 Subject: TwinRX: Remove decimation from frontend The decimation in the rx_frontend_gen3 was added to reduce the bandwidth between the Radio and the DDC due to the limitation in bandwidth over the crossbar for dynamically connected blocks. The default FPGA image for the X300 now has a static connection between the Radio and DDC, so this is no longer necessary. This change allows the TwinRX receive channels to be time aligned with channels from other daughterboards so they can be used in the same streamer. Signed-off-by: Michael West --- host/lib/usrp/cores/rx_frontend_core_3000.cpp | 24 ++++++------------------ host/lib/usrp/x300/x300_radio_control.cpp | 5 +---- 2 files changed, 7 insertions(+), 22 deletions(-) (limited to 'host/lib/usrp') diff --git a/host/lib/usrp/cores/rx_frontend_core_3000.cpp b/host/lib/usrp/cores/rx_frontend_core_3000.cpp index 1dc8be745..756f0995d 100644 --- a/host/lib/usrp/cores/rx_frontend_core_3000.cpp +++ b/host/lib/usrp/cores/rx_frontend_core_3000.cpp @@ -23,11 +23,11 @@ using namespace uhd; #define REG_RX_FE_MAPPING (base + reg_offset * 4) #define REG_RX_FE_HET_CORDIC_PHASE (base + reg_offset * 5) -#define FLAG_DSP_RX_MAPPING_SWAP_IQ (1 << 0) -#define FLAG_DSP_RX_MAPPING_REAL_MODE (1 << 1) -#define FLAG_DSP_RX_MAPPING_INVERT_Q (1 << 2) -#define FLAG_DSP_RX_MAPPING_INVERT_I (1 << 3) -#define FLAG_DSP_RX_MAPPING_REAL_DECIM (1 << 4) +#define FLAG_DSP_RX_MAPPING_SWAP_IQ (1 << 0) +#define FLAG_DSP_RX_MAPPING_REAL_MODE (1 << 1) +#define FLAG_DSP_RX_MAPPING_INVERT_Q (1 << 2) +#define FLAG_DSP_RX_MAPPING_INVERT_I (1 << 3) +#define FLAG_DSP_RX_MAPPING_DOWNCONVERT (1 << 4) //#define FLAG_DSP_RX_MAPPING_RESERVED (1 << 5) //#define FLAG_DSP_RX_MAPPING_RESERVED (1 << 6) #define FLAG_DSP_RX_MAPPING_BYPASS_ALL (1 << 7) @@ -102,7 +102,7 @@ public: break; case fe_connection_t::HETERODYNE: mapping_reg_val = FLAG_DSP_RX_MAPPING_REAL_MODE - | FLAG_DSP_RX_MAPPING_REAL_DECIM; + | FLAG_DSP_RX_MAPPING_DOWNCONVERT; break; default: mapping_reg_val = 0; @@ -189,18 +189,6 @@ public: &rx_frontend_core_3000::set_iq_balance, this, std::placeholders::_1)); } - double get_output_rate() - { - switch (_fe_conn.get_sampling_mode()) { - case fe_connection_t::REAL: - return _adc_rate; - case fe_connection_t::HETERODYNE: - return _adc_rate / 2; - default: - return _adc_rate; - } - } - private: int32_t _i_dc_off, _q_dc_off; double _adc_rate; diff --git a/host/lib/usrp/x300/x300_radio_control.cpp b/host/lib/usrp/x300/x300_radio_control.cpp index c4cea2f8e..7c15554af 100644 --- a/host/lib/usrp/x300/x300_radio_control.cpp +++ b/host/lib/usrp/x300/x300_radio_control.cpp @@ -1582,10 +1582,7 @@ private: tx_chan++; } UHD_ASSERT_THROW(rx_chan or tx_chan); - const double actual_rate = rx_chan ? _rx_fe_map.at(0).core->get_output_rate() - : get_rate(); - RFNOC_LOG_DEBUG("Actual sample rate: " << (actual_rate / 1e6) << " Msps."); - radio_control_impl::set_rate(actual_rate); + RFNOC_LOG_DEBUG("Actual sample rate: " << (get_rate() / 1e6) << " Msps."); // Initialize the daughterboards now that frontend cores and connections exist _db_manager->initialize_dboards(); -- cgit v1.2.3