Commit Graph

910 Commits

Author SHA1 Message Date
Max Köhler
96a38f69a5 fpga: rfnoc: Add register documentation to radio 2025-07-02 10:04:16 +02:00
Max Köhler
041ee1d3fd fpga: rfnoc: register timestamp in radio cores 2025-07-01 10:28:50 -05:00
Max Köhler
11b56b9650 fpga: ci: add CPLD compile job 2025-07-01 13:15:44 +02:00
Max Köhler
27db6f86ef fpga: x4xx: add registers for activity monitoring to ease timing closure 2025-06-27 17:25:26 -05:00
Max Köhler
1782797971 fpga: lib: refactor round and clip to save resources 2025-06-27 17:21:36 -05:00
Max Köhler
197b11ca52 fpga: zbx: change routing settings in project 2025-06-27 10:27:14 -05:00
Max Köhler
9bd2806085 fpga: zbx: add missing constraint 2025-06-27 10:27:14 -05:00
Max Köhler
e329fd0474 fpga: tools: error out on unconstrained paths for diamond builds 2025-06-27 10:27:14 -05:00
Max Köhler
f3fa2e73c2 fpga: lib: avoid late responses of combiner to be forwarded 2025-06-27 10:27:14 -05:00
Max Köhler
a959438ba7 fpga: fix various warnings in CPLD related code 2025-06-27 10:27:14 -05:00
Max Köhler
5769d3d30d fpga: lib: add HDL-based complex multiply 2025-06-23 11:20:36 -05:00
Max Köhler
87165d3eee fpga: sim: add parametrized class for complex types 2025-06-23 11:20:36 -05:00
Max Köhler
585cab66af fpga: sim: add rounding mode to round() 2025-06-23 11:20:36 -05:00
Friedrich Wenisch
52a9fa86a2 fpga: x440: Correct clk assignment 2025-05-23 10:08:37 +02:00
Abhishek Verma
7c4969c098 docs: updates in manual for B206mini 2025-05-15 11:15:51 +02:00
Wade Fife
ccc8369d69 fpga: sim: Fix assignments in ctrlport_bfm_pkg 2025-05-13 11:34:49 -05:00
Wade Fife
e39f361fb2 fpga: rfnoc: Add CHDR bus monitor 2025-05-05 08:06:29 -05:00
Wade Fife
20c2ac609f fpga: lib: Add AXI-Stream bus monitor 2025-05-05 08:06:29 -05:00
Wade Fife
d848759edb fpga: sim: Add peek methods to RfnocBlockCtrlBfm 2025-05-03 15:04:01 -05:00
Wade Fife
6d18056881 fpga: rfnoc: Add CHDR max lengths 2025-05-03 15:04:01 -05:00
Wade Fife
c75a78b0ea fpga: sim: Print timestamp in hex
Update PkgChdrBfm so that the print() methods print the timestamp in
hexadecimal in addition to decimal.
2025-05-03 15:04:01 -05:00
Wade Fife
8121e38a56 fpga: lib: Add synchronizer_sync_in module 2025-04-22 10:21:25 -05:00
Wade Fife
8493888c67 fpga: sim: Make members accessible in RfnocBlockCtrlBfm 2025-04-22 10:04:32 -05:00
Friedrich Wenisch
1dd1447e9e fpga: x410: Fix NCO reset mechanism 2025-04-17 15:37:13 +02:00
Max Köhler
060c007a12 fpga: ci: enable publishing of internal files 2025-04-16 10:14:27 +02:00
Markus Schill
da5c64bf4f fpga: lib: Add initial value to ram_2port 2025-04-09 13:50:17 -05:00
Wade Fife
19b5c85b51 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.
2025-04-08 12:26:02 -05:00
Wade Fife
7992198889 fpga: sim: Restore PkgChdrUtils for compatability
This brings back the package PkgChdrUtils after it was removed in
d9f8c08. Its contents were moved because most of the contents were
synthesizable, but many existing testbenches might still reference the
old package name. This new version of PkgChdrUtils simply imports then
exports the things it used to include. New testbenches are encouraged
to reference the new files instead of PkgChdrUtils.
2025-04-08 12:24:51 -05:00
Wade Fife
ff12e4a2fd fpga: lib: Update FFT IP for parallel builds 2025-04-04 08:11:57 -05:00
Sam Lane
13d004fa90 fpga: tools: Add assert option to synthesis
Add -assert option to Vivado synthesis to allow VHDL assert statements
to be checked during synthesis.
2025-04-03 11:01:14 -05:00
Wade Fife
9dc2e089d8 fpga: tools: Fix escape sequence warnings
This adds to 11c60ee to fix a few additional escape sequence warnings.
2025-04-03 09:51:54 +02:00
Max Köhler
22b4a35da2 fpga: x4xx: add reset option for gearboxes 2025-04-02 08:02:11 +02:00
Max Köhler
4ebbd61cb1 ci: fpga: add FPGA pipeline to execute mono pipeline subset 2025-03-26 14:23:20 +01:00
Max Köhler
e4cbbe7145 fpga: x440: bring back TX control remap in RFDC BD 2025-03-25 07:50:14 +01:00
Max Köhler
95e227edaa fpga: x400: zbx: update projects for new ctrlport modules 2025-03-21 09:09:09 -05:00
Max Köhler
6bcb44df7b fpga: x400: cpld: update projects for new ctrlport modules 2025-03-21 09:09:09 -05:00
Max Köhler
bf294111b9 fpga: lib: redirect old ctrlport modules to interface based ones 2025-03-21 09:09:09 -05:00
Max Köhler
1cb4898519 fpga: bump compat number to 10.0 2025-03-20 09:07:06 +01:00
Max Köhler
6c6d52fd65 fpga: x4xx: replace ADC/DAC info by RFDC memory 2025-03-20 09:07:06 +01:00
Wade Fife
d9f8c08dfb fpga: rfnoc: Move synthesizable code from sim to lib 2025-03-17 17:47:16 -05:00
Wade Fife
f094aa7ae0 fpga: tools: Disable common simulation warnings
This change sets StdArithNoWarnings and NumericStdNoWarnings by
default for ModelSim simulations. Without this, an excessive number of
warnings can be generated by Xilinx IP during simulation.
2025-03-17 13:40:26 -05:00
Wade Fife
7ab4e9a4e2 fpga: tools: Change -onfinish to final
This changes the -onfinish setting from "stop" to "final" for Questa
and ModelSim. The "final" setting is required so that SystemVerilog
final blocks run. This also has the same effect as "stop" in that it
won't ask you in the GUI if you want to exit the simulator when
$finish() is called.
2025-03-17 13:40:26 -05:00
Wade Fife
4cc3a19f56 fpga: docs: Add Questa to simulation instructions 2025-03-17 13:40:26 -05:00
Wade Fife
247f9fd2ac fpga: tools: Add support for Questa 2025-03-17 13:40:26 -05:00
Wade Fife
81ccd8cb51 fpga: tools: Fix issues in run_testbenches.py
This commit addresses several issues that can occur with different
simulators. It changes the following:

