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

[pwm,dv] Manually exclude some coverage in prim_reg_cdc instances #25088

Closed

Conversation

rswarbrick
Copy link
Contributor

This expression coverage is expecting to see a src_update signal equal to 1. That signal can only be nonzero if the DstWrReq parameter is 1, but it is wired to zero.

A working UNR flow would waive this but we don't have that set up properly in a way that I can run it right now, so I'm doing the manual exclusion instead.

This expression coverage is expecting to see a src_update signal equal
to 1. That signal can only be nonzero if the DstWrReq parameter is 1,
but it is wired to zero.

A working UNR flow would waive this but we don't have that set up
properly in a way that I can run it right now, so I'm doing the manual
exclusion instead.

Signed-off-by: Rupert Swarbrick <[email protected]>
@rswarbrick rswarbrick added Component:DV DV issue: testbench, test case, etc. IP:pwm labels Nov 12, 2024
@rswarbrick rswarbrick requested a review from a team as a code owner November 12, 2024 13:31
@rswarbrick rswarbrick requested review from matutem and removed request for a team November 12, 2024 13:31
@matutem
Copy link
Contributor

matutem commented Dec 1, 2024

This is a bit problematic since it is specific to pwm while the exclusion should really apply to any instance of prim_reg_cdc with DstWrReq==0; it also doesn't address VCS, which is our sign-off.

I think this may be better handled in the RTL instead, if we connect the prim_reg_cdc_arb src_update_o output to a new net like src_update_cdc, and adding a generate like

if (DstWrReq == 0) begin
// Potentially add an FPV check for src_update_cdc == 0.
assign src_update = 1'b0;
end else
assign src_update = src_update_cdc;
end

Of course, adequate comments explaining this code would be indispensable.

This sort of RTL change is something we have done in the past to avoid waivers for obvious coverage holes, since waivers have a lot of overhead, can easily be applied incorrectly, and don't cover all instantiations of prims.

@rswarbrick rswarbrick closed this Dec 2, 2024
@rswarbrick rswarbrick deleted the pwm-expression-coverage-waiver branch December 2, 2024 16:45
@rswarbrick
Copy link
Contributor Author

I think you're right. Here, the exclusion is to line 125 of prim_reg_cdc.sv, which looks like:

    end else if (src_busy_q && src_ack || src_update && !busy) begin

I think that the change you're describing won't quite work, but something similar should work. I'm going to close this PR and do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component:DV DV issue: testbench, test case, etc. IP:pwm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants