From 7d9a143d71ba513f50a569de88f752dc2d9d93c8 Mon Sep 17 00:00:00 2001 From: Hakim Filali Date: Fri, 6 Nov 2026 15:12:40 +0100 Subject: [PATCH] [rtl] Set rvfi_intr on entry to synchronous exception handlers RVFI requires rvfi_intr to be set on the first instruction of any trap handler. Fixes #2556. Reported-by: qinkejiu Signed-off-by: Hakim Filali --- rtl/ibex_core.sv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rtl/ibex_core.sv b/rtl/ibex_core.sv index a8021c68b5..706eeeb952 100644 --- a/rtl/ibex_core.sv +++ b/rtl/ibex_core.sv @@ -2411,7 +2411,8 @@ module ibex_core import ibex_pkg::*; import ibex_cheriot_pkg::*; #( always_comb begin rvfi_set_trap_pc_d = rvfi_set_trap_pc_q; - if (pc_set && pc_mux_id == PC_EXC && (exc_pc_mux_id == EXC_PC_IRQ)) begin + if (pc_set && pc_mux_id == PC_EXC && + (exc_pc_mux_id == EXC_PC_EXC || exc_pc_mux_id == EXC_PC_IRQ)) begin // PC is set to enter a trap handler rvfi_set_trap_pc_d = 1'b1; end else if (rvfi_set_trap_pc_q && rvfi_id_done) begin