In which cases the coverage report (MCDC & Condition) of a block is influenced by the connection of the block's output with a scope?

I have an AND block in a subsystem in Simulink and the coverage report shows that the input of the Port 2 was never false (for more details see fig1). The output of the AND block, the Input of Port 1 and the Input of Port 2 are shown respectively in fig 2. However, after connecting the Scope with the AND block (see fig1), the coverage result changed to 100% for this block.
I ran the simulation with fixed discrete step. The AND block is indeed in a subsystem but this subsystem is not triggered by any signal. What should I check to solve this issue?
Kind regards

댓글 수: 3

Unfortunately not. The inputs of my AND block are sufficient to satisfy condition and MCDC coverage. However, the coverage reports shows that it is not the case. Connecting the output of the block with the scope generates full coverage! Theoretically speaking, which are possible scenarios that can lead to this case?
Did you get any positive response?

댓글을 달려면 로그인하십시오.

답변 (1개)

Hi Ada,
This could be because Simulink typically optimizes simulation by omitting some test-cases. However, when a scope block is there, these cannot be optimized and thus you get complete coverage.
To get complete coverage without scope block by avoiding these optimizations, you can disable the 'Conditional input branch execution' setting. To do this, navigate to 'Configuration Parameters -> Simulation Target -> Advanced Parameters' tab and ensure that the parameter is turned off. Remember to disable this parameter for the configurations of all model references as well.

카테고리

도움말 센터 및 File Exchange에서 Collect Coverage for Models에 대해 자세히 알아보기

제품

질문:

2018년 3월 29일

답변:

2024년 10월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by