Forum Discussion

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

FFT MegaCore Function simulation in Modelsim never finished

Hi, everyone!

I'd like to ask those who deals with FFT MegaCore Function.

My problem:

I can't get generated FFT MegaCore Function simulation finished in Modelsim.

I create a project in ModelSim, then append files fft_bb.v, fft.vo, fft.v, fft_tb.v (that have been generated by wizard) into it. Compilation process is OK, so I start simulation, append all signals from fft_tb instanse to Wave window. Then I make 'Run -all' command and wait for result. However, in spite of there is a $finish task in the testbench, simulation never stops. If I make forced stop of simulation, I see signals source_valid, source_real, source_imag being in a HiZ state all the way. This repeats regardless type of FFT (streaming, variable straming, so on) or number of points (64, 128, ... 4096,... etc). Of cource, there are no output text files with FFT results.

CAD Quartus II 64-bit Web Edition 13.0

ModelSim ALTERA STARTER EDITION 10.1d

FPGA Altera Cyclone IV E (EP4CE40F23)

So, can anyone help how to test FFT function?

Thanks

13 Replies

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

    Yes, you can ask Altera directly.

    You can post the solution once you have it, in case some people have the same problem in the future.

    Good luck.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi, everyone!

    I contacted Altera about this problem and got quick reply.

    To successfully compile and simulate Verilog version of FFT megafunction in ModelSim:

    1. Create project in ModelSim, append fft.vo and fft_tb.v files into it;

    2. Execute following lines in transcript window (or put these to .do file):

    vlib work

    vmap work work

    vlog -reportprogress 300 -work work fft.vo

    vlog -reportprogress 300 -work work fft_tb.v

    vlog -reportprogress 300 -work work c:/altera/13.0/quartus/eda/sim_lib/altera_lnsim.sv

    vlog -reportprogress 300 -work work c:/altera/13.0/quartus/eda/sim_lib/220model.v

    vlog -reportprogress 300 -work work c:/altera/13.0/quartus/eda/sim_lib/altera_mf.v

    vlog -reportprogress 300 -work work c:/altera/13.0/quartus/eda/sim_lib/sgate.v

    vsim fft_tb

    add wave sim:/fft_tb/*

    Of course, you may need to change file pathes.

    Good luck!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I tried what vadimula suggested. See imgur.com/XEF7nkT.

    https://www.alteraforum.com/forum/attachment.php?attachmentid=11316

    How do I verify whether the result was correct or not?

    --- Quote Start ---

    Hi, everyone!

    I contacted Altera about this problem and got quick reply.

    To successfully compile and simulate Verilog version of FFT megafunction in ModelSim:

    1. Create project in ModelSim, append fft.vo and fft_tb.v files into it;

    2. Execute following lines in transcript window (or put these to .do file):

    vlib work

    vmap work work

    vlog -reportprogress 300 -work work fft.vo

    vlog -reportprogress 300 -work work fft_tb.v

    vlog -reportprogress 300 -work work C:/Altera/13.0/quartus/eda/sim_lib/altera_lnsim.sv

    vlog -reportprogress 300 -work work C:/Altera/13.0/quartus/eda/sim_lib/220model.v

    vlog -reportprogress 300 -work work C:/Altera/13.0/quartus/eda/sim_lib/altera_mf.v

    vlog -reportprogress 300 -work work C:/Altera/13.0/quartus/eda/sim_lib/sgate.v

    vsim fft_tb

    add wave sim:/fft_tb/*

    Of course, you may need to change file pathes.

    Good luck!

    --- Quote End ---