Collect Coverage for Code
Simulink® Coverage™ measures code coverage and indicates the untested elements of your design. You can collect coverage for the C/C++ code in supported model elements, MATLAB® Function blocks, or the code generated from models in software-in-the-loop (SIL) mode or processor-in-the-loop (PIL) mode. Simulink Coverage measures several types of code coverage analysis, such as statement, condition, decision, and modified condition/decision coverage.
Code Coverage Basics
Coverage for MATLAB Code Used in Simulink
Coverage for Integrated C/C++ Code
- Coverage for Models with Code Blocks and Simulink Blocks
Record coverage for models with a combination of code blocks and other Simulink blocks.
- Coverage for Custom C/C++ Code in Simulink Models
Analyze model coverage for C/C++ S-Functions.
- View Coverage Results for Custom C/C++ Code in S-Function Blocks
View coverage results for the C/C++ code in S-Function blocks in your model.
Coverage for Generated Code
- 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.