• 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. Best Way to Package and Share a pCell

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 9287
  • 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

Best Way to Package and Share a pCell

Ynishant
Ynishant over 3 years ago

Hello everyone,

                           I'd like to package a recently created pCell and share it with someone so they can beta test the pCell and make sure it has the functionality they desire. I have created a library which has all the code needed to evaluate the pCell. This is the library structure:

  • Library Name
    •   tech.db, a folder with the pCell name, and a libInit.il file that loads the SKILL file containing the callback code --> load("./path_to_callback/callback_file.il")
      • Within the pCell folder is a folder called "layout" which contains the compiled pCell layout, "data.dm" which I presume contains the compiled CDF code, and a folder called "skillCode" which contains my pCell SKILL code, CDF file, and  the callback SKILL file (this callback SKILL file is called by libInit.il two directories up.

                            I'm currently simply providing my library path to other users. The process I used to create this directory structure and load the pCell is based primarily on this resource: https://support.cadence.com/apex/ArticleAttachmentPortal?id=a1O3w000009xxXdEAI&pageName=ArticleContent#attachment_link

                             I also looked at the pCell reference manual (chapter 3 - How to package a pCell) but the only gap in my understanding lies with the location of the libInit.il file. Should it reside at the top level of the library I'm sharing or in the pCell folder. And, should the libInit.il file load the pCell code every time the library is invoked (by loading the CDF and the pcDefinePcell code)? In general, I'd really appreciate if someone can also point me to references on best practices re: packaging pCells, and PDK structure - how does Virtuoso load a PDK and what files does it look for and where? 

Regards,

Nishant.

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 3 years ago

    Nishant,

    The libInit.il needs to be at the top of the library. There is a firstAccessLib trigger (built-in) which will load the libInit.il file the first time the library is accessed - it will only look for this in the library directory and not in the cell or cellView directories. This file should take care of loading:

    1. Any functions used as CDF callbacks
    2. Any SKILL functions called from with the PCell code
    3. Any tool-specific settings you want (e.g. setting model paths). You do need to be careful with this because not all SKILL functions will be available when the libInit.il is loaded depending on the program running it - for example, the stream interfaces only understand the same SKILL functions that are supported in PCells - so often you might need to do things like when(isCallable('envSetVal) envSetVal(...)) 

    It should NOT call the pcDefinePCell. Essentially when you call that (for a layout PCell), it will build the layout pcell which included defining all the parameters for the pcell plus the code in the body of the pcDefinePCell will be stored in the layout view and doesn't need redefining. If you did call pcDefinePCell from the libInit.il it would try to rebuild the pcell every time and hence need write permission - not generally desirable or necessary. As I said though, any user-written code that is called from the body of the pcDefinePCell does need to be loaded though because otherwise they won't have been defined at PCell evaluation time.

    Note that having a directory called "skillCode" within the cell is not the most normal thing to do because it then would show up in the library manager, which you probably don't want. Typically that's avoided by either putting the SKILL code outside of the library or in a directory/folder which begins with a "." (so a "hidden" directory).

    Regards,

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 3 years ago

    Nishant,

    The libInit.il needs to be at the top of the library. There is a firstAccessLib trigger (built-in) which will load the libInit.il file the first time the library is accessed - it will only look for this in the library directory and not in the cell or cellView directories. This file should take care of loading:

    1. Any functions used as CDF callbacks
    2. Any SKILL functions called from with the PCell code
    3. Any tool-specific settings you want (e.g. setting model paths). You do need to be careful with this because not all SKILL functions will be available when the libInit.il is loaded depending on the program running it - for example, the stream interfaces only understand the same SKILL functions that are supported in PCells - so often you might need to do things like when(isCallable('envSetVal) envSetVal(...)) 

    It should NOT call the pcDefinePCell. Essentially when you call that (for a layout PCell), it will build the layout pcell which included defining all the parameters for the pcell plus the code in the body of the pcDefinePCell will be stored in the layout view and doesn't need redefining. If you did call pcDefinePCell from the libInit.il it would try to rebuild the pcell every time and hence need write permission - not generally desirable or necessary. As I said though, any user-written code that is called from the body of the pcDefinePCell does need to be loaded though because otherwise they won't have been defined at PCell evaluation time.

    Note that having a directory called "skillCode" within the cell is not the most normal thing to do because it then would show up in the library manager, which you probably don't want. Typically that's avoided by either putting the SKILL code outside of the library or in a directory/folder which begins with a "." (so a "hidden" directory).

    Regards,

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Children
  • Ynishant
    Ynishant over 3 years ago in reply to Andrew Beckett

    Got it, thank you Andrew!

    • 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