Commit Graph
377 Commits
Author SHA1 Message Date
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 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 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
michael-west 2c0fea5d1e fpga: Update copyright
Update copyright on recently changed files.

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


Original-commit: 92c09f7f766586683ebd67bb3a57005250c4d81d
2023-01-19 15:55:56 -08:00
michael-west a79dc444a3 FPGA: Fix overflows in DDC
Added proper clipping of halfband filter output to handle potential
overflow.

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


Original-commit: b2d4eaa8e59110e39ca691187f66a07953bdd0d2
2023-01-19 10:05:27 -06:00
michael-west b8163da1d1 FPGA: Restore FIR filter in rx_frontend_gen3
The FIR filter applied gain.  Removing it caused incorrect scaling and
signals where every other sample was zero.  Also parameterized heterodyne
frontend processing so it would not use resources in images not
requiring it.

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


Original-commit: c27519624ec0f3a44ac1130635a03dafcf2e7f13
2023-01-19 10:05:27 -06:00
michael-west 740202aa22 FPGA: Fix warnings in dds_freq_tune module
Added missing tuser connections.

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


Original-commit: e3ffef975db464fb8d78f411c6fa0ad71f8e9b41
2023-01-19 10:05:27 -06:00
Larissa Phillip d451d74448 fpga: rfnoc: Add align_samples testbench
Original-commit: f6f1dec85adcea491104b07cf830e06a61feb595
2023-01-12 21:42:13 -06:00
Martin Braun 292d31fc52 x300: Update firmware for TA control
- Bump firmware compat to 6.1
- Remove crossbar counter logic (the FPGA does *not* support crossbar
  counters anymore, so we remove it from the firmware as well)
- Remove crossbar programming control (this is now provided by RFNoC
  management packets)
- Remove UDP framing control (this is also provided by RFNoC management
  packets)
- Remove Ethernet link/activity LED control (this has been handled by
  the FPGA directly for years now)
- Add functionality to program transport adapter. The TA is programmed
  directly on the settings bus, so for the most part, this is already
  possible from the firmware. The only exception is the 'virtual'
  register to program IP address and MAC at the same time. In the
  firmware, it will perform an ARP lookup of the MAC address, and then
  write the "normal" IPv4 address register in the TA, as well as the MAC
  address registers.
- Updated bootram.coe


Original-commit: 89fb75288e151cd1e43af765618c0665e79801f9
2023-01-10 14:19:00 -08:00
Wade Fife 73ef818632 fpga: x300: Bump FPGA compat to 39.1
Original-commit: 2d7c8e0d08ae602a96c8b0105cba406d1707a170
2023-01-10 14:19:00 -08:00
Wade Fife fb4542e9ef fpga: x300: Support advanced transport adapter
Original-commit: adc938c0b6c9b045ad60c8f5297303495a96f0ca
2023-01-10 14:19:00 -08:00
Wade Fife 82321919dd fpga: lib: Add verilog-compatible wrapper for eth_ipv4_chdr_adapter
Original-commit: 100a3f07938ab4746d8cec132ae5d83c0065c4d1
2023-01-10 14:18:59 -08:00
Wade Fife 6c4c231aa5 fpga: lib: Add ZPU support to SV transport adapter
Original-commit: 105d8d1661d76bfe7264798a691b061366c94898
2023-01-10 14:18:59 -08:00
Wade Fife c847bec9e1 fpga: lib: Fix indentation in setting_reg.v
Original-commit: a7050773f206f55de99f36a742df628398e0aae1
2023-01-10 14:18:59 -08:00
Wade Fife 00596d4979 fpga: lib: Update header for AXI4S add/remove bytes
Original-commit: 8af3c0e52df9c3d2585f8579edbf72a7e79fb880
2023-01-10 14:18:59 -08: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 e81f89128f fpga: rfnoc: Add timed sample alignment to radio
This adds time alignment to the radio, so that the first transmitted or
received sample gets shifted into the position corresponding to its
timestamp. The applies only to configurations in which SPC > 1.

For example, if the radio time is incrementing by 4 samples per cycle
(SPC = 4) starting at time 0, and a packet is supposed to be
transmitted at time 201, then the data must be left-shifted by one
sample (201 % 4 = 1), so that the first sample of the packet correctly
aligns with the radio sample corresponding to time 201. Things get more
complicated if the radio time is not a multiple of the SPC (i.e., the
radio time started at time 1, 2, or 3 instead of 0).


