How do I disable checking of conditional assignment in Incis

M

Mr. Ken

Guest
One segment of my code checks the range of a variable, for example,

//// pragma coverage off
case (selection)
5'h11:
a <= (b[11] == 1'b1) ? b[10:0] : 11'h3FF;
5'h12:
a <= (b[12] == 1'b1) ? b[11:1] : 11'h3FF;
....
//// pragma coverage on

During simulation none of the 3'h3FF has been reached. As a result, this set
of
conditional checking statement pulls down system coverage from 96% to 90%.

By masking the block with pragma coverage off, i lose coverage for the case
statement itself.

Are there any alternative?
 
- Give us the declarations of "a", "b" and "selection".
- b (i >= 11) is never generated by the block which drives "b". In
that case, it makes nonsense to define a code which is never executed.
You don't have to write these 2 statements at all.
- Don't write a code which is never executed.
- "selection" never achieves 11 and 12. Don't do a check which doesn't
exist at all.
- What is the "default" case?

In short:
- Change your design which drives "selection" and "b".
- Remove these case statements.

-> Either this code or the driver code to be changed.

Utku.

Mr. Ken wrote:

One segment of my code checks the range of a variable, for example,

//// pragma coverage off
case (selection)
5'h11:
a <= (b[11] == 1'b1) ? b[10:0] : 11'h3FF;
5'h12:
a <= (b[12] == 1'b1) ? b[11:1] : 11'h3FF;
...
//// pragma coverage on

During simulation none of the 3'h3FF has been reached. As a result, this set
of
conditional checking statement pulls down system coverage from 96% to 90%.

By masking the block with pragma coverage off, i lose coverage for the case
statement itself.

Are there any alternative?
 
Thank you, it's selection[4:0], and there are 32 choices, which selects some
bits from b[40:0].
All cases are covered except the conditional expressions.

It is expected 11'h3FF will happen, only simulations reach there rarely, a
few times throughout
entire simulations.








"Utku Özcan" <utku.ozcan@gmail.com> wrote in message
news:1164838589.702511.327350@n67g2000cwd.googlegroups.com...
- Give us the declarations of "a", "b" and "selection".
- b (i >= 11) is never generated by the block which drives "b". In
that case, it makes nonsense to define a code which is never executed.
You don't have to write these 2 statements at all.
- Don't write a code which is never executed.
- "selection" never achieves 11 and 12. Don't do a check which doesn't
exist at all.
- What is the "default" case?

In short:
- Change your design which drives "selection" and "b".
- Remove these case statements.

-> Either this code or the driver code to be changed.

Utku.

Mr. Ken wrote:

One segment of my code checks the range of a variable, for example,

//// pragma coverage off
case (selection)
5'h11:
a <= (b[11] == 1'b1) ? b[10:0] : 11'h3FF;
5'h12:
a <= (b[12] == 1'b1) ? b[11:1] : 11'h3FF;
...
//// pragma coverage on

During simulation none of the 3'h3FF has been reached. As a result, this
set
of
conditional checking statement pulls down system coverage from 96% to
90%.

By masking the block with pragma coverage off, i lose coverage for the
case
statement itself.

Are there any alternative?
 
Mr. Ken wrote:
, and there are 32 choices, which selects some
bits from b[40:0].
All cases are covered except the conditional expressions.

It is expected 11'h3FF will happen, only simulations reach there rarely, a
few times throughout
entire simulations.
Then the reported coverage value of 96% is correct. If you want 100%
coverage, then you need to reach those states. Using some trick to get
the tool to give a value of 100% when you have really only covered 96%
would defeat the purpose of measuring coverage.
 

Welcome to EDABoard.com

Sponsor

Back
Top