Skip to content

Commit

Permalink
Merge pull request #2209 from silabs-hfegran/dev_hf_fix_buserr_sb_dis…
Browse files Browse the repository at this point in the history
…_asrt

Disabled buserr sb assertion due to false positives
  • Loading branch information
silabs-robin authored Sep 22, 2023
2 parents 5258b35 + 6e02d37 commit 69d6096
Showing 1 changed file with 34 additions and 33 deletions.
67 changes: 34 additions & 33 deletions cv32e40s/env/uvme/uvme_cv32e40s_buserr_sb.sv
Original file line number Diff line number Diff line change
Expand Up @@ -225,39 +225,40 @@ function void uvme_cv32e40s_buserr_sb_c::check_phase(uvm_phase phase);
`uvm_warning(info_tag, "all the I-side OBI transactions were errs");

// Check RVFI I-side
assert ((cnt_rvfi_errmatch - cnt_rvfi_errmatch_debug) >= cnt_rvfi_ifaulthandl)
else `uvm_error(info_tag, "more instr fault handler than actual err retirements");
if ((cnt_rvfi_errmatch - cnt_rvfi_errmatch_debug) != cnt_rvfi_ifaulthandl)
`uvm_warning(info_tag, $sformatf("err retires (%0d) != handler entries (%0d)", (cnt_rvfi_errmatch - cnt_rvfi_errmatch_debug), cnt_rvfi_ifaulthandl));

// Check OBI I-side vs RVFI
assert (cnt_obii_err >= cnt_rvfi_ifaulthandl)
else `uvm_error(info_tag, $sformatf("less I-side err (%0d) than exception handling (%0d)", cnt_obii_err, cnt_rvfi_ifaulthandl));
if (cnt_obii_err < cnt_rvfi_errmatch)
`uvm_warning(info_tag, "more retired errs than fetches");

// Check RVFI (just a sanity check)
if (cnt_rvfi_trn == 0)
`uvm_warning(info_tag, "zero rvfi transactions received");

// Inform about the end state
`uvm_info(info_tag, $sformatf("received %0d D-side 'err' transactions", cnt_obid_err), UVM_NONE)
`uvm_info(info_tag, $sformatf("received %0d D-side 'first err' transactions", cnt_obid_firsterr), UVM_NONE)
`uvm_info(info_tag, $sformatf("observed %0d rvfi nmi handler entries", cnt_rvfi_nmihandl), UVM_NONE)
`uvm_info(info_tag, $sformatf("received %0d I-side 'err' transactions", cnt_obii_err), UVM_NONE)
`uvm_info(info_tag, $sformatf("retired %0d expectedly ifault instructions", cnt_rvfi_errmatch), UVM_NONE)
`uvm_info(info_tag, $sformatf("retired %0d expectedly ifault instructions during debug", cnt_rvfi_errmatch_debug), UVM_NONE)
`uvm_info(info_tag, $sformatf("observed %0d rvfi ifault handler entries", cnt_rvfi_ifaulthandl), UVM_NONE)

endfunction : check_phase


function bit uvme_cv32e40s_buserr_sb_c::should_instr_err(uvma_rvfi_instr_seq_item_c#(ILEN,XLEN) rvfi_trn);
// This function may have corners that will incorrectly trigger errors when
// an error transaction is followed by a non-error transaction to the same address.
// To avoid this the scoreboard needs to be re-written to not rely on the addresses to identify transactions

uvma_obi_memory_addr_l_t err_addrs[$];
// TODO: silabs-hfegran needs rewrite - currently gives frequent false positives
//assert ((cnt_rvfi_errmatch - cnt_rvfi_errmatch_debug) >= cnt_rvfi_ifaulthandl)
// else `uvm_error(info_tag, "more instr fault handler than actual err retirements");
if ((cnt_rvfi_errmatch - cnt_rvfi_errmatch_debug) != cnt_rvfi_ifaulthandl)
`uvm_warning(info_tag, $sformatf("err retires (%0d) != handler entries (%0d)", (cnt_rvfi_errmatch - cnt_rvfi_errmatch_debug), cnt_rvfi_ifaulthandl));

// Check OBI I-side vs RVFI
assert (cnt_obii_err >= cnt_rvfi_ifaulthandl)
else `uvm_error(info_tag, $sformatf("less I-side err (%0d) than exception handling (%0d)", cnt_obii_err, cnt_rvfi_ifaulthandl));
if (cnt_obii_err < cnt_rvfi_errmatch)
`uvm_warning(info_tag, "more retired errs than fetches");

// Check RVFI (just a sanity check)
if (cnt_rvfi_trn == 0)
`uvm_warning(info_tag, "zero rvfi transactions received");

// Inform about the end state
`uvm_info(info_tag, $sformatf("received %0d D-side 'err' transactions", cnt_obid_err), UVM_NONE)
`uvm_info(info_tag, $sformatf("received %0d D-side 'first err' transactions", cnt_obid_firsterr), UVM_NONE)
`uvm_info(info_tag, $sformatf("observed %0d rvfi nmi handler entries", cnt_rvfi_nmihandl), UVM_NONE)
`uvm_info(info_tag, $sformatf("received %0d I-side 'err' transactions", cnt_obii_err), UVM_NONE)
`uvm_info(info_tag, $sformatf("retired %0d expectedly ifault instructions", cnt_rvfi_errmatch), UVM_NONE)
`uvm_info(info_tag, $sformatf("retired %0d expectedly ifault instructions during debug", cnt_rvfi_errmatch_debug), UVM_NONE)
`uvm_info(info_tag, $sformatf("observed %0d rvfi ifault handler entries", cnt_rvfi_ifaulthandl), UVM_NONE)

endfunction : check_phase


function bit uvme_cv32e40s_buserr_sb_c::should_instr_err(uvma_rvfi_instr_seq_item_c#(ILEN,XLEN) rvfi_trn);
// This function may have corners that will incorrectly trigger errors when
// an error transaction is followed by a non-error transaction to the same address.
// To avoid this the scoreboard needs to be re-written to not rely on the addresses to identify transactions

uvma_obi_memory_addr_l_t err_addrs[$];
bit [31:0] rvfi_addr = rvfi_trn.pc_rdata;

// Extract all addrs from queue of I-side OBI "err" transactions
Expand Down

0 comments on commit 69d6096

Please sign in to comment.