• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. Load a SKILL function using an ENV variable

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 143
  • Views 12299
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Load a SKILL function using an ENV variable

Michael Kolesnik
Michael Kolesnik over 4 years ago

I would like to load SKILL functions by using a shell ENV variable instead of a hard path.

Setting the skill path is not a solution.

In the shell I set the ENV:

setenv MDTOOLS "/home/MDTools"

trying to load this fails in the CIW:

load("$MDTOOLS/MDT_MarkCoordinate.il")
*Error* load: can't access file - "$MDTOOLS/MDT_MarkCoordinate.il"

checking I can see the path is correct:

getShellEnvVar("MDTOOLS")
"/home/MDTools"

What am I missing?

  • Cancel
Parents
  • skillUser
    skillUser over 4 years ago

    Hi Michael,

    Depending on the version of Virtuoso it may not expand Unix env vars for you (only the most recent versions do this I believe, IC6.1.8 and ICADVM20.1), so it is best to do that yourself, in other words:

    loadi(strcat(getShellEnvVar("MDTOOLS") "/MDT_MarkCoordinate.il"))
    

    Best regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to skillUser

    Laurence,

    As far as I know (and from experimenting too), environment variables are not expanded in IC6.1.8/ICADVM20.1 either (by load/loadi).

    There is my article: SKILL: How can I expand environment variable references in a string?

    load(CCSexpandEnvVars("$MDTOOLS/MDT_MarkCoordinate.il"))

    but you can also use the built-in simplifyFilename:

    load(simplifyFilename("$MDTOOLS/MDT_MarkCoordinate.il"))

    That works from IC6.1.7 onwards (I tried some earlier versions, and it changed during an IC616 hotfix but I didn't bother trying to track down which ISR it changed in).

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillUser
    skillUser over 4 years ago in reply to Andrew Beckett

    Yes, I must have been thinking of the simplifyFilename() function - older versions wouldn't expand Unix Env Vars, but the more recent versions of Virtuoso do now, thank you :-)

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • skillUser
    skillUser over 4 years ago in reply to Andrew Beckett

    Yes, I must have been thinking of the simplifyFilename() function - older versions wouldn't expand Unix Env Vars, but the more recent versions of Virtuoso do now, thank you :-)

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to skillUser

    Lawrence - I was thinking "Cool, we've implemented that, maybe I just missed it" - so was slightly disappointed to find that we hadn't after all ;-)

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Michael Kolesnik
    Michael Kolesnik over 4 years ago in reply to Andrew Beckett

    They both work perfectly.

    Thanks, both of you for the very quick response!

    I have another question on Fill pattern implementation but I will start a new request on that...

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information