Commit Graph
477 Commits
Author SHA1 Message Date
Humberto Jimenez ed8a03b9b0 fpga: x400: cpld: Add manufacturing support
This commit enables a special personality on the X410 motherboard CPLD required
for NI manufacturing purposes only.


Original-commit: 6fd9f37e1cc16bedaafbbf3f013e78bb4869de6c
2021-12-01 10:51:07 -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
Humberto Jimenez 119abe6800 fpga: tools: Add Quartus build utilities
Original-commit: 37feec8992afaffbea19428a029093ae7f6453e3
2021-12-01 10:51:07 -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
Andrew Lynch e3f4dc9986 x410: correct 100GbE link speed
Original-commit: fc6d027da46ee4097c14698ed08ce6f92e614438
2021-11-02 07:56:23 -07: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
Aaron Rossetto 78d49a8f0c fpga: Shorten line length for Launchpad linter
Original-commit: 015beb782e1e6e79dfb8a3be204098b878721d15
2021-10-28 13:57:54 -07: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 ac0f45bb0e fpga: x300: Update synchronizer constraint
Original-commit: a270c531f07ea3549ec2f3b69a38b2c5298bf47c
2021-09-13 13:20:37 -05:00
Wade Fife 3c4c049943 fpga: n3xx: Update synchronizer constraint
Original-commit: ab4b0c6e0eacbc68df3f211ce27790b1cfbc002f
2021-09-13 13:20:37 -05:00
Wade Fife 63c358c082 fpga: lib: Update example constraint in synchronizer
Original-commit: 71aedc922d9cd5348ad4829cf323e569688f660f
2021-09-13 13:20:37 -05:00
Wade Fife 463783f5e6 fpga: Update help message for setupenv.sh
Updates the language in setupenv.sh --help to better reflect that there
are many locations where Vivado is searched.


Original-commit: e64d3e28316f642c1203722b6f5f2af710a7e281
2021-09-10 15:07:05 -05:00
Wade Fife 38e4708a4a fpga: Remove stale references to UHD_FPGA_DIR
Original-commit: 8c0c30642d47d17e2fa9d168b462d7ace18cc3d4
2021-09-08 08:36:05 -05:00
Wade Fife 79add58c25 fpga: tools: Add UHD_FPGA_DIR definition to synthesis
This adds a Verilog definition named `UHD_FPGA_DIR that corresponds to
the location of the UHD "fpga" directory. This allows you to include
files in your out-of-tree modules relative to the FPGA directory. For
example, you could include the library header file rfnoc_chdr_utils.vh
using the following:

`include `"`UHD_FPGA_DIR/usrp3/lib/rfnoc/core/rfnoc_chdr_utils.vh`"

Some simulators may not support `" outside of the context of a `define,
in which case you can do the following:

`define RFNOC_CHDR_UTILS_PATH \
  `"`UHD_FPGA_DIR/usrp3/lib/rfnoc/core/rfnoc_chdr_utils.vh`"
`include `RFNOC_CHDR_UTILS_PATH


Original-commit: 66267f515802ff3f965fd44e1f0d3097ada7484f
2021-09-08 08:36:05 -05: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 3b15237d6b x300: Fix sfpp_io_core tuser width
Original-commit: 34b51b40f59412ae42e99246a60dd70de53ee180
2021-08-27 08:24:07 -05:00
Martin Braun 13633dd543 fpga: Fix Xilinx bitfile parser for Python 3
The script was previously only Python 2 compatible.

Python 2 support is now removed, so we don't maintain backwards
compatibility with Python 2.

This also fixes all linter warnings.


Original-commit: 6046e1a812ba2065d6ae13b4c4afdce8abc99d4f
2021-08-24 09:45:36 -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 acc8486ac1 fpga: sim: Add PkgComplex, PkgMath, and PkgRandom
PkgComplex adds functions for doing complex arithmetic in SystemVerilog
simulation.

PkgMath provides mathematical operations and constants that aren't
built into SystemVerilog, such as a constant for pi and the function
round().

PkgRandom adds randomization functions beyond what standard Verilog
supports but that don't require any special licenses or simulators.


Original-commit: da4202e6f74796603072aa14544581604e81df02
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
michael-west 8164e94fbd N3xx: Fix White Rabbit
Reconnect the signals from the White Rabbit module to the TDC in the
FPGA.

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


Original-commit: c0637bae1e4a0ddb996cf2b7eadfad22f782874b
2021-08-04 15:19:58 -05:00
Humberto Jimenez bb5bff88f6 fpga: x400: Remove stale information in register map
White Rabbit is not supported in X410, however the register map included an
incorrect reference to this unsupported feature.
This commit removes the WR reference from both the source and html files.


