Skip to content

Commit

Permalink
Merge pull request openhwgroup#2136 from silabs-hfegran/dev_hf_dbg_nm…
Browse files Browse the repository at this point in the history
…i_step_stepie_cov

Added covers for nmi in debug followed by single stepping with stepie = 0/1
  • Loading branch information
silabs-robin authored Aug 21, 2023
2 parents 8454d09 + 2ea8901 commit 02c56d7
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions cv32e40s/tb/uvmt/uvmt_cv32e40s_debug_assert.sv
Original file line number Diff line number Diff line change
Expand Up @@ -1070,4 +1070,30 @@ module uvmt_cv32e40s_debug_assert
end
end

sequence s_dbg_with_nmi_dret_stepie(bit stepie_value);
rvfi.rvfi_dbg_mode
&& rvfi.is_dret
&& rvfi.rvfi_nmip[0]
&& csr_dcsr.rvfi_csr_rdata[DCSR_STEPIE_POS] == stepie_value
&& csr_dcsr.rvfi_csr_rdata[DCSR_STEP_POS]
&& rvfi.rvfi_valid
##1
rvfi.rvfi_valid[->1]
;
endsequence : s_dbg_with_nmi_dret_stepie

property p_dbg_with_nmi_dret_stepie(bit stepie_value);
reject_on(
csr_mtvec.rvfi_csr_rdata[31:2] == 0 // ignore lower bits
|| csr_dpc.rvfi_csr_rdata == 0
|| csr_mtvec.rvfi_csr_rdata == csr_dpc.rvfi_csr_rdata
|| rvfi.rvfi_trap.exception)
s_dbg_with_nmi_dret_stepie(stepie_value)
;
endproperty : p_dbg_with_nmi_dret_stepie


cov_dbg_with_nmi_dret_stepie: cover property (p_dbg_with_nmi_dret_stepie(1));
cov_dbg_with_nmi_dret_stepie_n: cover property (p_dbg_with_nmi_dret_stepie(0));

endmodule : uvmt_cv32e40s_debug_assert

0 comments on commit 02c56d7

Please sign in to comment.