Skip to content

Commit

Permalink
Merge pull request #2226 from silabs-hfegran/dev_isacov_fix_rdrs
Browse files Browse the repository at this point in the history
coverage fixes
  • Loading branch information
silabs-robin authored Oct 3, 2023
2 parents 33a0d70 + cb2b643 commit 9bcdc6f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 28 deletions.
27 changes: 0 additions & 27 deletions cv32e40s/tb/uvmt/uvmt_cv32e40s_triggers_assert_cov.sv
Original file line number Diff line number Diff line change
Expand Up @@ -370,33 +370,6 @@ module uvmt_cv32e40s_triggers_assert_cov
p_dt_tcsr_not_implemented(ADDR_TDATA3)
) else `uvm_error(info_tag, "Access to tdata3 does not cause an illegal exception (when no higher priority exception has occured)\n");


// Assertions and coverages for when there are debug triggers:
if (CORE_PARAM_DBG_NUM_TRIGGERS != 0) begin

//2)
c_dt_access_tdata3_m2: cover property (
rvfi_if.is_csr_instr(ADDR_TDATA3)
&& tdata1_pre_state[MSB_TYPE:LSB_TYPE] == TTYPE_MCONTROL
);

c_dt_access_tdata3_etrigger: cover property (
rvfi_if.is_csr_instr(ADDR_TDATA3)
&& tdata1_pre_state[MSB_TYPE:LSB_TYPE] == TTYPE_ETRIGGER
);

c_dt_access_tdata3_m6: cover property (
rvfi_if.is_csr_instr(ADDR_TDATA3)
&& tdata1_pre_state[MSB_TYPE:LSB_TYPE] == TTYPE_MCONTROL6
);

c_dt_access_tdata3_disabled: cover property (
rvfi_if.is_csr_instr(ADDR_TDATA3)
&& tdata1_pre_state[MSB_TYPE:LSB_TYPE] == TTYPE_DISABLED
);
end


//- Vplan:
//Have 0 triggers, access any trigger register and check that illegal instruction exception occurs.
//Check that no triggers ever fire. Check that "tselect" is 0.
Expand Down
8 changes: 7 additions & 1 deletion lib/uvm_agents/uvma_isacov/uvma_isacov_mon.sv
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,13 @@ function void uvma_isacov_mon_c::write_rvfi_instr(uvma_rvfi_instr_seq_item_c#(IL
endcase
end

mon_trn.instr.set_valid_flags();
if (cfg.decoder == SPIKE) begin
mon_trn.instr.set_valid_flags();
end else begin // if ISA_DECODER
mon_trn.instr.rd_valid = instr_asm.rd.valid;
mon_trn.instr.rs1_valid = instr_asm.rs1.valid;
mon_trn.instr.rs2_valid = instr_asm.rs2.valid;
end

// Set enumerations for register values as reported from RVFI
if (mon_trn.instr.rs1_valid) begin
Expand Down

0 comments on commit 9bcdc6f

Please sign in to comment.