41 Commits
Author SHA1 Message Date
Wade Fife c499cad53d 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)


Original-commit: 81ccd8cb5154e85636cddd86c466daffb4ab4ebe
2025-03-14 08:03:34 +01:00
Wade Fife ef9b86ec03 fpga: tools: Fix CSV reporting in run_testbenches.py
Original-commit: 1c719bc0a6ff8ceba7da74ee42bcceb43d164d2b
2025-03-07 12:40:20 +01:00
Wade Fife 7566014c96 fpga: tools: Reformat run_testbenches.py
Original-commit: 0593f3c8e052f83e89d6269e952681fb83ef30df
2025-03-07 12:40:20 +01:00
Martin Braun 1a3bdccd51 Revert "Get rid of unnecessary bash wrappers in subprocesses.Popen"
This reverts commit e572bab3ee5aa40f57bdc6e11d6381cad1d1401a.

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.


Original-commit: 888850d6417c93f561e0555c693e3f11e9f40856
2025-02-20 10:24:16 +01:00
Frederik Pfautsch 8aefaa7582 Get rid of unnecessary bash wrappers in subprocesses.Popen
Signed-off-by: Frederik Pfautsch <frederik.pfautsch@missinglinkelectronics.com>


Original-commit: e572bab3ee5aa40f57bdc6e11d6381cad1d1401a
2025-02-03 21:51:38 +01:00
Max Köhler 8d46198250 fpga: tools: Add --build-dir to repeat_fpga_build
Original-commit: 1d1c889c15b407c2dcc5c509e3dab59aa45320e8
2025-01-27 15:32:22 -06:00
Wade FifeandJörg Hofrichter 965c13e861 fpga: tools: Add JUnit XML support to run_testbenches
Co-authored-by: Jörg Hofrichter <joerg.hofrichter@emerson.com>


Original-commit: f1ef9ada680dd6e8ca600d3c01551b0d1b6f52a5
2024-12-11 09:08:11 +01:00
Wade Fife 5a9d9a1eb2 fpga: tools: Add --ignore-warnings to repeat_fpga_build
Original-commit: 381ecf857852a5184402b20d82d8b19f2188f434
2024-11-27 19:35:33 -06:00
Wade Fife 775f1330bc fpga: tools: Add parallel FPGA build support
Add parallel FPGA build support to repeat_fpga_build.py.


Original-commit: b6ce5671f89cd10107b0f83524c4fd86a0a358b6
2024-10-07 11:04:13 -05:00
Max Köhler 08f8b269fa fpga: ci: remove color coding from FPGA bitfile name
Original-commit: eb5fe85748996675f2ec73e1f10857ba81e66c56
2024-07-11 15:29:53 +02:00
Wade Fife 8685870bf4 fpga: tools: Add --fpga-dir to repeat_fpga_build
Original-commit: 2ff91bcfc057d6d632c6a151ce2aed71d1103e91
2024-06-11 10:20:08 +02:00
Martin Braun 8d0cc11269 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


Original-commit: 50e07a5b42d4a244c12b5a13b51048573d0069ec
2024-06-11 10:20:08 +02:00
Wade Fife 872de917bf fpga: x4xx: Replace Ethernet transport adapter
Original-commit: 34cee97e6206151e80d33e0e5367dcac62038a67
2024-06-11 10:20:07 +02:00
Wade Fife 5c23c71e44 fpga: utils: Use default image core name
Original-commit: e7167fd0448f65c07b4a061e2bb1678ce2d06031
2024-03-15 00:32:53 -05:00
Martin Braun e2c442ab8c 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.


Original-commit: 09f3453f39363870f1c03ef1c917a0dedb7598df
2024-02-25 16:54:12 -06:00
Martin Braun f4e2c89e4c 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.


Original-commit: 4861318d3bdccd8d1baa627a8473eb34f76583b1
2024-02-15 10:18:34 -06:00
Martin Braun ce0ddc6dac 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.


Original-commit: 356cd172bb5ae0d043825bd1f4dffbd6646ec3d2
2023-12-05 15:43:08 -06:00
Wade Fife 02f2a821f9 fpga: tools: Add X440_X4_200 to X440 package
Original-commit: 4d8f9f1818f25a5baed749bab416b5bf8357ebd8
2023-10-25 09:44:29 -05:00
5cadf901c7 fpga: Add X440/FBX support
Co-authored-by: Martin Braun <martin.braun@ettus.com>
Co-authored-by: Wade Fife <wade.fife@ni.com>
Co-authored-by: Ryan Marlow <ryan@lmarlow.com>


