Skip to content

Commit c03cc91

Browse files
committed
[rtl] RVFI changes and extensions for co-simulation
This adds some new `rvfi_ext` signals that are needed by the co-simulation environment. It also fixes/alters `rvfi_trap`. Previously it wouldn't work correctly in various cases. Now it is fully functional, though it's meaning includes more trap cases than the RVFI spec strictly includes. It is now set for any instruction that produces a synchronous trap (everything bar interrupts).
1 parent 648fadb commit c03cc91

File tree

5 files changed

+298
-115
lines changed

5 files changed

+298
-115
lines changed

rtl/ibex_controller.sv

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ module ibex_controller #(
353353
always_comb begin : gen_mfip_id
354354
mfip_id = 4'd0;
355355

356-
for (int i = 14;i >= 0; i--) begin
356+
for (int i = 14; i >= 0; i--) begin
357357
if (irqs_i.irq_fast[i]) begin
358358
mfip_id = i[3:0];
359359
end
@@ -936,4 +936,12 @@ module ibex_controller #(
936936
`ASSERT(IbexNoPCSetOnSpecialReqIfNotExpected,
937937
exception_req_pending && !expect_exception_pc_set |-> ~pc_set_o)
938938
`endif
939+
940+
`ifdef RVFI
941+
// Workaround for internal verilator error when using hierarchical refers to calcuate this
942+
// directly in ibex_core
943+
logic rvfi_flush_next;
944+
945+
assign rvfi_flush_next = ctrl_fsm_ns == FLUSH;
946+
`endif
939947
endmodule

0 commit comments

Comments
 (0)