aboutsummaryrefslogtreecommitdiffstats
path: root/host/utils/setup.py.in
Commit message (Collapse)AuthorAgeFilesLines
* python: Use setup from setuptoolsAaron Rossetto2022-01-141-1/+1
| | | | | This commit replaces the use of setup() from distutils.core with setup() from setuptools.
* Remove remaining Python 2 referencesMartin Braun2020-05-071-1/+1
| | | | | | | 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
* rfnoc: Add a new builder script for FPGA images based on eRFNoC.Lars Amsel2019-11-261-0/+14
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>