- provide some assurance that the result from the FFT core match well with Matlab fft() function and FFT bit accurate C model
- provide a starting point so you can look at configurations as well as timing of control and data signals of the core in case you didn't have time to read the FFT core data sheet
The waveform below is at the end of FFT computation and data start to unload. Note that xk_index is incrementing as the core output is in natural order.
The simulation results are collected in workspace. A m script is then run to compare the results from Matlab fft(), FFT bit accurate C model, and the Simulink simulation. Below is an overlay plot showing all three outputs, where the difference is negligible.
The script also prints all elements of outputs side by side for easy comparison.
idx Matlab Bit Accurate SysGen
0 1.000000 1.000000 1.000000
1 81.489376 81.489504 81.489595
2 40.747756 40.747746 40.747868
3 27.168581 27.168709 27.168739
4 20.380016 20.380048 20.380078
5 16.307697 16.307667 16.307587
251 16.307697 16.307667 16.307545
252 20.380016 20.380048 20.380017
253 27.168581 27.168709 27.168495
254 40.747756 40.747746 40.747960
255 81.489376 81.489504 81.489687
In case you want to play with the example design, you can download it from here. You will need to download the bit accurate C model from FFT core web site yourself because it requires registration.