Commit Graph

12107 Commits

Author SHA1 Message Date
Wade Fife
d0a97670fa docs: rfnoc: Increase Ctrl SeqNum to 8 bits
This change updates the RFNoC specification to increase the SeqNum
field from 6 bits to 8 bits. This helps reduce control packet response
sequence number aliasing in cases where packets may be dropped or
reordered. To make this change while keeping the implementation
efficient, the control packet fields have been rearranged to place the
most critical information first and to avoid splitting fields across
word boundaries.

Additionally, compared to the previous version of the specification (as
of UHD 4.10), a new ReqSize field has been added. This field represents
the read request size.

The DataLength field that briefly existed in the change history has
been removed. In the new version, NumData represents the number of data
words present in the control packet (the same meaning as in the
original RFNoC specification), while ReqSize indicates the number of
words requested to be read. This means that a large read request can be
issued without including dummy data in the request (e.g., ReqSize = 15
while NumData = 0).

See separate commits for the corresponding FPGA and host code changes.
2026-07-28 14:24:19 +02:00
Abhishek Verma
a7e2679cfe host: cmake: add gprc/protobuf min version 2026-07-28 14:10:47 +02:00
Abhishek Verma
85523485c7 CHANGELOG: add RPC migration to gRPC 2026-07-28 14:10:47 +02:00
Abhishek Verma
cff6c9f643 ci: docker: add gRPC/protobuf version in vcpkg.txt 2026-07-28 14:10:47 +02:00
Abhishek Verma
5784b7e080 docs: update with gRPC documentation 2026-07-28 14:10:47 +02:00
Max Köhler
cb7ed8accd rfnoc_image_core: configurable CHDR block width per streaming endpoint 2026-07-28 09:37:08 +02:00
Zsolt Gaál
ddc67b681e examples: Fix cleanup waterfall memory leak in rx_samples_c
This PR fixes a bug in the goto cleanup waterfall within rx_samples_c.

Previously, the free_rx_streamer label was positioned above the
free_rx_metadata label. Because C executes sequentially, if an error
occurred after the metadata was successfully created (for example,
during uhd_usrp_set_rx_rate or uhd_usrp_get_rx_stream), the code would
jump to free_rx_metadata, fall through to free_usrp, and exit. It
completely skipped free_rx_streamer, silently leaking the streamer
memory and leaving the hardware handles dangling.

Changes:

- Reordered the cleanup labels to strictly follow the reverse-chronological
  order of resource creation (Metadata -> Streamer -> USRP).
- Updated the corresponding EXECUTE_OR_GOTO jump targets for the stream
  setup functions to match the new waterfall order.
2026-07-28 09:23:21 +02:00
Max Köhler
3ed843791b fpga: lib: add Xilinx parameterized macro version of axi_fifo_2clk
The axi_fifo_2clk module uses a generic FIFO macro from Xilinx. This allows
custom widths and depths to be specified. It removes the need for combinatorial
logic to connect multiple smaller IP blocks to form a wider data path FIFO.
2026-07-28 09:13:27 +02:00
Marian Koop
ed831f68e1 ci: Use python script to create some filtered matrix variable values 2026-07-27 17:01:39 +02:00
Marian Koop
28afccc490 ci: Add script to dynamically derive subsets of matrix variables 2026-07-27 17:01:39 +02:00
Max Köhler
5b9c55c5df fpga: x420: lower FPGA max input delay on GPIO interface 2026-07-24 15:13:25 +02:00
Martin Anderseck
0ef82247ab host: Fix SPI pin offset for Port B
While in all GPIO code, 12 is the offset from Port A to Port B, the
SPI engine for X4xx used to have 16 since the last rework of this
code, directly reflecting addresses from the FPGA. This commit fixes
this.
2026-07-24 13:48:00 +02:00
Abhishek Verma
cfde75d5e8 ci: enable phase-coherency test 2026-07-24 10:13:27 +02:00
Abhishek Verma
69bdf4d34f host: fix intermittent "Socket closed" / "Invalid token" RPC failures
UHD creates two gRPC clients per MPM session (main rpc + claimer)
against the same address with identical ChannelArguments. Under
gRPC's default global subchannel pool they share one HTTP/2 transport,
so destroying any one client (an old claimer from reset_claim_loop(),
a discovery probe, or a freed prior session) can tear down the
connection under the active claimer. Its next Reclaim then fails
with error "Socket closed", the claim loop exits, MPM expires the
claim, and the main client's next RPC fails with "Invalid token"
-- causing tests like PhaseCoherence to fail.

