For mutiple I/O realization, please take the following link. There are more details about the whole system as well.
This project is going to migrate DSP based on Verilog onto NI-USRP 2944R. Since the development tool is different from vivado, which I'm more familiar with. Hoping this starting guide can help any newer to USRP.
Since there are UHD3.0 & UHD4.0 already, as well as RFNoC3.0 & RFNoC4.0. All of them are still under-maintained but there isn’t downward compatibility. Actually, the tools are quite different for them. That leads to the workflow differently. For me, I follow the starting guide, the instruction let me git clone the RFNoC4.0, while the guides are written for the RFNoC3.0. Besides, RFNoC4.0 has just been introduced for over a year. Most of the resources are based on 3.0. The document for starting RFNoC4.0 is not clear about its dependency though.
Thus after a week of debugging, I summarized the workflow so far from my own experience. I'm still improving this project and the note. Please feel free to contact me or leave a message.
UHD4.0 works with RFNoc4.0, GNU radio3.8, Xilinx Vivado 2019.1. Make sure each version is capable to each other, or even a little update will cause a disaster.
If you understand what’s the meaning of the instruction. You can do little modifications to it (like make -j15). Besides, it's suggested to follow this priority and build from the source.
After all, restart the computer and now we have the working environment.
We can do some tricks to verify them.
If the result is wired, try this command to make sure usrp work correct.
For uploading default image, please refer to the link below.
https://files.ettus.com/manual/page_usrp_x3x0.html
I'm going to realize the "gain" module that example provided by UHD.
Let's start with creating the custom rfnoc block with rfnocmodtool.
In some situation you may able to skip the last two generation. Abstracted from "Getting Started with RFNoC Development"-AN-823 . It's worthy to note that though this file is for UHD3.0, there are some information that doesn't mention in "Getting_Started_with_RFNoC_in_UHD_4.0"-AN-400 .
Block Controllers Generation:
The block controllers are the C++ control that the user can apply to the UHD-part of the design. In these files, the user can add more control over this layer of the design. Depending on the complexity of the block it may be possible to add all necessary control using NoCScript (more details on NoCScript can be found in the section labeled UHD Integration). In this case the cpp/hpp block control files generation are not needed. Default is to generate as their existence will be ignored if not edited.
Block Interface:
Add more design specific functionality to the design at the GNU Radio interface by generating these block-interface files and adding necessary logic. Depending on the complexity of the block it may be possible to add all necessary control using NoC-Script. In this case the block-interface files are not needed. Default is to generate as their existence will be ignored if not edited.
Now we have the directory tree and we can divide it into three parts.
FPGA parts
Driver
GnuRadio Application
About this article that only talking about single I/O, we only need to program the FPGA part generally. The rest files are already done when the file structures are generated by rfnocmodtool.
For the project gain, it's not necessary to modify this file.
However, if the origin configuration can't satisfy you, like you want more ports. Editing the .yml file in /block folder as you wish. Then apply rfnoc_create_verilog.py to help you re-generate the corresponding .v file.
To have more details, our custom IP are wrapped by RFNoC and communcate to outside by noc_shell.v Thus modified I/O requires corresponding RFNoC file.
…
Mkdir a build folder at <repo> and cmake inside. For me since the cmake required by Vivado is 3.3.2 rather than over 3.8 that UHD needed. We need to specify the uhd/fpga folder as well.
The result should be like this.
Then we do the test bench by
It'll show the tb result.
Then we can build the image file.
or if you inster the debug probes, it'll be like:
After the image file building successfully, the .bin file will be in this directory.
Upload it.
An alternative method is viv_jtag_program or just using vivado. Generally, you only use this method when USRP bricks.
Re-power on the device and we can confirm the custom block by
We can observe the Block#0 in FPGA right now.
If your rfnoc port aren't 1 in out, which's the defalut setting and you're going to apply the rfnoc module with GnuRadio. Iti's necessary to modfiy the .grc yml to tell GnuRadio the correct port configure.
Let's see the result by appling the RFNoC block in GnuRadio.
–
USRP
, FPGA
, Ettus Research
, UHD
, RFNoC
, RFNoC搭建
jessest94106@g.ncu.edu.tw
Department of Space Science & Engineering
Center for Astronautical Physics & Engineering
National Central University, Taiwan
PieappleJSun, Mar 27, 2022