Quantcast

Documentation Center

  • Trial Software
  • Product Updates

sigsizeinfo

Retrieve signal size coverage information from cvdata object

Syntax

[min, max, allocated] = sigsizeinfo(data, object)
[min, max, allocated] = sigsizeinfo(data, object, portID)

Description

[min, max, allocated] = sigsizeinfo(data, object) returns the minimum, maximum, and allocated signal sizes for the outputs of model component object within the coverage data object data, if object supports variable size signals.

[min, max, allocated] = sigsizeinfo(data, object, portID) returns the minimum and maximum signal sizes associated with the output port portID of the model component object.

Input Arguments

data

cvdata object

object

An object in the model or Stateflow® chart that receives signal size coverage. Valid values for object include the following:

Object SpecificationDescription

BlockPath

Full path to a Simulink® model or block

BlockHandle

Handle to a Simulink model or block

slObj

Handle to a Simulink API object

sfID

Stateflow ID

sfObj

Handle to a Stateflow API object

{BlockPath, sfID}

Cell array with the path to a Stateflow chart or atomic subchart and the ID of an object contained in that chart or subchart

{BlockPath, sfObj}

Cell array with the path to a Stateflow chart or atomic subchart and a Stateflow object API handle contained in that chart or subchart

[BlockHandle, sfID]

Array with a handle to a Stateflow chart or atomic subchart and the ID of an object contained in that chart or subchart

portID

Output port number of the model component object

Output Arguments

max

Maximum signal size output by the model component object within the cvdata object data. If object has multiple outputs, max is a vector.

min

Minimum signal size output by the model component object within the cvdata object data. If object has multiple outputs, min is a vector.

allocated

Allocated signal size output by the model component object within the cvdata object data. If object has multiple outputs, allocated is a vector.

Examples

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);

Alternatives

Use the Coverage Settings dialog box to collect signal size coverage for a model:

  1. Open the model for which you want to collect signal size coverage.

  2. In the Simulink Editor, select Analysis > Coverage > Settings.

  3. On the Coverage tab, select Coverage for this model.

  4. Under Coverage metrics, select Signal Size.

  5. On the Results and Reporting tabs, specify the output you need.

  6. Click OK to close the Coverage Settings dialog box and save your changes.

  7. Simulate the model and review the results.

See Also

| | | | | |

Was this topic helpful?