Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code coverage reporting higher coverage than expected #1120

Open
jordancarlin opened this issue Nov 21, 2024 · 1 comment
Open

Code coverage reporting higher coverage than expected #1120

jordancarlin opened this issue Nov 21, 2024 · 1 comment

Comments

@jordancarlin
Copy link
Member

Code coverage reports that many sections of code that are not tested are covered. For example, even if crypto tests are not run, the code coverage report shows >99% of the crypto unit being covered.

This is likely because many of the signals are toggling even when a different instruction is run. Most units are not gated based on the currently executing instruction, so this is not all that surprising. There are a few weird cases though. For example, the bit manipulation unit has the following that should keep its inputs to zero when not targeting a bit manipulation instruction, yet still has fairly high coverage without running any bit manip tests.

  // gate data inputs to BMU to only operate when BMU is active
  assign ABMU = A & {P.XLEN{BMUActive}};
  assign BBMU = B & {P.XLEN{BMUActive}};

This might end up all being an inevitable result of how Questa collects coverage, but it is worth looking into.

@jordancarlin
Copy link
Member Author

Code coverage was updated to use the cvw-arch-verif suite instead of riscv-arch-test. The same issue with unexpectedly high coverage is still occurring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant