[hw,sysrst_ctrl] Split key_comb cross cover points
With the current the cross between precondition and combo detection
selection values is large. Split the cross cover points such that
all the key combinations of preconditions are covered in one cross and
key combinations of combo detection are covered in another
Signed-off-by: Raviteja Chatta <crteja@lowrisc.org>
diff --git a/hw/ip/sysrst_ctrl/dv/env/sysrst_ctrl_env_cov.sv b/hw/ip/sysrst_ctrl/dv/env/sysrst_ctrl_env_cov.sv
index dd7d4b6..9571745 100644
--- a/hw/ip/sysrst_ctrl/dv/env/sysrst_ctrl_env_cov.sv
+++ b/hw/ip/sysrst_ctrl/dv/env/sysrst_ctrl_env_cov.sv
@@ -147,20 +147,27 @@
cp_precondition_pwrb_in_sel: coverpoint precondition_pwrb_in_sel;
cp_precondition_ac_present_sel: coverpoint precondition_ac_present_sel;
- cross_key_combinations_combo_sel: cross cp_key0_in_sel, cp_key1_in_sel, cp_key2_in_sel,
- cp_pwrb_in_sel, cp_ac_present_sel, cp_precondition_key0_in_sel, cp_precondition_key1_in_sel,
- cp_precondition_key2_in_sel, cp_precondition_pwrb_in_sel, cp_precondition_ac_present_sel
+ cross_key_combinations_combo_precondition_sel: cross cp_precondition_key0_in_sel,
+ cp_precondition_key1_in_sel, cp_precondition_key2_in_sel, cp_precondition_pwrb_in_sel,
+ cp_precondition_ac_present_sel iff ((bat_disable || interrupt || ec_rst || rst_req) &&
+ (key0_in_sel || key1_in_sel || key2_in_sel || pwrb_in_sel || ac_present_sel)) {
+ // Ignore case where all keys are enabled for precondition, as there wont be any keys left for
+ // combo detection
+ ignore_bins detection_disable = binsof(cp_precondition_key0_in_sel) intersect {1} &&
+ binsof(cp_precondition_key1_in_sel) intersect {1} &&
+ binsof(cp_precondition_key2_in_sel) intersect {1} &&
+ binsof(cp_precondition_pwrb_in_sel) intersect {1} &&
+ binsof(cp_precondition_ac_present_sel) intersect {1};
+ }
+
+ cross_key_combinations_combo_detection_sel: cross cp_key0_in_sel, cp_key1_in_sel,
+ cp_key2_in_sel, cp_pwrb_in_sel, cp_ac_present_sel
iff (bat_disable || interrupt || ec_rst || rst_req) {
- ignore_bins invalid_combinations_key_0_sel =
- binsof(cp_key0_in_sel) intersect {1} && binsof(cp_precondition_key0_in_sel) intersect {1};
- ignore_bins invalid_combinations_key_1_sel =
- binsof(cp_key1_in_sel) intersect {1} && binsof(cp_precondition_key1_in_sel) intersect {1};
- ignore_bins invalid_combinations_key_2_sel =
- binsof(cp_key2_in_sel) intersect {1} && binsof(cp_precondition_key2_in_sel) intersect {1};
- ignore_bins invalid_combinations_pwrb_sel =
- binsof(cp_pwrb_in_sel) intersect {1} && binsof(cp_precondition_pwrb_in_sel) intersect {1};
- ignore_bins invalid_combinations_ac_power_sel = binsof(cp_ac_present_sel) intersect {1} &&
- binsof(cp_precondition_ac_present_sel) intersect {1};
+ ignore_bins detection_disable = binsof(cp_key0_in_sel) intersect {0} &&
+ binsof(cp_key1_in_sel) intersect {0} &&
+ binsof(cp_key2_in_sel) intersect {0} &&
+ binsof(cp_pwrb_in_sel) intersect {0} &&
+ binsof(cp_ac_present_sel) intersect {0};
}
endgroup // sysrst_ctrl_combo_key_combinations_cg