Commit Graph

618 Commits

Author SHA1 Message Date
Grant Meyerhoff
e0f685a4aa usrp: Add support for USRP B310
Co-authored-by: Virendra Kakade <virendra.kakade@ni.com>
Co-authored-by: Javier Valenzuela <javier.j.valenzuela@emerson.com>
Co-authored-by: Aki Tomita <aki.tomita@emerson.com>
Co-authored-by: Tony Liecthy <tony.liechty@ni.com>
Co-authored-by: Wade Fife <wade.fife@ettus.com>
2026-08-04 12:00:48 +02:00
Jakob Kukla
245532cd06 utils: Fix exit code on error in uhd_images_downloader
When the requests module is not available, the script exits, now with an
error code 1 (previously with error code 0).
2026-06-15 14:02:51 +02:00
Martin Braun
675baa5387 uhd: Remove more superfluous includes
- Mostly boost includes
- In some cases, trivial boost::format() calls were removed to enable
  removing the corresponding header
2026-06-10 08:34:02 +02:00
Martin Braun
d2f4dc5aa1 cmake: Flag manifest.txt as CMAKE_CONFIGURE_DEPENDS
Previously, we used a hack with configure_file() to achieve the same
effect, but that would not allow building UHD on read-only volumes.
2026-06-08 09:38:59 +02:00
Martin Anderseck
40d6cf61aa doc: Fix documentation for Doxygen
This fixes many documentation issues where in the Doxygen output
sentences were incomplete and information was missing that is there in
the source files actually.
2026-05-07 14:58:01 +02:00
Anil Gurses
2cfe437ec0 utils: Update converter_benchmark
This adds a new batch mode that tests a variety of converter
configurations and compares the performance of the various priorities.
2026-03-23 10:00:08 +01:00
Martin Braun
b3cc2becb6 uhd: Remove usage of boost::lexical_cast
This can be completely replaced with uhd::cast::to_str() and from_str().
In some cases, the UHD typecast functions are better, because they
support more UHD-specific types (e.g., device_addr_t, subdev_spec_t, and
so on).
2026-03-23 09:58:28 +01:00
Martin Anderseck
df31d13cbc uhd: Add support for USRP X420 (20 GHz USRP)
This adds support for the new USRP X420. It is the latest addition to
our X4xx series and comes with two HBX daughterboards. The HBX is
a one-channel direct conversion transceiver that covers 5G NR FR3 and
X-/KU-Band needs for Research and Prototyping in a frequency range of 10
MHz up to 20 GHz. It supports analog bandwidths of up to 1 GHz.

This commit is the UHD/host portion of the X420 support.

Co-authored-by: Martin Anderseck <martin.anderseck@emerson.com>
Co-authored-by: Ahmed Salman <ahmed.salman@emerson.com>
Co-authored-by: Max Köhler <max.koehler@emerson.com>
Co-authored-by: Markus Schill <markus.schill@emerson.com>
2026-03-20 16:14:54 +01:00
Martin Anderseck
bc017b318a host: util: Update ADC threshold util for sub-chan
This updates the ADC threshold utility to allow for sub-channels.
2026-03-09 16:13:22 +01:00
Lars Amsel
699cff5941 uhd: Surround all open() calls with with-statement
In addition to commit ab8ec99733
this adds `with` statements to remaining files in the UHD code base.
2026-02-20 12:20:10 +01:00
Martin Braun
ddbc682193 uhd: Remove remaining boost/assign.hpp includes
In 031e9e1, we removed all usage of boost::assign in the UHD codebase.
However, some (now redundant) includes of boost/assign.hpp remained,
which are now cleaned up.
2025-12-03 17:03:56 +01:00
Martin Braun
8e9790d51d uhd: Replace boost::filesystem with with std::filesystem
- In most cases, the replacements are straightforward:
  boost::filesystem::* can be often simply replaced by
  std::filesystem::*, and the include path is changed from
  <boost/filesystem.hpp> to <filesystem>
- boost::filesystem::system_complete() is replaced with
  std::filesystem::absolute().
- Note: For users including uhd/utils/paths.hpp, this is an API change
  because the return value of get_module_paths() is now a vector of
  std::filesystem::path.
- In rx_samples_to_file and fx2_init_eeprom, we keep Boost.Filesystem
  for now because there is no direct equivalent to
  boost::filesystem::unique_path(), but the main goal is to remove
  libboost_filesystem as a link dependency from libuhd.