- Update documentation
- Ignore testbenches in build-ip folders
- Tolerate extra lines in the testbench results regular expression
- Match numbers using \d instead of + to avoid ValueError exceptions
- Only fetch the start_time if it exists
- Allow any simulator make target (don't limit it to specific choices)
2025-03-14 08:03:34 +01:00
Wade Fife
fc76aa940e 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.
2025-03-07 12:39:34 -06:00
Wade Fife
97ea89fac5 fpga: rfnoc: fft: Add FFT packetize modules 2025-03-07 12:39:34 -06:00
Wade Fife
1c719bc0a6 fpga: tools: Fix CSV reporting in run_testbenches.py 2025-03-07 12:40:20 +01:00
Wade Fife
0593f3c8e0 fpga: tools: Reformat run_testbenches.py 2025-03-07 12:40:20 +01:00
Wade Fife
00d9a228f5 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.
2025-03-03 09:02:29 -06:00
Wade Fife
e7ebe60116 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.
2025-03-03 09:02:29 -06:00
Wade Fife
b012c18fd6 fpga: x400: Change NUM_DRAM_BANKS to 2 on X410 X4_400 image
This was set to 1 in UHD 4.7, but it must be 2 for all channels to
have sufficient bandwidth.
2025-02-27 10:53:07 -06:00
Martin Braun
3644be33a5 ci: Merge FPGA pipelines into mono pipelines
This adapts the CI scripts such that there is a single pipeline (the
"mono" pipeline) which builds both FPGA bitfiles and all of UHD, and
runs the hardware tests.

Note that this change does not load the FPGA bitfiles built in the same
pipeline, which means this change really enables the same behaviour as
before. Consuming bitfiles created in the same pipeline will be phase
2 of this endeavour.
2025-02-27 16:01:43 +01:00
Niels Garibaldi
5030d0106b 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.
2025-02-26 22:09:04 -06:00
Niels Garibaldi
1f7ea94d8f fpga: sim: Add coerce function to PkgMath 2025-02-26 22:09:04 -06:00
Martin Braun
888850d641 Revert "Get rid of unnecessary bash wrappers in subprocesses.Popen"
This reverts commit e572bab3ee.

The problem with skipping the "unnecessary" bash wrappers is that Ubuntu
systems use 'dash' as a default shell, which does not support our build
infrastructure. While we do recommend not using dash for building FPGA
builds in our documentation, it's not obvious that dash is the problem
when calling rfnoc_image_builder.
2025-02-20 10:24:16 +01:00
Wade Fife
32fb626ef1 fpga: lib: Add AXI-Stream load split and merge modules 2025-02-14 15:59:19 -06:00
Wade Fife
6ea4e4808e fpga: lib: Add zero-length option to axi_fifo 2025-02-14 15:59:19 -06:00
Lars Amsel
474a17020e 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>
2025-02-14 09:22:33 -06:00
Max Köhler
886cf97ad5 rfnoc: lib: introduce ctrl-port interface and BFM 2025-02-14 08:04:26 -06:00
Max Köhler
90ad1fecb6 fpga: rfnoc: lib: add AXI FIR filter for >1 SPC 2025-02-13 08:28:46 -06:00
Max Köhler
f1fab29e44 fpga: x440: fix refactored rf_core_full 2025-02-13 07:58:10 -06:00
Friedrich Wenisch
a7bce74be1 fpga: x400: refactor RFDC block diagrams and timing constraints 2025-02-13 07:51:05 -06:00
Wade Fife
2eba2e9303 fpga: rfnoc: fft: Use DEFAULT on reset in axis_cp_list 2025-02-12 22:06:20 -06:00
Wade Fife
f1173f14d1 fpga: sim: Allow DATA_WIDTH that's not a multiple of 8 2025-02-12 22:06:20 -06:00
Wade Fife
eaee884576 fpga: rfnoc: Add CHDR_HEADER_W constant 2025-02-12 22:06:20 -06:00
Wade Fife
c4eaadfaca fpga: lib: Add TO_SIGNED to usrp_utils.svh 2025-02-12 22:06:20 -06:00
Wade Fife
2330a5e016 fpga: sim: Add get methods for stall probability 2025-02-12 22:06:20 -06:00
Wade Fife
80db09235b fpga: sim: Remove unused stall arguments
Remove unused stall_probability arguments from
get_master_stall_prob() and get_slave_stall_prob().
2025-02-12 22:06:20 -06:00
Max Köhler
85ef95fd85 fpga: x400: bump FPGA compat version to 9.0 2025-02-12 14:38:08 +01:00
mschill
b5cb4fac42 fpga: x400: Update SYSREF Delay and capture mechanism
Together with an update to the LMK04832 register config according to
TIs data sheet, all clock outputs are now aligned to SYSREF rising edge.
Therefore, I needed to adjust the SYSREF capture mechanism inside the
RFSoC and the SYSREF LMK Delay.
SYSREF is now captured first at the falling edge of PRC.
To be on the safe side, we are still double synchronizing SYSREF
afterwards on the rising edges of PRC.

As we are now independent of any MCR regarding timing constraints the
SYSREF Delay is also set to '0' for all X4xx devices.
2025-02-12 14:38:08 +01:00
Wade Fife
6d2e9f983a 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.
2025-02-11 12:30:50 -06:00
Max Köhler
8bdca548d1 fpga: lib: remove reset on non-control signals of ctrlport modules 2025-02-11 11:20:12 -06:00
Max Köhler
7a3fc74337 fpga: rfnoc: radio: move arithmetic away from timestamp for timing 2025-02-10 16:47:54 -06:00
Markus Schill
65ba3dc518 fpga: lib: Update simple_spi_core documentation 2025-02-10 16:46:53 -06:00
Max Köhler
0f66b0baed fpga: ci: remove schedule from PR pipeline 2025-02-10 11:19:54 +01:00
Wade Fife
9faac6597c 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.
2025-02-07 08:56:18 -06:00
Martin Braun
0dede88c65 fpga: tools: Refactor viv_ip_xci_editor.py
This Python utility was getting a bit rotten. The following updates
where made:

- Reformatted using ni-python-styleguide
- Fixed formatting of regex strings by declaring them 'raw'
- Updated docstrings and any linter issues

On Pyton 3.12 and beyond, this will no longer throw SyntaxError
warnings.
2025-02-07 14:52:28 +01:00
Martin Braun
21c4c591a5 fpga: Remove vivado_lab support
Previously, the build tools for the FPGA bitfiles would try and
autodetect the Vivado executable, but would allow for a `vivado_lab`
executable. However, Vivado Lab Edition can't build bitfiles nor run
testbenches. Its only use with the USRP FPGA build tooling is to run
`viv_jtag_program` and `viv_jtag_list` (which are command-line proxies
for probing FPGAs attached to JTAG, and for programming bitfiles over
JTAG, e.g. to an X3x0).

When Vivado Lab and Vivado were present, it was possible that we ran
into issues where Vivado Labs would be preferred, and then builds or
testbenches would fail.

We therefore remove the ability to use Vivado Lab. Running the Vivado
Lab Edition with the GUI, and loading and probing bitfiles is of course
still possible, but tools like `rfnoc_image_builder` can no longer
accidentally try to use Vivado Lab instead of regular Vivado.
2025-02-06 16:45:15 +01:00
Max Köhler
d5876c82a0 fpga: x400: avoid false PPS rising edge on switching sources 2025-02-05 16:56:54 -06:00
Max Köhler
2b9504d84d fpga: lib: add register stage in ipv4 chdr adapter 2025-02-05 09:14:26 -06:00
Frederik Pfautsch
e572bab3ee Get rid of unnecessary bash wrappers in subprocesses.Popen
Signed-off-by: Frederik Pfautsch <frederik.pfautsch@missinglinkelectronics.com>
2025-02-03 21:51:38 +01:00
Max Köhler
a218a6a503 fpga: x400: refactor 100GEth LBUS to AXI interface 2025-01-31 09:08:03 -06:00
Max Köhler
d635ee91fb fpga: tools: mark hash dirty with staged changes 2025-01-29 11:37:22 +01:00
Max Köhler
d12b53cb3b fpga: ci: switch to latest hwtools 2025-01-28 13:41:32 -06:00
Max Köhler
d87d5af5dc fpga: ci: adding repeat script to dependency 2025-01-27 15:32:22 -06:00
Max Köhler
1d1c889c15 fpga: tools: Add --build-dir to repeat_fpga_build 2025-01-27 15:32:22 -06:00
Max Köhler
2a3520b068 fpga: lib: simplify timing in pulse stretch 2025-01-23 19:18:48 -06:00
Wade Fife
ef449523df 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.
2025-01-20 09:43:35 +01:00
Max Köhler
3c8fee9c28 fpga: x400: add CMAC placement constraints 2025-01-17 13:56:29 +01:00
Jörg Hofrichter
d7e91d8d06 ci: enable CI/PR trigger on release branches 2025-01-17 13:28:35 +01:00
Wade Fife
25fffb0067 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.
2024-12-17 22:13:42 +01:00
Wade Fife
1549f95dc5 fpga: lib: Add axis_sideband_tuser 2024-12-17 22:13:42 +01:00
Wade Fife
f2a9c389d3 fpga: lib: Add axis_split_bus 2024-12-17 22:13:42 +01:00
Wade Fife
ab19d99cb0 fpga: lib: Add axis_combine 2024-12-17 22:13:42 +01:00
Wade Fife
ec91debff5 fpga: lib: Add axis_data_if_packetize 2024-12-17 22:13:42 +01:00
Wade Fife
d96546d639 fpga: lib: Add Xilinx FFT IP for various configurations 2024-12-17 22:13:42 +01:00
Wade Fife
0d3d69493a 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.
2024-12-17 22:13:42 +01:00
Wade Fife
c2b8eb4a88 fpga: rfnoc: Add SV packages for use with RFNoC 2024-12-17 22:13:42 +01:00
Wade Fife
079fbe5283 fpga: lib: Add usrp_utils.svh with common macros 2024-12-17 22:13:42 +01:00
Wade Fife
76074ecb31 fpga: lib: Cleanup axi_demux module
- Add documentation
- Add generate block labels
- Remove tabs and fix indentation
- Separate the code into three logical sections
2024-12-17 22:13:42 +01:00
Wade Fife
abe1d27c07 fpga: ci: Output JUnit XML for testbench run
Co-authored-by: Jörg Hofrichter <joerg.hofrichter@emerson.com>
2024-12-11 09:08:11 +01:00
Wade Fife
f1ef9ada68 fpga: tools: Add JUnit XML support to run_testbenches
Co-authored-by: Jörg Hofrichter <joerg.hofrichter@emerson.com>
2024-12-11 09:08:11 +01:00
Wade Fife
381ecf8578 fpga: tools: Add --ignore-warnings to repeat_fpga_build 2024-11-27 19:35:33 -06:00
Joerg Hofrichter
0a635d0d11 fpga: x4xx: assemble x410/x440-version-info.dtsi in BUILD_DIR 2024-11-22 08:00:03 +01:00
Max Köhler
a9add0a6a5 fpga: x400: add rf core ctrlport 2024-11-12 15:57:36 -06:00
Joerg Hofrichter
601503e5fa ci: fpga: make changeset analyzer verbose 2024-11-11 08:21:53 +01:00
Joerg Hofrichter
aaa13b81db ci: fpga: Adapted changeset to include RFNoC core BSP files
... which are located at host/include/uhd/rfnoc/core
2024-11-11 08:21:53 +01:00
Martin Braun
53b4d7a210 image builder: Use RADIO_NIPC parameter
This simplifies image core files by generating a RADIO_NIPC parameter
for the X410, X440 and E31x BSP files. The IO port widths for X410 are
now dynamically widened based on the NIPC value, which is a function of
the RF_BW parameter, and cannot be modified.

The radio block can now read the NIPC value from the BSP, and populate
its spc parameter dynamically. This avoids having to know the right spc
value when writing YAML image core files and reduces redundancy.

This also removes the RADIO_NIPC parameter entirely from all the image
core files. This parameter was fine, but it was a bit confusing because
it referenced a Verilog parameter, which you just had to know was there
in the generated Verilog. By referencing the BSP parameter instead, the
YAML files (BSP, radio.yml, and image core file) are now self-contained
regarding the RADIO_NIPC/spc information.

As a minor upside, the input wire widths for X410's and N310's
rfnoc_image_core.sv module are now generated with the correct widths,
and not, as before, with the worst-case width (and then we assume Vivado
will do the right thing).
2024-11-05 15:30:50 +01:00
Max Köhler
77bf8a9d81 fpga: ci: move patches to IT owned share 2024-10-18 10:18:50 +02:00
Martin Braun
eab6e8c7dd ci: fpga: Require requests requisition
The changeset analyzer script requires `requests` to run, so we make
sure it is installed before running the script.
2024-10-17 13:23:53 -05:00
Wade Fife
9998279986 fpga: tools: Add do file for ModelSim 2024-10-08 18:15:52 -05:00
Wade Fife
8ca609f851 fpga: ci: Specify Vivado path for FPGA build 2024-10-07 11:04:13 -05:00
Wade Fife
b6ce5671f8 fpga: tools: Add parallel FPGA build support
Add parallel FPGA build support to repeat_fpga_build.py.
2024-10-07 11:04:13 -05:00
Max Köhler
aa10241c7f fpga: tools: add diamond build sanity checks 2024-09-24 10:24:29 -05:00
Wade Fife
d6ba2dfb5c Fix instances of sim preamble 2024-09-17 08:43:22 -05:00
Joerg Hofrichter
d40db57f2e fpga: e31x/e320/n3xx/x400: Rework device tree file generation
... to support custom image core name, example:

    rfnoc_image_builder -y n310_rfnoc_image_core.yml -n my_custom_name

The device tree source files were renamed to match the target
name used in the Makefile.

    example:
        old: dts/usrp_n310_fpga_hg.dts
        new: dts/N310_HG.dts

The source file is used to compile the final .dts file in the BUILD_DIR.

    example: build-my_custom_name/N310_HG.dts

The final .dts file is copied to the BUILD_OUTPUT_DIR as part of the
post build steps and renamed to the custom image core name.

    example: build/my_custom_name.dts

This completes the change that was introduced with commit 2afc66f132.
2024-09-13 08:44:30 -05:00
mkoop
4c673d8004 ci: fpga: Adapted changeset analyzer rules to folder name change
Adapted changeset analyzer rules change 99865b1, which renamed the
folder host/python/uhd/imgbuilder to host/python/uhd/rfnoc_utils.
This change was made in the "RFNoC OOT overhaul + rfnoc_modtool"
changeset.
2024-09-11 08:54:15 +02:00
Max Köhler
97d108b6f9 fpga: x400: use parameter for RFDC info in RF core full 2024-09-09 10:18:59 -05:00
Wade Fife
00d882455d fpga: ci: Fix target_name for X3xx and X4xx 2024-09-09 10:15:26 -05:00
Wade Fife
26553e3069 fpga: Remove build-usrp dirs when cleaning builds 2024-09-09 10:12:30 -05:00
Wade Fife
2afc66f132 fpga: x400: Make DTS output match bitstream name 2024-09-09 10:12:30 -05:00
Wade Fife
0de3eb63bb fpga: Put dependencies first in Makefile SRCS list 2024-09-06 17:58:33 -05:00
Max Köhler
7e457a190c fpga: x400: add register in 100G Eth TX path for timing 2024-08-30 13:23:29 -05:00
Max Köhler
f407c1cc11 fpga: x440: fix conditional timing constraints 2024-08-27 17:22:35 -05:00
Javier Valenzuela
46216c57d9 fpga: ci: forward intermediate file control 2024-08-27 16:03:12 -05:00
Javier Valenzuela
94d66664d6 fpga: ci: x300: fix default artifact name 2024-08-27 16:03:12 -05:00
Grant Meyerhoff
32efa102ce fpga: x440: correct crossbar replay port comments
Not a functional change. The comments for the replay block in the
crossbar_routes reflect a single replay block, but the FPGA image
actually has two replay blocks with half the number of ports as the
single block design.
2024-08-27 16:01:25 -05:00
Max Köhler
40bd20d240 fpga: x440: refactor rf_core_full to use parameters on ports 2024-08-21 08:06:41 -05:00
Max Köhler
2a2dbad7ab fpga: ci: always export build artifact directory variable 2024-08-16 09:13:58 +02:00
Marian Koop
fe33578b4e [fpga] [ci] Ensure imgbuilder changes trigger PR fpga pilepine builds.
Extended changeset_build_list to force triggering fpga builds when
rfnoc_image_builder sources got modified.
2024-08-13 13:40:47 +02:00
Javier Valenzuela
ee87907709 fpga: ci: Remove unused parameters 2024-07-17 18:30:25 -05:00
Martin Braun
6e99452ae0 docs: Update FPGA build instructions regarding image builder 2024-07-17 11:43:41 +02:00
Marian Koop
465694f48c ci: imgbuilder: Trigger fpga pipelines on rfnoc_image_builder changes 2024-07-11 15:29:53 +02:00
Max Köhler
eb5fe85748 fpga: ci: remove color coding from FPGA bitfile name 2024-07-11 15:29:53 +02:00
Martin Braun
52860eeb67 fpga: Fix warnings from building N3xx AA images
These bitfiles use four-port DRAM FIFOs and only connect two of those
ports. We skip the warnings as that is the intended build behaviour.
2024-06-27 13:21:03 +02:00
Martin Braun
6758966a5a image builder: Allow missing connections
The image builder will currently emit a warning if a NoC-block has
unconnected ports. This requires specifying `-W` to continue building,
which is the intended behaviour.

However, there are cases where there are legitimate reasons to not
connect a block, e.g., in the X310, where the radio block has 2x2 ports,
but we only connect 2 RX ports, and 1 TX port.

This adds a way to declare a "null" connection, which makes it explicit
in the image core YAML that a connection was deliberately omitted. Such
connections are created by connecting to a port called "_none_", e.g.:

```
connections:
  - { srcblk: _device_,  srcport: _none_, dstblk: radio0, dstport: in_1 }
```

The block name is irrelevant, but the schema requires providing a block
name.

This commit also amends the x3xx_radio_base.yml to avoid warnings when
building X3x0 bitfiles.
2024-06-26 15:08:39 +02:00
Max Köhler
f7efcbf5b3 fpga: ci: centralizing common setup steps and add nuget clean task 2024-06-26 09:07:30 +02:00
Martin Braun
1ba6fdaf9c fpga: rfnoc: Harmonize x410_X4_400_rfnoc_image_core.yml
This file was repeating entries from x410_radio_base.yml, which none of
the other x410 image core YAML files do.
2024-06-25 17:19:51 +02:00
Max Köhler
7acd179537 fpga: ci: switching to latest hwtools version 2024-06-24 17:45:17 +02:00
Wade Fife
d0a6c2b3a4 fpga: ci: Run pipelines when simulations change 2024-06-20 11:35:27 +02:00
Wade Fife
72295360e6 fpga: sim: Initialize test_status
Initialize test_status for backwards compatability with testbenches
that don't call start_tb().
2024-06-20 11:35:27 +02:00
Ryan Volz
a57c162a0d 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>
2024-06-11 10:20:08 +02:00
Martin Braun
94b4de39d6 image builder: Add --build-ip-dir option
Co-authored-by: Wade Fife <wade.fife@ni.com>
2024-06-11 10:20:08 +02:00
Wade Fife
6abfd8a49a fpga: tools: Force write when saving Vivado project file 2024-06-11 10:20:08 +02:00
Wade Fife
2ff91bcfc0 fpga: tools: Add --fpga-dir to repeat_fpga_build 2024-06-11 10:20:08 +02:00
Martin Braun
50e07a5b42 ci: Update FPGA CI pipelines to match new image builder
- Removes target names for X3x0 and X4x0 builds (these are now encoded
  in the YAML file)
- Change the image core YAML file names referenced in the pipeline YAMLs
  to match the contents of fpga/usrp3/top/x?00/*.yml
- Remove X410_XG_100 image since it is not a shipping image
- Add image_core_name arguments for all E320, E31x, N3xx targets
2024-06-11 10:20:08 +02:00
Martin Braun
28b994406d fpga: Align build process for all targets
- All RFNoC capable targets now require rfnoc_image_builder to be built
- `make help` is updated for all targets to provide more useful and
  up-to-date information
- The FPGA manual is also updated
- All checked-in build artifacts are now removed from git
- axi_ram_fifo.yml is updated to provide include path information
  (required for building N3xx BIST images, which use this)
2024-06-11 10:20:08 +02:00
Martin Braun
ad5f97f828 fpga/mpm: x4xx: Add device DNA read capability
- Bumps FPGA compat from 8.2 to 8.3
- Adds three global motherboard registers to read the 96-bit device DNA
- MPM is updated to read these registers and update the device_info if
  compat version 8.3 is available
2024-06-11 10:20:07 +02:00
Jonathon Pendlum
c352536264 fpga: x400: Add PPS interface to X410/X440 BSP
This creates an IO port `pps` for X410, and two IO ports (`pps0`, `pps1`)
for X440 which allows modules inside the RFNoC image core to access the
FPGA. Note that accessing the PPS signal is generally not required for
RFNoC blocks which require access to timing.

Co-authored-by: Martin Braun <martin.braun@ettus.com>
2024-06-11 10:20:07 +02:00
Martin Braun
14f487f165 x300: Add support for reading device DNA 2024-06-11 10:20:07 +02:00
Javier Valenzuela
789fa8f657 fpga: x400: Add netlist make flow 2024-06-11 10:20:07 +02:00
Martin Braun
badb235606 fpga: Add passthru CHDR/DMA transport adapter module 2024-06-11 10:20:07 +02:00
Wade Fife
34cee97e62 fpga: x4xx: Replace Ethernet transport adapter 2024-06-11 10:20:07 +02:00
Martin Braun
a98ce2621e 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>
2024-06-11 10:20:07 +02:00
Martin Braun
5dad6c370f fpga/rfnoc: Add license checker block 2024-05-27 17:05:06 +02:00
Martin Braun
8ed8927b94 fpga: Add license checker module 2024-05-27 17:05:06 +02:00
Martin Braun
c43c72db09 fpga: Add cores for SHA256
Cores originate from https://github.com/secworks/sha256.
2024-05-27 17:05:06 +02:00
Martin Braun
878cfcf48f 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
2024-05-27 17:05:06 +02:00
Martin Braun
43856f90da 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.
2024-05-27 17:05:06 +02:00
Max Köhler
02c1c06f70 fpga: x400: zbx: Set Locale for ZBX Lattice build 2024-05-21 20:37:52 -05:00
Max Köhler
041eef3472 fpga: tools: Fix VHDL and Verilog types in modify_bdtcl 2024-05-18 21:29:35 -05:00
Wade Fife
c6561226d8 fpga: sim: Fix cast in PkgRandom 2024-05-16 09:30:05 -05:00
Wade Fife
19a6ad3073 fpga: sim: Fix test_status indices in PkgTestExec 2024-05-16 09:29:37 -05:00
Wade Fife
1e4e830241 fpga: ci: Clean out rfnoc_image_builder install 2024-05-03 08:27:20 -05:00
Wade Fife
fb2c361ae4 fpga: ci: Fix image core for X410_UC_200 image 2024-05-02 14:36:28 -05:00
Max Köhler
ea164a936b fpga: rfnoc: reverse FIR filter coefficients to get embedded in DSPE48 2024-04-26 15:19:23 -05:00
Max Köhler
6c25d54c34 fpga: x400: Place SPI into IOB on X440
Placing the SPI registers into the IOB makes timing closure more
reliable.
2024-04-09 17:12:44 -05:00
Wade Fife
44e7651fee fpga: tools: Fix VIVADO_PROJECT variable 2024-04-02 22:48:02 -05:00
Wade Fife
58fb72a82d fpga: Add option to specify build output directory 2024-03-15 20:08:15 -05:00
Wade Fife
adcca0acd9 fpga: Add option to build IP only 2024-03-15 20:07:28 -05:00
Wade Fife
2e0db35eaf fpga: Add Vivado project option to USRP FPGA builds 2024-03-15 20:05:39 -05:00
Wade Fife
8f9beccebe fpga: tools: Add option to save Vivado project 2024-03-15 20:05:39 -05:00
Wade Fife
873a3a8ed9 fpga: ci: Update n3xx BIST image cores 2024-03-15 00:32:53 -05:00
Wade Fife
e7167fd044 fpga: utils: Use default image core name 2024-03-15 00:32:53 -05:00
Wade Fife
aae712c2ea fpga: n3xx: Rename BIST image cores
Rename the BIST image cores to match the default image core names. This
eliminates the need to provide special arguments to build these images.
2024-03-15 00:32:53 -05:00
Javier Valenzuela
394d72a5e7 fpga: ci: Fix release pipeline triggers 2024-03-15 00:32:53 -05:00
Wade Fife
4b63ca0089 fpga: Add incremental to strategies for e3xx, n3xx, x3xx 2024-03-14 16:35:11 -05:00
Javier Valenzuela
d4412b0022 fpga: Update x3xx/e3xx RFNoC image core files 2024-03-13 21:35:39 -05:00
Javier Valenzuela
08031bed9e fpga: ci: trigger fpga builds based on changeset 2024-03-13 21:35:39 -05:00
Max Köhler
3422210550 fpga: tools: Fix -quiet in modify_bdtcl 2024-03-13 21:30:52 -05:00
Francisco Salomon
3a04db78e4 fpga: rfnoc: Add EOB to source port of null_src_sink block 2024-03-12 16:05:39 -05:00
Max Köhler
4c56b1b55f fpga: x4xx: add option for incremental Vivado build
So far only the implementation after opt_run is affected by the changes.
2024-03-12 16:03:23 -05:00
Max Köhler
1e8521f52e fpga: tools: viv_ip_utils to update hdl_sources.tcl 2024-03-08 08:23:49 -06:00
Max Köhler
fa8559bb0f fpga: x400: zbx: Improve Lattice make flow 2024-03-05 20:07:50 -06:00
Martin Braun
c266d1f810 ci: Use rfnoc_image_builder in FPGA pipelines
- This adds a step to install rfnoc_image_builder before doing X4x0
  builds
- This is now required by repeat_fpga_build.py
2024-02-25 16:54:12 -06:00
Martin Braun
09f3453f39 fpga: Update tooling to use image builder instead of make
This modifies repeat_fpga_build.py such that it can take a YAML file as
input, not just a make target. It will then use the image builder to
prepare the build and generate a valid make command, which in turn is
used to build FPGA images repeatedly.
2024-02-25 16:54:12 -06:00
Martin Braun
1fd8cbd5b2 fpga: ci: Drop fetchDepth to 1 2024-02-25 16:54:12 -06:00
David Raeman
76e004db07 n3xx: Add comments on clock_source=external,time_source=gpsdo
It is, in principle, possible to use an external clock to synchronize
N3x0 devices in frequency, and then use a GPSDO for a coarse time
synchronization. This use case is deliberately not supported, as the
GPSDO PPS signal and the external clock signal are by definition not
matched, which will remove any guarantees on time/phase alignment.

Because there are certain, niche use cases where the lack of phase
alignment is acceptable, but only an external clock is available (no
shared external PPS), usage of GPS for generating a PPS signal may be
fine. This patch does not enable the usage of this combination out of
the box, but adds comments and an update to the manual to explain the
risks of this combination, and how to enable it (by patching MPM).
2024-02-21 06:40:57 -06:00
Martin Braun
4861318d3b fpga: utils: Add update_image_cores.sh
This utility will regenerate all the image core .v files from the
available YAML files. It won't rebuild bitfiles.
2024-02-15 10:18:34 -06:00
Wade Fife
5559876c26 fpga: docs: Bump minimum Python version to 3.6 2024-01-11 00:10:00 -06:00
Wade Fife
935dde5606 fpga: x400: Update PS DRAM speed bin
Change DRAM speed grade from 075E to 075.
2024-01-08 11:52:50 -06:00
Martin Braun
065c5394b7 fpga: x300: Remove irrelevant critical warning 2024-01-04 10:24:05 -06:00
Martin Braun
e8084eb4cb fpga: x300: sfpp: Fix warning about duplicate reg
This removes a duplicate code section that causes build warnings. It
also references a wire that gets declared further down and the removed
and remaining code sections were incorrectly indented.
2024-01-04 10:24:05 -06:00
Martin Braun
7789c136fb fpga: tools: Spruce up launch_vivado.py
- We add documentation for the dev_config.json file
- Fix Pylint issues
2023-12-13 17:28:09 -06:00
Martin Braun
0465be974d fpga: Add more spurious files to gitignore 2023-12-13 17:28:09 -06:00
Martin Braun
fd15a053bc fpga: x410: Add dev_config.json 2023-12-13 17:28:09 -06:00
Martin Braun
1944263412 fpga: Remove dupes from DESIGN_SRCS
In the build Makefiles, this adds a function (uniq) which removes
duplicate entries from lists. We apply this to the DESIGN_SRCS passed
to the Vivado build process. This eliminates some warnings from
duplicate source files caused by redundantly referencing source files in
the Makefiles, possibly because they are listed in more than one source
file variable.
2023-12-13 17:28:09 -06:00
Wade Fife
27459fd327 fpga: ci: Change agent pool 2023-12-11 14:36:42 -06:00
Martin Braun
356cd172bb fpga: Replace references to python -> python3
In several cases, we call `python` explicitly. On many modern operating
systems (e.g., Ubuntu 22.04), this command no longer exists, and if it
does, it's often an alias to python3.

Because the python3 executable has been around for so long, simply
using that directly (instead of, e.g., autodetecting the OS preferences)
is a simple fix that immediately allows building bitfiles, e.g. for the
B2xx series, on more recent OSes.
2023-12-05 15:43:08 -06:00