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:
The last line of code gives result as nil in CIW.
Would like help regarding the same.
Hi VijayPerhaps 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) ;procedurehiSetBindKey("Layout" "F10" "printParams()")Best regardsQuek
In reply to Quek:
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
In reply to Andrew Beckett:
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.
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.
In reply to mvijay:
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?
obj~>prop~>name and obj~>prop~>value if it's a database object you're talking about.