cva6 icon indicating copy to clipboard operation
cva6 copied to clipboard

Condition coverage limitation

Open JeanRochCoulon opened this issue 1 year ago • 6 comments

Is there an existing CVA6 bug for this?

  • [X] I have searched the existing bug issues

Bug Description

In the frontend.sv, the line 373 does not appear in the condition coverage report. To me, this is a condition coverage case. I am concerned because I think it hides an implementation bug. How to make it appear in the coverage report?

image

@AyoubJalali @ASintzoff @AEzzejjari

JeanRochCoulon avatar Mar 08 '24 06:03 JeanRochCoulon

Hello @JeanRochCoulon normally VCS can detect "?" condition by default, according to synopsys coverage manual : image

also branch coverage don't detect this of course. So what a thing we should re-write the line to be visible for condition coverage

AyoubJalali avatar Mar 11 '24 14:03 AyoubJalali

In the code, we have a = b ? c : d ; and not a <= b ? c : d ; That's maybe why it is not supported

JeanRochCoulon avatar Mar 11 '24 17:03 JeanRochCoulon

Checked some condition coverage options but can't make the coverage, I think because it's a limitation while mixing "+" operand and expression. To make it work we need to split to 2 lines

AnouarZajni avatar Mar 15 '24 15:03 AnouarZajni

Finaly, by splitting the line as following without any other condition coverage options the expression is covered: image

AnouarZajni avatar Mar 19 '24 10:03 AnouarZajni

@AnouarZajni Great !! But this is only an example, should we change in the hole design for that ? I don't think so

AyoubJalali avatar Mar 19 '24 10:03 AyoubJalali

Yes I can see many similar expressions non-covered in design. You can find a non-exhaustive list in /shares/teams/riscv/fromAZ/missed_exp.txt @JeanRochCoulon , can you please review the list?

AnouarZajni avatar Mar 19 '24 12:03 AnouarZajni