Commit Graph
467 Commits
Author SHA1 Message Date
Andrew Moch cb90fe98ef fpga: lib: Fix writes in axil_regport_master
Previously, if a write occurred before the FIFO was ready then a
write could hang as the data channel would complete but leave the
address channel in a state where it would never complete. The fix is
to hold off acknowledging on the data channel until the FIFO is ready.


Original-commit: 3f6ad749b06094b0e16b412a791ba3f2ac509600
2020-06-04 11:53:10 -05:00
Wade Fife 3cb320fae0 fpga: rfnoc: Add defaults for rate changing
Add DEFAULT_M and DEFAULT_N parameters for rate changing cores.
This allows the host to not need to configure fixed rate change
cores.


Original-commit: 983fad664436301c31c3bc8c81b538a41537598b
2020-05-28 15:12:20 -05:00
Wade Fife 76a1cfa60e fpga: tools: Improve detection of setupenv sourcing
This change allows detection of attempting to execute setupenv.sh
rather than sourcing it, which is required.


Original-commit: 6faec1d4a14a1af52681aabf19c9040dcee772ff
2020-05-28 15:11:29 -05:00
Wade Fife a46e351a65 fpga: rfnoc: Add RFNoC Add/Sub block
Original-commit: 5134b6caea58da825c4da1888a4d26888acc126a
2020-05-28 15:04:05 -05:00
Wade Fife 859accafb3 fpga: sim: Add packet_info_equal function
Original-commit: 902c6f4488d5a75cf7a83cc1dc998d42703b0929
2020-05-28 15:04:05 -05:00
Wade Fife 6a5a23a7a2 rfnoc: Add Split Stream RFNoC block
Original-commit: c27c8db011ea6ad1d0682ee06eede75989622b95
2020-05-28 14:49:32 -05:00
Wade Fife d3615aefe0 fpga: tools: Improve native ModelSim support
This adds support for colored output and support for directories added
to the list of source files (for HLS support).


Original-commit: 5b3d66e5b7cedb7098de3e4dbbee70af04a3626e
2020-05-26 13:36:55 -05:00
Wade Fife 98463e99d0 fpga: tools: Add contents of directories for HDL source
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
2020-05-26 13:36:55 -05:00
Wade Fife af2aeccdc8 fpga: rfnoc: Add Vector IIR RFNoC block
Original-commit: a40f2a4a5d04aad3ef3e222033fbacc521233782
2020-05-19 14:22:55 -05:00
Martin Braun 17bafa621e fpga: tools: Remove uhd_image_builder
The image builder was replaced by rfnoc_image_builder, and has been
obsolete since then.


Original-commit: 676c3a37867f0e19476e9dc8495127bb3208a1a0
2020-05-18 17:57:38 -05:00
Wade Fife cb04b641a3 x300: Expand DRAM address space to 1G
The address ranges configured for the AXI interconnect IP limited the
amount of accessible DRAM to two 32 MB regions. This change makes the
full 1G available to all DRAM ports.


Original-commit: bba0cddfadcb744e8a6fae27d57ba8d3995eaf64
2020-05-18 17:50:38 -05:00
Wade Fife 72d8f4c8d4 fpga: e31x: Replace symbolic link for Cygwin
Original-commit: ad55f219a4edc694c7adf46a755583dc01184c3c
2020-05-12 13:47:20 -05:00
Humberto Jimenez f5a79baba7 fpga: tools: Fix HLS IP build with Cygwin
Original-commit: be252febd001feac093b36c987d276720e4244ab
2020-05-12 13:47:20 -05:00
Wade Fife 5188f1a6d5 fpga: rfnoc: Clean up ctrlport_splitter usage
Original-commit: 246cb52188498484851361355230b29eb3ac018b
2020-05-12 13:46:28 -05:00
Wade Fife c2ca39a727 fpga: utils: Optimize ctrlport_splitter for NUM_SLAVES = 1
Original-commit: dc738a7bdb200757d58b59de5c055e2cca467cf8
2020-05-12 13:46:28 -05:00
Michael West 8556184025 TwinRX: Remove decimation from frontend
The decimation in the rx_frontend_gen3 was added to reduce the bandwidth
between the Radio and the DDC due to the limitation in bandwidth over
the crossbar for dynamically connected blocks.  The default FPGA image
for the X300 now has a static connection between the Radio and DDC, so
this is no longer necessary.

