aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Corgan <nick.corgan@ettus.com>2014-06-17 07:31:03 -0700
committerNicholas Corgan <nick.corgan@ettus.com>2014-06-17 07:31:03 -0700
commit18840c957b8ff0296ae278612a12d88d3001557b (patch)
tree7e6aa98358366983f56cb59bfa9e9910d6e9bdff
parentdc48e5ea2588d2896f9663a96040acfea061fe83 (diff)
parent96c30a11f2924fcb5f914f2922506fe6cfdd93ec (diff)
downloaduhd-18840c957b8ff0296ae278612a12d88d3001557b.tar.gz
uhd-18840c957b8ff0296ae278612a12d88d3001557b.tar.bz2
uhd-18840c957b8ff0296ae278612a12d88d3001557b.zip
Merge branch 'maint'
-rw-r--r--host/lib/usrp/b200/b200_impl.cpp1
-rw-r--r--host/lib/usrp/cores/rx_dsp_core_3000.cpp9
-rw-r--r--host/lib/usrp/cores/rx_dsp_core_3000.hpp2
3 files changed, 9 insertions, 3 deletions
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp
index 98141dbaa..261183128 100644
--- a/host/lib/usrp/b200/b200_impl.cpp
+++ b/host/lib/usrp/b200/b200_impl.cpp
@@ -518,6 +518,7 @@ void b200_impl::setup_radio(const size_t dspno)
perif.framer = rx_vita_core_3000::make(perif.ctrl, TOREG(SR_RX_CTRL));
perif.ddc = rx_dsp_core_3000::make(perif.ctrl, TOREG(SR_RX_DSP), true /*is_b200?*/);
perif.ddc->set_link_rate(10e9/8); //whatever
+ perif.ddc->set_mux("IQ", false, dspno == 1 ? true : false, dspno == 1 ? true : false);
_tree->access<double>(mb_path / "tick_rate")
.subscribe(boost::bind(&rx_vita_core_3000::set_tick_rate, perif.framer, _1))
.subscribe(boost::bind(&rx_dsp_core_3000::set_tick_rate, perif.ddc, _1));
diff --git a/host/lib/usrp/cores/rx_dsp_core_3000.cpp b/host/lib/usrp/cores/rx_dsp_core_3000.cpp
index 02c24b4bb..584dd6a94 100644
--- a/host/lib/usrp/cores/rx_dsp_core_3000.cpp
+++ b/host/lib/usrp/cores/rx_dsp_core_3000.cpp
@@ -37,6 +37,8 @@
#define FLAG_DSP_RX_MUX_SWAP_IQ (1 << 0)
#define FLAG_DSP_RX_MUX_REAL_MODE (1 << 1)
+#define FLAG_DSP_RX_MUX_INVERT_Q (1 << 2)
+#define FLAG_DSP_RX_MUX_INVERT_I (1 << 3)
template <class T> T ceil_log2(T num){
return std::ceil(std::log(num)/std::log(T(2)));
@@ -70,14 +72,17 @@ public:
)
}
- void set_mux(const std::string &mode, const bool fe_swapped){
+ void set_mux(const std::string &mode, const bool fe_swapped, const bool invert_i, const bool invert_q){
static const uhd::dict<std::string, boost::uint32_t> mode_to_mux = boost::assign::map_list_of
("IQ", 0)
("QI", FLAG_DSP_RX_MUX_SWAP_IQ)
("I", FLAG_DSP_RX_MUX_REAL_MODE)
("Q", FLAG_DSP_RX_MUX_SWAP_IQ | FLAG_DSP_RX_MUX_REAL_MODE)
;
- _iface->poke32(REG_DSP_RX_MUX, mode_to_mux[mode] ^ (fe_swapped? FLAG_DSP_RX_MUX_SWAP_IQ : 0));
+ _iface->poke32(REG_DSP_RX_MUX, mode_to_mux[mode]
+ | (fe_swapped ? FLAG_DSP_RX_MUX_SWAP_IQ : 0)
+ | (invert_i ? FLAG_DSP_RX_MUX_INVERT_I : 0)
+ | (invert_q ? FLAG_DSP_RX_MUX_INVERT_Q : 0));
}
void set_tick_rate(const double rate){
diff --git a/host/lib/usrp/cores/rx_dsp_core_3000.hpp b/host/lib/usrp/cores/rx_dsp_core_3000.hpp
index f35e1e3d3..8c6a2178d 100644
--- a/host/lib/usrp/cores/rx_dsp_core_3000.hpp
+++ b/host/lib/usrp/cores/rx_dsp_core_3000.hpp
@@ -37,7 +37,7 @@ public:
const bool is_b200 = false //TODO: Obsolete this when we switch to the new DDC on the B200
);
- virtual void set_mux(const std::string &mode, const bool fe_swapped = false) = 0;
+ virtual void set_mux(const std::string &mode, const bool fe_swapped = false, const bool invert_i = false, const bool invert_q = false) = 0;
virtual void set_tick_rate(const double rate) = 0;