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

FFT Megacore Frequency Scaling

Altera_Forum
Honored Contributor II
994 Views

I have perused the forums with this same question and only found one from two years ago with incomplete data. More specifically I am working on a design with 16 bit accuracy using the FFT Megacore function on the Cyclone V. All of that is working just fine, with it outputting an FFT of length 256 points (because that is what I currently have it specified to). I am a bit confused on how to calculate the scaling for the frequency however. It's obvious that the output is that of the magnitude of the real and imaginary parts which makes sense. I've been reading the manual only confusing myself further. How do I determine the frequency scaling (the x values on a graph)?

0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
316 Views

 

--- Quote Start ---  

I have perused the forums with this same question and only found one from two years ago with incomplete data. More specifically I am working on a design with 16 bit accuracy using the FFT Megacore function on the Cyclone V. All of that is working just fine, with it outputting an FFT of length 256 points (because that is what I currently have it specified to). I am a bit confused on how to calculate the scaling for the frequency however. It's obvious that the output is that of the magnitude of the real and imaginary parts which makes sense. I've been reading the manual only confusing myself further. How do I determine the frequency scaling (the x values on a graph)? 

--- Quote End ---  

 

 

fft bin width = Fs(sampling frequency)/N(fft resolution), so 

 

at any bin centre: f = bin index* fs/256 assuming index starts from 0(0 ~ 255 in your case) , e.g. 

at bin 0, f= 0 

at bin 128, f = 128 * Fs/256 = 0.5Fs 

 

bins 129 ~ 255 wrap up as negative frequencies e.g. 

at bin 255, f = 255 * Fs/256 = 0.996 Fs and wraps to => 0.996 Fs - Fs
0 Kudos
Altera_Forum
Honored Contributor II
316 Views

I know you responded a long time ago and I've been meaning to thank you! You did a great job explaining it, and it makes sense. Thank you!

0 Kudos
Reply