Main Content

Software-in-the-Loop Simulation

Test generated code on development computer

A software-in-the-loop (SIL) simulation compiles generated source code and executes the code as a separate process on your host computer. By comparing normal and SIL simulation results, you can test the numerical equivalence of your model and the generated code. During a SIL simulation, you can collect code coverage and execution-time metrics for the generated code.

Apps

SIL/PIL ManagerVerify generated code

Topics

Troubleshooting

Debug Generated Code During SIL or PIL Simulation

Use a debugger to understand the behavior of generated code.

View SIL and PIL Files in Code Generation Report

Produce a code generation report and static code metrics that cover SIL and PIL files.

Numerical Consistency of Model and Generated Code Simulation Results

Determine whether model and generated code simulation results are numerically consistent. Investigate discrepancies.

Featured Examples