Original-commit: 596760a12e4834e47589c12f8a4fd083aa2f7c25
2023-06-12 10:27:29 -05:00
Wade Fife a08d0c4bd5 fpga: tools: Add X410_UC_200 image to X410 package
Original-commit: fb16ec77dc36e6d24b6ada6d7f9ec0484499b0ce
2023-02-24 08:07:17 -06:00
Wade Fife c525cba09c fpga: tools: Add repeat_fpga_build.py
This script allows you to repeatedly run an FPGA build until it
successfully meets timing.


Original-commit: f72e8daeecf7dff92dce47be0b956699b5e40a16
2023-02-07 23:04:12 -06:00
Wade Fife f9d20d2a7f fpga: tools: Fix error detection in run_testbenches.py
This fixes recognition of $error and $fatal statements in the output of
XSim when running run_testbenches.py. XSim apparently prints a "shift
in" character (0x15) as part of its error statements, so the regular
expression was not matching.


Original-commit: ee36d7fabcf73f773edae00fbb1604a600db992d
2023-01-09 15:40:17 -06:00
Wade Fife 82739c1dae fpga: lib: Add eth_ipv4_interface_tb
Original-commit: 4f9a71f12204728446723f171d4cf0edcbf5027a
2022-08-29 17:01:45 -05:00
Virendra Kakade c7938de574 REVERT images: zbx lattice cpld image manifest
Signed-off-by: Virendra Kakade <virendra.kakade@ni.com>


Original-commit: e7c2035df2ead4939a585e649675e895562cf917
2022-05-16 06:18:09 -07:00
Humberto Jimenez e6a3c9598b fpga: tools: Add CG_400 image to X410 binaries package
Original-commit: cb1c7ec47ec69523968724b776b73c8299add478
2022-03-15 08:49:25 -05:00
Martin Braun d706b50681 images: Remove references to N230
USRP N230 is no longer supported starting with UHD 4, and thus, we can
remove it from the image manifest. This will no longer download N230
images when calling uhd_images_downloader from UHD 4.


Original-commit: f1f6d8eac52bfecd840ace95c2d357641ae3b09c
2022-02-15 14:07:53 -06:00
Martin Braun 43128791b4 images: Add utilization report files to B2xx image files
Original-commit: ac286920f0d4f3b7b26ea3cfc7a9e11ae10346d1
2022-02-10 11:35:47 -07:00
Martin Braun 979d9ef53a images: Add the utilization report for X410 images (X4_200)
Original-commit: 52c459acbcd020f40c208504c8604c59d18d836d
2021-12-17 09:34:20 -06:00
Humberto Jimenez 4082066a6f fpga: x400: Refactor CPLDs build process
This commit refactors the X410's CPLDs build process to make it similar to other
FPGA targets within the repo. The new process relies on basic Quartus build
utilities.
Additionally, this commit adds support for an alternative MAX10 CPLD for the
motherboard CPLD implementation. Both previous (10M04) and new variant
(10M08) are supported concurrently. The images package mapping is updated to
reflect these changes.


Original-commit: e1ce4565dbc7336ee806adce7c087bda4fcc77ae
2021-12-01 10:51:07 -06:00
Wade Fife 162632e7c1 fpga: x400: Add makefiles for RF testbenches
Original-commit: 319d8c6411f62a2150b21b38bfe5fd55366ee700
2021-06-17 08:16:59 -05:00
Wade Fife 99a4250c0b fpga: tools: Add modelsim.excludes
This is a list of testbenches that don't work with ModelSim and should
be excluded when running run_testbenches.py.


Original-commit: 6190eca14ec13db7456a059cbd69c93550aa45c7
2021-06-17 08:16:59 -05:00
Wade Fife 1586d6c730 fpga: tools: Add features to run_testbenches.py
Run "make ip" in a separate step for each testbench. This allows some
testbenches to work better with ModelSim because it needs IP files that
aren't known until after the IP is generated.

Make run_testbenches.py more log friendly. Add a -l/--logged option for
when the output is being logged. In this case, we don't want to display
elapsed time every second.

Add "Begin TB Log:" and "End TB Log:" to the output to more easily tell
where the output from one testbench ends and another begins.

Use the basedir argument as the base directory in which to search for
testbenches so that a subset of the repo can be easily specified.


