Forum Discussion

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

The error when load Altera libraries into ModelSim using Altera tcl scripting

I installed a Modelsim PE student version in my computer, I want load the Altera libraries into it.

I download the tcl script from Altera website (http://www.altera.com/support/examples/tcl/tcl-modelsim.html). I change the tcl file line 3 into the specific path in my computer, where the libraries folder "sim_lib" is.

Then I run the tcl script in Modelsim, it gives the error messages:

# ** Error: (vlog-7) Failed to open design unit file "d:ProfessionalAlteraQuartusquartusedasim_lib/eda/sim_lib/altera_mf.v" in read mode.

#

# No such file or directory. (errno = ENOENT)

# ** Error: D:/Professional/ModelSImPE/win32pe_edu/vlog failed.

# Error in macro C:\Users\Jing\Desktop\About Quartus\verilog-library-setup.tcl line 267

I don't understand why it does not work. So I upload the tcl file in this post, anybody can help me?

Or if someone can explain how to load libraries through GUI, that will be very good too.

Thanks very much!

7 Replies

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

    --- Quote Start ---

    # ** Error: (vlog-7) Failed to open design unit file "d:ProfessionalAlteraQuartusquartusedasim_lib/eda/sim_lib/altera_mf.v" in read mode.

    #

    # No such file or directory. (errno = ENOENT)

    --- Quote End ---

    maybe you should use '/' for your "path_to_quartus".
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    maybe you should use '/' for your "path_to_quartus".

    --- Quote End ---

    Thanks, yes, I should use "/", but after I changed, it still does not work with same error
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    double check the "sim_lib" folder whether it contains all the files you need to compile in modelsim.

    if it still doesn't work, maybe you can post the whole message here when you run the script.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    double check the "sim_lib" folder whether it contains all the files you need to compile in modelsim.

    if it still doesn't work, maybe you can post the whole message here when you run the script.

    --- Quote End ---

    Thanks. The "sim_lib" folder is the original one after I install Quartus II 11.1 sp2 web edition.

    And I checked the file inside, it definitely has "altera_mf.v" file inside it.

    I pasted the whole message here:

    # Reading D:/Professional/ModelSImPE/tcl/vsim/pref.tcl

    do {C:/Users/Jing/Desktop/About Quartus/verilog-library-setup.tcl}

    # D:/Professional/Altera/Quartus/quartus/eda

    # compile_all

    # Model Technology ModelSim PE Student Edition vlog 10.1c Compiler 2012.07 Jul 28 2012

    # ** Error: (vlog-7) Failed to open design unit file "D:/Professional/Altera/Quartus/quartus/eda/eda/sim_lib/altera_mf.v" in read mode.

    #

    # No such file or directory. (errno = ENOENT)

    # ** Error: D:/Professional/ModelSImPE/win32pe_edu/vlog failed.

    # Error in macro C:\Users\Jing\Desktop\About Quartus\verilog-library-setup.tcl line 267

    # D:/Professional/ModelSImPE/win32pe_edu/vlog failed.

    # while executing

    # "vlog -work altera_mf_ver $path_to_quartus/eda/sim_lib/altera_mf.v"

    # invoked from within

    # "if {[string equal $type_of_sim "compile_all"]} {

    # compiles all libraries

    # vlib lpm_ver

    # vlib altera_mf_ver

    # vlib altera_prim_ver

    # vlib sgate_ver

    # v..."

    Thanks very much.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    # ** Error: (vlog-7) Failed to open design unit file "D:/Professional/Altera/Quartus/quartus/eda/eda/sim_lib/altera_mf.v" in read mode.

    --- Quote End ---

    looks like the eda is repeated twice, pointing to the wrong directory.

    just point your quartus path to "D:/Professional/Altera/Quartus/quartus"
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks, I try to contact with Altera staff and will see what they say.

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

    still cannot get it to run? hope they can sort things out faster. :)