Improving user experience with examples.
- added/updated example's functionality and intent in --help
- added/updated each arg help description in --help
- updated doc string as per ni-python-styleguide
When the image core YAML file contained problems such as:
- Invalid block names
- Invalid port names
- Incompatible connections of IO ports
...in a connection definition, the most likely outcome would be an
exception thrown with a cryptic message like this:
AttributeError: 'CommentedMap' object has no attribute 'io_ports'
With this change, all connections are scanned for validity before
continuing. Also, to make the the error message outputs more useful, the
list of valid connections are folded into the individual error message,
and no longer towards the end of the image builder output.
For example, the error message could now look like this:
⛔ There are errors in the image core file's connection settings:
Destination port 'nullSink0.in_0' not found. Available ports on \
'nullSink0': sink, loop
Source port 'nullSink0.out_0' not found. Available ports on \
'nullSink0': source, loop
This makes sure that the device is still in the same state
(regarding installed FPGA, network configuration, etc.) as for the
previously executed tests (host pytest, embedded pytest).
- Added more log statements
- Check if the block descriptor file is even available, and exit with
a readable message if not
- Allow for .yml and .yaml filename extensions
- When finding a list of files, check for duplicates and existence
- Create a StepError exception type, which makes it easy to exit the
step sequence with nice logging
- Always make os available in mako resolution
- Add find_file step
- Improve error handling in parse_descriptor
- Improve log formatting compared to existing warnings or errors
- Refactor insert_after and insert_before (deduplicate code)
- Add warning when overwriting files with write_template
When a re-bind occurs, the include paths in the binding file get
otherwise modified to rfnoc_gain/rfnoc_gain.h, instead of
gnuradio/rfnoc_gain/rfnoc_gain.h.
In a previous commit, these files where forgotten and are now added
back. This file is referred to in the CMakeLists.txt, so it is expected,
and its absence will cause a failure during installation.
During redesign of the OOT module directory layout, the block YAMLs and
dts files were moved under `rfnoc/`, but the gateware was not. This
causes an inconsistency in the directory layout before and after
installation, making it hard to switch between installed and
not-installed versions of RFNoC modules.
For example, block YAMLs are in `./rfnoc/blocks/*.yml`, and gateware is
in `fpga/gain/rfnoc_block_gain/*`. After installation, block YAMLs are
in `$PREFIX/share/uhd/rfnoc/blocks/*.yml`, and gateware is in
`$PREFIX/share/uhd/rfnoc/fpga/gain/rfnoc_block_gain/*` -- note the
discrepancy.
This fixes two immediate issues:
- When building the X410 example in-tree, the DTS file was not being
found because it used the same finding logic as the gateware source files.
- When building any image core file post-installation, none of the
gateware could be found because it used the same logic for finding
gateware inside the OOT, which is in a different location relative to
the block YAMLs.
By removing the inconsistencies, both these use cases work.
A note on backward compatibility:
- Existing OOT modules already have the issue that building bitfiles
post-install does not work, and that will continue to not work.
However, otherwise, they will keep working as before.
- Because people may have gotten accustomed to specifying the RFNoC OOT
module as the include directory (e.g., `rfnoc_image_builder -I
/path/to/rfnoc-gain`), we allow for this use case, and auto-correct
the include path in this case with some backward compatibility code.
- Building the rfnoc-gain/icores/x410_XG_200_rfnoc_image_core.yml
example image core file now also works, even with older versions of
rfnoc-gain.
ZBX already exposed a temperature sensor: `temperature` which
returns the mean value of the top and bottom temperature sensors.
Add sensors `temperature_top` and `temperature_bottom` for
reading the values of the temperature sensors separately.
In some cases, rpclib uses the value of the `__cplusplus` macro to
determine implementation details. We remove these, as UHD requires C++17
anyway now and the value of __cplusplus may be broken depending on
compilers.
MPM configures a DNAT rule for incoming CHDR packets which
forwards the packets to the FPGA via the internal network
interface.
For CHDR packets coming back from the FPGA, the DNAT rule
translates back the IP address to the external IP address
but only within 30 seconds after the incoming CHDR packet.
The reason for this is the connection tracking (conntrack)
timeout which typically defaults to 30 seconds for UDP
connections in the absence of bidirectional traffic.
To ensure that forwarding of CHDR packets works in all cases,
this commit adds a SNAT rule.
Iptables NAT rules before the change:
# iptables -t nat -L -n
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DNAT udp -- anywhere anywhere udp dpt:49153 to:169.254.0.2
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
Iptables NAT rules after the change (192.168.10.2 is exemplary,
it corresponds to the IP address of the eth0 interface):
# iptables -t nat -L -n
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DNAT udp -- 0.0.0.0/0 192.168.10.2 udp dpt:49153 to:169.254.0.2
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
SNAT udp -- 169.254.0.2 0.0.0.0/0 udp spt:49153 to:192.168.10.2
Extend private init-device function to require parameter additional
write-serial parameter to ensure device can return a serial number
to Window 10+ after device enumeration.
Add private functions to erase eeprom map content, and to dump full
eeprom content into a file.
Created local function to check eeprom revision to remove code
duplications.
A missing "else" after 6ea4e48 was causing two configurations to occur
at the same time for some values of SIZE.
This commit also sets the "space" and "occupied" outputs to 0 when in
pass-through mode.
This brings back the package PkgChdrUtils after it was removed in
d9f8c08. Its contents were moved because most of the contents were
synthesizable, but many existing testbenches might still reference the
old package name. This new version of PkgChdrUtils simply imports then
exports the things it used to include. New testbenches are encouraged
to reference the new files instead of PkgChdrUtils.
This is an addition to d9f8c08, in which testbench-related code was
moved. The RFNoC testbenches were all updated, but not the OOT-related
testbenches (in rfnoc-gain, and in the OOT templates).
The E31x has the advantage that it can be targeted from the free tier of
Vivado, which means users can start writing blocks and running
testbenches without having to purchase a Vivado license. This is already
possible today by specifying -DUHD_FPGA_DEFAULT_DEVICE=e31x when running
cmake, but we think this will further lower the entry level for RFNoC
developers by making the free-tier option the default.
Improving user experience with examples.
- added example's functionality and intent in --help
- added each arg help description in --help
- added summary to each function module
- added more prints in during operation
Boost.Process 1.88.0 will make `boost::process::v2` the default which
breaks compilation of rx_samples_to_file.cpp. This change uses v1
headers and inline namespace to fix build.