Original-commit: 5a4f0470919440819ab71f44fbc6f5f89a671e41
2021-06-17 08:16:59 -05:00
Humberto Jimenez fd8c814f6f fpga: tools: Add X410 support for image packaging
Original-commit: 3398ab4cab84dfd950b4177cd3d48b692e50a628
2021-06-10 11:56:58 -05:00
61782b02d7 fpga: x400: Add support for X410 motherboard FPGA
Co-authored-by: Andrew Moch <Andrew.Moch@ni.com>
Co-authored-by: Daniel Jepson <daniel.jepson@ni.com>
Co-authored-by: Javier Valenzuela <javier.valenzuela@ni.com>
Co-authored-by: Joerg Hofrichter <joerg.hofrichter@ni.com>
Co-authored-by: Kumaran Subramoniam <kumaran.subramoniam@ni.com>
Co-authored-by: Max Köhler <max.koehler@ni.com>
Co-authored-by: Michael Auchter <michael.auchter@ni.com>
Co-authored-by: Paul Butler <paul.butler@ni.com>
Co-authored-by: Wade Fife <wade.fife@ettus.com>
Co-authored-by: Hector Rubio <hrubio@ni.com>


Original-commit: 6d3765605262016a80f71e36357f749ea35cbe5a
2021-06-10 11:56:58 -05:00
Martin Braun ec4fab0340 fpga: Remove Python2 support from build system
- 2to3 was used to convert the Python scripts, except where the tool
  choked and manual intervention was required
- All references to "python" where replaced with "python3"
- buffer() was replaced by memoryview()


Original-commit: ca68195b5d12c5410cfac8d459a0b0902c4c72c7
2021-01-04 13:28:36 -06:00
Aaron Rossetto 281efa74f1 fpga: Added AA image mappings to N320
Original-commit: 7e2fa6feb642b0970eafc68a0451ec4cde782106
2020-09-03 15:46:01 -05:00
Wade Fife 09461da1f5 fpga: rfnoc: Remove deprecated files
Original-commit: db0d2dddcc5d8e39e2b7843a326ad9392bbb4c3f
2020-08-23 13:52:26 -05:00
Andrew Moch 05eb1bc2f1 fpga: lib: Add width agnostic version of Ethernet Interface
The rnfoc/xport section is refactored in System Verilog to allow the
following improvements
(1) CPU_W - Sets the size of the c2e and e2c pipes.  This can be run
    at a different clock rate than the main ethernet pipe
(2) CHDR_W - Sets the size of the v2e and e2v pipes. This can be run
    at a different clock rate than the main ethernet pipe
(3) ENET_W - Sets the size of the eth_tx and eth_rx pipes.

eth_interface_tb runs traffic from e2c,e2v,v2e,c2e simultaneously
against the original xport_sv implementation, and against the new
implementation with widths of 64/128/512. A chdr_management node
info request queries the port info of the node0 in the eth_interface.

eth_ifc_synth_test.sv can be compiled with the make xsim target to test
out the size of various configurations.


Original-commit: eed4988cc266a63370a4332351d02fadedde3a3b
2020-06-30 10:29:35 -05:00
Andrew Moch 23be04661f fpga: lib: Add synthesizable AXI4-Stream SV components
Components are connected together with AxiStreamIfc. Some features
include:
  (1) Add bytes to the start of a packet
  (2) Remove bytes from a packet
  (3) Wrappers for some older components
      a.  fifo - buffer but imediately pass a packet
      b.  packet_gate - buffer and hold till end of packet
      c.  width_conv - cross clock domains and change width of axi bus

The AxiStreamIf was moved from PkgAxiStreamBfm to its own file. It can
be used to connect to ports with continuous assignment.
AxiStreamPacketIf must be used procedurally but allows the following
new methods:
  - reached_packet_byte - notify when tdata contains a paritcular byte
  - get_packet_byte/get_packet_field - extract a byte or field from axi
  - put_packet_byte/put_packet_field - overwrite a byte or field onto axi


Original-commit: c3bca6c87700054c96320de119a58f6a688dbd5a
2020-06-25 14:44:04 -05:00
Wade Fife 67e76118d6 fpga: tools: Add ModelSim to run_testbenches.py
This adds the "modelsim" simulator option to run_testbenches.py to allow
for regression testing of the native ModelSim simulation target.


