• 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 access parameters of an instance?

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 144
  • Views 19938
  • 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 access parameters of an instance?

mvijay
mvijay over 12 years ago

Hi,

I want to access the parameters of an instance in a layout and then compare it with conditions to print and output. Following is the code I am trying:

cv =geGetEditCellView()

cv~>instances

instanceParam=cv~>instances~>parameters~>??

The last line of code gives result as nil in CIW.

Would like help regarding the same.

Thanks

Vijay

  • Cancel
  • Quek
    Quek over 12 years ago

    Hi Vijay

    Perhaps you can use this:

    procedure( printParams()
       let( (inst cdf)
          inst=car(geGetSelSet())
          cdf=cdfGetBaseCellCDF(ddGetObj(inst~>libName inst~>cellName))
          foreach( param cdf->parameters
             printf("Value of %s: %L\n" param~>name get(inst param~>name))
          ) ;foreach
          printf("Job done\n")
       ) ;let
    ) ;procedure


    hiSetBindKey("Layout" "F10" "printParams()")


    Best regards
    Quek

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

    I'd also probably do either this:

    foreach(mapcar prop inst~>props list(prop~>name prop~>value))

    this won't tell you any properties not actually on the instance, i.e. those at CDF defaults.

    The alternative would be to do:

    cdf=cdfGetInstCDF(inst)
    foreach(mapcar param inst~>parameters list(param~>name param~>value))

    Which effectively does the same as Quek's except I'd change it to:

    procedure( printParams()
       let( (inst cdf)
          inst=car(geGetSelSet())
          cdf=cdfGetInstCDF(inst)
          foreach( param cdf->parameters
             printf("Value of %s: %L\n" param~>name param~>value)
          ) ;foreach
          printf("Job done\n")
       ) ;let
    ) ;procedure

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • theopaone
    theopaone over 12 years ago

     If you are looking for the parameter values assigned to an instance of a pcell, you should get those values off the master. There may be some parameters not assigned through the CDF or some CDF parameters that are not pcell parameters.

    inst~>master~>parameters gets the parameters off the master, including those that are the CDF default.

    Ted

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mvijay
    mvijay over 12 years ago

    Thanks for the response. I have a doubt however, as I was trying the code:

    cdf=cdfGetInstCDF(inst) , yields "nil" in CIW.

    inst=car(gegetSelSet()) would throw the database ID as db:0x.......

    cdfGetInstCDF whereas needs d_instID to work upon.

    What I am trying to do is to access the "Parameter" tab of an instance placed in a cellview (layout) and trying to make comparision with condtions thereafter.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mvijay
    mvijay over 12 years ago

    Hi,

    I figured out the code above works all right for a proper CDF component viz. transistors.

    In a tech library, the VIAS are not defined as CDF. I could figure it out from the cdf of it. I was wondering, what they would be, object wise.

    Can I access the parameters of any object which are not necessarily cdfs?

    Thanks,

    Vijay

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

    obj~>prop~>name and obj~>prop~>value if it's a database object  you're talking about.

    Regards,

    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