mirror of
https://github.com/openhwgroup/cve2.git
synced 2025-04-25 06:27:22 -04:00
[rtl] Make sure decoder also checks bits 26 and 25 for slli, srli, srai
Previously, these bits were not checked when decoding slli, srli and srai, causing some illegal instruction encodings not to trigger an illegal instructions exception. This resolves lowRISC/Ibex#1018. Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
This commit is contained in:
parent
03a8ae70d6
commit
7f9e704f36
1 changed files with 2 additions and 2 deletions
|
@ -348,7 +348,7 @@ module ibex_decoder #(
|
||||||
|
|
||||||
3'b001: begin
|
3'b001: begin
|
||||||
unique case (instr[31:27])
|
unique case (instr[31:27])
|
||||||
5'b0_0000: illegal_insn = 1'b0; // slli
|
5'b0_0000: illegal_insn = (instr[26:25] == 2'b00) ? 1'b0 : 1'b1; // slli
|
||||||
5'b0_0100, // sloi
|
5'b0_0100, // sloi
|
||||||
5'b0_1001, // sbclri
|
5'b0_1001, // sbclri
|
||||||
5'b0_0101, // sbseti
|
5'b0_0101, // sbseti
|
||||||
|
@ -385,7 +385,7 @@ module ibex_decoder #(
|
||||||
end else begin
|
end else begin
|
||||||
unique case (instr[31:27])
|
unique case (instr[31:27])
|
||||||
5'b0_0000, // srli
|
5'b0_0000, // srli
|
||||||
5'b0_1000: illegal_insn = 1'b0; // srai
|
5'b0_1000: illegal_insn = (instr[26:25] == 2'b00) ? 1'b0 : 1'b1; // srai
|
||||||
|
|
||||||
5'b0_0100, // sroi
|
5'b0_0100, // sroi
|
||||||
5'b0_1100, // rori
|
5'b0_1100, // rori
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue