Skip to content

Commit 2678654

Browse files
ha0lyurswarbrick
authored andcommitted
fix: Illegal instruction display message
When encountering certain illegal compressed instructions, incorrect instruction information was displayed. Now, illegal instructions can be printed correctly.
1 parent 6e466c1 commit 2678654

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rtl/ibex_controller.sv

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ module ibex_controller #(
175175
// print warning in case of decoding errors
176176
if ((ctrl_fsm_cs == DECODE) && instr_valid_i && !instr_fetch_err_i && illegal_insn_d) begin
177177
$display("%t: Illegal instruction (hart %0x) at PC 0x%h: 0x%h", $time, u_ibex_core.hart_id_i,
178-
pc_id_i, id_stage_i.instr_rdata_i);
178+
pc_id_i, instr_is_compressed_i ? {16'b0, instr_compressed_i} : instr_i );
179179
end
180180
end
181181
// synopsys translate_on

0 commit comments

Comments
 (0)