simulation script

J

JohnSmith

Guest
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
 
On Jun 8, 9:32 am, JohnSmith <csnew...@gmail.com> wrote:
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!
 
On Jun 8, 6:45 pm, MJB <twotonto...@gmail.com> wrote:
On Jun 8, 9:32 am, JohnSmith <csnew...@gmail.com> wrote:

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!
Doesnt work..
 
On 08/06/2011 18:00, JohnSmith wrote:
On Jun 8, 6:45 pm, MJB<twotonto...@gmail.com> wrote:
On Jun 8, 9:32 am, JohnSmith<csnew...@gmail.com> wrote:

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!

Doesnt work..

MJB forgot the variable sign,

vsim -sdftyp /UUT=$env(MYDIR)...

Hans
www.ht-lab.com
 
On Jun 9, 12:45 am, HT-Lab <han...@htminuslab.com> wrote:
On 08/06/2011 18:00, JohnSmith wrote:







On Jun 8, 6:45 pm, MJB<twotonto...@gmail.com>  wrote:
On Jun 8, 9:32 am, JohnSmith<csnew...@gmail.com>  wrote:

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!

Doesnt work..

MJB forgot the variable sign,

vsim -sdftyp /UUT=$env(MYDIR)...

Hanswww.ht-lab.com
Thanks for the correction! :)
 

Welcome to EDABoard.com

Sponsor

Back
Top