FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
6355 Discussions

FFT_testbench_matlab_model

Altera_Forum
Honored Contributor II
1,480 Views

Hi ! 

 

I am using FFT 13.0 megacore function for the IFFT end FFT. The modelsim results and the matlab m file results obtained by the megawizard created are the same. 

However when I use the "ifft" function in matlab it differs. 

What is the "SVSfftmodel" that magacore matlab m file uses. Why doesnt it give the same result with the "ifft" command in MATLAB. 

 

Also I couldnt find SVSfftmodel in Matlab help window. 

 

How does that model works? 

 

Thanks
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
238 Views

SVSfftmodel is an encrypted file, this is not a clear text. In general, what you need to do is to compare the FFT matlab model and FFT RTL simulation result. You can just treat the FFT matlab model result as the golden result.

0 Kudos
Altera_Forum
Honored Contributor II
238 Views

 

--- Quote Start ---  

 

I am using FFT 13.0 megacore function for the IFFT end FFT. The modelsim results and the matlab m file results obtained by the megawizard created are the same. 

 

--- Quote End ---  

 

Because these two models are bit-accurate, i.e., the MATLAB model matches the calculations used by the HDL. 

 

 

--- Quote Start ---  

 

However when I use the "ifft" function in matlab it differs. 

 

--- Quote End ---  

 

That is to be expected, since the MATLAB fft/ifft routines use floating-point math and may have different scale factors. 

 

Here's a document showing how the Altera FFT matches the MATLAB fft within the quantization noise floor of the fixed-point data being transformed; 

 

https://www.ovro.caltech.edu/~dwh/correlator/pdf/fft_tutorial.pdf 

 

This document has some slides with hardware FFTs (pages 50-54)  

 

https://www.ovro.caltech.edu/~dwh/correlator/pdf/hawkins_jpl_2014.pdf 

 

and this has more (page 85-99) 

 

https://www.ovro.caltech.edu/~dwh/correlator/pdf/ee_live_14_hawkins.pdf 

 

The Altera FFT is a streaming FFT. You can download the He and Torkelson paper referenced in the User Guide and it explains the operation. 

 

 

--- Quote Start ---  

 

What is the "SVSfftmodel" that magacore matlab m file uses. 

 

--- Quote End ---  

 

The bit-accurate model that implements the Altera FFT. 

 

 

--- Quote Start ---  

 

How does that model works? 

 

--- Quote End ---  

 

That is part of Altera's "secret", but if you read the tutorial linked above, you'll see pretty much how it probably works. 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
238 Views

How do you compare the iFFT result with Matlab? Is that you prefer FFT-> iFFT? if this is the case, what is the I/O order?

0 Kudos
Reply