Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

ModelSim TCL Scripts

Altera_Forum
Honored Contributor II
1,967 Views

Hi. 

 

I am writing a .do file to compile and simulate all of my .vhd files in a project. I was wondering if anyone knows a TCL command that would make all of my .vhd files automatically show up in my ModelSim workspace that I could add to my .do so that I don't have to open all of them individually. 

 

I am using ModelSim Altera Starter Edition 6.4a. 

 

Thanks!
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
998 Views

i sometimes use the Quartus II NativeLink feature to do this. even if you don't want to use this feature all the time, NativeLink can create a simulation "template" similar to what you are describing. 

 

for example: i will run NativeLink RTL simulation once, copy the RTL .do file to myscript.do, edit the script (adding some internal signals, set radix, set analog view), then run the script myself in ModelSim. 

 

NativeLink should be pretty well covered here: 

 

http://www.altera.com/literature/hb/qts/qts_qii53001.pdf
0 Kudos
Altera_Forum
Honored Contributor II
998 Views

heres the basic outline I use for all TCL files. Doing this, you do not need a modelsim project to work. 

 

# create the work library vlib work # map in external libraries (you may have to call in altera libraries here) vmap <external lib name> <external lib path> # compile all of the work files vcom -2002 <file 1> vcom -2002 <file 2> vcom -2002 <etc...> # start simulation vsim <testbench entity> run -all
0 Kudos
Reply