Forum Discussion
Altera_Forum
Honored Contributor
17 years agoHelp with altera FFT
hello; what i want to do is to get spectrum of an sinusoidal signal using the altera fft core i have generated a v8 fft with the following setting: fft point : 64 (to start with) archi...
Altera_Forum
Honored Contributor
17 years agoThis matlab code models your work.
amplitude variation from block to block is no more than 1% and depends slightly on frequency value.The line wouldn't be absolute line at the bottom due to quantisation and fft resolution so expect some widening at base but any extra spikes means a bug.
% sine function models analogue input
% samples taken regularly into digital domain(ADC)
% freq = 1 KHz if Fs = 8KHz
x = sin(2*pi**1/8);
%quantise for 16 bit hardware
x = round(x * (2^15-1));
% 256 points fft
% random blocks from above stream
r =round(rand(1,1)*5000);
y = fft(x(r:r+255));
y = round(y/2^7);
plot(abs(y))