Why is my FFT HDL Optimized block running slower in FIL than Simulink?
1 view (last 30 days)
Adil Zafar on 17 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.