[dv] Fix RVFI stage valid logic

Previously if a dummy instruction entered the pipeline whilst it
wouldn't make RVFI stage 0 valid, it would make RVFI stage 1 valid.

Now stage 1 can only become valid if stage 0 was valid.
This commit is contained in:
Greg Chadwick 2022-09-09 18:54:11 +01:00 committed by Greg Chadwick
parent 4effc487e0
commit a0fe5ea3b7

View file

@ -1311,7 +1311,7 @@ module ibex_core import ibex_pkg::*; #(
assign rvfi_trap_id = id_stage_i.controller_i.id_exception_o;
assign rvfi_trap_wb = id_stage_i.controller_i.exc_req_lsu;
// WB is instantly done in the tracking pipeline when a trap is progress through the pipeline
assign rvfi_wb_done = instr_done_wb | (rvfi_stage_valid[0] & rvfi_stage_trap[0]);
assign rvfi_wb_done = rvfi_stage_valid[0] & (instr_done_wb | rvfi_stage_trap[0]);
end else begin : gen_rvfi_no_wb_stage
// Without writeback stage first RVFI stage is output stage so simply valid the cycle after
// instruction leaves ID/EX (and so has retired)