Overview - 2023.2 English

Vitis Libraries

Release Date
2023-12-20
Version
2023.2 English

dft performs the Discrete Fourier Transform on a set of data samples

These are the templates to configure the function.

Parameters:

TT_DATA

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

cint16, cint32, cfloat.

TT_TWIDDLE

describes the type of twiddle factors used in the transform.

It must be one of the following: cint16, 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 describes the number of samples in the frame to be windowed.
TP_FFT_NIFFT selects whether the transform to perform is an forward (1) or reverse (0) transform.
TP_SHIFT selects the power of 2 to scale the result by prior to output.
TP_CASC_LEN selects the number of kernels the DFT will be split over in series to improve throughput
TP_NUM_FRAMES describes the number of frames of input data samples that occur within each input window of data.
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.

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 ].
template <
    typename TT_DATA,
    typename TT_TWIDDLE,
    unsigned int TP_POINT_SIZE,
    unsigned int TP_FFT_NIFFT,
    unsigned int TP_SHIFT,
    unsigned int TP_CASC_LEN,
    unsigned int TP_NUM_FRAMES,
    unsigned int TP_RND,
    unsigned int TP_SAT
    >
class dft_graph: public graph

// typedefs

typedef std::conditional_t <std::is_same <TT_DATA, int16>::value, cint16, std::conditional_t <std::is_same <TT_DATA, int32>::value, cint32, std::conditional_t <std::is_same <TT_DATA, float>::value, cfloat, TT_DATA>>> T_outDataType

// fields

kernel m_dftKernels[TP_CASC_LEN]
port <input> in[TP_CASC_LEN]
port <output> out[1]
double inv