Reach for an FPGA when the job needs custom hardware, the volume is low, and the spec may still change. A CPU handles the control code, a GPU handles the wide parallel math, and an ASIC handles the one job you will build a million times. The FPGA handles the middle ground: hardware you can rewrite after the chip leaves the factory.
An FPGA is an integrated circuit whose logic you decide after manufacturing. You load a file, the chip becomes the circuit you described, and you can load a different file tomorrow. The name spells it out: field-programmable gate array, an array of gates you program in the field, after the factory rather than during it.
What follows shows how that works from the inside. It starts with the small table that becomes any logic gate. Then a simulation runs one such table through two jobs. It ends with the arithmetic that decides when a custom chip beats it.
What an FPGA is: the circuit decided after manufacturing
A field-programmable gate array is one kind of integrated circuit, and the name describes exactly what it does. The array is a grid of logic blocks. Field-programmable means you set what those blocks do after the chip is made. A normal chip leaves the factory with its circuit fixed. An FPGA leaves the factory with its logic undecided, waiting for a file you load later.
The contrast with a processor is the fastest way to see it. What a CPU is, at its core, is a fixed circuit that fetches and runs instructions one at a time. You change what it does by changing the program. An FPGA has no instruction set to change. You change what it does by changing the circuit itself, and the chip then runs as that circuit, with every part working at once.
Ross Freeman invented the idea and founded Xilinx in 1984 with two partners. The first FPGA, the XC2064, arrived in 1985 with 64 logic blocks inside. Forty years on, AMD’s Versal Premium VP1902, announced in 2023, holds 18.5 million logic cells. The companies changed hands along the way. Intel bought Altera in December 2015, and AMD bought Xilinx in February 2022. In September 2025, the investment firm Silver Lake took a 51% stake in Altera.
How the chip remembers its circuit splits FPGAs into three kinds. Most use SRAM cells, which lose their settings when the power goes off, so the chip reloads its file at every boot. Flash-based parts keep their settings without power and start at once. Antifuse parts can be written a single time, which suits space and defense work, where a setting must never change by accident.
The LUT: a small table that becomes any logic gate
Every logic block in an FPGA holds a lookup table, shortened to LUT. A LUT is an answer book in miniature. Its inputs pick a row, and the row holds the output. That single idea carries the chip’s flexibility: to build a new circuit, you write new answers into the tables and connect them differently.
Take a LUT with two inputs, A and B. How binary code works gives you the four input pairs: 00, 01, 10, 11. To make an AND gate, the four stored bits read 0, 0, 0, 1, so the output is 1 only when both inputs are 1. To make an XOR gate, those four bits read 0, 1, 1, 0, so the output is 1 only when the inputs differ. Four bits hold the whole function, and four boxes filled with 0s and 1s give 16 possible two-input functions in total.

LUTs in shipping chips have more inputs. AMD’s 7 Series FPGAs use 6-input LUTs with 64 bits inside, one per input combination. A single 6-input LUT can become any of the 2^64 possible six-input functions, a number with 20 digits: 18,446,744,073,709,551,616. The scale is the point. A handful of such tables, wired together, builds adders, counters, and whole processors.
The arithmetic stays small when you count it. A 4-bit adder needs one 6-input LUT per bit. The carry runs on a dedicated carry chain, so its LUT contents take 4 times 64, or 256 bits. A design using 100,000 six-input LUTs needs 6,400,000 bits for the tables alone, which is 800,000 bytes, or 781.25 KiB, before a single routing switch is counted.
The simulation: one LUT, two circuits
I wrote a two-input LUT in Verilog and ran it through Icarus Verilog 12.0. I loaded AND first and checked all four input pairs. Then I loaded XOR into the same LUT by changing only the four configuration bits, from 1000 to 0110, and checked all four pairs again.
The simulator checked eight cases and reported zero errors. With AND loaded, the outputs read 0, 0, 0, 1 for the inputs 00, 01, 10, 11. With XOR loaded, that LUT gave 0, 1, 1, 0. The testbench stepped through all eight cases in 80 nanoseconds of simulated time. Nothing on the chip moved except the four bits.
What stayed with me was how little changed. Four bits, and the same circuit did a different job, with no new chip and no new board. That is the cheapest possible version of rewiring, and it is why the LUT sits at the center of the whole device.
That run proves the logic, and it proves nothing about timing. A finished design goes through place and route, which decides where blocks sit and how long signals take to travel. The 80 nanoseconds above is simulated testbench time. It says nothing about hardware speed. What the run shows is narrower: the circuit changed because four stored bits changed, and nothing else had to.
Does an FPGA run a program? No. A bitstream is a circuit setting, not a list of instructions. Once it loads, the circuit processes signals directly, and nothing fetches an instruction. The exception is a chip with a built-in processor core, where that core runs programs while the fabric around it runs circuits.
Flip-flops, wiring, and the hard blocks
A LUT alone can only answer from its inputs. It cannot remember what happened a moment ago. A flip-flop sits beside each LUT for exactly that job. It holds one bit, takes in a new value on the clock edge, and keeps outputting it until the next edge. Counters, state machines, and pipelines all rest on that one-bit memory.
The blocks connect through a switch matrix, a grid of wires with a transistor switch at each crossing. Each switch is set by one bit in the configuration memory. The bitstream decides both what each LUT computes and which blocks talk to each other. AMD’s 7 Series documentation puts the scale in one line: a configurable logic block holds two slices, and a slice holds four 6-input LUTs and eight flip-flops, so one block carries eight LUTs and 16 flip-flops. The IEEE Technology Navigator defines the block the same way, as lookup tables and flip-flops inside the configurable logic block.

