aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mpm: rpc: Use contextmanager for claim timeoutsToni Jones2021-03-041-13/+12
| | | | | Modify the RPC claim timeout mechanism to use a contextmanager helper function when enabling/disabling timeouts.
* mpm: add helper for symbol lookupCiro Nishiguchi2021-03-041-0/+81
| | | | | | | Add a helper that can lookup a device via a device tree symbol. Co-authored-by: Lars Amsel <lars.amsel@ni.com> Co-authored-by: Michael Auchter <michael.auchter@ni.com>
* mpm: Implement 32 bit register interface with SPIToni Jones2021-03-048-14/+120
| | | | | | | | | Implement SPI transfers which are 12 bytes in length to support access for 32 bit register interfaces. 12 byte transactions are necessary for Titanium MB PS CPLD SPI transactions. This implementation supports 48 bits of TX data per transfer and offsets all flags and data shifts from the end of the TX data portion of the transfer buffer rather than the end of the entire transfer buffer.
* mpm: Add DboardIface for MB DB driver controlToni Jones2021-03-044-0/+111
| | | | | | | | Add DboardIface class which will act as an interface to bridge the gap between MB and DB drivers in MPM. The DboardIface will be implemented by each Motherboard with MB specific information. Dboard objects will then instantiate the class in order to utilize the implemented control functions.
* 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.
* mg: Remove unused private attribute from ad9371_ifaceMartin Braun2021-03-042-4/+0
| | | | This fixes a clang warning.
* rh: Remove unused constantMartin Braun2021-03-041-1/+0
| | | | This fixes a clang warning.
* 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>