Fix: set GRPC_ARG_USE_LOCAL_SUBCHANNEL_POOL=1 in the rpc_client_impl
constructor so each channel owns its own subchannel/transport.
Destroying any client now tears down only its own connection; the
active claimer's transport and claim are untouched. This eliminates
both the Socket closed and the follow-up Invalid token.

Also add MPM_CLIENT client-id/thread-id diagnostic debug/trace logs.
2026-07-24 10:13:27 +02:00
Jörg Hofrichter
ffcce2e62d mpm: check-filesystem: correct condition for mpm init successful
With gRPC being used as RPC technology, the MPM function
get_init_status now returns the values as list instead of a set.
2026-07-23 10:49:27 +02:00
Wade Fife
c9324ce0d4 fpga: lib: Fix coherency issues in ctrlport_reg
Fix an issue in which the most-significant word could be overwritten
with cached data when ctrlport_reg_rw is used in coherent mode. Also
fix per-word byte-enable handling for wide registers.

Fix the coherent-read cache width in ctrlport_reg_ro to match the
padded register width.

Thanks to GitHub user NobleBrutus for pointing out the coherency bug
and suggesting a fix.
2026-07-21 19:55:07 -06:00
Wade Fife
c60a872c21 fpga: tools: Use VHDL 2008 in Vivado 2026-07-21 19:29:47 -06:00
Jörg Hofrichter
d36b562bd3 ci: macos: build grpc before building UHD 2026-07-21 16:15:03 +02:00
Grant Meyerhoff
2c255b28c8 i2c: fix class name duplication 2026-07-21 10:04:50 +02:00
Grant Meyerhoff
1bce477ace i2c: allow for multi-byte eeprom offset 2026-07-21 10:04:50 +02:00
Grant Meyerhoff
3153b09ce3 i2c: allow for setting custom i2c_datarate 2026-07-21 10:04:50 +02:00
Ahmed Salman
0201e62616 x4xx: SelfCal: honor skip_adc_selfcal during clock reconfiguration
add helper to clear pending db ADCSelfCal host tasks
clear any existing ADC SelfCal tasks in init() when
skip_adc_selfcal is enabled
prevent restart_tiles() from re-scheduling
ADC SelfCal tasks when skip_adc_selfcal=1
log when ADC self-cal task scheduling is intentionally skipped
2026-07-20 12:31:25 +02:00
Martin Braun
b1bee353a3 fpga/usrp3: Remove various unused IP
The following IP blocks are removed:

- lib/ip/complex_multiplier: This was only used in rfnoc-gain (but not
  anymore).
- lib/ip/dds: This had been designed out a while ago.
- x300/ip/input_sample_fifo: This was also unused.

Unused IP is a drag on builds and Vivado upgrades.
2026-07-20 09:15:44 +02:00
Martin Braun
26ad48ba65 examples: rfnoc-gain: Remove IN_TREE_IP option
This removes the option to use IP in-tree, because the IP in use is not
useful for UHD overall, and it doesn't have much utility for the example
either. By removing it from the example, we allow for the IP to be
deleted.
2026-07-20 09:15:44 +02:00
Grant Meyerhoff
433f82bf5c common: add implementation for ina231 monitor 2026-07-17 14:24:04 +02:00
Grant Meyerhoff
c01eda1eb5 common: add support for UBLOX communication 2026-07-17 13:46:44 +02:00
Grant Meyerhoff
a06f6531f5 gps_ctrl: accept other constellation messages
- Previously only 'GP' messages were accepted and parsed for.

Co-authored-by: Virendra Kakade <virendra.kakade@ni.com>
2026-07-16 16:06:22 +02:00
Grant Meyerhoff
6b3bde0e85 gps: update regex to not require comma
- Some chips don't include a comma in the messages
2026-07-16 16:06:22 +02:00
Grant Meyerhoff
49d87e2d97 gps: increase timeout for non-JL chips 2026-07-16 16:06:22 +02:00
Grant Meyerhoff
97024728c9 gps: add member for flushing buffer
- Some devices don't automatically cycle through the UART buffer in the background, so may have stale data when the user wants to read GPS sensors. This signals that a flush needs to happen so that stale data isn't used for determining GPS lock, time, etc.
2026-07-16 16:06:22 +02:00
Grant Meyerhoff
206a7b183b lmk05318: add sleep before busy check 2026-07-16 13:00:41 +02:00
Grant Meyerhoff
760058e236 lmk05318: add note about code duplication 2026-07-16 13:00:41 +02:00
Grant Meyerhoff
a9c812453a common: add c++ support for lmk05318 2026-07-16 13:00:41 +02:00
Grant Meyerhoff
966e91e0eb lmk04832: add note about code duplication 2026-07-16 12:57:44 +02:00
Grant Meyerhoff
494b40b491 common: add c++ support for lmk04832 2026-07-16 12:57:44 +02:00
Jones Chakkalakkal
56aed061ab fpga: sim: Add reset behaviour for AXIS BFM master
Added two different behaviours for AXIS BFM when reset is asserted:
- TRUNCATE_PACKET: ignores the TREADY from the DUT and progresses
		   through the rest of the data in the current packet.
		   This was and still is the default behaviour.
