Introduce a new parameter --base-dir BASE_DIR.
If the parameters --build-dir BUILD_DIR / --build-ip-dir BUILD_IP_DIR
/ --build-ouput-dir BUILD_OUTPUT_DIR are not set explicitly, they will
be set to these values per default:
- BUILD_DIR=<BASE_DIR>/build-<IMAGE_CORE_NAME>
- BUILD_IP_DIR=<BASE_DIR>/build-ip
- BUILD_OUTPUT_DIR=<BASE_DIR>/build
BASE_DIR defaults to the current directory if the parameter --base-dir
is not set. This means that per default, the build(...) directories
are generated in the current directory.
The directories which are used for the build are printed before
executing the build. However, the build generates hundrets of
lines of output which typically exceeds the scrollback length
of the terminal. Hence, print the directories again after the
build finished.
This sets classifiers in pyproject.toml. Most of them
are static except for the development status. The status
is set to 2 (pre alpha) as a default. Only if UHD_RELEASE_MODE
is set it changes to 4 (beta) if we are on a release canditate tag
or 5 (release) if we are on release tag. If we aren't on any tag
or the tag does not meet the correct formatting we stay on 2
and a warning is issued.
There was an issue with include paths, where providing `-I` would not do
the right thing for all types of files. In particular, it was not
possible to do `rfnoc_image_builder -I <path/to/oot>`, which is the
purpose of this command line argument.
Previously, if a block in an image core file would reference an unknown
YAML file, the user would get a very unhelpful error messages like this:
⛔ Error parsing image configuration: 'foo.yml'
With this fix, the error message is improved and looks like this:
⛔ Invalid configuration: The block gain0 has an unknown block \
description: gain.yml.
This is a filter for all templates that will produce the output with
quotes. This is particularly useful for rendering strings that are used
for string parameters in Verilog, which require quotes (or they are
interpreted as an expression).
- icores/CMakeLists.txt now contains the correct macro example
- The CMakeLists.txt file for the gateware itself is now created, and
will dynamically contain the correct argument for
RFNOC_REGISTER_BLOCK() depending on --skip-testbench
- To enable this, the fpga/<module_name>/CMakeLists.txt is now also
properly updated on `rfnoc_modtool add`
- This was facilitated by adding the `append` step option
- The autogenerated Makefile.srcs has the correct file endings now (.sv
instead of .v)
- There was a bug in the autogenerated Python block controller wrapper,
which referenced the wrong namespace
- Fix more missing commas in generated HDL.
This adds a pyproject.toml to generate Python wheels using poetry.
The toml file is generated by cmake to add build dependend information to the
file. On Windows the build process invokes poetry using the configured
Python executable. The existing distribution way (copy python data
to site-packages folder of UHD installation) is not changed yet.
Replaced instances of email address packages@ettus.com with new
corporate email address uhd.maintainer@emerson.com.
For some yet undefined transition time emails to the old address
are being forwarded to the new one.
When attempting to generate an image core file with no control SEPs
(which is illegal), the image builder would throw an exception while
trying to produce the proper error message. The exception would look
like this:
File "[...]/site-packages/uhd/rfnoc_utils/builder_config.py", \
line 330, in _check_configuration
failures += [
TypeError: can only concatenate str (not "list") to str
This fixes the error, such that a regular error messages is shown now in
case of missing control SEPs.
This adds support for generating RFNoC bitfiles from GNU Radio Companion
(.grc) files. Note that this requires changes to GNU Radio as well
(updated block definition files for the GRC bindings).
There is a new mini-feature in the image builder itself: The option to
dump the YAML file into the build directory. For the GRC import, this
makes sense, because it allows reading the UHD YAML represenation of a GRC
image core.
This fixes an issue where default clocks would not get detected
properly when checking for correct clock domain connections (change
added in ce96d9bf). The following error message could be observed with
some image cores:
[error] Invalid clock domain connection: _device_:rfnoc_chdr → ddc0:ce
(rfnoc_chdr is not a clock output)
[error] Invalid clock domain connection: _device_:rfnoc_chdr → duc0:ce
(rfnoc_chdr is not a clock output)
Clearly, _device_.rfnoc_chdr is a valid clock output, but it was not
detected because default clocks are stored differently from non-default
clocks.
- Default BSP parameters are now also resolved and can make use of
previously defined BSP parameters
- Regular block parameter resolution is simplified
This improves error checking and -messages for IO ports. In particular,
this will now be able to check wire widths for compatibility. Imagine
you have a BSP with a radio connection of 1 SPC, 64-bit CHDR width, and
attempt to instantiate a radio block with 2 SPC (and also 64-bit CHDR
width). Without this changeset, the misconnection would either be caught
by the bitfile generation process, or not at all (e.g., if we are
connecting a narrow bus to a wider one, we would simply connect the
least significant bits).
With this changeset, a clear error message is given immediately when the
YAML is parsed such as this:
Connection _device_:radio0 → radio0:radio has a wire width mismatch.
Source port radio_rx_data_radio0 has width 64, destination port
radio_rx_data has width 128.
This adds more checks for clock connections:
- When an input clock is not connected, a warning is now produced, like
this:
⚠ Unconnected clock input: gain0.ce
Previously, this would go without any warning.
- When source or destination block are incorrectly specified, the error
message is improved to give a much clearer indication which line of
the input file is wrong:
⛔ Invalid clock domain connection: _device_:ce → gaen0:ce
(destination block is not defined)
- When two input or output clocks are connected, this is now also
flagged as an error:
⛔ Invalid clock domain connection: radio0:radio → gain0:ce (radio
is not a clock output)
- When a block specifies a timebase or control clock (as the radio
blocks on X4x0 do, for example) we now check the validity of the
clocks. If an invalid or unknown clock is provided, there is now
a clear error message:
⛔ Invalid timebase_clock for block radio0: _device_.tb_clk
- Clock checking is now performed on all modules, transport adapters,
and blocks with the same rules applying to all of them.
- Because of all the new features, the clock management code was
simplified to recoup some complexity. The `self.clocks` object was
discarded, and all blocks, modules, and transport adapters now store
all clock information on themselves. For example,
`self.noc_blocks["radio0"].clocks` would provide all information on
the clocks for radio0. This change also makes the builder object more
similar to the YAML file (there is no "clocks" object in the YAML).
- As a result of the previous change, the template code for generating
clock indices for control and timebase clock was simplified, and the
logic for looking up the correct index was moved into
builder_config.py.
The method ImageBuilderConfig.get_module_list() can now take
a 'nodevice' argument, which is a wildcard argument for "return all
blocks and modules, but not the device".
The docstring is also updated.
This adds code to check if sources or destinations are referenced
multiple times in the connection list of a YAML file, and provides more
useful error messages if that is the case.
This creates common.py and connections.py and moves code from
builder_config.py into those files. This is to facilitate future
modifications in the image builder.
Without this fix, there will be missing commas in the NoC-shells signal
list.
When trying to build an image, Vivado will fail with an error similar to:
ERROR: [VRFC 10-2063] Module <noc_shell_***> not found while
processing module instance <noc_shell_***_i>
This fixes the missing commas.
This replaces rfnoc_modtool that was previously shipped with gr-ettus.
It is fully RFNoC/UHD4.x compatible. There is no shared code between
this version and the old one; this is a clean rewrite.
As of now, it lacks many of the features that were available with the
previous version, most importantly, the ability to generate GNU Radio
bindings.
This installs UHDPython.cmake to lib/uhd/, so that OOT RFNoC modules can
use it (and don't have to use a version that ships with the OOT). This
makes maintanance of that file a lot easier.
Now that this file can (and should) be used outside of UHD, we
"namespace" the macros and functions by prefacing them with 'UHD_'
(e.g., there's now UHD_PYTHON_CHECK_MODULE).
This file requires creating UHDMinDepVersions.cmake, which also gets
installed.
Implement workaround to commit 3cb868e and do not report error
on missing *-version-info-dtsi files. These include files are listed
in the bsp (board support package) for X4xx devices, but are dynamically
generated at build time (in the dts source folder).
- The main installation path is now always an include path and can be
used as such (e.g., /usr/share/uhd/rfnoc)
- fpga_includes and dts_includes have been streamlined. They now work
identically on all blocks/modules/_device_, and can use resolve() the
same way as other arguments do.
- Error messages for missing include files are improved.
With ruamel.yaml versions >= 0.18, the current image builder doesn't
work, because it uses a deprecated call.
This call was part of a wrapper that fixes Python 3.5-compatibility.
Since our minimum version of Python is now 3.6, we don't need this
anyway so we just can just replace the deprecated usage with
ruamel.yaml's round-trip loader.
The image builder will currently emit a warning if a NoC-block has
unconnected ports. This requires specifying `-W` to continue building,
which is the intended behaviour.
However, there are cases where there are legitimate reasons to not
connect a block, e.g., in the X310, where the radio block has 2x2 ports,
but we only connect 2 RX ports, and 1 TX port.
This adds a way to declare a "null" connection, which makes it explicit
in the image core YAML that a connection was deliberately omitted. Such
connections are created by connecting to a port called "_none_", e.g.:
```
connections:
- { srcblk: _device_, srcport: _none_, dstblk: radio0, dstport: in_1 }
```
The block name is irrelevant, but the schema requires providing a block
name.
This commit also amends the x3xx_radio_base.yml to avoid warnings when
building X3x0 bitfiles.
- If there are any warnings during the image core parsing, the build is
now skipped unless --no-warnings (-W) is also given.
- Exceptions in the ImageBuilderConfig are now caught in
rfnoc_image_builder and an error message is logged, instead of
printing the Python exception backtrace.
When -S is provided without -K (--secure-core without --secure-key), the
build fails without comment. This provides a default value for -K based
on the default Vivado key.
When an image core file has a missing, required IO port connection, the
tool will now suggest which ports may be sensible options for
connecting.
When there is a single available option, it will even suggest which line
to add to the image core YAML to fix.
- Blocks, modules, and transport adapter YAMLs may include a `checks`
section and define validation checks there
- IO ports can declare if they require a connection or not
- Unconnected NoC-Block data ports trigger a warning now