I have a simple model with 2 inputs and a logical AND block that I have set to collect coverage on, using the Structural Coverage level of "Decision"
However, when I run the model and analyze the coverage results, no "Decision" coverage is reported. Why is Simulink not reporting the decision coverage?

 採用された回答

MathWorks Support Team
MathWorks Support Team 2019 年 4 月 24 日
編集済み: MathWorks Support Team 2019 年 4 月 24 日

1 投票

Decision Coverage in Simulink is defined as:
"Decision coverage analyzes elements that represent decision points in a model, such as a Switch block or Stateflow® states. For each item, decision coverage determines the percentage of the total number of simulation paths through the item that the simulation traversed."
Since the AND output is not driving a decision making block, there is no decision coverage to collect. By adding a switch that is being driven by the AND block, you can observe that the decision coverage is reported:
The AND block will need to have Condition coverage enabled to examine the level of coverage it has. Condition coverage verifies that all combinations of inputs are tested for a given Logical operator block.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Verification, Validation, and Test についてさらに検索

製品

リリース

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by