inputlogic[2:0]FrmM,// rounding mode 000 = rount to nearest, ties to even 001 = round twords zero 010 = round down 011 = round up 100 = round to nearest, ties to max magnitude
inputlogic[`FMTBITS-1:0]FmtM,// precision 1 = double 0 = single
inputlogic[`NE+1:0]ProdExpM,// X exponent + Y exponent - bias
inputlogicAddendStickyM,// sticky bit that is calculated during alignment
inputlogicKillProdM,// set the product to zero before addition if the product is too small to matter
inputlogicXZeroM,YZeroM,ZZeroM,// inputs are zero
inputlogicXInfM,YInfM,ZInfM,// inputs are infinity
inputlogicXNaNM,YNaNM,ZNaNM,// inputs are NaN
inputlogicXSNaNM,YSNaNM,ZSNaNM,// inputs are signaling NaNs
inputlogic[3*`NF+5:0]SumM,// the positive sum
inputlogicNegSumM,// was the sum negitive
inputlogicInvZM,// do you invert Z
inputlogicZDenormM,// is the original precision denormalized
inputlogicZSgnEffM,// the modified Z sign - depends on instruction
inputlogicPSgnM,// the product's sign
inputlogic[2:0]FOpCtrlM,// choose which opperation (look below for values)
inputlogic[$clog2(3*`NF+7)-1:0]FmaNormCntM,// the normalization shift count
inputlogic[`NE:0]CvtCalcExpM,// the calculated expoent
inputlogicCvtResDenormUfM,
inputlogic[`LOGLGLEN-1:0]CvtShiftAmtM,// how much to shift by
inputlogicCvtResSgnM,// the result's sign
inputlogicFWriteIntM,// is fp->int (since it's writting to the integer register)
inputlogic[`LGLEN-1:0]CvtLzcInM,// input to the Leading Zero Counter (priority encoder)
inputlogicIntZeroM,// is the input zero
inputlogic[1:0]PostProcSelM,// select result to be written to fp register
outputlogic[`FLEN-1:0]PostProcResM,// FMA final result
outputlogic[4:0]PostProcFlgM,
outputlogic[`XLEN-1:0]FCvtIntResM// the int conversion result
);
logic[`NF-1:0]ResFrac;// Result fraction
logic[`NE-1:0]ResExp;// Result exponent
logic[`CORRSHIFTSZ-1:0]CorrShifted;// the shifted sum before LZA correction
logic[`NE+1:0]SumExp;// exponent of the normalized sum
logic[`NE+1:0]FullResExp;// ResExp with bits to determine sign and overflow
logicSumZero;// is the sum zero
logicSticky;// Sticky bit
logic[3*`NF+8:0]FmaShiftIn;// is the sum zero
logicUfPlus1;// do you add one (for determining underflow flag)
logicRound;// bits needed to determine rounding
logic[`LGLEN+`NF:0]CvtShiftIn;// number to be shifted
logicMult;// multiply opperation
logic[`FLEN:0]RoundAdd;// how much to add to the result
logic[`NE+1:0]ConvNormSumExp;// exponent of the normalized sum not taking into account denormal or zero results
logicPreResultDenorm;// is the result denormalized - calculated before LZA corection