Every test team is familiar with MiL, SiL, and HiL. However, it is often unclear which test belongs at which stage and how many tests are unnecessarily running on expensive HiL test benches. This comparison contrasts the X-in-the-Loop methods and provides a decision matrix for your test planning.

Every test team is familiar with MiL, SiL, and HiL. The real question is: which test belongs at which stage—and how many tests are running on the expensive HiL test bench even though they don't belong there? This comparison contrasts the X-in-the-Loop methods based on clear criteria and provides a decision matrix for your test planning.
The difference between MiL, SiL, and HiL lies in what is real and what is simulated: Model-in-the-Loop (MiL) tests the functional model, Software-in-the-Loop (SiL) tests the production code without special embedded hardware, and Hardware-in-the-Loop (HiL) tests the actual ECU. With each stage, realism typically increases, while scalability and parallelizability decrease. Costs depend primarily on the simulation effort.
X-in-the-Loop (XiL) is the umbrella term for test methods where part of the system is real and the rest is simulated. The "X" stands for the device under test: a model, software, a processor, or a complete ECU. As development progresses, more real components are added to the control loop. The control loop does not always have to be closed: in open-loop approaches, such as the re-simulation of recorded camera data, the device under test is supplied with data without its reaction affecting the simulation. The industry is therefore increasingly speaking of simulation in general rather than individual In-the-Loop stages, although no new established terms exist yet.
The stages at a glance:
The methods differ not only technically but, above all, in terms of cost, speed, and scalability. The following table compares the three main stages based on the criteria that are decisive for test planning.
| Criterion | Model-in-the-Loop (MiL) | Software-in-the-Loop (SiL) | Hardware-in-the-Loop (HiL) |
|---|---|---|---|
| Device under test | Functional model | Production code | Real ECU |
| Special embedded hardware required | no | no | yes, test bench |
| realism | low | medium | high |
| project stage | very early | early | late, as soon as hardware is available |
| execution | non-real-time | non-real-time (faster or slower depending on the model), parallel | real-time, serial |
| scaling | unlimited | unlimited, cloud | limited by number of test benches |
| infrastructure costs per test run | very low | low | high |
| CI/CD capability | high | high | limited |
| Typically finds | Logic and concept errors | Code, integration, and protocol errors | Electrical, real-time, and bus design errors |
The table shows the basic pattern: each stage typically finds a different class of error, and none completely replaces the others.
One cost factor is missing from every such table: the effort required for the simulation itself. This does not depend on the stage. A MiL or SiL can require significantly more complex simulations than a HiL, and vice versa. Some simulation aspects are simply too much for a SiL because the effort and benefit are out of proportion. Therefore, where a test is run is also decided by which simulation is necessary for it and whether it already exists. The more stage-independent simulations are set up, the better they can be reused across MiL, SiL, and HiL.
The right stage is determined by the test question, not by habit. Many teams send tests to the HiL test bench simply because it is available—even though the test question does not require actual hardware.
A large portion of the test questions in this matrix can be answered without special embedded hardware. This is exactly where the potential lies: do not eliminate HiL, but relieve HiL of everything it does not need. Virtual ECUs (vECUs) are a prerequisite for virtual integration testing.
Frontloading means shifting tests to virtual stages as early as possible. The reason is economic. Errors found early in the development process cost a fraction of later corrections—and every error that SiL finds no longer blocks a HiL slot.
Our "Passenger Car Exterior Lighting System" test scenario with 15 ECUs and over 1,800 test combinations per release demonstrates the impact:
The greatest effort in frontloading is not the technology, but the duplicate test maintenance. If SiL and HiL tests are created in separate tools and formats, the team maintains two separate testing worlds. The solution is a platform that connects both worlds.
violis connects existing tools such as Vector CANoe4SW, dSPACE VEOS, Synopsys Silver, tracetronic ecu.test, pytest, and MATLAB/Simulink via standardized interfaces. Virtual and physical test worlds are connected, and results are consolidated centrally. In our experience, many existing HiL test cases can be reused instead of being rewritten for SiL. The same applies to simulations: this is precisely where a synergy exists that is often not leveraged today. Those who set up environment and residual bus models across stages can use them equally in MiL, SiL, and HiL.
This is what a typical migration looks like:
How these steps come together into an end-to-end approach is covered in our guide to Software-Defined Testing.
MiL, SiL, and HiL are not competitors, but tools for different classes of errors. By assigning every test question to the most cost-effective, appropriate stage, you shift the bulk of testing to the virtual environment and free up the HiL test bench for what only real hardware can do.
Software-in-the-Loop (SiL) testet den Seriencode rein virtuell ohne spezielle Embedded-Hardware, simuliert auf gängiger Computer-Hardware, Hardware-in-the-Loop (HiL) testet das reale Steuergerät an einem Echtzeit-Simulator. SiL skaliert parallel und kostengünstig in der Cloud, HiL bleibt für hardwarenahe Tests und die finale Freigabe nötig.
Model-in-the-Loop (MiL) testet das Funktionsmodell, Software-in-the-Loop (SiL) testet den daraus erzeugten oder programmierten Seriencode. Der Vergleich beider Ergebnisse im Back-to-Back-Test zeigt, ob der Code sich wie das Modell verhält.
XiL steht für X-in-the-Loop und ist der Oberbegriff für Model-in-the-Loop, Software-in-the-Loop, Processor-in-the-Loop, Hardware-in-the-Loop und Vehicle-in-the-Loop. Das „X" bezeichnet den jeweiligen Prüfling, der in einem geschlossenen Regelkreis mit einer simulierten Umgebung getestet wird.
Software-in-the-Loop (SiL) kann Hardware-in-the-Loop (HiL) nicht vollständig ersetzen, aber stark entlasten. Funktionslogik, Integration und die Regression nicht hardwarerelevanter Funktionen lassen sich virtuell absichern. Elektrisches Verhalten, Busauslegung, Timing und die End-to-End-Kommunikation über alle ISO/OSI-Schichten brauchen weiterhin reale Steuergeräte.
Processor-in-the-Loop (PiL) ist eine Zwischenstufe zwischen SiL und HiL, bei der der Seriencode auf dem Zielprozessor oder einem Evaluation Board läuft. PiL deckt Compiler- und Laufzeiteffekte auf, ohne ein komplettes Steuergerät am Prüfstand zu benötigen.