aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/cores
diff options
context:
space:
mode:
authorBen Hilburn <ben.hilburn@ettus.com>2014-06-16 15:51:27 -0700
committerBen Hilburn <ben.hilburn@ettus.com>2014-06-16 15:51:27 -0700
commit96c30a11f2924fcb5f914f2922506fe6cfdd93ec (patch)
treeb8b0dd59af69c564a1ca4f9f0ecdcc442322837c /host/lib/usrp/cores
parente4f94aaaf4b9d9cc2af8ce5199f0898581a614f8 (diff)
parentc884c555be0d85c659e2ece2f44440b2f679d2ca (diff)
downloaduhd-96c30a11f2924fcb5f914f2922506fe6cfdd93ec.tar.gz
uhd-96c30a11f2924fcb5f914f2922506fe6cfdd93ec.tar.bz2
uhd-96c30a11f2924fcb5f914f2922506fe6cfdd93ec.zip
Merge branch 'origin/b200/bug500' into maint - Fixing B200 phase alignment issue
Diffstat (limited to 'host/lib/usrp/cores')
-rw-r--r--host/lib/usrp/cores/rx_dsp_core_3000.cpp9
-rw-r--r--host/lib/usrp/cores/rx_dsp_core_3000.hpp2
2 files changed, 8 insertions, 3 deletions
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;