As vehicles become software-defined, testing resources must shift left from expensive hardware prototypes to flexible virtual environments. Software-in-the-loop (SiL) testing – running ECU software on a PC or in the cloud against simulated models – is far faster and cheaper than hardware-in-the-loop (HiL) benches. This allows teams to uncover most defects early and at scale before committing to costly HIL rigs. By contrast, HiL testing (real ECUs connected to simulators) remains essential for hardware-dependent faults (timing, electrical effects, bus latency, etc.).

Our analysis finds that a SiL-first strategy (shift-left) yields far lower cost-per-test and virtually unlimited parallelism, while reserving HiL for final integration. Enterprise HiL systems typically cost $50K+ each, whereas SiL needs only standard servers or cloud instances. HiL benches, by contrast, handle only one or a few ECUs at a time (e.g. ~200 tests/day). Following SiL in CI, and moving to HiL only when necessary (as OPAL-RT recommends: “otherwise the lab becomes a bottleneck”), lets teams filter out trivial failures cheaply and focus hardware tests on the critical cases.

Below we compare cost, speed, fidelity, and use cases of HiL vs. SiL, and outline a recommended investment order. A comparison table and flowchart illustrate the strategy, and we conclude with how NTQ Europe can help implement it.

Introduction

Modern cars have become software-defined vehicles, often containing 100+ million lines of code. Testing that complexity traditionally relies on hardware-in-loop (HiL) benches, but this can leave bugs undetected until late stages. In 2024, 42% of vehicle recalls were software-related, underscoring the danger of late defect discovery. Automotive teams now face “shift-left” pressure: catch bugs earlier via simulation. Software-in-loop (SiL) – running compiled ECU code against virtual models on a PC or cloud – enables massive early testing. HiL (real ECU + simulated environment) catches what SiL misses, but only after the code has passed virtual tests.

As one industry analyst explains, “SIL and HIL are sequential, not competing, stages” in validation. Our goal here is to show how SiL can be used first to maximize coverage at minimal cost, with HiL reserved for the final integration hurdles. Teams that invert this (buying lots of HIL benches too early) often hit a throughput limit at exorbitant cost. By following a SiL-first plan, teams gain a cheaper path to comprehensive testing and can “scale validation with cloud/SiL rather than capital equipment”

Cost and Scalability: Bench vs. Cloud

A typical enterprise-grade automotive HiL setup (PXI/FPGA platforms from dSPACE, NI, OPAL-RT) starts around $50,000 and often far higher. Even mid-range benches run 5K–20K for modest I/O, while budget DIY rigs can be below $2K. But hardware cost is only half the story – engineering time, lab space, and maintenance add much more. In contrast, a SiL environment needs only compute (PCs or cloud servers), costing tens to hundreds of dollars per month per instance, with no special hardware.

 

Figure 1: Cost-effectiveness of SiL and HiL testing in automotive development (Source: Aptiv)

In practice, this means cost per test hour is dramatically lower for SiL. A 1-CPU instance on AWS (or similar) costs a few dollars per hour and can run tests faster-than-real-time. In contrast, a HiL bench entails a fixed capital cost (~$50K) amortized over its test hours. More importantly, you can spin up many cloud instances for parallel work. As Applied Intuition notes, running 10,000 ADAS simulation scenarios sequentially would take ~70 days, but running 1,000 in parallel finishes in under 2 hours – all at cloud rates.

HiL throughput, meanwhile, is severely limited by hardware count. A single ECU bench can only test one target at a time, typically 100–200 test cases per day. If a team blindly shifts all tests to HiL, they face a capacity wall: to run 10× more tests they need ~10× more benches and engineers, at 10× the capital. In contrast, adding compute instances to extend SiL capacity is cheap and instant.

Test Speed and Throughput

SiL’s biggest advantage is speed. Without real-time constraints, simulations can run faster-than-wall-clock, or at least in parallel on many cores. This lets teams test huge scenario libraries, iterate overnight, or even continuous-test on every commit. By contrast, HiL must operate in real time or slower (especially for long soak or fatigue tests).

Practically, SiL can feed each test machine with thousands of scenarios at once. For example, Advanced Driver Assistance Systems teams run millions of simulated miles per day on cloud clusters to catch rare corner cases. A succinct way to see the scale: if one HiL bench runs 200 tests/day, then covering 10,000 tests would take ~50 days on one bench. But with 50 virtual instances in parallel, the same 10,000 tests complete in a single day.

Simulation’s parallelism also makes continuous integration viable. As Veecle notes, treating physical rigs as a scarce resource makes commits queue up; instead, “simulation in CI on every commit, HIL nightly” is the tiered approach. In other words, let SiL catch compile-time and logic failures automatically so that HiL benches only run after the software already boots and begins to operate. This dramatically improves feedback loops and avoids bench contention.

Fidelity and Fault Coverage