2025-12-03 15:21:59 +01:00
Martin Braun
402f3d6f4e cmake: More specifically reference linking dependencies
- Instead of blindly linking against all ${Boost_LIBRARIES}, we
  selectively specify the various Boost::* targets.
- Replace include_directories() or link_directories() with target_*()
  CMake functions to avoid cluttering global scope.
- Specify PRIVATE vs. PUBLIC on all link targets.
2025-09-17 12:56:05 +02:00
Grant Meyerhoff
c52889b356 usrp: Add support for OBX daughterboard
This adds support for the OBX daughterboard, a new daughterboard
compatible with the USRP X3x0 series.

- Includes both UHD and CPLD codebases
- Includes CI hooks

Co-authored-by: Javier Valenzuela <javier.valenzuela@emerson.com>
2025-07-28 09:33:14 +02:00
Martin Braun
facb7e2ce1 python: rfnoc_image_builder: Find HDL sources in install prefix
If the HDL sources for RFNoC get installed during installation (i.e., by
providing -DENABLE_RFNOC_DEV), then rfnoc_image_builder will default to
using the installed HDL sources when building bitfiles, unless the CWD
is in a UHD repository or the --fpga-path argument is provided (same
behaviour as before).
2025-07-17 15:29:54 +02:00
Grant Meyerhoff
c3020242a8 cal: allow for gain control in cal utils
- Allows for frontends to specify a default cal rather than use max
  gain.
- Allows for users to specify a specific tx_gain with which to run
  the cal utils.
2025-06-17 09:20:13 +02:00
Lars Amsel
b8e2e70675 host: b200: Add support for B206i (as a variant of B205i)
- Added B206MINI_PRODUCT_ID and extend various defines
  to enable B206 support in driver code
- Extend B200 devtest definition to include B206mini
- Extend B200Calibrator class to support B206mini

Co-authored-by: Lars Amsel <lars.amsel@emerson.com>
Co-authored-by: Abhishek Verma <abhishek.verma@emerson.com>
Co-authored-by: Marian Koop <marian.koop@emerson.com>
2025-05-15 11:15:51 +02:00
Martin Braun
6a4a1650aa cmake: Use GNUInstallDirs instead of hand-crafted code
The UHD CMake code re-implemented some of the features of GNUInstallDirs,
which is not necessary (this feature has been available in CMake for
longer than version 3.12). Here, we replace all hand-defined CMake
variables with their equivalents from GNUInstallDirs.

Short table of replacements:

INCLUDE_DIR   -> CMAKE_INSTALL_INCLUDEDIR
RUNTIME_DIR   -> CMAKE_INSTALL_BINDIR
LIBRARY_DIR   -> CMAKE_INSTALL_LIBDIR
UHD_LIB_DIR   -> CMAKE_INSTALL_LIBDIR
LIB_SUFFIX    -> n/a (no longer necessary)
2025-04-30 15:56:11 +02:00
Martin Braun
689c5b200a python: image_builder: Use path APIs instead of @CONFIG_PATH@
This removes a CMake-generated value for the package data path from the
image builder, and instead uses the get_pkg_data_path() API call which
is now always available.

This fixes the issue where if the package was built on a different
system than where it is run, the image builder can't find the RFNoC
input files.
2025-04-30 14:27:18 +02:00
Marian Koop
4025a4fa7e host: util: b2xx: Extend private init-device function to require SN input
Extend private init-device function to require parameter additional
write-serial parameter to ensure device can return a serial number
to Window 10+ after device enumeration.
Add private functions to erase eeprom map content, and to dump full
eeprom content into a file.
Created local function to check eeprom revision to remove code
duplications.
2025-04-09 18:29:31 +02:00
Jörg Hofrichter
bf5b8867af image builder: check the validity of the --target parameter 2025-04-07 11:45:18 +02:00
Grant Meyerhoff
97c604139e cal: use atomic<bool> to wait until transmitting starts 2025-03-28 07:29:12 +01:00
Martin Braun
33a37926d6 rfnoc_modtool: Remove reliance on @CONFIG_PATH@
Instead of hard-coding the value of CONFIG_PATH into the rfnoc_modtool
executable, we instead use get_pkg_data_path(), which is now available
even if a Python-module-only version of the `uhd` module was installed.
This has several advantages:

- It improves reproducible builds
- It allows runtime-config of rfnoc_modtool by setting environment
  variables like UHD_PKG_DATA_PATH
2025-01-31 08:02:51 +01:00
Jörg Hofrichter
9b08d44ffb host: Fix download directory for uhd_images_downloader
... in case the configuration ENABLE_PYMOD_UTILS was not set.

