Commit Graph
49 Commits
Author SHA1 Message Date
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
Humberto Jimenez a69290143b fixup! lib: add option for output register in pps generator
Original-commit: 401fcd11be0cab028a619c9bc4a75fe6aa856369
2020-02-05 09:26:57 -06:00
Max Köhler cd4cfd926c lib: add option for output register in pps generator
The pps_generator module receives a new parameter (PIPELINE) which can
optionally add a register on the output. The default behaviour is
unchanged.


Original-commit: 3538fccfc0d9d493d767dcc445593074d3edc86d
2020-01-28 09:35:37 -08:00
+18 6b67702ad7 Merge FPGA repository back into UHD repository
The FPGA codebase was removed from the UHD repository in 2014 to reduce
the size of the repository. However, over the last half-decade, the
split between the repositories has proven more burdensome than it has
been helpful. By merging the FPGA code back, it will be possible to
create atomic commits that touch both FPGA and UHD codebases. Continuous
integration testing is also simplified by merging the repositories,
because it was previously difficult to automatically derive the correct
UHD branch when testing a feature branch on the FPGA repository.

This commit also updates the license files and paths therein.

We are therefore merging the repositories again. Future development for
FPGA code will happen in the same repository as the UHD host code and
MPM code.

== Original Codebase and Rebasing ==

The original FPGA repository will be hosted for the foreseeable future
at its original local location: https://github.com/EttusResearch/fpga/

It can be used for bisecting, reference, and a more detailed history.

The final commit from said repository to be merged here is
05003794e2da61cabf64dd278c45685a7abad7ec. This commit is tagged as
v4.0.0.0-pre-uhd-merge.

If you have changes in the FPGA repository that you want to rebase onto
the UHD repository, simply run the following commands:

- Create a directory to store patches (this should be an empty
  directory):

    mkdir ~/patches

- Now make sure that your FPGA codebase is based on the same state as
  the code that was merged:

    cd src/fpga # Or wherever your FPGA code is stored
    git rebase v4.0.0.0-pre-uhd-merge

  Note: The rebase command may look slightly different depending on what
  exactly you're trying to rebase.

- Create a patch set for your changes versus v4.0.0.0-pre-uhd-merge:

    git format-patch v4.0.0.0-pre-uhd-merge -o ~/patches

  Note: Make sure that only patches are stored in your output directory.
  It should otherwise be empty. Make sure that you picked the correct
  range of commits, and only commits you wanted to rebase were exported
  as patch files.

