Commit Graph

11547 Commits

Author SHA1 Message Date
Jörg Hofrichter
5f3c311fe6 tools: analyze changeset: automatically resolve git toplevel
With this change it is possible to execute changeset_testlist.py
in a directory which does not match the toplevel of the repository.

The toplevel is automatically detected by calling:

    git rev-parse --show-toplevel
2025-10-27 13:54:50 +01:00
Lars Amsel
192b3b24f0 Host: Examples: Add error check for open failures
If open output file failed (e.g. missing permission) this was not
tracked and the C rx example crashed when try to write to the
empty file descriptor. This checks the result of fopen and prints
the str error of the failure for graceful exit.
2025-10-24 10:48:38 +02:00
Eckhard Ohlmer
12de60b20b docs: Moved FPGA manual content to host/docs
- All FPGA manual content is now side-by-side with other manual content.
- Switched instantiating files to using the \subpage command.
- Repaired broken ToC entries.
- Removed references to former FPGA doc directory from cmakelist.
2025-10-22 09:25:41 +02:00
Martin Braun
f597853c59 cmake: Fix warning in create_newmod.yml
config.hpp was erroneously listed as a file that needs changing during
create_newmod.yml.
2025-10-21 10:15:04 +02:00
Wade Fife
2a77ec9a86 ci: fpga: Add timeout per build attempt 2025-10-20 08:25:30 +02:00
Martin Braun
0ca6dd7f56 mpm: Bump C++ version to 20
This matches the UHD version and allows using advanced C++ constructs in
MPM also.
2025-10-15 11:34:59 +02:00
Jörg Hofrichter
9cd00e74af rfnoc: python API: update rfnoc_graph functions
- added function get_chdr_width
- added function get_chdr_xport_adapters
2025-10-10 16:49:32 +02:00
Jason
f9dd250d2f rfnoc_graph: add function for listing transport adapters
Implement a getter function to return the list of transport adapters
that can be used for remote streaming.

Also, add documentation for the get_chdr_width function.

Co-authored-by: Jörg Hofrichter <joerg.hofrichter@emerson.com>
2025-10-10 16:49:32 +02:00
Martin Braun
fe1a4ec2ef Update CHANGELOG 2025-10-10 15:51:56 +02:00
Eckhard Ohlmer
0634e63ec5 docs: restructured the UHD manual on chapter level
- intent: make it easier to find and maintain content
- introduced a doxygen layout file to adapt the structure
- changed the top-level chapter structure
- shifted existing sections into new chapters
- organized section-level doxygen files into subfolders
- added getting started and RFNoC content
2025-10-09 14:44:37 +02:00
Lars Amsel
89401ed49b host: rework the download of data from replay
Currently we download all data at once from replay in the DRAM utils.
This gets problematic on sequencing error on connections with multiple
hops for the UDP transport. In that case we need to query the replay
block for status but because of the sequence errors the response can
get lost and UHD has no measure to handle lost request responses.

The alternative implementation now downloads the data in chunks and
retriggers a complete chunk in case of an error. That way we do not
need to query the replay block for it's position.
2025-10-09 11:09:15 +02:00
Lars Amsel
74849045bb host: add wait time between resend init and do flow control.
We handle responses for init and flow control in the same code
location, because both send the same message to the host. Because
the FPGA removes messages in the queue, we need to delay the flow
control so the request does not get lost.
2025-10-09 11:09:15 +02:00
Martin Braun
872df113cb cmake: Update C++ version to 20 2025-10-09 09:48:12 +02:00
Wade Fife
9a97c84a43 fpga: rfnoc: Fix alignment of first sample
Fixed an issue where the first sample could have a different alignment
from the rest of the samples. This could manifest as a missing or
duplicated sample in the data stream.

This was most likely to occur when doing a timed RX/TX followed by an
untimed RX/TX, in which case a sample might be missing at the
beginning of the burst.
2025-10-08 09:26:55 -05:00
Martin Anderseck
a4ad9c2763 python: Speed up dram utils receiver
...by decreasing polling time and timeout.
2025-10-08 15:14:07 +02:00
Martin Anderseck
8497adcc2e python: Format dram_utils.py
...to comply with out style guide.
2025-10-08 15:14:07 +02:00
Martin Braun
4cf9d4ee1a rfnoc: Fix compiler warnings around usage of abs()
The code was using abs() where std::abs() would be appropriate. The
former is from the C library, and therefore does not do overloads, and
only operates on integers.
2025-10-08 14:18:18 +02:00
Martin Braun
a4739515c9 lib: dram_utils: Fix warning around unused variable
This variable is only used when UHD_MIN_LOG_LEVEL=trace.
2025-10-08 14:18:18 +02:00
Martin Braun
477f3c5fe7 tests: ranges: Add test for clip in initalizer list test 2025-10-08 14:00:38 +02:00
Martin Braun
d2eacfb0ba lib: Avoid using braced-initializers for meta ranges
Because a meta_range_t is a vector of ranges, the following syntax is
ambiguous, if not to the compiler then to human readers:

