aboutsummaryrefslogtreecommitdiffstats
path: root/host
Commit message (Collapse)AuthorAgeFilesLines
* examples: Add usrp_power_meter exampleMartin Braun2020-05-192-1/+135
| | | | | | | | | | | This is a utility that can be used to measure received power, assuming a calibrated device. For example, it can be called like this: usrp_power_meter.py -a type=x300 -f 1e9 --mode continuous To continuously measure input power at 1 GHz.
* python: Add dsp sub-moduleMartin Braun2020-05-192-0/+84
| | | | | | | | | | | This lets you do >>> from uhd import dsp >>> s = dsp.signals.get_continuous_tone(...) >>> pwr = dsp.signals.get_power_dbfs(s) ...and so on. This module is for UHD-based utilities to have some additional signal processing functions to tap into.
* lib: pwr_cal: Fix power indexingMartin Braun2020-05-191-16/+28
| | | | | | | | | | | | | The pwr_cal::get_gain() method previously held the incorrect assumption that power values per frequency would be equidistant, i.e., be at the same indices as the gain values. Due to the frequency-dependent nature of the hardware, this is not a valid assumption (if that were the case, frequency-dependent calibration would be unnecessary). This changes get_gain() to not rely on that assumption. Note that it requires doing some more rounding: The bilinear interpolation method uses requires coordinates to be on a rectangular grid. This snaps the power values onto a single coordinate.
* lib: Add power cal managerMartin Braun2020-05-193-0/+426
| | | | | This is a utility class that can be used by USRP or daughterboard drivers to tie power calibration into their respective drivers.
* rh: Remove unnecessary register read during set frequencyCiro Nishiguchi2020-05-151-3/+0
| | | | | This unnecessary reads causes timed commands on rhodium to block. It also makes it behave differently based on whether logging is enabled.
* rfnoc: Use large timeout for reads when timed commands existCiro Nishiguchi2020-05-151-8/+24
| | | | | If a timed command is in the queue, writes use a large timeout. Changing reads to do the same.
* utils: Fix usrp_burn_db_eeprom w.r.t. new property tree pathsMartin Braun2020-05-151-15/+38
| | | | | usrp_burn_db_eeprom operates directly on property tree paths, and so the utility required an update to work with RFNoC devices.
* utils: Correct relative path to config dir in rfnoc_image_builderAaron Rossetto2020-05-151-1/+1
| | | | | | | | | In commit 6a488d32, the RFNoC image builder module was moved from the host/utils/bin subdirectory to host/utils. That move rendered the relative path to the configuration directory in `get_config_path()` incorrect. This commit fixes the relative path specification of the configuration directory to reflect the new location of the Python script.
* uhd: Fix infinite recursion in N3xx timed commandsCiro Nishiguchi2020-05-124-31/+0
| | | | | | The implementation of set_command_time was calling wb_iface set_time, which in turn makes a recursive call to set_command_time. This removes the erroneous recursive call.
* docs: Remove six from Windows build instructionsMartin Braun2020-05-121-2/+1
| | | | | Recent commits have removed all usage of the 'six' Python module from UHD, thus removing the necessity to install it.
* rfnoc: Remove 'six' dependency from image builderMartin Braun2020-05-124-22/+22
| | | | Also fixes a few minor PyLint complaints.
* tests: Remove 'six' dependency from devtestMartin Braun2020-05-121-2/+1
| | | | This removes 'six' as a dependency for devtest.
* utils: Remove 'six' dependency, fix minor PyLint issuesMartin Braun2020-05-121-9/+8
| | | | | | | This removes the 'six' dependency from converter_benchmark, thus making the utils subdirectory no longer depend on six. A few Python2-isms and PyLint issues were also fixed.
* Docs: Update TwinRX documentationMichael West2020-05-121-13/+23
| | | | | | Revise tick rate and sample rate information for recent changes. Signed-off-by: Michael West <michael.west@ettus.com>
* multi_usrp_rfnoc: Misc fixesMichael West2020-05-121-6/+7
| | | | | | | | | - Change get_master_clock_rate() to return tick rate instead of sample rate - Make warning of incompatible rates conditional so it does not display for first channel Signed-off-by: Michael West <michael.west@ettus.com>
* TwinRX: Remove decimation from frontendMichael West2020-05-123-31/+7
| | | | | | | | | | | | | | The decimation in the rx_frontend_gen3 was added to reduce the bandwidth between the Radio and the DDC due to the limitation in bandwidth over the crossbar for dynamically connected blocks. The default FPGA image for the X300 now has a static connection between the Radio and DDC, so this is no longer necessary. This change allows the TwinRX receive channels to be time aligned with channels from other daughterboards so they can be used in the same streamer. Signed-off-by: Michael West <michael.west@ettus.com>
* DUC/DDC: Add variable time incrementMichael West2020-05-124-21/+28
| | | | | | | | | Sets time increment based on tick rate and sample rate instead of assuming one tick per sample. Defaults to legacy behavior. Minor compat number bumped on DUC and DDC blocks. Signed-off-by: Michael West <michael.west@ettus.com>
* uhd: Add reference power level API to multi_usrp and radio_controlMartin Braun2020-05-111-0/+2
| | | | This adds the has_* API calls to the Python API.
* uhd: Remove default channel input from power ref methodsCiro Nishiguchi2020-05-111-6/+6
| | | | | The radio_control methods shouldn't have a default value for the channel input, to keep them consistent with other methods in this class.
* utils: Update mako to propagate parametersWade Fife2020-05-112-13/+27
| | | | | | This cleans up the default parameters generated for the testbench template and adds the block parameters to the block and noc_shell instances so they can be used without having to remember to add them.
* Remove remaining Python 2 referencesMartin Braun2020-05-0751-55/+44
| | | | | | | This changes two things in all applicable files: - Remove imports from __future__ - Change default shebangs from /usr/bin/env python to /usr/bin/env python3
* python: Fix RPATH for the Python libraryMartin Braun2020-05-071-2/+23
| | | | | | | | | | | | | | | | On UNIX systems, CMake will set the RPATH of the Python library to the build directory, which is very helpful because it allows unit and other tests to be executed from within the build directory. On installation, the RPATH is removed, but only if install(TARGETS) is used, which we were not, thus resulting in incorrect RPATHs. This would surface as a bug, too. Calling uhd.get_lib_path() would always point to the build directory, thus resulting in no FPGA images being found automatically, e.g. when running a B200 through the Python API. This change installs the Python .so file separately, using the correct CMake mechanisms.
* cores: Fix rx_vita_core_3000 assertion error in issue_stream_cmd()Martin Braun2020-05-051-3/+7
| | | | | | | | | | | | | | | | The current code had an assertion UHD_ASSERT_THROW(stream_cmd.num_samps <= 0x0fffffff); which would check that num_samps in a stream command don't exceed the counter depth in the FPGA. However, this is only relevant if the stream command is not "continuous" or "stop". num_samps could be unitialized, and randomly have a value larger than the maximum, and the assertion could trigger even though the value in num_samps is irrelevant. The new assertion checks for the correct case, and has a more verbose error message.
* rfnoc-example: Removed DRAM from image coreMartin Braun2020-05-051-24/+11
| | | | | The DRAM was incorrectly connected, but it's also not necessary for this example and is hence removed.
* python: Move the rfnoc image builder module under the uhd moduleMartin Braun2020-05-0520-103/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note: This commit changes nothing to the way the image builder is being called. One can still run rfnoc_image_builder [...] as before. The difference is in the Python guts: Where previously one had to do import rfnoc now the incantation becomes: from uhd import imgbuilder (Note that the submodule uhd.rfnoc already exists for wrapping the RFNoC API into Python, hence the renaming from rfnoc to imgbuilder). This is done for a variety of reasons: - Now, there is only one and exactly one Python module for UHD that contains all the things, as opposed to before where there were two. - The rfnoc and uhd modules were installed in different ways (setuptools vs. CMake); that is now harmonized. This also removes a lot of CMake plumbing. - It is not common to import the rfnoc module for anyone other than rfnoc_image_builder
* uhd: doc: Fix Doxygen warnings on 1.8.13Aaron Rossetto2020-05-051-22/+77
|
* uhd: Replaced deprecated usage of boost timer with std::chronoLars Amsel2020-05-041-3/+5
| | | | | replaced boost::timer by std::chrono::steady_timer to measure time interval
* uhd: doc: fixed nested comment warningLars Amsel2020-05-041-2/+1
| | | | Fixed nested comment warning by escaping /* sequence in file path.
* uhd: doc: fixed doxygen deprecation warningsLars Amsel2020-05-041-952/+1604
| | | | | removed doxgen deprecation warnings by running `doxygen -u` against Doxygen.in
* Revert "host: cmake: add boost unit_test_framework required iff ENABLE_TESTS=ON"Aaron Rossetto2020-05-011-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 93acdfe3808ba8aca6c04cbf2474d6e8db39a0ee. The commit introduced an issue when building without specifying ENABLE_TESTS explicitly to CMake. Normally, if the user doesn't set ENABLE_TESTS, it gets set to ON by default, assuming the prerequisites are met. However, there's a chicken-and-egg problem here. UHDBoost.cmake takes the list of required Boost components from UHD_BOOST_REQUIRED_COMPONENTS and adds them to the Boost_LIBRARIES list. This happens before ENABLE_TESTS gets a default value, so the Boost unit test framework library is never added to this list, even if ENABLE_TESTS ends up getting set to ON later on by default in the script. But, moving LIBUHD_REGISTER_COMPONENT (the macro that sets ENABLE_TESTS to a default value) to go before UHDBoost.cmake is included won't work, because that macro needs variables set by UHDBoost.cmake. It may be possible to break the circular dependency by refactoring UHDBoost.cmake somewhat, but for the time being, master shouldn't be broken.
* test: Add output for gpio_testMichael West2020-04-301-0/+3
| | | | | | Print output from stdout and stderr upon error. Signed-off-by: Michael West <michael.west@ettus.com>
* devtest: Add support for TwinRX to x3x0Michael West2020-04-301-52/+92
| | | | | | | Adding necessary code to examine number of TX and RX channels and adjust test cases accordingly. Signed-off-by: Michael West <michael.west@ettus.com>
* devtest: Add method to get number of channelsMichael West2020-04-301-0/+36
| | | | | | Adding method to get number of TX and RX channels to usrp_probe. Signed-off-by: Michael West <michael.west@ettus.com>
* devtest: Fix benchmark_rate_test success criteriaMichael West2020-04-301-2/+2
| | | | | | | Allow success if testing either TX or RX. Previously required both TX and RX to be tested simultaneously. Signed-off-by: Michael West <michael.west@ettus.com>
* examples: Update test_messages exampleMichael West2020-04-301-12/+23
| | | | | | | | The example assumed that there was always at least one TX and on RX channel. Since that is not always true, this change checks for TX and RX channels and only exucutes tests for what exists on the device. Signed-off-by: Michael West <michael.west@ettus.com>
* examples: Update gpio exampleMichael West2020-04-301-92/+117
| | | | | | | | | | The example assumed that there was always at least one TX and on RX channel. Since that is not always true, this change checks for TX and RX channels and only exucutes tests for what exists on the device. Applied clang format. Signed-off-by: Michael West <michael.west@ettus.com>
* utils: Remove trailing white space from mako templatesWade Fife2020-04-302-4/+4
|
* utils: Fix typo in testbench mako templateWade Fife2020-04-301-1/+1
|
* host: cmake: add boost unit_test_framework required iff ENABLE_TESTS=ONGwenhael Goavec-Merou2020-04-291-1/+5
|
* multi_usrp: Remove rfnoc-specific code from multi_usrp.cppMartin Braun2020-04-281-38/+0
| | | | | This implementation of multi_usrp is only for non-RFNoC devices; the section was thus dead code.
* utils: Update copyright generated by blocktoolWade Fife2020-04-235-5/+5
| | | | | Updated to output current year. Changed capitalization and wording to be consistent with exisiting code.
* debian: Use Python3 dependenciesMartin Braun2020-04-221-11/+11
| | | | | | | This updates the Debian control file to rely on the Python3 versions of the respective dependencies. Also updates the package name to include the 4.0.0 version.
* utils: Add sideband_at_end support to Mako templateWade Fife2020-04-214-15/+24
| | | | | | | | This adds a new option to the "AXI-Stream Data" (axis_data) FPGA interface type. The new option, "sideband_at_end", can be added to the output port of a block's YAML description to control whether the sideband information should be sampled at the end (sideband_at_end: 1) or the beginning (sideband_at_end: 0) of the AXI-Stream packet.
* utils: Add --lib-path option to uhd_config_infoMartin Braun2020-04-171-0/+4
| | | | This will print the path to the UHD library using get_lib_path().
* tests: Print images dir instead of simply reading itMartin Braun2020-04-171-1/+1
|
* cal: Add utility to update all .fbs files, or check the generated onesMartin Braun2020-04-171-0/+126
| | | | | | | | | | | | Calling ./update_fbs.py will update all the generated files. ./update_fbs.py -V will check if the generated files are OK, and return non-zero if not.
* rh: Remove compiler warningMartin Braun2020-04-171-2/+4
| | | | | | | | | Adds UHD_UNUSED() to tag variables that is only used in a UHD_LOG_TRACE() macro. Note this would be also be possible by tagging the local functions {rx,tx}_band_to_log as unused, but g++ does not support that specific kind of attribute, at least in the current versions.
* ad9361: Remove compiler warningMartin Braun2020-04-171-1/+1
| | | | | Adds UHD_UNUSED() to tag a variable that is only used in a UHD_LOG_TRACE() macro.
* lib: rfnoc: Fix "unused" warnings for non-trace log levelsMartin Braun2020-04-172-9/+6
| | | | | | When the compile log level is higher than TRACE, the UHD_LOG_TRACE() macros get removed, which can lead to unused variables. This modifies UHD to avoid those warnings, with no functional changes.
* math: Add dB_to_lin() and lin_to_dB()Martin Braun2020-04-171-0/+11
| | | | | | | | | | | | | These are simply shorthands, but make the code a little more readable with respect to intent. It allows to replace const double power_db = 10 * std::log10(power_lin); with const double power_db = lin_to_dB(power_lin); which expresses the intent a little more clearly and concisely.