Retrieve signal size coverage information from cvdata
object
[min, max, allocated]
= sigsizeinfo(data, object)
[min, max, allocated]
= sigsizeinfo(data, object, portID)
[
returns
the minimum, maximum, and allocated signal sizes for the outputs of
model component min
, max
, allocated
]
= sigsizeinfo(data
, object
)object
within the coverage data
object data
, if object
supports
variable size signals.
[
returns
the minimum and maximum signal sizes associated with the output port min
, max
, allocated
]
= sigsizeinfo(data
, object
, portID
)portID
of
the model component object
.
|
| ||||||||||||||||||
|
An object in the model or Stateflow® chart that receives
signal size coverage. Valid values for
| ||||||||||||||||||
|
Output port number of the model component |
|
Maximum signal size output by the model component |
|
Minimum signal size output by the model component |
|
Allocated signal size output by the model component |
Collect signal size coverage data for the Switch block
in the sldemo_varsize_basic
model:
mdl = 'sldemo_varsize_basic'; open_system(mdl); %Create test spec object testObj = cvtest(mdl); %Enable signal size coverage testObj.settings.sigsize=1; %Simulate the model data = cvsim(testObj); %Set the block handle blk_handle = get_param([mdl, '/Switch'], 'Handle'); %Get signal size data [minVal, maxVal, allocVal] = sigsizeinfo(data, blk_handle);
Use the coverage settings to collect signal size coverage for a model:
Open the model for which you want to collect signal size coverage.
In the Simulink Editor, select Model Settings on the Modeling tab.
On the Coverage pane of the Configuration Parameters dialog box, select Enable coverage analysis.
Under Coverage metrics, select Signal Size.
Click OK to close the Configuration Parameters dialog box and save your changes.
Simulate the model by clicking the Run button and review the results.
complexityinfo
| conditioninfo
| cvsim
| decisioninfo
| mcdcinfo
| sigrangeinfo
| tableinfo