This change allows the TwinRX receive channels to be time aligned with
channels from other daughterboards so they can be used in the same
streamer.

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


Original-commit: d0c162bc7a4ac82f6104506b17d7be05e1780336
2020-05-12 12:03:31 -05:00
Michael West dc86b52fd7 DUC/DDC: Add variable time increment
Sets time increment based on tick rate and sample rate instead of
assuming one tick per sample.  Defaults to legacy behavior.

Minor compat number bumped on DUC and DDC blocks.

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


Original-commit: 12dfb97c8efce40494efb35bdd81d06b6f8b9b62
2020-05-12 12:03:31 -05:00
Michael West 45d274746f X300: Make VITA time monotonic
Make timekeeper tick on every cycle of the radio clock.

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


Original-commit: 7886b71f13e9f6e5786c95286ef98f49ab716119
2020-05-12 12:03:31 -05:00
Wade Fife c33b3779f9 fpga: Change default MTU to 10
Original-commit: 7b7fa68880ca423ea3a47fc3dc97ba533921c9a5
2020-05-11 09:06:03 -05:00
Wade Fife 1de388c61b fpga: sim: Don't affect packet arguments in chdr_to_axis
This updates the chdr_to_axis method so that it doesn't change the
input chdr_packet object. This is useful in case there are other
references to that object in use. Not modifying the object means that
you don't always have to copy the object before passing it to this
method.


Original-commit: 259506c4993834d9ef8ccb48635623552b075237
2020-05-04 23:40:25 -05:00
Wade Fife 1563d0e5af fpga: sim: Fix get_slave_data_bfm method
Original-commit: d1e0c6a6c46eb24d23e80cdcfe89b21c8fe4573c
2020-05-04 23:40:25 -05:00
Wade Fife 9e1d9c46d1 fpga: sim: Export return types in PkgRfnocBlockCtrlBfm
Original-commit: c45ea14e41adfd97f526f19070d97ae28e3ee35e
2020-05-04 23:40:25 -05:00
Wade Fife 8220e57a17 rfnoc: Add RFNoC fosphor block
Original-commit: d386c750074f6da4ab86038e2c30a3fe6e0f9d47
2020-04-14 16:37:43 -05:00
Wade Fife 34d68cf4ca fpga: rfnoc: Add option to sample sideband info at start of packet
The axis_data_to_chdr block previously only sampled the sideband
information at the end of the packet. This adds a parameter that
controls if the sideband information should be sampled at the beginning
of the packet or the end of the packet. In the former case, large
internal packet buffers are not required.


Original-commit: a8c4f021277cf3b0a0897fa9da0252541512f3a6
2020-04-14 16:37:43 -05:00
Wade Fife 7e6e25df7a fpga: tools: Add -voptargs=+acc to ModelSim GUI
Add -voptargs=+acc to the default options when running vsim. This
option enables debug command access to objects in the design, which is
generally needed for debugging in the GUI.


Original-commit: eed2d2348cab7dc786673f0649373809d04027d5
2020-04-14 16:37:43 -05:00
Wade Fife c9c9543719 fpga: core: Add chdr_update_length function
Original-commit: 8c6eabcd86f8e5d1e25cfed441e1acf1a0b6759a
2020-04-14 16:37:43 -05:00
Wade Fife b566c415a1 fpga: lib: Add AXI-Stream splitter (axis_split)
The axis_split module takes a single AXI-Stream input and duplicates it
onto multiple AXI-Stream outputs. This block correctly handles the
somewhat tricky flow-control logic so that the AXI-Stream handshake
protocol is honored at all top-level ports.


Original-commit: fa0f4b2833119d57d331f592028ff9f032895c89
2020-04-14 16:37:43 -05:00
Wade Fife 2f4fe4fdbd fpga: sim: Export ChdrPacket in PkgRfnoBlockCtrlBfm
Original-commit: 975dbdf01f351cd05364586e326e7d43c28c6e6e
2020-04-14 16:37:43 -05:00
Humberto Jimenez 9e946be598 fpga: tools: Option to check for full Vivado version
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
2020-04-14 10:43:51 -05:00
Wade Fife 2487e7bdf8 fpga: e31x: Update constraints to avoid timing issues
Xilinx changed the way [all_registers -edge_triggered] is treated such
that set_max_delay constraints that use it can cause segmentation and
cause clocks to not be propagated to all endpoints. Changing to
[all_ffs] avoids this potential issue.


