Commit Graph

8021 Commits

Author SHA1 Message Date
Abhishek Verma
05443d301d host/mpm: make gRPC robust to idle teardowns
The main RPC channel can sit idle for a long time (e.g. an interactive
Python session) while only the claim-loop channel sees traffic. Without
keepalive, gRPC self-closes the idle transport (~30 min) and the next
RPC fails re-establishing within its per-call deadline.

With this change the client now pings every 30 s to keep the channel
warm, and the server is configured to accept that cadence instead of
replying GOAWAY "too_many_pings".
2026-08-23 02:23:02 +02:00
Marian Koop
f9e8c5896f python: Fix error in python import warning on Windows 2026-08-23 02:11:55 +02:00
Max Köhler
f0b5d454cc doc: add phase coherency information 2026-08-23 02:03:43 +02:00
Niels Garibaldi
344c6793ac doc: fpga: host: Updated Wideband DDC DUC related documentation
Updated the references to DDC and DUC RFNoC blocks to reflect the
new split between legacy(singlesample) and wideband(multisample)
implementations.
Updated the related manual references as well as the C++ block
controller API comments that are pulled in by doxygen.
Also fixed a minor outdated comment in the FPGA source code.
2026-08-23 02:03:43 +02:00
Virendra Kakade
c0be7431c0 fixup! docs: add b310 kernel driver docs 2026-08-23 00:22:47 +02:00
Virendra Kakade
cc29eb4496 docs: add b310 transport notes
Signed-off-by: Virendra Kakade <virendra.kakade@ni.com>
2026-08-23 00:22:47 +02:00
Virendra Kakade
add2d9efa6 docs: add b310 kernel driver docs
Signed-off-by: Virendra Kakade <virendra.kakade@ni.com>
2026-08-23 00:22:47 +02:00
Grant Meyerhoff
0e9a62834f docs: Add B310 documentation 2026-08-23 00:22:47 +02:00
Grant Meyerhoff
e98e866709 b300: fix external ref assignment 2026-08-23 00:22:03 +02:00
Grant Meyerhoff
bc64ff0ad6 b300: disallow changing clock source mid-session 2026-08-23 00:22:03 +02:00
Grant Meyerhoff
9291d7e18b adrv9032: store nco as per channel 2026-08-23 00:18:25 +02:00
Grant Meyerhoff
e8079eca45 adrv9032: fix nco source check 2026-08-23 00:18:25 +02:00
Grant Meyerhoff
b8d34e36be adrv9032: correct channel assignment for agc 2026-08-23 00:18:25 +02:00
Virendra Kakade
3716dd0884 b300: depend on installed nib310rio.h for Linux PCIe support
Remove the vendored copy of nib310rio.h from the inchworm tree and
replace it with a build-time dependency on the header installed by
the nib310rio-dev package:

    /usr/include/nib310rio/nib310rio.h

CMake now searches for this header before registering the B300
component. On Linux, if the header is absent, B300 support is
silently skipped with a status message pointing to the missing
package. If the user explicitly passes -DENABLE_B300=ON without
the header present, CMake fails with a clear error.

Update the two Linux-only include sites to use the system path:

    #include <nib310rio/nib310rio.h>

This makes the build-time dependency on the kernel driver explicit
and removes the risk of the vendored copy drifting out of sync with
the installed driver.

Signed-off-by: Virendra Kakade <virendra.kakade@ni.com>
2026-08-23 00:17:02 +02:00
Marian Koop
f88231c7c1 ci: Add Python 3.13 support 2026-08-20 02:03:09 +02:00
Grant Meyerhoff
9015e01d3c b300: bump expected minor compat number for FPGA 2026-08-20 02:00:29 +02:00
Grant Meyerhoff
b035928f19 b300: reset Thunderbolt PD after image load 2026-08-20 01:59:34 +02:00
Marian Koop
556b378912 Prepare for 4.11.0.0 RC1 2026-08-12 18:25:49 +02:00
Marian Koop
fdb3a497a5 debian: Add licenses for b310 sources 2026-08-12 18:25:49 +02:00
Grant Meyerhoff
45ea2365b1 cores: restrict spi_core_adrv build for b300 2026-08-11 01:16:12 +02:00
Wade Fife
76ddd382f9 docs: fpga: Update simulator install location 2026-08-10 16:05:30 -05:00
Grant Meyerhoff
00826ca054 adrv9032: fix licensing notices 2026-08-10 22:56:24 +02:00
Abhishek Verma
3ec3ea3ef6 host: add missing rpc cmds in proto file
- add missing x4xx rpc cmds in proto file
- add missing n3xx rpc cmds in proto file
2026-08-10 22:52:19 +02:00
Lars Amsel
30a4b7fc2b fpga: x440: add 800 MHz images 2026-08-10 17:21:47 +02:00
Jörg Hofrichter
2618b51cb8 host: mpmd based uhd_image_loader: fallback to .bin file
If the expected FPGA image with .bit file ending is not available,
try with .bin file ending.