```cpp
meta_range_t r{0.0, 1.0};
// Not intuitively clear if this means r{range_t(0.0), range_t(1.0)}, or
// if it means r{range_t(0.0, 1.0)}.
```

Within UHD, we modify some calls to meta_range_t constructors that are
using braced initializers to explicitly use other constructors.

Note that the ambiguous usage of the braced initializer syntax is
allowed and documented in ranges.hpp, we simply remove it to clarify the
intent of certain lines. Also, non-ambiguous usage of the braced
initializer ctor is also perfectly fine, e.g.:

```cpp
meta_range_t r{range_t(0.0), range_t(1.0), range_t(4.0)};
```
2025-10-08 14:00:38 +02:00
Martin Braun
1655b0ff7c ranges: Recreate original behaviour for braced-init
Prior to 7bae6e60, the following two calls were equivalent:

```cpp
meta_range_t r1{0.0, 2.0};
meta_range_t r2(0.0, 2.0);
```

With that additional constructor for initializer lists, the former call
would be interpreted as:

```cpp
meta_range_t r1{range_t(0.0), range_t(2.0)};
```
...which has a different meaning.

With this patch, we bring back the original behaviour while retaining
the new initializer list syntax.

Additional unit tests cover this behaviour.
2025-10-08 14:00:38 +02:00
Jörg Hofrichter
6a7c529648 usrp: obx: fix unused-private-field warning 2025-10-07 16:35:34 +02:00
Jörg Hofrichter
3e9f34cb49 ci: support building with custom boost version on macos 2025-10-07 14:26:40 +02:00
Jörg Hofrichter
58c13409b0 cmake: add boost library path when running python based unittest
The boost library path was already added when running unittests
(UHD_ADD_TEST) but not when running python based unittests
(UHD_ADD_PYTEST). The boost library path is required when compiling
against custom boost version (tested with boost 1.89.0), because
some boost libraries have implicit dependencies on other boost
libraries which are not found otherwise.
2025-10-07 14:26:40 +02:00
Jörg Hofrichter
41ec754980 Revert "cmake: remove Boost from dyn libs for tests on Apple"
This reverts commit a743036971.
2025-10-07 14:26:40 +02:00
Jörg Hofrichter
8ac0b95e60 host: fix compile issue with unused variable
... which is caused by previous commit.
2025-10-07 14:16:53 +02:00
Lars Amsel
8598c90b9e doc: fix hints from doxygen 2025-10-07 09:13:58 +02:00
azoch
585c502c53 example: Enhanced tx_waveform.cpp documentation
- Added program documentation string.
- Marked required options as required().
- Added short option strings for required options.
- Made individual option descriptions more descriptive.
2025-10-06 11:34:58 +02:00
Martin Braun
031e9e179e uhd: Remove all usage of boost::assign
- For uhd::dict, we can now use initializer lists
- For std containers, we can also do that

