Field Programmable Gate Arrays
From Hamsterworks Wiki!
FPGAs are programable digital logic 'chips'. They range in size and speed from a few 1000 logic elements up to the hundreds of thousands. A logic element is approximately equivalent to a 2.5" x 6" breadboard with four traditional discrete logic chips, so a large FPGA is roughly equivalent to two basketball courts of breadboards.
What FPGAs really are
A really simple overview is that all synchronous digital logic systems can be broken down into five parts
- Inputs - signals from the outside world
- Outputs - signals to the outside world
- Logic elements - combine signals to produce other signals
- Storage elements - stores the state of a signal until the next 'clock tick'.
- A very special input is the clock signal - it is used to tell storage elements when they should sample the values of their signals.
So from a distance all digital systems look like this:
FPGAs have very generic logic elements (usually based around look-up tables), very generic storage elements (a d-type flip flop), and inputs and outputs that operate at many different I/O standards (LVTTL, LVCMOS...).
To tie these all together FPGAs have a programmable wiring matrix that is used to connect each of these elements.
Some elements such as multipliers and memory blocks are common to a lot of designs and are relatively expensive to implement in an FPGA's generic logic, so it makes sense for a number of these implement these in 'hard logic' on the FPGA chip. This greatly increases the size of projects that can fit on an FPGA, and usually increases the speed that a design can work at.
As these hard logic blocks also have greater control over timing they are able to perform clock recovery or meet timing requirements of memory interfaces.
Comparison against programming
Comparing programming and FPGAs has a comparison between software coding and HDL paradigms.
Implementing a design
A system designer first specifies the way the system should behave using a hardware design language like VHDL, which can be simulated to check that the correct behaviour occurs. As well as the design the designer has to supply a set of constraints that guides the implementation process. Common constraints are clock speeds and I/O pin placement.
Software (usually provided by the FPGA manufacturer) is then used to implement a design. This software has six main phases:
- Analysis of the design to ensure that the design is correctly specified
- Breaking down a system's design into basic elements
- Mapping of the basic elements onto the FPGA's logic, storage and I/O elements.
- Deciding where on the FPGA to place these elements
- Deciding on how best to connect them with the wiring matrix
- Generating a "configuration file" that can be used to implement the design on the FPGA
There is almost an infinite number of options for how a design can be implemented in the FPGA, each with different performance characteristics such as maximum clock speed, power usage and FPGA resource usage.
If the fully automated tools fail to achieve the designs requirements the designer can choose to either redesign the troublesome part of the design or take finer control over the implementation process.
See FPGA_Projects for a full list.
These are the current FPGA development boards I have:
- Digilent Nexys2 + FX2BB Breadboard add-on
- Open Workbench Logic Sniffer
- Papilio One (actually got two of these).
- Papilio Plus (Prototype)
- Papilio Pro
- Pipistrello (Prototype)
- Logi-Pi (Prototype) - a FPGA board for the Raspberry Pi
- Logi-Bone (Prototype) - a FPGA board for the Beaglebone
- Aessent Technology aes220b
- Digilent Basys3
- Scarab miniSpartan6+
These are boards that I used to own:
- Digilent Basys2 - sold when I got my Digilent Basys3
- Terasic DE0-nano - sold this to somebody who can make better use of it
- Loading BRAM data - How to load information into a FPGA's block RAM (BRAM)
Inspiration for projects
- LCC - a retargetable ANSI C compiler (http://en.wikipedia.org/wiki/LCC_(compiler) ) - the could be used to provide C to any backends.
- Data General MV/8000 - I used one of these at while studying at Polytechnic
- http://fpga4fun.com - Sample projects, ideas and forums.