Commit Graph
51 Commits
Author SHA1 Message Date
Martin Braun f07af03214 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).


Original-commit: 53b4d7a21018fe7aabf9f774260aefb41297a41b
2024-11-05 15:30:50 +01:00
Wade Fife e659f0cfdd Fix instances of sim preamble
Original-commit: d6ba2dfb5cb524ba2116cb0c3613af9650e57d03
2024-09-17 08:43:22 -05:00
Joerg Hofrichter e01ce08634 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.


Original-commit: d40db57f2e03c322ac6b0001e0a59d4a14a5a3b9
2024-09-13 08:44:30 -05:00
Wade Fife 4b93935967 fpga: x400: Make DTS output match bitstream name
Original-commit: 2afc66f1325632a4bc0635217feefe666225f4e8
2024-09-09 10:12:30 -05:00
Wade Fife f13f084b15 fpga: Put dependencies first in Makefile SRCS list
Original-commit: 0de3eb63bba518d94058c985d759958caac388d5
2024-09-06 17:58:33 -05:00
Martin Braun 6ef3795e42 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)


Original-commit: 28b994406d4c9547b1e2add62781b6a8162fdb74
2024-06-11 10:20:08 +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
Wade Fife 822d1bd26d fpga: Add option to specify build output directory
Original-commit: 58fb72a82da8bb638dbdfe44d3be84e8382c10a2
2024-03-15 20:08:15 -05:00
Wade Fife 600df8752c fpga: Add option to build IP only
Original-commit: adcca0acd995a75fb2dede4d6a86641821e49e3d
2024-03-15 20:07:28 -05:00
Wade Fife a82a2d122e fpga: Add Vivado project option to USRP FPGA builds
Original-commit: 2e0db35eaf69947c344f67c9f38132e33f88a141
2024-03-15 20:05:39 -05:00
Wade Fife 9b6fc5d501 fpga: Add incremental to strategies for e3xx, n3xx, x3xx
Original-commit: 4b63ca00894944e03e7897f96316ab24cd5411d1
2024-03-14 16:35:11 -05:00
Javier Valenzuela 629266db08 fpga: Update x3xx/e3xx RFNoC image core files
Original-commit: d4412b0022f07f94ccbb3b314ac7b81de1a479b8
2024-03-13 21:35:39 -05:00
Wade Fife 88dd427a98 fpga: Fix RFNoC OOT Makefile inclusion
Original-commit: 4d73b966de307a59fe4b1cf3ad2e584d28f81e63
2023-07-26 15:13:50 -05:00
michael-west e9a6fe4e2e FPGA: Synchronize X300 RX frontends on time change
The frontend synchronization upon time change was removed, but is
required to synchronize the RX frontend modules when sharing LOs on
TwinRX.  This change restores the behavior.

Signed-off-by: michael-west <michael.west@ettus.com>


Original-commit: c70b479007ab9f578577dfb5c2de6660e877d9a3
2023-05-10 14:22:42 -05:00
Wade Fife aeaf219f77 fpga: Update all RFNoC image core files
Original-commit: 0fca5d5ffda1f5f4f7c966c3e5f5200222a5a575
2023-02-24 08:07:17 -06:00
Wade Fife aa9f88602d fpga: Update RFNoC YAML copyright
Original-commit: 69b0989397353560ad804a8d5a5171e481c84c7f
2023-02-22 21:55:02 -06:00
Wade Fife eec959f814 fpga: Add BUILD_BASE_DIR option to makefiles
Adds a BUILD_BASE_DIR makefile variable that allows you to specify the
base directory for FPGA build outputs. This allows you to put the
output from each run of make into a unique directory, or to run
multiple instances of make in parallel with each build's output being
put in a different directory. For example:

make X310_XG BUILD_BASE_DIR=/path/to/builds


Original-commit: bc6db8409ba756bbad0d0c158ffb00c614b58fd9
2023-02-09 07:38:49 -06:00
Wade Fife ab63d78a6c fpga: Add BUILD_SEED variable
Adds a BUILD_SEED make variable that can be set to a 32-bit integer,
and adds an FPGA read-only register initialized by this variable.
Changing this variable will randomly affect the FPGA build results.
This can be useful when your build fails timing by a small amount,
allowing you to build again and get different results with the same
code.

For example, you could run the following to produce an FPGA build with
different timing results from the default build:

make X310_XG BUILD_SEED=123


Original-commit: 3a3a03486f9221c2e59fa6d0826c23d17730956d
2023-02-07 23:04:12 -06:00
Wade Fife 729aa788af fpga: Require AR76780 for X3xx and E3xx
Patch AR76780 was already listed as a requirement for X4xx and N3xx,
but was not listed as a requirement for X3xx and E3xx. This change
makes it required for all Vivado-based USRPs.


