Forum Discussion

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

Modelsim can not find "altsyncram"

Dear all, I am using Modelsim for simulation,

Modelsim says" Instantiation of 'altsyncram' failed, the design unit was not found", even though 'altsyncram' is in "Altera_mf" library, listed on the "library Panel".

What should I do?

Thank you very much!

Other errors: "Instantiation of 'oper_selector' failed, the design unit was not found", there is a .ocp file in altmemphy-library, what does it do? should it be included in Modelsim?

7 Replies

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

    --- Quote Start ---

    Could you tell me how to include? how to check?

    --- Quote End ---

    --- Quote Start ---

    I also met this problem. Have you fixed it? and How do you solve this problem?

    --- Quote End ---

    To resolve this problem you need to specify the right libraries when you are trying to simulate in ModelSim.

    The breif steps are

    1. Compile the testbench code <testbench.v> , it gets included in your 'work' library.

    2. Select 'Simulate' -> 'Start Simulation' from the menu.

    3. Click on the 'Libraries' tab in the new popup window and press 'Add' to include the 'altera_mf_ver' library (if you are working with Verilog) to the 'Search Libraries First (-Lf)'

    4. Finally, select your testbench from the 'Design' tab.

    The design should simulate now.

    I have included some screenshots for assistance.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Dear all, I am using Modelsim for simulation,

    Modelsim says" Instantiation of 'altsyncram' failed, the design unit was not found", even though 'altsyncram' is in "Altera_mf" library, listed on the "library Panel".

    What should I do?

    Thank you very much!

    Other errors: "Instantiation of 'oper_selector' failed, the design unit was not found", there is a .ocp file in altmemphy-library, what does it do? should it be included in Modelsim?

    --- Quote End ---

    Hi,

    did you include the library in your simulation ? Seeing the library in the library panel does not mean that they are included.

    Kind regards

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

    Could you tell me how to include? how to check?

    Thank you very much!

    --- Quote Start ---

    Hi,

    did you include the library in your simulation ? Seeing the library in the library panel does not mean that they are included.

    Kind regards

    GPK

    --- Quote End ---

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

    # get a proper makefile

    exec vmake work > Makefile

    # Run it to compile what needs to be compiled

    make

    # Start simulation

    vsim -L altera_mf_ver -L lpm_ver -L cycloneiii_ver -L cycloneii_ver work.dut_tb

    After those you can simply do:

    make; restart -f; run -all
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Dear all, I am using Modelsim for simulation,

    Modelsim says" Instantiation of 'altsyncram' failed, the design unit was not found", even though 'altsyncram' is in "Altera_mf" library, listed on the "library Panel".

    What should I do?

    Thank you very much!

    Other errors: "Instantiation of 'oper_selector' failed, the design unit was not found", there is a .ocp file in altmemphy-library, what does it do? should it be included in Modelsim?

    --- Quote End ---

    Hello binpersonal,

    I also met this problem. Have you fixed it? and How do you solve this problem?

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

    I also met this problem.

    I am using modelsim in a Ubuntu 10.04 LTS Lucid Lynx.

    Also i am compiling verilog files (and simulating them) in command line.

    I fixed it using the following command (after all necessary compilations):

    vsim -c -t 1ns -quiet -L $(MEGAFUNCTIONS) work.RomTests -do "run 1000000 1ns; quit"

    where MEGAFUNCTIONS should be your path to "altera_mf", which includes all megafunctions from altera:

    [installation path]/altera10.0/modelsim_ae/altera/verilog/altera_mf
  • migry_tech's avatar
    migry_tech
    Icon for New Contributor rankNew Contributor

    Many thanks for the explanation listed as the 4 steps above. I am new to Modelsim-Altera and this solved the problem. I am now simulating my memory successfully, however I got caught out because I registered both the address and q without realising. Simulation and google(!) helped me find the bug.

    --migry