Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20707 Discussions

Basic FFT megacore output question

Altera_Forum
Honored Contributor II
1,137 Views

When scaled, the output of the FFT megacore will contain the frequency components of its input? I would like to use each of the frequency components individually, this is possible? I would expect it to be. 

Thanks for any responses
0 Kudos
7 Replies
Altera_Forum
Honored Contributor II
296 Views

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)
0 Kudos
Altera_Forum
Honored Contributor II
296 Views

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

0 Kudos
Altera_Forum
Honored Contributor II
296 Views

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)
0 Kudos
Altera_Forum
Honored Contributor II
296 Views

 

--- 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.
0 Kudos
Altera_Forum
Honored Contributor II
296 Views

Ooh.  

Thanks guys that's great, makes things much clearer
0 Kudos
Altera_Forum
Honored Contributor II
296 Views

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

0 Kudos
Altera_Forum
Honored Contributor II
296 Views

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.
0 Kudos
Reply