Take MRET debug exception from WB
Created by: Silabs-ArjanB
In https://github.com/openhwgroup/cv32e40x/pull/456 an RVFI fix was done that likely could better have been done in the RTL instead.
Fix that should be undone in RVFI:
assign pc_mux_exception = (ctrl_fsm_i.pc_mux == PC_TRAP_EXC) || (ctrl_fsm_i.pc_mux == PC_TRAP_DBE);
vs.
assign pc_mux_exception = (ctrl_fsm_i.pc_mux == PC_TRAP_EXC) || pc_mux_debug_exception ; assign pc_mux_debug_exception = (ctrl_fsm_i.pc_mux == PC_TRAP_DBE) && !dret_in_ex_i; // Ignore exceptions from instructons that will never be executed
In the RTL we should consider taking the MRET related debug exception from WB instead (as we do for other exceptions). Check potential impact on PC hardening logic as well.