• 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. Return value in Pcells??

Stats

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

Return value in Pcells??

RVERP
RVERP over 9 years ago

This must have been asked already a dozen of times, but I can't seem to find it.

Is there an elegant way to have a return value from a pcell?

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    I doubt it has been asked, because I don't think it makes any sense. A PCell is a cellView which you can place an instance of in a layout or schematic (say). What would a return value even mean or where would you expect to access it?

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RVERP
    RVERP over 9 years ago

    Sorry, let me be more clear.

    A return value on pcell creation. After the pcell has been created, I need some data already used in the pcell (not affected by any parameter). I can define it again, but I want to reduce the risk for errors.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago
    That's still not clear. What kind of information?
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RVERP
    RVERP over 9 years ago

    I create a pcell with dbCreateParamInst. The skill code of the pcell is the executed. There are some variables (coordinates) there that I want to use.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RVERP
    RVERP over 9 years ago

    I create a pcell with dbCreateParamInst. The skill code of the pcell is the executed.

    But maybe that's not exactly how it works

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    If you create a pcell with dbCreateParamInst, the SKILL won't necessarily be executed - it's only executed if the particular set of parameters has not already been created - otherwise it creates an instance which will use the subMaster already created. So relying on dbCreateParamInst to "return" values from the SKILL code wouldn't make sense (even if it was possible, which it isn't) because you can't guarantee that the code is actually executed.

    If you want to reference values calculated within the PCell, the right way to do that is to store them somewhere - and probably the easiest way to store them somewhere unique to the variant in question is to put them as cellView properties on the pcCellView - that way they will be stored on the subMaster cellView.

    So within the PCell code, you could do:

    pcCellView~>myValue1=yourComputedVariable
    pcCellView~>myValue2=yourOtherComputedVariable

    of course, call the properties something that makes sense for you.

    Then if you've done:

    inst=dbCreateParamInst(...)

    you can then do:

    inst~>master~>myValue1

    to retrieve the value. I use this approach sometimes when I'm writing an abut function for VLS XL which needs to retrieve values best computed in the PCell itself - the abut function can look up relevant computations stored on the subMaster this way.

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RVERP
    RVERP over 9 years ago
    Thanks Andrew, I'll give this a try.
    • 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