Overview - 2023.2 English

Vitis Libraries

Release Date
2023.2 English

mixed_radix_fft is a single-channel, decimation-in-time, fixed point size FFT including radix3 or radix5 stages.

These are the templates to configure the single-channel decimation-in-time class.



describes the type of individual data samples input to and output from the transform function. This is a typename and must be one of the following:

int16, cint16, int32, cint32, float, cfloat.


describes the type of twiddle factors of the transform.

It must be one of the following: cint16, cint32, cfloat and must also satisfy the following rules:

  • 32 bit types are only supported when TT_DATA is also a 32 bit type,
  • TT_TWIDDLE must be an integer type if TT_DATA is an integer type
  • TT_TWIDDLE must be cfloat type if TT_DATA is a float type.

is an unsigned integer which describes the number of samples in the transform.

This must be 2^N where N is an integer in the range 4 to 16 inclusive.

When TP_DYN_PT_SIZE is set, TP_POINT_SIZE describes the maximum point size possible.

TP_FFT_NIFFT selects whether the transform to perform is an FFT (1) or IFFT (0).
TP_SHIFT selects the power of 2 to scale the result by prior to output.

selects the rounding mode.

  • rnd_floor = Truncate LSB, always round down (towards negative infinity).

  • rnd_ceil = Always round up (towards positive infinity).

  • rnd_sym_floor = Truncate LSB, always round towards 0.

  • rnd_sym_ceil = Always round up towards infinity.

  • rnd_pos_inf = Round halfway towards positive infinity.

  • rnd_neg_inf = Round halfway towards negative infinity.

  • rnd_sym_inf = Round halfway towards infinity (away from zero).

  • rnd_sym_zero = Round halfway towards zero (away from infinity).

  • rnd_conv_even = Round halfway towards nearest even number.

  • rnd_conv_odd = Round halfway towards nearest odd number.

    No rounding is performed on ceil or floor mode variants.

    Other modes round to the nearest integer. They differ only in how they round for values of 0.5.

    Note: Rounding modes rnd_sym_floor and rnd_sym_ceil will only be supported on AIE-ML device.


describes the selection of saturation to be applied during the shift down stage of processing. TP_SAT accepts unsigned integer values, where:

  • 0: none = No saturation is performed and the value is truncated on the MSB side.
  • 1: saturate = Default. Saturation rounds an n-bit signed value in the range [- ( 2^(n-1) ) : +2^(n-1) - 1 ].
  • 3: symmetric = Controls symmetric saturation. Symmetric saturation rounds an n-bit signed value in the range [- ( 2^(n-1) -1 ) : +2^(n-1) - 1 ].

is an unsigned integer which describes the number of samples to be processed in each call

to the function.

By default, TP_WINDOW_SIZE is set to match TP_POINT_SIZE.

TP_WINDOW_SIZE may be set to be an integer multiple of the TP_POINT_SIZE, in which case

multiple FFT operations will be performed on a given input window, one calculation per frame of data in

the iobuffer, resulting in multiple output frames. This feature of packing multiple frames of data

into a single call of the function reduces the number of kernel calls and as a result, reduces the losses

due to overheads in the kernel call mechanism. As a result, overall performance is increased.

TP_CASC_LEN selects the number of kernels the FFT will be divided over in series to improve throughput
TP_API is an unsigned integer to select window (0) or stream (1) interfaces. When stream I/O is selected, one sample is taken from, or output to, a stream and the next sample from or two the next stream. Two streams mimimum are used. In this example, even samples are read from input stream[0] and odd samples from input stream[1].
template <
    typename TT_DATA,
    typename TT_TWIDDLE,
    unsigned int TP_POINT_SIZE,
    unsigned int TP_FFT_NIFFT,
    unsigned int TP_SHIFT,
    unsigned int TP_RND = 4,
    unsigned int TP_SAT = 1,
    unsigned int TP_WINDOW_VSIZE = TP_POINT_SIZE,
    unsigned int TP_CASC_LEN = 1,
    unsigned int TP_API = 0
class mixed_radix_fft_graph: public graph

// typedefs

typedef std::conditional <std::is_same <TT_DATA, cint16>::value, cint32_t, TT_DATA>::type T_internalDataType

// fields

kernel m_mixed_radix_fftKernels[TP_CASC_LEN]
port_array <input, m_kNumPorts> in
port_array <output, m_kNumPorts> out
static constexpr int kStreamsPerTile
static constexpr int m_kNumPorts
static constexpr int m_kR5Stages
static constexpr int m_kR3Stages
static constexpr int m_kR4Stages
static constexpr int m_kR2Stages
static constexpr int m_kR5factor
static constexpr int m_kR3factor
static constexpr int m_kR4factor
static constexpr int m_kR2factor
static constexpr int m_kTotalStages
static constexpr int m_ktwiddleTableSize