Forum Discussion

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

Problem while launching ModelSim simulation from Quartus

Hello,

I'm newbie in Quartus and am starting to learn Quartus design flow.

Certain documents I've found on the web, mention that one can run ModelSim simulation from Quartus.

Unfortunately it didn't work properly.

Here is my setup:

  • Parent module: module_parent.vhd

  • Child module: module_child.vhd

  • Testbench: tb.vhd (not included in the design, but specified in Settings/EDA Tool Settings/Simulation/Compile Test Bench)

When I launch ModelSim, only parent module (module_parent) appears in the work library, not module_child, neither tb.

Here is fragment of the Transcript window of ModelSim:

Error (suppressible): {path_to_module_parent(line_number_where_module_child_is_instantiated)} : (vcom-1195) Cannot find expanded name : "work.module_child"

Error: {path_to_module_parent(line_number_where_module_child_is_instantiated)} : Unknown expanded name.

Thanks in advance.

Pavel

8 Replies

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

    You may find it easier just to drive modelsim yourself:

    from the modelsim transcript window:

    
    cd <your_working_folder>
    vlib work
    vcom module_child.vhd
    vcom module_parent.vhd
    vcom tb.tv
    vsim tb
    run 10 us 
    restart -f
    
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks,

    It works. But is it the only way to launch ModelSim simulation from Quartus ?

    Is it possible to create some scenario to accelerate the things ?

    Another curious detail: after simulation launched, I didn't see signals mapped to outputs ... quite strange.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I've found found the reason why output-mapped signals aren't shown - when I uncheck "Enable Optimisation" in ModelSim simulation setup, it becomes Ok.

    Try to find corresponding option for vsim ... there's too many of them.

    There is -vopt that enable optimization, but I didn't find any option to disable it.

    Can it be disabled only via ModelSim simulation options ?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Is it possible to create some scenario to accelerate the things ?

    --- Quote End ---

    Yes, you can put all your commands in a do script

    type:

    do my_script.do

    at the prompt
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Yes, you can put all your commands in a do script

    type:

    do my_script.do

    at the prompt

    --- Quote End ---

    It works once ModelSim running ?

    Is it possible to automatize things Quartus side, i.e. click on "RTL Simulation" which would result ... ModelSim launches, compile all 3 entities and starts simulation ?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I've recreated project and now it's Ok, i.e. I can launch ModelSim directly from Quartus and ModelSim correctly compiles both entities and runs simulation.

    Probably there was something wrong with my previous setup.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    you can add a do script in the simulation settings somewhere in (i think it is) project->assignments and settings.