Forum Discussion
7 Replies
- Altera_Forum
Honored Contributor
the data will come out as a single stream. the order will depend on which mode the core is in
so to "see" individual frequency bins you'll need a counter and maybe a LUT (if you use bit-reversed addressing, for example) - Altera_Forum
Honored Contributor
so the frequency components are given serially? I've been researching a lot but I still don't understand how the output is structured. Maybe I should look at it mathematically rather then conceptually.(uh oh) I rather like what you said about using a counter to see the individual bins, but I'm afraid I don't see how this can be done. Can anyone suggest any paper or some kind of document which would provide some insight? THANKS
- Altera_Forum
Honored Contributor
the input and output to the FFT core are basically in the same format:
you feed time domain samples sequentially into the streaming input you receive frequency domain samples sequentially at the output you should start with the FFT core in natural input order and natural output order mode. this uses more resources and has more latency, but its easier to work with. use the end of packet and output valid signals to reset a counter, increment the counter when the output valid signal is high. now you have a running number of the frequency bin. the bins will go in the order of a non-shifted FFT: 0 to N/2-1 then -N/2 to -1 (i think) - Altera_Forum
Honored Contributor
--- Quote Start --- the bins will go in the order of a non-shifted FFT: 0 to N/2-1 then -N/2 to -1 (i think) --- Quote End --- samples 0 ~ N/2-1 represent frequency range 0 ~ Fs/2 (0 ~ +.5) samples N/2 ~ N-1 represent frequency range -Fs/2 ~ 0 (-.5 ~ 0) if you put last half of vector to precede first half (fftshift) then: samples 0 ~ N/2-1 => frequency range -Fs/2 ~ 0 samples N/2 ~ N-1 => frequency range 0 ~ Fs/2 i.e. dc centred. each sample can be thought of as brick walled frequency band(bin) with own centre. thus the exact bin centres fall half band from each end of sides. thus frequencies occur at points separated equally as follows: f=linspace(0,1-1/N,N) *Fs and the resolution = Fs/N Hz representing bin width. - Altera_Forum
Honored Contributor
Ooh.
Thanks guys that's great, makes things much clearer - Altera_Forum
Honored Contributor
thanks for the clarification, kaz. i wasn't 100% sure that the negative frequency bins were descending before the FFT shift. my thought of looking at the bins along the unit circle was correct
- Altera_Forum
Honored Contributor
Hi guys, I would like to know how i can set my signal (sinusoidal Fo=64Khz, Sample=CLK 50Mhz, Points=512) to the FFT megacore. What inputs should i connect to my signal source to obtain the frecuecy response in the output?
I will really appreciate your help. Thanks.