Skip to content

Commit 06e2e46

Browse files
JaewonHurskristiansson
authored andcommitted
Fix mor1kx_decode to accept valid l.fl1 (l.ff1) instructions (#110)
* Fix mor1kx_decode to only accept valid l.fl1 and l.ff1 instructions Both l.fl1 and l.ff1 have bit 9 set in the insruction as port of their op codes, mor1kx_decode does not currently properly check this
1 parent 22a1a85 commit 06e2e46

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

rtl/verilog/mor1kx_decode.v

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,9 @@ module mor1kx_decode
259259
opc_alu == `OR1K_ALU_OPC_SHRT ||
260260
opc_insn == `OR1K_OPCODE_SHRTI;
261261

262+
/* check bit 9 to verify valid l.fl1/l.ff1 instruction */
262263
assign decode_op_ffl1_o = opc_insn == `OR1K_OPCODE_ALU &&
264+
(decode_insn_i[9:8] == 2'b00 || decode_insn_i[9:8] == 2'b01) &&
263265
opc_alu == `OR1K_ALU_OPC_FFL1;
264266

265267
assign decode_op_movhi_o = opc_insn == `OR1K_OPCODE_MOVHI;

0 commit comments

Comments
 (0)