Co-authored-by: Lars Amsel <lars.amsel@emerson.com>
2026-08-10 16:40:53 +02:00
Grant Meyerhoff
7a0a5f8085 b300: search for FPGA images if not provided 2026-08-10 14:11:49 +02:00
mhallada
6883bb4d39 host: Fix NIPC calculation in ddc/duc
Computed NIPC values now resolve to 1 for
RF_BW < 200 MHz and the workaround in X410_X4_100
bitfile to ensure correct NIPC has been reverted.
2026-08-10 08:38:01 +02:00
Niels Garibaldi
66769905bb fpga: x400 add faster ce_clk variant
Add a new faster ce clock called fast_ce to x4xx that runs at
333.33MHz.

Co-authored-by: Max Köhler <max.koehler@emerson.com>
2026-08-05 08:43:42 +02:00
Niels Garibaldi
e466f427fd host: dsp: add wideband ddc and duc rfnoc blocks
Updated the host related files to support wideband DxC block
variants.
The singlesample and multisample variants both have the same API,
but internally they are using different register address spaces to
interact with the FPGA implementation.
The host implementation checks which implementation a RFNoC DxC
block is using by checking the block version number and will then
automatically choose the correct register address scheme.
This is all transparent to the user, the Block API stays the same.

Co-authored-by: Niels Garibaldi <niels.steffen.garibaldi@emerson.com>
Co-authored-by: André Zoch <andre.zoch@emerson.com>
Co-authored-by: Meghana Halladamath <meghana.halladamath@emerson.com>
Co-authored-by: Wade Fife <wade.fife@ettus.com>
Co-authored-by: Max Köhler <max.koehler@emerson.com>
2026-08-05 08:43:42 +02:00
Grant Meyerhoff
a18579e3e5 ci: Add support for USRP B310
Co-authored-by: Virendra Kakade <virendra.kakade@ni.com>
Co-authored-by: Wade Fife <wade.fife@ettus.com>
Co-authored-by: Javier Valenzuela <javier.j.valenzuela@emerson.com>
2026-08-04 12:00:49 +02:00
Grant Meyerhoff
e0f685a4aa usrp: Add support for USRP B310
Co-authored-by: Virendra Kakade <virendra.kakade@ni.com>
Co-authored-by: Javier Valenzuela <javier.j.valenzuela@emerson.com>
Co-authored-by: Aki Tomita <aki.tomita@emerson.com>
Co-authored-by: Tony Liecthy <tony.liechty@ni.com>
Co-authored-by: Wade Fife <wade.fife@ettus.com>
2026-08-04 12:00:48 +02:00
Javier Valenzuela
b6286bab13 fpga: Add support for USRP B310
Co-authored-by: Wade Fife <wade.fife@ettus.com>
Co-authored-by: Tony Liecthy <tony.liechty@ni.com>
Co-authored-by: Grant Meyerhoff <grant.meyerhoff@emerson.com>
Co-authored-by: Christopher Oeltjen <christopher.oeltjen@emerson.com>
2026-08-04 10:40:54 +02:00
Aki Tomita
e98bf35840 platform: Move get_page_size so it's shareable 2026-08-04 09:45:33 +02:00
Grant Meyerhoff
83553e2dd5 common: Add ADRV903x code from API version 2.12.1.4
- Includes all needed files from the ADI-provided software drop, intentionally only including the files needed for the ADRV9032.
- Adds a LICENSE.pdf file that points to ADIs Software License Agreement
- Includes CMakeLists.txt files for building and a .clang-format file to ignore changing format that were not provided by ADI.
2026-08-04 09:45:33 +02:00
Martin Anderseck
1af4625e84 cmake: Enable Ubuntu 26.04
These changes are required to build on Ubuntu 26.04 cleanly while still
maintaining backwards compatibility until Ubuntu 22.04.

