aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
Diffstat (limited to 'host')
-rw-r--r--host/examples/rx_ascii_art_dft.cpp2
-rw-r--r--host/examples/rx_samples_to_file.cpp2
-rw-r--r--host/examples/rx_samples_to_udp.cpp2
-rw-r--r--host/examples/tx_samples_from_file.cpp2
-rw-r--r--host/lib/convert/convert_impl.cpp3
-rw-r--r--host/lib/usrp/b200/b200_impl.cpp1
-rw-r--r--host/lib/usrp/cores/rx_dsp_core_200.cpp3
-rw-r--r--host/lib/usrp/cores/rx_dsp_core_3000.cpp9
-rw-r--r--host/lib/usrp/cores/rx_dsp_core_3000.hpp2
9 files changed, 18 insertions, 8 deletions
diff --git a/host/examples/rx_ascii_art_dft.cpp b/host/examples/rx_ascii_art_dft.cpp
index 85cf8b50c..564a9e749 100644
--- a/host/examples/rx_ascii_art_dft.cpp
+++ b/host/examples/rx_ascii_art_dft.cpp
@@ -55,7 +55,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
("frame-rate", po::value<double>(&frame_rate)->default_value(5), "frame rate of the display (fps)")
("ref-lvl", po::value<float>(&ref_lvl)->default_value(0), "reference level for the display (dB)")
("dyn-rng", po::value<float>(&dyn_rng)->default_value(60), "dynamic range for the display (dB)")
- ("ref", po::value<std::string>(&ref)->default_value("internal"), "waveform type (internal, external, mimo)")
+ ("ref", po::value<std::string>(&ref)->default_value("internal"), "reference source (internal, external, mimo)")
("int-n", "tune USRP with integer-N tuning")
;
po::variables_map vm;
diff --git a/host/examples/rx_samples_to_file.cpp b/host/examples/rx_samples_to_file.cpp
index de3640794..e196b8592 100644
--- a/host/examples/rx_samples_to_file.cpp
+++ b/host/examples/rx_samples_to_file.cpp
@@ -231,7 +231,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
("ant", po::value<std::string>(&ant), "daughterboard antenna selection")
("subdev", po::value<std::string>(&subdev), "daughterboard subdevice specification")
("bw", po::value<double>(&bw), "daughterboard IF filter bandwidth in Hz")
- ("ref", po::value<std::string>(&ref)->default_value("internal"), "waveform type (internal, external, mimo)")
+ ("ref", po::value<std::string>(&ref)->default_value("internal"), "reference source (internal, external, mimo)")
("wirefmt", po::value<std::string>(&wirefmt)->default_value("sc16"), "wire format (sc8 or sc16)")
("setup", po::value<double>(&setup_time)->default_value(1.0), "seconds of setup time")
("progress", "periodically display short-term bandwidth")
diff --git a/host/examples/rx_samples_to_udp.cpp b/host/examples/rx_samples_to_udp.cpp
index 2f62652e0..e397dbbf9 100644
--- a/host/examples/rx_samples_to_udp.cpp
+++ b/host/examples/rx_samples_to_udp.cpp
@@ -52,7 +52,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
("bw", po::value<double>(&bw), "daughterboard IF filter bandwidth in Hz")
("port", po::value<std::string>(&port)->default_value("7124"), "server udp port")
("addr", po::value<std::string>(&addr)->default_value("192.168.1.10"), "resolvable server address")
- ("ref", po::value<std::string>(&ref)->default_value("internal"), "waveform type (internal, external, mimo)")
+ ("ref", po::value<std::string>(&ref)->default_value("internal"), "reference source (internal, external, mimo)")
("int-n", "tune USRP with integer-N tuning")
;
po::variables_map vm;
diff --git a/host/examples/tx_samples_from_file.cpp b/host/examples/tx_samples_from_file.cpp
index f911c446e..3293f8bd4 100644
--- a/host/examples/tx_samples_from_file.cpp
+++ b/host/examples/tx_samples_from_file.cpp
@@ -88,7 +88,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
("ant", po::value<std::string>(&ant), "daughterboard antenna selection")
("subdev", po::value<std::string>(&subdev), "daughterboard subdevice specification")
("bw", po::value<double>(&bw), "daughterboard IF filter bandwidth in Hz")
- ("ref", po::value<std::string>(&ref)->default_value("internal"), "waveform type (internal, external, mimo)")
+ ("ref", po::value<std::string>(&ref)->default_value("internal"), "reference source (internal, external, mimo)")
("wirefmt", po::value<std::string>(&wirefmt)->default_value("sc16"), "wire format (sc8 or sc16)")
("delay", po::value<double>(&delay)->default_value(0.0), "specify a delay between repeated transmission of file")
("repeat", "repeatedly transmit file")
diff --git a/host/lib/convert/convert_impl.cpp b/host/lib/convert/convert_impl.cpp
index c7907ed83..caab3929e 100644
--- a/host/lib/convert/convert_impl.cpp
+++ b/host/lib/convert/convert_impl.cpp
@@ -144,4 +144,7 @@ UHD_STATIC_BLOCK(convert_register_item_sizes){
convert::register_bytes_per_item("s32", sizeof(boost::int32_t));
convert::register_bytes_per_item("s16", sizeof(boost::int16_t));
convert::register_bytes_per_item("s8", sizeof(boost::int8_t));
+
+ //register VITA types
+ convert::register_bytes_per_item("item32", sizeof(boost::int32_t));
}
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp
index 91a3cb037..ac2407eba 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_200.cpp b/host/lib/usrp/cores/rx_dsp_core_200.cpp
index 2fdc220b5..2e5ca8e7a 100644
--- a/host/lib/usrp/cores/rx_dsp_core_200.cpp
+++ b/host/lib/usrp/cores/rx_dsp_core_200.cpp
@@ -176,7 +176,8 @@ public:
//determine which half-band filters are activated
int hb0 = 0, hb1 = 0;
- if (decim % 2 == 0){
+ // hb0 can only be enabled if the rate will be decimated by at least 2 between the CIC and hb1
+ if (decim >= 4 && decim % 2 == 0){
hb0 = 1;
decim /= 2;
}
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;