Skip to content

Commit 5840b05

Browse files
committed
[dv] Add coverpoints for dummy instructions in each stage
Signed-off-by: Andreas Kurth <adk@lowrisc.org>
1 parent 6c8730e commit 5840b05

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

doc/03_reference/coverage_plan.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,12 @@ For more detail about each security countermeasure in Ibex see :ref:`security`
315315

316316
* ``cp_dummy_instr`` - Executing each instruction category while dummy instruction insertion feature is enabled.
317317

318+
* ``cp_dummy_instr_if_stage`` - The IF stage handles a dummy instruction.
319+
320+
* ``cp_dummy_instr_id_stage`` - The ID/EX stage handles a dummy instruction.
321+
322+
* ``cp_dummy_instr_wb_stage`` - The WB stage handles a dummy instruction.
323+
318324
* ``cp_rf_a_ecc_err``, ``cp_rf_b_ecc_err`` - Register file integrity (ECC) fault is seen for port A/B.
319325

320326
* ``cp_icache_ecc_err`` - ICache has seen an integrity (ECC) fault.

dv/uvm/core_ibex/fcov/core_ibex_fcov_if.sv

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,11 @@ interface core_ibex_fcov_if import ibex_pkg::*; (
447447
illegal_bins illegal = {InstrCategoryOther, InstrCategoryOtherIllegal};
448448
}
449449

450+
// Each stage sees a dummy instruction.
451+
cp_dummy_instr_if_stage: coverpoint if_stage_i.fcov_insert_dummy_instr;
452+
cp_dummy_instr_id_stage: coverpoint if_stage_i.dummy_instr_id_o;
453+
cp_dummy_instr_wb_stage: coverpoint wb_stage_i.dummy_instr_wb_o;
454+
450455
cp_rf_a_ecc_err: coverpoint fcov_rf_ecc_err_a_id;
451456
cp_rf_b_ecc_err: coverpoint fcov_rf_ecc_err_b_id;
452457

rtl/ibex_if_stage.sv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,8 @@ module ibex_if_stage import ibex_pkg::*; #(
689689
// fcov signals for V2S
690690
`DV_FCOV_SIGNAL_GEN_IF(logic [1:0], dummy_instr_type,
691691
gen_dummy_instr.dummy_instr_i.lfsr_data.instr_type, DummyInstructions)
692+
`DV_FCOV_SIGNAL_GEN_IF(logic, insert_dummy_instr,
693+
gen_dummy_instr.insert_dummy_instr, DummyInstructions)
692694
`endif
693695

694696
////////////////

0 commit comments

Comments
 (0)