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 the metrics to show that the generated code does not contain unintended functionality.
Topics
Code Coverage with Simulink Coverage
- 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. - Software-in-the-Loop Code Coverage (Simulink Coverage)
This example shows how to collect code coverage metrics from a model reference using software-in-the-loop (SIL) mode. - View and Filter Code Coverage Results Using the Code Pane (Simulink Coverage)
This example shows how to view code coverage results and justify code coverage outcomes directly from the Code pane in Simulink®. - Evaluate Differences Between Model and Code Coverage (Simulink Coverage)
This example shows how to use Simulink® Test™ Manager to analyze model coverage and generated code coverage, and investigate differences in the results.
Code Coverage with Third-Party Tools
- Configure Code Coverage with Third-Party Tool
Use LDRA tool suite 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 tool. - Code Coverage Summary and Annotations
Third-party code coverage tool produces code generation report with summary data and annotated coverage information. - Collect Code Coverage Metrics with Third-Party Tool
Measure code coverage with a third-party tool. - Third-Party Code Coverage Tool Support
Third party code coverage tool and compiler support. - Tips and Limitations
Miscellaneous information about code coverage with third-party tool.