From 475a84491e94059482896c6e188313deb2baae97 Mon Sep 17 00:00:00 2001 From: David Harris Date: Tue, 31 May 2022 22:31:21 +0000 Subject: [PATCH] Unpackinput cleanup --- pipelined/src/fpu/unpackinput.sv | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/pipelined/src/fpu/unpackinput.sv b/pipelined/src/fpu/unpackinput.sv index 6b39d41c..9c58a444 100644 --- a/pipelined/src/fpu/unpackinput.sv +++ b/pipelined/src/fpu/unpackinput.sv @@ -262,23 +262,12 @@ module unpackinput ( end - // is the exponent all 0's - assign ExpZero = ~ExpNonZero; - - // add the assumed one (or zero if denormal or zero) to create the mantissa - assign Man = {ExpNonZero, Frac}; - - // is the input a NaN - // - force to be a NaN if it isn't properly Nan Boxed - assign NaN = ExpMax & ~FracZero; - - // is the input a singnaling NaN - assign SNaN = NaN&~Frac[`NF-1]; - - // is the input infinity - assign Inf = ExpMax & FracZero; - - // is the input zero - assign Zero = ExpZero & FracZero; - + // Output logic + assign ExpZero = ~ExpNonZero; // is the exponent all 0's? + assign Man = {ExpNonZero, Frac}; // add the assumed one (or zero if denormal or zero) to create the significand + // *** - force to be a NaN if it isn't properly Nan Boxed + assign NaN = ExpMax & ~FracZero; // is the input a NaN? + assign SNaN = NaN&~Frac[`NF-1]; // is the input a singnaling NaN? + assign Inf = ExpMax & FracZero; // is the input infinity? + assign Zero = ExpZero & FracZero; // is the input zero? endmodule \ No newline at end of file