Overview - 2024.2 English - XD160

Vitis Libraries

Document ID
XD160
Release Date
2024-11-29
Version
2024.2 English

vss_fft_ifft_1d is a single-channel, decomposed FFT that contains the AIE sub-part of the VSS FFT offering.

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

Parameters:

TT_DATA

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:

cint32, cfloat.

TT_TWIDDLE

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.
TP_POINT_SIZE

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.

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.
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 minimum are used. In this example, even samples are read from input stream[0] and odd samples from input stream[1].
TP_SSR is an unsigned integer to describe the number of parallel computational paths into which the *implementation will be split to improve the performance. Higher SSR relates to higher performance.
TP_RND

describes the selection of rounding to be applied during the shift down stage of processing.

Although, TP_RND accepts unsigned integer values descriptive macros are recommended where

  • 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 are only supported on AIE-ML device.

TP_SAT

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 ].
TP_TWIDDLE_MODE

describes the magnitude of integer twiddles. It has no effect for cfloat.

  • 0: Max amplitude. Values at 2^15 (for TT_TWIDDLE=cint16) and 2^31 (TT_TWIDDLE=cint32) will saturate and so *introduce errors
  • 1: 0.5 amplitude. Twiddle values are 1/2 that of mode 0 so as to avoid twiddle saturation. However, *twiddles are one bit less precise versus mode 0.
template <
    typename TT_DATA,
    typename TT_TWIDDLE,
    unsigned int TP_POINT_SIZE,
    unsigned int TP_FFT_NIFFT = 1,
    unsigned int TP_SHIFT = 0,
    unsigned int TP_API = 0,
    unsigned int TP_SSR = 0,
    unsigned int TP_RND = 4,
    unsigned int TP_SAT = 1,
    unsigned int TP_TWIDDLE_MODE = 0
    >
class vss_fft_ifft_1d_graph: public graph

// fields

kernel m_fftTwRotKernels[TP_SSR]
port_array <input, TP_SSR> front_i
port_array <input, TP_SSR> back_i
port_array <output, TP_SSR> back_o
port_array <output, TP_SSR> front_o
fft_ifft_dit_1ch_graph <TT_DATA, TT_TWIDDLE, kPtSizeD1, TP_FFT_NIFFT, kFirstFFTShift, kIntCascLen, kIntDynPtSize, kWindowSizeCalc, TP_API, kIntParPow, kIntUseWidg, TP_RND, TP_SAT, TP_TWIDDLE_MODE> frontFFTGraph[TP_SSR]
fft_ifft_dit_1ch_graph <TT_DATA, TT_TWIDDLE, kPtSizeD2, TP_FFT_NIFFT, kSecondFFTShift, kIntCascLen, kIntDynPtSize, kWindowSizeCalc, TP_API, kIntParPow, kIntUseWidg, TP_RND, TP_SAT, TP_TWIDDLE_MODE> backFFTGraph[TP_SSR]