module
    iNToRawFN#(parameter intWidth = 1) (signedIn, in, isZero, sign, sExp, sig);
`include "HardFloat_localFuncs.vi"
    localparam expWidth = clog2(intWidth) + 1;
    input signedIn;
    input [(intWidth - 1):0] in;
    output isZero;
    output sign;
    output signed [(expWidth + 1):0] sExp;
    output [intWidth:0] sig;

    /*------------------------------------------------------------------------
    *------------------------------------------------------------------------*/
    localparam extIntWidth = 1<<(expWidth - 1);
    /*------------------------------------------------------------------------
    *------------------------------------------------------------------------*/
    assign sign = signedIn && in[intWidth - 1];
    /*------------------------------------------------------------------------
    *------------------------------------------------------------------------*/
    wire [(intWidth - 1):0] absIn = sign ? -in : in;
    wire [(extIntWidth - 1):0] extAbsIn = absIn;
    wire [(expWidth - 2):0] adjustedNormDist;
    countLeadingZeros#(extIntWidth, expWidth - 1)
        countLeadingZeros(extAbsIn, adjustedNormDist);
    /*------------------------------------------------------------------------
    *------------------------------------------------------------------------*/
    assign sig = (extAbsIn<<adjustedNormDist)>>(extIntWidth - intWidth);
    assign isZero = !sig[intWidth - 1];
    assign sExp = {2'b10, ~adjustedNormDist};

endmodule