diff options
author | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-02-16 22:36:57 +0200 |
---|---|---|
committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-02-16 22:36:57 +0200 |
commit | 373edb42380875eafc8b9de54d80b939d263d041 (patch) | |
tree | 8edf513e9052b9b4b514fc28d118abf9eb823586 /src/rv2insn.sv | |
parent | 82dec45fd786831f791b17b84aedb4d99b5ca25d (diff) | |
download | ttarv32-373edb42380875eafc8b9de54d80b939d263d041.tar.gz ttarv32-373edb42380875eafc8b9de54d80b939d263d041.zip |
Diffstat (limited to 'src/rv2insn.sv')
-rw-r--r-- | src/rv2insn.sv | 12 |
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}; |