SiL excels at uncovering algorithmic or logic bugs, control-flow errors, and violations of software requirements. Because SiL runs the production-intent code on a virtual model, it will catch software logic errors, state machine bugs, and many integration issues (e.g. correct sequencing of CAN messages, protocol framing, error handling). SiL can also safely stimulate extreme or dangerous conditions (sensor dropouts, edge environmental scenarios) without risk. Importantly, standards (like ISO 26262 and SOTIF) increasingly require thorough hazard testing via simulation.

However, SiL has limits: it cannot perfectly model real hardware quirks. For example, timing behavior on an actual microcontroller, electrical noise, or analog thresholds may differ from the model. A virtual sensor will only produce values within its model’s logic; a real sensor might have jitter or nonlinearity. Thus certain faults only appear on real hardware: missed deadlines (overrun interrupt handlers), EMI/EMC effects, unexpected power supply fluctuations, or subtle interface bugs.

A HiL setup places the real ECU and firmware into a high-fidelity simulated vehicle environment. This means HiL catches everything SiL can (since the code is the same) plus hardware-dependent faults. Studies categorize several fault classes unique to HiL: real-time timing violations, bus latency or ordering issues on CAN/LIN/Ethernet, voltage/thermal edge cases, actual memory limits on the MCU, RTOS scheduling conflicts, and hardware-software integration errors. In essence, “a model is a scope, not a copy of reality”; HiL provides that crucial reality check.

In summary, SiL + HiL covers more than either alone. A typical strategy: use SiL to validate correctness of algorithms and logic under thousands of conditions (Section on simulation), then use a smaller HiL test suite to check the hardware interfaces, timing margins, and performance. This aligns with Veecle’s rubric (see table below): many tests belong in CI (simulation) and only the timing/analog ones in the lab.

Recommended Investment Sequence

Building on the above, the investment priority for teams is clear: Invest in SiL (software-in-loop, virtual testing) first, then add HiL (hardware benches) where necessary. This shift-left approach matches the V-model: start with model-in-loop (MIL) & SiL for unit/functional tests, proceed to processor-in-loop (PIL) and small HIL clusters only when needed, and reserve full ECU HIL for final validation.

A condensed decision process (Figure below) is often applied: if a test only depends on software logic or digital state, run it in simulation; if it can only fail due to physical parameters (voltage, ns-level timing, noise), it requires HiL. Veecle’s flowchart (below) summarizes this by level of abstraction.

Figure2: Recommended test investment path. Start with virtual SiL tests for software validation, then proceed to HiL benches for final hardware integration.

By following this order, teams “put the cheap filter first”. For example, OPAL-RT advises: “start with SIL and move to the bench only when timing and I/O behavior must be proven — otherwise the lab becomes a bottleneck”. In practice, this means:

  • Step 1: Build a SiL environment (virtual ECUs, simulated plant models) and integrate with CI. Emphasize test coverage: every commit runs SI-level tests (thousands of cases in parallel).
  • Step 2: Use cloud CI/servers to maximize throughput cheaply (figure image above).
  • Step 3: Only once SiL signals “ready” do we push changes to the HiL lab. There, run a targeted subset of tests focusing on real I/O, analog thresholds, EMI, long-run soak, and safety-critical timing.
  • Step 4: Iterate – most bugs should already be caught in steps 1-2, so the HiL phase becomes much faster and predictable.

Applied in volume, the results can be dramatic. dSPACE reports that AI-driven SiL workflows can “reduce hardware needs by up to 80%”, meaning far fewer HIL benches are required if simulation is robust.

Table 1: Key differences between SiL and HiL in automotive ECU testing. See text for details and citations. 

Conclusion

In sum, the evidence strongly favors starting with SiL. Virtual testing provides orders-of-magnitude more throughput per dollar, catches most categories of bugs, and allows “testing as infrastructure” rather than last-minute manual work. HiL is indispensable but costly, so it should be used sparingly and strategically.

Many teams have experienced the pain of ignoring this advice: after doubling down on HIL benches, they still hit throughput limits and incur 10× the cost for the same coverage that scaled virtual tests could achieve. By contrast, a SiL-first approach is the cheaper path to more coverage. Virtual validation “significantly lowers development costs and accelerates time-to-market” by reducing reliance on physical prototypes.

NTQ Europe helps automotive partners adopt this strategy. Our experts can design a custom SiL/HIL testing roadmap – from setting up virtual ECU pipelines to integrating with continuous integration, and deploying HIL benches only where needed. We blend cloud/SIL and hardware approaches to maximize coverage while minimizing cost.

Ready to accelerate your testing and cut costs? Contact NTQ Europe’s Automotive Division to discuss building a scalable virtual test infrastructure and expert HiL setup tailored to your needs.

Read our latest article: What Makes Vietnam a Viable Automotive Engineering Delivery Location?

About us: https://ntq-europe.com/