From 1b82c24861e2ecdd9666b0b3c664b43c5978b7c9 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Fri, 18 Nov 2016 11:23:33 -0800 Subject: device3: Backed-out the alignment adaption --- host/lib/usrp/device3/device3_io_impl.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'host') diff --git a/host/lib/usrp/device3/device3_io_impl.cpp b/host/lib/usrp/device3/device3_io_impl.cpp index 4ec14c43b..386b4d66e 100644 --- a/host/lib/usrp/device3/device3_io_impl.cpp +++ b/host/lib/usrp/device3/device3_io_impl.cpp @@ -473,10 +473,6 @@ void device3_impl::update_rx_streamers(double /* rate */) if (samp_rate == rfnoc::rate_node_ctrl::RATE_UNDEFINED) { samp_rate = 1.0; } - // This formula is not derived by any scientific means -- we just need to - // increase the failure threshold as we increase rates. For 1 Msps, we use - // the default. - const size_t alignment_failure_factor = std::max(size_t(1), size_t(samp_rate * 1000 / tick_rate)); double scaling = my_streamer->get_terminator()->get_output_scale_factor(); if (scaling == rfnoc::scalar_node_ctrl::SCALE_UNDEFINED) { scaling = 1/32767.; @@ -485,8 +481,6 @@ void device3_impl::update_rx_streamers(double /* rate */) my_streamer->set_tick_rate(tick_rate); my_streamer->set_samp_rate(samp_rate); - // 1000 packets is the default alignment failure threshold - my_streamer->set_alignment_failure_threshold(1000 * alignment_failure_factor); my_streamer->set_scale_factor(scaling); } } -- cgit v1.2.3 From 0d42e860985ce1744d4c3fa41a1c123575eaa2f8 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Tue, 15 Nov 2016 12:13:43 -0800 Subject: rfnoc: legacy_compat gets its own set_{rx,tx}_rate() calls This avoids double-calling subscribers, and will fix the case where a rate change in a multi-channel scenario will break because the graph resolution is done before all rates are set. --- host/lib/rfnoc/legacy_compat.cpp | 174 +++++++++++++++++++++++++++++---------- host/lib/rfnoc/legacy_compat.hpp | 4 + host/lib/usrp/multi_usrp.cpp | 24 ++++++ 3 files changed, 158 insertions(+), 44 deletions(-) (limited to 'host') diff --git a/host/lib/rfnoc/legacy_compat.cpp b/host/lib/rfnoc/legacy_compat.cpp index b660a21c7..631e89273 100644 --- a/host/lib/rfnoc/legacy_compat.cpp +++ b/host/lib/rfnoc/legacy_compat.cpp @@ -29,7 +29,9 @@ #include #include #include +#include #include +#include #define UHD_LEGACY_LOG() UHD_LOGV(never) @@ -267,7 +269,11 @@ public: } _update_stream_args_for_streaming(args, _rx_channel_map); UHD_LEGACY_LOG() << "[legacy_compat] rx stream args: " << args.args.to_string() << std::endl; - return _device->get_rx_stream(args); + uhd::rx_streamer::sptr streamer = _device->get_rx_stream(args); + BOOST_FOREACH(const size_t chan, args.channels) { + _rx_stream_cache[chan] = streamer; + } + return streamer; } //! Sets block_id and block_port in the streamer args, otherwise forwards the call. @@ -280,7 +286,11 @@ public: } _update_stream_args_for_streaming(args, _tx_channel_map); UHD_LEGACY_LOG() << "[legacy_compat] tx stream args: " << args.args.to_string() << std::endl; - return _device->get_tx_stream(args); + uhd::tx_streamer::sptr streamer = _device->get_tx_stream(args); + BOOST_FOREACH(const size_t chan, args.channels) { + _tx_stream_cache[chan] = streamer; + } + return streamer; } double get_tick_rate(const size_t mboard_idx=0) @@ -309,6 +319,93 @@ public: update_tick_rate_on_blocks(tick_rate, mboard_idx); } + void set_rx_rate(const double rate, const size_t chan) + { + if (not _has_ddcs) { + return; + } + + // Set DDC values: + if (chan == uhd::usrp::multi_usrp::ALL_CHANS) { + for (size_t mboard_idx = 0; mboard_idx < _rx_channel_map.size(); mboard_idx++) { + for (size_t chan_idx = 0; chan_idx < _rx_channel_map[mboard_idx].size(); chan_idx++) { + const size_t dsp_index = _rx_channel_map[mboard_idx][chan_idx].radio_index; + const size_t port_index = _rx_channel_map[mboard_idx][chan_idx].port_index; + _tree->access(rx_dsp_root(mboard_idx, dsp_index, port_index) / "rate/value") + .set(rate) + ; + } + } + } else { + std::set chans_to_change = boost::assign::list_of(chan); + if (_rx_stream_cache.count(chan)) { + uhd::rx_streamer::sptr str_ptr = _rx_stream_cache[chan].lock(); + if (str_ptr) { + BOOST_FOREACH(const rx_stream_map_type::value_type &chan_streamer_pair, _rx_stream_cache) { + if (chan_streamer_pair.second.lock() == str_ptr) { + chans_to_change.insert(chan_streamer_pair.first); + } + } + } + } + BOOST_FOREACH(const size_t this_chan, chans_to_change) { + UHD_MSG(status) << "setting rate on chan " << this_chan << " " << rate << std::endl; + size_t mboard, mb_chan; + chan_to_mcp(this_chan, _rx_channel_map, mboard, mb_chan); + const size_t dsp_index = _rx_channel_map[mboard][mb_chan].radio_index; + const size_t port_index = _rx_channel_map[mboard][mb_chan].port_index; + _tree->access(rx_dsp_root(mboard, dsp_index, port_index) / "rate/value") + .set(rate) + ; + } + } + // Update streamers: + boost::dynamic_pointer_cast(_device)->update_rx_streamers(rate); + } + + void set_tx_rate(const double rate, const size_t chan) + { + if (not _has_ducs) { + return; + } + + // Set DUC values: + if (chan == uhd::usrp::multi_usrp::ALL_CHANS) { + for (size_t mboard_idx = 0; mboard_idx < _tx_channel_map.size(); mboard_idx++) { + for (size_t chan_idx = 0; chan_idx < _tx_channel_map[mboard_idx].size(); chan_idx++) { + const size_t dsp_index = _tx_channel_map[mboard_idx][chan_idx].radio_index; + const size_t port_index = _tx_channel_map[mboard_idx][chan_idx].port_index; + _tree->access(tx_dsp_root(mboard_idx, dsp_index, port_index) / "rate/value") + .set(rate) + ; + } + } + } else { + std::set chans_to_change = boost::assign::list_of(chan); + if (_tx_stream_cache.count(chan)) { + uhd::tx_streamer::sptr str_ptr = _tx_stream_cache[chan].lock(); + if (str_ptr) { + BOOST_FOREACH(const tx_stream_map_type::value_type &chan_streamer_pair, _tx_stream_cache) { + if (chan_streamer_pair.second.lock() == str_ptr) { + chans_to_change.insert(chan_streamer_pair.first); + } + } + } + } + BOOST_FOREACH(const size_t this_chan, chans_to_change) { + size_t mboard, mb_chan; + chan_to_mcp(this_chan, _tx_channel_map, mboard, mb_chan); + const size_t dsp_index = _tx_channel_map[mboard][mb_chan].radio_index; + const size_t port_index = _tx_channel_map[mboard][mb_chan].port_index; + _tree->access(tx_dsp_root(mboard, dsp_index, port_index) / "rate/value") + .set(rate) + ; + } + } + // Update streamers: + boost::dynamic_pointer_cast(_device)->update_tx_streamers(rate); + } + private: // types struct radio_port_pair_t { radio_port_pair_t(const size_t radio=0, const size_t port=0) : radio_index(radio), port_index(port) {} @@ -341,6 +438,27 @@ private: // methods return _device->get_block_ctrl(block_id); } + template + inline void chan_to_mcp( + const size_t chan, const chan_map_t &chan_map, + size_t &mboard_idx, size_t &mb_chan_idx + ) { + mboard_idx = 0; + mb_chan_idx = chan; + while (mb_chan_idx >= chan_map[mboard_idx].size()) { + mboard_idx++; + mb_chan_idx -= chan_map[mboard_idx].size(); + } + if (mboard_idx >= chan_map.size()) { + throw uhd::index_error(str( + boost::format("[legacy_compat]: %s channel %u out of range for given frontend configuration.") + % (dir == uhd::TX_DIRECTION ? "TX" : "RX") + % chan + )); + } + + } + template void _update_stream_args_for_streaming( uhd::stream_args_t &args, @@ -377,19 +495,8 @@ private: // methods for (size_t i = 0; i < args.channels.size(); i++) { const size_t stream_arg_chan_idx = args.channels[i]; // Determine which mboard, and on that mboard, which channel this is: - size_t mboard_idx = 0; - size_t this_mboard_chan_idx = stream_arg_chan_idx; - while (this_mboard_chan_idx >= chan_map[mboard_idx].size()) { - mboard_idx++; - this_mboard_chan_idx -= chan_map[mboard_idx].size(); - } - if (mboard_idx >= chan_map.size()) { - throw uhd::index_error(str( - boost::format("[legacy_compat]: %s channel %u out of range for given frontend configuration.") - % (dir == uhd::TX_DIRECTION ? "TX" : "RX") - % stream_arg_chan_idx - )); - } + size_t mboard_idx, this_mboard_chan_idx; + chan_to_mcp(stream_arg_chan_idx, chan_map, mboard_idx, this_mboard_chan_idx); // Map that mboard and channel to a block: const size_t radio_index = chan_map[mboard_idx][this_mboard_chan_idx].radio_index; size_t port_index = chan_map[mboard_idx][this_mboard_chan_idx].port_index; @@ -539,21 +646,7 @@ private: // methods ; } } - } else { - for (size_t dsp_idx = 0; dsp_idx < _num_radios_per_board; dsp_idx++) { - for (size_t chan = 0; chan < _num_rx_chans_per_radio; chan++) { - _tree->access(rx_dsp_root(mboard_idx, dsp_idx, chan) / "rate/value") - .add_coerced_subscriber( - boost::bind( - &uhd::usrp::device3_impl::update_rx_streamers, - boost::dynamic_pointer_cast(_device), - _1 - ) - ) - ; - } - } - } + } /* if not _has_ddcs */ if (not _has_ducs) { for (size_t radio_idx = 0; radio_idx < _num_radios_per_board; radio_idx++) { for (size_t chan = 0; chan < _num_tx_chans_per_radio; chan++) { @@ -586,20 +679,6 @@ private: // methods ; } } - } else { - for (size_t dsp_idx = 0; dsp_idx < _num_radios_per_board; dsp_idx++) { - for (size_t chan = 0; chan < _num_tx_chans_per_radio; chan++) { - _tree->access(tx_dsp_root(mboard_idx, dsp_idx, chan) / "rate/value") - .add_coerced_subscriber( - boost::bind( - &uhd::usrp::device3_impl::update_tx_streamers, - boost::dynamic_pointer_cast(_device), - _1 - ) - ) - ; - } - } } /* if not _has_ducs */ } } @@ -768,6 +847,13 @@ private: // attributes chan_map_t _rx_channel_map; chan_map_t _tx_channel_map; + //! Stores a weak pointer for every streamer that's generated through this API. + // Key is the channel number (same format as e.g. the set_rx_rate() call). + typedef std::map< size_t, boost::weak_ptr > rx_stream_map_type; + rx_stream_map_type _rx_stream_cache; + typedef std::map< size_t, boost::weak_ptr > tx_stream_map_type; + tx_stream_map_type _tx_stream_cache; + graph::sptr _graph; }; diff --git a/host/lib/rfnoc/legacy_compat.hpp b/host/lib/rfnoc/legacy_compat.hpp index 29be1bdc2..1ba3a81b9 100644 --- a/host/lib/rfnoc/legacy_compat.hpp +++ b/host/lib/rfnoc/legacy_compat.hpp @@ -44,6 +44,10 @@ namespace uhd { namespace rfnoc { virtual uhd::tx_streamer::sptr get_tx_stream(const uhd::stream_args_t &args) = 0; + virtual void set_rx_rate(const double rate, const size_t chan) = 0; + + virtual void set_tx_rate(const double rate, const size_t chan) = 0; + static sptr make( uhd::device3::sptr device, const uhd::device_addr_t &args diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp index 7c3bf8007..058925a9a 100644 --- a/host/lib/usrp/multi_usrp.cpp +++ b/host/lib/usrp/multi_usrp.cpp @@ -815,6 +815,18 @@ public: } void set_rx_rate(double rate, size_t chan){ + if (is_device3()) { + _legacy_compat->set_rx_rate(rate, chan); + if (chan == ALL_CHANS) { + for (size_t c = 0; c < get_rx_num_channels(); c++){ + do_samp_rate_warning_message(rate, get_rx_rate(c), "RX"); + } + } else { + do_samp_rate_warning_message(rate, get_rx_rate(chan), "RX"); + } + return; + } + if (chan != ALL_CHANS){ _tree->access(rx_dsp_root(chan) / "rate" / "value").set(rate); do_samp_rate_warning_message(rate, get_rx_rate(chan), "RX"); @@ -1343,6 +1355,18 @@ public: } void set_tx_rate(double rate, size_t chan){ + if (is_device3()) { + _legacy_compat->set_tx_rate(rate, chan); + if (chan == ALL_CHANS) { + for (size_t c = 0; c < get_tx_num_channels(); c++){ + do_samp_rate_warning_message(rate, get_tx_rate(c), "TX"); + } + } else { + do_samp_rate_warning_message(rate, get_tx_rate(chan), "TX"); + } + return; + } + if (chan != ALL_CHANS){ _tree->access(tx_dsp_root(chan) / "rate" / "value").set(rate); do_samp_rate_warning_message(rate, get_tx_rate(chan), "TX"); -- cgit v1.2.3 From f583c77fc2dfb1308520164eb1c6260b0b0d8d79 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Wed, 30 Nov 2016 09:49:51 -0800 Subject: cmake: Fixed version num depadding --- host/cmake/Modules/UHDVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'host') diff --git a/host/cmake/Modules/UHDVersion.cmake b/host/cmake/Modules/UHDVersion.cmake index 26dbfbb06..7c18f9312 100644 --- a/host/cmake/Modules/UHDVersion.cmake +++ b/host/cmake/Modules/UHDVersion.cmake @@ -79,7 +79,7 @@ ENDIF(GIT_FOUND) FUNCTION(DEPAD_NUM input_num output_num) EXECUTE_PROCESS( WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMAND ${PYTHON_EXECUTABLE} -c "print(int('${input_num}'))" + COMMAND ${PYTHON_EXECUTABLE} -c "print(\"${input_num}\".lstrip(\"0\") or 0)" OUTPUT_VARIABLE depadded_num OUTPUT_STRIP_TRAILING_WHITESPACE ) SET(${output_num} ${depadded_num} PARENT_SCOPE) -- cgit v1.2.3 From 7fc01d5fe3c8ecc71d1b8485e4999e721becf67c Mon Sep 17 00:00:00 2001 From: Andrej Rode Date: Mon, 21 Nov 2016 11:06:58 -0800 Subject: devtest: dont check number of samples in benchmark rate test and accept 10 underruns in SISO --- host/tests/devtest/benchmark_rate_test.py | 12 ++++++------ host/tests/devtest/devtest_x3x0.py | 12 ++++++++++-- host/tests/devtest/uhd_test_base.py | 1 + 3 files changed, 17 insertions(+), 8 deletions(-) (limited to 'host') diff --git a/host/tests/devtest/benchmark_rate_test.py b/host/tests/devtest/benchmark_rate_test.py index 6c5a75d7f..1fc342b7f 100755 --- a/host/tests/devtest/benchmark_rate_test.py +++ b/host/tests/devtest/benchmark_rate_test.py @@ -39,7 +39,7 @@ class uhd_benchmark_rate_test(uhd_example_test_case): We always run both tx and rx. """ - rel_samp_err_threshold = 0.1 # 10% off is still quite generous + # rel_samp_err_threshold = 0.1 # 10% off is still quite generous samp_rate = test_args.get('rate', 1e6) duration = test_args.get('duration', 1) chan = test_args.get('chan', '0') @@ -56,6 +56,7 @@ class uhd_benchmark_rate_test(uhd_example_test_case): if 'tx' in test_args.get('direction', ''): args.append('--tx_rate') args.append(str(samp_rate)) + if 'rx' in test_args.get('direction', ''): args.append('--rx_rate') args.append(str(samp_rate)) @@ -63,7 +64,7 @@ class uhd_benchmark_rate_test(uhd_example_test_case): match = re.search(r'(Num received samples):\s*(.*)', app.stdout) run_results['num_rx_samples'] = int(match.group(2)) if match else -1 if run_results['num_rx_samples'] != -1: - run_results['rel_rx_samples_error'] = 1.0 * abs(run_results['num_rx_samples'] - expected_samples) / expected_samples + run_results['rel_rx_samples_error'] = 1.0 * abs(run_results['num_rx_samples'] - test_args.get('rx_buffer',0) - expected_samples) / expected_samples else: run_results['rel_rx_samples_error'] = 100 match = re.search(r'(Num dropped samples):\s*(.*)', app.stdout) @@ -73,7 +74,7 @@ class uhd_benchmark_rate_test(uhd_example_test_case): match = re.search(r'(Num transmitted samples):\s*(.*)', app.stdout) run_results['num_tx_samples'] = int(match.group(2)) if match else -1 if run_results['num_tx_samples'] != -1: - run_results['rel_tx_samples_error'] = 1.0 * abs(run_results['num_tx_samples'] - expected_samples) / expected_samples + run_results['rel_tx_samples_error'] = 1.0 * abs(run_results['num_tx_samples'] - test_args.get('tx_buffer',0) - expected_samples) / expected_samples else: run_results['rel_tx_samples_error'] = 100 match = re.search(r'(Num sequence errors):\s*(.*)', app.stdout) @@ -90,9 +91,8 @@ class uhd_benchmark_rate_test(uhd_example_test_case): run_results['num_rx_samples'] > 0, run_results['num_tx_samples'] > 0, run_results['num_timeouts'] == 0, - run_results['rel_rx_samples_error'] < rel_samp_err_threshold, - run_results['rel_tx_samples_error'] < rel_samp_err_threshold, + # run_results['rel_rx_samples_error'] < rel_samp_err_threshold, + # run_results['rel_tx_samples_error'] < rel_samp_err_threshold, ]) self.report_example_results(test_name, run_results) return run_results - diff --git a/host/tests/devtest/devtest_x3x0.py b/host/tests/devtest/devtest_x3x0.py index 7ad6b21b6..dd62d8910 100755 --- a/host/tests/devtest/devtest_x3x0.py +++ b/host/tests/devtest/devtest_x3x0.py @@ -26,6 +26,8 @@ uhd_benchmark_rate_test.tests = { 'chan': '0,1', 'rate': 1e6, 'acceptable-underruns': 500, + 'tx_buffer': (0.1*1e6)+32e6*8*1/32, # 32 MB DRAM for each channel (32 bit OTW format), + 'rx_buffer': 0.1*1e6, }, 'mimo_fast': { 'duration': 1, @@ -33,20 +35,26 @@ uhd_benchmark_rate_test.tests = { 'chan': '0,1', 'rate': 12.5e6, 'acceptable-underruns': 500, + 'tx_buffer': (0.1*12.5e6)+32e6*8*1/32, # 32 MB DRAM for each channel (32 bit OTW format), + 'rx_buffer': 0.1*12.5e6, }, 'siso_chan0_slow': { 'duration': 1, 'direction': 'tx,rx', 'chan': '0', 'rate': 1e6, - 'acceptable-underruns': 0, + 'acceptable-underruns': 10, + 'tx_buffer': (0.1*1e6)+32e6*8*1/32, # 32 MB DRAM for each channel (32 bit OTW format), + 'rx_buffer': 0.1*1e6, }, 'siso_chan1_slow': { 'duration': 1, 'direction': 'tx,rx', 'chan': '1', 'rate': 1e6, - 'acceptable-underruns': 0, + 'acceptable-underruns': 10, + 'tx_buffer': (0.1*1e6)+32e6*8*1/32, # 32 MB DRAM for each channel (32 bit OTW format), + 'rx_buffer': 0.1*1e6, }, } diff --git a/host/tests/devtest/uhd_test_base.py b/host/tests/devtest/uhd_test_base.py index ae094c94b..62a11c0ef 100755 --- a/host/tests/devtest/uhd_test_base.py +++ b/host/tests/devtest/uhd_test_base.py @@ -209,6 +209,7 @@ class uhd_example_test_case(uhd_test_case): Calls run_test(). """ for test_name, test_args in self.test_params.iteritems(): + time.sleep(15) # Wait for X300 devices to reclaim them if not test_args.has_key('products') or (self.usrp_info['product'] in test_args.get('products', [])): run_results = self.run_test(test_name, test_args) passed = bool(run_results) -- cgit v1.2.3 From ae9370d5b3b9ef60ca66225604750584695799c8 Mon Sep 17 00:00:00 2001 From: Andrej Rode Date: Wed, 30 Nov 2016 17:11:38 -0800 Subject: devtest: flush stdout after print statements --- host/tests/devtest/run_testsuite.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'host') diff --git a/host/tests/devtest/run_testsuite.py b/host/tests/devtest/run_testsuite.py index 2826f25e9..44f8b9081 100755 --- a/host/tests/devtest/run_testsuite.py +++ b/host/tests/devtest/run_testsuite.py @@ -102,6 +102,7 @@ def main(): ser=uhd_info.get('serial') )) print('--- This will take some time. Better grab a cup of tea.') + sys.stdout.flush() args_str = uhd_info['args'] env['_UHD_TEST_ARGS_STR'] = args_str logfile_name = "log{}.log".format( @@ -124,6 +125,7 @@ def main(): stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, ) print(proc.communicate()[0]) + sys.stdout.flush() if proc.returncode != 0: tests_passed = False print('--- Done testing all attached devices.') -- cgit v1.2.3 From b7b08b1ecee76fd2e628b6c9aeeb9f5784197f16 Mon Sep 17 00:00:00 2001 From: michael-west Date: Tue, 29 Nov 2016 16:52:31 -0800 Subject: UBX: Force on RX driver to eliminate transient --- host/lib/usrp/dboard/db_ubx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'host') diff --git a/host/lib/usrp/dboard/db_ubx.cpp b/host/lib/usrp/dboard/db_ubx.cpp index 82472fd9b..3dd0b1c84 100644 --- a/host/lib/usrp/dboard/db_ubx.cpp +++ b/host/lib/usrp/dboard/db_ubx.cpp @@ -1152,7 +1152,7 @@ private: // frequency tuning. set_cpld_field(RXAMP_FORCEON, 1); set_cpld_field(RXDEMOD_FORCEON, 1); - set_cpld_field(RXDRV_FORCEON, 0); + set_cpld_field(RXDRV_FORCEON, 1); set_cpld_field(RXMIXER_FORCEON, 0); set_cpld_field(RXLO1_FORCEON, 1); set_cpld_field(RXLO2_FORCEON, 1); -- cgit v1.2.3 From 77cbd56a5d09b29720aa309a9c95765c01ec9c65 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 1 Dec 2016 15:22:56 -0800 Subject: docs: Added note on USRP2 reset arg for burning images --- host/docs/usrp2.dox | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'host') diff --git a/host/docs/usrp2.dox b/host/docs/usrp2.dox index 7f8c94b8b..ab36fe1a8 100644 --- a/host/docs/usrp2.dox +++ b/host/docs/usrp2.dox @@ -72,6 +72,12 @@ Use custom-built images: uhd_image_loader --args="type=usrp2,addr=" --fw-path="" --fpga-path="" +If you immediately want to apply this image, add the `reset` argument: + + uhd_image_loader --args="type=usrp2,addr=,reset" + +The USRP will drop off the network for a brief moment and reboot. + Note: Different hardware revisions require different FPGA images. Determine the revision number from the sticker on the rear of the chassis. Use this number to select the correct FPGA image for your -- cgit v1.2.3 From 5de7ab51086f161882c3ca4050a8e50c2c341132 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 1 Dec 2016 16:22:32 -0800 Subject: utils: Added --abi-string to uhd_config_info --- host/utils/uhd_config_info.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'host') diff --git a/host/utils/uhd_config_info.cpp b/host/utils/uhd_config_info.cpp index 78fcb201b..a071f0918 100644 --- a/host/utils/uhd_config_info.cpp +++ b/host/utils/uhd_config_info.cpp @@ -40,6 +40,7 @@ int UHD_SAFE_MAIN(int argc, char* argv[]) { ("libusb-version", "Print libusb version") ("pkg-path", "Print pkg path") ("images-dir", "Print images dir") + ("abi-version", "Print ABI version string") ("print-all", "Print everything") ("version", "Print this UHD build's version") ("help", "Print help message") @@ -94,6 +95,9 @@ int UHD_SAFE_MAIN(int argc, char* argv[]) { if(vm.count("images-dir") > 0 or print_all) { std::cout << "Images directory: " << uhd::get_images_dir("") << std::endl; } + if(vm.count("abi-version") > 0 or print_all) { + std::cout << "ABI version string: " << uhd::get_abi_string() << std::endl; + } return EXIT_SUCCESS; } -- cgit v1.2.3 From eb2ba5ea16445c1cef1fb8dbef72d78dcf8c68a3 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 1 Dec 2016 16:36:59 -0800 Subject: x300: Adding warning for sampling rate coercion --- host/lib/usrp/x300/x300_radio_ctrl_impl.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'host') diff --git a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp index 4bb9c9fb5..bb17eb2ec 100644 --- a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp +++ b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -167,10 +168,14 @@ x300_radio_ctrl_impl::~x300_radio_ctrl_impl() /**************************************************************************** * API calls ***************************************************************************/ -double x300_radio_ctrl_impl::set_rate(double /* rate */) +double x300_radio_ctrl_impl::set_rate(double rate) { + const double actual_rate = get_rate(); + if (not uhd::math::frequencies_are_equal(rate, actual_rate)) { + UHD_MSG(warning) << "[X300 Radio] Requesting invalid sampling rate from device: " << rate/1e6 << " MHz. Actual rate is: " << actual_rate/1e6 << " MHz." << std::endl; + } // On X3x0, tick rate can't actually be changed at runtime - return get_rate(); + return actual_rate; } void x300_radio_ctrl_impl::set_fe_cmd_time(const time_spec_t &time, const size_t chan) -- cgit v1.2.3