Original-commit: 55e422535292c29de00b80f15b0a49ca3fb94f26
2020-04-08 17:24:15 -05:00
Paul Butler ce701301d0 fpga: tools: Add support for .sdc in Vivado
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
2020-04-02 08:13:35 -05:00
Max Köhler 8bc01517ae fpga: rfnoc: Add gate to dynamically enable control-port interfaces
Original-commit: f534e9449e851a59ba8d09b0e86d189f907a8532
2020-04-01 11:02:16 -05:00
Max Köhler 794e094218 fpga: rfnoc: ctrport_combiner with deterministic latency for PRIORITY=1
The latency through the combiner is static if only one master interface
is used and PRIORITY=1 is set.


Original-commit: 4e3650c0d7ac9bea3720151fbb23591f187590c7
2020-04-01 11:02:16 -05:00
Wade Fife dcbc6a9c78 fpga: tools: Add default Vivado install location
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
2020-04-01 08:45:41 -05:00
Wade Fife 67e76118d6 fpga: tools: Add ModelSim to run_testbenches.py
This adds the "modelsim" simulator option to run_testbenches.py to allow
for regression testing of the native ModelSim simulation target.


Original-commit: 39d6007ca7e3b27e8230db6690faa7469ca62cb2
2020-03-23 18:01:53 -05:00
Wade Fife 795efc8224 fixup! fpga: tools: Add modelsim to make sim targets
Original-commit: 974b9d6140fe6d35ef6698d437e12beaf071ba63
2020-03-23 18:01:53 -05:00
Andrew Moch 97dcb5363d fpga: Fix errors found by linting with vsim
Original-commit: 5c7237fb407cfccaee205980d97e40ce10768c2a
2020-03-23 08:23:51 -05:00
Andrew Moch 09751b661e fpga: tools: Add modelsim to make sim targets
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
2020-03-20 10:34:59 -05:00
Humberto Jimenez 5367ec6006 fpga: tools: Ignore BD layout info for TCL-based BD
When using viv_modify_tcl_bd, two Vivado instances are open:
1. GUI-mode Vivado that opens a TCL-based BD for the user to edit.
2. Batch-mode Vivado that saves changes from (1) and rewrites the TCL
   source file.

During (2), the previous tool implementation was saving layout
information in the TCL source file. This layout info gets outdated
when the BD is reopened, because (1) regenerates the layout to provide
a clean BD diagram in the Vivado GUI.
Furthermore, each time the BD is open, the layout information will
vary due to Vivado's window size, thus creating untracked changes in
the source TCL file.

This commit removes the command option that requests Vivado to save
layout information.


Original-commit: feabc14cb5d5d26987d72b1a51638a83f8f39131
2020-03-12 10:33:24 -05:00
Wade Fife 72f619c429 sim: Rename class typedefs
For example, the ChdrPacket typedef is being renamed from ChdrPacket to
ChdrPacket_t. This allows the code to distinguish between the
unparameterized class and the already parameterized class. This isn't
strictly necessary, but it makes some Vivado 2019.1 bugs easier to work
around. It also makes the code slightly less ambiguous.


Original-commit: df27e9fa05d2d767f69182763852f6803c5b2a34
2020-03-09 13:43:05 -05:00
Wade Fife 2711d7f618 sim: Add ChdrIfaceBfm test
Original-commit: 6f42ab7c1c962bfc425b6790fe41b2c14769e561
2020-03-09 13:43:05 -05:00
Wade Fife faa360a0f9 sim: Add item support to RFNoC simulation
This adds variants of the send and recv methods in RfnocBlockCtrlBfm
and ChdrIfaceBfm that input/output items instead of CHDR words.


