文档

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.

话题

SIL and PIL Simulations

An overview of software-in-the-loop (SIL) and processor-in-the-loop simulations (PIL).

Choose a SIL or PIL Approach

Test code generated from top models, referenced models, or subsystems.

Configure and Run SIL Simulation

Set up and run top-model SIL, Model block SIL, and SIL block simulations.

Test Generated Code with SIL and PIL Simulations

Use software-in-the-loop (SIL) and processor-in-the-loop (PIL) simulations to test numerical equivalence between model components and generated code.

Simulation Mode Override Behavior in Model Reference Hierarchy

How the simulation mode of the top model or a parent block determines the simulation behavior of a model reference hierarchy.

SIL and PIL Limitations

Modeling and code generation features that are not 金宝appsupported or partially supported by SIL and PIL simulations.

故障排除

Debug Generated Code During SIL 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.

这个话题有帮助吗?