Skip to content

Commit 3378fcb

Browse files
committed
Corrigindo pequeno bug no ALU Control
1 parent 694f2bd commit 3378fcb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rtl/core/alu_control.sv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ always_comb begin : ALU_CONTROL
3939

4040
2'b10: // Operações de ALU
4141
unique case (FUNC3_i)
42-
3'b000: ALU_OP_o = (is_immediate_i || !FUNC7_i[5]) ? SUM : SUB; // ADD/SUB
42+
3'b000: ALU_OP_o = (!is_immediate_i && FUNC7_i[5]) ? SUB : SUM; // ADD/SUB
4343
3'b001: ALU_OP_o = SHIFT_LEFT; // SLLI / SLL
4444
3'b010: ALU_OP_o = SLT; // SLTI / SLT
4545
3'b011: ALU_OP_o = SLT_U; // SLTIU / SLTU

0 commit comments

Comments
 (0)