aboutsummaryrefslogtreecommitdiffstats
path: root/host/utils
Commit message (Collapse)AuthorAgeFilesLines
* image builder: Add ability to pick up extra Makefile.srcs from YAMLSMartin Braun2019-11-261-1/+18
| | | | | | | | | | | | | | 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.
* utils: image builder: Factor out some data to top of image_builder.pyMartin Braun2019-11-261-31/+41
| | | | | For easier maintenance, some constants like paths and maps were moved to the top of the Python file.
* rfnoc: image builder: Fix include pathsMartin Braun2019-11-262-6/+16
| | | | | | 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
* utils: blocktool: Fix blocktoolWade Fife2019-11-2625-585/+1402
| | | | | | | | | | - 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
* utils: image_builder: Support parameterized number of ports on blocksWade Fife2019-11-264-47/+76
|
* rfnoc: image_builder: Fix -I, allow devices/targets to bet set in YAMLMartin Braun2019-11-262-19/+21
| | | | | | | - 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.
* utils: image_builder: Fix ordering of noc_blocks, portsSugandha Gupta2019-11-261-6/+25
| | | | | | The ports in the fpga need to be ordered to make correct connections in verilog. This also keeps generated verilog constant across runs.
* uhd: Replace all occurrences of boost::bind with std::bindMartin Braun2019-11-263-3/+6
| | | | | | | | | | | | | | | | | | | | | 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.
* uhd: Replace usage of boost smart pointers with C++11 counterpartsMartin Braun2019-11-261-1/+1
| | | | | | | | | | | | | | | | | | | 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.
* images: Fix THIS_PORTID calculation to offset from num ctrl_sepsAlex Williams2019-11-261-1/+1
| | | | | | 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.
* Remove proto-RFNoC filesMartin Braun2019-11-265-15/+14
| | | | | | | This commit removes all files and parts of files that are used by proto-RFNoC only. uhd: Fix include CMakeLists.txt, add missing files
* utils: Add RFNoC-specific features to uhd_usrp_probeMartin Braun2019-11-261-9/+120
| | | | | | - --interactive-reg-shell $BLOCKID will let you peek and poke registers in an RFNoC block - Blocks and static connections are printed
* utils: remove thread priority elevationCiro Nishiguchi2019-11-264-8/+0
| | | | | | | | 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.
* rfnoc: Add a new builder script for FPGA images based on eRFNoC.Lars Amsel2019-11-2622-0/+1679
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* rfnoc: add eRFNoC block builder to generate boiler plate VerilogLars Amsel2019-11-2618-0/+1069
| | | | | | | | | | | | | | | | | | | | | | | 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.
* utils: query_gpsdo_sensors: Fix ref_lock wait loopMartin Braun2019-11-211-1/+4
| | | | | | 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.
* B200: Add command to query bootloader statusmichael-west2019-08-061-1/+9
| | | | | | | 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>
* utils: converter_benchmark: Fix scaling for sc16->fc32Martin Braun2019-07-201-2/+2
|
* convert: benchmark: Make converter benchmark Py3k compatibleMartin Braun2019-07-201-4/+5
|
* e310/e320: Move E310 to MPM architecture and refactorSugandha Gupta2019-05-011-7/+0
| | | | | | | | | | | | - 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>
* utils: Add X300/X310 reset programNick Foster2019-04-241-0/+109
|
* b200: enable usage of custom bootloaderMark Meserve2019-04-111-23/+111
| | | | | - Update MB EEPROM - Add bootloader load command to fx3 util
* uhd: mpm: update all license header w/ "-or-later"Brent Stapleton2019-03-082-2/+2
| | | | Updating all SPDX license identifiers to include "-or-later"
* uhd: set tx gain to max for rx iq calMark Meserve2019-02-211-2/+7
| | | | | | - 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.
* utils: Deny positional options in uhd_image_loaderAlex Williams2019-02-131-1/+3
| | | | | | | 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.
* utils: Add check for gdb_eeprom before accessingmichael-west2019-01-291-1/+1
| | | | Signed-off-by: michael-west <michael.west@ettus.com>
* uhd: mpm: apply clang-format to all filesBrent Stapleton2019-01-1619-2187/+2351
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* examples: utils: skip formatting program optionsBrent Stapleton2019-01-1615-0/+30
| | | | | | 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.
* uhd: skip formatting misc arrays, maps, etc.Brent Stapleton2019-01-161-0/+2
| | | | | | 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.
* uhd: update cal utilities to support rhodiumMark Meserve2019-01-091-3/+6
|
* utils: Improve query_gpsdo_sensorsmichael-west2018-12-201-31/+28
| | | | | | | | | - 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"
* responder: Better "abs()" compiler compatibilityMichael Dickens2018-12-122-2/+2
| | | | Use "std::abs" instead of "abs" for better compiler compatibility
* utils: specify the downloader's Python executableBrent Stapleton2018-11-261-1/+1
| | | | | | | | | | 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.
* utils: uhd_images_downloader: Add --http-proxy optionMartin Braun2018-11-161-2/+11
| | | | | | | | | | | | 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.
* cmake: Update coding style to use lowercase commandsMartin Braun2018-11-142-71/+71
| | | | | | | | | | | | | | | | | 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!)
* utils: Fix downloader return value for main()Martin Braun2018-11-131-7/+11
| | | | | | 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.
* utils: Downloader stall on error for Windows usersMartin Braun2018-11-131-2/+30
| | | | | | | | | 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.
* utils: uhd_images_downloader: Remove archive typeMartin Braun2018-11-131-28/+22
| | | | | | | 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.
* utils: uhd_images_downloader: Refactor the toolMartin Braun2018-11-131-115/+153
| | | | | No functional changes. The main effort was to reduce the length of main() and reduce the number of Pylint warnings.
* utils: Allow downloader to ship non-zip filesMartin Braun2018-11-131-5/+13
| | | | | | 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.
* utils: uhd_images_downloader: Add download limitMartin Braun2018-11-131-1/+25
| | | | | | | | | | | | | | 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.
* utils: uhd_images_downloader: Add --yes optionMartin Braun2018-11-131-0/+25
| | | | | | | | | 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.
* utils: add downloader printing fetchable URLsMartin Braun2018-11-131-12/+24
| | | | | | | | | | | | | | 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.
* utils: Make uhd_images_downloader log to stderrMartin Braun2018-11-131-2/+2
|
* utils: Factor wait_for_lo_lock() out of cal utilsMartin Braun2018-08-294-24/+19
|
* uhd: utils: Add Zip test to downloaderBrent Stapleton2018-08-281-2/+15
| | | | | Users can supply the --test/-T option to test the downloaded archive before extracting it, using the Python zipfile.testzip() function.
* uhd: utils: Downloader logs no targets selectedBrent Stapleton2018-08-281-0/+5
| | | | | uhd_images_downloader: Adding INFO message when there is no target selected to download, as when the user misspells a target name.
* utils: fixup for downloader inventory managementBrent Stapleton2018-08-211-12/+19
| | | | | | | | 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.
* lib: Purge all references to boost::this_thread::sleep()Martin Braun2018-04-305-11/+18
| | | | Replace with std::this_thread::sleep_for().
* utils: fix 30s timeout in query_gpsdo_sensorsTrung N Tran2018-04-301-7/+12
|