From f437336540ddcd084fd40c395eb6c1f51af130c6 Mon Sep 17 00:00:00 2001 From: David Harris Date: Sun, 12 Nov 2023 10:05:54 -0800 Subject: [PATCH] Explained sqrt preshifting --- config/shared/config-shared.vh | 1 + src/fpu/fdivsqrt/fdivsqrtpreproc.sv | 41 ++++++++++++++++++++--------- 2 files changed, 30 insertions(+), 12 deletions(-) diff --git a/config/shared/config-shared.vh b/config/shared/config-shared.vh index 14de5187e..9635d706b 100644 --- a/config/shared/config-shared.vh +++ b/config/shared/config-shared.vh @@ -99,6 +99,7 @@ localparam RK = LOGR*DIVCOPIES; // r*k bits // intermediate division parameters not directly used in fdivsqrt hardware localparam FPDIVMINb = NF + 3; // minimum length of fractional part: Nf result bits + guard and round bits + 1 extra bit because square root could be shifted right *** explain better +//localparam FPDIVMINb = NF + 2 + (RADIX == 2); // minimum length of fractional part: Nf result bits + guard and round bits + 1 extra bit for preshifting radix2 square root right localparam DIVMINb = ((FPDIVMINb