From 6e02d376fe9b3f001c050cd06a341f729552676b Mon Sep 17 00:00:00 2001 From: Henrik Fegran Date: Fri, 22 Sep 2023 13:40:06 +0200 Subject: [PATCH] Disabled more buserr sb assertion Signed-off-by: Henrik Fegran --- cv32e40s/env/uvme/uvme_cv32e40s_buserr_sb.sv | 67 ++++++++++---------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/cv32e40s/env/uvme/uvme_cv32e40s_buserr_sb.sv b/cv32e40s/env/uvme/uvme_cv32e40s_buserr_sb.sv index dea67aa94a..85ce1f8653 100644 --- a/cv32e40s/env/uvme/uvme_cv32e40s_buserr_sb.sv +++ b/cv32e40s/env/uvme/uvme_cv32e40s_buserr_sb.sv @@ -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