If you choose to generate a coverage report automatically after analysis from the Coverage > Results pane of the Configuration Parameters dialog box or you generate a report from the Results Explorer, the Simulink® Coverage™ software creates one or more model coverage reports after a simulation.
|Report Type||Description||HTML Report File Name|
|Top-Level Model Coverage Report||Provides coverage information for all model elements, including the model itself.|
|Model Summary Report||Provides links to coverage results for referenced models and external MATLAB® files in the model hierarchy. Created when the top-level model includes Model blocks or calls one or more external files.|
|Model Reference Coverage Report||Created for each referenced model in the model hierarchy; has the same format as the model coverage report.|
|External MATLAB File Coverage Report||Provides detailed coverage information about any external MATLAB file that the model calls. There is one report for each external file called from the model.|
|Subsystem Coverage Report||Model coverage report includes only coverage results for the subsystem, if you select one.|
|Code Coverage Report||Provides coverage information for C/C++ code in S-Function blocks, or for models in SIL mode.|
If the top-level model contains Model blocks
or calls external files, the software creates a model summary coverage
The title of this report is Coverage by Model.
The summary report lists and provides links to coverage reports for Model block referenced models and external files called by MATLAB code in the model. For more information, see External MATLAB File Coverage Report.
The following graphic shows an example of a model summary report.
It contains links to the model coverage report (
a report for the Model block (
and three external files called from the model (
If your top-level model references a model in a Model block,
the software creates a separate report, named
that includes coverage for the referenced model. This report has the
same format as the Top-Level Model Coverage Report. Coverage results are recorded as
if the referenced model was a standalone model; the report gives no
indication that the model is referenced in a Model block.
If your top-level model calls any
external MATLAB files, select MATLAB files on
the Coverage pane in the Configuration Parameters
dialog box. The software creates a report, named
for each distinct file called from the model. When there are several
calls to a given file from the model, the software creates only one
report for that file, but it accumulates coverage from all
the calls to the file. The external MATLAB file coverage report
does not include information about what parts of the model call the
The first section of the external MATLAB file coverage report contains summary information about the external file, similar to the model coverage report.
The Details section reports coverage for the external file and the function in that file.
The Details section also lists the content of the file, highlighting the code lines that have decision points or function definitions.
Coverage results for each of the highlighted code lines follow in the report. The following graphic shows a portion of these coverage results from the preceding code example.
In the Coverage pane of the Configuration Parameters dialog box, when you select Enable coverage analysis, you can click Select Subsystem to request coverage for only the selected subsystem in the model. The software creates a model coverage report for the top-level model, but includes coverage results only for the subsystem.
However, if the top-level model calls any external files and you select MATLAB files in the Coverage pane in the Configuration Parameters dialog box, the results include coverage for all external files called from:
The subsystem for which you are recording coverage
The top-level model that includes the subsystem
If the subsystem parameter Read/Write Permissions is
NoReadOrWrite, the software does
not record coverage for that subsystem.
For example, in the
fuelsys model, you click Select
Subsystem, and select coverage for the
The report is similar to the model coverage report, except that
it includes only results for the
and its contents.
For each S-Function block, the model coverage report links to a detailed code coverage report for the C/C++ code in the block. For more information on how to navigate the report, see View Coverage Results for Custom C/C++ Code in S-Function Blocks.
If you have Embedded Coder® installed, you can also generate code coverage reports from models in SIL or PIL mode. For more information on how to generate code coverage reports for models in SIL or PIL mode, see Code Coverage for Models in Software-in-the-Loop (SIL) Mode and Processor-in-the-Loop (PIL) Mode.