From f1822335698c17baf44af5505e7b6693f92f8582 Mon Sep 17 00:00:00 2001 From: Yoann Pruvost Date: Fri, 8 Dec 2023 12:17:10 +0100 Subject: [PATCH] RVFI - Propagate back late mstatus_fs update --- bhv/cv32e40p_rvfi.sv | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bhv/cv32e40p_rvfi.sv b/bhv/cv32e40p_rvfi.sv index f876fdeca..4d94b9822 100644 --- a/bhv/cv32e40p_rvfi.sv +++ b/bhv/cv32e40p_rvfi.sv @@ -1537,6 +1537,8 @@ insn_trace_t trace_if, trace_id, trace_ex, trace_ex_next, trace_wb; trace_ex.m_csr.mstatus_fs_wmask = '1; if(r_pipe_freeze_trace.csr.we && r_pipe_freeze_trace.csr.mstatus_fs_we) begin //In this specific case, two writes to mstatus_fs happen at the same time. We need to recreate the writes caused by fregs_we trace_ex.m_csr.mstatus_fs_wdata = FS_DIRTY; + end else begin + trace_id.m_csr.mstatus_fs_rdata = trace_ex.m_csr.mstatus_fs_wdata; end ->e_fregs_dirty_3; end