FPGA

On this page 7

An FPGA (field-programmable gate array) is an integrated circuit whose digital logic is defined after manufacturing by loading a configuration file, called a bitstream, into a fabric of programmable logic blocks and programmable interconnect. Among semiconductors, the FPGA sits between fixed-function chips and general-purpose processors: it executes no instruction stream by default, but becomes the circuit that the designer describes.

Because the same silicon can be reconfigured in the field, an FPGA offers hardware-level parallelism and deterministic timing without the cost and lead time of designing a custom chip. That makes it a standard choice for prototyping, low-volume products, signal processing, networking and any task that needs microsecond or nanosecond reaction times.

How an FPGA implements logic

An FPGA implements logic by combining many small configurable elements and connecting them through a programmable routing network. The basic element is the lookup table (LUT), a tiny memory with typically 4 to 6 inputs that can reproduce any Boolean function of those inputs, paired with one or more flip-flops that store state between clock edges.

LUTs and flip-flops are grouped into configurable logic blocks, and switch matrices connect these blocks horizontally and vertically. Modern devices also contain hard blocks that would be inefficient to build from LUTs: DSP slices for multiply-accumulate arithmetic, block RAM, clock managers, high-speed serial transceivers, PCIe and memory controllers, and sometimes complete processor cores.

The bitstream sets every LUT value, every routing switch and every hard-block mode. In most devices it is held in SRAM configuration cells, so it is lost at power-off and must be reloaded from external flash at every start, usually within milliseconds to a few hundred milliseconds.

BlockFunctionTypical use
Lookup tableAny Boolean function of 4 to 6 inputsControl logic, state machines
Flip-flopStores one bit per clock cycleRegisters, pipelining
DSP sliceHardened multiply and accumulateFilters, FFTs, neural network inference
Block RAMOn-chip memory, tens of kilobits per blockBuffers, FIFOs, lookup data
Serial transceiverMulti-gigabit linksEthernet, PCIe, video interfaces
Clock managerPLL or MMCM frequency synthesisGenerating and aligning clocks
Main building blocks inside an FPGA

From hardware description to bitstream

FPGA design starts with a hardware description language such as VHDL or Verilog/SystemVerilog, or with high-level synthesis that converts restricted C or C++ into hardware. The code describes concurrent circuits rather than sequential steps, which is the main conceptual hurdle for software developers.

Vendor toolchains then run a fixed sequence of steps. Each step can fail or need iteration, and the slowest steps on large designs can take minutes to many hours.

  1. Simulation verifies behavior with testbenches before any hardware is involved.
  2. Synthesis translates the description into a netlist of LUTs, flip-flops and hard blocks.
  3. Placement and routing assign each element to a physical location and connect them.
  4. Static timing analysis checks that every path meets its clock constraints.
  5. Bitstream generation produces the configuration file loaded into the device.

Timing closure is often the hardest part. Achievable clock frequencies in typical designs range from roughly 100 to 500 MHz, far below CPU clock rates, so FPGA performance comes from parallelism and pipelining, not raw clock speed.

FPGA compared with ASIC, CPU and GPU

The FPGA occupies a middle position between flexibility and efficiency. An ASIC is a custom chip fabricated for one function on a specific process node; it is faster and far more power-efficient per operation, but it needs high non-recurring engineering costs and months of fabrication. A CPU runs any software sequentially, and a GPU runs many identical operations in parallel on fixed hardware.

OptionFlexibilityEfficiency per taskUpfront costBest fit
FPGAReconfigurable hardwareHigh for parallel, bit-level workLow to moderateLow and medium volumes, deterministic latency
ASICFixed after fabricationHighestVery highMass production
CPUAny softwareLow for parallel data pathsLowGeneral control and logic
GPUProgrammable kernelsHigh for regular floating-point mathLowGraphics and large matrix workloads
How an FPGA compares with other processing options

Many products also embed FPGA fabric inside an SoC, combining ARM processor cores with programmable logic on one die, so software handles control while the fabric handles time-critical data paths. Some teams use an FPGA as a stepping stone and later convert a stable, high-volume design into an ASIC.

Device classes and configuration memory

FPGAs differ by size, configuration technology and integrated features, and the class determines startup behavior, power and security. Capacity ranges from a few thousand logic cells in small devices to several million logic cells in the largest data center and prototyping parts.

Configuration typeRetains configuration at power-offStrengthsLimitations
SRAM-basedNo, reloads at startupLargest capacity, latest process nodesExternal flash, bitstream exposure
Flash-basedYesInstant-on, low static powerSmaller capacity
AntifuseYes, one-time programmableRadiation tolerance, high securityCannot be reprogrammed
Configuration technologies used in FPGAs

Related programmable devices include the CPLD, which is smaller and non-volatile, and the eFPGA, an FPGA block licensed as intellectual property and embedded inside a custom chip.

When to choose an FPGA

An FPGA is the right choice when a task needs custom parallel hardware but production volumes or schedule do not justify an ASIC. The decision table below summarizes common situations.

SituationRecommended choiceReason
Line-rate packet processingFPGADeterministic latency at 10 to 400 Gb/s
Prototype of a future custom chipFPGARun real software on the design before tape-out
Millions of identical unitsASICLower unit cost and power
Mostly sequential business logicCPUSimpler development and maintenance
Training large neural networksGPUMature software stack, high floating-point throughput
Deciding whether an FPGA fits the task

Common pitfalls include underestimating development effort, since HDL design and verification take longer than equivalent software, ignoring clock domain crossings that cause rare and hard-to-reproduce faults, and leaving bitstream encryption disabled in products where the design must be protected.

Understanding it simply

Most chips are built for one job and can never change. An FPGA is different. It is a chip full of small, blank logic pieces and wires that can be connected in almost any pattern. Loading a file into the chip rewires it into a new circuit.

Think of a large box of building bricks compared with a molded plastic toy. The molded toy is cheaper and stronger if you need a million of them. The bricks let you build exactly what you need today and rebuild something else tomorrow. An FPGA is the box of bricks in chip form.

Applied in practice

A small company builds industrial camera systems that inspect bottles on a production line moving at several meters per second. Each camera streams high-resolution images, and a reject decision must arrive within a few milliseconds, which a general-purpose processor cannot guarantee under varying load.

The engineers place a mid-range FPGA with ARM cores between the image sensor and the network interface. The fabric performs demosaicing, filtering and defect detection in a pipeline that handles every pixel as it arrives, while the processor cores run configuration and reporting. When a customer later needs a new bottle shape, the team ships an updated bitstream instead of new hardware, and the existing units are upgraded in the field.