FFTs with CUDA on the AIR-T with GNU Radio¶
GPUs are extremely well suited for processes that are highly parallel. The Fast Fourier Transform (FFT) is one of the most common techniques in signal processing and happens to be a highly parallel algorithm. Here you will learn how to use the embedded GPU built into the AIR-T to perform high-speed FFTs without the computational bottleneck of a CPU and without having to experience the long development cycle associated with writing VHDL code for FPGAs. With GPU processing on the AIR-T, you get the best of both worlds: fast development time and high speed processing.
GR-Wavelearner contains a processing block that allows AIR-T users to use NVIDIA's extremely efficient cuFFT library on the AIR-T, out of the box. Because the AIR-T is the only Software Defined Radio (SDR) with native GPU support, it may be used to accelerate FFT processing capability with very little programming expertise. Here is the short, three step process.
Note: This tutorial is designed for AirStack 0.5.0+
Step 1: Setup GR-Wavelearner Conda Environment¶
GR-Wavelearner is included in the AirStack conda environment. Please follow the conda tutorial for AirStack environment setup.
Step 2: Download the example
The file should be retrieved from the Deepwave gr-wavelearner repository directly. Open a terminal and run:
cd ~/Desktop wget https://raw.githubusercontent.com/deepwavedigital/gr-wavelearner/master/examples/gpu_fft_demo.grc
This command will place the
gpu_fft_demo.grc file on your Desktop.
Step 3: Run the example
To launch GNU Radio Companion, you must fiorst activate the conda environment created in Step 1. Run the following command in the terminal to start the environment and then start GNU Radio Companion.
conda activate airstack gnuradio-companion
To open the
gpu_fft_demo.grc file choose File -> Open, and select the
gpu_fft_demo.grc file you downloaded to the Desktop. Once complete, your screen will resemble the image below.
Now simply click the green Play button at the top of the GNU Radio application. That is it! You are now receiving live RF signal data from the AIR-T, executing a cuFFT process in GNU Radio, and displaying the real-time frequency spectrum.
Step 4: Tailoring to Your Application¶
While the example distributed with GR-Wavelearner will work out of the box, we do provide you with the capability to modify the FFT batch size, FFT sample size, and the ability to do an inverse FFT (additional features coming!). If you are an advanced GNU Radio user, we also provide the source code on our GitHub for you to customize to your needs.