modelsim command line arguments

Status
Not open for further replies.

eng.amr2009

Junior Member level 3
Joined
Dec 21, 2009
Messages
25
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Egypt
Visit site
Activity points
1,509
Hi there,

I was developing a TCL script for simulation with modelsim. The TCL script accepts some command line arguments like

Code:
[B]simconfig.tcl[/B] -coverage <value1> -toplevel <value2> -tc <value3>

When I tried to run the script via tclsh under linux, it works perfect. As I actually need it for modelsim simulation, I tried to run it from modelsim console via do like

Code:
do simconfig.tcl -coverage <value1> -toplevel <value2> -tc <value3>

The script did not work. After some debugging I found out that modelsim does not pass the arguments to the tcl script. To make sure a created another script sim.do and ran it using do with same arguments passed above, I echoed the $argv, it did not include the passed argument variable !!!!

I do not need to use $1, $2 as this reduces script comparability.

Any ideas ?

Thanks in advance.
 

argv contains the arguments used when invoking modelsim/questa. You must use $1-$9 to get the macro arguments. Consider writing your script as a Tcl procedure , and then call the tcl procedure.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…