• 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. How to determine your calling environment

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 142
  • Views 15049
  • 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

How to determine your calling environment

archive
archive over 17 years ago

Does anyone know how to determine the environment a procedure was called from? There are many ways to call Skill code:

icfb, pipo, si, dbAccess, cdsCopyShell, etc.

Is there a way to know whether the Skill is running in icfb, pipo or cdsCopyShell? We have a very elaborate set of pcells and our technology library has a libInit file that takes several seconds to load. This is not a big deal in the Cadence environment since it happpens only once at the start of the session. However, if I call the ccpRename command to rename a lot of cells, I noticed that it spawns a sub-process for each rename and each sub-process calls the libInit.il. To do 100 renames will add 5 seconds of overhead per call. However, in this situation, the libInit.il code isn't even needed. Ideally, I would like the libInit.il code to selectively evaluate certain parts of the code depending on the calling environment. In the case of ccp sub-processes, I would do nothing. In the case of si, I would do a few schematic/netlist related things. In the case of pipo I would do all of the layout pcell things. In icfb, all of the libInit.il would be evaluated.


Originally posted in cdnusers.org by dmay
  • Cancel
  • archive
    archive over 17 years ago

    You could use the output of getVersion() to determine this.

    Andrew.


    Originally posted in cdnusers.org by adbeckett
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • archive
    archive over 17 years ago

    Or use isCallable('funcName) to determine whether a particular function is available. If you pick layout editor or schematic editor functions, these won't exist in pipo, cdsCopyShell, dbAccess etc.

    That could be a better approach, and depends less on parsing a version string.

    Andrew.


    Originally posted in cdnusers.org by adbeckett
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • archive
    archive over 17 years ago

    Thanks Andrew. I think the getVersion() will work best. It would be harder to differentiate between cdsCopyShell, pipo and dbAccess using the isCallable command unless I could find a function that was available in one but not the other. A parseString on getVersion would be the easiest.

    -Derek


    Originally posted in cdnusers.org by dmay
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • archive
    archive over 17 years ago

    I assumed you didn't really need to differentiate with that level of granularity - which was why I suggested the isCallable approach.

    Either way, take your pick...

    Andrew.


    Originally posted in cdnusers.org by adbeckett
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • archive
    archive over 17 years ago

    getVersion() is definitely the best way, but would parsing the environment variable CDS_MPS_SESSION also work?


    Originally posted in cdnusers.org by ahamlett
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • archive
    archive over 17 years ago

    CDS_MPS_SESSION will not be defined all the tine (dbAccess wouldn't have it, since it has no MPS support, for example), and also could be inherited from the parent application. So I don't think this is a good idea. Plus it's not documented...

    Andrew.


    Originally posted in cdnusers.org by adbeckett
    • 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