In 8f6c7e5 we cleaned up uhd::find to have a consistent experience independend
from the underlying registered device type (usrp1/usrp2/b200/mpm/…).
Removing the filtering of found devices from the find_t broke existing
workflows. The image loader uses the find_t of, e.g. of mpm which now does
no filtering anymore, so
uhd_image_loader --args addr=<ip>,tpye=x4xx,fpga=X4_200
would load the bitfile, because when finding for a specific ID UHD does no
broadcast so the result will be either no or a single result while
uhd_image_loader --args serial=<id>,tpye=x4xx,fpga=X4_200
would do a broadcast an find a potentially more that one device. The
image loader will then fail, because we do not support multi device updates.
This commit fixes this by moving the filtering methods into some place
visible for all find_t methods. uhd::find does not filter anymore.
Instead the filtering is done in the find_t's itself. This ensures that the
filter is also applied if the find_t is invoked by anything else than
uhd::find (e.g. the image loader). At the same time it is ensured that we
keep the cleaned up find we introduces in the commit mentioned above.
Previously, the `nco_locked` sensor value only returned the reset status
(i.e., was the NCO out of reset). We now also include the status of the
fail flag, i.e., the NCO must be out of reset, and the fail flag must be
clear to signal a positive `nco_locked` value.
Note that the `nco_locked` sensor is named this way to mimic the
lo_locked sensors available on other daughterboards. Those other sensors
report on the physical lock status of analog PLLs, but this simply
returns the status of the NCO.
Two new APIs are added to x400_rfdc_control:
- get_nco_good(): Combines the reset and FAIL flags into a single "good"
value
- get_nco_no_fail(): Provides information on the current status of the
NCO reset FAIL flag
install(DIRECTORY) in UHD_PYTHON_INSTALL_MODULE copies the entire
build-tree module directory verbatim, including cmake_install.cmake
and CTestTestfile.cmake files generated by CMake. These files embed
absolute build paths and do not belong on the target system.
Add PATTERN EXCLUDE rules to drop cmake_install.cmake and
CTestTestfile.cmake during installation.
With the most recent changes, Boost.Thread and all Boost date/time
libraries are no longer required. This updates the CMake and Debian
files to reflect those changes.
This adds a new sensor called `ref_stable` to the X4xx series. Unlike
`ref_locked`, which only checks the current ref-lock status, this will
also query the sticky bits of the LMK04832 lock-detect circuitry, and
then clear them. This allows checking if ref-lock was lost any time
between queries to the `ref_stable` sensor (unlike the `ref_locked`
sensor, which queries the current ref-lock status).
Main changes are:
- Creating Xilinx FIR filters based on the X410 ones
- Writing TX and RX resamplers with seperate testbenches
- Creating a RF core around the resamplers and rf_core_full for the 200M variant
specifically.
- Integration of the core into the FPGA top level based on conditional
parameters generated by the rfnoc_image_builder workflow
- Changing the 8 SPC to 2 SPC to save DSP resources for the 200M image only
- Adding reset handling from ps_rfdc_bd to the new rf_core.
Decode server-provided RPC error payloads when a remote call fails, instead of
always surfacing the generic "rpc::rpc_error during call" text. Error reporting
now prefers (in order):
* The structured RPC error payload from the exception
* The server-side last-error query
* The fallback exception message
Also refactor request/notify paths to remove duplicated catch/rethrow logic by
routing through shared internal helpers. This keeps behavior consistent across
all RPC entry point.
When using X420/X440 via their QSFP28 interfaces, an MPM reboot due to
clocking changes may cause timeout errors because the QSFP28 interfaces
are cycling down and up again during the MPM reboot and the connection
gets lost for some time. This commit adds a note about this and how to
circumvent this.
sim_find.cpp: Python 3.14's pyconfig.h redefines _POSIX_C_SOURCE and
_XOPEN_SOURCE to older values, but only if they haven't been defined yet.
Moving <Python.h> to be the first include (before any system header that
pulls in features.h via <string>) prevents the -Wmacro-redefinition
warnings that become errors under -Werror.
usrprio_rpc_client.cpp: Value-initialize usrprio_device_info to silence
-Wmaybe-uninitialized on the interface_num member, caught by GCC 16.
GCC 16 eagerly instantiates std::_Sp_counted_ptr_inplace<chdr_ctrl_xport>
in every TU that includes chdr_ctrl_xport.hpp with the inline make()
definition. This causes the destructor to be referenced in TUs that do
not link against chdr_ctrl_xport.cpp (e.g. client_zero_test), resulting
in undefined reference linker errors.
Fix by moving make() from the inline header definition into the .cpp
file, so std::make_shared<chdr_ctrl_xport> is only instantiated where
~chdr_ctrl_xport() is also defined.
GCC 16 emits a spurious -Warray-bounds warning when std::make_shared
uses placement new into its internal control block buffer. This causes
build failures in client_zero_test.cpp and mb_controller_test.cpp.
Suppress the warning with #pragma GCC diagnostic around the affected
std::make_shared calls, guarded by __GNUC__ >= 16 to leave older
compilers unaffected.
Fixes: https://github.com/EttusResearch/uhd/issues/923
On Linux, ICMP "Port Unreachable" is silently dropped on unconnected
UDP sockets but reported on connected sockets (ECONNREFUSED). Windows
reports WSAECONNRESET (10054) on all UDP sockets by default, breaking
device discovery when non-USRP hosts are on the subnet.
Apply SIO_UDP_CONNRESET=FALSE only for unconnected (broadcast) sockets,
leaving error reporting intact for connected sockets.
Originally, when the command time was changed, this triggered
programming experts in TX and RX direction. This caused long execution
times of any setters that were called at the same time (e.g.
set_*x_gain()). With this change, the calls with and without command
time are more on par. In HBX, the command time was used in an expert
where it was not necessary at all, so this has been removed, too.
This changes the TX gain tables for HBX in the range between 9 and 20
GHz to avoid overshoots that could occur otherwise when changing gains
especially from gain index 38 to 39.
This enables the ref_clk_calibration_iface discoverable feature in
Python. It can be used like this:
```python
mb_ctrl = graph.get_mb_controller(0)
ref_cal = mb_ctrl.get_ref_clk_calibration()
ref_cal.set_ref_clk_tuning_word(0x24a)
word = ref_cal.get_ref_clk_tuning_word()
ref_cal.store_ref_clk_tuning_word(word)
```
This feature is also exposed as a devtest.
The previous value of 20 ms caused spurious timeout errors under load.
The ZBX LO lock consistently completes within 30 ms in integration
testing. 50 ms provides adequate margin without masking genuine LO lock
failures.
After FPGA image reload, the FPGA resets its CHDR sequence counter to
zero. Stale ACKs from the old session can then arrive with a seq_num
matching a pending request in the new session.
Tighten the match check: also require op_code, address, and (for
WRITE/BLOCK_WRITE) data payload to agree. Mismatches are dropped and
ctrl_out_of_sequence is incremented. Add unit tests for both mismatch
cases.
These time functions are specific to libusb1_zero_copy, which is used
for B2xx USB streaming. These functions are rarely used, don't compile
when enabled, and rely on Boost. If we ever need them again, we'll need
to put them back in using std equivalents.
The logging macros are not affected.
This is an API change, because the logging_info object is modified, and
this object is part of uhd::_log::log. However, neither of those objects
are supposed to be used directly, the only correct usage of those is via
the logging macros.
The exception is uhd::log::add_logger(). To not break the add_logger()
API, we create a backward compatibility layer and provide an add_logger()
API call that still supports the old version (that uses
boost::posix_time).
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.
- boost::optional is replaced by std::optional
- In public APIs, boost::optional is still usable, but it is declared
deprecated. That means this is no API break (but it is an ABI break).
- Within the library portion (host/lib/**) there is no more usage of
boost::optional. Some backward-compatibility code (in actions.cpp and
ctrlport_endpoint.cpp) was moved out to the header.
Note: The most difficult replacement was that for
parse_log_level_from_string(), where boost::optional is the return
value. To retain API compatibility, we had to create a helper function.
When the DRAM receiver was introduced in the DRAM utils, property
propagation needed to be turned off in the reconnect() method to avoid a
circular and thus unresolvable graph. However if resamplers are in the
graph that leads to the sample rate not being propagated properly and
thus leaving it at 1, so we get far less data than expected. By only
skipping the property propagation in the TX direction both issues are
resolved and this is what this commit does.
Boost threads are no longer used, so this function is no longer
necessary. Because it's in a public header, it's turned into a nop
function and flagged deprecated. Its implementation is removed.
Within the nirio library, the following changes are applied to reduce
the Boost footprint:
- boost::condition is replaced with std::condition_variable
- In some places, this requires shifting from boost::posix_time to
std::chrono
- Note that boost::condition::timed_wait() is replaced with
std::condition_variable::wait_for(), which has a different return
value when used without a predicate (std::cv_status vs. bool).
- boost::thread is replaced with std::thread
- boost::shared_lock (and share_mutex) are replaced with
std::shared_lock
- The "writer lock" becomes a simple std::unique_lock
This performs some simple modifications to get rid of most Boost code
from the USRP1 codebase (e.g., remove simple boost::format usage, use
std::chrono instead of Boost timers, etc.)
This is a new API call for streamers. It will allow peeking into the
internal settings of streamers.
The exact content of this call is device-specific. It varies a lot
between RFNoC- and non-RFNoC devices.
It can be used as follows:
```python
my_usrp = uhd.usrp.MultiUSRP(device_args)
rx_streamer = my_usrp.get_rx_stream(stream_args)
print(rx_streamer.get_stream_info(0)) # Shows info about the streamer
```
For most use cases, this API is not required. It can help for debugging
(e.g., compare flow control parameters with expectations, or identify
EPIDs for a better understanding of Wireshark output), or it can be used
for remote streaming, when a 3rd party application needs to know
internal settings of streamers.
The maximum input power of X420 is 0 dBm. And to do the RX power
calibration it is required as otherwise the signal will be too low most
of the times during the cal and the cal may fail.
Use comma instead of period as thousands separator for the
--num_samples default value in uhd_iq_dc_correction.py, matching
English locale conventions.
In the X420 IQ/DC offset compensation, waveforms get preloaded into the
DRAM. During the measurement they are then streamed to the radio. The
DRAM on the device operates at 4k boundaries. Therefore, the waveform
start addresses are rounded up to the next multiple of 4096 bytes to
ensure proper alignment and avoid potential underflows during playback.
These changes enable usage of OOT modules on Windows, and also fixes
issues with Python usage of OOT modules on all platforms. Note that
existing OOT modules will need to apply these patches manually.
These changes are backported from rfnoc-oot-blocks. The following fixes
are included:
- We require UHD 4.9 so that we can use the UHD::uhd target for linking
instead of using the older-style ${UHD_LIBRARIES}. This fixes some
linker issues.
- The symbol export macro name is fixed (missing "DLL")
- The Python module is explicitly linked against the OOT DLL
- The Python module forces a loading of the UHD Python module, which
helps resolve RTTI and allows blocks to be declared descendents of
noc_block_base.
- RFNoC OOTs with a module name that contains a hyphen (like
"oot-blocks") are now correctly generated (macro names, e.g., should
include the string OOT_BLOCKS in this case)
- We can provide a Pybind11 path, which is helpful on Windows, because
unlike UHD, OOTs don't carry their vendored version of that library.
Co-authored-by: Wade Fife <wade.fife@emerson.com>
Enable NEW cmake policy CMP0167 that stops using the depreciated FindBoost
module and rely in upstream BoostConfig.cmake configuration files.
This may also avoid conflicts between upstream BoostConfig.cmake configuration
files and the depreciated, legacy implementation in FindBoost.
When launching a multi_usrp or RFNoC session with multiple devices, an
assertion error would always be thrown (with a single device, it works).
This is because the existence of the key rpc_version was checked before
separating multiple devices from a device_args dictionary.
This adds a new key to the discovery information coming from MPM
devices (rpc_version). The purpose of this is to smooth a transition to
alternative RPC subsystems other than mprpc.
If a device reports a different RPC version than supported by UHD, it
can still be found, but cannot be used for UHD sessions.
Added missing Msps conversion for actual rx sampling rate print in
the rfnoc oot gain block example.
Also applied ni-python-styleguide changes for import order.
This improves the logging IDs of files related to HBX. It adds the radio
as prefix to the logging ID to make it easier to recognize which
component wrote a log message as we typically have (at least) two in a
UHD session. Improved behavior for ADMV1320, ADMV1420, LTC5594
(demodulator) and for the TX and RX LOs.
This shortens the HBX TX gain map at the lower end. With this, these
high attenuations / low gain indexes will not be possible anymore
to avoid non-linearities that were discovered otherwise.
This adds a warning when changing into the manual gain profile in the RX
direction. It warns the user that in manual gain mode it is possible to
increase individual gain stages in a way that the input level to RF
chain can be too high even if the input power is below or at the
specified damage level.
This commit aligns the documented and the actual default value for the
waveform duration and corrects the value to pass for infinite playback
to be 0. With duration = -1 it would stop with an error immediately.
This adds the TX to RX trigger in the DDC portion of the dram_utils. Without
that, the trigger was not passed on from the issue_stream_cmd() wrapper to
the actual method which led to "late command" errors.
Removed deprecated 'license classifiers' and updated license field with
valid SPDX license expression to to comply with Python packaging standards
(PEP 639).
This fixes the following problems with generic modules in RFNoC image
core files:
- The schema had a typo that prevented third-party modules to be
instantiated in the image core file
- Modules without explicit resets couldn't be instantiated
- The module generation code (both templates and builder_config.py) were
using the module.desc information, not the sanitized content. This
bypassed any checking and sanitization and would cause additional
problems if there were either no clocks or no resets defined (or both)
Removed the configure-time chmod on the test shell scripts in
UHDUnitTest.cmake. Commit 94349ae46f switched script generation
from configure_file to file(GENERATE), which defers file creation
to the generate phase. As a side effect, the pre-existing chmod
execute_process now runs during configure before the file exists,
producing a developer warning.
When using the test script with ctest the chmod is unnecessary
because ctest invokes the script explicitly via ${SHELL} and does
not require execute permission on the script itself.