How to implement a real-time fft for FPGA with matlab or simulink ?

I already know that there is a FFT HDL Optimized Block in Simulink that can be used to generate HDL Code for later on FPGA implementation.
But does this block calculate the FFT real-time ? If not, how do i implement it ? and if yes, how do i configure its attributes (FFTLength, etc.) ?

 Accepted Answer

The HDL code from the FFT HDL Optimized does do processing in real-time with streaming samples. It also allows you to process multiple samples every clock to increase your throughput to Gigasamples per second. You can set the parameters on the mask of the block and the number of samples you feed in to the block decides how many samples it processes on the FPGA.

5 Comments

but what is the FFTLength of this real-time setting ? If i get the one point at a time the vector size increases one row per sample how can i determine the FFTLength ?
And why do i get different outputs when i change the FFTLength (inrease or decrease) ?
The FFT Length is what you set on the mask of the block. You simply send in samples and the FFT will compute it for the length you have indicated on the mask.
If you are looking for a real-time variable sized FFT, you can look at this example.
for example i set the FFTLength to 8,but the "sampling-vector" has more than 8 Elements . Does this mean that the FFT Block will only take 8 values (samples) and thats it or does it mean that it will take 8 values, calulate the fft ,and then take the next 8 values ?
For an FFT length of 8, the blocks will take elements in 1,2,4, or 8 at a time (you decided this in your model), and then give you the FFT output for every 8-samples of input. After the 8th sample, you go to sample 1 of the next frame and so on. Turn on start and end of frame signals on the output to see the behavior.
Thank you so much for your answer :-)!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!