UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor s.corda
Visitor
255 Views
Registered: ‎02-27-2019

HLS FFT Xilinx IP denormalized values if size less than 1024

Hi all,

I've tried the Xilinx FFT IP core on HLS using both fixed point and floating point.

I noticed that the fixed point implementation is working with normalized input in the range [-1,1).

Instead the floating point implementation is working with values greater than 1.

Since I need the floating point FFT, I was trying to simulate the C code for different FFT size. If the size is greater that 10^10=1024 the C simulation is working well (compared to Matlab).

The issue is when I want to use a size smaller that 1024 points. I got this error: 

WARNING:xfft_v9_1:simulate called with a denormalized real data value, this value will be set to zero 

As a consequence all the output values are set to nan.

I tried different range of values for the input array but it's still not working.

Do you know how to solve this issue?

 

Thanks!

0 Kudos
2 Replies
Moderator
Moderator
102 Views
Registered: ‎03-16-2017

Re: HLS FFT Xilinx IP denormalized values if size less than 1024

Hi @s.corda , 

I have filed CR (Change Request) on this issue with the development. They will make necessary changes in upcoming version of the tool to fix this issue.

Regards,
hemangd

Don't forget to give kudos and mark it as accepted solution if your issue gets resolved.
0 Kudos
Moderator
Moderator
79 Views
Registered: ‎03-16-2017

Re: HLS FFT Xilinx IP denormalized values if size less than 1024

Hi @s.corda , 

Make changes in header file as shown below to overcome this issue. 

 

#ifndef _H_FFT_TEST_H_

#define _H_FFT_TEST_H_

 

#include "hls_fft.h"

// configurable params

 

const char FFT_NFFT_MAX                        = 8;

const int  FFT_LENGTH                          = 1 << FFT_NFFT_MAX;

 

using namespace std;

 

struct config1 : hls::ip_fft::params_t {

    static const unsigned ordering_opt = hls::ip_fft::natural_order;

    static const unsigned input_width = 32;

    static const unsigned output_width = 32;

   static const unsigned phase_factor_width = 24;

 

 

       static const unsigned complex_mult_type = hls::ip_fft::use_mults_performance;

       static const unsigned butterfly_type = hls::ip_fft::use_xtremedsp_slices;

       static const unsigned max_nfft = FFT_NFFT_MAX;

 

};

 

typedef hls::ip_fft::config_t<config1> config_t;

typedef hls::ip_fft::status_t<config1> status_t;

 

 

#endif

 

Attached it here for your reference. 

Regards,
hemangd

Don't forget to give kudos and mark it as accepted solution if your issue gets resolved.
0 Kudos