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

Advanced ModelSim methodologies

Altera_Forum
Honored Contributor II
1,377 Views

I'm working on an advanced (at least for me) ModelSim simulation flow, and so far, have determined a few things. 

 

First, I'd like to use a simulation control DO file (sim_cntrl.do), with the tcl commands to control the flow of the sim: 

 

sim_cntrl.do 

-------------- 

set PrefMain(forceQuit) 1 

 

# only probe modules of interest to simulation database 

add wave sim:/design_tb/module_of_interest/* 

 

run 

exit 

 

Then, to view the waveforms after the sim is complete, use vsim -view design.wfl -do waveforms.do 

 

waveforms.do 

---------------- 

add wave sim:/design_tb/module_of_interest/clk 

add wave sim:/design_tb/module_of_interest/reset 

# additional signals to view 

 

view -undock wave 

view signals 

 

 

With this in mind, I have two questions: 

1) Can commands within the modelsim.ini file be set within a DO script? 

2) Can the results of the simulation be displayed in the waveform view window WITHOUT bringing up the vsim GUI?
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
659 Views

(1)  

I think not all the variables in the modelsim.ini can be set directly from the do script. Run the "report simulator control" command. It will list out all variables that set in the modelsim.ini can be set within a do script. These are the variables that you can set in do script. For example you can run "set IterationLimit 1234" command to overwrite the default IterationLimit value in the Modelsim.ini. 

 

For those that you can't set, you may want to figure out the equivalent command or switch in the vcom/vlog or vsim. For instance, to overwrite the VoptFlow = 1 in the Modelsim, you can use the -novopt switch in the vcom or vlog to the VoptFlow to 0. 

 

In case you're not aware, you can use your local modelsim.ini to overwrite the existing by changing the environment variable. I"m not sure that solve your problem. 

 

(2) 

As far as I concern, I do not aware that you can only load the waveform view GUI without bringing up the vsim GUI. It doesn't seem possible for me at this moment. Usually you have to bring up the Modelsim GUI as well. 

 

Hope this helps. :)
0 Kudos
Altera_Forum
Honored Contributor II
659 Views

1) Thanks for the information. I was not aware of the "report simulator control" command within ModelSim. Another ModelSim command that be set from a do script is StdArithNoWarning. 

 

2) I haven't found a way around this either. You can, however, undock the waveform window from the main GUI window by using this this command: 

 

view -undock wave
0 Kudos
Reply