Students at the University of California, San Diego have created RIFFA, a simple framework for communicating data from a computer processor to a Field Programmable Gate Array (FPGA). The open-source technology, which can be used with any FPGA vendor on Windows or Linux, could lead to faster design times and higher profit margins for a wide range of industries.
A Field Programmable Gate Array (FPGA) is analogous to a bucket of Legos® – it’s essentially programmable hardware with “logic blocks” that can be configured by a manufacturer after purchase to perform a set of functions. FPGAs are often used as replacements for application-specific microchips and/or software because they are respectively cheaper and faster (both computationally and design-wise) than the two alternatives. Specific applications of FPGAs include highly intensive computing applications that require many computing resources over a long period of time, such as digital signal processing, medical imaging, computer vision and bioinformatics.
On the flip side, however, FPGAs “are pretty low-level and bare-metal,” says UC San Diego Computer Science and Engineering Professor Ryan Kastner – a trait that also has made them historically cumbersome to use and error-prone, since they lack the testing abstractions of programming languages.
“FPGAs don’t have an infrastructure like Windows or Linux, where you can plug in a device like a camera and the camera will be recognized,” says Kastner, who is affiliated with the Qualcomm Institute at UC San Diego. “There are very few people in the world who understand the level of abstraction involved in programming an FPGA. Because it's programmable hardware, it provides a lot of flexibility, but that can also be the problem. It’s a rope and you can do whatever you want with that rope, including tie yourself in knots.”
The new framework is called RIFFA (Reusable Integration Framework for FPGA Accelerators). It was designed by UC San Diego alumnus and Google employee Matt Jacobsen and is being further developed by CSE graduate student Dustin Richmond. RIFFA greatly simplifies both the software and hardware interfaces involved in the use of FPGAs, requiring only a PCIe enabled workstation and a FPGA on a board with a PCIe connector.
“While you may not know it, PCIe is a common protocol found in almost every desktop, server and laptop,” Kastner adds, “thus, this is a step toward making FPGAs more ubiquitous. This can lead to substantial energy savings, since FPGAs provide orders of magnitude improvements in power consumption compared to the same application running on a CPU.”
RIFFA also makes it possible to load multiple FPGAs with only a few lines of code and no special knowledge of bus addresses, buffer sizes, PCIe packet formats and other protocols previously required for programming FPGAs.
“The way RIFFA came about is that we’ve had all these different projects, different companies and different people on campus who kept reinventing the wheel,” says Richmond, “and the result was that everybody was communicating between CPUs and FPGAs poorly. We decided our focus would be on the application and not the ‘plumbing.’ We spent years developing RIFFA as something very easy to use and very portable. Essentially, we’ve abstracted away all of the plumbing.”
Kastner and Richmond cite Cognex Corporation – a manufacturer of machine vision and other components used in automated manufacturing – as an industry partner that has already made use of RIFFA. One of the company’s sensor-equipped scanners, for example, is designed to determine faults in 3D models of parts as they are moving along an assembly line at a speed of 100,000 frames per second. Employees of Cognex used RIFFA in an initial research prototype to make use of fewer scanners in order to “run the assembly line as fast as possible and increase their profit margin,” explains Richmond, “which is obviously in their best interest."
Research and development of RIFFA was funded in part by chip manufacturers Altera and Xilinx. The next version, RIFFA 2.2, will be available under an open-source BSD license.