Summary
An FPGA is a cost. It has to buy something a processor cannot.
A modern real-time microcontroller is a remarkable thing. It runs a motor control loop at tens of kilohertz, samples sixteen-bit converters at over a million samples per second, and costs a few pounds. Most drives, most sensors and most controllers should be built on one, and most of ours are. An FPGA costs more, needs a different kind of engineer, and takes longer to change.
So the question is never “FPGA or MCU” in the abstract. It is whether the application needs one of three things a sequential processor cannot provide: timing fixed to the clock cycle, several real-time functions running genuinely in parallel, or a protection response in nanoseconds. When it needs one of them, the FPGA is cheaper than the alternative, which is a system that nearly works. When it needs none, buy the microcontroller.
This article gives the numbers on both sides, a decision procedure we use with customers, and the pattern we use to put an adaptive layer beside a control loop without letting it touch the loop.
What the microcontroller does well
Two hundred megahertz, floating point and a free accelerator
Take a representative part. Texas Instruments’ TMS320F28379D runs two 32-bit cores at 200 MHz with hardware floating point, two independent control-law accelerators also at 200 MHz, up to four 16-bit ADCs at 1.1 MSPS each, 24 PWM channels including 16 with high-resolution timing, and encoder and capture peripherals. A field-oriented control loop at 20 kHz leaves it mostly idle. A loop at 50 kHz is comfortable. The toolchain is mature, the reference designs are plentiful, and the engineers who know it are easy to find.
Its limits are structural rather than numerical. A processor executes one instruction stream per core, so every function that shares a core shares its timing. Interrupt latency is small but not zero, and it varies with what else is running. A protection action goes through the same pipeline as everything else. And the loop rate that is comfortable with one motor and one algorithm becomes tight when a second axis, a communications stack and a model-based estimator are added to the same device.
What the fabric does differently
Latency is a count of clock cycles
In programmable logic, a control algorithm is not executed; it is wired. A published FPGA implementation of three-phase field-oriented control reports a total latency of 84 clock cycles and a new result every 72 cycles, at 100 MHz on a Zynq-7020, using 1,014 flip-flops and 1,245 look-up tables. That is under a microsecond from samples to duty cycles, and it is the same microsecond every time, because nothing else is sharing the pipeline. Adding a second axis does not slow the first; it uses more fabric.
The same property gives fast protection. An over-current comparator feeding a PWM shutdown in fabric reacts in a few clock cycles, not an interrupt latency, and its reaction does not depend on what the processor was doing. Sensor acquisition across several channels can be aligned to the nanosecond. Protocol engines, filters, estimators and the control law each get their own hardware, which is what “parallel” means in this context.
Compare this with a general-purpose processor running real-time Linux. The Open Source Automation Development Lab measures scheduling latency continuously across a farm of systems; a well-tuned machine shows a worst case around 50 to 70 µs, and a single misconfigured kernel option can push it beyond 300 µs. For a 100 ms SCADA loop that is irrelevant. For a 20 kHz current loop, 50 µs is the whole period.
Side by side
The trade-offs, honestly
| Criterion | Real-time MCU | FPGA or SoC FPGA |
|---|---|---|
| Loop latency and jitter | Microseconds, with interrupt jitter that grows with load | Sub-microsecond, fixed at compile time |
| Parallel functionsSeveral control, sensing and protocol tasks at once. | Time-sliced on one or two cores | Each in its own logic, independent timing |
| Protection responseOver-current, desaturation, over-voltage. | Hardware trip zones help; software paths add latency | A few clock cycles, independent of the processor |
| Unit cost | Pounds to tens of pounds | Tens to hundreds of pounds |
| Engineering cost and change | Lower; C and mature toolchains; quick to iterate | Higher; RTL or HLS, timing closure, longer iterations |
| LifecycleAvailability over a fifteen-year deployment. | Good for mainstream families | Typically long; design is portable between devices |
| Route to silicon | Not applicable | A direct path to an ASIC when volume justifies it |
Loop latency and jitter
- Real-time MCU
- Microseconds, with interrupt jitter that grows with load
- FPGA or SoC FPGA
- Sub-microsecond, fixed at compile time
Parallel functions
Several control, sensing and protocol tasks at once.
- Real-time MCU
- Time-sliced on one or two cores
- FPGA or SoC FPGA
- Each in its own logic, independent timing
Protection response
Over-current, desaturation, over-voltage.
- Real-time MCU
- Hardware trip zones help; software paths add latency
- FPGA or SoC FPGA
- A few clock cycles, independent of the processor
Unit cost
- Real-time MCU
- Pounds to tens of pounds
- FPGA or SoC FPGA
- Tens to hundreds of pounds
Engineering cost and change
- Real-time MCU
- Lower; C and mature toolchains; quick to iterate
- FPGA or SoC FPGA
- Higher; RTL or HLS, timing closure, longer iterations
Lifecycle
Availability over a fifteen-year deployment.
- Real-time MCU
- Good for mainstream families
- FPGA or SoC FPGA
- Typically long; design is portable between devices
Route to silicon
- Real-time MCU
- Not applicable
- FPGA or SoC FPGA
- A direct path to an ASIC when volume justifies it
The decision procedure
Six questions, in this order
What is the fastest loop, and what jitter can it tolerate?
A current loop at 20 kHz with a 5 µs jitter budget is MCU territory. A 100 kHz loop with a sub-microsecond budget is not.
How many real-time functions run at once?
One axis and one protocol: processor. Several axes, acquisition alignment, a protocol engine and an estimator: fabric, or a fabric beside a processor.
How fast must protection act?
If a late trip costs a power stage or a person, the trip path should not pass through software.
What are the interfaces?
Standard buses and a few ADCs favour the MCU. Many high-rate converters, custom serial links or deterministic Ethernet favour fabric.
What is the lifecycle?
A product fielded for fifteen years needs a device that will still be made and a design that can move if it is not.
Is there an adaptive layer, and must it be kept away from the control loop?
If yes, the partition itself is a reason for fabric: the loop and the adaptation can be separate hardware with a defined, bounded interface.
Adaptive, safely
The adaptive layer suggests. The control loop decides.
Adaptive intelligence in a machine means a model running beside the controller, estimating state and parameters from the sensors and proposing changes: a gain, a dead time, a setpoint. The temptation is to let it write directly to the loop. The architecture we use does not. The primary control loop runs in its own logic with its own timing and its own protection. The adaptive layer produces bounded suggestions through a defined interface, and a supervisor decides whether and how fast to apply them.
This is the supplementary-layer pattern, and it matters for three reasons. The deterministic loop keeps its timing regardless of what the model is doing. The safety argument stays small, because the part that has to be argued about is the loop and the bound, not the model. And an assessor working to IEC 61508 can see the boundary in the hardware rather than in a diagram. The fabric is what makes the boundary a fact rather than a convention. On a single processor the two share everything.
This is concept and design-specification work at Novomorphic today. We do not quote an efficiency or performance improvement for it, and we will not quote one for a customer’s machine before seeing their data.
When the MCU is the better answer
Most of the time, and here is how to tell
One motor, a loop at or below about 20 to 30 kHz, and standard protection: a real-time MCU with its trip zones does this well and cheaply.
A product whose main cost pressure is unit price at volume and whose timing requirement is comfortable: the FPGA will never pay back.
A team that knows C and does not know RTL, with no appetite to change: the engineering risk of the fabric outweighs its benefit.
An application where the adaptive layer is advisory and offline, so the partition argument does not apply.
The honest middle ground is the SoC FPGA: a processor for the software, fabric for the deterministic path, on one device. Much of our work sits there, and our FPGA proof-of-concept engagements end with a written assessment of whether the result should stay on an FPGA, move to an MCU, or go to silicon.
What this does not prove
Fabric fixes timing, not design quality
A deterministic datapath with the wrong algorithm is deterministically wrong. An FPGA does not make an estimator accurate or a control law stable; it makes their timing predictable. Timing closure, verification and the test bench are where the engineering effort goes, and they are the reason FPGA programmes take longer than they first appear.
The published numbers above are from the cited implementations and the cited measurement farm. They are not Novomorphic measurements.
