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
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.
- 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.
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>
- 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
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.
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.
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.
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.
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)};
```
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.
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.
- Added program documentation string.
- Marked required options as required().
- Added short option strings for required options.
- Made individual option descriptions more descriptive.
- 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.
- Prevent strings containing '<' and '>' to be interpretend as
xml/html tags by surrounding them with '`' instead of '''.
- Replaced select '\paragraph' block idenifiers with '\subsubsection'
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.
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.
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.
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.
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")
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.
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.
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.
- 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
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.