Commit Graph

12146 Commits

Author SHA1 Message Date
Max Köhler
93e1b7c78d fpga: remove synth target
Replacing the synth target of the FPGA Makefiles with the normal "bin" flow
which ends after synthesis if desired. This aligns the build flows in case ILAs
want to be added.
2026-06-30 10:33:29 +02:00
Wade Fife
831f2940d5 fpga: rfnoc: Fix chdr_traffic_source in Questa 2026-06-29 08:08:59 +02:00
Wade Fife
fdc57ca407 tests: Make RFNoC RSSI prop test log-level independent 2026-06-29 08:08:59 +02:00
Wade Fife
9a437b0650 fpga: sim: Add to DESIGN_SRCS rather than replace
Some testbenches were overwriting DESIGN_SRCS, but this gets
initialized in viv_sim_preamble.mak and overwriting it causes some
necessary files to be removed from the file list.
2026-06-29 08:08:59 +02:00
Wade Fife
4e87ee8cdf tests: Ensure ctrlport responses come in expected order
Due to thread scheduling on the test OS, requests made in close
succession could be responded to out of order, which does not correctly
model the hardware. This change ensures that responses come in the same
order they were requested.
2026-06-29 08:08:59 +02:00
Wade Fife
3d0afa2c8d fpga: rfnoc: Update block testbenches to use block/burst ctrl 2026-06-29 08:08:59 +02:00
Wade Fife
79ac8c1b8a fpga: sim: Add block and burst support to CtrlBfm 2026-06-29 08:08:59 +02:00
Wade Fife
adcc90a140 docs: rfnoc: Clarify RemDstPort and RemDstEPID usage 2026-06-29 08:08:59 +02:00
Wade Fife
930651b2f7 tools: Support block control ops in C++ RFNoC dissector 2026-06-29 08:08:59 +02:00
Wade Fife
2595f70815 tools: Update C++ version for RFNoC dissector
The RFNoC code in UHD that is used by the dissector was updated to use
more recent C++ features, such as std::optional. This change updates
the C++ requirement for the dissector to match UHD.
2026-06-29 08:08:59 +02:00
Wade Fife
92c7a2c096 tools: Check endianness with CMake
This is to match commit d05d956714, which replaced Boost macros with a
similar check using CMake.
2026-06-29 08:08:59 +02:00
Wade Fife
168fc70df6 tools: Support block control ops in LUA RFNoC dissector 2026-06-29 08:08:59 +02:00
Wade Fife
1449b98b27 docs: rfnoc: Update use of data in AXIS-Ctrl 2026-06-29 08:08:59 +02:00
Wade Fife
a39128d4bc rfnoc: Display versions when there's a mismatch 2026-06-29 08:08:59 +02:00
Wade Fife
2da7ba5243 rfnoc: Bump RFNoC version to 2.0 2026-06-29 08:08:59 +02:00
Wade Fife
9bbfd23fb1 rfnoc: Support remaining control opcodes
This adds support for using block write, block read, and poll control
packets in RFNoC. Previously, block write/read operations were done by
issuing multiple individual single-word write/read control packets. Now
a single control packet can be used to read or write up to 15 words.

The poll operation is now also supported and no longer throws an
assertion when called.

A new burst write/read mode is also supported, in which the standard
OP_WRITE/OP_READ opcodes are used with multiple data words to perform
repeated reads or writes to the same address.

This change also removes the requirement for dummy data words to be
present in read request packets as well as write and sleep response
packets. This improves efficiency of the control interface, especially
for block and burst operations.
2026-06-29 08:08:59 +02:00
Wade Fife
2574cd52b9 fpga: rfnoc: Support remaining AXIS-Ctrl opcodes
This adds support for block write, block read, and poll operations in
the AXIS-Ctrl endpoint.

A burst mode is also now supported, in which the READ or WRITE opcode
with NumData > 1 allows repeated reads or writes to the same address,
unlike block write/read, which auto-increments the address.

This change also removes the requirement for dummy data words to be
present in read request packets as well as write and sleep response
packets. This improves efficiency of the control interface, especially
for block and burst operations.
2026-06-29 08:08:59 +02:00
Jörg Hofrichter
1c5da03e89 ci: update meta-ettus-dev branch to scarthgap 2026-06-25 14:47:14 +02:00
Abhishek Verma
a27f09dd5a mpm: gpio: typecast to int before set 2026-06-25 14:47:14 +02:00
Abhishek Verma
1a1801700b ci: preserves /24 during set IP address 2026-06-25 14:47:14 +02:00
Jörg Hofrichter
521dc737a7 mpm: bist: fix temp and fan tests for e320, n3xx, x4xx
Use HwmonTempSensors based tests for bist tests.
2026-06-25 14:47:14 +02:00
Jörg Hofrichter
8d2addaf1f mpm: HwmonTempSensors: fix double listed temp sensors, et. al.
- Fix double-listed temp sensors
- Implement mapping fan1_input -> fan0, etc. to remain backward
  compatibility
