From dcaf9de22885d089294ac5fa1e29b13dca776fb4 Mon Sep 17 00:00:00 2001 From: Kevin Kim Date: Fri, 10 Mar 2023 14:17:38 -0800 Subject: [PATCH] removed redundant condinvb mux --- src/ieu/alu.sv | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ieu/alu.sv b/src/ieu/alu.sv index cdb2e4919..5fce245be 100644 --- a/src/ieu/alu.sv +++ b/src/ieu/alu.sv @@ -101,8 +101,7 @@ module alu #(parameter WIDTH=32) ( // Addition assign CondMaskInvB = SubArith ? ~CondMaskB : CondMaskB; - assign CondInvB = SubArith ? ~B : B; - assign {Carry, Sum} = CondShiftA + CondInvB + {{(WIDTH-1){1'b0}}, SubArith}; + assign {Carry, Sum} = CondShiftA + CondMaskInvB + {{(WIDTH-1){1'b0}}, SubArith}; // Shifts (configurable for rotation) shifter sh(.shA(CondExtA), .Sign(shSignA), .rotA(rotA), .Amt(B[`LOG_XLEN-1:0]), .Right(Funct3[2]), .W64(W64), .Y(Shift), .Rotate(Rotate));