Forum Discussion

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

Creating Altera libraries for simulation in Modelsim PE/SE

I've been searching around the Altera website but I was only able to find the Modelsim-Altera pre-compiled libraries.

I'm not sure how I would setup my simulation for Modelsim PE/SE. Is there a script that I can generate Altera pre-compiled libraries for simulation using Modelsim PE/SE?

5 Replies

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

    I have two tcl scipts that I use for the Full Version of Modelsim PE/SE.

    One is for VHDL and the other is for Verilog.

    These files are attched in Simulation.zip file

    Its uses variables for pathnames so its easy to get working in your own environment.

    1) open the tcl file

    you will see the following entry

    set path_to_quartus C:/Applications/Altera/61/quartus

    you then replace path_to_quartus with the pathname on your pc/linux machine to where quartus is installed

    2) choose a location where you want the vhdl/verilog libaries to be installed

    eg

    C:\Applications\Altera\61\quartus\eda\sim_lib\vhdl

    C:\Applications\Altera\61\quartus\eda\sim_lib\verilog

    3) run the vhdl script in C:\Applications\Altera\61\quartus\eda\sim_lib\vhdl

    Once the script is run then you will have a set of pre-compiled libraries for both rtl and gate level simulations.

    do the same for verilog

    4) You will need to then create a modelsim.ini file in your project directory to point to these pre-compiled libraries
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi

    Nice scripts. If its of interest I have a "make" version for any Linux / Unix heads. :D

    As long as you are setup for Quartus II the script will find all the sources needed using the QUARTUS_ROOTDIR env.

    To Run :

    make -f MakeAltLibs all/clean/build (runs clean build)

    build Build all the libraries and creates a Modelsim.ini using vmap / vlib

    clean Removes all the libraryes and cleans up (one thing you can't do with teh tcl)

    all (default) runs clean then build

    Normally I comment out the libs I don't need.

    NB Make sure you use "real" tabs if you edit the script. ;)

    Attached File...

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

    (renamed to .txt for upload)

    (I find this really helps when I update QuII versions as it garentees the libs are right :cool: )

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

    That is the correct link to use however these scripts have not been amended for Cyclone III simulation models, only Stratix III.

    The Simulation.zip file I posted in my first reply has been changed for both Cyclone III and Stratix III libraries.

    Thanks