From 54558a8a23c000bbf99785e3e202a1703bec5270 Mon Sep 17 00:00:00 2001 From: Yoann Pruvost Date: Thu, 6 Jun 2024 15:40:32 +0800 Subject: [PATCH] RVFI - Correction corner case conflict on mstatus_fs upades when integer load followed by fpu instr --- bhv/cv32e40p_rvfi.sv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bhv/cv32e40p_rvfi.sv b/bhv/cv32e40p_rvfi.sv index 99429d90d..05e2a588b 100644 --- a/bhv/cv32e40p_rvfi.sv +++ b/bhv/cv32e40p_rvfi.sv @@ -1640,7 +1640,8 @@ insn_trace_t trace_if, trace_id, trace_ex, trace_ex_next, trace_wb; trace_wb.m_rd_wdata[0] = r_pipe_freeze_trace.rf_wdata_wb; end - if (r_pipe_freeze_trace.csr.fregs_we) begin + // if (r_pipe_freeze_trace.csr.fregs_we) begin + if(r_pipe_freeze_trace.csr.fregs_we && r_pipe_freeze_trace.rf_we_wb && r_pipe_freeze_trace.rf_addr_wb[5]) begin //Catching mstatus updates caused by flw `CSR_FROM_PIPE(wb, mstatus_fs) trace_wb.m_csr.mstatus_fs_we = 1'b1; trace_wb.m_csr.mstatus_fs_wmask = '1;