Software-in-the-loop (SIL) is a method of testing and validating code in a simulation environment in order to quickly and cost-effectively catch bugs and improve the quality of the code. Typically, SIL testing is conducted in the early stages of the software development process, while the more complex, costlier hardware-in-the-loop (HIL) testing is done in later stages.
SIL is particularly important in the automotive industry as OEMs move toward building software-defined vehicles that enable features and functions primarily through software.
Each new software program — whether it is related to advanced safety, autonomous driving, user experience or other areas — has thousands of specific requirements, and it is not practical to perform manual testing to make sure the software
does what it is supposed to do. It is prohibitively expensive and time-consuming to physically load software under development into an actual vehicle and test-drive it for the potentially hundreds of thousands of miles needed to make sure the software
works in all types of driving conditions.
Companies developing applications for the automotive industry write code every day, and new builds must be tested daily as well, in keeping with the tenets of modern software development: continuous integration, continuous deployment and continuous testing.
- SIL simulations can be run on any standard desktop computer without requiring the special equipment or test benches needed for HIL testing. This makes it cost-effective to deploy SIL testing across many instances, which reduces testing bottlenecks and speeds up the development process.
- Because the simulation is being performed entirely in software, the testing can actually go faster than it would in real time.
- Simulation programs deliver flexibility and repeatability. Testers run multiple simulations, adjusting for a single variable while all other aspects of the scenario remain constant, creating a more effective feedback loop with software developers.
- SIL helps decouple software and hardware development, allowing software developers to create new features and functions at their own accelerated pace.
- Organizations can test pieces of code or components of a complex solution as they are being developed rather than waiting for the entire product to be finished.
- With multithreading, multiple tests can be conducted at the same time rather than sequentially, which also saves time and improves efficiency.
- The simulations developed for SIL can be reused on HIL tests to monitor physical hardware performance and cross-correlations.
- The results can be easily shared across development teams from technology providers, OEMs and third parties.
The effectiveness of SIL is dependent on the quality of the modeling software and the test cases and scripts that are written to simulate specific road conditions and driving scenarios. Aptiv has developed a custom logging and visualization tool that
enables the recording of live driving data and the visualization of sensor data and vehicle performance. This enables Aptiv to create accurate test scripts that simulate specific driving scenarios.
With automated SIL and HIL testing, Aptiv has been able to slash daily build times by 70 percent. In some extreme cases, the build time has been reduced from 12 hours to only five minutes. The result is faster time to market for key industry applications.