- add function to read sensor names
2026-06-25 14:47:14 +02:00
Bjoern Bachmann
d468872d40 mpm: refactor thermal/fan sensor handling with unified hwmon/sysfs abstraction
Introduce HwmonTempSensors (sysfs_hwmon.py) and refactor
SysfsThermalSensors (sysfs_thermal.py) to enumerate available sensors
once at construction time and cache device references in a sensor_map
dict, avoiding repeated udev context creation and device-tree walks on
every readout.

HwmonTempSensors supports the cros-ec hwmon subsystem and accepts a
sensor_list parameter to discover both temp and fan sensors. A new
read_fan_sensor_value() method is added alongside the existing
read_thermal_sensor_value(). Multiple subsystems (hwmon, iio) and
sensor formats are supported via a read_sysfs_sensors_value() utility.

SysfsThermalSensors is extended to support multiple subsystems (IIO
and thermal) and a data_probe parameter for flexible attribute reading.
A read_fan_sensor_value() method is added to match the hwmon interface.

Both classes expose the same read_thermal_sensor_value(sensor_names,
reduce_fn) interface, making them interchangeable at the call site.

All affected peripheral managers are updated:
- E320: updated to use the new sensor abstraction pattern
- N3xx: refactored temp and fan sensor methods for hwmon/thermal backends
- X4xx: unified _temp_fan_sensors handle with hwmon/thermal dispatch,
  add missing HwmonTempSensors import
- E310: add dynamic MB temperature sensor type detection instead of
  hardcoding "jc-42.4-temp", fixing usrp_list_sensors compatibility

A _hwmon_based_sensors flag at init time selects the correct backend
for fan and temperature reads on all platforms.
2026-06-25 14:47:14 +02:00
Bjoern Bachmann
975e87b085 mpm: tools: Use dts labels for mb, db eeproms 2026-06-25 14:47:14 +02:00
Jörg Hofrichter
5d70afebb4 mpm: tools: apply clang-format 2026-06-25 14:47:14 +02:00
Jörg Hofrichter
99faba1fe4 mpm: sys_utils.i2c_dev: rework, e.g. don't rely on i2c-adapter
The i2c-adapter subsystem was meant as a temporary compatibility
layer. The recommended option always was to rely on i2c-dev
subsystem only. With commit 7e722083fc the i2c-adapter subsystem
was finally removed from Linux kernel 6.12.

The logic for resolving the i2c-dev device node was changed
accordingly.

This change also adopts all occurances in the code where the I2C
bus or device node is resolved to use resolving by devicetree
symbol. E.g. in n3xx.py, the N32X QSFP I2C node was resolved by
devicetree label before.

Overall, two functions are now provided by sys_utils.i2c_dev:

- dt_symbol_get_i2c_bus: Get the I2C bus (as pyudev.Device) for
  a given device tree symbol. This function is used if the
  returned value is further used for filtering devices using
  udev, e.g. searching for certain devices on the same I2C bus.
- dt_symbol_get_i2c_device_node: Get the i2c-dev device node
  (e.g. "/dev/i2c-0") for a given device tree symbol. This function
  is used in cases where only the device node is of interest, e.g.
  when passing it to a C/C++ library.
2026-06-25 14:47:14 +02:00
Jörg Hofrichter
a65baff474 mpm: apply ni-python-styleguide fix to *_bist 2026-06-25 14:47:14 +02:00
Jörg Hofrichter
1f22068c97 mpm: add executable flags to x4xx_bist
This ensures that the ni-python-styleguide-fix pre-commit
hook is being executed.
2026-06-25 14:47:14 +02:00
Jörg Hofrichter
688bf4845d ci: use Ubuntu 24.04 builder for source packaging 2026-06-25 12:07:27 +02:00
Jörg Hofrichter
5efbf97de8 ci/tools: Remove Ubuntu 20.04 installer 2026-06-25 12:07:27 +02:00
Jörg Hofrichter
f03ded7d92 uhd: remove build directory from build info for reproducible builds
For repoducible builds which use the variable SOURCE_DATE_EPOCH, ensure
reproducible C_FLAGS and CXX_FLAGS by replacing the actual build directory
by BUILD_DIR.

