CPU and FPGA Models

Hardware-in-the-Loop (HIL) testing, selecting between CPU-based and FPGA-based model execution is driven by the target Electronic Control Unit (ECU) dynamic response requirements, signal carrier frequencies, and physical interface fidelity.

CPU execution relies on real-time operating systems running on multicore processors, processing plant models in discrete time steps typically ranging from 10 µs to 1 ms. This makes CPU execution the industry standard for vehicle dynamics models (e.g., ABS, ESP, active steering), internal combustion engine thermo-fluid dynamics, battery management system (BMS) cell balancing, body electronics, and rest-of-bus communication simulation (CAN FD, LIN, FlexRay).

However, CPU execution encounters architectural limitations when testing high-speed e-traction inverter ECUs, electric machine controllers (PMSM/IPMSM), or SiC/GaN-based power converters operating at high pulse-width modulation (PWM) switching frequencies (e.g., 10 kHz to 50 kHz). At these switching rates, CPU step sizes introduce artificial duty-cycle jitter and phase delays. FPGA execution addresses these limits by mapping mathematical models directly onto reconfigurable silicon hardware, achieving deterministic, sub-microsecond execution time steps (100 ns to 1 µs) with true spatial concurrency. This enables cycle-accurate tracking of inverter switching transients, precise emulation of position sensors (resolvers, quadrature encoders), and hardware decoding of protocols such as SENT or PSI5.

While FPGAs deliver the hard real-time fidelity required for electric powertrain sign off and physical fault injection, they incur higher implementation complexity, longer synthesis compilation times, fixed-point conversion constraints, and restricted logic resources compared to the rapid C-code generation from Simulink and native floating-point arithmetic offered by CPU targets

Aspect CPU Model Execution FPGA Model Execution
TARGET ECU & SUBSYSTEM DOMAIN Vehicle dynamics, ADAS path planning, body domain control, ICE thermo-fluids, BMS state-of-charge, and rest-of-bus simulation. Electric traction inverters (PMSM/IPMSM e-Motors), DC-DC converters, onboard chargers (OBC), and active noise cancellation.
EXECUTION LOOP RATE & LATENCY Step sizes of 10 µs to 1 ms; I/O latency governed by PCIe/PXI bus transfers and OS scheduling (~10–50 µs). Deterministic step sizes from 100 ns to 1 µs; I/O latency governed by direct FPGA pin routing (< 1 µs).
SENSOR & ACTUATOR INTERFACE EMULATION Standard analog/digital I/O, software-managed PWM edge capture, and bus interface drivers (CAN FD, LIN). Hardware-level cycle-accurate PWM capture, Resolver/Hall sensor signal synthesis, and high-speed protocol decoding (SENT, PSI5).
TOOLCHAIN & WORKFLOW VELOCITY Automatic C/C++ code generation from Simulink/TargetLink; compilation within seconds/minutes; interactive variable tuning. High-Level Synthesis (HLS) or HDL generation (HDL Coder, Vivado); synthesis and place-and-route times ranging from 30 minutes to several hours.
NUMERICAL PRECISION & RANGE Native IEEE 754 32-bit (single) and 64-bit (double) floating-point arithmetic; wide dynamic numerical range. Optimized fixed-point arithmetic or dedicated floating-point DSP blocks; requires bit-width scaling to conserve logic gates.