User`s guide

11 Overview of Component Verification
11-6
Verify a Component Independently of the Container Model
Use component analysis to verify:
Model blocks
Atomic subsystems
Stateflow atomic subcharts
The recommended steps for verifying a component independently of the container model:
1
Depending on the type of component, take one of the following actions:
Model blocks — Open the referenced model.
Atomic subsystems — Extract the contents of the subsystem into its own
Simulink model.
Atomic subcharts — Extract the contents of the Stateflow atomic subchart into its
own Simulink model.
2
Create a harness model for:
The referenced model
The extracted model that contains the contents of the atomic subsystem or atomic
subchart
3
Add or modify test cases in the Signal Builder in the harness model.
4
Log the input signals from the Signal Builder to the test unit.
5
Repeat steps 3 and 4 until you are satisfied with the test suite.
6
Merge the test case data into a single file.
7
Depending on your goals, take one of the following actions:
Execute the test cases to:
Record coverage.
Record output values and make sure that they equal the expected values.
Invoke the Code Generation Verification (CGV) API to execute the test cases in
Software-in-the-Loop (SIL) or Processor-in-the-Loop (PIL) mode on the generated
code for the model that contains the component.
If the test cases do not achieve the desired results, repeat steps 3 through 5.