Skip to content

Commit

Permalink
Generate illegal opcode when execute LWU with XLEN=32
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-Roch Coulon <[email protected]>
  • Loading branch information
JeanRochCoulon committed Aug 23, 2023
1 parent 1db42ee commit 365b45b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/decoder.sv
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,8 @@ module decoder import ariane_pkg::*; #(
3'b010: instruction_o.op = ariane_pkg::LW;
3'b100: instruction_o.op = ariane_pkg::LBU;
3'b101: instruction_o.op = ariane_pkg::LHU;
3'b110: instruction_o.op = ariane_pkg::LWU;
3'b110: if (riscv::XLEN==64) instruction_o.op = ariane_pkg::LWU;
else illegal_instr = 1'b1;
3'b011: if (riscv::XLEN==64) instruction_o.op = ariane_pkg::LD;
else illegal_instr = 1'b1;
default: illegal_instr = 1'b1;
Expand Down

0 comments on commit 365b45b

Please sign in to comment.