Forum Discussion
Altera_Forum
Honored Contributor
14 years agoFFT Megafunction problem - strange spikes
Hi, I use FFT IP Core (Quartus 9.1 SP2 / Quartus 11.1 SP2). I send sine-signal to sink pins and get fft-signal from source pins of core. Then I plot ABS, real and imag of my fft-signal in Matlab. ...
Altera_Forum
Honored Contributor
13 years agoI haven't looked at all your results but this last one indicate your fft is badly different from Matlab.
Anyway at this point I can only advise on how to compare to Matlab fft: x = round(2048*sin(2*pi*(0:2047)/2048)); %full sine, zero phase y = round(fft(x)); plot(real(y)); plot(imag(y)); Your fpga output should be comparable to y assuming fpga uses rounding as opposed to direct truncation. Moreover there might be issue of scaling differences between fpga fft core and matlab(you should have noticed that if any). Notice that the term(0:2047) determine phase and have big effect on result, try (1:2048) and all changes. So I come to believe you might have something wrong with your fft control logic apart from the minor rounding issue.