Simulink Coverage in End-to-End Systematic Verification

You can use Simulink® Coverage™ to increase confidence in your design and testing through end-to-end systematic verification.

System Requirements

End-to-end systematic verification begins with system requirements. The system requirements detail the model design and the testing and verification specifications.

If you have a Simulink Requirements™ license, you can author and manage system requirements, link Simulink blocks to requirements, and link test cases to the requirements that they verify from within the Simulink environment. For more information, see Test Model Against Requirements and Report Results.

Simulation Data

To record coverage, you first specify input signals for your model. For more information, see Create and Run Test Cases and Perform Functional Testing and Analyze Test Coverage.

If you have a Simulink Design Verifier™ license, you can also specify expected output signals for the specified input signals. For more information, see Perform Functional Testing and Analyze Test Coverage (Simulink Design Verifier). You can also automatically generate test case for a system. For more information, see Workflow for Test Case Generation (Simulink Design Verifier).

Simulation

After you Specify Coverage Options for your model, you then simulate the model and record model coverage. For more information on the types of model coverage, see Types of Model Coverage. You can record several runs of coverage data and accumulate the results. For more information, see Access, Manage, and Accumulate Coverage Results​​ by Using the Results Explorer and Cumulative Coverage Data.

If you have an Embedded Coder® license, you can also record code coverage for models in software-in-the-loop (SIL) mode and processor-in-the-loop (PIL) mode. The code coverage reports tell you which parts of your generated code are exercised by your tests, and also which elements of your model are associated with which parts of your generated code. For more information on enabling SIL or PIL code coverage for a model, see Specify Code Coverage Options.

If you have a Simulink Design Verifier license, you can model and verify design requirements using property proving. For more information, see Requirements-Based Verification (Simulink Design Verifier).

Coverage Reports and Model Highlighting

After you record coverage for a simulation, you then review the coverage reports and model highlighting to identify gaps in your testing, with the goal of gaining confidence that your tests and verification are complete and adequate. For more information on coverage reports and model highlighting, see:

If you have an Embedded Coder license and you record code coverage for models in software-in-the-loop (SIL) mode and processor-in-the-loop (PIL) mode, code coverage reports tell you which parts of your generated code are exercised by your tests, and also which elements of your model are associated with which parts of your model. For more information on enabling SIL or PIL code coverage for a model, see Code Coverage for Models in Software-in-the-Loop (SIL) Mode and Processor-in-the-Loop (PIL) Mode.

Resolve Missing Coverage

If you find that parts of your design are not fully tested, you can take steps to resolve the missing coverage and gain confidence that your tests and verification are complete and adequate. For more information, see Resolving Missing Coverage.

Archive and Report

When you are confident in the testing and verification of your design, you can archive and report the results of the coverage recording. For more information, see: