cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Explorer
Explorer
932 Views
Registered: ‎09-05-2015

FFT/IFFT IP data loss(scaling issue I think)

Jump to solution

Hi, I am new to Vivado FFT IP and tried to test FFT/IFFT.

I first send data 1~127(with imaginary part equals zero) to FFT and FFT's output is sent to IFFT's input. If IFFT's output is 1~127, I think FFT/IFFT is working as expected.

The setting is like below. Transform Length is 8, the architecture choice is "Pipelined, Streaming I/O." Input data width and phase factor width is 16 bit. The ordering is natural ordering.

 

 

fft_0.PNG

 

fft_1.PNG

 

fft_2.PNG

 

Like I said, I send data 1~127 to FFT IP as below.

result_0.PNG

 

I divide the output by 8, and the divided result is 1,1,3,3,5,6,7,8 for the first frame as shown below.

result_1.PNG

 

I think the problem is from the fact that I set the scaling schedule as 0000 for both FFT and IFFT like below.

fft_wrapper fft(.aclk_0(aclk), // input
.aresetn_0(aresetn), // input
.event_data_in_channel_halt_0(), // output
.event_data_out_channel_halt_0(), // output
.event_frame_started_0(fft_event_frame_started_0), // output
.event_status_channel_halt_0(), // output
.event_tlast_missing_0(), // output
.event_tlast_unexpected_0(), // output

.m_axis_data_tdata_0(fft_m_axis_data_tdata_0), // output
.m_axis_data_tlast_0(fft_m_axis_data_tlast_0), // output
.m_axis_data_tready_0(fft_m_axis_data_tready_0), // input
.m_axis_data_tvalid_0(fft_m_axis_data_tvalid_0), // output

.s_axis_config_tdata_0(8'b0000_0001), // input, forward fft
.s_axis_config_tready_0(fft_s_axis_config_tready_0), // output
.s_axis_config_tvalid_0(fft_s_axis_config_tvalid_0), // input

.s_axis_data_tdata_0(fft_s_axis_data_tdata_0), // input
.s_axis_data_tlast_0(fft_s_axis_data_tlast_0), // input
.s_axis_data_tready_0(fft_s_axis_data_tready_0), // output
.s_axis_data_tvalid_0(fft_s_axis_data_tvalid_0)); // input


ifft_wrapper ifft(.aclk_0(aclk), // input
.aresetn_0(aresetn), // input
.event_data_in_channel_halt_0(), // output
.event_data_out_channel_halt_0(), // output
.event_frame_started_0(ifft_event_frame_started_0), // output
.event_status_channel_halt_0(), // output
.event_tlast_missing_0(), // output
.event_tlast_unexpected_0(), // output

.m_axis_data_tdata_0(ifft_m_axis_data_tdata_0), // output
.m_axis_data_tlast_0(ifft_m_axis_data_tlast_0), // output
.m_axis_data_tready_0(ifft_m_axis_data_tready_0), // input, always reday
.m_axis_data_tvalid_0(ifft_m_axis_data_tvalid_0), // output

.s_axis_config_tdata_0(8'b0000_0000), // input, inverse fft
.s_axis_config_tready_0(ifft_s_axis_config_tready_0), // output
.s_axis_config_tvalid_0(ifft_s_axis_config_tvalid_0), // input

.s_axis_data_tdata_0(ifft_s_axis_data_tdata_0), // input
.s_axis_data_tlast_0(ifft_s_axis_data_tlast_0), // input
.s_axis_data_tready_0(ifft_s_axis_data_tready_0), // output
.s_axis_data_tvalid_0(ifft_s_axis_data_tvalid_0) // input
);

 

How can I avoid the data loss? I want the output of IFFT to be nice 1,2,3,4,5,6,7,8, so on.

 

Thanks in advance!

0 Kudos
Reply
1 Solution

Accepted Solutions
Contributor
Contributor
884 Views
Registered: ‎12-10-2018
Hello!
I have just a suggestion for you: because I have had same issue and I have wasted time in FFT/IFFT debugging. I suggest you not to ensure about your design with FFT IFFT chain.
You can get the output of FFT and compare it with MATLAB FFT output. You should pay attention to data format of it and convert the data correctly.
Then use this output data of FFT and maybe you need to truncate it in a way or something like this and then you send this new version of FFT outout to IFFT input.
Your problem is definitely here: The fixed point structure of FFT output is not the same as IFFT input. You can have more details about the way your IP-cores work in Implementation details tab of the IP-cores.

I hope this can help you!

Regards,
Herman

-------------------------------------------------------------------------------------------------------------------------------
Reply if you have any queries, give kudos and accept as solution
-------------------------------------------------------------------------------------------------------------------------------

View solution in original post

3 Replies
Contributor
Contributor
885 Views
Registered: ‎12-10-2018
Hello!
I have just a suggestion for you: because I have had same issue and I have wasted time in FFT/IFFT debugging. I suggest you not to ensure about your design with FFT IFFT chain.
You can get the output of FFT and compare it with MATLAB FFT output. You should pay attention to data format of it and convert the data correctly.
Then use this output data of FFT and maybe you need to truncate it in a way or something like this and then you send this new version of FFT outout to IFFT input.
Your problem is definitely here: The fixed point structure of FFT output is not the same as IFFT input. You can have more details about the way your IP-cores work in Implementation details tab of the IP-cores.

I hope this can help you!

Regards,
Herman

-------------------------------------------------------------------------------------------------------------------------------
Reply if you have any queries, give kudos and accept as solution
-------------------------------------------------------------------------------------------------------------------------------

View solution in original post

Contributor
Contributor
880 Views
Registered: ‎12-10-2018
And one more thing I forgot to mention is that with the experience I've had I suggest you to use the FFT IP-core in unscaled mode. Then you scale the FFT output in the way that fits your needs.
0 Kudos
Reply
Explorer
Explorer
824 Views
Registered: ‎09-05-2015

Thanks @hermanfisher1994 

For those who are interested, I switched to floating point(following IEEE-754 standard), and the data loss is minimal.