Original-commit: 5aa6bc4418a30d6e6fde80b80632f9f9115ea5c4
2022-09-23 15:09:35 -05:00
Wade Fife 2f677eddda fpga: e31x: Cleanup MTU parameters
Original-commit: 55a1ef7e50d271459f44b98d55860bfb2bbe2d19
2022-09-01 14:41:55 -05:00
Wade Fife 21091fb07c fpga: e31x: Add PROTOVER to eth_internal
Original-commit: 4d85a77d5f1a97020a7ad7d06a1ce75d94964309
2022-09-01 14:41:55 -05:00
Wade Fife f010ce051e fpga: Fix target dependencies in Makefile.xxx.inc
Original-commit: e0147fd19347e4e2b2ec1cae193d4c295b9c427b
2022-08-29 07:53:32 -05:00
Wade Fife ea58284d4d fpga: e31x: Fix IP dependencies
- Split SG1 and SG3 IP targets
- Remove non-existent "RFNOC" targets


Original-commit: 8320adbc18455a360d4bd26798d1f435701172b9
2022-08-29 07:53:32 -05:00
Sam O'Brien 0bb7d1dd93 fpga: e31x: Upgrade to Vivado 2021.1
Original-commit: 77f921c7c5d06095af5eb86a209348251edef07d
2022-08-25 13:55:30 -05:00
Wade Fife 81bb2ae28f fpga: Update makefiles to allow parallel FPGA builds
This adds the ability to do IP generation and FPGA builds using the
--jobs (-j) option with Make. For example, rather than generating each
IP one after another, you can generate up to N at a time using N Vivado
instances. This greatly reduces the IP generation time. Similarly,
parallel jobs can be used to easily build different FPGA variants
simultaneously.

Because FPGA builds can consume a lot of memory, care must be taken to
ensure that the number of jobs is not too high for the amount of memory
available.

New IP make targets were added for each USRP so that IP can be built
separately from the FPGA. The IP targets are now a dependency on each
FPGA target.

For example, you can generate the IP for X310 using 4 parallel jobs
using the following command:

  make -j4 X310_IP

Or, build two X310 bitstreams simultaneously:

  make -j2 X310_XG X310_HG


Original-commit: 4b03e237a96ee277eefff257d65b08708c38662c
2022-08-16 10:16:22 -05:00
Wade Fife b8ded164e5 fpga: rfnoc: Remove rfnoc_version from target YAML
This causes the latest RFNoC protocol version to be used by default
and avoids the need to update YAML files every time the RFNoC
protocol version gets bumped.


Original-commit: 92016a585a5223a9a7678134e318e412875b64c2
2022-05-11 12:29:35 -07:00
Wade Fife 16c1235b30 fpga: Update all RFNoC images
Original-commit: 002ff9698e09b94c396736613e493f79e9c56442
2022-03-31 13:51:23 -07:00
Wade Fife b81ab96b12 rfnoc: Update device port names in image core YAML
Update USRP RFNoC iamge core YAML files to use the more consistent
device port names. Clean up the formatting and make the files more
consistent.


Original-commit: 6318eaeff548f760056af7c8172937a296409d25
2022-03-31 13:51:23 -07:00
Wade Fife 61ee0ddec3 fpga: Use PROTOVER and CHDR_W from RFNoC image builder
This updates all RFNoC devices so that they get the RFNoC protocol
version and CHDR width in the same way, from the output generated by
the RFNoC image builder.


Original-commit: 6f038dc2f69b38e715206b2e700fdd3a1bbc638e
2022-03-29 14:45:04 -05:00
Wade Fife 1dd8058c08 fpga: e31x: Update DRAM IP simulation
Update the simulation to use the renamed IP.
Add ModelSim support.


Original-commit: c0015db3ea80117e8c66966e55f337e4fe8d29c2
2022-03-23 08:55:36 -05:00
Wade Fife b2684c42a7 fpga: e31x: Fix DRAM traffic gen IP name
Change name in DRAM IP Makefile from IP_MIG_7SERIES_TG_SRCS to
IP_DDR3_16BIT_TG_SRCS to match the naming of other variables.


Original-commit: febf339e0df412e54cf43a204c280128d8ca1ec3
2022-03-23 08:55:36 -05:00
Wade Fife c322899053 fpga: e31x: Add DRAM support
This adds DRAM support to E31x devices. Due to the size of the DDR3
memory controller, it is not enabled by default. You can include the
memory controller IP in the build by adding the DRAM environment
variable to your build. For example:

DRAM=1 make E310_SG3


Original-commit: 788fef11ef890c6dcee3be495fc381bcf2990d3b
2022-02-10 18:13:44 -07:00
Wade Fife 869861c8cf fpga: Set default part for sim in setupenv.sh
This sets the ARCH and PART_ID environment variables so that the
selected part family is used for simulations by default. This can be
overridden by changing them in the Makefile for the testbench if a
testbench requires a specific part family. Prior to this change, the
default was always ARCH=kintex7, PART_ID=xc7k410t/ffg900/-2, which
required support for that part to be installed.


Original-commit: c176046dff4941bcec27b0b72e5a68264c4808e5
2021-08-30 08:20:10 -05:00
Wade Fife 43e32abd11 fpga: Update rfnoc_image_core for all targets
Update rfnoc_image_core.v to take into account the new image_core_name
fields and version strings. Add new rfnoc_image_core.vh. Update YAML
where needed.