Some jobs are too slow or too wasteful built from LUTs, so modern FPGAs carry hard blocks. DSP slices multiply and add in one step. Block RAM holds larger buffers, high-speed transceivers move data between chips, and clock managers keep every block in step. Some families add a processor core, and soft cores such as MicroBlaze and Nios II let a design run code beside the fabric. An FPGA can flag the processor when data is ready. That flag is what an interrupt is in this context: the fabric does the timed work, and the processor handles the result.
From Verilog to bitstream: the five-step design flow
Making an FPGA circuit follows the shape of designing a custom chip, with one difference at the end: you load a file instead of sending a design to a factory. The steps run in order, and the steps catch different classes of mistake.
- Describe the behavior. You write how the circuit behaves in a hardware description language, most often Verilog or VHDL. The code looks like a programming language, but it describes a circuit rather than a sequence of steps. That is the split from what assembly language is: assembly lists instructions for a processor to run, while Verilog describes hardware to build.
- Simulate it. A simulator runs the description against test inputs and checks the outputs, before anything is built. The LUT simulation is that step, run small.
- Synthesize it. The tools turn the description into a netlist of LUTs, flip-flops, and hard blocks.
- Place and route it. The tools choose which physical blocks to use and which switches link them, then generate the bitstream.
- Load it and test it. On a board, what a device driver is matters here: driver software hands the bitstream to the chip. If the test fails, you go back to step one.
Two tools dominate the work: AMD’s Vivado and Intel’s Quartus, each matched to its own chips. Altera’s documentation describes that flow in four steps: create the design, compile it, configure the FPGA, and reprogram as needed. A newer path, high-level synthesis, turns C or C++ code into a circuit description, which lets software engineers reach the fabric without writing Verilog by hand. It trades control for speed of entry, and the trade suits prototypes more than finished products.
FPGA vs CPU vs GPU vs ASIC: the decision table
Four chips answer the same question four ways. The table sets them side by side, and the arithmetic below it settles the cost question. The GPU row covers the accelerator comparison; that question for AI workloads, with a neural processor in the mix, is worked in NPU vs GPU.
| Chip | What you change later | Strength | Weakness | Best for |
|---|---|---|---|---|
| CPU | The program | Runs any code, handles control flow | One or a few operations at a time | Operating systems, control code, branchy work |
| GPU | The program | Thousands of cores on the same math | Fixed architecture, hungry for power | Training, graphics, wide parallel math |
| FPGA | The circuit itself | Custom parallel hardware, fixed timing | Harder to design, slower clock | Streaming data, custom protocols, real-time work |
| ASIC | Nothing | Fastest, least power for its job | Setup cost, frozen at the factory | One job at high volume |
The gap between an FPGA and a custom chip was measured in hardware. Kuon and Rose of the University of Toronto built the same circuits both ways at 90 nanometers and published the result in IEEE Transactions on Computer-Aided Design in February 2007. For plain logic, the FPGA needed about 35 times the silicon area, ran about 3.4 times slower, and used about 14 times the dynamic power. Hard blocks narrowed the area gap to 18 times and the power gap to 7.1 times. The numbers come from a 2007 process, so treat them as orders of magnitude and expect today’s figures to differ. The reason behind them still holds: the freedom to rewire costs area, time, and power.
That area gap is the price of the freedom to rewire: an FPGA buys flexibility with silicon, and the bill arrives in area, delay, and power.
Cost follows that shape. A custom chip carries a large setup cost, called non-recurring engineering, and then a small cost per chip. An FPGA carries no setup cost and a higher cost per chip. Take chosen inputs to see the shape: a setup cost of $2,050,000, a custom chip at $4 apiece, and an FPGA at $45 each. The two totals meet at 50,000 units, where both cost $2,250,000. At 1,000 units the custom chip costs $2,054,000 against the FPGA’s $45,000. At 500,000 units the custom chip costs $4,050,000 against the FPGA’s $22,500,000.

