User`s guide

18 Coverage Collection During Simulation
18-10
Model Coverage for Multiple Instances of a Referenced Model
In this section...
“About Coverage for Model Blocks” on page 18-10
“Record Coverage for Multiple Instances of a Referenced Model” on page 18-10
About Coverage for Model Blocks
Model blocks do not receive coverage directly; if you set the simulation mode of the Model
block to Normal, the Simulink Verification and Validation software records coverage for
the model referenced from the Model block. If the simulation mode for the Model block
is anything other than Normal, the software does not record coverage for the referenced
model.
Your Simulink model can contain multiple Model blocks with Normal simulation mode
that reference the same model. When the software records coverage, each instance of the
referenced model can be exercised with different inputs or parameters, possibly resulting
in additional coverage for the referenced model.
The Simulink Verification and Validation software records coverage for all instances of
the referenced model with Normal simulation mode and combines the coverage data for
that referenced model in the final results.
Record Coverage for Multiple Instances of a Referenced Model
To see how this works, simulate a model twice. The first time, you record coverage for one
Model block in Normal simulation mode. The second time, you record coverage for two
Model blocks in Normal simulation mode. Both Model blocks reference the same model.
“Record Coverage for the First Instance of the Referenced Model” on page 18-10
“Record Coverage for the Second Instance of the Referenced Model” on page 18-16
Record Coverage for the First Instance of the Referenced Model
Record coverage for one Model block.
1
Open your top-level model. This example uses the following model: