aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* tests: Remove unused constantsMartin Braun2021-03-048-23/+0
| | | | This fixes some clang warnings.
* lib: lmx2592: Comment out some unused constantsMartin Braun2021-03-041-7/+10
| | | | | | These constants are useful for reference, but they're not used. We keep them in-tree (as comments) because of their utility, but comment them out to fix clang warnings.
* rh: cpld control: Comment out gain table addressMartin Braun2021-03-041-1/+1
| | | | This fixes a clang warning.
* rfnoc: tx_streamer: Remove EOV size attributeMartin Braun2021-03-041-2/+0
| | | | It is unused, and causes clang warnings.
* rh: Remove use of magic number of identify durationMartin Braun2021-03-042-3/+3
| | | | This fixes a clang compiler warning.
* utils: Remove unused constant from b2xx_fx3_utilsMartin Braun2021-03-041-1/+0
| | | | This reduces compiler warnings.
* lib: Remove unused constantsMartin Braun2021-03-045-9/+6
| | | | | The constants were either commented out, when their value is still useful to the reader, or removed if not.
* host: Update code base using clang-tidyMartin Braun2021-03-04212-2114/+2215
| | | | | | | | | 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
* Add clang-tidy fileMartin Braun2021-03-041-0/+7
| | | | | | | | | | | This adds a .clang-tidy file to the tree, which enables a small number of checks. The only checks that are applied are: - readability-container-size-empty: Mostly, this makes empty string checks use .empty() instead of .size(). - modernize-use-override: This adds override where applicable. This causes clang to build UHD with fewer warnings.
* ic_reg_maps: Add SPCC reg mapToni Jones2021-03-012-0/+120
| | | | Add SPCC reg map for reference and testing.
* cmake: Add RegMaps build component to MPMToni Jones2021-03-016-0/+75
| | | | | | | | | | Add RegMaps build component to MPM. The PYTHON_CHECK_MODULE is included from UHDPython in order to look up the presence of Mako. Mako is required for generating the regmaps and RegMap will be disabled without it. The RegMaps component creates custom commands for generating all regmaps, creates a Python submodule "ic_reg_maps" with a custom __init__.py file, and creates a target "ic_reg_maps" which gets installed with usrp_mpm.
* mpm: Add an LMK03328 base chip driverToni Jones2021-02-223-0/+86
| | | | | | | | | Added an LMK03328 base chip driver which does basic register access, ID validation, and PLL lock validation. This will act as the base class for device specific drivers which control the chip. The code it similar to the LMK04828 and LMK04832 base driver classes but has a different register map structure. Register bitfield definitions were omitted and will be added on an as needed basis.
* mpm: Add an LMK04832 base chip driverToni Jones2021-02-223-0/+165
| | | | | | | | Added an LMK04832 base chip driver which does basic register access, ID validation, and PLL lock validation. This will act as the base class for device specific drivers which control the chip. The code is similar to the LMK04828 base driver class, but has a different register map structure.
* MPM: prevent dead lock in timer kill during unclaimLars Amsel2021-02-181-1/+1
| | | | | | | | | | | | MPM server needs to be reclaimed in regular intervals. This is monitored by the server using a timer. If the timer hits, the server unclaims itself assuming the client process died for whatever reason. In previous versions of `gevent.greenlet` the timer was killed in a non blocking manner. This changed in version 0.13.0 (see http://www.gevent.org/api/gevent.greenlet.html#gevent.Greenlet.kill) which now leads to a dead lock in `timer.kill`. The kill command is therefore now called explicitly with `block=False`.
* mpm: Add support to safely reset peripheral manager from uhdVirendra Kakade2021-02-181-0/+29
| | | | | | | Provide a way to safely reset the peripheral manager from uhd and as a result, a mechanism to reload the fpga/dts components. Signed-off-by: Virendra Kakade <virendra.kakade@ni.com>
* mpm: Create Mock classes for unit testingToni Jones2021-02-181-0/+113
| | | | | Create Mock classes which mimic the behavior of a register interface and logger to facilitate unit testing needs.
* devtest: reapply allow extra device arguments when running devtestsSteven Koo2021-02-122-2/+5
| | | | | | | | | | | | | | | | | | This change is substantially the same as 7b86a47, but implemented in a ninja supported way. ninja doesn't allow for arguments, so this uses an environment variable. This is compatible with both make and ninja. The only change from the calling point of view is you must set the environment variable before calling "make test_[devicetype]" instead of after as an arg. This allows running devtests for a single device instead of all connected devices or selecting a specific network interface. Set the additional device arguments with the EXTRA_DEV_ARGS variable. This can be set as an environment variable or on the command line. For example: EXTRA_DEV_ARGS=addr=192.168.30.2 make test_x3x0 Also-by: Matthew Crymble <matthew.crymble@ni.com> Signed-off-by: Steven Koo <steven.koo@ni.com>
* images: Update B2xx firmwaremichael-west2021-02-111-1/+1
| | | | | | | Update to images containing fix for corrupt serial number when bootloader loaded. Signed-off-by: michael-west <michael.west@ettus.com>
* mpm: deduplicate dboard eeprom handlingMichael Auchter2021-02-112-39/+29
| | | | | | | | | | | | The _get_dboard_eeprom_info implementations are the same with the exception of how the dboard eeprom is actually read. Break that out into a _read_dboard_eeprom method to reduce code duplication. The base class now defines a lambda expression for the eeprom reader which can be changed in subclasses. Co-authored-by: Lars Amsel <lars.amsel@ni.com> Co-authored-by: Michael Auchter <michael.auchter@ni.com>
* mpm: added DBFlash classJoerg Hofrichter2021-02-111-0/+87
| | | | Class for accessing (mounting) the daughterboard flash
* mpm: added Mount classJoerg Hofrichter2021-02-111-0/+96
| | | | Class for creating a mount point
* mpm: systemd: create udev rules files for each MPM_DEVICEJoerg Hofrichter2021-02-113-15/+6
| | | | | Simplify installation of udev rules by creating folders for each MPM_DEVICE.
* mpmd: Skip find if "resource" key is specifiedmichael-west2021-02-119-56/+14
| | | | | | | | | | | MPM devices were being discovered when trying to locate PCIe connected devices. Adding filter to exclude them if the "resource" key is specified in the device address arguments. Replaces "lib: disable non pcie types in find with resource" to reduce impact to older devices and remove API change. Signed-off-by: michael-west <michael.west@ettus.com>
* TwinRX: Fix LO lock failuremichael-west2021-02-101-11/+2
| | | | | | | Always write register 6 in the ADF5356. Conditional write was causing the LO not to lock at some frequencies. Signed-off-by: michael-west <michael.west@ettus.com>
* mpm: filesystem_status: tolerate absence of menderMichael Auchter2021-02-092-6/+10
| | | | | | If the mender utility is not installed or exits with a failure, return NULL for the artifact rather than raising an exception (and disrupting device initialization).
* ci: Add stub for python hardware testsSteven Koo2021-02-081-0/+15
| | | | Signed-off-by: Steven Koo <steven.koo@ni.com>
* Revert "devtest: allow extra device arguments when running devtests"Matthew Crymble2021-02-082-5/+2
| | | | | This reverts commit 7b86a47bf7143df1cac252602e3c9ddbdd871d90. This was causing issues when building UHD with ninja
* ADF535x: Change freq_resolution to mod2michael-west2021-02-042-26/+28
| | | | | | | | | The freq_resolution parameter to the set_frequency() method was confusing. Changing it to the mod2 value clarifies the intention and makes the math to reduce the FRAC2 and MOD2 values much easier to read and maintain. Signed-off-by: michael-west <michael.west@ettus.com>
* dboard_iface: Modify sleep() functionMichael West2021-02-041-5/+14
| | | | | | | | | The algorithm for the sleep() function is changed to first increment the command time if the command time is set. If the command time is not set, it just performs a sleep on the host. The intention is to make a best effort to create the requested delay on the device. Signed-off-by: Michael West <michael.west@ettus.com>
* TwinRX: Spur cleanupmichael-west2021-02-043-11/+49
| | | | | | | | | | - Reduce FRAC2 and MOD2 values on ADF5356 - Add write to register 10 and delay during retune on ADF5356 - Make negative bleed conditional on integer or fractional N mode for ADF5356 - Tune unused LOs out of band to remove interference Signed-off-by: michael-west <michael.west@ettus.com>
* usrp: Remove old header file declarationsLane Kolbly2021-02-031-33/+0
| | | | | | The definitions of these functions were deleted in 23f4f8cf4ea72, and so now we can remove the declarations from the header file to prevent any confusion.
* lib: Fix missing includes in rpc.hppMartin Braun2021-02-011-0/+4
|
* devtest: lower rate for rx_all_chans_fast testMatthew Crymble2021-02-011-4/+4
| | | | Using 12.5 MS/s exceeded the maximum throughput when using 4 channels over 1 GbE
* mpm: Implement get_sync_source and get_sync_sources.Lane Kolbly2021-01-252-0/+21
|
* cmake: fix cut-and-paste typo to fix SIM APPLE buildMichael Dickens2021-01-251-1/+1
| | | | Ref: 00c306d5c441e60e7dfd2516e05e4e433977ecee
* tests: Add lib/ to LD_LIBRARY_PATH for pytestsAaron Rossetto2021-01-221-2/+7
| | | | | | | This commit sets the LD_LIBRARY_PATH environment variable when invoking pytests to ensure that Python tests that use bindings to UHD in libpyuhd.so can link to new symbols in libuhd.so without the need to have UHD installed.
* uhd: lambda capture the node instead of vert descSteven Koo2021-01-212-4/+17
| | | | | | | | | | | This commit adds another resolve_all_properties method to use the node instead of the vertex descriptor. The vertex descriptor could be removed. This could cause the lambda capture to have an outdated vertex descriptor, which would result in a hang when looking for it. This resolves the issue by capturing the node and looking for the vertex descriptor. Signed-off-by: Steven Koo <steven.koo@ni.com>
* msgpack/predef: add riscV supportGwenhael Goavec-Merou2021-01-213-1/+51
|
* devtest: allow extra device arguments when running devtestsMatthew Crymble2021-01-212-2/+5
| | | | | | | | | This allows running devtests for a single device instead of all connected devices or selecting a specific network interface. Set the additional device arguments with the EXTRA_DEV_ARGS variable. This can be set as an environment variable or on the command line. For example: make test_x3x0 EXTRA_DEV_ARGS=addr=192.168.30.2
* sim: Fix CHDR header stringificationAaron Rossetto2021-01-211-4/+5
| | | | | | | | | | Prior to Boost 1.66, boost::format() did not support the %b format specifier, yet the minimum version of Boost required to build UHD is Boost 1.58 (as specified in the CMakeLists.txt file). Rather than force an upgrade of Boost on everyone, this commit replaces the %b format specifiers with %c and provides 'Y' or 'N' values based on the Booleans in the CHDR header being printed (EOV and EOB).
* sim: Ignore mender artifact file on sim devicesAaron Rossetto2021-01-212-2/+13
|
* uhd: Check for overflow after timeout buff readSteven Koo2021-01-213-24/+15
| | | | | | | | | | | | Error processing has been moved to another thread, so it's possible that consecutive recv calls may miss the signalling that an overflow occurred. We have no guarantee that the flag had been set by the time the second recv call to find the errors occurs. This adds another check for an overflow after calling _get_aligned_buffs with a min 1ms timeout. Hopefully this is long enough for the error to propogate, but it's not guaranteed. Signed-off-by: Steven Koo <steven.koo@ni.com>
* uhd_image_loader: Consume .lvbitx filesLane Kolbly2021-01-111-117/+237
| | | | | | | | | | | | .lvbitx files contain the device tree and the FPGA bitstream, so this change allows a user to download a .lvbitx to their device instead of having to juggle separate .bin and .dts files. If a .lvbitx file does not contain a .dts section for any reason, download will still succeed, and a warning will be printed that no dts file was found. This behaviour was chosen (over erroring) to mimic the existing behaviour when a .bin file is found but there is no corresponding .dts file.
* utils: check config file before finding devices for image loaderAndrew Lynch2021-01-111-1/+2
|
* mpmd: Add support to delay and trigger fpga/dts load after updateVirendra Kakade2021-01-114-82/+135
| | | | | | | | | Add a new image_loader argument delay_reload to provide a way to update components but optionally delay the actual load. Similarly add a new argument, just_reload, to enable uhd to reload the fpga/dts components. Signed-off-by: Virendra Kakade <virendra.kakade@ni.com>
* rfnoc: Update radio to support multiple SPCWade Fife2021-01-111-4/+10
|
* chdr: Fix u64_to_host vs. u64_from_host usageMartin Braun2021-01-111-1/+1
|
* rfnoc: Make NIPC match CHDR width by default for NSS blockWade Fife2021-01-111-1/+1
|
* rfnoc: Add accessors for item width and nipc for NSSWade Fife2021-01-113-0/+31
| | | | | | - Add get_item_width() and get_nipc() methods to the Null/Source/Sink block controller. - Add missing enumerated types for get_count() method.
* uhd: Split radio_control into rf_control interfacesLane Kolbly2021-01-1118-658/+940
| | | | | | These rf_control interfaces allow easier implementation of radio controls as well as allowing easier sharing of code for implementing e.g. gain_profile.