This corrects the default images directory for
uhd_images_downloader on the embedded filesystem.
2025-01-15 16:08:43 +01:00
Lars Amsel
023bb39121 host: Cleanup UHD Python utilities
This moves the calibration Python utilities into the
uhd Python module (because they have dependencies to
uhd). Also the poetry script adds them as scripts to
the uhd module.

The install Python module is not executed on Windows
systems.

usrpctl, rfnoc image builder and rfnoc modtool are
not affected.
2025-01-10 15:03:45 +01:00
Jörg Hofrichter
8e780be0bc image builder: create build(...) directories in the current directory
Introduce a new parameter --base-dir BASE_DIR.

If the parameters --build-dir BUILD_DIR / --build-ip-dir BUILD_IP_DIR
/ --build-ouput-dir BUILD_OUTPUT_DIR are not set explicitly, they will
be set to these values per default:

- BUILD_DIR=<BASE_DIR>/build-<IMAGE_CORE_NAME>
- BUILD_IP_DIR=<BASE_DIR>/build-ip
- BUILD_OUTPUT_DIR=<BASE_DIR>/build

BASE_DIR defaults to the current directory if the parameter --base-dir
is not set. This means that per default, the build(...) directories
are generated in the current directory.
2024-12-20 10:20:59 +01:00
Martin Braun
45a58b4541 lib: Purge all hard-coded references the share/uhd
- Add a new public API call get_pkg_data_path() which returns the
  location of the "share" data. On a Unix system, this will typically
  return "/usr/share/uhd" when doing a regular system install.
- Purge all references to this path in UHD, and use the new API call
  instead.
- Add --pkg-data-path as an option to uhd_config_info.
2024-12-05 09:12:36 +01:00
Martin Braun
e9e75292cb cmake: Fix install-utils check to also work on BSD and Hurd 2024-12-02 17:31:47 +01:00
Martin Braun
d30fde9d5f image builder: Accept ~ and ~user on command line
When using the following command syntax:

    rfnoc_image_builder --fpga-dir=~/path/to/uhd/fpga \
                        --yaml-config=~/path/to/image_core.yml

The shell won't expand the ~ (shorthand for $HOME) and the image builder
needs to expand the path itself, which is fixed in this commit (for
--fpga-dir, --yaml-config, and --grc-config).

Note that this is not a problem when skipping the "=", i.e., the
following work without this fix, assuming a shell that auto-expands the
tilde symbol (e.g., bash, zsh):

    rfnoc_image_builder --fpga-dir ~/path/to/uhd/fpga \
                        --yaml-config ~/path/to/image_core.yml

or

    rfnoc_image_builder -F ~/path/to/uhd/fpga \
                        -y ~/path/to/image_core.yml
2024-11-07 12:36:19 +01:00
Martin Braun
cc354e70ad image builder: Re-implement GRC support
This adds support for generating RFNoC bitfiles from GNU Radio Companion
(.grc) files. Note that this requires changes to GNU Radio as well
(updated block definition files for the GRC bindings).

There is a new mini-feature in the image builder itself: The option to
dump the YAML file into the build directory. For the GRC import, this
makes sense, because it allows reading the UHD YAML represenation of a GRC
image core.
2024-11-07 12:36:19 +01:00
Martin Braun
ef13bc8c12 uhd: Fix warnings about unused variables
There were a bunch of warnings about unused variables in UHD which were
handled in different manners:

- usrprio_rpc_common.hpp: Here a superfluous if statement was used to
  avoid the "unused" warning. However, recent compilers can also detect
  the superfluous if statement, so unused variable is now simply left
  undeclared.
- radio_control_impl.cpp had an unused constant which is now removed,
  and a conditionally used capture value which is now made "used" even
  when TRACE-level logging is disabled.
- Responder.cpp had an unused variable which was required to be
  specified as an output argument for a C-style function, so we declare
  it unused to silence the warnings.
2024-10-29 17:59:42 +01:00
Javier Valenzuela
19d7dd6d49 image builder: Add SYNTH and CHECK build options 2024-10-25 08:03:20 -05:00
Wade Fife
b4ec88d0d3 image builder: Add --image-core-name option
The --image_core_name option already existed, but to be consistent with
the documentation and the other arguments, we allow the version with
hyphens as well.
2024-10-07 11:04:13 -05:00
Wade Fife
5363890d2d image builder: Coerce exit code to valid range 2024-10-07 11:04:13 -05:00
Joerg Hofrichter
056c9a73e5 utils: added DPDK version to uhd_config_info 2024-10-02 14:05:42 +02:00
Martin Braun
000cbaad38 cmake: Selectively disable rfnoc utils in abscence of ruamel.yaml
This focuses the installation of utilities: Now, when ENABLE_UTILS is
true, but ENABLE_PYMOD_UTILS is false, all utilities that depend on Mako
and ruamel.yaml are no longer installed.

