-
Notifications
You must be signed in to change notification settings - Fork 809
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
[dd, prim_reg_cdc] simplifying condition to help with CCOV #25812
[dd, prim_reg_cdc] simplifying condition to help with CCOV #25812
Conversation
Hi @antmarzam! I think this has stalled a bit? My review was just nitty stuff: I think this should be good to go otherwise! Would you mind tidying the little things up so we can merge it? |
prim_reg_cdc has a conditional coverage hole in the condition: `src_busy_q && src_ack` since src_ack is only 1 if `src_busy_q`. this is also ensured via the assertion `SrcAckBusyChk_A` Signed-off-by: Antonio Martinez Zambrana <[email protected]>
427da02
to
f6fbdac
Compare
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.
Thanks, this looks good to me.
CHANGE AUTHORIZED: hw/ip/prim/rtl/prim_reg_cdc.sv This shouldn't have any functional impact, which is actually checked by an assertion that has been in place for a long time (and hasn't fired, to my knowledge!). So the risk to earlgrey is essentially zero. |
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.
Thanks for pinging me on this one @rswarbrick . I would like @andreaskurth to take a look at this when he returns (next week).
At a first glance, I think the proposed change here doesn't work. Because src_ack
is driven by prim_reg_cdc_arb.sv
based on src_req
and id_q
. Both these signals are in the destination clock domain while src_busy_q
sits in the source domain. Related to this, there is a comment in the header of the file saying:
// Note on domain resets
//
// When a single domain is reset, assertions of the internal signals 'dst_req'
// and/or 'src_ack' may occur as the two ends of a pulse synchronizer
// (prim_pulse_sync or prim_sync_reqack, NRZ option) are briefly inconsistent,
// generating a spurious pulse at the destination.
//
// These pulses are prevented from propagating outside of this module, provided
// that the reset does not occur whilst a transaction is in progress; firmware
// is responsible for preventing that.
Please let's hold off on this one until our CDC expert Andreas can assess this.
Looking into this carefully, I'm rather confused! I've just done a bit assign src_ack_o = src_req & (id_q == SelSwReq); where I think those are two different clocks! (It's not particularly obvious Is that correct? |
Yes, I might have missed that |
While I agree that the original code this PR suggests to change isn't ideal and may be problematic for coverage closure, I strongly recommend we don't change it at this point. The reasoning is as follows:
For now, I recommend waiving this coverage hole because it falls outside the responsibility of RTL simulation. |
Thank you @andreaskurth , I've created an issue to better track this. Issue is here. I'll file a new PR adding exclusions for this condition! |
Sounds good, thanks @antmarzam. I'll close this PR for the time being. |
These exclusions cover the missing branch/line coverage for aon_timer. Once are PRs lowRISC#25812/lowRISC#26072 make it to maste these exclusions can be ammendeed/removed. There's also a github issue lowRISC#26164 to re-evaluate the RTL changes which may affect CDC sign-off. Signed-off-by: Antonio Martinez Zambrana <[email protected]>
These exclusions cover the missing branch/line coverage for aon_timer. Once are PRs lowRISC#25812/lowRISC#26072 make it to maste these exclusions can be ammendeed/removed. There's also a github issue lowRISC#26164 to re-evaluate the RTL changes which may affect CDC sign-off. Signed-off-by: Antonio Martinez Zambrana <[email protected]>
These exclusions cover the missing branch/line coverage for aon_timer. Once are PRs lowRISC#25812/lowRISC#26072 make it to maste these exclusions can be ammendeed/removed. There's also a github issue lowRISC#26164 to re-evaluate the RTL changes which may affect CDC sign-off. Signed-off-by: Antonio Martinez Zambrana <[email protected]>
prim_reg_cdc has a conditional coverage hole in the condition:
src_busy_q && src_ack
since src_ack is only 1 ifsrc_busy_q
. this is also ensured via the assertionSrcAckBusyChk_A