FFT IP MATLAB C-model seems not bit true
We included the Intel FFT IP (altera_fft_ii) in our Arria 10 and ran into the following 2 issues.
- The first issue (bug?) is related to the data representation. The core is configured with “Single Floating Point” data representation.
In our design process, we are using the generated Matlab model to verify the outcome of the HDL simulation.
There seems to be a bug in the Matlab files of the Generated Example Design.
Inside the generated Matlab function fft_ii_o_example_design_model (in fft_ii_0_example_design_model.m) the REPRESENTATION parameter is defined and set to 0.
The value of 0 complies to fixed-point data representation and is therefore incorrect!
After having changed the value manually in 1, the matlab outcome of the FFT is “almost” identical to the HDL simulation outcome.
This brings me to the second issue…
2. Matlab FFT outcome unequal to HDL simulation outcome
We noticed that in our design the Matlab FFT outcome of the FFT was not equal to the HDL simulation outcome of the FFT. I was expecting that the Matlab model would be bit-accurate with the HDL model. Is this assumption correct?
To further investigate the issue, I simulated the HDL testbench of the Generated Example Design and compared the outcome with the outcome of the Matlab testbench. The results are not exactly identical!!!
Outcome Matlab testbench:
.\Matlab_model\fft_ii_0_example_design_real_output_c_model.txt
.\Matlab_model\fft_ii_0_example_design_imag_output_c_model.txt
Outcome HDL testbench:
.\sim\tb\fft_ii_0_example_design_real_output.txt
.\sim\tb\fft_ii_0_example_design_imag_output.txt
Instructions for reproducing the files:
- ModelSim:
- Go to the Project Directory: ./sim/tb
- In transcript window type:
source mentor.do
2. Matlab:
- Navigate to the directory: .\Matlab_model\
- Run: fft_ii_0_example_design_tb.m