The static parameters of the FFT define how the FFT is configured and
specifies the fixed parameters such as the size of the FFT, whether the size can be
changed dynamically, whether the implementation is pipelined or radix_4_burst_io
.
The hls_fft.h header file defines
a struct hls::ip_fft::params_t
which can be used to
set default values for the static parameters. If the default values are to be used,
the parameterization struct can be used directly with the FFT function.
hls::fft<hls::ip_fft::params_t >
(xn1, xk1, &fft_status1, &fft_config1);
A more typical use is to change some of the parameters to non-default values. This is performed by creating a new user-defined parameterization struct based on the default parameterization struct and changing some of the default values.
In the following example, a new user struct my_fft_config
is defined with a new value for the output ordering
(changed to natural_order
). All other static
parameters to the FFT use the default values.
struct my_fft_config : hls::ip_fft::params_t {
static const unsigned ordering_opt = hls::ip_fft::natural_order;
};
hls::fft<my_fft_config >
(xn1, xk1, &fft_status1, &fft_config1);
The parameters used for the FFT struct hls::ip_fft::params_t
are explained below. The default values for the
parameters and a list of possible values are provided.
Parameter | Description | C Type | Default Value | Valid Values |
---|---|---|---|---|
input_width | Data input port width. | unsigned | 16 | 8-34 |
output_width | Data output port width. | unsigned | 16 | input_width to (input_width + max_nfft + 1) |
status_width | Output status port width. | unsigned | 8 | Depends on FFT configuration |
config_width | Input configuration port width. | unsigned | 16 | Depends on FFT configuration |
max_nfft | The size of the FFT data set is specified as 1 << max_nfft. | unsigned | 10 | 3-16 |
has_nfft | Determines if the size of the FFT can be runtime configurable. | bool | false | True, False |
channels | Number of channels. | unsigned | 1 | 1-12 |
arch_opt | The implementation architecture. | unsigned | pipelined_streaming_io | automatically_select pipelined_streaming_io radix_4_burst_io radix_2_burst_io radix_2_lite_burst_io |
phase_factor_width | Configure the internal phase factor precision. | unsigned | 16 | 8-34 |
ordering_opt | The output ordering mode. | unsigned | bit_reversed_order | bit_reversed_order natural_order |
ovflo | Enable overflow mode. | bool | true | true false |
scaling_opt | Define the scaling options. | unsigned | scaled | scaled unscaled block_floating_point |
rounding_opt | Define the rounding modes. | unsigned | truncation | truncation convergent_rounding |
mem_data | Specify using block or distributed RAM for data memory. | unsigned | block_ram | block_ram distributed_ram |
mem_phase_factors | Specify using block or distributed RAM for phase factors memory. | unsigned | block_ram | block_ram distributed_ram |
mem_reorder | Specify using block or distributed RAM for output reorder memory. | unsigned | block_ram | block_ram distributed_ram |
stages_block_ram | Defines the number of block RAM stages used in the implementation. | unsigned | (max_nfft < 10) ? 0 : (max_nfft - 9) | 0-11 |
mem_hybrid | When block RAMs are specified for data, phase factor, or reorder buffer, mem_hybrid specifies where or not to use a hybrid of block and distributed RAMs to reduce block RAM count in certain configurations. | bool | false | true false |
complex_mult_type | Defines the types of multiplier to use for complex multiplications. | unsigned | use_mults_resources | use_luts use_mults_resources use_mults_performance |
butterfly_type | Defines the implementation used for the FFT butterfly. | unsigned | use_luts | use_luts use_xtremedsp_slices |
butterfly_type
in the following table are use_luts
and use_xtremedsp_slices
.
The values used in the C program should be butterfly_type =
hls::ip_fft::use_luts
and butterfly_type =
hls::ip_fft::use_xtremedsp_slices
.