Original-commit: 39d6007ca7e3b27e8230db6690faa7469ca62cb2
2020-03-23 18:01:53 -05:00
+18 6b67702ad7 Merge FPGA repository back into UHD repository
The FPGA codebase was removed from the UHD repository in 2014 to reduce
the size of the repository. However, over the last half-decade, the
split between the repositories has proven more burdensome than it has
been helpful. By merging the FPGA code back, it will be possible to
create atomic commits that touch both FPGA and UHD codebases. Continuous
integration testing is also simplified by merging the repositories,
because it was previously difficult to automatically derive the correct
UHD branch when testing a feature branch on the FPGA repository.

This commit also updates the license files and paths therein.

We are therefore merging the repositories again. Future development for
FPGA code will happen in the same repository as the UHD host code and
MPM code.

== Original Codebase and Rebasing ==

The original FPGA repository will be hosted for the foreseeable future
at its original local location: https://github.com/EttusResearch/fpga/

It can be used for bisecting, reference, and a more detailed history.

The final commit from said repository to be merged here is
05003794e2da61cabf64dd278c45685a7abad7ec. This commit is tagged as
v4.0.0.0-pre-uhd-merge.

If you have changes in the FPGA repository that you want to rebase onto
the UHD repository, simply run the following commands:

- Create a directory to store patches (this should be an empty
  directory):

    mkdir ~/patches

- Now make sure that your FPGA codebase is based on the same state as
  the code that was merged:

    cd src/fpga # Or wherever your FPGA code is stored
    git rebase v4.0.0.0-pre-uhd-merge

  Note: The rebase command may look slightly different depending on what
  exactly you're trying to rebase.

- Create a patch set for your changes versus v4.0.0.0-pre-uhd-merge:

    git format-patch v4.0.0.0-pre-uhd-merge -o ~/patches

  Note: Make sure that only patches are stored in your output directory.
  It should otherwise be empty. Make sure that you picked the correct
  range of commits, and only commits you wanted to rebase were exported
  as patch files.

- Go to the UHD repository and apply the patches:

    cd src/uhd # Or wherever your UHD repository is stored
    git am --directory fpga ~/patches/*
    rm -rf ~/patches # This is for cleanup

== Contributors ==

The following people have contributed mainly to these files (this list
is not complete):

Co-authored-by: Alex Williams <alex.williams@ni.com>
Co-authored-by: Andrej Rode <andrej.rode@ettus.com>
Co-authored-by: Ashish Chaudhari <ashish@ettus.com>
Co-authored-by: Ben Hilburn <ben.hilburn@ettus.com>
Co-authored-by: Ciro Nishiguchi <ciro.nishiguchi@ni.com>
Co-authored-by: Daniel Jepson <daniel.jepson@ni.com>
Co-authored-by: Derek Kozel <derek.kozel@ettus.com>
Co-authored-by: EJ Kreinar <ej@he360.com>
Co-authored-by: Humberto Jimenez <humberto.jimenez@ni.com>
Co-authored-by: Ian Buckley <ian.buckley@gmail.com>
Co-authored-by: Jörg Hofrichter <joerg.hofrichter@ni.com>
Co-authored-by: Jon Kiser <jon.kiser@ni.com>
Co-authored-by: Josh Blum <josh@joshknows.com>
Co-authored-by: Jonathon Pendlum <jonathan.pendlum@ettus.com>
Co-authored-by: Martin Braun <martin.braun@ettus.com>
Co-authored-by: Matt Ettus <matt@ettus.com>
Co-authored-by: Michael West <michael.west@ettus.com>
Co-authored-by: Moritz Fischer <moritz.fischer@ettus.com>
Co-authored-by: Nick Foster <nick@ettus.com>
Co-authored-by: Nicolas Cuervo <nicolas.cuervo@ettus.com>
Co-authored-by: Paul Butler <paul.butler@ni.com>
Co-authored-by: Paul David <paul.david@ettus.com>
Co-authored-by: Ryan Marlow <ryan.marlow@ettus.com>
Co-authored-by: Sugandha Gupta <sugandha.gupta@ettus.com>
Co-authored-by: Sylvain Munaut <tnt@246tNt.com>
Co-authored-by: Trung Tran <trung.tran@ettus.com>
Co-authored-by: Vidush Vishwanath <vidush.vishwanath@ettus.com>
Co-authored-by: Wade Fife <wade.fife@ettus.com>


Original-commit: bafa9d95453387814ef25e6b6256ba8db2df612f
2020-01-28 09:35:36 -08:00