Commit Graph
219 Commits
Author SHA1 Message Date
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
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 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
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 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 919acb248f fpga: lib: Add MTU parameter to eth_internal
Original-commit: 2745b6c01b75ae4480a38f91b9601c231ce1ea72
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 20340f7054 fpga: lib: Add compat to Verilog transport adapter
Original-commit: e716c8c720718f69d39823b722f5e013df99a3d5
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 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
Wade Fife 1756797ec2 fpga: lib: Fix NODE_INST parameter in eth_internal
The NODE_INST parameter was set to 0. This adds it as a parameter so
that each transport adapter can have a unique node instance number.


Original-commit: c6bfd2e7f8313d727c2e557958f1b1ac2f674d98
2022-08-29 17:01:45 -05:00
Wade Fife 032b9677aa fpga: lib: Add NET_CHDR_W parameter to transport adapters
The NET_CHDR_W parameter tells the transport adapter what CHDR width
is used in transport packets, such as Ethernet packets. By default the
CHDR width used by the transport and RFNoC core will be the same. The
NET_CHDR_W parameter can be used in situations where the RFNoC core
expects a CHDR width from the transport adapter that is different from
that used over the network. In this situation, the transport adapter
will rewrite the CHDR packets so that each side gets the expected CHDR
width.


Original-commit: a9e49b7c587ef778ee0fe327e8bdcb15e0b0fc95
2022-08-29 17:01:45 -05:00
Wade Fife 3fc345d3ae fpga: sim: Update struct enum initialization
In Vivado 2021.1, it is no longer allowed to use "default: 0" to
initialize an enum within a packed struct. So we must initalize enum
data members explicitly now.


Original-commit: 8007b6b4dff5b64d476b2e3ccb68a777c2f02c8b
2022-08-25 13:55:30 -05:00
Wade Fife dd1e980463 fpga: lib: Fix addsub_hls
Original-commit: f3e28c36a0e37341038370856ab2babd1dff0b3b
2022-08-25 13:55:30 -05:00
Humberto Jimenez b6d9977685 fpga: Use AR76780 patch for fir_compiler
Original-commit: 719cccea7fd6a8a27d6cb96242984240c583a2ee
2022-08-25 13:55:30 -05:00
Sam O'Brien a63c80bd23 fpga: lib: Upgrade to Vivado 2021.1
Original-commit: b0dc0faed1eceef3ba28ce03555658fca2423c46
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
Javier Valenzuela 3d7310687b fpga: lib: Update error call for undefined RW mode
Original-commit: 6eea51a8a2246c4eff291f22fb1624ad73ae6a5c
2022-07-18 13:58:41 -06:00
Aaron Rossetto 314c4926a0 fpga: Add READMEs describing Lattice and ADI IP sourcing
Original-commit: 9bd160663c4da345ee79bef4c2d43b672633f938
2022-07-14 16:26:03 -05:00
Javier Valenzuela 27aae37722 fpga: lib: Add read-only strategy for port B in 2-port RAM
Original-commit: 69c549efab2fd536808f1ba032c278085217ba6d
2022-06-28 16:33:05 -05:00
Wade Fife 287659ddeb fpga: Fix first arg in calls to $fatal()
This fixes warnings regarding the first argument to $fatal(), which is
supposed to be a number indicating what diagnostics to display. 1
corresponds to "Prints simulation time and location".


Original-commit: 58763bdfdaa276155ec6b79a3e5420de17172c7a
2022-06-28 10:34:18 -05:00
michael-west 5309c96f80 rfnoc: Fix test_timed_commands for RFNoC devices
- Added command time to readback of time from Radio block.
- Added wait for time to readback of shared registers in Radio block.

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


Original-commit: 8daa80c05f8006697aea05fea4ac5cd4dabbaef1
2022-04-05 13:18:09 -07:00
michael-west 1c5b744a4d FPGA: Replay block version 1.1
- Add registers to read current record and  play positions.
- Add register to read current space in play command FIFO to allow
  software to avoid overflowing the FIFO.
- Cache base address and size with play command in command FIFO.
- Fix timestamp logic.  Timestamp is only for the first packet of a
  burst.  The increment of 1 for each sample is not accurate because
  it assumed the Replay block was playing at the same rate as the
  Radio, which cannot be assumed.

Maintained backwards compatibility with older API.

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


