Main Content

Code Coverage

Collect metrics for generated code during SIL or PIL simulation

Collect code coverage metrics during software-in-the-loop (SIL) and processor-in-the-loop (PIL) simulations. You can use these metrics to show that the generated code does not contain unintended functionality.

Topics

Code Coverage with Simulink

Simulink Code Coverage Metrics

Metrics produced by code coverage analysis.

Code Coverage for Models in Software-in-the-Loop (SIL) Mode and Processor-in-the-Loop (PIL) Mode

Configure code coverage for SIL and PIL simulations and review results.

Code Coverage with Third-Party Tools

Configure Code Coverage with Third-Party Tools

Use LDRA Testbed® or BullseyeCoverage to collect code coverage metrics during a SIL or PIL simulation.

Configure Code Coverage Programmatically

Use line commands to set up third-party code coverage analysis for a SIL or PIL simulation.

View Code Coverage Information at the End of SIL or PIL Simulations

Access results from third-party code coverage tools.

Code Coverage Summary and Annotations

The use of a third-party code coverage tool produces a code generation report with summary data and annotated coverage information.

Collect Code Coverage Metrics with a Third-Party Tool

Measure code coverage with third-party tools.

Code Coverage Tool Support

Third party code coverage tool and compiler support.

Tips and Limitations

Miscellaneous information about code coverage with third-party tools.