- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
the truncation could be from the first FFT itself.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i misunderstood. so you are getting the bad behavior only from the Altera FFT MATLAB model, but not in the Verilog simulation model?
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page