Add -assert option to Vivado synthesis to allow VHDL assert statements
to be checked during synthesis.
Original-commit: 13d004fa9001823e807c4a2b72e92b20efb6f94a
This change sets StdArithNoWarnings and NumericStdNoWarnings by
default for ModelSim simulations. Without this, an excessive number of
warnings can be generated by Xilinx IP during simulation.
Original-commit: f094aa7ae0f864764276c5c67c51b21547327fb0
This changes the -onfinish setting from "stop" to "final" for Questa
and ModelSim. The "final" setting is required so that SystemVerilog
final blocks run. This also has the same effect as "stop" in that it
won't ask you in the GUI if you want to exit the simulator when
$finish() is called.
Original-commit: 7ab4e9a4e2c0408ca595ad168199a54bf416c894
This Python utility was getting a bit rotten. The following updates
where made:
- Reformatted using ni-python-styleguide
- Fixed formatting of regex strings by declaring them 'raw'
- Updated docstrings and any linter issues
On Pyton 3.12 and beyond, this will no longer throw SyntaxError
warnings.
Original-commit: 0dede88c6535ae6ffb30b162c83dc01d59d3bfa0
Previously, the build tools for the FPGA bitfiles would try and
autodetect the Vivado executable, but would allow for a `vivado_lab`
executable. However, Vivado Lab Edition can't build bitfiles nor run
testbenches. Its only use with the USRP FPGA build tooling is to run
`viv_jtag_program` and `viv_jtag_list` (which are command-line proxies
for probing FPGAs attached to JTAG, and for programming bitfiles over
JTAG, e.g. to an X3x0).
When Vivado Lab and Vivado were present, it was possible that we ran
into issues where Vivado Labs would be preferred, and then builds or
testbenches would fail.
We therefore remove the ability to use Vivado Lab. Running the Vivado
Lab Edition with the GUI, and loading and probing bitfiles is of course
still possible, but tools like `rfnoc_image_builder` can no longer
accidentally try to use Vivado Lab instead of regular Vivado.
Original-commit: 21c4c591a51d520c7aac7108e853e59c4953f953
FPGA:
- Split up MB registers that control daughterboard specific settings so
that daughterboards 0 and 1 could have different setings, in
preparation for future devices that require different settings.
This requires a compat number bump to 8.0.
- Add registers for additional RFDC information, including the
block/tile mapping of the individual channels, and information about
resampling capabilities
- Identify sections of code that would be specific to X410/ZBX and move
them to their own headers, so it's trivial to add device-specific
sections of code instead for other devices in the future.
- This includes constraints for clocks and I/O pins.
- Remove ability to do timed ctrlport transactions to the MB CPLD, this
was unused and possibly broken.
- Move daughterboard-specific code into its own code location
(dboards/zbx)
- Move X410-specific register documentation to its own location
(doc/X410)
- Refactor Makefiles to split out X410/ZBX specific components and allow
switching between device types
- Add 512-bit AXI interconnects
- Make number of timekeepers configurable (X410 keeps the single
timekeeper)
MPM:
- Required compat is bumped to 8.0
- Now supports new registers for detecting DSP capabilities and
multi-rate settings for the daughterboards
- Adds MMCM controls (currently unused)
Co-authored-by: Wade Fife <wade.fife@ni.com>
Co-authored-by: Ryan Marlow <ryan@lmarlow.com>
Co-authored-by: Martin Braun <martin.braun@ettus.com>
Co-authored-by: Humberto Jimenez <humberto.jimenez@ni.com>
Original-commit: c1d268917ea65dd9c5a42366014cb96d3c025223
This change causes HLS IP to be exported with a version of 1.0.0
instead of a date code. Due to a bug in Vivado, date codes after
0x7FFFFFFF (anything in 2022 or beyond) cause an error. Setting
an explicit revision avoids this issue.
See Xilinx AR 76960 for details.
Original-commit: 51384afc2c5d4db9e2e45d97382edce8c8039b10
Updates the language in setupenv.sh --help to better reflect that there
are many locations where Vivado is searched.
Original-commit: e64d3e28316f642c1203722b6f5f2af710a7e281
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
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
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
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
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
The script setupenv_base.sh, which is used to setup the development
environmnet in the open source toolchain, adds some functions to the
shell that are used to interact with vivado. Some of the functions were
looking in the wrong argument for the product name. This commit fixes
the bug.
In addition, supplying an incorrect part name returned a rather opaque
error message. This commit also fixes the error handling so that the
intended error message is displayed.
Signed-off-by: Sam O'Brien <sam.obrien@ni.com>
Original-commit: 471de61e4d9e53a038942f21f61d4b481b5f9853
This adds the ability to call BUILD_VIVADO_IP, as before, followed by
REBUILD_VIVADO_IP_WITH_PATCH to patch a file generated by the IP and
then rebuild the IP with the patched file.
Original-commit: 78315eca698333ad4dc32818e24c7bf6a740c0cb
This commit includes the following changes to the tools:
- Change part definition in XCI and BD editors for the RFSoC family
- Resolve part name in Vivado IP management utilities with
viv_gen_part_id.py
Original-commit: fba23eb42c91ca1bc1108b5ba50c1b567cb9b59d
- 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
This change allows detection of attempting to execute setupenv.sh
rather than sourcing it, which is required.
Original-commit: 6faec1d4a14a1af52681aabf19c9040dcee772ff
This adds support for colored output and support for directories added
to the list of source files (for HLS support).
Original-commit: 5b3d66e5b7cedb7098de3e4dbbee70af04a3626e
For HLS builds, the output file names aren't known in advance. This
makes it difficult to write the Makefile to pull in the files and pass
them to the build tools. This change allows you to add a directory as
your HDL source so that all files in the directory will be pulled in by
the build process.
Original-commit: 90933d9b2faf392fd26f3f7ca32f73719614a40a
This commits enables the FPGA build infrastructure to require a very
specific Vivado version, all the way to the patch level.
Vivado typically has the following version format:
Year.release.update_patch
This commit enables setupenv_base.sh to optionally look for the
environment variable VIVADO_VER_FULL, which should contain the
full Vivado version in the format specified above.
Vivado is directly used to retrieve the installed version, returning
an error if the requested version is not found.
Example in setupenv.sh (which calls setupenv_base.sh):
VIVADO_VER=2019.1
VIVADO_VER_FULL=2019.1.1_AR73068
The setupenv.sh script will setup Vivado 2019.1, but it will also
verify that both Update 1 and patch AR73068 are installed.
Original-commit: 932b7cbb040cef7fce0c83f81839722fd8ad5bdf
viv_utils.tcl will now read files with the .sdc suffix using the
read_xdc Vivado command. This is especially useful when I/O timing
constraints in the FPGA and CPLD need to depend on a common constant.
Original-commit: b47b1a467ee5796dbce359ff34c9d55a6acebc82
Xilinx changed the default Vivado install location from /opt/Xilix to
/tools/Xilinx. This commit adds support for finding Vivado in either
the new location or the old location.
Original-commit: 156d714b8fb288100d242ea200ae1d1dcd6bcd57
This adds a simulation make target that allows you to run ModelSim
natively rather than through Vivado.
Adds or modifies the following simulation make targets:
make vlint - Brake up compilation to Verilog/SystemVerilog/VHDL
make modelsim - Depends on make vlint and invokes modelsim
Adds the following variables:
MODELSIM_ARGS - Added to invocation of ModelSim
SVLOG_ARGS - Added to SystemVerilog invocation of vlog
VLOG_ARGS - Added to Verilog invocation of vlog
VHDL_ARGS - Added to VHDL invocation of vcom
Original-commit: b296b26053d4437b8ae97e3df415a3d041b7b51e