PYNQ Radio

Abstract

The goal of this project is to explore the PYNQ platform and open-source framework along with the open-source GNURadio software. GNURadio is a suite of signal processing blocks written in C++/python that can be connected together to implement varying functionality such as software defined radios, filters, etc. These blocks are designed to run on general purpose CPUs which provide only limited computational efficiency. Some of these blocks can benefit from hardware acceleration by offloading the blocks to FPGAs. The PYNQ platform has both ARM CPU as well as FPGA and so is suitable for our goals. We have chosen FM Receiver as the application to be accelerated with the WBFM receiver block as the block to be offloaded on to the FPGA. Apart from implementing the said functionality we also document the steps of the entire process since there is currently limited documentation available for the PYNQ platform.

Motivation

General purpose processors are great when it comes to performing decision based control tasks, however they are not suitable for performing large quantities of repetitive data-processing tasks since they have fixed functional units which can perform only a single operation at a time. This is where "hardware accelerators" such as FPGAs come in. FPGAs (Field Programmable Gate Arrays) allow you to "program" the hardware so that you can support a number of specific functional units as required by the application and perform a large number of computations in parallel.

Thus, the ideal method is to optimally balance both these solutions. The main processor can provide the FPGA with the appropriate data and instruct it to execute its task. The FPGA can perform its tasks in parallel while the processor is free to do something else. When the task has completed, the FPGA can signal the processor which then retrieves the required results.

PROJECT APPROACH

Our project entails taking a computationally intensive software application, identifying the compute-heavy part, and "offload" that part to dedicated hardware (FPGA), in order to make the resulting application (a combination of software and hardware) much more efficient in terms of computation and energy. The final application would have the lighter part running in software and the compute-intensive part running on dedicated hardware, i.e. the application would run on a heterogenous platform.

One such heterogenous platform is the Xilinx Zynq - which integrates a general purpose processor (ARM CPU) with an FPGA from Xilinx. After programming the FPGA, it exclusively executes the application it was programmed for. Thus, there is a lot more scope for parallelism and efficient design (tailored to the application) while using an FPGA. This leads to significant performance and energy benefits, and is known as "hardware acceleration".

In recent years, a number of applications have been accelerated using FPGAs. Due to their performance and energy efficiency, FPGAs can be a great addition to embedded applications, however, they have a steep learning curve, especially for software developers. Pynq, or Python for Zynq, is an open source project from Xilinx which aims at overcoming this limitation. Pynq is designed to abstract the low level details of hardware programming, and instead present a relatively intuitive programming model for emebedded systems designers and software developers looking to explore hardware acceleration. The Pynq open source community is actively trying to create a library of hardware blocks that may be easily integrated with software applications. As mentioned before, Pynq is based on the heterogenous Zynq platform by Xilinx, which contains an ARM processor and a Xilinx FPGA on the same chip.

In our project, we have decided to use the Pynq board, since it is a new platform and has a growing community of hardware developers contributing to make hardware acceleration more accessible. Thus, we would be using the Pynq platform to accelerate a computationally intensive application. Pynq is built around the Python programming language and provides constructs to abstract details of FPGA programming, by wrapping them in special objects called "Overlays". Thus, the goal of our project can be thought of as developing one such "Overlay" and using it in an embedded application.

Milestones

1. Run GNURadio WBFM receiver in software (without offloading processing onto FPGA) on PYNQ

    • Goals: Familiarization with the board and RTL-SDR antenna, installing required components, understanding GNU Radio flow
    • Demonstrable output: FM receiver running in software on PYNQ Board

2. Put a simple (e.g. constant multiply) block on FPGA

    • Goals: Familiarization with the Vivado flow, programming in HLS, creating a simple testbench
    • Demonstrable output: Simulation of the block in Vivado/output on FPGA

3. Interface the main application running on the ARM general-purpose processor with the portion running on the FPGA

    • Goals: Understanding how to interface the processor and FPGA on PYNQ platform
    • Demonstrable output: Working FM receiver with portion running on FPGA

4. Programming the blocks to be offloaded to FPGA

    • Goals: Finish programming all required blocks (atan, FIR, IIR, etc.), simulate them and verify correctness using testbenches
    • Demonstrable output: Simulation of the blocks in Vivado

5. Final integration of GNU Radio software components with blocks in FPGA

    • Goals: Ensuring seamless connectivity between the software (Rational Resampler, FM De-emphasis) and hardware components (WBFM receiver, Audio)
    • Demonstrable output: Complete FM receiver functionality

6. Documentation of the entire procedure with step-by-step instructions

DELIVERABLES

Complete source code and testbench code for WBFM block:

Vivado Project files and Verilog source code for Base Overlay:

Repository for GNU Radio WBFM implementation on Pynq board

  • https://github.com/harveenk/PynqRadio

Appendix

PYNQ. Python Productivity for ZYNQ - open-source project from Xilinx that makes it easy to design embedded systems with Xilinx Zynq, using the Python language and libraries

FPGA. Field-Programmable Gate Array - an integrated circuit designed to be configured by a customer or a designer after manufacturing

GNU Radio. Popular open-source software development toolkit that provides signal processing blocks to implement software radios and can be used with external RF hardware to create software-defined radios, or without hardware in a simulation-like environment

References

PYNQ webpage. http://www.pynq.io/

Documentation on ReadTheDocs. https://pynq.readthedocs.io/en/latest/

PYNQ GitHub. https://github.com/Xilinx/PYNQ