Original-commit: 9afa6be7b270047cb03cbd5a16482e5d19edc3dd
2022-12-19 08:57:18 -06:00
Wade Fife a40550497a fpga: lib: Add align_samples module
This module supports timed sample alignment by shifting radio words
with multiple samples per cycle to put the first sample into the
correct position for the required timestamp.


Original-commit: 0a13db4afaaf88dda3bd194bbf20271c690d5c7f
2022-12-19 08:57:18 -06:00
Wade Fife fe014a5a53 fpga: lib: Support time and data updates in sim_radio_gen
Original-commit: 684a9879d35269eb80ea79fc69993570c0147189
2022-12-19 08:57:18 -06:00
Wade Fife df4953a60d fpga: sim: Fix typo in clk_wait_f
Original-commit: cadc906649f438d425926f7fd629857d439c6dca
2022-12-19 08:57:18 -06:00
Martin Braun 4d4b06dfac fpga: Cosmetic changes to rx_frontend_gen3_tb
- Add different signal types
- Default to real/constant
- Minor cleanup


Original-commit: 0624d6c6452fa47c47bb33abc1eb8ef935cfcf1f
2022-12-02 11:42:44 -08:00
Martin Braun 4e2da5912b fpga: Fix overflows in quarterrate downconverter
The 1/4-rate downconverter naively negated the input signals (y = -x)
which doesn't work when the signal is at full scale. In particular,
signals that are at full negative scale get converted to zeros (even
though 2's complement would be to return the same number, although that
would also be incorrect).

This fix changes it such that the smallest negative value gets converted
to the largest positive value.

This is not a mathematical correction inversion, but a minor amplitude
distortion. However, since we're already at full scale, and thus
probably clipping, this is preferable to the incorrect resolution of the
regular inversion. Put differently, there is no better value in this
case.


Original-commit: 8bd982745e6247cf3cf3da52925c65126287428a
2022-12-02 11:42:44 -08:00
Wade Fife ddcc0b1211 fpga: tools: Detect check_timing issues during build
Original-commit: 7f13abe9b48b6aedbbfb726732faa16c305be0ac
2022-11-18 14:53:41 -06:00
Wade Fife f16a4c0996 fpga: lib: Fix inferred latch in ep_autonegotiation
Original-commit: 4a011e8c905d8ae7164ac2671177093a2e215842
2022-11-18 14:53:41 -06:00
Wade Fife 91a99b78d6 fpga: rfnoc: Fix inferred latch in chdr_strip_header
Original-commit: 4c7cd12e8cd0f541d4cd824690c163e4558abd51
2022-11-13 16:47:57 -06:00
Wade Fife 7dc93d0e8c fpga: e320 Change MIG arbitration to RD_PRI_REG
Original-commit: 2a27f72f86e74c569e5ea158a5ca9cde68c41a97
2022-11-08 08:20:48 -06:00
Wade Fife 104ae54542 fpga: x300: Change MIG arbitration to RD_PRI_REG
Original-commit: 27ebd95d29ed457ef032604b034b8326da0a20aa
2022-11-08 08:20:48 -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 6dad16ccab fpga: Fix Vivado version check in viv_hardware_utils
Original-commit: b5f324f1df7ac3a30c7669efa73e58aaf02e1f78
2022-09-08 11:53:44 -05:00
Wade Fife 5bb61528d9 fpga: x300: Cleanup MTU parameters
Original-commit: c781f753d6bbf1d22621fe905287b7842d986177
2022-09-01 14:41:55 -05:00
Wade Fife 1d9a3018db fpga: n3xx: Cleanup MTU parameters
Original-commit: 9e4c8cbbbb8677eecbab66ab01a02375664ad4a2
2022-09-01 14:41:55 -05:00
Wade Fife 521c7684fc fpga: e320: Cleanup MTU parameters
Original-commit: a6a76002ead284815d9337e30c50f590466eb429
2022-09-01 14:41:55 -05:00
Wade Fife 2f677eddda fpga: e31x: Cleanup MTU parameters
Original-commit: 55a1ef7e50d271459f44b98d55860bfb2bbe2d19
2022-09-01 14:41:55 -05:00
Wade Fife 919acb248f fpga: lib: Add MTU parameter to eth_internal
Original-commit: 2745b6c01b75ae4480a38f91b9601c231ce1ea72
2022-09-01 14:41:55 -05:00
Wade Fife 354b59e430 fpga: n3xx: Add PROTOVER to n3xx_mgt_wrapper
Original-commit: 936965c104696b7883674a713d457042eaeb249f
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 92abd3945a fpga: n3xx: Remove unused USE_REPLAY parameter
Original-commit: 244b0a575fce2eb9e489b7f46c6e6cd13ec7a0bd
2022-09-01 14:41:55 -05:00
Wade Fife 82739c1dae fpga: lib: Add eth_ipv4_interface_tb
Original-commit: 4f9a71f12204728446723f171d4cf0edcbf5027a
2022-08-29 17:01:45 -05:00
Wade Fife 2a74e8cd67 fpga: lib: Add RegPort SystemVerilog interface
Original-commit: d628c136a0cca7dddc47711f86f52f2c9e2ca089
2022-08-29 17:01:45 -05:00
Wade Fife c09489b6b0 fpga: sim: Support unused tkeep in AxiStreamPacket::dump_bytes()
Original-commit: 0af84329a7d0f8c97131e14a522a2e0939dbb951
2022-08-29 17:01:45 -05:00
Wade Fife a23ff16c07 fpga: n3xx: Bump FPGA compat to 8.1
Original-commit: 65671437c81fe0395dd2400a1e36bbc5fd934b40
2022-08-29 17:01:45 -05:00
Wade Fife e087a3c12b fpga: e320: Bump FPGA compat to 6.1
Original-commit: 50949d28d47100aea4ebc0563f6c1092a3b9b57e
2022-08-29 17:01:45 -05:00
Wade Fife 20340f7054 fpga: lib: Add compat to Verilog transport adapter
Original-commit: e716c8c720718f69d39823b722f5e013df99a3d5
2022-08-29 17:01:45 -05:00
Wade Fife 5f4d53eacb fpga: e320: Support advanced transport adapter
- Fix NODE_INST
- Fix RFNOC_PROTOVER
- Add option to use SystemVerilog transport adapter for raw UDP