This avoids the case where either dependency is not available, which
disables ENABLE_PYMOD_UTILS, but because of an 'OR' statement, enabling
ENABLE_UTILS was sufficient to attempt to install rfnoc_modtool and
rfnoc_image_builder.
2024-09-02 08:22:58 +02:00
Martin Braun
1fb022a35f Add rfnoc-modtool
This replaces rfnoc_modtool that was previously shipped with gr-ettus.
It is fully RFNoC/UHD4.x compatible. There is no shared code between
this version and the old one; this is a clean rewrite.

As of now, it lacks many of the features that were available with the
previous version, most importantly, the ability to generate GNU Radio
bindings.
2024-09-02 08:22:58 +02:00
Martin Braun
82f9c15e55 python: Rename imgbuilder to rfnoc_utils
We will be sharing code between rfnoc_image_builder, modtool, and
blocktool so the name is no longer appropriate.
2024-09-02 08:22:58 +02:00
Martin Braun
3cb868e1fb image builder: Improve handling of include paths
- The main installation path is now always an include path and can be
  used as such (e.g., /usr/share/uhd/rfnoc)
- fpga_includes and dts_includes have been streamlined. They now work
  identically on all blocks/modules/_device_, and can use resolve() the
  same way as other arguments do.
- Error messages for missing include files are improved.
2024-07-26 22:08:29 +02:00
Martin Braun
870f0877b4 image builder: Disable colors for non-TTYs by default
The fancy output generated by the image builder can cause issues with
scripts that use the output of the image builder. In any case, the
standard behaviour for command line tools is to not color output when on
non-TTYs, so we adopt the same behaviour here by default.

For full control, the new --color option can be used to force color on
and off. It follows the same scheme as `ls --color` (can be always,
auto, or never).

Out of precaution, we also use different markers for warnings and
errors when not using color (i.e., no UTF8 symbols).

This commit also removes a `staticmethod` decorator which causes issues
with Python 3.8 and 3.9.
2024-07-12 11:27:25 +02:00
Marian Koop
c4fbbdd54f fixup! image builder: Improve colors 2024-07-11 15:29:53 +02:00
Grant Meyerhoff
1e5fbec52d utils: fix typo in default frequency range 2024-07-11 11:54:55 +02:00
Martin Braun
6b7d38871c image builder: Improve colors
- The regular color was set to black, which would not read well on dark
  terminals. It now uses the default
- Some other colors were adapted. Some effort was made to make 'debug'
  not stand out, but that always depends on the terminal color theme
  that is chosen.
2024-07-02 08:52:52 +02:00
Martin Braun
ff15d32314 image builder: Fix linter and formatting 2024-07-02 08:52:52 +02:00
Martin Braun
b3c663d14b image builder: Improve error checking during build
- If there are any warnings during the image core parsing, the build is
  now skipped unless --no-warnings (-W) is also given.
- Exceptions in the ImageBuilderConfig are now caught in
  rfnoc_image_builder and an error message is logged, instead of
  printing the Python exception backtrace.
2024-06-25 17:19:51 +02:00
Martin Braun
c545a115f4 image builder: Improve logging
- Demote some info logs to debug that are not really required for
  regular operation.
- Reformat some log messages for better readability
2024-06-25 17:19:51 +02:00
Martin Braun
94b4de39d6 image builder: Add --build-ip-dir option
Co-authored-by: Wade Fife <wade.fife@ni.com>
2024-06-11 10:20:08 +02:00
Martin Braun
28b994406d fpga: Align build process for all targets
- All RFNoC capable targets now require rfnoc_image_builder to be built
- `make help` is updated for all targets to provide more useful and
  up-to-date information
- The FPGA manual is also updated
- All checked-in build artifacts are now removed from git
- axi_ram_fifo.yml is updated to provide include path information
  (required for building N3xx BIST images, which use this)
2024-06-11 10:20:08 +02:00
Martin Braun
dbf89f0098 uhd: uhd_usrp_probe: Query device DNA
If a device has a device_dna property tree entry, it will now be shown
during uhd_usrp_probe.
2024-06-11 10:20:07 +02:00
Wade Fife
af64b32d54 utils: image builder: Add encrypted secure core support 2024-06-11 10:20:07 +02:00