simulation script

Discussion in 'VHDL' started by JohnSmith, Jun 8, 2011.

  1. JohnSmith

    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
     
    JohnSmith, Jun 8, 2011
    #1
    1. Advertising

  2. JohnSmith

    MJB Guest

    On Jun 8, 9:32 am, JohnSmith <> 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!
     
    MJB, Jun 8, 2011
    #2
    1. Advertising

  3. JohnSmith

    JohnSmith Guest

    On Jun 8, 6:45 pm, MJB <> wrote:
    > On Jun 8, 9:32 am, JohnSmith <> 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..
     
    JohnSmith, Jun 8, 2011
    #3
  4. JohnSmith

    HT-Lab Guest

    On 08/06/2011 18:00, JohnSmith wrote:
    > On Jun 8, 6:45 pm, MJB<> wrote:
    >> On Jun 8, 9:32 am, JohnSmith<> 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
     
    HT-Lab, Jun 9, 2011
    #4
  5. JohnSmith

    MJB Guest

    On Jun 9, 12:45 am, HT-Lab <> wrote:
    > On 08/06/2011 18:00, JohnSmith wrote:
    >
    >
    >
    >
    >
    >
    >
    > > On Jun 8, 6:45 pm, MJB<>  wrote:
    > >> On Jun 8, 9:32 am, JohnSmith<>  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! :)
     
    MJB, Jun 24, 2011
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Neil Zanella

    VHDL Simulation for Linux

    Neil Zanella, Jun 25, 2003, in forum: VHDL
    Replies:
    2
    Views:
    19,687
    =?ISO-8859-1?Q?Uwe_Klo=DF?=
    Aug 4, 2003
  2. jasperng
    Replies:
    0
    Views:
    1,313
    jasperng
    Nov 27, 2008
  3. Rajat
    Replies:
    3
    Views:
    702
    Jorgen Grahn
    Jan 8, 2010
  4. VYAS ASHISH M-NTB837
    Replies:
    2
    Views:
    564
    Jan Kaliszewski
    Jan 7, 2010
  5. Chendu
    Replies:
    0
    Views:
    211
    Chendu
    Oct 25, 2006
Loading...

Share This Page