aboutsummaryrefslogtreecommitdiffstats
path: root/host
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* examples: Add --power command line option to tx_waveformsMartin Braun2020-04-172-18/+54
| | | | | | | | | | | | | | If you run tx_waveforms --power -20 [other args] it will try to set the out power to -20 dBm. The signal amplitude is factored in, so changing --ampl will not change the actual TX power unless it causes clipping, or becomes too low. If the USRP does not support setting a power, the program will terminate early. If it does support setting a power, but can't reach the requested power, it will coerce, and print the actual, available power.
* uhd: Add reference power level API to multi_usrp and radio_controlMartin Braun2020-04-179-0/+500
| | | | | | | | | | | | | | | | | | This adds the following API calls: - multi_usrp::has_{rx,tx}_power_reference() - multi_usrp::set_{rx,tx}_power_reference() - multi_usrp::get_{rx,tx}_power_reference() - radio_control::has_{rx,tx}_power_reference() - radio_control::set_{rx,tx}_power_reference() - radio_control::get_{rx,tx}_power_reference() It also adds a manual page explaining the philosophy of the API. Note that this does not actually add this feature to any device implementation. Calling the new API calls will thus result in `uhd::not_implemented_error` exceptions being thrown. This commit is to lock down the API and ABI.
* cal: Add pwr_cal containerMartin Braun2020-04-1710-1/+1071
| | | | | | | This is a cal container for all types of power cal (RX or TX) that rely on a single, overall gain value. Includes Python API.
* lib: utils: interpolation: Add bilinear interpolationMartin Braun2020-04-172-1/+186
| | | | | | This allows to treat a std::map<KeyType<std::map<KeyType, ValueType>> as a set of x-y coordinates, and bilinearly interpolate a z-value given four x/y pairs.
* Revert "cmake: Add ability to pass CXXFLAGS to CMake environment"Martin Braun2020-04-151-3/+0
| | | | This reverts commit 49ca8112c2777fcc4b81eff72ce59fb40fa0024d.
* utils: usrp_burn_mb_eeprom: Avoid EEPROM write in read only casesteviez2020-04-151-17/+19
| | | | | | The usrp_burn_mb_eeprom previously updated the EEPROM at the end of the script, regardless of whether any values were actually specified for write. This skips the EEPROM write for read only usage.
* libusb: Remove deprecation warnings for libusb_set_debugMartin Braun2020-04-151-1/+14
| | | | | | | | | | | Starting with 1.0.22, libusb considers libusb_set_debug() deprecated. This replaces said call with libusb_set_option(), conditionally on the libusb version. This has no effect on the execution, but will remove some compiler versions, and make this code more future-proof. Note that Ubuntu 18.04 ships libusb 1.0.21, so this conditional code needs to remain until that version is deprecated and libusb version is bumped higher.
* examples: wavetable: Modify wave tables to ease power calculationsMartin Braun2020-04-151-19/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing implementation would create a real signal for any type of signal (CONST, RAMP, SQUARE, and SINE), and then create the complex signal by simply delaying the Q value by a 90 degree phase. This had surprising results for all waveforms: - CONST waveforms would have a baseband value of ampl + j ampl, thus increasing the output power by 3 dB vs. what one would expect when setting an amplitude. It is now ampl + j * 0, and the power is ampl**2. This now makes the power consistent with SINE, which it was not, even though a const signal is a sine signal with a frequency of zero. - SQUARE waveforms would phase-delay the Q part, thus resulting in three power output levels (when both phases are zero, when both phases are ampl, and when one of them is zero and other is ampl). However, the square signal is useful for watching it in the scope, and there, it helps if the power is predictably either high or low within the selected frequency. The Q value is now always zero. - RAMP waveforms had the same issue and were also resolved by setting Q to zero. - SINE signals were fine, although the implementation used sin + j cos to calculate a complex sine, not cos + j sin according to Euler's formula. To make this wavetable more useful with absolute power settings, the changes mentioned above were implemented. The dBFs power of CONST and SINE can now be calculated by using ampl**2, SQUARE by using (ampl**2)/2, and RAMP by solving the integral over a ramp from -1 to 1.
* tests: Add Fosphor block controller unit testWade Fife2020-04-142-0/+358
|
* rfnoc: Add RFNoC fosphor blockWade Fife2020-04-146-0/+861
|
* utils: Fix comment in axis_data templateWade Fife2020-04-141-1/+1
|
* utils: log: fix logging race conditionmattprost2020-04-141-1/+3
| | | | | | | It was possible that output to cout would become interleaved inside of the uhd log messages. Signed-off-by: mattprost <matt.prost@ni.com>
* rpclib: Remove some warnings from object.hppMartin Braun2020-04-141-0/+12
| | | | | This removes -Wmaybe-uninitialized and -Wclass-memaccess from this file when using gcc.
* b200: Add a prop tree node usb_versionMartin Braun2020-04-141-0/+1
| | | | | At /mboards/0/usb_version, we can now read back an int. It's either 2 or 3, depending on what we're using.
* tests: migrated rfnoc block tests to dedicated subdirectorymattprost2020-04-136-381/+455
| | | | | | | | This separates the rfnoc block tests into files for each specific block. This was done to improve the readability of these files and declutter the tests directory. Signed-off-by: mattprost <matt.prost@ni.com>
* docs: Add stream and transport args documentationAaron Rossetto2020-04-132-6/+210
| | | | | | Add some additional documentation to the Configuration Devices and Streamers and Transport Notes pages regarding stream arguments and their use.
* multi_usrp: Approximate legacy behaviour for recv_async_msg()Martin Braun2020-04-133-13/+34
| | | | | | | | | | | | | When using multi_usrp with an RFNoC device, the previous behaviour was to throw an exception when calling recv_async_msg() so users would know they're not supposed to call it (calling tx_stream::recv_async_msg is preferred). However, this breaks too many existing applications. Instead, we keep a weak pointer to the streamer, the same way that older devices do, and query the async message from that. This means that calling recv_async_msg() when there are multiple streamers can lead to unexpected behaviour, but that's a general issue with multi_usrp::recv_async_msg() and this way, the RFNoC devices now behave like older devices do.
* multi_usrp_rfnoc: Manually pass sample rate to ddc/ducsteviez2020-04-135-0/+38
| | | | | | | | | | | | | | This adds (and calls) methods to manually pass radio block sample rate to the input/output properties of the ddc/duc during creation of the multi_usrp_rfnoc object. The ddc/duc require this information in order to return valid, possible output/input sample rates in get_rx_rates()/get_tx_rates(). Before, the ddc/duc wouldn't have this rate until the rfnoc_graph had been connected and committed, which happens in get_rx_stream()/get_tx_stream(). Thus, this fixes an issue where a user was unable to query possible sample rates prior to specifying a sample rate and creating a stream.
* multi_usrp_rfnoc: Fix get_rx/tx_rates()steviez2020-04-131-12/+10
| | | | | This replaces incorrect code with the proper function calls to retrieve the range of possible sample rates.
* fixup! uhd: Add fuzzy serial number checkingmattprost2020-04-093-12/+11
|
* lib: Properly do reset routines in client_zeroMartin Braun2020-04-091-2/+6
| | | | | The current reset routines write a '1' twice for reset, instead of '0' then '1' (resets get triggered on a rising edge).
* tests: Fix client_zero_test flush bit testMartin Braun2020-04-081-6/+12
| | | | | A test to check the address was using a & instead of a %, resulting in a -Wtautological-compare.