Skip to content

Commit

Permalink
[dd, prim] Simplyfing condition to ease coverage closure
Browse files Browse the repository at this point in the history
The acknoledgement can't be set unless the request is set. The
condition has been simplified to only check for the acknoledgment.

In addition, the new assertion checks if the ack is set, the request
must be set

Signed-off-by: Antonio Martinez Zambrana <[email protected]>
  • Loading branch information
antmarzam committed Jan 8, 2025
1 parent 7780c6b commit dbdb415
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion hw/ip/prim/rtl/prim_reg_cdc_arb.sv
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,11 @@ module prim_reg_cdc_arb #(
always_ff @(posedge clk_dst_i or negedge rst_dst_ni) begin
if (!rst_dst_ni) begin
id_q <= SelSwReq;
end else if (dst_update_req && dst_update_ack) begin
end else if (dst_update_ack) begin
// The condition above was originally `dst_update_req && dst_update_ack`.
// However, since there can't be an ACK without a REQ that means the condition
// can be simplified to `dst_update_ack` only.
// Assertion `DstAckReqChk_A` checks the above always happens
id_q <= SelSwReq;
end else if (dst_req && dst_lat_d) begin
id_q <= SelSwReq;
Expand All @@ -165,6 +169,10 @@ module prim_reg_cdc_arb #(
end
end

// dst_update_ack should only be sent if there was a dst_update_req.
// By association, whenever src_ack is seen, then src_busy must be high.
`ASSERT(DstAckReqChk_A, dst_update_ack |-> dst_update_req, clk_dst_i, !rst_dst_ni)

// if a destination update is received when the system is idle and there is no
// software side request, hw update must be selected.
`ASSERT(DstUpdateReqCheck_A, ##1 dst_update & !dst_req & !busy |=> id_q == SelHwReq,
Expand Down

0 comments on commit dbdb415

Please sign in to comment.