- Set CMP0167 to NEW in UHD CMake paths that resolve Boost
- Scope policy changes with guard checks so older CMake versions remain
  compatible
- Ensure dependency resolution order applies policy before Boost
  discovery in package config
- Reduce CMake 3.30+ FindBoost policy warnings without breaking Ubuntu
  22.04-era toolchains
2026-08-03 12:55:00 +02:00
Doron Behar
26c0033d1e cmake: Remove Boost::system from UHDConfig.cmake component list
Boost.System has been header-only since Boost 1.69, and as of Boost 1.89
its CMake package config was removed entirely.[1]

This makes the `find_dependency(Boost ... COMPONENTS ... system ...)`
call in the installed `UHDConfig.cmake` fail on any downstream project
that does `find_package(UHD)` while linked against `Boost >= 1.89`.

Timeline of how this happened, for reference:

- Up to and including v4.9.0.1, UHDConfig.cmake.in had no Boost
  dependency check at all.
- ab724a30ec introduced the
  `find_dependency(Boost ... COMPONENTS ... system ...)` call here, to
  correctly declare Boost as a transitive dependency of the newly added
  `UHD::uhd` imported target.
- c45c296d8f fixed UHD's own build to stop
  requiring `Boost::system`, in response to it being dropped as of Boost
  1.89. That commit did not touch `UHDConfig.cmake.in`, which had only
  just gained its own separate `Boost::system` reference ten days
  earlier via ab724a30ec, and so was
  missed.
- `v4.10.0.0` ships with both commits, making it the first release where
  `UHDConfig.cmake.in`'s Boost dependency check exists but still lists
  `system`, breaking `find_package(UHD)` for any consumer linked against
  Boost >= 1.89.

[1]: 7a495bb46d
2026-08-03 12:52:47 +02:00
Martin Anderseck
c1b344b732 extension: Fix set_*x_antenna() and update C++
This fixes the segfault when calling into set_*x_antenna() within the
example extension and updates the C++ version to UHD default (20 at the
moment) to be able to build again.
The segfault was caused by the extension example never initializing the
pointers to _*x_antenna. It still doesn't do that but refers to the
radio's setter and getter methods now.
2026-08-03 09:55:38 +02:00
Martin Anderseck
2951e32013 test: Add spi_core_4000 test
This adds a unit test for the spi_core_4000 which checks for the
validation of configurations and arguments and verifies the correct
registers are written during a SPI transaction.
2026-08-03 09:51:20 +02:00
Martin Braun
2a2ce50abe lib: Fix compiler warning in db_dbsrx.cpp
On modern compilers, this file could cause a warning such as:

warning: ‘void operator delete(void*, std::size_t)’ called on pointer
‘<unknown>’ with nonzero offset [8, 9223372036854775800]
[-Wfree-nonheap-object]

A minor refactoring avoids the warning, even though it was unlikely
a real issue in the first place.
2026-07-29 14:39:22 +02:00
Markus Schill
a68fb6529d host: add sample rate to IQ cal JSON log file name 2026-07-28 14:26:19 +02:00
Wade Fife
19bf6207bd fpga: rfnoc: Support non-power-of-two SEP buffer sizes
Previously it would round up the requested size to the nearest power of
two. Now it will attempt to match the size of the buffer to the
requested size, allowing more control over how many FPGA RAM resources
get consumed.
2026-07-28 14:25:28 +02:00
Wade Fife
34ecf65642 rfnoc: python API: Expose sleep control op 2026-07-28 14:24:19 +02:00
Wade Fife
19d7d1a6a5 rfnoc: Increase Ctrl SeqNum to 8 bits
Increase the control SeqNum field width from 6 bits to 8 bits. See the
updates to rfnoc_fpga.md for details.
2026-07-28 14:24:19 +02:00
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
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
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
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