From 373edb42380875eafc8b9de54d80b939d263d041 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 16 Feb 2025 22:36:57 +0200 Subject: add some kind of toplevel --- src/rv2insn.sv | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/rv2insn.sv') 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}; -- cgit v1.2.3