Original-commit: aebcaea5eb4e28c5c2a1c78b5e8dd42e5d1247b6
2020-03-09 13:43:05 -05:00
Wade Fife 14dc3950cf sim: Parameterize chdr_word_t data type
This replaces chdr_word_t, which was a statically defined 64-bit data
type, with a paramaterizable data type that matches the defined CHDR_W.
Code that formerly referenced the chdr_word_t data type can now define
the data type for their desired CHDR_W and ITEM_W as follows:

  // Define the CHDR word and item/sample data types
  typedef ChdrData #(CHDR_W, ITEM_W)::chdr_word_t chdr_word_t;
  typedef ChdrData #(CHDR_W, ITEM_W)::item_t      item_t;

ITEM_W is optional when defining chdr_word_t if items are not
needed. Static methods in the ChdrData class also provide the ability to
convert between CHDR words and data items. For example:

  // Convert CHDR data buffer to a buffer of samples
  samples = ChdrData#(CHDR_W, ITEM_W)::chdr_to_item(data);


Original-commit: fc895feacb8dde3b02c9a4eccb4b4f4a654f2881
2020-03-09 13:43:05 -05:00
Wade Fife 1db22ce4ec sim: Split PkgRfnocBlockCtrlBfm into separate packages
Original-commit: 369594ef16d7b2d519940269d2af035cfe648f50
2020-03-09 13:43:05 -05:00
Max Köhler 6bea1f8222 fpga: lib: Modify for loop to Verilog 2001 syntax
This changes the for loop to use the generate keyword, making it
compatible with Verilog 2001. This allows tools that only support
Verilog 2001 to use this file (e.g., Intel Quartus).


Original-commit: b92597e1c9b6f09d5e62e55a60e33c04d437a50a
2020-03-09 13:40:17 -05:00
Wade Fife ec9eb36fb9 rfnoc: Fix FIR and AXI RAM block register documentation
Original-commit: e06ff0f5e08458256bf7ffdd3d9c84c4c1046807
2020-03-05 13:49:38 -06:00
Wade Fife 3810f5a4d9 rfnoc: Add management filter to generic xport
Original-commit: bdcb95c56bdd213af534d312a1abd8ab69dcc214
2020-02-19 13:27:16 -06:00
Wade Fife 280a00b564 radio: Update TB to use new block ctrl connect
This eliminates the complicated semaphore from the testbench and brings
the radio testbench in line with the other testbenches.


Original-commit: 8727642de2aa22e982e012d85d32325f664a3e9e
2020-02-19 13:27:00 -06:00
eklaiandBrent Stapleton f51c7aa780 x300: add front-panel GPIO source control
Adds a ZPU register to control the FP GPIO source. These are 2bits
per GPIO pin, totalling 24 bits. 0 corresponds to RF-A, 1 corresponds
to RF-B. The following Python code will control the upper 6 bits of the
front-panel GPIO from the B-side radio on an X300:

>>> import uhd
>>> U = uhd.usrp.MultiUSRP("type=x300")
>>> U.get_gpio_src_banks()
['FP0']
>>> U.get_gpio_src("FP0")
['RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA',
'RFA', 'RFA']
>>> U.set_gpio_src("FP0", ['RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA',
                           'RFB', 'RFB', 'RFB', 'RFB', 'RFB', 'RFB'])
>>> U.get_gpio_src("FP0")
['RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFB', 'RFB', 'RFB', 'RFB',
'RFB', 'RFB']
>>> # Make all GPIOs outputs:
>>> U.set_gpio_attr("FP0A", "DDR", 0xFFF)
>>> U.set_gpio_attr("FP0B", "DDR", 0xFFF)
>>> # Control all GPIOs from software (not ATR):
>>> U.set_gpio_attr("FP0A", "CTRL", 0x000)
>>> U.set_gpio_attr("FP0B", "CTRL", 0x000)
>>> # Bottom 3 pins go high from radio A
>>> U.set_gpio_attr("FP0A", "OUT", 0x007)
>>> # Top 3 pins go high from radio B
>>> U.set_gpio_attr("FP0B", "OUT", 0xE00)

Amends the gpio.cpp example to allow switching the source.

Co-authored-by: Brent Stapleton <brent.stapleton@ettus.com>


Original-commit: d7304cc724de43b0d61d5b9d61a528d58898f004
2020-02-18 07:21:24 -06:00
Wade Fife 59adae6252 rfnoc: Update blocks to use autogenerated noc_shell
Original-commit: b746819769e6a960f8227981ea10c7ed9c3d826a
2020-02-06 14:50:33 -06:00