Skip to content

Commit

Permalink
Fix mor1kx_decode to accept valid l.fl1 (l.ff1) instructions (#110)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
JaewonHur authored and skristiansson committed Dec 22, 2019
1 parent 22a1a85 commit 06e2e46
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rtl/verilog/mor1kx_decode.v
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,9 @@ module mor1kx_decode
opc_alu == `OR1K_ALU_OPC_SHRT ||
opc_insn == `OR1K_OPCODE_SHRTI;

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

assign decode_op_movhi_o = opc_insn == `OR1K_OPCODE_MOVHI;
Expand Down

0 comments on commit 06e2e46

Please sign in to comment.