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

IFFT odd behavior

Altera_Forum
Honored Contributor II
1,117 Views

I'm at the tail end of a design that uses 2D FFTs, does phase correlation calculation in frequency domain then does 2D Inverse FFT to get spatial shift between two images. 

 

I'm finding that the IFFT function using V9 FFT cores, gives a spike at location (0,0) in the final result as well as a spike at the correct location that corresponds to the shift between two images. The spike at location (0,0) is only present in the Matlab sims that use the core model that is generated by Quartus. The spike is not there in pure Matlab (FFTW algorithm for the FFTs) nor in Verilog simulations. 

 

Very odd. I've looked thru all the errata I can find on the fft cores but don't see mention of this. 

 

I would ignore this (and still may) but getting to the bottom of this would be helpful. 

 

Anybody do Inverse FFTs and ever see this behavior?
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
335 Views

sounds like a DC offset issue caused by fixed point truncation after the FFT but before the IFFT. going FFT => IFFT directly and see if there is a spike at the origin.

0 Kudos
Altera_Forum
Honored Contributor II
335 Views

the truncation could be from the first FFT itself.

0 Kudos
Altera_Forum
Honored Contributor II
335 Views

thepancake 

 

I did consider some type of dc offset going on. However, I don't see this zero position spike in the Verilog sim which is full of truncations. Actually, the Matlab core model sim is designed to truncate values exactly how/where I truncated the Verilog values so that I have exact match between the two. It just looks like a difference between the Verilog simulation model (.vo) and the Matlab core model. 

 

Will crawl thru the two sims again to look for any difference. 

 

I would just ignore it but a spike at the (0,0) point is valid for no shift between the two images which is a possibility. 

 

Thanks for your input.
0 Kudos
Altera_Forum
Honored Contributor II
335 Views

i misunderstood. so you are getting the bad behavior only from the Altera FFT MATLAB model, but not in the Verilog simulation model?

0 Kudos
Reply