mirror of
https://github.com/lowRISC/ibex.git
synced 2025-04-22 21:07:34 -04:00
Express some coverpoint crosses in an equivalent way
The previous code caused VCS to complain that the "with" clause didn't use any of the constituent coverpoints. I *think* that VCS wasn't understanding that cp_interrupt_taken[5:4] does indeed depend on cp_interrupt_taken (concentrating on core_ibex_fcov_if for concreteness). Fortunately, the check is easy to express a different way. There, we were just asking that the top two bits are zero. Another way to say that is "if I shift everything else off the bottom, the result is zero". So we say it that way.
This commit is contained in:
parent
1985c767a2
commit
4118f97595
2 changed files with 5 additions and 4 deletions
|
@ -643,7 +643,7 @@ interface core_ibex_fcov_if import ibex_pkg::*; (
|
|||
// No interrupt would be taken in M-mode when its mstatus.MIE = 0 unless it's an NMI
|
||||
illegal_bins mmode_mstatus_mie =
|
||||
binsof(cs_registers_i.mstatus_q.mie) intersect {1'b0} &&
|
||||
binsof(cp_priv_mode_id) intersect {PRIV_LVL_M} with (cp_interrupt_taken[5:4] == 2'b00);
|
||||
binsof(cp_priv_mode_id) intersect {PRIV_LVL_M} with (cp_interrupt_taken >> 4 == 6'd0);
|
||||
}
|
||||
|
||||
priv_mode_exception_cross: cross cp_priv_mode_id, cp_ls_pmp_exception, cp_ls_error_exception {
|
||||
|
|
|
@ -463,11 +463,12 @@ interface core_ibex_pmp_fcov_if import ibex_pkg::*; #(
|
|||
((!pmp_region_priv_bits[2] && pmp_region_priv_bits != MML_XM_XU) ||
|
||||
pmp_region_priv_bits inside {MML_WRM_WRU, MML_RM_RU})) {
|
||||
|
||||
// Only interested in MML configuration
|
||||
ignore_bins non_mml_in = binsof(pmp_region_priv_bits) with (!pmp_region_priv_bits[4]);
|
||||
// Only interested in MML configuration, so ignore anything where the top bit is not set
|
||||
ignore_bins non_mml_in =
|
||||
binsof(pmp_region_priv_bits) with (pmp_region_priv_bits >> 4 == 5'b0);
|
||||
|
||||
ignore_bins non_mml_out =
|
||||
binsof(pmp_region_priv_bits_wr) with (!pmp_region_priv_bits_wr[4]);
|
||||
binsof(pmp_region_priv_bits_wr) with (pmp_region_priv_bits_wr >> 4 == 5'b0);
|
||||
|
||||
// Only interested in starting configs that weren't executable so ignore executable
|
||||
// regions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue