-
Notifications
You must be signed in to change notification settings - Fork 616
[fcov] Add fcov for the interaction of pmp with debug module accesses #2279
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
base: master
Are you sure you want to change the base?
[fcov] Add fcov for the interaction of pmp with debug module accesses #2279
Conversation
3c117e2
to
ab9bca0
Compare
rtl/ibex_core.sv
Outdated
// accesses-checked by it's PMP unit. If true we know that the current instruction at least | ||
// attempted to make an access, and we can then cross this signal with the result of the pmp | ||
// check and the current debug_mode state to capture all appropriate coverage. | ||
logic [PMPNumChan-1:0] access_check_into_dm; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we bind this in with an interface to avoid touching the RTL? (I think you'll want an "upwards hierarchical reference")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the new helper logic into the existing pmp_fcov_if. So no change needed to the existing ibex_core rtl.
By this logic though, there is a quantity of existing code in rtl/
that uses DV_FCOV_SIGNAL
and DV_FCOV_SIGNAL_GEN_IF
that should get the boot as well in a future cleanup PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with the suggestions from @rswarbrick. Thanks @hcallahan-lowrisc!
Accesses to the debug module in debug mode should never be denied by the PMP unit. This commit implements fcov to confirm we have stimulated this particular behaviour in relevant related states. Illegal bins are used for incorrect behaviour (e.g. denied access in debug mode) Other behaviours such as debug module accesses outside of debug mode are left as ignore_bins for now. This is not explicitly disallowed by the specification, and our implementation does not have any opinion about its validity, but external debug modules opine that it should not be allowed. We could possibly expand the stimulus in the future to test this condition, but it is low priority.
ab9bca0
to
bd8466d
Compare
Accesses to the debug module in debug mode should never be denied by the PMP unit. This commit implements fcov to confirm we have stimulated this particular behaviour in relevant related states.
Illegal bins are used for incorrect behaviour (e.g. denied access in debug mode). Other behaviours such as debug module accesses outside of debug mode are left as ignore_bins for now. This is not explicitly disallowed by the specification, and our implementation does not have any opinion about its validity, but external debug modules opine that it should not be allowed. We could possibly expand the stimulus in the future to test this condition, but it is low priority.
This PR does not include stimulus to hit the new coverage bins. That will come in another request.
Goes towards #2233