From 67611016450c278f94e1cf9ffb74e965c6fa375f Mon Sep 17 00:00:00 2001 From: cturek Date: Wed, 21 Dec 2022 19:35:47 +0000 Subject: [PATCH] fixed normshift calculations --- pipelined/src/fpu/fdivsqrt/fdivsqrtpostproc.sv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pipelined/src/fpu/fdivsqrt/fdivsqrtpostproc.sv b/pipelined/src/fpu/fdivsqrt/fdivsqrtpostproc.sv index ca82c4f87..8190b3178 100644 --- a/pipelined/src/fpu/fdivsqrt/fdivsqrtpostproc.sv +++ b/pipelined/src/fpu/fdivsqrt/fdivsqrtpostproc.sv @@ -127,10 +127,10 @@ module fdivsqrtpostproc( always_comb if (RemOpM) begin - NormShiftM = (m + (`DIVBLEN)'(`DIVa)); + NormShiftM = (m + (`DIVBLEN+1)'(`DIVa)); PreResultM = IntRemM; end else begin - NormShiftM = ((`DIVBLEN)'(`DIVb) - (n << `LOGR)); + NormShiftM = ((`DIVBLEN+1)'(`DIVb) - (n << `LOGR)); PreResultM = {3'b000, IntQuotM}; end