Original-commit: 0114e108af63d9ac785649c8099a042299624943
2022-08-29 17:01:45 -05:00
Wade Fife a270cb29d6 fpga: n3xx: Support advanced transport adapter
- Fix NODE_INST
- Fix RFNOC_PROTOVER
- Add option to use SystemVerilog transport adapter for raw UDP


Original-commit: 693ec2c896306bcba3686385e5861593040d4cbd
2022-08-29 17:01:45 -05:00
Wade Fife 6981891978 fpga: lib: Add verilog-compatible wrapper for eth_ipv4_interface
Original-commit: 7052a4f02bb5cab0a2ee7339af5f1e15da087a7b
2022-08-29 17:01:45 -05:00
Wade Fife 257e5b4db9 fpga: x400: Bump FPGA compat to 7.9
Original-commit: 910dd82599ff192523e04061582cbafb4394e207
2022-08-29 17:01:45 -05:00
Wade FifeandMartin Braun f2b4426b0f fpga: lib: Add advanced features to IPv4 SV transport adapter
This adds several features to the SystemVerilog Eth/IPv4/UDP transport
adaptor including:

- Compat register
- NODE_INST register
- Capabilities register
- KV map access for custom routing on RX data paths
- CHDR header removal for raw payloads to be sent over UDP

Also adds xport_adapter_ctrl.py, which allows controlling the new
registers.

Co-authored-by: Martin Braun <martin.braun@ettus.com>


Original-commit: 3c3da4c62f33d02bb05bcdc38e8929cbf2cdd9a3
2022-08-29 17:01:45 -05:00
Wade Fife cad2f7ba5c fpga: lib: Add support for length in tuser in eth_ipv4_add_udp
Original-commit: 672487634ef817026fad83d48d3c341f80fa4d46
2022-08-29 17:01:45 -05:00
Wade Fife dce09f8fd7 fpga: lib: Add chdr_strip_header module
Original-commit: 4bf988aa3c9aa3885dc30e3da7ea67fcec48c97e
2022-08-29 17:01:45 -05:00