241 Commits
Author SHA1 Message Date
miegl a95cce3d20 rtl: remove inferred CHDR conversion latches
Give curr_word a complete combinational assignment and use blocking assignments in chdr_16sc_to_12sc.

This removes the two 64-bit latch banks and the resulting bogus inferred-clock timing endpoints while preserving all legal FSM-state behavior.
2026-08-25 22:36:27 +02:00
miegl eb84b6c949 fifo: synchronize read-domain reset handling
Synchronize legacy and XPM reset indications into the FIFO read clock domain instead of feeding cross-domain reset logic into asynchronous PRE/CLR paths.

This removes the FIFO-induced CDC-10 findings while preserving legacy reset behavior.
2026-08-25 22:22:39 +02:00
miegl 90e0b1d038 fifo: replace synthesized simulation FIFO
Use the real axi_fifo_2clk hierarchy with XPM-based asynchronous FIFO implementations instead of synthesizing axi_fifo_2clk_sim.

Map the deep stream FIFOs into dedicated block RAM while preserving the legacy FWFT FIFO interface.
2026-08-25 22:21:16 +02:00
Markus Schill 6386d90b35 fpga: lib: Add initial value to ram_2port
Original-commit: da5c64bf4f631012b5969890a751084c998dd154
2025-04-09 13:50:17 -05:00
Wade Fife c9d2c066f3 fpga: lib: Fix pass-through mode in axi_fifo
A missing "else" after 6ea4e48 was causing two configurations to occur
at the same time for some values of SIZE.

This commit also sets the "space" and "occupied" outputs to 0 when in
pass-through mode.


Original-commit: 19b5c85b514e1c37238308e405108c69ecbddb7e
2025-04-08 12:26:02 -05:00
Wade Fife dc4f2dd6e2 fpga: lib: Update FFT IP for parallel builds
Original-commit: ff12e4a2fde1494612061a8a0183555653dacd18
2025-04-04 08:11:57 -05:00
Max Köhler 8dc5d3aeec fpga: lib: redirect old ctrlport modules to interface based ones
Original-commit: bf294111b9f49efb6373908274bc8d31bb8cb11d
2025-03-21 09:09:09 -05:00
Wade Fife 37b8b0d017 fpga: rfnoc: Move synthesizable code from sim to lib
Original-commit: d9f8c08dfb1afe98c35c5911125c6eead869713f
2025-03-17 17:47:16 -05:00
Wade Fife 6b19ec030c fpga: rfnoc: fft: Support multiple samples per cycle
This adds the NIPC parameter, which configures support for processing
multiple items or samples per clock cycle. With this enabled, the FFT
block can process at rates higher than 250 MSPS, such as 500 MSPS and
beyond.


Original-commit: fc76aa940e121fe1f85a3513f6d90df4667338cf
2025-03-07 12:39:34 -06:00
Wade Fife d7e5823047 fpga: rfnoc: fft: Add FFT packetize modules
Original-commit: 97ea89fac5c1889e5c0da44349d5f4be3d788965
2025-03-07 12:39:34 -06:00
Wade Fife 307ba63f99 fpga: lib: Fix trailing bytes in eth_ipv4_chdr_adapter
On the CPU to Ethernet path (c2e) in some configurations the trailing
bytes length was not being properly set in TUSER. This can lead to
extra bytes being added onto packets. Most of the time this is fine,
since the extra bytes would be ignored by the underlying protocols.
But when the packet was near the MTU size, it could lead to an
oversized packet that would get dropped by the network or host
computer.


Original-commit: 00d9a228f58b384798f0a1346fbab8f40b017a9c
2025-03-03 09:02:29 -06:00
Wade Fife 4eb1279423 fpga: lib: Enable TUSER in eth_ipv4_interface_wrapper
This wrapper was using TUSER for the number of trailing bytes, but it
wasn't properly enabled, which could cause it to be ignored in some
cases.


Original-commit: e7ebe601163d01d157bc3de9c2652952932e4a1c
2025-03-03 09:02:29 -06:00
Niels Garibaldi cfa8afcf37 fpga: rfnoc: Fix DDC overflow issue
Fixed an issue where the DDC could experience an arithmetic overflow
when receiving a full-scale signal with non-zero DDS frequency.


Original-commit: 5030d0106b6d2230a1c28e72f765098c7916cf1b
2025-02-26 22:09:04 -06:00
Wade Fife bb2bfbfe95 fpga: lib: Add AXI-Stream load split and merge modules
Original-commit: 32fb626ef1b1d3078fd331143b03cd38d1e155f0
2025-02-14 15:59:19 -06:00
Wade Fife 72432c9278 fpga: lib: Add zero-length option to axi_fifo
Original-commit: 6ea4e4808e09e55bb2ba05e787e79ec3c5fe4340
2025-02-14 15:59:19 -06:00
465be512e7 fpga: Ensure RX radio command FIFO does not overflow
Radio command FIFO will back pressure commands until there is room
for new elements.

