| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The blocks that are neither OOT, nor core blocks (like the DDC/DUC,
etc.) require additional info to find their appropriate Makefile.srcs
files. We don't include them in every build, to avoid building IP for
the FFT, FIR, and other blocks when they're not needed. However, those
blocks are in-tree, and don't follow the same directory structure as
out-of-tree modules, either.
We therefore allow the YAML files for those blocks (which are shipped
with UHD) to contain a path hint to their appropriate Makefile.srcs. The
image builder uses those paths to amend the `make` command
appropriately.
|
|
|
|
|
| |
For easier maintenance, some constants like paths and maps were moved to
the top of the Python file.
|
|
|
|
|
|
| |
The -I option was broken in multiple ways:
- Multiple -I options would only keep the last one
- The call to make did not actually append RFNOC_OOT_MAKEFILE_SRCS
|
|
|
|
|
|
|
|
|
|
| |
- Fix mako paths to run from anywhere
- Correct code errors and clean up generated code
- Add support for port parameters
- Add support for axis_data interface
- Fix NoC shell reset handling
- Replace Python functions with Verilog $clog2
- Allow input and output to share port name
|
| |
|
|
|
|
|
|
|
| |
- The -I switch now allows pointing to an OOT
- The image core file may now contain keys 'device' and
'default_target', which the image builder can use as default values.
Command line switches --device and --target are still honoured.
|
|
|
|
|
|
| |
The ports in the fpga need to be ordered to make correct
connections in verilog. This also keeps generated verilog
constant across runs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note: Replacing everything with a lambda would be even better, but that
can't be easily scripted so we'll do this as a first step to reduce the
Boost footprint.
This also removes occurences of #include <boost/bind.hpp>, and makes
sure all usages of std::bind have an #include <functional>. clang-format
wasn't always applied to minimize the changeset in this commit, however,
it was applied to the blocks of #includes.
Due to conflicts with other Boost libraries, the placeholders _1, _2,
etc. could not be directly used, but had to be explicitly called out
(as std::placeholders::_1, etc.). This makes the use of std::bind even
uglier, which serves as another reminder that using std::bind (and even
more so, boost::bind) should be avoided.
nirio/rpc/rpc_client.cpp still contains a reference to boost::bind. It
was not possible to remove it by simply doing a search and replace, so
it will be removed in a separate commit.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes the following Boost constructs:
- boost::shared_ptr, boost::weak_ptr
- boost::enable_shared_from_this
- boost::static_pointer_cast, boost::dynamic_pointer_cast
The appropriate includes were also removed. All C++11 versions of these
require #include <memory>.
Note that the stdlib and Boost versions have the exact same syntax, they
only differ in the namespace (boost vs. std). The modifications were all
done using sed, with the exception of boost::scoped_ptr, which was
replaced by std::unique_ptr.
References to boost::smart_ptr were also removed.
boost::intrusive_ptr is not removed in this commit, since it does not
have a 1:1 mapping to a C++11 construct.
|
|
|
|
|
|
| |
THIS_PORTID was calculating the block port ID via the number of SEPs
in the design, but it should be smaller when not all SEPs have a ctrl
port. This commit fixes that calculation.
|
|
|
|
|
|
|
| |
This commit removes all files and parts of files that are used by
proto-RFNoC only.
uhd: Fix include CMakeLists.txt, add missing files
|
|
|
|
|
|
| |
- --interactive-reg-shell $BLOCKID will let you peek and poke registers
in an RFNoC block
- Blocks and static connections are printed
|
|
|
|
|
|
|
|
| |
Remove UHD call to elevate thread priority to realtime from utils, and
add warning in documentation of set_thread_priority function. Setting
all threads to the same realtime priority can cause the threads to not
share access to the network interface fairly, which adversely affects
operation of the worker threads in UHD.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The builder has two major jobs:
* generate an image core file which reflects the FPGA image
configuration given by the user
* invoke Xilinx toolchain to actually build the FPGA image
For this purpose it needs to know where to find the FPGA source tree.
This tree can be give by the -F option.
The code that represents the user configurable part of the image is
written to a file called <device>_rfnoc_sandbox.v. To generate the file
these configuration files are needed:
* io_signatures.yml: A file describing the known IO signatures. This file
is global for all devices and contains the superset
of all signatures (not all signatures are used by all
devices). It resides in usrp3/top/ of the tree given
by -F.
* bsp.yml: A file describing interfaces of a specific device such as AXIS
transport interfaces or IO ports as well as device specific
settings. It resides in usrp3/top/<device> of the tree given by -F.
* <image>.yml: a file provided by the user with freely chosen name.
It describes which elements the image should contain
(RFNoC blocks, streaming endpoints, IO ports) and how
to connect them. The file also contains image setting
such as the CHDR width to be used.
The script uses mako templates to generate the sandbox file. Before the
template engine is invoked sanity checks are executed to ensure the
configuration is synthactic correct. The script also build up structures
to ease Verilog code generation in the template engine. The engine should
not invoke more Python than echoing variables or iterating of lists or
dictionaries. This eases debugging as errors in the template engine are
hard to track and difficult to read for the user.
All Python code is placed in a package called rfnoc. The templates used
by the builder are also part of this package. image_builder.py contains
a method called build_image which is the main entry point for the builder.
It can also be utilized by other Python programs. To align with the
existing uhd_image_builder there is also a wrapper in bin called
rfnoc_image_builder which expects similar commands as the uhd_image_builder.
For debugging purpuse the script can be invoked from host/utils using
$ PYTHONPATH=. python bin/rfnoc_image_builder <options>
When installed using cmake/make/make install the builder installs to
${CMAKE_INSTALL_PREFIX}bin and can be invoked without specifying a
PYTHONPATH.
One can also install the package using pip from host/utils
$ pip install .
Image config generation can also be done from GNU Radio Companion
files. The required GRC files are merged into gr-ettus.
Example usage:
$ rfnoc_image_builder -F ~/src/fpgadev -d x310 \
-r path/to/x310_rfnoc_image_core.grc \
-b path/to/gr-ettus/grc
Co-Authored-By: Alex Williams <alex.williams@ni.com>
Co-Authored-By: Sugandha Gupta <sugandha.gupta@ettus.com>
Co-Authored-By: Martin Braun <martin.braun@ettus.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is an initial generator for eRFNoC block.
The script generates the top level block, the shell module, a testbench, and a
Makefile as well as a Makefile.srcs.
To build a block from a yml file one has to invoke
python -c <config> -d <destination folder>
destination folder should be an in tree module folder located in
uhd-fpga/usrp3/lib/erfnoc/blocks
The build tool supports all interface types for control as well as data.
For each interface type there are three templates to generate the variable
block in the top level block and the shell
* declare the wires
* connect the wires
* instantiate the modules
The first two are used in the shell module as well as in the top level block.
The last is for the shell only.
|
|
|
|
|
|
| |
The old loop didn't have any output, and had an inaccurate timeout. We
now use a timer for a 30 second timeout, and print a . every time we
poll the sensor.
|
|
|
|
|
|
|
| |
Updated b2xx_fx3_utils to add a --query_bootloader option to check if
the bootloader is loaded or not.
Signed-off-by: michael-west <michael.west@ettus.com>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Turns the E310 into an MPM device (like N3xx, E320)
- Factor out common code between E320 and E310, maximize sharing between
the two devices
- Remove all pre-MPM E310 code that is no longer needed
- Modify MPM to remove all existing overlays before applying new ones
(this is necessary to enable idle image mode for E310)
Co-authored-by: Virendra Kakade <virendra.kakade@ni.com>
Signed-off-by: Virendra Kakade <virendra.kakade@ni.com>
|
| |
|
|
|
|
|
| |
- Update MB EEPROM
- Add bootloader load command to fx3 util
|
|
|
|
| |
Updating all SPDX license identifiers to include "-or-later"
|
|
|
|
|
|
| |
- The other cal utilities (TX IQ and TX DC) already do this.
- This fixes calibration for certain frequencies on N320/N321.
- Old calibration data is still valid after this change.
|
|
|
|
|
|
|
| |
This change prevents invalid positional options from being accepted into
uhd_image_loader. Previously, if a user forgot to specify the option
type, uhd_image_loader would proceed and look like it succeeded, but the
intended image may not have been loaded.
|
|
|
|
| |
Signed-off-by: michael-west <michael.west@ettus.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Applying formatting changes to all .cpp and .hpp files in the following
directories:
```
find host/examples/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find host/tests/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find host/lib/usrp/dboard/neon/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find host/lib/usrp/dboard/magnesium/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find host/lib/usrp/device3/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find host/lib/usrp/mpmd/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find host/lib/usrp/x300/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find host/utils/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find mpm/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
```
Also formatted host/include/, except Cpp03 was used as a the language
standard instead of Cpp11.
```
sed -i 's/ Cpp11/ Cpp03/g' .clang-format
find host/include/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
```
Formatting style was designated by the .clang-format file.
|
|
|
|
|
|
| |
Turning off clang formatting around the program option declarations.
clang-format makes them looks bad an unreadable because it thinks the
options are function calls or something.
|
|
|
|
|
|
| |
Various data structures are nicely formatted to be human-readable.
clang-format makes these structures harder to read, so we can skip
formatting these sections.
|
| |
|
|
|
|
|
|
|
|
|
| |
- Sets time source before checking ref_locked
(E310 uses time source for PLL)
- Checks for existence of "gpsdo" time and clock sources before setting
- Only attempts to set them if they exist
- Does not fall back on external sources
- Returns with error if neither can be set to "gpsdo"
|
|
|
|
| |
Use "std::abs" instead of "abs" for better compiler compatibility
|
|
|
|
|
|
|
|
|
|
| |
Change the uhd_images_downloader's first line to execute with a runtime
Python interpreter, as determined at UHD build time. Users can still
use an arbitrary Python executable by calling
`python uhd_images_downloader`
This will fix our embedded products by ensuring that we call Python3
when running uhd_images_downloader in embedded mode.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This lets the user specify a HTTP proxy. The environment variable
HTTP_PROXY is still usable, but --http-proxy will override it. Example:
$ uhd_images_downloader \
--http-proxy http://user:pass@10.20.30.40:3128 \
-t x310
Here, the tool will download all the images matching 'x310' using
a proxy at 10.20.30.40.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also updates our coding style file.
Ancient CMake versions required upper-case commands. Later command
names became case-insensitive. Now the preferred style is lower-case.
Run the following shell code (with GNU compliant sed):
cmake --help-command-list | grep -v "cmake version" | while read c; do
echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
done > convert.sed \
&& git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' \
'*CMakeLists.txt' | xargs -0 gsed -i -f convert.sed && rm convert.sed
(Make sure the backslashes don't get mangled!)
|
|
|
|
|
|
| |
This is effectively a refactoring: The main() function now returns True
on success. This fixes a bug where one branch would simply return (None)
instead of returning a value.
|
|
|
|
|
|
|
|
|
| |
If platform.system() is 'Windows', the Python script will stall on
error before terminating, e.g., when an import is missing or when an
unexpected Exception occurred during the execution.
The rationale is that many Windows users run this script directly,
without a shell, and wouldn't have a way to see error messages from the
script in that case.
|
|
|
|
|
|
|
| |
Since the uhd_images_downloader is so tightly integrated into our
infrastructure, we've dropped support for .tar.gz and .tar.xz file for
this particular purpose. Note that UHD releases still receive images in
all three formats.
|
|
|
|
|
| |
No functional changes. The main effort was to reduce the length of
main() and reduce the number of Pylint warnings.
|
|
|
|
|
|
| |
Note: All archives shipped using this tool are zip files. However, this
allows us to ship other types of files, which will be downloaded and
sorted into the images directory as-is.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This download limit prevents users from accidentally downloading really
large files. The default limit is 100 MiB. When a file is selected for
download that exceeds this size, the user is prompted if she really
wants to download that file.
By specifying --yes (or -y), this can can be bypassed. Example:
$ uhd_images_downloader --yes -t sdimg
Will match all files that match 'sdimg', which are typically larger than
100 MiB, without interaction.
|
|
|
|
|
|
|
|
|
| |
This will answer 'yes' to all questions that are asked and allows to
script the downloader. Example:
$ uhd_images_downloader -t sdimg -y
Any interaction that the script will have with the user will be skipped.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Running
$ uhd_images_downloader -l
will now print the full URL of the target. By specifying
$ uhd_images_downloader -l --url-only
It will *only* print the URLs, nothing else, making this suitable for
scripting. The list will always go to stdout, whereas the logging is
going to stderr and thus can easily be siphoned off.
|
| |
|
| |
|
|
|
|
|
| |
Users can supply the --test/-T option to test the downloaded archive
before extracting it, using the Python zipfile.testzip() function.
|
|
|
|
|
| |
uhd_images_downloader: Adding INFO message when there is no target
selected to download, as when the user misspells a target name.
|
|
|
|
|
|
|
|
| |
uhd_images_downloader was mismanaging the image inventory- image
packages entries were not being deleted when the images were
overwritten. Now, each target is saved as a single entry in the
inventory, which is overwritten when a new image package is
downloaded.
|
|
|
|
| |
Replace with std::this_thread::sleep_for().
|
| |
|