From 872f9ed9cc60756965e352882aa816fead2fe3ad Mon Sep 17 00:00:00 2001 From: Harshini Srinath <93847878+harshinisrinath1001@users.noreply.github.com> Date: Sun, 30 Jul 2023 16:57:57 -0700 Subject: [PATCH] Fixed spacing --- src/fpu/fma/fma.sv | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/fpu/fma/fma.sv b/src/fpu/fma/fma.sv index 80f040171..a6e87a240 100644 --- a/src/fpu/fma/fma.sv +++ b/src/fpu/fma/fma.sv @@ -27,17 +27,17 @@ //////////////////////////////////////////////////////////////////////////////////////////////// module fma import cvw::*; #(parameter cvw_t P) ( - input logic Xs, Ys, Zs, // input's signs + input logic Xs, Ys, Zs, // input's signs input logic [P.NE-1:0] Xe, Ye, Ze, // input's biased exponents in B(NE.0) format input logic [P.NF:0] Xm, Ym, Zm, // input's significands in U(0.NF) format - input logic XZero, YZero, ZZero, // is the input zero - input logic [2:0] OpCtrl, // operation control - output logic ASticky, // sticky bit that is calculated during alignment + input logic XZero, YZero, ZZero, // is the input zero + input logic [2:0] OpCtrl, // operation control + output logic ASticky, // sticky bit that is calculated during alignment output logic [3*P.NF+3:0] Sm, // the positive sum's significand - output logic InvA, // Was A inverted for effective subtraction (P-A or -P+A) - output logic As, // the aligned addend's sign (modified Z sign for other opperations) - output logic Ps, // the product's sign - output logic Ss, // the sum's sign + output logic InvA, // Was A inverted for effective subtraction (P-A or -P+A) + output logic As, // the aligned addend's sign (modified Z sign for other opperations) + output logic Ps, // the product's sign + output logic Ss, // the sum's sign output logic [P.NE+1:0] Se, // the sum's exponent output logic [$clog2(3*P.NF+5)-1:0] SCnt // normalization shift count ); @@ -56,7 +56,7 @@ module fma import cvw::*; #(parameter cvw_t P) ( logic [3*P.NF+3:0] Am; // addend aligned's mantissa for addition in U(NF+4.2NF) logic [3*P.NF+3:0] AmInv; // aligned addend's mantissa possibly inverted logic [2*P.NF+1:0] PmKilled; // the product's mantissa possibly killed U(2.2Nf) - logic KillProd; // set the product to zero before addition if the product is too small to matter + logic KillProd; // set the product to zero before addition if the product is too small to matter logic [P.NE+1:0] Pe; // the product's exponent B(NE+2.0) format; adds 2 bits to allow for size of number and negative sign /////////////////////////////////////////////////////////////////////////////// @@ -67,7 +67,6 @@ module fma import cvw::*; #(parameter cvw_t P) ( // - Multiply the mantissas /////////////////////////////////////////////////////////////////////////////// - // calculate the product's exponent fmaexpadd #(P) expadd(.Xe, .Ye, .XZero, .YZero, .Pe); @@ -80,6 +79,7 @@ module fma import cvw::*; #(parameter cvw_t P) ( /////////////////////////////////////////////////////////////////////////////// // Alignment shifter /////////////////////////////////////////////////////////////////////////////// + fmaalign #(P) align(.Ze, .Zm, .XZero, .YZero, .ZZero, .Xe, .Ye, .Am, .ASticky, .KillProd); // /////////////////////////////////////////////////////////////////////////////// @@ -91,5 +91,3 @@ module fma import cvw::*; #(parameter cvw_t P) ( fmalza #(3*P.NF+4, P.NF) lza(.A(AmInv), .Pm(PmKilled), .Cin(InvA & (~ASticky | KillProd)), .sub(InvA), .SCnt); endmodule - -