Commit Graph

625 Commits

Author SHA1 Message Date
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