Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17259 讨论

Creating Altera libraries for simulation in Modelsim PE/SE

Altera_Forum
名誉分销商 II
3,786 次查看

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?
0 项奖励
5 回复数
Altera_Forum
名誉分销商 II
2,376 次查看

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
0 项奖励
Altera_Forum
名誉分销商 II
2,376 次查看

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
0 项奖励
Altera_Forum
名誉分销商 II
2,376 次查看

Altera does provide library setup scripts for both Verilog and VHDL. If you still haven't gotten your simulation environment up and running yet, you might want to check out the two tcl scripts here: 

 

http://www.altera.com/support/examples/tcl/tcl-modelsim.html 

 

FPGA King
0 项奖励
Altera_Forum
名誉分销商 II
2,376 次查看

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
0 项奖励
Altera_Forum
名誉分销商 II
2,376 次查看

I just checked the Altera website. The scripts have been updated to account for both the CIII and SIII models as well. Here is the link: http://www.altera.com/support/examples/tcl/tcl-modelsim.html.  

 

Thanks for all your help!
0 项奖励
回复