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

## FFT_testbench_matlab_model Honored Contributor II
1,349 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
3 Replies Honored Contributor II
107 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. Honored Contributor II
107 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 Honored Contributor II
107 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?
{"ft_lang_label":"__label__en","ft_lang_prob":0.8699671,"math_prob":0.5758876,"size":3048,"snap":"2022-40-2023-06","text_gpt3_token_len":809,"char_repetition_ratio":0.12122208,"word_repetition_ratio":0.33205375,"special_character_ratio":0.27132547,"punctuation_ratio":0.103690684,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99099654,"pos_list":[0,1,2,3,4,5,6,7,8,9,10],"im_url_duplicate_count":[null,null,null,null,null,null,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-02-02T13:00:19Z\",\"WARC-Record-ID\":\"<urn:uuid:74b024a4-435a-4f7e-a629-fcbf82cd6064>\",\"Content-Length\":\"212474\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:cc7feb73-4d98-4c77-aca9-4bcbcb58d9a4>\",\"WARC-Concurrent-To\":\"<urn:uuid:6df61f2e-91f3-4f56-9e41-d5a06d134f5d>\",\"WARC-IP-Address\":\"18.67.76.66\",\"WARC-Target-URI\":\"https://community.intel.com/t5/FPGA-Intellectual-Property/FFT-testbench-matlab-model/td-p/184196\",\"WARC-Payload-Digest\":\"sha1:7BOZI3UIWQPF6D2TXLVGPOYQLXE7ZZAG\",\"WARC-Block-Digest\":\"sha1:VJCL2AQFCF6GNEAPJLRATOLOPO4UKIKH\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-06/CC-MAIN-2023-06_segments_1674764500017.27_warc_CC-MAIN-20230202101933-20230202131933-00178.warc.gz\"}"}