Original-commit: 7edd92dbcf2da1a1c0fabe02a97fdb6afdc89077
2021-07-28 10:08:47 -05:00
Wade Fife 95dfc4af53 fpga: x400: Fix x4xx_qsfp_wrapper testbench
Reorder dependencies so that sc_util_v1_0_vl_rfs.sv gets compiled
first when using ModelSim.


Original-commit: a9395823ed450aefa1c2d0c894dbcf976264365e
2021-06-22 16:24:54 -05:00
Wade Fife 29ac752be0 fpga: sim: Check for empty packet in clear_unused_bytes
Original-commit: 2615547a82bc4e06ff5fcb79c5c1efed76b058c7
2021-06-17 08:16:59 -05:00
Wade Fife 77a66a4de4 x400: sim: Move testbenches to sim folder
Original-commit: c0f9496d59947f8c9411b28d63d0c8e6244102a0
2021-06-17 08:16:59 -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 162632e7c1 fpga: x400: Add makefiles for RF testbenches
Original-commit: 319d8c6411f62a2150b21b38bfe5fd55366ee700
2021-06-17 08:16:59 -05:00
Wade Fife bdc67122b8 fpga: tools: Detect assertions in ModelSim simulation
This change allows assertion errors/failures in ModelSim to be
detected and causes ModelSim to return a non-zero value when such
an assertion error occurs. This allows the return value of ModelSim
to be used to determine whether or not the testbench passed.


Original-commit: 574146ec8909da367c3441189c2877a287892f7e
2021-06-17 08:16:59 -05:00
Wade Fife d37cc533a7 fpga: tools: Put SIM_SRCS at end of compile order
VHDL depends on the compile order. This commit changes the order so
that SIM_SRCS are compiled last with ModelSim to avoid issues with
dependencies.


Original-commit: b85b796cbc1f897a69ded1f3ecfba8ec92684c11
2021-06-17 08:16:59 -05:00
Wade Fife b5230b0256 fpga: tools: Support new FPGA types in viv_simulator.mak
This updates the existing PART_NAME generation used in simulation
makefiles to work with newer part families by calling
viv_gen_part_id.py to generate the part name needed by Vivado.


Original-commit: 648c70ae758ab1d15c7ec6cbe57672e8c27640cd
2021-06-17 08:16:59 -05:00
Wade Fife 81e8b63fb9 fpga: tools: Fix python2 reference in viv_ip_builder.mak
Original-commit: 244608187f824903ea2c8b003be1918d7dc21d5e
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 4baf8139c8 fpga: tools: Add modelsim.ini to ModelSim calls
This adds the MSIM_VIV_COMPLIBDIR environment variable to specify
a non-default location for the compilation libraries.

This also allows a modelsim.ini other than the one in the ModelSim
installation folder to be used. By default, the one in the simulation
libraries compilation directory will be used. This can be changed by
setting MSIM_MODELSIM_INI to the one you want to use, or set it to an
empty string to use the one in the ModelSim installation folder.


Original-commit: 08473776b28a949027ec8cf2596d8d1b438b979b
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
Wade Fife 69a7abba4d fpga: tools: Add ip target to simulation makefiles
Allow building of just the IP by running "make ip" in simulation
directories.


Original-commit: 4dc2b7010c0f3e41758b8192636ef7672caae0f7
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
a1d7c252c2 fpga: x400: zbx: Add support for ZBX CPLD
Co-authored-by: Cherwa Vang <cherwa.vang@ni.com>
Co-authored-by: Martin Braun <martin.braun@ettus.com>
Co-authored-by: Max Köhler <max.koehler@ni.com>
Co-authored-by: Paul Butler <paul.butler@ni.com>


Original-commit: 99b841c75aa91709090cbf4046bf51b7ffb4f612
2021-06-10 11:56:58 -05:00
7e59e9516d fpga: x400: cpld: Add support for X410 motherboard CPLD
Co-authored-by: Humberto Jimenez <humberto.jimenez@ni.com>
Co-authored-by: Javier Valenzuela <javier.valenzuela@ni.com>


Original-commit: 7015f5ed2d495f3908773b7c7d74864d0cc3871a
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
Wade Fife bfef20ea45 fpga: sim: Add slave_idle() to PkgAxiStreamBfm.sv
Original-commit: f706b89e6974e28ce76aadeeb06169becc86acba
2021-06-10 11:56:58 -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