- Go to the UHD repository and apply the patches:

    cd src/uhd # Or wherever your UHD repository is stored
    git am --directory fpga ~/patches/*
    rm -rf ~/patches # This is for cleanup

== Contributors ==

The following people have contributed mainly to these files (this list
is not complete):

Co-authored-by: Alex Williams <alex.williams@ni.com>
Co-authored-by: Andrej Rode <andrej.rode@ettus.com>
Co-authored-by: Ashish Chaudhari <ashish@ettus.com>
Co-authored-by: Ben Hilburn <ben.hilburn@ettus.com>
Co-authored-by: Ciro Nishiguchi <ciro.nishiguchi@ni.com>
Co-authored-by: Daniel Jepson <daniel.jepson@ni.com>
Co-authored-by: Derek Kozel <derek.kozel@ettus.com>
Co-authored-by: EJ Kreinar <ej@he360.com>
Co-authored-by: Humberto Jimenez <humberto.jimenez@ni.com>
Co-authored-by: Ian Buckley <ian.buckley@gmail.com>
Co-authored-by: Jörg Hofrichter <joerg.hofrichter@ni.com>
Co-authored-by: Jon Kiser <jon.kiser@ni.com>
Co-authored-by: Josh Blum <josh@joshknows.com>
Co-authored-by: Jonathon Pendlum <jonathan.pendlum@ettus.com>
Co-authored-by: Martin Braun <martin.braun@ettus.com>
Co-authored-by: Matt Ettus <matt@ettus.com>
Co-authored-by: Michael West <michael.west@ettus.com>
Co-authored-by: Moritz Fischer <moritz.fischer@ettus.com>
Co-authored-by: Nick Foster <nick@ettus.com>
Co-authored-by: Nicolas Cuervo <nicolas.cuervo@ettus.com>
Co-authored-by: Paul Butler <paul.butler@ni.com>
Co-authored-by: Paul David <paul.david@ettus.com>
Co-authored-by: Ryan Marlow <ryan.marlow@ettus.com>
Co-authored-by: Sugandha Gupta <sugandha.gupta@ettus.com>
Co-authored-by: Sylvain Munaut <tnt@246tNt.com>
Co-authored-by: Trung Tran <trung.tran@ettus.com>
Co-authored-by: Vidush Vishwanath <vidush.vishwanath@ettus.com>
Co-authored-by: Wade Fife <wade.fife@ettus.com>


Original-commit: bafa9d95453387814ef25e6b6256ba8db2df612f
2020-01-28 09:35:36 -08:00
Martin Braun 74893643ca Removed copy of FPGA source files.
Original-commit: fd3e84941de463fa1a7ebab0a69515b4bf2614cd
2014-10-07 11:25:20 +02:00
Martin Braun 56e84828fe Merge branch 'maint'
Original-commit: adb88dbd1f996ed26bab654a9a059ea4f3ede823
2014-09-24 19:08:33 -07:00
Ashish Chaudhari adf2da6ac7 fpga: Multiple X300 FPGA bugfixes and enhancements
- Fixed 10GigE firmware communication issues and sequence errors for TX
- Multiple changes to help ease timing closure
- Cleaned up build scripts
- Switched to Xilinx ISE 14.7 as the default build tool for X300


Original-commit: 64d71dcbc5fa6790385b288de25224d386b047b0
2014-09-24 18:45:31 -07:00
Ashish Chaudhari d8650bce9b fpga: Added FPGA code for B200 AD9361 host driver addition
Original-commit: 9fb6c2919ad9e7e736c837186861b362ba80cdfa
2014-08-20 09:31:33 -07:00
Ashish Chaudhari 6b7004c311 fpga: Added FPGA code for X300 MIMO alignment bugfix
Original-commit: 3347e831f002da769632dfe0c70ea17c2d749a8a
2014-08-19 12:05:46 -07:00
Ben Hilburn 85ad83d8d3 fpga: Updating FPGA code for UHD-3.7.2-rc1
Original-commit: b63507efb3cf1a8fa20794c452d57028e18da182
2014-07-22 15:49:02 -07:00
Ben Hilburn 5a525c84f5 fpga: updating b200 and x300 FPGA source code for latest images
Original-commit: 00711ba213dde8aa0a099d2b18d3da0a33e6af79
2014-05-14 11:42:19 -07:00
Ben Hilburn 8f1cfd55b1 x300 fpga: updating FPGA code with latest bug fixes
Original-commit: 847b7a631f5e73d732c88a4b4aa91595cf4e4a07
2014-03-20 16:08:24 -07:00
Nicholas Corgan 864a1718c5 Merge branch 'maint'
Original-commit: 0386a47c431c87aebbf37678315b785284dbe3b9
2014-03-17 07:05:11 -07:00
michael-west bd647a7a8d Adding bootram.coe file from latest firmware changes.
Original-commit: 973b47c48339dbae2e125a8c8d84ef67fedc4bdf
2014-03-03 13:04:25 -08:00
Nicholas Corgan 65d3d1eabd fpga: removed superfluous B2x0 files
Original-commit: 09882ad86432db5087f85764c02989dbfc70fd3f
2014-02-20 06:05:38 -08:00
Ben Hilburn fbbc991a7d Pushing the bulk of UHD-3.7.0 code.
Original-commit: ff1546f8137f7f92bb250f685561b0c34cc0e053
2014-02-14 12:05:07 -08:00
Ben Hilburn 29086f9001 b2xx: Updating FPGA source with recent bugfixes.
Original-commit: 4b4365a517938b365af57674a3ab1462432c2c3a
2013-12-03 10:35:35 -08:00
Ben Hilburn c91b74de33 Squashed B200 FPGA Source. Code from Josh Blum, Ian Buckley, and Matt Ettus.
Original-commit: 0df4b801a34697f2058b4a7b95e08d2a0576c9db
2013-10-10 10:17:27 -07:00