Fixed Point 2-D SSR FFT L1 Module Usage - 2023.2 English

Vitis Libraries

Release Date
2023-12-20
Version
2023.2 English

To use the fixed point Vitis 2-D SSR FFT L1 module in a C++ HLS design:

1- Clone the Vitis DSP Library git repository and add the following path to compiler include path:

REPO_PATH/dsp/L1/include/hw/vitis_2dfft/fixed/

2- Include vt_fft.hpp

3- Use namespace xf::dsp::fft

4- Define parameter structures for 1-D SSR FFT processors used along rows and columns lets say call them params_row and parms_column by extending ssr_fft_default_params like Defining 1-D SSR FFT Parameter Structure

5- call fft2d<8, 16, 16, 2, params_row, params_column, 0,3, std::complex<ap_fixed<...>> >(p_inStream, p_outStream); description for template parameters can be found in 2-D SSR FFT Template Parameters

Following section gives usage examples and explains some other interface level details for use in C++ based HLS design. To use the 2-D SSR FFT L1 library:

  1. Include the vt_fft.hpp header:
#include "vt_fft.hpp"
  1. Use namespace xf::dsp::fft
using namespace xf::dsp::fft;
  1. Define two C++ structure that extends ssr_fft_default_params, one for row and one for column processors:
struct params_row:ssr_fft_default_params
{
             static const int N = 16;
             static const int R = 4;
             static const scaling_mode_enum scaling_mode = SSR_FFT_NO_SCALING;
             static const fft_output_order_enum output_data_order = SSR_FFT_NATURAL;
             static const int twiddle_table_word_length = 18;
             static const int twiddle_table_integer_part_length = 1;
             static const transform_direction_enum transform_direction = FORWARD_TRANSFORM;
             static const butterfly_rnd_mode_enum butterfly_rnd_mode = TRN;
};

struct params_column:ssr_fft_default_params
{
             static const int N = 16;
             static const int R = 4;
             static const scaling_mode_enum scaling_mode = SSR_FFT_NO_SCALING;
             static const fft_output_order_enum output_data_order = SSR_FFT_NATURAL;
             static const int twiddle_table_word_length = 18;
             static const int twiddle_table_integer_part_length = 2;
             static const transform_direction_enum transform_direction = FORWARD_TRANSFORM;
             static const butterfly_rnd_mode_enum butterfly_rnd_mode = TRN;
};
  1. Call 2-D FFT L1 module as follows:
fft2d<
      8,
      16,
      16,
      2,
      params_row,
      params_col,
      0,
      3,
      std::complex<ap_fixed<...>>
     >(p_inStream, p_outStream);