FPGA vs. MCU: Which Processor Should You Use?

What About SoCs/SiPs/SoMs?

The funny thing about SoCs is that they can be anywhere from specific to generic in terms of computational capabilities. Component manufacturers will attach the term “SoC,” “SoM,” or “SiP” to a new integrated circuit that performs a range of tasks, as long as those tasks used to require multiple separated integrated circuits. These components are highly integrated, and they can fall anywhere on the specific vs. generic spectrum.

MPUs: Even More Generic

Somewhere to the right of the FPGA in the above graphic would be MPUs. These devices run an operating system, interface with multiple peripherals, and are the workhorses of general purpose computing. Some might argue that the MCU and FPGA should trade places in terms of generic-ness (see why below), but neither an FPGA or MCU are designed for the same type of general computing as an MPU.

Choosing an FPGA vs. MCU

The table below shows a brief comparison of some of the most important aspects of MCUs and FPGAs. Each type of component has its advantages, and it’s up to the designer to determine which is best for their system. Personally, I prefer MCUs because I have some experience working in C and I’ve never learned HDL. However, FPGAs can be programmed to have some of the same functions as specialty ASICs, as long as you know how to code them.

FPGA MCU
Reprogramming Fully reprogrammable at the hardware level Varies: relies on embedded operating system, dynamic
Programming time Longer: requires recoding and recompiling everything to machine code Shorter: aided by manufacturer SDKs and libraries
Ease of programming Seen as having a steeper learning curve Easy: anyone familiar with common languages can code
Power consumption Higher Lower
Parallelization Can be configured during programming Limited by hardware architecture
Fixed vs. floating point Configured for fixed point, but floating point can be implemented during programming Both are accessible
Languages Hardware description language (HDL) C/Assembly language, others if supported by RTOS (e.g. Python)

Because FPGAs are often seen as difficult to program by newer developers, an MCU is typically seen as the best processor for an embedded device. This has largely been aided by the open source community, and some open source projects can be used as the basic architecture or proof-of-concept for a new product. Add to this the support from manufacturers, and you have plenty of tools available for programming MCUs.

Despite the learning curve in programming FPGAs, they are much more configurable in terms of the firmware architecture. Parallelization can be programmed into the device, depending on the number of LUTs and ALUs available. This makes FPGAs a great choice when your firmware needs to be designed for very specific applications. Examples include inference in AI, image processing, hardware control algorithms, and other tasks that require repetitive (or parallel) computation.