FPGA vs ASIC vs Microcontroller: How to Choose for a Design

When you need a digital system, you have three broad choices. A microcontroller runs a program written in C on a fixed processor. An FPGA is a chip full of configurable logic that you wire up using a hardware description language. An ASIC is a custom chip designed for one job and manufactured in a fab. Each wins in different situations, and choosing wrongly can waste months or lakhs of rupees. This tutorial explains how each works internally, compares them on speed, power, cost and flexibility, and works through a cost break-even calculation and real selection examples.

How Each Device Works

Microcontroller

A microcontroller such as an ATmega328P or STM32 contains a CPU, flash memory, RAM and peripherals like timers, UART, SPI, I2C and ADC on one chip. The CPU fetches and executes instructions one after another. Parallelism comes only from the hardware peripherals, which run independently, and from interrupts. Changing the behaviour means recompiling and reflashing the program, which takes seconds.

FPGA

A field-programmable gate array contains thousands to millions of configurable logic blocks. Each block has look-up tables (LUTs), small memories that can implement any Boolean function of their inputs, plus flip-flops and fast carry logic. A programmable routing network connects them. Modern FPGAs also include block RAM, DSP multiplier blocks, clock managers (PLLs) and high-speed transceivers. Most FPGAs store their configuration in SRAM, so it is loaded from an external flash chip at every power-up. Your Verilog or VHDL is synthesised into LUTs and flip-flops, placed and routed, and turned into a bitstream.

ASIC

An application-specific integrated circuit implements the design directly in transistors and metal wiring, using a standard-cell library from the foundry. There is no configuration overhead, so it is the fastest, smallest and lowest-power option for a given process. The design cannot be changed after fabrication, and the one-time engineering cost, called NRE, includes design tools, verification effort and photomask sets, which can be very large at advanced process nodes.

Side-by-Side Comparison

FactorMicrocontrollerFPGAASIC
Design entryC or C++ softwareVerilog, VHDL or HLSVerilog or VHDL, then physical design
ExecutionSequential instructionsTrue parallel hardwareTrue parallel hardware
Latency and determinismMicroseconds, affected by interruptsNanoseconds, cycle-exactNanoseconds, cycle-exact
Unit costLowMedium to highLowest at very high volume
Upfront cost (NRE)Very lowLowVery high
Power for a given taskLow for control tasksHigher, due to configurable routingLowest
Change after shippingFirmware updateNew bitstreamNew silicon
Development timeDays to weeksWeeks to monthsMany months to years

A useful mental model: a microcontroller trades speed for flexibility and ease, an ASIC trades flexibility for speed and efficiency, and an FPGA sits in between. FPGAs are also the standard platform for prototyping ASICs, because the same HDL can be tested on real hardware before tape-out. Hybrid parts blur the lines: the AMD Xilinx Zynq-7000 combines ARM Cortex-A9 processors with FPGA fabric, and many ASICs contain embedded processor cores.

Worked Example: Cost Break-Even

Total cost for N units is NRE plus N times the unit cost. The numbers below are illustrative, chosen only to show the method; real quotes vary enormously with process node, package and volume.

Total cost = NRE + N x (unit cost)

Option A, FPGA : NRE = Rs 10 lakh,  unit = Rs 1,500
Option B, ASIC : NRE = Rs 3 crore,  unit = Rs 200

Break-even when costs are equal:
10,00,000 + 1500 N = 3,00,00,000 + 200 N
1300 N = 2,90,00,000
N = 22,308 units (approximately)

Below about 22,000 units the FPGA is cheaper;
above it the ASIC wins, if you can wait for it.

Real decisions also weigh time to market and risk. An ASIC bug found after fabrication may cost another full mask set and several months, while an FPGA bug is fixed with a new bitstream. That is why many products launch on FPGAs and move to an ASIC only once the design and the market are proven.

Selection Guidelines

  • Choose a microcontroller for control, user interfaces, sensors, communication stacks and anything where response in microseconds is good enough. Examples: a home automation node, a battery charger controller, a data logger.
  • Choose an FPGA when you need many operations in parallel, nanosecond timing, custom interfaces or high data rates. Examples: capturing a high-speed parallel ADC, driving a custom video interface, real-time image filtering, software-defined radio front ends.
  • Choose an ASIC when volume is very high, power or size is critical and the design is stable. Examples: smartphone processors, Bluetooth chips, bitcoin mining chips.
  • For learning, an inexpensive Lattice iCE40 board works with the open-source Yosys and nextpnr toolchain, while AMD Artix-7 and Intel Cyclone boards use the free editions of Vivado and Quartus.

Summary

Microcontrollers execute software sequentially and are cheap, low-power and quick to develop. FPGAs implement your logic as parallel hardware using LUTs, flip-flops and routing, and can be reprogrammed at any time. ASICs offer the best speed, power and unit cost but need large upfront investment and a frozen design. Compare total cost using NRE plus unit cost times volume, and weigh time to market and the cost of mistakes before deciding.