Original-commit: b0033158a4c520063540881451d8daac91e98714
2021-06-10 11:56:58 -05:00
Wade Fife 3b1d62928d fpga: Change RFNoC YAML version numbers to strings
Change version from a numeric to a string, in order to
differentiate between versions like "1.1" and "1.10".


Original-commit: ca21048bd2f832b20bb36763f76d46b861b697a5
2021-06-08 15:48:59 -05:00
Wade Fife e9a85d09ae fpga: e31x: Add OOT sources to Makefile.e31x.inc
Original-commit: e9454b48a19acc72870f61f1656cefd9e29c65ef
2020-11-13 14:01:13 -06:00
Wade Fife f1d3374e50 fpga: e31x: Change image file to e310_rfnoc_image_core
This renames e31x_rfnoc_image_core.* to e310_rfnoc_image_core.*. This
makes the naming consistent with the rest of the build process (which
uses "e310" for all variants of e31x) and fixes an issue in which the
wrong file name was used by rfnoc_image_builder.


Original-commit: bbd43b16e18ef0a0311ddf4635cbd29c4ac3c367
2020-09-09 10:18:34 -07:00
Wade Fife 28955fb9f4 fpga: e31x: Change RFNoC Ctrl clock to 40 MHz
Original-commit: 8622a8013a429674de59cbff522b2722c8afa449
2020-08-19 12:28:22 -05:00
Wade Fife f1380e5f33 fpga: e31x: Fix timeout for timekeeper registers
Fixing an issue in which a very slow radio_clk (due to low sample clock
rate) could cause bus transactions to be issued to the timekeeper
faster than it could service them, resulting in a timeout. This change
replaces RegPort with CtrlPort so that proper flow control can be
maintained to the timekeeper.


Original-commit: 2e910c5307702c3f3efb6dc8cb60f4f71ce11e67
2020-08-19 12:28:22 -05:00
Wade Fife 20b814f62c fpga: e310: Fix device in image core YAML
Device was set to e31x, but this is not a valid device type. All e31x
devices use the e310 device type.


Original-commit: 60b76ebb31f9d1672c1b18367346b3fb522e13e9
2020-08-14 15:11:08 -05:00
RobertWalstab 84a9230183 fpga, mpm: Bump FPGA compat number
Original-commit: 54d698e3707cf1be5d38537db783ebadd850e729
2020-07-24 15:24:14 -05:00
Wade Fife dce6ce8063 fpga: rfnoc: Fix testbenches to run under ModelSim
This updates the makefiles for the testbenches so they can be run using
"make modelsim" without any additional hacks. The "xsim" and "vsim"
simulation targets also still work.


Original-commit: e962cc4a5e51e2326eb656ee2a779ea26774687b
2020-07-20 15:33:22 -05:00
Martin Braun 2f517134cd fpga: e31x: Add gitignore file
Original-commit: dc32aa5cd4fb174ee3c616f854f499a53137aa75
2020-07-18 13:33:42 -05:00
Martin Braun b923e1bb2c e31x: Minor cleanup on top-level e31x.v module
- Fixed some incorrect comments
- Fixed some missing wire declarations for internal NIC
- Fix wire declarations for GPIO (they were declared too late)


Original-commit: b18eaa75de2d1dcba2a1be0ee0b862a57e976cca
2020-07-18 13:33:42 -05:00
RobertWalstab 8ad22c51e3 e31x: Swap out liberio for internal ethernet in the idle image
Original-commit: 74d157c8f67a413239c01fdfc78088623880f28f
2020-07-18 11:52:58 -05:00
RobertWalstab 51841521f8 e31x: fpga: connect device_id
Original-commit: 4d9c4749c1591bf416aacd429eea2a9d5a9bc5e6
2020-07-18 11:52:58 -05:00
RobertWalstab 0361a8fa3b e31x: Swap out liberio for internal Ethernet
Original-commit: 3f823004600472c7f4b173a0da83a3bd53968c40
2020-07-16 10:00:12 -05:00
Wade Fife d16d1e121c fpga: Update RFNOC_EDGE_TBL_FILE for Cygwin
Original-commit: 7f5f771796de590c4ed4bba7b09cda3a906535c6
2020-06-12 15:50:16 -05:00
Wade Fife 72d8f4c8d4 fpga: e31x: Replace symbolic link for Cygwin
Original-commit: ad55f219a4edc694c7adf46a755583dc01184c3c
2020-05-12 13:47:20 -05:00
Wade Fife 2487e7bdf8 fpga: e31x: Update constraints to avoid timing issues
Xilinx changed the way [all_registers -edge_triggered] is treated such
that set_max_delay constraints that use it can cause segmentation and
cause clocks to not be propagated to all endpoints. Changing to
[all_ffs] avoids this potential issue.


Original-commit: 55e422535292c29de00b80f15b0a49ca3fb94f26
2020-04-08 17:24:15 -05:00