does icfb save $PWD when its launched?

Discussion in 'Cadence' started by Tarek, Feb 9, 2009.

  1. Tarek

    Tarek Guest

    hi,

    i want to edit my .cdsenv so that it loads the PDK model files from my
    local cadence directory rather than from the PDK folder, which is read-
    only. first i tried setting the spectre.envOpts modelFiles variable to
    "./file.scs" but it would still load from the default location, so I
    changed it to "$PWD/file.scs" and it works. I just want to make sure
    that using this way is ok because $PWD will change with any cd in
    terminal. so far i have tried changing directory, closing terminal,
    opening new terminals and it does not affect the $PWD inside cadence.
    is there a better way to achieve what i'm doing? i don't want to put
    the full path as i am also writing a tutorial for setting up the pdk
    for new users and its easier to use this way than making everyone
    write full paths.

    thanks.
     
    Tarek, Feb 9, 2009
    #1
  2. Tarek

    Nicolas Guest

    you might want to use any combination of these functions:

    pwd()
    getWorkingDir() ;;; same as pwd()
    simplifyFileName()

    use cdsdoc/cdsFinder for details on these functions

    good luck!
     
    Nicolas, Feb 10, 2009
    #2
  3. Tarek

    Tarek Guest

    Thanks, but can I use skill syntax in .cdsenv? I know it is possible
    for .cdsinit. What I have now in my .cdsenv is the following:

    spectre.envOpts modelFiles string "$PWD/file1.scs /path_to_pdk/
    file2.scs /path_to_pdk/file3.scs"

    /path_to_pdk/ is read-only. i need file1.scs in my local directory so
    i can change the corners flag, the other two can stay where they are.
    i asked my network admin and he said that although this works, it
    isn't the safest way to do it because $PWD changes...

    i tried setShellEnvVar("CWD=$PWD") in my .cdsinit but getShellEnvVar
    ("CWD") returns $PWD and not the actual path which sort of defeats the
    purpose...
     
    Tarek, Feb 10, 2009
    #3
  4. Tarek

    Nicolas Guest

    therefore use .cdsinit to do the job you want, using envSetVal() and
    envGetVal() ... those two functions are the skill equivalency to
    the .cdsenv syntax
     
    Nicolas, Feb 11, 2009
    #4
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 (here). After that, you can post your question and our members will help you out.