Skip to content

Commit

Permalink
fencei_assert: conform to coding guidelines interface instance suffix
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Pedersen <[email protected]>
  • Loading branch information
silabs-robin committed Oct 12, 2023
1 parent d3a5c4c commit 7683f76
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
28 changes: 16 additions & 12 deletions cv32e40s/tb/assertions/uvmt_cv32e40s_fencei_assert.sv
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module uvmt_cv32e40s_fencei_assert
input wire data_gnt_i,
input wire data_rvalid_i,

uvma_rvfi_instr_if_t rvfi
uvma_rvfi_instr_if_t rvfi_if
);


Expand All @@ -71,12 +71,12 @@ module uvmt_cv32e40s_fencei_assert

logic is_rvfiinstr_fencei;
assign is_rvfiinstr_fencei = (
((rvfi.rvfi_insn & FENCEI_IMASK) == FENCEI_IDATA)
((rvfi_if.rvfi_insn & FENCEI_IMASK) == FENCEI_IDATA)
);

logic is_rvfiinstr_fence;
assign is_rvfiinstr_fence = (
((rvfi.rvfi_insn & FENCE_IMASK) == FENCE_IDATA)
((rvfi_if.rvfi_insn & FENCE_IMASK) == FENCE_IDATA)
);

int obi_outstanding;
Expand Down Expand Up @@ -160,15 +160,15 @@ module uvmt_cv32e40s_fencei_assert
a_req_must_rvfi_fencei: assert property (
fencei_flush_req_o
|=>
(rvfi.rvfi_valid [->1]) ##0
(rvfi_if.rvfi_valid [->1]) ##0
is_rvfiinstr_fencei
) else `uvm_error(info_tag, "A handshake must results in fencei retire");

// (Just a helper/sanity assert complementing the above)
a_req_mustnt_rvfi_fence: assert property (
fencei_flush_req_o
|=>
(rvfi.rvfi_valid [->1]) ##0
(rvfi_if.rvfi_valid [->1]) ##0
!is_rvfiinstr_fence
) else `uvm_error(info_tag, "A handshake must not results in a fence retire");

Expand All @@ -185,8 +185,8 @@ module uvmt_cv32e40s_fencei_assert
##0 (instr_addr_o == pc_next)
) or (
// Exception execution
rvfi.rvfi_valid [->2:3] // retire: fencei, (optionally "rvfi_trap"), interrupt/debug handler
##0 (rvfi.rvfi_intr || rvfi.rvfi_dbg_mode)
rvfi_if.rvfi_valid [->2:3] // retire: fencei, (optionally "rvfi_trap"), interrupt/debug handler
##0 (rvfi_if.rvfi_intr || rvfi_if.rvfi_dbg_mode)
);
endproperty

Expand Down Expand Up @@ -218,14 +218,14 @@ module uvmt_cv32e40s_fencei_assert
sequence seq_branch_after_retire_ante;
$fell(fencei_flush_req_o)
##0
rvfi.rvfi_valid [->2]
rvfi_if.rvfi_valid [->2]
;
endsequence

sequence seq_branch_after_retire_conse (pc_at_fencei);
(rvfi.rvfi_pc_rdata == pc_at_fencei + 32'd 4)
|| rvfi.rvfi_intr
|| rvfi.rvfi_dbg_mode
(rvfi_if.rvfi_pc_rdata == pc_at_fencei + 32'd 4)
|| rvfi_if.rvfi_intr
|| rvfi_if.rvfi_dbg_mode
;
endsequence

Expand All @@ -245,7 +245,11 @@ module uvmt_cv32e40s_fencei_assert
) else `uvm_error(info_tag, "the pc following fencei did not enter WB");

cov_branch_after_retire: cover property (
seq_branch_after_retire_ante ##0 !rvfi.rvfi_intr ##0 !rvfi.rvfi_dbg_mode
seq_branch_after_retire_ante
##0
! rvfi_if.rvfi_intr
##0
! rvfi_if.rvfi_dbg_mode
);


Expand Down
2 changes: 1 addition & 1 deletion cv32e40s/tb/uvmt/uvmt_cv32e40s_tb.sv
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ module uvmt_cv32e40s_tb;
.wb_rdata (core_i.ex_wb_pipe.instr.bus_resp.rdata),
.wb_buffer_state (core_i.load_store_unit_i.write_buffer_i.state),

.rvfi (rvfi_instr_if),
.rvfi_if (rvfi_instr_if),

.*
);
Expand Down

0 comments on commit 7683f76

Please sign in to comment.