Original-commit: 1545d3ff05f14b8dd175736b326fe6cae7dc830d
2022-04-01 13:33:08 -07:00
michael-west 29ab52420f fpga: rfnoc: Fix PPS edge detection
Make timekeeper module sample rising edge instead of falling edge of PPS
signal.

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


Original-commit: b6c7e99830f10c21262247cafa3e077fe3f54119
2022-03-09 17:49:38 -06:00
Wade Fife 56e53d271e fpga: rfnoc: Make Replay packet length independent of burst size
Before this change, the packet size output by the Replay block during
playback was limited to length of a full memory burst transaction.
This led to relatively small packets during playback (typically
2 KiB) and had other side effects, such as simultaneous playback from
two different memory locations using different packet sizes because of
differences in memory alignment.

With this change, the configured packet size, as set by the register
REG_PLAY_WORDS_PER_PKT, is used for all packets except the last
packet of playback, which can of course be smaller.


Original-commit: 082a733c326d6332d581d5b7bf9ee86a503ba502
2022-03-09 07:57:21 -06:00
Wade Fife df7fd28589 fgpa: rfnoc: Set Replay memory transactions to 2 KiB
This sets the Replay block's counter width so that memory bursts are
up to 2 KiB. Previously, the counter width was fixed, which meant
that wide memories would require especially large buffers and could
exceed the 4 KiB limit imposed by AXI.


Original-commit: 08d03f881e2767f45ab7fc18c8003c9739b0ffb2
2022-03-09 07:57:21 -06:00
Aaron Rossetto 0ae661c853 fpga: Add SPDX license identifier
Original-commit: 220710b18c1cc57a5c8d9244c8b84277a229363c
2022-03-09 07:25:42 -06:00
Wade Fife 9ddb360199 fpga: rfnoc: Fix strobe probability in radio simulator
Original-commit: 8f68886ee3045abb486bfa8179e7129ebd377580
2022-03-04 18:46:12 -06:00
Wade Fife 6227436d54 fpga: rfnoc: Regenerate noc_shells
Original-commit: 6ff8bd326b0da4d2f9e044a3df3e19b807459d25
2022-03-04 09:42:39 -06:00
Aaron Rossetto b7c900445e fpga: Add SPDX license identifier
Original-commit: c718ce6cd5b84ceaca50fe02f7ad9e95364472cc
2022-02-23 12:24:32 -06:00
Wade Fife 8589361e40 fpga: rfnoc: Change AWIDTH default for axi_ram_fifo
Change AWIDTH to be the same as MEM_ADDR_W by default. Current USRPs
assume the AXI address width is the same as MEM_ADDR_W.


Original-commit: 6936a9ac664cbc312fd17a5ebab9b40069615f7a
2022-02-10 19:46:39 -07:00
Jonathon Pendlum 83ad8e36ba fpga: rfnoc: Add BLANK_OUTPUT to FIR filter block's parameters
Original-commit: 8444f84add04f025b7e24855e0ba79446e615e01
2022-02-10 18:11:41 -07:00
Martin Braun f645d3d613 fpga: Remove noc_shell_regs.vh and sim_rfnoc_lib.svh
Both files are a UHD 3 remnant and potentially confusing for UHD
4 codebase readers.


Original-commit: b29af0ea0d340f37628f65e7b739fa1865d212a9
2022-01-25 14:09:15 -07:00
Javier Valenzuela 4edae39d9e fpga: x400: Connect Radio Blocks to DIO
Original-commit: 87b2cf09301e90dfaf2a6554c424b62e0558e0b1
2022-01-25 10:18:47 -07:00
Steven Koo 16e602b1ae uhd: update git://github.com references to https
GitHub is removing support for using git://. Switch to https.
https://github.blog/2021-09-01-improving-git-protocol-security-github/

Signed-off-by: Steven Koo <steven.koo@ni.com>


Original-commit: 8a5cfb3fc61d5ce19f6691d1074316bc8e77ba74
2022-01-11 13:01:09 -06:00
Wade Fife 73506997bd rfnoc: Fix noc_shell direction comments
Some comments describing data flow direction were wrong. This commit
updates the Mako files and updates the noc_shell modules with newly
generated versions.


Original-commit: 270a7e13c365d05ba04ab44a2f844d96ba15f43b
2021-12-08 08:36:46 -06:00