summaryrefslogtreecommitdiff
path: root/src/rv2insn.sv
diff options
context:
space:
mode:
Diffstat (limited to 'src/rv2insn.sv')
-rw-r--r--src/rv2insn.sv12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rv2insn.sv b/src/rv2insn.sv
index 1d9996c..8717d0f 100644
--- a/src/rv2insn.sv
+++ b/src/rv2insn.sv
@@ -33,8 +33,8 @@ endfunction
function automatic decode_out_t op_imm(xlen_t pc, itype_t rv, alu_counter_t alu_counter);
alu_counter_t fu = next_alu(alu_counter);
unique case (rv.funct3)
- 3'b000: return {{NOP, NOP},
- {`rn(rv.rs1), `alu(fu)},
+ 3'b000: return {{`rn(rv.rs1), `alu(fu)},
+ {NOP, NOP},
{`alu(fu), `rn(rv.rd)},
ALU_ADDI, imm_t'(signed'(rv.imm)), fu};
@@ -50,13 +50,13 @@ function automatic decode_out_t op(xlen_t pc, rtype_t rv, alu_counter_t alu_coun
3'b000: begin
unique case (rv.funct7)
7'b0000000:
- return {{`rn(rv.rs1), `alu(fu)},
- {`rn(rv.rs2), `alu(fu)},
+ return {{`rn(rv.rs2), `alu(fu)},
+ {`rn(rv.rs1), `alu(fu)},
{`alu(fu), `rn(rv.rd)},
ALU_ADD, imm_t'(0), fu};
7'b0100000:
- return {{`rn(rv.rs1), `alu(fu)},
- {`rn(rv.rs2), `alu(fu)},
+ return {{`rn(rv.rs2), `alu(fu)},
+ {`rn(rv.rs1), `alu(fu)},
{`alu(fu), `rn(rv.rd)},
ALU_SUB, imm_t'(0), fu};