241 Commits
Author SHA1 Message Date
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
michael-west c4cd0a129d fpga: Add ability to get time from Radio block
Added registers to read back radio time.  Bumped minor compat.

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


Original-commit: 43ab4c8b43d8407fc9f345ca4b13634f03ad4a43
2021-11-17 08:56:39 -06:00
Wade Fife 2589fd21c7 fpga: rfnoc: Add RFNoC CHDR resize module
Original-commit: a94ea11f00bba2c4227c9ab173eb4b6ef1049bad
2021-11-04 11:04:54 -05:00
Wade Fife c2c8f03038 fpga: rfnoc: Add CHDR management util functions
Add missing chdr_mgmt_*() and enum_to_chdr_w() functions.


Original-commit: f6ec1496486f14ce16042062bdddcec38fa316a5
2021-11-04 11:04:54 -05:00
Wade Fife 7b6cfde554 fpga: lib: Clean up axi_mux
Original-commit: 4c75e48d248e0e4f143a66da5d1598e546eaf53a
2021-10-28 23:15:41 -05:00
Wade Fife 165498c186 fpga: rfnoc: Add labels to axi_switch generate blocks
Original-commit: e18c0ffbc4d1cbe1c0f083185212d57a6c201716
2021-10-28 23:15:41 -05:00
Wade Fife 1a72b843e8 fpga: rfnoc: Add labels to chdr_mgmt_pkt_handler
Original-commit: a8bb7d3ad98a77fb23e3695721b4bdd3768e6508
2021-10-28 23:15:41 -05:00
Wade Fife 4e769632be fpga: rfnoc: Add documentation to chdr_xb_routing_table
Original-commit: 7dc2b620f7cb9dc72b9b77ce9c018823a4015b4e
2021-10-28 23:15:41 -05:00
Wade Fife 2e9f7b96ee siggen: Fix direction of rotation
The I and Q were swapped in sine_tone, which caused confusion and made
the rotation of REG_CARTESIAN clockwise by default. This effectively
made the resulting frequency negative. This PR makes the I and Q order
consistent with RFNoC and fixes the direction of rotation so that a
positive value for REG_PHASE_INC (phase increment) results in a
counter-clockwise rotation, which yields a positive frequency.


Original-commit: 4e6531f30648ede5be8f93fa49fdcd4973b73813
2021-10-27 07:56:09 -07:00
Wade Fife 63c358c082 fpga: lib: Update example constraint in synchronizer
Original-commit: 71aedc922d9cd5348ad4829cf323e569688f660f
2021-09-13 13:20:37 -05:00
Wade Fife 38e4708a4a fpga: Remove stale references to UHD_FPGA_DIR
Original-commit: 8c0c30642d47d17e2fa9d168b462d7ace18cc3d4
2021-09-08 08:36:05 -05:00
michael-west 5983927439 sim: Update chdr_16sc_to_sc12 testbench
Modified to send 2 packets back to back at each packet size to test
output during sequential input packets.  Also fixed whitespace.

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


Original-commit: 439770b964be45e6160cf99a0b1551fdd2002fa9
2021-08-10 15:19:32 -05:00
michael-west 946ff5574d fpga: Re-order error and data packets
Added delay to error packets so overrun error is back in-band.  Avoids
dropping good data packets in the case of an overrun.

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


Original-commit: a69e6fcdc79dfa1ea48c99092b6edb9633b6fb24
2021-08-10 15:19:32 -05:00
michael-west 8332f5b161 fpga: Fix sc16 to sc12 converter
Re-wrote converter to remove clock cycle delay on i_tready when handling
residual output and fixed improper handling of tlast during residual
data processing.  Resolves some USB overflow issues when using sc12 data
type on B200 devices.

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


Original-commit: 1fecf446e0358aa2b6a2d1f73a0daeac516435a0
2021-08-10 15:19:32 -05:00
Wade Fife f3085587fd fpga: rfnoc: Fix EOB loss in DUC
There were some rare corner cases where the EOB could get lost in the
DUC due to the dds_timed logic not always passing it through as it
should. This resulted in an underflow error message at the end of
transmission.

This commit also fixes an issue where part of the last packet
used a frequency shift of 0 instead of the requested frequency
shift, and an issue where the first few samples of a burst used the
wrong frequency shift value.

Part of the fix includes adding a TUSER port to dds_sin_cos_lut_only.
The TUSER port is built into the IP but was disabled. It is now
enabled and set to 1 bit wide. This has a very small effect on
resource usage and can be left unconnected when not needed.

