Getting Started with RFNoC Development
Contents
Overview
In order to minimize the effort needed to implement a new RFNoC Out-Of-Tree module, this gr_modtool based tool provides the basic structure of the necessary files needed for the user to start with the development of his/her custom design right away. As it is gr_modtool based, the manual found at [1] is also a great reference for this tool. Here, we discusse the features for this specific variation
With the use of RFNoC ModTool, you can skip the struggle of locating the files of your design at different locations that depend (until now) on the location of your uhd and gr-ettus installation paths. Instead, you focus on your implementaton and the tool does the linking for you. Tool InstallationThe tool is currently shipped within gr-ettus within the branch {BRANCH NAME}, so you can install it using pybombs or by source gr-ettus Installation using PyBOMBSIf you don't have already downloaded and installed PyBOMBS, you can do it by running the following commands: $ sudo pip install git+https://github.com/gnuradio/pybombs.git $ pybombs recipes add gr-recipes git+https://github.com/gnuradio/gr-recipes.git $ pybombs recipes add gr-etcetera git+https://github.com/gnuradio/gr-etcetera.git Now you have two options for setting up the gr-ettus branch. You can run directly the pybombs installation command: $ pybombs prefix init /path/to/prefix -R gr-ettus%{BRANCH NAME} [-a alias] or you could use the specific recipe that contains the packages compatible with the tool:
$ pybombs prefix init /path/to/prefix -R gr-ettus-modtool [-a alias] gr-ettus Installation by sourceIt is important to notice that this tool is still in an early stage, and this creates the necessity of installing the gr-ettus dependencies that are compatible with the tool, reason why it is recommended to checkout directly to the stated branches: $ git clone --recursive -b rfnoc-radio-redo https://github.com/EttusResearch/uhd.git $ git clone -b maint https://github.com/gnuradio/gnuradio.git $ git clone -b radio-redo https://github.com/EttusResearch/gr-ettus.git If you have already uhd, gnuradio and/or gr-ettus installed, it would be sufficient to checkout to the depicted branches and pull them. Thereafter, build each of the repositories (building UHD before GNURadio is, because of the dependencies, recommended.) Tool UtilizationAfter the installation, you are ready to use the tool to generate standard code for your Out-of-tree module. To check the usage of the tool, just type: $ rfnocmodtool --help linux; GNU C++ version 4.8.4; Boost_105400; UHD_003.010.rfnoc-radio-redo-0-fd4d734e Usage: rfnocmodtool <command> [options] -- Run <command> with the given options. rfnocmodtool help -- Show a list of commands. rfnocmodtool help <command> -- Shows the help for a given command. List of possible commands: Name Aliases Description ===================================================================== disable dis Disable block (comments out CMake entries for files) info getinfo,inf Return information about a given module remove rm,del Remove block (delete files and remove Makefile entries) makexml mx Make XML file for GRC block bindings add insert Add block to the out-of-tree module. newmod nm,create Create a new out-of-tree module rename mv Rename a block in the out-of-tree module. If you have used the gr_modtool provided by GNURadio, you'd be familiar with this usage. Creating a RFNoC OOT ModuleAt this point you are all set up to start generating your own RFNoC OOT and if you were thinking that it is just as easy as it is with gr_modtool, you are completely right! Simply go to a desired location and type: $ rfnocmodtool newmod [NAME OF THE MODULE] For this manual and for explanatory purposes, lets give the module a name: 'example'. You can write the name of your module right after the 'newmod' command, but if you happen to forget it, the tool will ask for it interactively. This will create a folder containing the basic folders that you may need for a functional module. $ rfnocmodtool newmod example linux; GNU C++ version 4.8.4; Boost_105400; UHD_003.010.rfnoc-radio-redo-0-fd4d734e Creating out-of-tree module in ./rfnoc-example... Done. Use 'rfnocmodtool add' to add a new block to this currently empty module. $ ls rfnoc-example/ $ apps cmake CMakeLists.txt docs examples grc include lib MANIFEST.md python README.md rfnoc swig In contrast with the gr_modtool, here is to notice the generation of the folder 'rfnoc', which will held the UHD/fpga files. More details on this will come later in this reference manual. Adding custom blocksNow you can start adding blocks to your module. The only thing to do is go inside of the module you just created and type: $ rfnocmodule add [NAME OF THE BLOCK]
Other Resources[1] GNURadio OutOfTree Modules: http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModules https://github.com/EttusResearch/uhd/wiki/RFNoC:-Getting-Started https://github.com/EttusResearch/uhd/wiki/RFNoC:--Specification |