Contact me on

I'm specialized in programmable devices, Matlab, and recently moving to mobile applications.
More about me..
   

Tuesday, 25 August 2015

Installing ETTUS RFNoC


RFNoC is a branch to the universal hardware driver UHD of ETTUS platform [1]. Its primary goal is to simplify the FPGA coding process [2][3]. For example, to add a new FFT module to the existing UHD code may take weeks. Thanks to RFNoC this will be reduced to few hours[3].
The first thing to get started with RFNoC is to install it (that makes sense!). I installed RFNoC an Ubuntu virtual machine. Although the installation steps are explained in the RFNoC wiki [4], I had many troubles installing it. Therefore, I decided to write this document with detailed installation steps until the gnu radio companion looks like this picture.


Installation Steps

Step 1: Make sure that your machine has decent amount of RAM (4 GB+). Then, create a new directory in your home folder.
cd /home/<username>
mkdir rfnoc
Step 2: Get the latest UHD release
git clone https://github.com/EttusResearch/uhd.git
Step 3: Navigate inside the UHD release that we have just downloaded and switch to RFNoC branch
cd uhd
git checkout -b rfnoc-devel -t origin/rfnoc-devel
Step 4: Navigate into the host directory and enter cmake, and make commands in the following order
cd uhd/host
mkdir build
cd build
cmake ../
make
make test
sudo make install
Step 5: Download FPGA images and access FPGA code
uhd_images_downloader
git submodule init   # This only needs to be run the first time\
git submodule update

Step 6: Testing installation [optional].
uhd_usrp_probe --init-only
If the USRP is not connected but installation is correct, you will get the following message
linux; GNU C++ version 4.8.4; Boost_105400; UHD_003.009.rfnoc-431-g69bdeed3 Error: LookupError: KeyError: No devices found for -----> Empty Device Address
 Step 7: Install gnuradio using the build script (forget about old ways)
wget http://www.sbrac.org/files/build-gnuradio && chmod a+x ./build-gnuradio && ./build-gnuradio
Step 8: To get started with GNU Radio + RFNoC, we need the gr-ettus library
cd /home/<username>
git clone https://github.com/EttusResearch/gr-ettus.git
cd gr-ettus
mkdir build
cmake ../
make
sudo make install
Step 9: [Optional] if the make command fails, you may face this error
Linking CXX executable ettus_swig_swig_2d0df  Swig source /home/syassin/gr-ettus-src/gr-ettus/swig/ettus_swig.i:152: Error: Unable to find 'ettus/rfnoc_vector_iir_cc.h' make[2]: *** [swig/ettus_swig_swig_2d0df] Error 1 make[1]: *** [swig/CMakeFiles/ettus_swig_swig_2d0df.dir/all] Error 2 make: *** [all] Error 2
This is solved by commenting the library 'gr-ettus/swig/rfnoc_vector_iir_cc.h' in the file 'gr-ettus/swig/ettus_swig.i', because it was replaced by rfnoc_generic.
//#include "ettus/rfnoc_vector_iir_cc.h"
//%include "ettus/rfnoc_vector_iir_cc.h"

//GR_SWIG_BLOCK_MAGIC2(ettus, rfnoc_vector_iir_cc);
Step 10: We are done! Just open gnu radio companion and start coding your first RFNoC example. Most probably that is my next article :) Enjoy developing SDR :) :)
gnuradio-companion
References
[1] UHD wiki: http://code.ettus.com/redmine/ettus/projects/uhd/wiki
[2] First public demo: https://www.youtube.com/watch?v=9oPxIFtwyb8
[3] Conference presentation  https://www.youtube.com/watch?v=ZH4ix-yr7f0
[4] RFNoC wiki: https://github.com/EttusResearch/uhd/wiki/RFNoC:-Getting-Started

No comments:

Post a Comment