Skip to content

Commit

Permalink
Merge pull request #914 from YoannPruvost/dev_quick_fix
Browse files Browse the repository at this point in the history
RVFI - mstatus_fs update when fcsr update + write back trigger update
  • Loading branch information
davideschiavone authored Nov 30, 2023
2 parents b09e8a4 + c02d5c6 commit 6b34db2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bhv/cv32e40p_rvfi.sv
Original file line number Diff line number Diff line change
Expand Up @@ -1430,7 +1430,7 @@ insn_trace_t trace_if, trace_id, trace_ex, trace_ex_next, trace_wb;

s_new_valid_insn = r_pipe_freeze_trace.id_valid && r_pipe_freeze_trace.is_decoding;// && !r_pipe_freeze_trace.apu_rvalid;

s_wb_valid_adjusted = r_pipe_freeze_trace.wb_valid && (s_core_is_decoding || (r_pipe_freeze_trace.ctrl_fsm_cs == FLUSH_EX) || (r_pipe_freeze_trace.ctrl_fsm_cs == DBG_FLUSH) || (r_pipe_freeze_trace.ctrl_fsm_cs == DBG_TAKEN_ID) || (r_pipe_freeze_trace.ctrl_fsm_cs == DBG_TAKEN_IF));// && !r_pipe_freeze_trace.apu_rvalid;;
s_wb_valid_adjusted = r_pipe_freeze_trace.wb_valid && (s_core_is_decoding || (r_pipe_freeze_trace.ctrl_fsm_cs == FLUSH_EX) || (r_pipe_freeze_trace.ctrl_fsm_cs == FLUSH_WB) || (r_pipe_freeze_trace.ctrl_fsm_cs == DBG_FLUSH) || (r_pipe_freeze_trace.ctrl_fsm_cs == DBG_TAKEN_ID) || (r_pipe_freeze_trace.ctrl_fsm_cs == DBG_TAKEN_IF));// && !r_pipe_freeze_trace.apu_rvalid;;
s_ex_reg_we_adjusted = r_pipe_freeze_trace.ex_reg_we && r_pipe_freeze_trace.mult_ready && r_pipe_freeze_trace.alu_ready && r_pipe_freeze_trace.lsu_ready_ex && !s_apu_to_alu_port;
s_rf_we_wb_adjusted = r_pipe_freeze_trace.rf_we_wb && (~r_pipe_freeze_trace.data_misaligned_ex && r_pipe_freeze_trace.wb_ready) && (!s_apu_to_lsu_port || r_pipe_freeze_trace.wb_contention_lsu);

Expand Down
5 changes: 4 additions & 1 deletion bhv/pipe_freeze_trace.sv
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,10 @@ function compute_csr_we();
r_pipe_freeze_trace.csr.mstatus_fs_we = 1'b1;
end
CSR_FRM: r_pipe_freeze_trace.csr.frm_we = 1'b1;
CSR_FCSR: r_pipe_freeze_trace.csr.fcsr_we = 1'b1;
CSR_FCSR: begin
r_pipe_freeze_trace.csr.fcsr_we = 1'b1;
r_pipe_freeze_trace.csr.mstatus_fs_we = 1'b1;
end
CSR_DPC: r_pipe_freeze_trace.csr.dpc_we = 1'b1;
CSR_DSCRATCH0: r_pipe_freeze_trace.csr.dscratch0_we = 1'b1;
CSR_DSCRATCH1: r_pipe_freeze_trace.csr.dscratch1_we = 1'b1;
Expand Down

0 comments on commit 6b34db2

Please sign in to comment.