module
    iNToRecFN#(
        parameter intWidth = 1, parameter expWidth = 3, parameter sigWidth = 3
    ) (
        input [(`floatControlWidth - 1):0] control,
        input signedIn,
        input [(intWidth - 1):0] in,
        input [2:0] roundingMode,
        output [(expWidth + sigWidth):0] out,
        output [4:0] exceptionFlags
    );
`include "HardFloat_localFuncs.vi"

    /*------------------------------------------------------------------------
    *------------------------------------------------------------------------*/
    localparam intExpWidth = clog2(intWidth) + 1;
    /*------------------------------------------------------------------------
    *------------------------------------------------------------------------*/
    wire isZero, sign;
    wire signed [(intExpWidth + 1):0] sExp;
    wire [intWidth:0] sig;
    iNToRawFN#(intWidth) iNToRawFN(signedIn, in, isZero, sign, sExp, sig);
    /*------------------------------------------------------------------------
    *------------------------------------------------------------------------*/
    roundAnyRawFNToRecFN#(
        intExpWidth,
        intWidth,
        expWidth,
        sigWidth,
        `flRoundOpt_sigMSBitAlwaysZero | `flRoundOpt_neverUnderflows
    ) roundRawToOut(
            control,
            1'b0,
            1'b0,
            1'b0,
            1'b0,
            isZero,
            sign,
            sExp,
            sig,
            roundingMode,
            out,
            exceptionFlags
        );

endmodule