Those inputs are chosen for the worked example, and prices vary by process, package, and volume. The arithmetic shows the shape of the decision. Below the crossing point the FPGA wins, above it the custom chip wins, and the crossing point moves with the setup cost.
Why not use an FPGA for everything? Cost per chip, power draw, design effort, and clock speed decide it. The programmable fabric costs more silicon per job than a fixed circuit. It draws more power doing the same work, it takes hardware skills to design, and it usually runs at a lower clock than a processor. Where none of those four binds, the FPGA is often the right call.
Where FPGAs do real work
FPGAs live where the volume is low, the job changes, or the timing is strict. Five places show the pattern.
- Prototyping new chips. Before an ASIC goes to a factory, its design runs on FPGAs, with software checking it. Some very large FPGAs exist only for this job.
- Telecom equipment. Standards keep changing, and an FPGA in a cell tower takes a new protocol by loading a new file.
- Test and measurement gear. Made in small numbers, where a custom chip would never pay off.
- Data centers. Microsoft reported in a 2014 paper that it fitted one FPGA to each of 1,632 servers running Bing search, and the work done per server rose by 95%.
- Space. A satellite’s circuit can be rewritten from the ground after launch, which matters when radiation flips stored bits.
AI inference at the edge is the newest place that pattern shows up. The model changes faster than hardware can ship, so a chip that takes a new model by loading a new file fits the work. The processor on the board runs the show: what an operating system is covers the software that hands work to the accelerator and takes the results back.
Does an FPGA belong in a phone? No. A phone ships in the hundreds of millions, runs on a battery, and keeps the same radios for its whole model life. That is ASIC territory: the setup cost spreads thin, the power draw is the lowest of the four chips, and the spec is frozen. FPGAs sit one step up the volume ladder, where the numbers are smaller and the job still moves.
The check before you pick one
Three checks settle the pick before you spend anything. Each one takes minutes and reads off a board or a datasheet.
- Read the part number. Open the board’s product page or the chip datasheet and read the logic-cell count, the DSP slice count, and the transceiver count. If your design needs more of any one than the chip holds, the part is wrong, and no tool setting fixes that.
- Check the bitstream size. The datasheet states the configuration file size for the part. Compare it with the size your tools report for the design. A design whose bitstream is larger than the part’s configuration memory will not load.
- Check the pins and the power. Count the pins your design needs against the package, then read the power figures. On Windows, Device Manager shows the device ID of a PCIe card; on Linux, lspci shows the same ID. Match it against the vendor’s list to confirm the exact part you hold.
The pick follows from those checks and the break-even line. Under 50,000 units, with a spec that may still move and timing the software cannot guarantee, take the FPGA and keep the option to reload it. Past that volume, with the spec frozen and the job fixed, pay the setup cost once and take the custom chip. The rewiring is worth paying for only while the circuit still has something to learn.
Frequently asked questions
Can an FPGA replace a CPU?
Not as a processor. A CPU runs an operating system and branchy code on a fixed instruction set, which an FPGA does not have. An FPGA can hold a soft processor core, but that core runs slower than a dedicated CPU and exists to steer the fabric, not to replace the processor. Use the FPGA for fixed, parallel, timed work and let the CPU run the rest.
How long does an FPGA take to configure at boot?
It depends on the size of the bitstream and the speed of the configuration interface. Most SRAM-based FPGAs reload their file from flash at every power-up, so the chip does nothing useful until the load finishes. Flash-based parts such as Microchip’s PolarFire keep their settings without power and start at once.
Should a beginner learn Verilog or VHDL?
Verilog reads closer to C and carries the larger tutorial base, so most beginners start there. VHDL is stricter about types and stays common in defense and aerospace work. The practical rule is to follow your board: use the language its examples and its community use.
Why do FPGAs cost more per chip than ASICs at volume?
The programmable fabric itself costs area and power: the same logic needs far more silicon built from lookup tables and switches than it does as a fixed circuit. You pay for switches and tables you may never use. At high volume the custom chip’s setup cost spreads thin enough that its lower cost per chip wins.

Kaleem
Kaleem is a Computer Science graduate (Virtual University of Pakistan) and the founder and editor of Valley AI, where he publishes in-depth, tested guides on computer hardware, artificial intelligence, and how the internet works. Every guide is researched from primary sources, tested hands-on where possible, and updated when the facts change.