Loading header...

What Is an FPGA and Programmable Circuit?

An FPGA is not a processor that magically runs HDL. It is a large field of configurable digital building blocks. When you program an FPGA, you are choosing how those blocks connect to form a circuit.

Learning Objectives

By the end of this lesson, you should be able to:

  • explain programmable logic in plain language;
  • distinguish FPGA, microcontroller, CPLD, and ASIC design;
  • describe what a bitstream configures;
  • understand why HDL describes hardware rather than software steps.

The Core Idea

A normal logic IC has a fixed function. A 74HC08 is always a set of AND gates. A microcontroller has fixed CPU hardware and changes behavior by running different instructions.

An FPGA sits between those worlds. Its physical fabric is fixed, but its internal connections and logic functions can be configured after manufacturing.

flowchart LR A["HDL design"] --> B["Synthesis"] B --> C["LUTs, flip-flops, memories, routing"] C --> D["Bitstream"] D --> E["Configured FPGA circuit"]

The bitstream is the configuration file loaded into the FPGA. It tells the device which logic functions each LUT should implement, which flip-flops are used, how routing switches connect signals, and how I/O pins behave.

FPGA vs Microcontroller

Question Microcontroller FPGA
What changes behavior? Program instructions in memory Configured logic and routing
Execution style Mostly sequential Naturally parallel
Best for Control, firmware, protocols, decision logic Fast I/O, custom datapaths, parallel logic
Beginner trap Thinking C is hardware Thinking HDL is software

A microcontroller can blink an LED by running a loop. An FPGA can blink an LED by building a counter circuit. Both can produce the same visible result, but the internal model is completely different.

FPGA vs CPLD vs ASIC

Device Good mental model Common use
CPLD Small programmable glue logic address decoding, simple state machines
FPGA Large reconfigurable digital fabric interfaces, accelerators, custom peripherals
ASIC Custom chip manufactured for one design high-volume products, CPUs, SoCs

CPLDs are smaller and often simpler. FPGAs are richer: they include LUTs, flip-flops, block RAM, PLLs, DSP blocks, high-speed I/O, and sometimes embedded CPUs.

What Students Usually Miss

HDL statements that appear one after another do not automatically run one after another. If you write two independent assignments, the FPGA can implement both as parallel hardware.

assign x = a & b;
assign y = c ^ d;

Those are two pieces of combinational logic. They do not wait for each other.

Worked Example: A Button-Controlled LED

Requirement: LED is ON when the button is pressed.

In software, you might repeatedly read the button and write the LED. In FPGA hardware, the simplest design is just a connection through logic:

assign led = button;

If the button input changes, the LED output changes after the small propagation delay of the configured logic and routing. No loop is required.

Exercise

For each requirement, decide whether a microcontroller or FPGA is the better first choice:

  1. read a temperature sensor once per second and show it on UART;
  2. sample 16 digital input lines at 100 MHz and detect a pattern;
  3. implement a custom PWM block with nanosecond-scale timing;
  4. run a menu system on a small display.

Write one sentence explaining each answer.

Common Mistakes

  • Treating HDL like C or Python.
  • Assuming the bitstream contains CPU instructions.
  • Ignoring pin voltage and I/O standards.
  • Starting with a big project before learning LUTs, flip-flops, and timing.
  • Thinking FPGA design is "faster software" instead of custom hardware.

Summary

An FPGA is a configurable digital circuit fabric. Its bitstream defines logic, routing, memory use, I/O behavior, and clock resources. The right mental model is not "program execution"; it is "hardware construction."

Next: Logic Fabric, LUTs, Flip-Flops, and Routing.

Further Reading

  • Yosys manual: digital synthesis concepts
  • Vendor FPGA architecture user guides
  • Project F FPGA tutorials

Mind Map

mindmap root((FPGA Basics)) Core concept Configurable fabric Bitstream sets LUTs Parallel hardware FPGA vs MCU Applications CPLD and ASIC Best applications Fast IO Design checks Custom datapaths Design rules Think circuits Check IO standards Common mistakes Common mistakes HDL as software Ignoring timing