Home > Community > Forums > Custom IC SKILL > How to access parameters of an instance?

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 How to access parameters of an instance? 

Last post Fri, Mar 1 2013 11:14 AM by Andrew Beckett. 6 replies.
Started by mvijay 27 Feb 2013 03:19 AM. Topic has 6 replies and 1245 views
Page 1 of 1 (7 items)
Sort Posts:
  • Wed, Feb 27 2013 3:19 AM

    • mvijay
    • Not Ranked
    • Joined on Tue, Apr 10 2012
    • Posts 11
    • Points 175
    How to access parameters of an instance? Reply

    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

    Filed under:
    • Post Points: 20
  • Wed, Feb 27 2013 5:34 AM

    • Quek
    • Top 10 Contributor
    • Joined on Wed, Oct 14 2009
    • Singapore, 00-SG
    • Posts 1,070
    • Points 16,280
    Re: How to access parameters of an instance? Reply

    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

    • Post Points: 20
  • Wed, Feb 27 2013 7:06 AM

    Re: How to access parameters of an instance? Reply

    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

    • Post Points: 35
  • Wed, Feb 27 2013 10:57 AM

    • theopaone
    • Top 75 Contributor
    • Joined on Tue, Feb 12 2013
    • Cedar Park, TX
    • Posts 119
    • Points 1,755
    Re: How to access parameters of an instance? Reply

     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

    • Post Points: 5
  • Wed, Feb 27 2013 10:36 PM

    • mvijay
    • Not Ranked
    • Joined on Tue, Apr 10 2012
    • Posts 11
    • Points 175
    Re: How to access parameters of an instance? Reply

    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.

    • Post Points: 5
  • Thu, Feb 28 2013 1:25 AM

    • mvijay
    • Not Ranked
    • Joined on Tue, Apr 10 2012
    • Posts 11
    • Points 175
    Re: How to access parameters of an instance? Reply

    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

    Filed under:
    • Post Points: 20
  • Fri, Mar 1 2013 11:14 AM

    Re: How to access parameters of an instance? Reply

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

    Regards,

    Andrew.

    • Post Points: 5
Page 1 of 1 (7 items)
Sort Posts:
Started by mvijay at 27 Feb 2013 03:19 AM. Topic has 6 replies.