From d810d1cd42a31268ccb33993f1f1f429900c5ff8 Mon Sep 17 00:00:00 2001 From: Flavian Kaufmann Date: Thu, 9 May 2024 11:02:01 +0200 Subject: added remaining branch instructions --- src/alu_op_decode.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/alu_op_decode.v') diff --git a/src/alu_op_decode.v b/src/alu_op_decode.v index 895b952..b9db664 100644 --- a/src/alu_op_decode.v +++ b/src/alu_op_decode.v @@ -1,6 +1,6 @@ module alu_op_decode ( input [6:0] opcode, - input [1:0] alu_ctrl, + input alu_ctrl, input [2:0] funct3, input [6:0] funct7, output reg [3:0] alu_op @@ -19,7 +19,7 @@ parameter ALU_OP_ADD = 4'b0000, always @ (*) begin - if (alu_ctrl == 2'b00) alu_op <= ALU_OP_ADD; + if (alu_ctrl == 1'b1) alu_op <= ALU_OP_ADD; else case (opcode) 7'b0110011: begin // ADD, SUB, SLL, SLT, SLTU, XOR, SRL, SRA, OR, AND case (funct3) -- cgit v1.2.3