aboutsummaryrefslogtreecommitdiffstats
path: root/host
Commit message (Collapse)AuthorAgeFilesLines
* installers: resolve ubuntu linter issueSteven Koo2021-05-181-71/+87
| | | | | | The debian copyright requires the Apache 2.0 stanza for flatbuffers. Signed-off-by: Steven Koo<steven.koo@ni.com>
* tests: Add MTU forwarding policy restriction unit testAaron Rossetto2021-05-181-0/+58
|
* rfnoc: noc_block_base: Throw if set_mtu_forwarding_policy() called multiplyAaron Rossetto2021-05-182-1/+15
|
* rfnoc: noc_block_base: Refactor MTU prop resolverAaron Rossetto2021-05-182-46/+64
| | | | | | | | | | | | | | | | | | | | | | Prior to this commit, the MTU property resolver in noc_block_base had an issue: for every MTU edge property (both input and output on each port) on the block, the property resolver listed every other MTU edge property in its output sensitivity list, regardless of whether or not the output edge properties would ever be affected by the current MTU forwarding policy. This breaks an inherent (and up until now, unwritten) contract between a property resolver and UHD that only properties that can be affected by the resolver should be included in the output sensitivity list. The result of breaking the contract leads to errors being thrown when committing an RFNoC graph in certain multi-channel use cases. This commit refactors the MTU property resolver to use the MTU forwarding policy to determine the correct set of edge properties to include in the output sensitivity list. The change also introduces a new restriction--the MTU forwarding policy may only be set once per instance of a noc_block_base. Typically, a subclass implementing an RFNoC block will call `set_mtu_forwarding_policy()` in its constructor to set a custom MTU forwarding policy (if desired) and leave it untouched for the lifetime of the block.
* tests: Update multi_usrp_test.pyMartin Braun2021-05-101-115/+259
| | | | | | | | | | Many updates to this test. Most tests weren't even working properly. Highlights: - Add device-specific configuration. Includes defaults, but also the option to specify a YAML file. - Improved output for better readability - Made a whole bunch of tests work
* devtest: Make Python tests their own type of devtestMartin Braun2021-05-103-41/+68
| | | | | | | | | | | Like the example test, the Python-based test is now codified. The "special sauce" for Python tests revolves around the fact that they require the Python API, so we have to gracefully fail if the Python API was never enabled, but hard-fail when the Python API is enabled, but not working. This creates a new type of devtest (UHDPythonTestCase) and moves uhd_python_api_test over to the new type.
* RFNoc: Fix graph connect timeout errorMichael West2021-05-101-2/+3
| | | | | | | | | A loop in mgmt_portal::_validate_stream_setup() was missing a sleep, which was causing it to return long before the timeout with a timeout error. This change adds that sleep and reduces the duration of the sleep so it responds faster. Signed-off-by: Michael West <michael.west@ettus.com>
* n320: Add correction APIs to radio_control objectMartin Braun2021-05-062-0/+63
| | | | | | | | | | The N320, like the X310, has some frontend corrections (IQ balance, DC offset) which can be controlled from software. The property tree entries exist for these, but the radio_control APIs do not (which also disables the multi_usrp APIs). This makes it harder to disable DC offset or IQ balance corrections from software, and disables our calibration utilities.
* multi_usrp_rfnoc: Fix get_device()->get_tree()michael-west2021-05-051-6/+3
| | | | | | | | | | | | | | | Property tree access via the device tree was resulting in a segmentation fault because the device::_tree member was not properly initialized for the redirector_device class. The redirector_device also had a get_tree() method that was not actually called because the get_tree() method in the parent class was not declared virtual and all calls to get_tree() were done on the parent class (i.e. get_device()->get_tree(). - Added initializer for device::_tree member in redirector_device class constructor - Removed redirector_device::get_tree() method Signed-off-by: michael-west <michael.west@ettus.com>
* experts: Change coercion policy for regular prop nodesMartin Braun2021-05-042-6/+19
| | | | | | | | | | | | | | | | The experts framework has two ways of integrating expert nodes into the property tree: add_prop_node() and add_dual_prop_node(). In the latter case, the experts should take care of coercion, and thus, we subscribe to the desired value. In the former case, this is not necessary, and precludes us from using set_coercer() with prop nodes on the prop tree. This change lets us use regular nodes in the expert framework that also use property tree coercers. As of now, there is not a single property node in UHD that uses add_prop_node() and also does any kind of coercion, so this change has no effect on current code (this is only used in TwinRX as of now).
* lib: Fix misssing include in e3xx_radio_control_implMartin Braun2021-05-041-0/+3
| | | | Adds a missing <thread>, <algorithm>, and <chrono>.
* host: utils: Print block ID for RFNoC dboardsLane Kolbly2021-05-031-11/+9
| | | | | | | | | Previously, uhd_usrp_probe would simply print "RX Dboard: dboard" as the header for RFNoC dboards. This was not very informative, so this change prints out the block ID to get a little bit more information. Non-RFNoC dboards retain their old functionality.
* dboard: magnesium: Update Rx IF Frequency Valuemattprost2021-04-301-1/+1
| | | | | | | Add extra precision to if frequency in the low band rx path in order to avoid hitting the edges of a filter. Signed-off-by: mattprost <matt.prost@ni.com>
* Revert "N310: Low band IF adjustments"mattprost2021-04-301-17/+21
| | | | | | | | This reverts commit 969e426f2ef57f8d6fd3099870955ba2083abf9c. Revert "fixup! N310: Low band IF adjustments" This reverts commit 71137999430afaca18bfff179e6a3c4b0276d54c.
* uhd: Remove references to device3Martin Braun2021-04-302-11/+7
| | | | device3 was an object used in UHD-3 RFNoC. It is no longer required.
* utils: Improve cal TX threadsmichael-west2021-04-294-152/+86
| | | | | | | Increase thread priority on TX thread and remove memory copy to reduce underruns. Signed-off-by: michael-west <michael.west@ettus.com>
* rfnoc: Add option to disable flow control on rx streamingmattprost2021-04-299-60/+146
| | | | | | | | | | | Disabling this feature will allow the USRP to send a continuous stream of Rx data to a host machine without throttling due to lack of flow control credits. This is unnecessary overhead on lossless transports such as pcie or aurora. Usage: add 'enable_fc=false' to stream_args.args Signed-off-by: mattprost <matt.prost@ni.com>
* N320: Fix calibrationsmichael-west2021-04-221-6/+7
| | | | | | | Added "n320" to supported devices and set TX and RX sample rates to 12.288 Msps. Signed-off-by: michael-west <michael.west@ettus.com>
* N320: Fix IQ mapping and frontend correctionsmichael-west2021-04-221-2/+4
| | | | | | | | Changed register offset from 4 bytes to 8 bytes. The registers in the frontend were not being properly addressed, so calibration, IQ mapping, and frontend corrections were not working properly. Signed-off-by: michael-west <michael.west@ettus.com>
* N320: Fix available antennasmichael-west2021-04-221-2/+2
| | | | | | Available antennas for TX and RX were swapped. Signed-off-by: michael-west <michael.west@ettus.com>
* uhd: Update all headers for setters on multi_usrp re coerce/throwMartin Braun2021-04-191-50/+144
| | | | | | | | | | | | | | | Our APIs are not consistent when it comes to handling invalid settings. Some setting (like antenna, LO name, ...) will trigger an exception when invalid. Other settings (gain, frequency, clock rate) will get coerced to a valid value. This behaviour does make sense for the most part (it is more intuitive that 81 dB gets coerced to 80 dB if that's the maximum, but coercing an invalid antenna value like "RX1" has no clear alternative). And in any case, this is the behaviour that UHD has always had. In this commit, all Doxygen headers in multi_usrp are updated to exactly describe their behaviour (coerce or throw).
* docs: Fix missing section header in power level controls pageMartin Braun2021-04-191-1/+1
|
* X300: Reduce phase noise for 184.32 MHz MCRmichael-west2021-04-161-2/+5
| | | | | | | Reverts charge pump current changes for 10 MHz reference / 184.32 MHz master clock rate case that caused additional phase noise. Signed-off-by: michael-west <michael.west@ettus.com>
* examples: Add min dynamic range limit to ascii art DFT exampleLane Kolbly2021-04-152-3/+9
| | | | | | The DFT plotting routine hangs when the dynamic range equals zero, so this change adds a limit so that the dynamic range never goes below 10.
* N310: Fix calculation of LO freq w/ext LO for RXmichael-west2021-04-121-1/+1
| | | | | | | A typo was causing an issue with order of precedence in the calculation of the LO frequency when using an external LO for RX on the N310. Signed-off-by: michael-west <michael.west@ettus.com>
* n320: Fix address for RX frontend controlMartin Braun2021-04-121-1/+1
| | | | The RX FE core was using the address for the TX FE core.
* docs: Fix typo in mender sectionLane Kolbly2021-04-092-4/+4
|
* UHD: Fix typo in has_tx_power_referenceLars Amsel2021-04-091-1/+1
| | | | The has_tx_power_reference called has_rx_power_reference by mistake.
* TwinRX: Remove frontend filtermichael-west2021-04-082-0/+14
| | | | | | | | | | Removing the FIR filter in the frontend to reclaim resources and remove redundancy when using a DDC block. The default image has a DDC block, so only users making custom RFNoC images and using TwinRX will need to take care to properly downconvert the full bandwidth coming from the radio block. Signed-off-by: michael-west <michael.west@ettus.com>
* fpga: docs: Improve documentation of rx_frontend_gen3Martin Braun2021-04-071-2/+2
| | | | Also fixes a typo in the calibration manual page.
* docs: Add N320 frontend correction sectionMartin Braun2021-03-192-1/+164
|
* docs: Use Mathjax for equation renderingMartin Braun2021-03-191-1/+1
|
* rfnoc: radio: Add getter for SPC valueMartin Braun2021-03-195-0/+34
| | | | | | This adds uhd::rfnoc::radio_control::get_spc(). It can be overridden by radio implementations, but radio_control_impl has a sensible default implementation, return the value that is in the SPC radio register.
* uhd: enable vcpkg support on windowsSteven Koo2021-03-196-10/+59
| | | | | | | | | | | | | | | | | | | | vcpkg can be used for the Windows C++ dependencies for uhd with this commit. To use vcpkg on Windows: 1) Copy the custom triplets in host/cmake/vcpkg/ to the vcpkg/triplets/ folder. 2) Install boost and libusb for the custom triplet "vcpkg install libusb:uhd-x64-windows-static-md boost:uhd-x64-windows-static-md" 3) Call CMake with vcpkg toolchain file flags: -DVCPKG_TARGET_TRIPLET=uhd-x64-windows-static-md -DCMAKE_TOOLCHAIN_FILE=%VCPKG_INSTALL_DIR%/scripts/buildsystems/vcpkg.cmake -G "Visual Studio 16 2019" -A x64 Replace the -G with the installed version of Visual Studio and matching architecture. Then build normally by running vcvarsall.bat and msbuild. Signed-off-by: Steven Koo <steven.koo@ni.com>
* examples: Add IP to OOT RFNoC gain exampleWade Fife2021-03-175-39/+335
| | | | | This updates the gain example to show how to use RFNoC IP, in-tree Xilinx IP, and out-of-tree Xilinx IP in a custom RFNoC block.
* lib: rpc: Add virtual dtor to RPC iface base classMartin Braun2021-03-171-0/+2
| | | | This avoids more clang compiler warnings.
* uhd: Fix radio_control-related method constnessMartin Braun2021-03-177-19/+17
| | | | | | | | | | | | | | | | | The const-ness of some radio_control differed between base class and implementation. This fixes the consistency, but also makes sure these methods follow the rules for when to make methods 'const'. The following rules apply: - Methods that query static capabilities are const. Here, we made get_tx_lo_sources() const (the RX version was already const). - Getters that may have to interact with the device (e.g., peek a register) are not const, because the act of peeking is usually also non-const. Here, we changed get_rx_lo_export_enabled() to non-const. - All base classes are fixed such that the derived classes and the base classes have the same const-ness. Clang was warning about differences. This can cause very tricky bugs, where the radio_control_impl version can get called instead of the intended child class.
* host: Update code base using clang-tidyMartin Braun2021-03-1727-262/+280
| | | | | | | | | | | | The checks from the new clang-tidy file are applied to the source tree using: $ find . -name "*.cpp" | sort -u | xargs \ --max-procs 8 --max-args 1 clang-tidy --format-style=file \ --fix -p /path/to/compile_commands.json Note: This is the same procedure as 107a49c0, but applied to all the new code since then.
* examples: Remove unused arguments for rfnoc_radio_loopbackLane Kolbly2021-03-111-3/+14
|
* tests: Fix warnings for rf_control_gain_profile_testMartin Braun2021-03-111-4/+1
| | | | | - Remove unused const - Fix includes to IWYU and clang-format order
* lib: Remove move-on-return for chdr_packet_writerMartin Braun2021-03-114-6/+6
| | | | This is a pessimizing move, and clang warns about it.
* mg: Fix slot_idx referenceWade Fife2021-03-081-1/+1
|
* lib: Fix unresolved cleanup conflict (sorry!)Aaron Rossetto2021-03-041-5/+1
|
* rpclib: Fix warning on ARM buildAaron Rossetto2021-03-041-1/+1
|
* lib: deps: Ignore more warnings in our versions of rpclib, pybind11Martin Braun2021-03-042-1/+12
| | | | | This modifies the UHD versions of those libraries to turn off warnings that appear with Clang.
* lib: Use const-ref in for loops instead of const-copyMartin Braun2021-03-047-9/+9
| | | | | | This is potentially a performance issue, even though it doesn't have a big impact in this context. Clang will warn about it, and this fixes the compiler warning.
* lib: Add some virtual dtorsMartin Braun2021-03-046-1/+19
| | | | | | | Classes where we call delete (implicitly or explicitly) with a virtual inheritance structure need to declare dtors as virtual. This reduces compiler warnings with clang. There are no known bugs (yet) due to this.
* twinrx: Fix missing default copy ctorMartin Braun2021-03-041-0/+3
| | | | | | | twinrx_gain_config_t defined an assignment operator, but not a default copy ctor. This is not allowed in modern C++, although compilers let it slide and provide their own defaults. Clang, however, throws a warning so let's fix it.
* lib: Fix warnings related to unnecessary lambda capturesMartin Braun2021-03-0412-22/+29
|
* convert: Remove unused variablesMartin Braun2021-03-042-4/+0
| | | | This reduces compiler warnings when using clang.