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에서 Collect Coverage for Models에 대해 자세히 알아보기

제품

릴리스

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by