simulation script

J

JohnSmith

Hi,

How can I use an environment variable in a ".do" script running it in
the modelsim window?

I tried the windows environment variable in % characters, but doesnt
work. Absolute paths work but I want use this scripts on different
computers.

vsim -sdftyp {/UUT=%MYDIR%/dir/.../timesim.sdf} ...

Thanks
 
M

MJB

Hi,

How can I use an environment variable in a ".do" script running it in
the modelsim window?

I tried the windows environment variable in % characters, but doesnt
work. Absolute paths work but I want use this scripts on different
computers.

vsim -sdftyp {/UUT=%MYDIR%/dir/.../timesim.sdf} ...

Thanks

Try using the Tcl env() function. Modelsim's shell is essentially a
Tcl command line evironment and the .do files are .tcl scripts.

to get your directory, try /UUT=env(MYDIR)/ .....

I don't have a Modelsim installation handy so this is just off the top
of my head. Hope you find the solution!
 
J

JohnSmith

Try using the Tcl env() function.  Modelsim's shell is essentially a
Tcl command line evironment and the .do files are .tcl scripts.

to get your directory, try /UUT=env(MYDIR)/ .....

I don't have a Modelsim installation handy so this is just off the top
of my head.  Hope you find the solution!

Doesnt work..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top