FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
6343 Discussions

FFT+IFFT WRONG ANSWER

志姜000
Beginner
1,086 Views

Dear Intel Community,

I'm working with the FFT IP core provided by the Intel in Quartus.I want to use the same module to implement FFT and IFFT.For example,

FFT IP CORE SETTING:

Device:Cyclone IV E

Length:64

Data Flow:Variable Streaming

Data Representation: Floating Point

Direction:Bi-directional

First, I first sent the tested data into the FFT module, where the inverse signal was at a low level. Then, after FFT operation, I sent the output data into the module as the input data of IFFT, and changed the inverse signal into a high level.But the timing of the output is not consistent with my expectations.

Can you help me what are the other things i should see to find out this problem?

Thanks for reading.

0 Kudos
11 Replies
CheePin_C_Intel
Employee
998 Views

Hi,

 

As I understand it, you observe some issue with the FFT to iFFT interface. Just would like to check with you on the following:

 

  1. Would you mind to further elaborate on the timing not meeting your expectation observation? Some screenshot of docx would be helpful.
  2. Are you observing this in Modelsim simulation or hardware?
  3. If it is hardware, it is recommended for your to create simple test design and simulate with Modelsim to isolate potential functional issue prior to hardware testing.
  4. What is the Quartus version that you are using?
  5. Have you tested with other data format ie try start with fixed point

 

Please let me know if there is any concern. Thank you.

0 Kudos
志姜000
Beginner
998 Views

Quartus version:Quartus 13.1

I have done the simulation with the Modelsim , and the test results are as follows

1589180276.png

 

0 Kudos
CheePin_C_Intel
Employee
998 Views

Hi,

 

For your information, as I search through the web, I found a design in Design Store which might be helpful for your reference:

 

https://fpgacloud.intel.com/devstore/platform/17.1.0/Pro/cyclone-10-gx-fft-to-ifft-with-natural-input-and-output-order-using-cosine-data-example-design-171/

0 Kudos
CheePin_C_Intel
Employee
998 Views

Hi,

 

Thanks for the update. Would you mind to further elaborate on your simulation waveform? I observe from the waveform that the inverse seems to be toggling half way when the input data is still streaming into the FFT. Not sure if this is something expected? 

 

Just wonder if you have had a chance to look into the example design which I share previously?

 

To facilitate your debugging, it would be great if you could create simple test design with test data (ie sine wave) -> FFT -> iFFT -> output data (sine wave with reduce magnitude) in your simulation. With this, you could cross check again the output data of iFFT to see if it is still following the same shape of the input data with reduced magnitude.

 

Please let me know if there is any concern. Thank you.

 

Best regards,

Chee Pin

0 Kudos
志姜000
Beginner
998 Views

Thank you for your reply.

My idea is whether it is possible to use only one module to realize FFT and IFFT operations, so I only use one IP core to do the following test,

According to FFT data manual, FFT operation is performed on 64-point sinusoidal data, and the inverse is equal to 0;Then wait for FFT to output the data, and send the output data source_real and source_imag into the same module for IFFT operation, at which time inverse=1.But the source_valid timing, source_real and source_imag seem to be wrong.

What is the reason for this problem? Thank you in advance for your help

B.png

0 Kudos
CheePin_C_Intel
Employee
998 Views
Hi, Thanks for your update For your information, I have not really testing using single module to perform FFT and iFFT. As I understand it, generally we will feed a complete data stream into the FFT which start with SOP and end with EOP for the FFT to operate correctly. Probably you can try to feed complete data stream, then store the complete FFT output. Then switch to iFFT, feed the complete FFT output to iFFT to see if it works. Please let me know if there is any concern. Thank you. Best regards, Chee Pin
0 Kudos
志姜000
Beginner
998 Views

As you said, it will work just fine.However, because my design needs too many resources to use two modules to implement FFT and IFFT, I consider using a single module to implement FFT and IFFT.Using a single module to implement FFT and IFFT is, in my opinion, the same as the continuous input data into the FFT module, only the inverse signal changes.I think the output sequence is as follows,

Is that not a viable idea?Thank you.

C.png

0 Kudos
CheePin_C_Intel
Employee
998 Views
Hi, For your information, the figure 3-7 is showing that the FFT would only process data when valid = 1, it will pause and wait for subsequent frame to come in and will continue when valid = 1 again. It is still for the same data stream. So, you will need to complete a input with SOP and EOP before you switch to another mode. As for the inverse signal, for your information, it is only sample simultaneously with SOP assertion. In other words, after the FFT completed the processing of the 1st data stream and output completed, then you can switch to iFFT and input new set of data. Based on my understanding, the FFT simulation model the functional behavior. If you are seeing issue with a specific setup, generally you would observe similar behavior in hardware. Please let me know if there is any concern. Thank you. Best regards, Chee Pin
0 Kudos
志姜000
Beginner
998 Views

Thanks for your help, I have another question, change the inverse processing direction, which means after the FFT transformation, wait until all the data is out before you can change the inverse direction?My understanding should be that the next sink_sop assertion can be changed, if so, then my idea should be achievable;If I don't understand that, as you said, I need to wait for all the FFT data to be output before I can change the direction of the inverse, then I will do what you said.D.png

0 Kudos
CheePin_C_Intel
Employee
998 Views
Hi, Since you are switching the FFT mode, my understanding is we should wait for the FFT to complete outputting the data before we switch to iFFT. This is to avoid corrupting the FFT operation half way. Can you try to see if it works this way in simulation? Please let me know if there is any concern. Thank you. Best regards, Chee Pin
0 Kudos
志姜000
Beginner
998 Views

Thank you. I'm trying to do that.

Thanks again for your help.

0 Kudos
Reply