diff options
author | Michael West <michael.west@ettus.com> | 2020-03-19 12:29:29 -0700 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2020-05-12 12:03:31 -0500 |
commit | d0c162bc7a4ac82f6104506b17d7be05e1780336 (patch) | |
tree | 464a4ce1852dcd7ee986dff9a0d1c74267f3ecf5 /host | |
parent | 12dfb97c8efce40494efb35bdd81d06b6f8b9b62 (diff) | |
download | uhd-d0c162bc7a4ac82f6104506b17d7be05e1780336.tar.gz uhd-d0c162bc7a4ac82f6104506b17d7be05e1780336.tar.bz2 uhd-d0c162bc7a4ac82f6104506b17d7be05e1780336.zip |
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 <michael.west@ettus.com>
Diffstat (limited to 'host')
-rw-r--r-- | host/lib/include/uhdlib/usrp/cores/rx_frontend_core_3000.hpp | 9 | ||||
-rw-r--r-- | host/lib/usrp/cores/rx_frontend_core_3000.cpp | 24 | ||||
-rw-r--r-- | host/lib/usrp/x300/x300_radio_control.cpp | 5 |
3 files changed, 7 insertions, 31 deletions
diff --git a/host/lib/include/uhdlib/usrp/cores/rx_frontend_core_3000.hpp b/host/lib/include/uhdlib/usrp/cores/rx_frontend_core_3000.hpp index 6b5dafe2a..60c3feb73 100644 --- a/host/lib/include/uhdlib/usrp/cores/rx_frontend_core_3000.hpp +++ b/host/lib/include/uhdlib/usrp/cores/rx_frontend_core_3000.hpp @@ -45,13 +45,4 @@ public: virtual void set_iq_balance(const std::complex<double>& cor) = 0; virtual void populate_subtree(uhd::property_tree::sptr subtree) = 0; - - /*! Return the sampling rate at the output - * - * In real mode, the frontend core will decimate the sampling rate by a - * factor of 2. - * - * \returns RX sampling rate - */ - virtual double get_output_rate(void) = 0; }; 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(); |