The change is based on the patch omit-build-path from pkg-uhd repository,
original author "A. Maitland Bottoms" <bottoms@debian.org>.
2026-06-24 15:21:09 +02:00
Lars Amsel
94f857518c Host: Move find logic into the find_t calls
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.
2026-06-24 09:19:45 +02:00
Martin Braun
af31944702 fbx/hbx/zbx: Include fail flag in nco_locked sensor
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.
2026-06-22 13:42:30 +02:00
Martin Braun
6cb25a298b lib: x400: Add fail-flag APIs to RFDC control
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
2026-06-22 13:42:30 +02:00
Bjoern Bachmann
5faa6888f1 cmake: exclude CMake artifacts from Python module install
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.
2026-06-19 08:41:39 +02:00
Aki Tomita
624aa3e79c transport: Include winsock2 for Windows when appropriate
Latest versions of libusb no longer include winsock.h. If winsock.h
is not included, use winsock2.h since the rest of the codebase
uses it.
2026-06-18 07:42:01 +02:00
Lars Amsel
561bac04ea Host: Change include to fix boost bind pragma warning 2026-06-17 21:35:30 +02:00
Martin Braun
af151f4f8f mpm: x4xx: Make init clocking sequence more robust
The recent change in 2e7ec47 exposed a new corner case:

- Assume two consecutive sessions with external clock and otherwise
  identical device args. In this case, the second session would usually
  start without forcing a re-init, because we assume the clocks are
  still fine.
- Now what if the external ref clock glitches between sessions, i.e.,
  when no UHD is running? In this case, the `spll_unlock_event` flag
  would never be set
- Because the reference lock check was implicitly sticky before the
  change, this would still cause a forced re-init in the past, but not
  anymore

This commit calls get_ref_stable() during session initialization to
scoop up any sticky bits that occurred between the last successful UHD
session and the new one. The ref-stable sensor state will be
reconfigured during device initialization, so this does not lose any
information.
2026-06-17 09:20:22 +02:00
Martin Braun
673f54ade9 mpm: x4xx: Allow resyncing SPLL R-dividers
When the SPLL loses reference lock and then re-locks to the reference,
its R-dividers will be out of sync. This change allows a new argument to
the set_sync_source() API call to resynchronize SPLL R-dividers to the
PPS flank. This is not a supported operation, and it may leave the FPGA
in an unknown state. For this reason, this option should only be
exercised by experienced users who know exactly which consequences this
may have.

To call this feature, use the reset_spll_r_divider key in the sync args:

```python
my_usrp.set_sync_source("reset_spll_r_divider=1")
```

If a reset was necessary and the R-divider reset was successful, it will
be necessary to also resynchronize timestamps between devices and
timekeepers.
2026-06-15 14:47:36 +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
27c20969c1 tests: Update linking instructions for client_zero_test
On Arch Linux, users have reported linker error otherwise.
2026-06-15 12:53:58 +02:00
Martin Braun
736fd1b85c cmake: Remove some Boost dependencies
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.
2026-06-15 09:50:16 +02:00
Martin Braun
fa0c49e074 mpm: x4xx: Add sticky LMK DLD bits back as ref_stable sensor
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).
2026-06-12 15:19:41 +02:00
Martin Braun
2e7ec477cd mpm: x4xx: Make ref-lock sensor non-sticky
This changes the LMK04832 class to only optionally (and not always)
check the sticky LD_LOST flags in the 0x182 lock-detect register of the
LMK04832. As a result, the ref_locked sensor will now only return the
current lock status of this PLL, and the ref-locked LED
2026-06-12 15:19:41 +02:00
Martin Braun
b29cbbaf4f mpm: x4xx: Improve comments and annotations in clocking code
This updates comments and type annotations in x4xx_clock_{ctrl,mgr}.py
for better readability. No functional changes.
2026-06-12 15:19:41 +02:00
Martin Braun
4d71a19259 mpm: Fix linter issues on sample-PLL-related files 2026-06-12 15:19:41 +02:00
Martin Braun
94f09a671e x4xx_bist: nsync_gty: Separately report APLL1 and 2 lock bits
This splits the lock bits for APLL1 and 2, resulting in more detailed
reporting.
2026-06-12 15:19:41 +02:00
Martin Braun
f27b9258c6 ci: Exclude more X4xx-related files from other tests
Changes in lmk04832.py and x4xx_bist no longer trigger changes for
non-X4xx devices.
2026-06-12 15:19:41 +02:00
Niels Garibaldi
fa7c91a285 fpga: radio: add TX fixed resampler disable X440_200 rf core 2026-06-12 14:30:31 +02:00
Martin Braun
7b9e704074 Update CHANGELOG 2026-06-12 14:06:13 +02:00