- DISCARD_PACKET : discards the rest of the packet in-flight and
		   moves to the next one. This prevents partial
		   packets from the master persisting after a reset.
2026-07-16 08:14:00 +02:00
Frank Dietze
4ea0d16db1 ci: phase-coherency test: disabled 2026-07-15 16:16:31 +02:00
Abhishek Verma
e1284c724b host: fix missing db_idx to sample/pcr rate rpc calls
GetDboardSampleRate and GetDboardSampleRate rpc methods are not
dispatching per dboard because of missing db_idx field in the proto
definition. This means rpc is setting these rates for only single
dboard.

This change fixes dboard based dispatching for these rpc methods
from host client.
2026-07-15 13:22:24 +02:00
Frank Dietze
d86a479030 ci: hwtest: x420: enable nonRF + systemimage tests 2026-07-15 08:50:47 +02:00
Martin Braun
6fedec0a50 rfnoc_modtool: Fix make_var entry in YAML wizard
When running `rfnoc_modtool make-yaml`, the generated YAML will contain
an incorrect make_var entry under fpga_includes. This fixes it to
contain the blockname rather than the module name.
2026-07-14 10:03:04 +02:00
Marian Koop
75b6da500f ci: Disable building installer packages for ubuntu questing 2026-07-13 11:43:37 +02:00
Max Köhler
f343f06673 fpga: rfnoc: remove critical path from destination cache 2026-07-11 11:12:17 +02:00
Clemens Felber
6e2cbad193 ci: temporary disable MPMD for macOS homebrew build 2026-07-11 11:12:17 +02:00
Abhishek Verma
8704862ec6 ci: add gRPC build and CI integration
Add gRPC and protobuf packages to all Linux Docker builder images
and Windows vcpkg manifests. Remove VS2019 builder support.
2026-07-11 11:11:58 +02:00
Abhishek Verma
e24b1cb8bb host/mpm: replace mpRPC with gRPC transport
host:
Replace the msgpack-RPC (rpclib) client with a gRPC-based
implementation. Add auto-generated C++ client and Python bindings
from protobuf definitions. Remove rpclib dependency and integrate
FindgRPC into CMake.

mpm:
Replace the msgpack-RPC server with a gRPC server generated from
protobuf definitions. Add pb_utils.py for type conversion between
Python and protobuf. Update rpc_server.py to dispatch calls via
gRPC stubs. Update mpm_shell to use gRPC. Replace pyudev with sysfs
scan in uio device discovery.

Bump MPM compatibility number to 7.0 and RPC version to 2.

This change requires new depedencies. E.g. for Ubuntu 24.04 or 25.10:
libgrpc++-dev, libprotobuf-dev, protobuf-compiler-grpc, python3-grpcio
2026-07-09 12:12:04 +02:00
Max Köhler
d2ec97b171 fpga: rfnoc: optimize CHDR crossbar for area 2026-07-09 01:10:29 -05:00
Wade Fife
e7a480c4c7 fpga: lib: rfnoc: Don't clear cache until safe 2026-07-09 01:09:53 -05:00
Martin Braun
1f5e1180ef docs: x4xx: Improve docs on external clocking
- Add section on external clocking in X4xx manual
- Add links to the new section
- Fix some minor typos in clocking-related sections
- Clarified that full reinit occurs when a ref-lock-loss event is
  registered
2026-07-03 14:45:08 +02:00
Martin Braun
8c0f99f915 mpmd: Temporarily drop default init_threads to 1
This is a safety precaution, until parallel initialization has been
vetted for all MPM devices, we print a warning for parallel init and
make it an opt-in features (the `init_threads` argument needs to be
passed as a device argument to use parallel initialization).

Note this feature has been tested on X440 with positive results.
2026-07-03 13:54:35 +02:00
Max Köhler
9808a7e12b fpga: x400: autogenerate rfdc_timing_regmap 2026-07-02 13:13:34 +02:00