Co-authored-by: Max Köhler <max.koehler@ni.com>
Co-authored-by: Martin Braun <martin.braun@ettus.com>


Original-commit: 474a17020e649e9ae4a39ef7cbce810d0ec67983
2025-02-14 09:22:33 -06:00
Max Köhler f961936a43 rfnoc: lib: introduce ctrl-port interface and BFM
Original-commit: 886cf97ad5d494b20c6fff0a53113f6096d458c7
2025-02-14 08:04:26 -06:00
Max Köhler c48f8bd5f1 fpga: rfnoc: lib: add AXI FIR filter for >1 SPC
Original-commit: 90ad1fecb62b804f543def6e4c680706d76442b5
2025-02-13 08:28:46 -06:00
Wade Fife f480008cf9 fpga: rfnoc: fft: Use DEFAULT on reset in axis_cp_list
Original-commit: 2eba2e9303d84e1a66f9841f894d526f62d91901
2025-02-12 22:06:20 -06:00
Wade Fife 30180c36f0 fpga: rfnoc: Add CHDR_HEADER_W constant
Original-commit: eaee884576883f930e5dcac6b034646be6fbedf2
2025-02-12 22:06:20 -06:00
Wade Fife c637f538fa fpga: lib: Add TO_SIGNED to usrp_utils.svh
Original-commit: c4eaadfaca97490d68f7b4702f009eb50252d0dc
2025-02-12 22:06:20 -06:00
Wade Fife f19fa3cf82 fpga: rfnoc: Fix info FIFO overflow
In cases when the info FIFO fills, it was possible for
in_pkt_info_tvalid to be asserted then on the next cycle
in_pkt_info_tready would deassert, in which case the input would be
dropped. This change ensures that tvalid remains asserted until tready
deasserts.


Original-commit: 6d2e9f983ae94d2e1e6866c34b3c87374a349631
2025-02-11 12:30:50 -06:00
Max Köhler 4db1e1e86f fpga: lib: remove reset on non-control signals of ctrlport modules
Original-commit: 8bdca548d1cec4c8ced3edb3c3c2ea7addc4f6e3
2025-02-11 11:20:12 -06:00
Max Köhler be25e4da1b fpga: rfnoc: radio: move arithmetic away from timestamp for timing
Original-commit: 7a3fc743375f065c38f9d6aa3fff43d67cc6b0e0
2025-02-10 16:47:54 -06:00
Markus Schill 0f431ebdd5 fpga: lib: Update simple_spi_core documentation
Original-commit: 65ba3dc518759804d14fa7b18cb374ccccb7a63c
2025-02-10 16:46:53 -06:00
Wade Fife 285f7b26a1 fpga: rfnoc: radio: Improve underflow handling
The TX radio will normally transmit a late not-timed packet when an
underflow occurs between packets within a burst. However, if it was
only one cycle late, then the packet would be dropped. This change
rearms the state machine more quickly in this corner case to allow
this late packet to be accepted. The underflow error will still be
reported.


Original-commit: 9faac6597cf21ca11e40d4e98797cea2848c40b0
2025-02-07 08:56:18 -06:00
Max Köhler 40ce83817a fpga: lib: add register stage in ipv4 chdr adapter
Original-commit: 2b9504d84d8f8e5dd7156498b4c8b5db5a2c84da
2025-02-05 09:14:26 -06:00
Max Köhler 52cc1735fd fpga: lib: simplify timing in pulse stretch
Original-commit: 2a3520b068456f1fdd291d4f8b0165e435a21757
2025-01-23 19:18:48 -06:00
Wade Fife edfe117b9c fpga: rfnoc: fft: Fix tready on magnitude path
The tready signal that was used when EN_MAGNITUDE equals 0 was not
correct. This commit allows EN_MAGNITUDE to be disabled.


Original-commit: ef449523df61268d4efbc86a12cb098c2b2bf239
2025-01-20 09:43:35 +01:00
Max Köhler ccdefb0c34 fpga: x400: add CMAC placement constraints
Original-commit: 3c8fee9c28cabb6ffdb369ca914828b1bf59884e
2025-01-17 13:56:29 +01:00
Wade Fife 81f150213f fpga: rfnoc: Add new FFT block
This replaces the legacy RFNoC FFT block with a new one of the same
name that includes a superset of the original features. New features
include cyclic prefix insertion or removal and FFT sizes up to 64k.


