aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--host/docs/usrp_x3x0.dox2
-rw-r--r--host/examples/rx_samples_to_udp.cpp5
-rw-r--r--host/lib/convert/convert_pack_sc12.cpp5
-rw-r--r--host/lib/convert/convert_unpack_sc12.cpp5
-rw-r--r--host/lib/usrp/b200/b200_impl.cpp12
-rw-r--r--host/lib/usrp/b200/b200_impl.hpp8
-rw-r--r--host/lib/usrp/b200/b200_io_impl.cpp16
7 files changed, 47 insertions, 6 deletions
diff --git a/host/docs/usrp_x3x0.dox b/host/docs/usrp_x3x0.dox
index 625048da1..ae3647641 100644
--- a/host/docs/usrp_x3x0.dox
+++ b/host/docs/usrp_x3x0.dox
@@ -17,7 +17,7 @@ More information:
- External PPS input & output
- External 10 MHz input & output
- Expandable via 2nd SFP+ interface
- - Supported master clock rates: 200 MHz, 184.32 MHz, 120 MHz
+ - Supported master clock rates: 200 MHz and 184.32 MHz
- External GPIO Connector with UHD API control
- External USB Connection for built-in JTAG debugger
- Internal GPSDO option
diff --git a/host/examples/rx_samples_to_udp.cpp b/host/examples/rx_samples_to_udp.cpp
index 9a8a3f4ac..a3f5624ca 100644
--- a/host/examples/rx_samples_to_udp.cpp
+++ b/host/examples/rx_samples_to_udp.cpp
@@ -74,6 +74,11 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
//Lock mboard clocks
usrp->set_clock_source(ref);
+ //always select the subdevice first, the channel mapping affects the other settings
+ if (vm.count("subdev")) {
+ usrp->set_rx_subdev_spec(subdev);
+ }
+
//set the rx sample rate
std::cout << boost::format("Setting RX Rate: %f Msps...") % (rate/1e6) << std::endl;
usrp->set_rx_rate(rate);
diff --git a/host/lib/convert/convert_pack_sc12.cpp b/host/lib/convert/convert_pack_sc12.cpp
index 322097e34..370e4a3e4 100644
--- a/host/lib/convert/convert_pack_sc12.cpp
+++ b/host/lib/convert/convert_pack_sc12.cpp
@@ -25,6 +25,11 @@ using namespace uhd::convert;
typedef boost::uint32_t (*towire32_type)(boost::uint32_t);
+/* C language specification requires this to be packed
+ * (i.e., line0, line1, line2 will be in adjacent memory locations).
+ * If this was not true, we'd need compiler flags here to specify
+ * alignment/packing.
+ */
struct item32_sc12_3x
{
item32_t line0;
diff --git a/host/lib/convert/convert_unpack_sc12.cpp b/host/lib/convert/convert_unpack_sc12.cpp
index 94b415355..9f7a84300 100644
--- a/host/lib/convert/convert_unpack_sc12.cpp
+++ b/host/lib/convert/convert_unpack_sc12.cpp
@@ -25,6 +25,11 @@ using namespace uhd::convert;
typedef boost::uint32_t (*tohost32_type)(boost::uint32_t);
+/* C language specification requires this to be packed
+ * (i.e., line0, line1, line2 will be in adjacent memory locations).
+ * If this was not true, we'd need compiler flags here to specify
+ * alignment/packing.
+ */
struct item32_sc12_3x
{
item32_t line0;
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp
index 78edec31c..b9905c0fc 100644
--- a/host/lib/usrp/b200/b200_impl.cpp
+++ b/host/lib/usrp/b200/b200_impl.cpp
@@ -792,9 +792,6 @@ void b200_impl::setup_radio(const size_t dspno)
////////////////////////////////////////////////////////////////////
// connect rx dsp control objects
////////////////////////////////////////////////////////////////////
- _tree->access<double>(mb_path / "tick_rate")
- .add_coerced_subscriber(boost::bind(&rx_vita_core_3000::set_tick_rate, perif.framer, _1))
- .add_coerced_subscriber(boost::bind(&rx_dsp_core_3000::set_tick_rate, perif.ddc, _1));
const fs_path rx_dsp_path = mb_path / "rx_dsps" / dspno;
perif.ddc->populate_subtree(_tree->subtree(rx_dsp_path));
_tree->create<bool>(rx_dsp_path / "rate" / "set").set(false);
@@ -805,12 +802,14 @@ void b200_impl::setup_radio(const size_t dspno)
;
_tree->create<stream_cmd_t>(rx_dsp_path / "stream_cmd")
.add_coerced_subscriber(boost::bind(&rx_vita_core_3000::issue_stream_command, perif.framer, _1));
+ _tree->access<double>(mb_path / "tick_rate")
+ .add_coerced_subscriber(boost::bind(&rx_vita_core_3000::set_tick_rate, perif.framer, _1))
+ .add_coerced_subscriber(boost::bind(&b200_impl::update_rx_dsp_tick_rate, this, _1, perif.ddc, rx_dsp_path))
+ ;
////////////////////////////////////////////////////////////////////
// create tx dsp control objects
////////////////////////////////////////////////////////////////////
- _tree->access<double>(mb_path / "tick_rate")
- .add_coerced_subscriber(boost::bind(&tx_dsp_core_3000::set_tick_rate, perif.duc, _1));
const fs_path tx_dsp_path = mb_path / "tx_dsps" / dspno;
perif.duc->populate_subtree(_tree->subtree(tx_dsp_path));
_tree->create<bool>(tx_dsp_path / "rate" / "set").set(false);
@@ -819,6 +818,9 @@ void b200_impl::setup_radio(const size_t dspno)
.add_coerced_subscriber(boost::bind(&lambda_set_bool_prop, boost::weak_ptr<property_tree>(_tree), tx_dsp_path / "rate" / "set", true, _1))
.add_coerced_subscriber(boost::bind(&b200_impl::update_tx_samp_rate, this, dspno, _1))
;
+ _tree->access<double>(mb_path / "tick_rate")
+ .add_coerced_subscriber(boost::bind(&b200_impl::update_tx_dsp_tick_rate, this, _1, perif.duc, tx_dsp_path))
+ ;
////////////////////////////////////////////////////////////////////
// create RF frontend interfacing
diff --git a/host/lib/usrp/b200/b200_impl.hpp b/host/lib/usrp/b200/b200_impl.hpp
index 257d9988f..130e93891 100644
--- a/host/lib/usrp/b200/b200_impl.hpp
+++ b/host/lib/usrp/b200/b200_impl.hpp
@@ -259,6 +259,14 @@ private:
void update_tick_rate(const double);
+ /*! Subscriber to the tick_rate property, updates DDCs after tick rate change.
+ */
+ void update_rx_dsp_tick_rate(const double, rx_dsp_core_3000::sptr, uhd::fs_path rx_dsp_path);
+
+ /*! Subscriber to the tick_rate property, updates DUCs after tick rate change.
+ */
+ void update_tx_dsp_tick_rate(const double, tx_dsp_core_3000::sptr, uhd::fs_path tx_dsp_path);
+
/*! Check if \p tick_rate works with \p chan_count channels.
*
* Throws a uhd::value_error if not.
diff --git a/host/lib/usrp/b200/b200_io_impl.cpp b/host/lib/usrp/b200/b200_io_impl.cpp
index 85d61280f..283091140 100644
--- a/host/lib/usrp/b200/b200_io_impl.cpp
+++ b/host/lib/usrp/b200/b200_io_impl.cpp
@@ -161,6 +161,22 @@ void b200_impl::update_tick_rate(const double new_tick_rate)
}
}
+void b200_impl::update_rx_dsp_tick_rate(const double tick_rate, rx_dsp_core_3000::sptr ddc, uhd::fs_path rx_dsp_path)
+{
+ ddc->set_tick_rate(tick_rate);
+ if (_tree->access<bool>(rx_dsp_path / "rate" / "set").get()) {
+ ddc->set_host_rate(_tree->access<double>(rx_dsp_path / "rate" / "value").get());
+ }
+}
+
+void b200_impl::update_tx_dsp_tick_rate(const double tick_rate, tx_dsp_core_3000::sptr duc, uhd::fs_path tx_dsp_path)
+{
+ duc->set_tick_rate(tick_rate);
+ if (_tree->access<bool>(tx_dsp_path / "rate" / "set").get()) {
+ duc->set_host_rate(_tree->access<double>(tx_dsp_path / "rate" / "value").get());
+ }
+}
+
#define CHECK_RATE_AND_THROW(rate) \
if (uhd::math::fp_compare::fp_compare_delta<double>(rate, uhd::math::FREQ_COMPARISON_DELTA_HZ) > \
uhd::math::fp_compare::fp_compare_delta<double>(ad9361_device_t::AD9361_MAX_CLOCK_RATE, uhd::math::FREQ_COMPARISON_DELTA_HZ)) { \