Why is my FFT HDL Optimized block running slower in FIL than Simulink?
3 views (last 30 days)
Show older comments
Adil Zafar on 17 Feb 2022
Edited: Bharath Venkataraman on 24 Feb 2022
I am trying to run a FFT model on a Basys3 FPGA board using HDL Coder from Matlab. I am using the FPGA-in-the-loop application to send data to FPGA board, which is programmed with a FFT, through JTAG. The implementation is working accurately, but the execution time is much more than running the same FFT model in Simulink directly. I am using Simulink Profiler to find the simulation time.
Bharath Venkataraman on 22 Feb 2022
This slowdown is due to the time it takes to send the data over from Simulink to the FPGA and back.
You can use an Ethernet cable to speed up the conenction.
Another option is to feed and receive multiple samples at a time as shown in this example. So for an FFT size of 256, you can send in the 4 values (as you do currently), but 64 samples in at a time. The valid input signal will also need to be 64x1. In turn, you will get 64 output values for each call.
The simplest way to do this is by use of a Buffer block before each input. In this case, you may be able to modify your source to do this as well.
More Answers (0)
Find more on FPGA-in-the-Loop in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!