Hi Folks,
This is an answer for the post
http://groups.google.com/group/comp.cad.cadence/browse_thread/thread/2b7afa0b2a4fc88b/
I though it better to take it out from the above post into a new one
so it makes it easy for the community to search/browse.
-----------------------------------------------------------------------
Q: I want to modify the width of all pmos and nmos cell to their
double in the opened schematic. How could it be done ?
R:I would advice the following for this task :
Given the following knowns:
libName (ex "myLib"), cellName (ex "myCell"), deviceName (ex "NMOS"),
propName (ex "w"), one can :
1. Open the schematic view in append mode:
cvId = dbOpenCellViewByType(libName cellName "schematic" nil "a")
2. Get the list of instances/devices in your schematic :
instsInCv=cvId~>memInsts
3. Process your design
; Loop all the instances and grab only those you are interested on
; i.e "NMOS"
foreach( instance setof(x instsInCv car(x)~>cellName==deviceName)
; Loop all the properties and grab only those you are interested on
; i.e "w"
propdb=setof( x car(instance)~>prop x~>name == propName)
; If you succeed ...
if(propdb then
; Get the property's old value
propOldValue=car(propdb~>value)
; Compute the property's New value
propNewValue=2*propOldValue
; Set the property's New value
car(propdb)~>value = propNewValue
);if
);end foreach
This is a piece of code you can include in a procedure. You can add on
top of it some foreach loops if you want to process multi values/
properties/devices/cells/libs ...
Please give a look to skill cadence manual for more information about
the functions used above :
youCadenceInstallDir/doc/sklangref/sklangref.pdf
youCadenceInstallDir/doc/sklanguser/sklanguser.pdf
Enjoy yourself ;-)
Riad.