mirror of
https://github.com/openhwgroup/cvw
synced 2025-01-24 05:24:49 +00:00
Simplified out LOGRK parameter
This commit is contained in:
parent
7d0d9dcebe
commit
3cae2385ab
@ -97,11 +97,10 @@ localparam BIAS2 = ((F_SUPPORTED & (LEN1 != S_LEN)) ? S_BIAS : H_BIAS);
|
||||
localparam DIVN = ((NF+2<XLEN) & IDIV_ON_FPU) ? XLEN : NF+2; // standard length of input: max(XLEN, NF+2)
|
||||
localparam LOGR = $clog2(RADIX); // r = log(R)
|
||||
localparam RK = LOGR*DIVCOPIES; // r*k bits per cycle generated
|
||||
localparam LOGRK = $clog2(RK); // log2(r*k)
|
||||
localparam FPDUR = (DIVN+1)/RK + 1 + (RADIX/4); //
|
||||
localparam FPDUR = (DIVN+1)/RK + 1 + (RADIX/4); // *** relate to algorithm for rest of these
|
||||
localparam DURLEN = $clog2(FPDUR+1);
|
||||
localparam DIVb = FPDUR*RK - 1; // canonical fdiv size (b)
|
||||
localparam DIVBLEN = $clog2(DIVb+2)-1;
|
||||
localparam DIVBLEN = $clog2(DIVb+2)-1; // *** where is 2 coming from?
|
||||
|
||||
// largest length in IEU/FPU
|
||||
localparam CVTLEN = ((NF<XLEN) ? (XLEN) : (NF)); // max(XLEN, NF)
|
||||
|
@ -180,7 +180,6 @@ localparam cvw_t P = '{
|
||||
DIVN : DIVN,
|
||||
LOGR : LOGR,
|
||||
RK : RK,
|
||||
LOGRK : LOGRK,
|
||||
FPDUR : FPDUR,
|
||||
DURLEN : DURLEN,
|
||||
DIVb : DIVb,
|
||||
|
@ -272,7 +272,6 @@ typedef struct packed {
|
||||
int DIVN ;
|
||||
int LOGR ;
|
||||
int RK ;
|
||||
int LOGRK ;
|
||||
int FPDUR ;
|
||||
int DURLEN ;
|
||||
int DIVb ;
|
||||
|
@ -133,9 +133,8 @@ module fdivsqrtpreproc import cvw::*; #(parameter cvw_t P) (
|
||||
assign ISpecialCaseE = BZeroE | ALTBE;
|
||||
|
||||
// calculate right shift amount RightShiftX to complete in discrete number of steps
|
||||
if (P.LOGRK > 0) begin // more than 1 bit per cycle
|
||||
logic [P.LOGRK-1:0] IntTrunc, RightShiftX;
|
||||
logic [P.DIVBLEN:0] IntSteps;
|
||||
if (P.RK > 1) begin // more than 1 bit per cycle
|
||||
logic [$clog2(P.RK)-1:0] RightShiftX;
|
||||
/* verilator lint_offf WIDTH */
|
||||
assign RightShiftX = P.RK - 1 - ((IntResultBitsE - 1) % P.RK); // Right shift amount
|
||||
assign DivXShifted = DivX >> RightShiftX; // shift X by up to R*K-1 to complete in n steps
|
||||
|
Loading…
Reference in New Issue
Block a user