From 7e026f3e78f20d1d64237c983398eca3ae8f06a6 Mon Sep 17 00:00:00 2001 From: David Harris Date: Sat, 18 Dec 2021 10:21:17 -0800 Subject: [PATCH] Simplified Shifter Right input --- wally-pipelined/src/ieu/alu.sv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wally-pipelined/src/ieu/alu.sv b/wally-pipelined/src/ieu/alu.sv index a2aa1a44..0558cbe1 100644 --- a/wally-pipelined/src/ieu/alu.sv +++ b/wally-pipelined/src/ieu/alu.sv @@ -51,8 +51,8 @@ module alu #(parameter WIDTH=32) ( assign {Carry, Sum} = A + CondInvB + {{(WIDTH-1){1'b0}}, SubArith}; // Shifts - assign Right = (Funct3[2:0] == 3'b101); // sra or srl - shifter sh(A, B[5:0], Right, SubArith, W64, Shift); + assign Right = Funct3[2]; // sra or srl + shifter sh(A, B[`LOG_XLEN-1:0], Right, SubArith, W64, Shift); // condition code flags based on add/subtract output // Overflow occurs when the numbers being added have the same sign