aboutsummaryrefslogtreecommitdiffstats
path: root/host/utils
Commit message (Collapse)AuthorAgeFilesLines
...
* utils: Correct relative path to config dir in rfnoc_image_builderAaron Rossetto2020-05-151-1/+1
| | | | | | | | | In commit 6a488d32, the RFNoC image builder module was moved from the host/utils/bin subdirectory to host/utils. That move rendered the relative path to the configuration directory in `get_config_path()` incorrect. This commit fixes the relative path specification of the configuration directory to reflect the new location of the Python script.
* utils: Remove 'six' dependency, fix minor PyLint issuesMartin Braun2020-05-121-9/+8
| | | | | | | This removes the 'six' dependency from converter_benchmark, thus making the utils subdirectory no longer depend on six. A few Python2-isms and PyLint issues were also fixed.
* utils: Update mako to propagate parametersWade Fife2020-05-112-13/+27
| | | | | | This cleans up the default parameters generated for the testbench template and adds the block parameters to the block and noc_shell instances so they can be used without having to remember to add them.
* Remove remaining Python 2 referencesMartin Braun2020-05-0713-15/+11
| | | | | | | This changes two things in all applicable files: - Remove imports from __future__ - Change default shebangs from /usr/bin/env python to /usr/bin/env python3
* python: Move the rfnoc image builder module under the uhd moduleMartin Braun2020-05-0520-1563/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note: This commit changes nothing to the way the image builder is being called. One can still run rfnoc_image_builder [...] as before. The difference is in the Python guts: Where previously one had to do import rfnoc now the incantation becomes: from uhd import imgbuilder (Note that the submodule uhd.rfnoc already exists for wrapping the RFNoC API into Python, hence the renaming from rfnoc to imgbuilder). This is done for a variety of reasons: - Now, there is only one and exactly one Python module for UHD that contains all the things, as opposed to before where there were two. - The rfnoc and uhd modules were installed in different ways (setuptools vs. CMake); that is now harmonized. This also removes a lot of CMake plumbing. - It is not common to import the rfnoc module for anyone other than rfnoc_image_builder
* uhd: Replaced deprecated usage of boost timer with std::chronoLars Amsel2020-05-041-3/+5
| | | | | replaced boost::timer by std::chrono::steady_timer to measure time interval
* utils: Remove trailing white space from mako templatesWade Fife2020-04-302-4/+4
|
* utils: Fix typo in testbench mako templateWade Fife2020-04-301-1/+1
|
* utils: Update copyright generated by blocktoolWade Fife2020-04-235-5/+5
| | | | | Updated to output current year. Changed capitalization and wording to be consistent with exisiting code.
* utils: Add sideband_at_end support to Mako templateWade Fife2020-04-213-15/+22
| | | | | | | | This adds a new option to the "AXI-Stream Data" (axis_data) FPGA interface type. The new option, "sideband_at_end", can be added to the output port of a block's YAML description to control whether the sideband information should be sampled at the end (sideband_at_end: 1) or the beginning (sideband_at_end: 0) of the AXI-Stream packet.
* utils: Add --lib-path option to uhd_config_infoMartin Braun2020-04-171-0/+4
| | | | This will print the path to the UHD library using get_lib_path().
* cal: Add utility to update all .fbs files, or check the generated onesMartin Braun2020-04-171-0/+126
| | | | | | | | | | | | Calling ./update_fbs.py will update all the generated files. ./update_fbs.py -V will check if the generated files are OK, and return non-zero if not.
* utils: usrp_burn_mb_eeprom: Avoid EEPROM write in read only casesteviez2020-04-151-17/+19
| | | | | | The usrp_burn_mb_eeprom previously updated the EEPROM at the end of the script, regardless of whether any values were actually specified for write. This skips the EEPROM write for read only usage.
* utils: Fix comment in axis_data templateWade Fife2020-04-141-1/+1
|
* utils: cal: Remove boost usage from usrp_cal_utils.hppMartin Braun2020-04-021-3/+0
| | | | | There were spurious boost includes left in here after applying 7ad64600f and a1f96194.
* utils: cal: Enable "ignore cal file" option for DC and IQ cal toolsMartin Braun2020-04-021-5/+5
| | | | | | | | | | | The utilities uhd_cal_rx_iq_balance, uhd_cal_tx_iq_balance, and uhd_cal_tx_dc_offset now add the flags to ignore cal files. Otherwise, the utility would load existing cal data before generating new cal data. Note that this is not a huge problem, because the cal coefficients get overwritten during the cal process, but is unnecessary disk I/O. This commit also happens to remove all boost::format uses within usrp_cal_utils.hpp.
* utils: Add convert_cal_data utilityMartin Braun2020-04-022-0/+105
| | | | | | | | | This will convert cal data files based on CSV to the new binary format. In most cases, running ./convert_cal_data.py is sufficient.
* uhd: cal: Use usrp::cal::database instead of CSV filesMartin Braun2020-04-021-24/+11
| | | | | | | | | Now that we have cal::iq_cal and cal::database, there's no need to manually wrangle CSV files for calibration data. This commit replaces all CSV operations with cal::database calls and uses cal::iq_cal as a container. CSV files can still be read, but are considered deprecated.
* utils: uhd_usrp_probe: Output frontend infoMichael West2020-03-311-5/+13
| | | | | | Add output of frontend info for RFNoC devices. Signed-off-by: Michael West <michael.west@ettus.com>
* utils: uhd_images_downloader: use HTTPS instead of HTTP to avoid redirectMarcus Müller2020-03-201-1/+1
| | | | | | | | Since the webserver responding to requests at http://files.ettus.com replies with a redirect to the same URL, but using the https:// transport, this isn't only the safer thing we should be doing, anyways, but also the quicker, since it saves the user from one unnecessary redirect.
* utils: cal: Replace property tree accesses with other API callsMartin Braun2020-03-121-43/+35
| | | | | | | | | | The cal utils read the property tree to identify the daughterboard information (serial, type, etc.). The paths for properties have changed in UHD 4.0, causing these utilities to fail. Instead of conditionally parsing the property tree, this commit changes the utilities such that dictionaries are pulled out of the multi_usrp object, which work regardless of the device type.
* utils/C API: Fix property tree accessMartin Braun2020-03-122-4/+4
| | | | | | | | | | The introduction of multi_usrp_rfnoc caused multi_usrp::get_device()->get_tree() to segfault for gen3 devices. In defcb174, we introduced a fix for this (multi_usrp::get_tree()) but we didn't apply it to internal utilities. That means the uhd_cal_* utilties were broken, along with certain sections of the C API, and the latency test suite. This fixes the segfault issue.
* examples: Update gain block testbench to use samplesWade Fife2020-03-091-1/+1
|
* sim: Parameterize chdr_word_t data typeWade Fife2020-03-091-1/+6
| | | | | | | | | | | | | | | | | | 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);
* uhd: Apply clang-format against all .cpp and .hpp files in host/Martin Braun2020-03-035-69/+72
| | | | | Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of files that clang-format gets applied against.
* utils: images downloader: Add support for UHD_IMAGES_URL, clean upMartin Braun2020-02-191-35/+29
| | | | | | - Remove Python2 compat hacks - Read the UHD_IMAGES_URL environment variable. If set, it overrides the default value for --base-url
* utils: images downloader: Handle missing content-length responseMartin Braun2020-02-191-7/+18
| | | | | | If the content-length header is not available, uhd_images_downloader will now ask the user if she wants to continue. Previously, the tool would throw an exception.
* utils: image_downloader: check write conditionssteviez2020-02-181-0/+13
| | | | | | | | | | Prior to downloading any images, check that the images destination: - Is a valid directory - Has valid permissions for images to be written Images are downloaded to a temporary location before being written to image destination, so these checks help avoid situation where images are downloaded but unable to be written
* fixup! utils: blocktool: Fix blocktoolWade Fife2020-02-062-5/+5
|
* utils: images_downloader: adding usage docsBrent Stapleton2020-01-221-2/+29
| | | | | Adding more details on uhd_images_downloader usage, as well as some technical details.
* cal_utils: fixup typoBrent Stapleton2020-01-091-1/+1
|
* 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
|