Original-commit: 25fffb006755b2e91f0138eb4af3ab9e16b8690c
2024-12-17 22:13:42 +01:00
Wade Fife 0770fd4405 fpga: lib: Add axis_sideband_tuser
Original-commit: 1549f95dc5c06d006499c30560184338c17a389e
2024-12-17 22:13:42 +01:00
Wade Fife 8f64fb2ee8 fpga: lib: Add axis_split_bus
Original-commit: f2a9c389d35697bd2e98fb05ffe3c66dcb179e65
2024-12-17 22:13:42 +01:00
Wade Fife d95d0252e0 fpga: lib: Add axis_combine
Original-commit: ab19d99cb0b4b74327bc31ecb5bc27ffcf94dec0
2024-12-17 22:13:42 +01:00
Wade Fife 06c18110ce fpga: lib: Add axis_data_if_packetize
Original-commit: ec91debff5c29d5e0fe92bc40ec553e4d4294a69
2024-12-17 22:13:42 +01:00
Wade Fife d46b94f233 fpga: lib: Add Xilinx FFT IP for various configurations
Original-commit: d96546d6391d10844e6ce0abd2e7e190b738365a
2024-12-17 22:13:42 +01:00
Wade Fife 4f99fee248 fpga: lib: Add complex_to_magphase_int17 IP
The underlying Xilinx CORDIC IP uses 2 bits for the whole part of its
(X,Y) inputs and its magnitude output. So, having 17 bits means we have
enough precision to represent the entire range of an sc16. The 16-bit
CORDIC is insufficient to cover this entire range.


Original-commit: 0d3d69493aac9239ae437b04f291c61669678606
2024-12-17 22:13:42 +01:00
Wade Fife 7e792d4a25 fpga: rfnoc: Add SV packages for use with RFNoC
Original-commit: c2b8eb4a88534230ce31dd4d40e4c069644c4d10
2024-12-17 22:13:42 +01:00
Wade Fife 48d8e384b6 fpga: lib: Add usrp_utils.svh with common macros
Original-commit: 079fbe528347fd4a2fd01064b30d2096f7e7b476
2024-12-17 22:13:42 +01:00
Wade Fife 82e1da1b78 fpga: lib: Cleanup axi_demux module
- Add documentation
- Add generate block labels
- Remove tabs and fix indentation
- Separate the code into three logical sections


Original-commit: 76074ecb319bf770805374b81c966b94cba898c5
2024-12-17 22:13:42 +01:00
Wade Fife e659f0cfdd Fix instances of sim preamble
Original-commit: d6ba2dfb5cb524ba2116cb0c3613af9650e57d03
2024-09-17 08:43:22 -05:00
Ryan Volz 1451ae066b fpga/usrp3: Fix DC truncation bias by adding rounding to DDC chain.
A digital DC bias caused by various truncations in the DDC chain was
previously noticable with small signal levels, especially with high
decimation rates. This patch eliminates the bias by replacing the
truncation with rounding or simply keeping more bits for longer where it
makes sense.

This is essentially a forward port of a similar prior fix to the usrp2
DDC chain: https://github.com/EttusResearch/fpga/pull/4.

Signed-off-by: Ryan Volz <ryan.volz@gmail.com>


Original-commit: a57c162a0d11ab82a83c911a94272ceb6f7ff70a
2024-06-11 10:20:08 +02:00
Martin Braun 69e728dba0 fpga: Add passthru CHDR/DMA transport adapter module
Original-commit: badb2356066555807a2f1e1d08fe968261dfdb04
2024-06-11 10:20:07 +02:00
Wade Fife 872de917bf fpga: x4xx: Replace Ethernet transport adapter
Original-commit: 34cee97e6206151e80d33e0e5367dcac62038a67
2024-06-11 10:20:07 +02:00
8669c68048 utils: image builder: Major update
Most important effect of this change: rfnoc_image_builder is now
required to build bitfiles, 'make' alone won't suffice any longer!

This is a huge changeset to the image builder that combines multiple new
features:

- There no longer is a separate edge file for the static router. The
  static routes are generated as a Verilog parameter directly into the
  rfnoc_core_kernel (which is also modified).
- image_builder.py is split up into several smaller files. Code is moved
  into yaml_utils.py, and the new files grc.py, builder_config.py
- Generic module support is added. Aside from noc blocks and stream
  endpoints, we can now instantiate arbitrary modules (they also require
  a YAML description file).
- To enable such modules, resets are now also tracked the same way that
  clock domains are.