Removing boost::assign does not only remove a Boost dependency where
there's a perfectly viable standard library alternative, in most places,
it also makes the code more readable.
2025-10-06 09:29:33 +02:00
Marian Koop
fa0a455869 doc: Correct doxygen syntax warnings
- Prevent strings containing '<' and '>' to be interpretend as
  xml/html tags by surrounding them with '`' instead of '''.
- Replaced select '\paragraph' block idenifiers with '\subsubsection'
2025-10-06 08:36:18 +02:00
Marian Koop
f3ce3e9948 ci: Add ci job to validate readthedocs user manual build flow
Job exercises the readthedocs build flow and attempts to perform
some error checking and log file evaluation.
ReadTheDocs currently uses Ubuntu 22 based build workers, the job
runs on Ubuntu 22 and 24. On Ubuntu 22 warnings found in the
sphinx log file are treated as fatal error.
2025-10-06 08:36:18 +02:00
Martin Braun
daaf1ef1e1 lib: Remove gratuitous Boost references
Several files in UHD include headers or reference namespaces from Boost
without using them. We clear those out for a better view of how much
Boost is left in UHD.
2025-10-01 13:44:59 +02:00
Martin Braun
7bae6e60e2 lib: ranges: Add initializer_list constructor
This allows to initialize a meta_range_t with an initializer list:

```cpp
meta_range_t r{range_t(0.0), range_t(1.0)};
```
2025-09-30 09:05:16 +02:00
Martin Braun
b859556579 uhd: Add initializer_list ctor to uhd::dict
This allows constructing a dict from a braced initializer list:

```cpp
uhd::dict<int, int> d2{{{1, 1}, {2, 2}}};
```

Unit tests are amended.
2025-09-30 09:05:16 +02:00
Martin Braun
3855516f6f lib: Remove boost::thread usage from USB transports
All the USB-based USRPs use boost::thread constructs, which are removed
with this commit. The following changes are applied:

- boost::condition is replaced with std::condition_variable
  - This requires shifting timeout values from boost::posix_time to
     std::chrono
  - boost::condition::timed_wait() is replaced by
    std::condition_variable::wait_for(), which returns a std::cv_status
    instead of bool.
- msg_task used a boost::barrier to check for the correct start of the
  underlying thread, which is removed to a simple check of the
  integrated boolean.
2025-09-30 08:19:35 +02:00
Max Köhler
1edb3a4c0a fpga: lib: fix missing ports in AXI round and clip complex module 2025-09-29 22:52:22 -05:00
Max Köhler
d26743b0ff fpga: x400: update auto-generated documentation 2025-09-26 16:24:09 +02:00
Max Köhler
9d210705d4 ci: fpga: moving to latest version of hwtools 2025-09-26 16:24:09 +02:00
Martin Braun
dd75d354e7 rfnoc_modtool: Fix package_data for rfnoc-newmod
This fixes an issue with the installation of OOT modules in venvs.
2025-09-26 10:37:09 +02:00
Max Köhler
362eda2a8f cmake: process uhdTargets only when needed 2025-09-26 09:22:58 +02:00
Niels Garibaldi
7a06a4a249 fpga: lib: Fix radio sim model channel initialization
Fixed an issue where the initial values for the radio channels were
calculated but never used for initialization in the sim_radio_gen
simulation module.
2025-09-25 10:56:23 -05:00
Niels Garibaldi
ca7d666dbb fpga: sim: Fix complex division in PkgComplex 2025-09-25 10:50:57 -05:00
Lars Amsel
b0acba3eb9 host: add helper routines to transfer data between host and replay (DRAM)
Transferring samples between host and replay block is a cumbersome job
with a lot of boiler plate code. This adds two new helper routines to
send data to the replay block receive data from the replay block into
some data buffer.
The interface is designed to be as close as possible to existing streamer
code in term of data types and names. Using Python this is just:

    tx_data = np.arange(num_samples, dtype=np.complex64)
    uhd.utils.dram.upload(graph, tx_data, "fc32")

    rx_data = np.zeros(num_samples, dtype=np.complex64)
    uhd.utils.dram.download(graph, rx_data, "fc32")
2025-09-25 17:30:16 +02:00
Lars Amsel
98728786db cmake: Fix target include path for Python module
The change to cmake modules breaks cmake build with virtual
environments. Make the target includes to Python private so
the build process does not complain about absolute paths in there.
2025-09-25 10:19:19 +02:00
Martin Braun
5f73667284 host/firmware/tools: Update minimum CMake versions
Various sub-projects around the UHD repository specify their own minimum
CMake versions (independent of UHD). We modify the minimum CMake
versions in the following way:

- All CMake files under firmware/ are bumped from 2.6 to 3.5. This is to
  allow newer CMake versions to work with these files (CMake 4 and
  beyond do no longer work if the minimum version is below 3.5). However,
  note that these CMake files are so simple they will keep working with
  older CMake versions, but that will require manually demoting the
  minimum version. Because more people are using CMake versions newer
  than 3.5 (especially with recent checkouts of UHD), this seems the
  more compatible solution.
- The CMake files for extension_example and init_usrp are bumped to
  3.12. This matches the version that UHD uses, which increases
  compatibility.
2025-09-24 13:48:07 +02:00
Lars Amsel
7ebd4723aa cmake: Do not force reinstall dependencies on building python wheels
When we install into a virtual environment we forced pip to reinstall
dependencies. With this pip could install a newer version of a
dependency. This leads to an unloadable Python bindings module if
the user has installed numpy1.x but numpy2.x is available. Then the
make process links against numpy1.x and the module is not loadable
afterwards when numpy2.x is install.
Therefore remove the force-reinstall option so the environment stays
the same after the wheel is built and installed.
2025-09-24 11:59:48 +02:00
Martin Braun
2536c29282 examples: init_usrp: Make use of UHD::uhd target 2025-09-24 11:35:24 +02:00
Martin Braun
ab724a30ec cmake: Enable usage of UHD:: module
Instead of relying on CMake variables like ${UHD_LIBRARIES}, downstream
projects can now use the UHD::uhd target to link against UHD.
2025-09-24 11:35:24 +02:00
Martin Braun
db95a49e76 examples: Reduce Boost footprint in init_usrp
- Remove system and thread as a required component (UHD might need those,
  but init_usrp does not and CMake should take care of linker flags
  originating from UHD)
- Remove gratuitous usage of boost::format
2025-09-24 11:35:07 +02:00
Martin Braun
c45c296d8f cmake: Remove Boost::system from component list
This has multiple reasons:

- We use CMake's FindBoost
  (https://cmake.org/cmake/help/v3.12/module/FindBoost.html) which can
  resolve dependencies itself. We only use boost::system in tandem with
  Boost::asio, which we already list as a dependency.
- There are combinations of CMake versions and Boost versions, where
  specifying this will link against the stub library of Boost::system
  (this is a header-only library since Boost 1.69). Removing it from the
  list avoids any kind of linkage.

Note that UHDBoost.cmake has some compatibility hacks for Boost::system,
which we now also remove.
2025-09-24 11:35:07 +02:00