Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

The problem about FFT simulation

I want to use MATLAB to simulate the FFT function designed by Altera. I run the Matlab testbench generated by Quartus, but there is always the error

Undefined function or method 'Sfftmodel' for input arguments of type 'double'.

Error in ==> fft256_model at 41

[roc,ioc,eoc] = Sfftmodel(rin,iin,N,THROUGHPUT,ARCH,DATA_PREC,TWIDDLE_PREC,INVERSE);

Dose anyone could help me solve this problem?

Thanks

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I have solved the problem. The Quartus only creates the 32bit function, so we must use the 32bit matlab.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    you might file an enhancement request with Altera on that. DSP Builder finally supports 64-bit MATLAB, it would be nice if the MegaCore simulation models did too

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    you might file an enhancement request with Altera on that. DSP Builder finally supports 64-bit MATLAB, it would be nice if the MegaCore simulation models did too

    --- Quote End ---

    March 5th 2013 and the problem is still unsolved?!?!?!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    I want to use MATLAB to simulate the FFT function designed by Altera. I run the Matlab testbench generated by Quartus, but there is always the error

    Undefined function or method 'Sfftmodel' for input arguments of type 'double'.

    Error in ==> fft256_model at 41

    [roc,ioc,eoc] = Sfftmodel(rin,iin,N,THROUGHPUT,ARCH,DATA_PREC,TWIDDLE_PREC,INVERSE);

    Dose anyone could help me solve this problem?

    Thanks

    --- Quote End ---

    I got the sfftmodel.mexw32 file from altera's website, and simply changed the extention to .dll. My computer is of 32 bits, but I keep getting the error message: tsfftmodel.dll can't be loaded correctly. Could somebody tell me how to fix the problem? Besides, I simply put this sfftmodel.dll file in the same folder along with all the other files such as fft_32k_tb.m and fft_small_tb.m.

    Also, is there a way to change this sfftmodel.mexw32 (or sfftmodel.dll) into sfftmodel.m file?

    Thanks in advance.