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

[dd, prim_reg_cdc] simplifying condition to help with CCOV #25812

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

antmarzam
Copy link
Contributor

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

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 <amz@lowrisc.org>
if (DstWrReq) begin : gen_wr_req
assign dst_to_src = src_busy_q && src_ack || src_update && !busy;
assign dst_to_src = src_ack || src_update && !busy;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realise that you didn't change this (and I actually touched it last!), but I think it would be much easier to read with parens around the second and third terms, so src_ack || (src_update && !busy).

Comment on lines +123 to +127
// The conditions below assigning to `dst_to_src` had a term originally looking like:
// `dst_to_src = src_busy_q && src_ack ...`
// The term above causes missing conditional coverage holes for "01", since src_ack will only be
// set if src_busy_q is already set (see assertion above SrcAckBusyChk_A)
// To avoid the conditional coverage hole, `src_busy_q` has been removed from the expression
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this comment at all. If there's anything more that is worth telling someone, maybe it's worth putting in the commit message.

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

Successfully merging this pull request may close these issues.

2 participants