In the easy-to-follow book Make: FPGAs — Turning Software into Hardware with Eight Fun & Easy DIY Projects, author David Romano details the ins-and-outs of the hyper-configurable field-programmable gate array (FPGA) boards and explains how — and why — to get started with these advanced devices. The following is excerpted from his book, available at makershed.com.

Industrial roots

A field-programmable gate array is an integrated circuit whose fundamental hardware functionality can be programmed in the field after manufacture. There are many reasons a design team will consider FPGA technology in industry. For example, in many silicon IC design companies, FPGA-based platforms are used for what’s called “shift left” testing, where a new SoC (system on a chip) device is mapped to FPGAs early in the design phase, in order to begin software integration long before the actual silicon device is manufactured.

 

This is called “emulation” of the design. The big advantage is that emulation runs orders of magnitude faster than simulation, so you can get real-world hardware/software interactions very early in the validation phase. The FPGA system typically operates at only a fraction of the silicon operating frequency, but the time saved in integration is tremendous.

Another example of where FPGAs are considered a viable solution in industry is where the design requires having multiple hardware personalities in the same footprint. For example, this was the case for a portable test and measurement instrument that I architected when I was a design engineer. By using an FPGA in the design, the customer was able to download different test instruments to the same hardware, essentially having multiple instruments in one hardware device.

Unlimited Opportunities

The real question, then, is: Why would you, the do-it-yourself hobbyist or student, even consider experimenting with FPGAs? For students, it exposes you to contemporary digital logic design methods and practices in a fun, practical, affordable way. For the hobbyist, an affordable, off-the-shelf FPGA platform can be used in some very interesting and fun DIY projects.

Many of you have had experience with Arduino or similar small microcontroller projects. With these projects, you usually breadboard up a small circuit, connect it to your Arduino, and write some code in the C programming language (which Arduino is based on) to perform the task at hand. Typically your breadboard can hold just a few discrete components and small ICs. Then you go through the pain of wiring up the circuit and connecting it to your Arduino with a rat’s nest of jumper wires.

Instead, imagine having a breadboard the size of a basketball court or football field to play with and, best of all, no jumper wires. Imagine you can connect everything virtually. You don’t even need to buy a separate microcontroller board; you can just drop different processors into your design as you choose. Now that’s what I’m talking about! Welcome to the world of FPGAs.

FPGA history

Xilinx Inc. was founded in 1984, and as the result of numerous patents and technology breakthroughs, the company produced the first family of general-purpose, user-programmable logic devices based on an array architecture. It called this technology breakthrough the Logic Cell Array (LCA), and with this the Xilinx XC 2000 family of FPGAs was born.

You can think of an LCA as being made up of three types of configurable elements: input/output (I/O) blocks, and logic blocks, and an interconnect matrix.

From these, a designer can define individual I/O blocks that interface to external circuitry. You can think of these as configurable pins of ports. The designer can also use logic blocks, connected together through the interconnect matrix, to implement logic functions. These functions can be as simple as a counter or as complex as a microcontroller core. In a way, the interconnect matrix is like the wires on a breadboard that connect everything together — but completely programmable.

Before there were FPGAs, you needed to use dozens of discrete ICs on a circuit board, or sometimes even hundreds of ICs on multiple circuit boards, to accomplish the hardware functionality you can achieve today with one FPGA device.

For example, today you can create the entire Pac-Man arcade game on a single FPGA device, including the game software. Now that’s fun!

 

The configuration of an FPGA device is accomplished through programming the memory cells, which determine the logic functions and interconnections. In the early days, this program (or what has become known as the bit file) was loaded at power-up from EEPROM, EPROM, or ROM on the circuit board, or loaded from a PC through a serial connection on the board from the FPGA programming tool. Since the underlying technology is volatile static RAM (SRAM), the bit file must be reloaded with every power cycle of the device.

In today’s FPGAs, SD flash memory replaces the EPROM, and USB or JTAG replaces the serial connection, but the programming function remains much the same as it was in the beginning.


OPEN FPGA Pioneers

It’s a seriously exciting time for FPGAs and makers, and these folks are some of the most influential in the open FPGA movement. Give them a follow to keep up with the very latest developments.
Luke Valenty,

  • Tim “Mithro” Ansell: Tim has been a driving force in the open FPGA movement … He has a knack of bringing the right people together to make things happen.
  • Clifford “oe1cxw” Wolf: Clifford is instrumental in the development of open source FPGA tools like IceStorm and SymbiFlow.
  • Juan “Obijuan_cube” Gonzalez: Juan has worked on developing a substantial series of tutorials for makers and students based on the Icestudio graphical FPGA tool that he helps develop.
  • David “fpga_dave” Shah: David has nearly completed documenting the Lattice ECP5 FPGA so that it can be used with the open source SymbiFlow toolchain.
  • Piotr “esden” Esden-Tempski: Piotr has just successfully funded his IceBreaker FPGA board on Crowd Supply.