- The ImageBuilderConfig config object now more closes matches the
  original YAML file. The attributes 'clk_domain_con' and 'block_con' are
  removed. Instead, the attributes 'connections' and 'clk_domains' are
  sanitized and amended with extra annotations. The templates are
  updated to reflect this change.
- IO ports can now carry parameters, e.g., to have variable wire widths
  based on the configuration.
- Many Pylint warnings were resolved.
- Add inheritance support for image core YAML files.
  This allows image core files to (recursively) inherit from other image
  core files. To do so, simply put an 'inherit' entry at the top of the
  file:
```yaml
inherit: 'x410_radio_base.yml'
```
- The inheritance feature is used as part of the image core files.
- Image core and DTS files are now generated as a build artefact into
  the build directory. This requires the usage of rfnoc_image_builder to
  build images. As a consequence, it is no longer required to check in
  image core Verilog files.
- As another consequence, rfnoc_image_builder is required to build
  bitfiles!
- Image flavours are no longer defined through Makefiles, but purely
  from the image core YAML files.
- Remove all image core YAML files that do not generate a shipping
  image. Because of the inheritance feature and the requirement to use
  the image builder, it is trivial to add new YAML files.
- Add support for transport adapters through the YAML files. Before,
  transport adapters were inferred from the make target (e.g.,
  X410_X4_200 would have four 10GbE links based on the 'X4' substring).
  Now, transport adapters are defined via the image core YAML.
- This feature is currently only used (or can be used) by the X4xx
  series. Older devices may or may not be ported to allow custom
  transport adapters in the future.
- Add parameters to the BSP YAMLs and the devices itself. This allows
  setting global parameters in the image core files. For example, the
  X4x0 devices use this to decide if they instantiate DRAM channels.
- DTS includes and constraint files can now be requested by
  blocks/transport adapter through their YAML files. They do no longer
  need to be listed in the Makefile.
- Support for secure image cores. These are image cores that allow
  incorporating RFNoC blocks that require license keys and thus can't
  live in an open-source environment. This solution adds the option for
  secure image cores without touching the open source feature set.
- Add --reuse option to allow manual editing of generated artefacts
- Allow IO signatures from any module: until now IO signatures had to be
  defined in a single file (io_signatures). This file will persist. In
  addition each module can add its own IO signature as with the same
  format the core IO signatures placed under the top level key
  `io_signatures`.  IO signatures are still maintained in a global
  dictionary. The consequence is that they can be shared among
  independent modules as well as they have to have a globally unique
  name. The image builder will warn about detected name clashes for the
  signatures.
- As a consequence, some less commonly used IO signatures were moved to
  their corresponding module YAML files.

Co-authored-by: Wade Fife <wade.fife@ni.com>
Co-authored-by: Lars Amsel <lars.amsel@ni.com>


Original-commit: a98ce2621e2a2dc25535fc700b49bfcb00b8eb59
2024-06-11 10:20:07 +02:00
Martin Braun 77d07a9714 fpga/rfnoc: Add license checker block
Original-commit: 5dad6c370f776981987afc2770d8a0ed0fb29575
2024-05-27 17:05:06 +02:00
Martin Braun cc28ffff60 fpga: Add license checker module
Original-commit: 8ed8927b944e7ad8a5da040c7f1951aad3535e11
2024-05-27 17:05:06 +02:00
Martin Braun cf85a6d40c fpga: Add cores for SHA256
Cores originate from https://github.com/secworks/sha256.


Original-commit: c43c72db097cbb5ebe29b7fa81484cbeaf19516b
2024-05-27 17:05:06 +02:00
Martin Braun 8af1711952 fpga: rfnoc: Enable blocks with no inputs/outputs
The following modifications are applied to allow RFNoC blocks with zero
input- or output ports (or none at all):

- The backend interface will no longer synthesize any flushing logic if
  there are no streaming ports
- The Mako templates are modified to allow generating code for blocks
  without streaming ports
- The BFM for RFNoC blocks (RfnocBlockCtrlBfm) is partially factored out
  into a parent class (RfnocBlockCtrlBfmCtrlOnly) which allows the
  simulation of such RFNoC blocks


Original-commit: 878cfcf48f125826e9d48b7c61a4ee7fd19e9a94
2024-05-27 17:05:06 +02:00
Martin Braun 76f67bbb0c fpga: Add module for reading Xilinx device DNA
- This provides a CtrlPort access to reading back the device DNA
- Available for US+ devices (i.e., RFSoC) and 7-series.


Original-commit: 43856f90da01cebc1e4b327f4435966ccd1df602
2024-05-27 17:05:06 +02:00