aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* ci: install vc_buildtools instead of vc_communitySteven Koo2021-03-196-18/+18
| | | | | | | | For our build machines, we don't need full on Visual Studio. Instead this installs the VS Build Tools, which has the CLI build apps we need. Signed-off-by: Steven Koo <steven.koo@ni.com>
* ci: Build uhd with PipelinesSteven Koo2021-03-1912-11/+256
| | | | | | | | | | | This commit adds the infrastructure to build uhd on both Linux and Windows using Pipelines. Using the docker images generated by the build docker pipeline, this runs an AzDO container job to build uhd artifacts. It then stores the artifacts to be used in later pipelines or stages. This change supports make and ninja on Linux and msbuild with VS2017/VS2019 x86/x64 on Windows. Signed-off-by: Steven Koo <steven.koo@ni.com>
* 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.
* ci: Linux and Windows uhd build docker imagesSteven Koo2021-03-1210-0/+492
| | | | | | | | | | This commit adds Pipeline support for building uhd toolchain docker images. The Dockerfiles specify the required dependencies to build uhd. These can then be used in downstream pipelines to build uhd. It's also possible to use the Dockerfiles using "docker build" and "docker run" to locally create the toolchain to build uhd. Signed-off-by: Steven Koo <steven.koo@ni.com>
* uhd: gitignore .DS_Store for our macOS friendsSteven Koo2021-03-121-0/+1
| | | | | | macOS creates .DS_Store files, which should not be checked in. Signed-off-by: Steven Koo <steven.koo@ni.com>
* 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.
* mpm: rpc: don't expose reset_mgr call via RPCThomas Vogel2021-03-111-2/+2
|
* fpga: dsp: Fix formatting of rx_dcoffset and add docsMartin Braun2021-03-091-38/+110
| | | | | - Adapt to coding guide - Add header that explains the module
* ci: Hardware pytests / devtests in AzDO for n310Steven Koo2021-03-084-9/+179
| | | | | | | | | This commit adds support for running devtests and pytests in Azure Pipelines. Devices are intentionally matrixed for adding more in the future. devtest is turned off by default for now, but can be enabled in the future. Signed-off-by: Steven Koo <steven.koo@ni.com>
* mpm: Add i2c_dev lookup using sys_nameToni Jones2021-03-081-7/+51
| | | | | | | | | | | Add i2c_dev adapter device lookup which uses a the sys_name value instead of OF_NAME to find the adapter. OF_NAME is not unique for some i2c device nodes. The logic for finding the adapter from the parent node was pulled into a helper function and is shared across both lookup functions. Co-authored-by: Michael Auchter <michael.auchter@ni.com> Co-authored-by: Toni Jones <toni.jones@ni.com>
* mg: Fix slot_idx referenceWade Fife2021-03-081-1/+1
|
* lib: Fix unresolved cleanup conflict (sorry!)Aaron Rossetto2021-03-041-5/+1
|
* 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.