From 83051a53515a35fd2615b8405d2e8b1a1cef36c4 Mon Sep 17 00:00:00 2001 From: cturek Date: Sun, 6 Nov 2022 22:21:35 +0000 Subject: [PATCH] Changed lzc names, started int/fp size merge in preproc --- pipelined/config/shared/wally-shared.vh | 2 +- pipelined/src/fpu/fdivsqrt/fdivsqrtpreproc.sv | 30 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/pipelined/config/shared/wally-shared.vh b/pipelined/config/shared/wally-shared.vh index 97feac9e7..a69814b58 100644 --- a/pipelined/config/shared/wally-shared.vh +++ b/pipelined/config/shared/wally-shared.vh @@ -127,7 +127,7 @@ `define DURLEN ($clog2(`FPDUR+1)) `define QLEN (`FPDUR*`LOGR*`DIVCOPIES) `define DIVb (`QLEN-1) -`define DIVBLEN ($clog2(`DIVb)) +`define DIVBLEN ($clog2(`DIVb+1)-1) `define USE_SRAM 0 diff --git a/pipelined/src/fpu/fdivsqrt/fdivsqrtpreproc.sv b/pipelined/src/fpu/fdivsqrt/fdivsqrtpreproc.sv index 893863032..4d90185c3 100644 --- a/pipelined/src/fpu/fdivsqrt/fdivsqrtpreproc.sv +++ b/pipelined/src/fpu/fdivsqrt/fdivsqrtpreproc.sv @@ -51,7 +51,7 @@ module fdivsqrtpreproc ( logic [`NF-1:0] PreprocB, PreprocY; logic [`NF+1:0] SqrtX; logic [`DIVb+3:0] DivX; - logic [$clog2(`NF+2)-1:0] XZeroCnt, YZeroCnt; + logic [`DIVBLEN:0] L; logic [`NE+1:0] Qe; // Intdiv signals logic [`DIVb-1:0] ZeroBufX, ZeroBufY; @@ -75,13 +75,13 @@ module fdivsqrtpreproc ( assign ZeroBufX = MDUE ? {PosA, {`DIVb-`XLEN{1'b0}}} : {Xm, {`DIVb-`NF-1{1'b0}}}; assign ZeroBufY = MDUE ? {PosB, {`DIVb-`XLEN{1'b0}}} : {Ym, {`DIVb-`NF-1{1'b0}}}; - lzc #(`NF+1) lzcX (Xm, XZeroCnt); - lzc #(`NF+1) lzcY (Ym, YZeroCnt); + lzc #(`DIVb) lzcX (ZeroBufX, L); + lzc #(`DIVb) lzcY (ZeroBufY, m); - assign PreprocX = Xm[`NF-1:0]<