From 8475de128b06e87950f2320552ba894edc77a7a5 Mon Sep 17 00:00:00 2001 From: cturek Date: Tue, 25 Oct 2022 21:04:09 +0000 Subject: [PATCH] Config cleanup --- pipelined/config/shared/wally-shared.vh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pipelined/config/shared/wally-shared.vh b/pipelined/config/shared/wally-shared.vh index b4fc2cea..34fcf8bf 100644 --- a/pipelined/config/shared/wally-shared.vh +++ b/pipelined/config/shared/wally-shared.vh @@ -26,7 +26,7 @@ `include "wally-constants.vh" // macros to define supported modes -// NOTE: No hardware support fo Q yet +// NOTE: No hardware support foR Q yet `define A_SUPPORTED ((`MISA >> 0) % 2 == 1) `define C_SUPPORTED ((`MISA >> 2) % 2 == 1) @@ -113,17 +113,17 @@ `define DIVCOPIES 32'h3 `define DIVLEN ((`NF < `XLEN) ? (`XLEN) : (`NF + 3)) // `define DIVN (`NF < `XLEN ? `XLEN : `NF+1) // length of input -`define DIVN (`NF < `XLEN ? `XLEN : `NF+3) // length of input -`define EXTRAFRACBITS ((`NF<(`XLEN)) ? (`XLEN - `NF) : 3) -`define EXTRAINTBITS ((`NF<(`XLEN)) ? 0 : (`NF - `XLEN + 3)) -`define DIVRESLEN ((`NF>`XLEN) ? `NF+4 : `XLEN) +`define DIVN (`NF < `XLEN ? `XLEN : (`NF + 3)) // length of input +`define EXTRAFRACBITS ((`NF < (`XLEN)) ? (`XLEN - `NF) : 3) +`define EXTRAINTBITS ((`NF < `XLEN) ? 0 : (`NF - `XLEN + 3)) +`define DIVRESLEN ((`NF>`XLEN) ? (`NF + 4) : `XLEN) `define LOGR ((`RADIX==2) ? 32'h1 : 32'h2) // FPDUR = ceil(DIVRESLEN/(LOGR*DIVCOPIES)) -// one interation is required for the integer bit for minimally redundent radix-4 +// one iteration is required for the integer bit for minimally redundent radix-4 `define FPDUR ((`DIVN+2+(`LOGR*`DIVCOPIES)-1)/(`LOGR*`DIVCOPIES)+(`RADIX/4)) `define DURLEN ($clog2(`FPDUR+1)) `define QLEN (`FPDUR*`LOGR*`DIVCOPIES) -`define DIVb (`FPDUR*`LOGR*`DIVCOPIES)-1 +`define DIVb (`QLEN - 1) `define USE_SRAM 0