FPGA designs typically require multiple components of VHDL code for interfaces such as analog-to-digital converters (ADCs)/digital-to-analog converters (DACs), PCI Express buses, memory, and clocks (Figure 1a). Each of these is typically developed from scratch, reused from existing designs, or acquired IP from Xilinx or other IP vendors. This means significant integration work—often more work than the actual algorithm implementation itself—must be completed to get all these pieces to connect.
Though these hardware interfaces are challenging to implement, customizing them rarely offers any value. With the ADC interface, for example, closing static timing and working out synchronization may be difficult, but the function of converting analog inputs to digital samples is relatively the same from project to project. To remove this bottleneck, LabVIEW Communications provides the interfaces to all the hardware on the SDR printed circuit board (PCB) out of the box. For example, ADC data is presented to the FPGA diagram as samples that have already been properly sampled and converted to the right data type, and you can simply drop a Read I/O node on your diagram to access them. Similarly, to stream data from the FPGA to the CPU, you just need to use a Write FIFO node and not worry about the actual streaming implementation itself.
The first installment to this "FPGA Prototyping for Wireless Engineers" series shows you how to leverage LabVIEW Communications to immediately move data on and off the FPGA so you can stay focused on implementing your algorithms.Figure 1. (a) In a typical custom FPGA design with I/O, design teams often spend more time integrating I/O interfaces than implementing their algorithms or IP. (b) In LabVIEW Communications, those interfaces are already implemented so design teams can focus on implementing their signal processing instead of system integration.
To interface FPGA algorithms with the ADCs and DACs that connect to the RF front ends, a host CPU, or resources such as memory, simply drop a Read or Write node for that resource. See Figure 2 for some examples of these nodes.Figure 2. Use blocks like these to communicate with real-world I/O, FIFOs moving data to and from the host CPU, the DRAM on the USRP RIO device, or registers.
You can configure FPGA I/O resources using a resource file, as shown in Figure 3. Configure properties like resource alias, data type, direction (FPGA to host, host to FPGA, FPGA to FPGA, local), or buffer depth.Figure 3. Use a resource file to create and configure FIFOs, memory, clocks, and other resources.
Once you have created and configured your desired resources, you can connect them to the algorithms you implement on the FPGA. For example, the block diagram in Figure 4 was implemented on the FPGA in LabVIEW Communications (see Figure 5). In the design, data from the receive port of the USRP RIO device is streamed into “My Algorithm” on the FPGA, which could be any block like synchronization, demodulation, or a filter. The output is then streamed to memory and an FPGA-to-CPU FIFO.Figure 4. This block diagram of the example design shows how data is received from the RF front end, processed by a user-created block called “My Algorithm,” and streamed to memory and the host CPU. My Algorithm could be any algorithm such as demodulation, filters, or fast Fourier transforms.Figure 5. In this implementation of the theoretical block diagram in FPGA code in LabVIEW Communications, raw I and Q data is read from the RF front end, processed by My Algorithm, and then streamed to memory and to the host CPU.
To write a custom, real-time block like My Algorithm on the FPGA, you do not need VHDL experience when you use LabVIEW Communications. To learn how to create an algorithm like a 20 MHz orthogonal frequency division multiplexing (OFDM) modulator, continue to the next instalment of this Tips and Tricks series, “Go from a Concept to FPGA Code with No HDL Expertise.”
Collaborate with other users in our discussion forums
A valid service agreement may be required, and support options vary by country.