The dds_freq_tune block was shared by the DUC and DDC. To avoid
affecting the DDC, a new version, dds_freq_tune_duc, is being
added for the DUC to use that has the necessary fixes.

The new dds_wrapper.v is a wrapper for the dds_sin_cos_lut_only IP.
This IP has the undesirable behavior that new inputs must be provided
to push previous outputs through the IP. This wrapper hides that
complexity by adding some logic to ensure all data gets pushed through
automatically. This logic uses the TUSER port on the IP.

Finally, a testbench for dds_timed was added.


Original-commit: 77975d108a704ce18ec52b4ee1764381b1893752
2021-08-08 14:59:26 -05:00
Wade Fife 3a6961a3f4 fpga: lib: Clean up and document lib files
Clean-up and document axi_tag_time, dds_freq_tune, and axi_sync.


Original-commit: 8edd13e6eba61ef2bfd96c7dc88b2642decbaa7a
2021-08-08 14:59:26 -05:00
Wade Fife 3e94b6698e rfnoc: duc: Remove stale references to CORDIC
Updated some comments that still referenced the old CORDIC
implementation, which is no longer used.


Original-commit: 18e5bdfa100a40376147d1a497645345b2a938b1
2021-08-08 14:59:26 -05:00
Wade Fife fcfc6bf387 fpga: Update testbenches to work in ModelSim
Original-commit: 0076076467303247c4e62e5824e5bf8ce79cbe66
2021-06-17 08:16:59 -05:00
Wade Fife a760762db3 fpga: lib: Update register comments in eth_regs.vh
Original-commit: 791bafd09a30a041a0c6f65dbf395cc4e567911f
2021-06-10 11:56:58 -05:00
Wade Fife 4188b6ccbc fpga: lib: Add modports to SV AXI-Stream blocks
Original-commit: da46dddbebab2ddb1f25f2f200431c2299b395f4
2021-06-03 11:26:54 -05:00
Wade Fife d6ca4f01fc fpga: lib: Add time_increment port to timekeeper
Adds a time_increment port for situations in which the parameter
TIME_INCREMENT can't be used. They offer the same behavior.


Original-commit: f9c97371048bfc69182187e6d8904a01efbe6d79
2021-06-03 11:26:54 -05:00
Wade Fife 3bc803026b fpga: lib: Pipeline ctrlport_timer
This pipelines ctrlport_timer to eliminate the long combinational path
caused by the time comparisons. This change also removes the
PRECISION_BITS parameter and converts it to a signal named
time_ignore_bits.


Original-commit: c6035320215f270d7658cfb6195a96a0b84d6aa7
2021-06-03 11:26:54 -05:00
Wade Fife ab09eb9b09 fpga: lib: Add clock domain comments to interfaces
Original-commit: c64258e09b221d0bfeb55e01085a20e37c5b62ba
2021-06-03 11:26:54 -05:00
Wade Fife b7bd308e9c fpga: lib: Add 2 to 1 gearbox module
Original-commit: 7f36cced81fb05d3cc107a0a0773fcdfc26f8d64
2021-06-03 11:26:54 -05:00
Andrew Moch 8cb9bdd331 fpga: lib: Add AXI4 (full) interface
Add a SystemVerilog interface for connecting AXI4 ports, and an
associated header file with helper macros.


Original-commit: 04d29e85b0c0698e3de96b54fd3f6e04eb439f74
2021-06-03 11:26:54 -05:00
Andrew Moch d7acf31a38 fpga: lib: add pause support to ethernet xport
Original-commit: d099fc3b032250bcc70e4c24f78d5eb6508850e1
2021-06-03 11:26:54 -05:00
Wade Fife feb849051f fpga: lib: Add eth_ipv4_internal
This adds a generic version of eth_internal that allows you to specify
the CHDR width.


Original-commit: 30b522b268aed6e7b4bc1a556e88d2a4b2fe6f77
2021-06-03 11:26:54 -05:00
Humberto Jimenez 44d37a616f fpga: lib: Add zynquplus family to axi_bitq
Original-commit: 87574a7c322f9f1af954bcee5dd9f59929992a85
2021-06-03 11:26:54 -05:00
Lars Amsel 7ec0561c4d fpga: lib: Minor cleanup of axi_lite.vh
Original-commit: 2a5f0ea13e6d7d00798d6547e1170ff85d4aa42a
2021-06-03 09:34:20 -05:00