change reference library of SOME cells

R

Raf Karakiewicz

Guest
Hi,

Someone has consolidated one of my libraries (libDesign) too much so now I
have iopin, ipin, opin, gnd, vdd, in libDesign instead of analogLib and
basic. How do I set all my cells in libDesign to point back to the proper
i/opin, gnd, vdd, in basic and analogLib libraries (keeping everything
else the way it is)?! There are thousands of vdd and gnd references in
hundreds of different cells in libDesign!

I've tried some SKILL scripts but I have very little experience at that. I
can't figure out how to apply these changes to ALL my cells in libDesign.
Can someone please help me out?


Thanks,


Raf Karakiewicz
Electrical Engineer
rafal@eecg.toronto.edu
 
I'm joining a bit of SKILL i adapted to your problem (i hope).

Load it and then issue
ZZChangeRefLib( "LIB_TO_PROCESS" '("ipin" "opin" "iopin" "etc....") "basic" ?extract t )

etc..

(the ?extract switch allows to do a "Check and Save" on the schematics which have been modified)

hope it helps,

stéphane



procedure( ZZChangeRefLib( lib cellsToChange libTo @key (extract nil) )

let( ( ddLib cells child view dbSchematic inst instCount )

ddLib = ddGetObj( lib )

; process all children
cells = ddGetObjChildren( ddLib )

foreach( child cells
when( child->type == 'ddCellType
foreach( view child~>views
when( view~>name == "schematic"

printf( "processing %s %s %s... " child~>name view~>name lib )

dbSchematic = dbOpenCellViewByType( lib child~>name view~>name nil "a" )

instCount=0

; search for instances
foreach( inst dbSchematic~>instances
when( member( inst~>cellName cellsToChange )
; replace by new instance
dbSetInstHeaderMasterName( inst~>instHeader libTo inst~>cellName inst~>viewName )
; record change
instCount=instCount+1
) ; when
) ; foreach

printf( "changed %d instance(s).\n" instCount )

when( instCount > 0
dbSave( dbSchematic )
when( extract schCheck( dbSchematic ) )
) ; when
dbClose( dbSchematic )

)
)
)
)

printf( "Library %s processed successfully!\n" lib )

) ; let

t
) ; procedure


I've tried some SKILL scripts but I have very little experience at that. I
can't figure out how to apply these changes to ALL my cells in libDesign.
Can someone please help me out?
 
Hi Badel,

Thanks! This is what I needed.


Raf Karakiewicz
Electrical Engineer
rafal@eecg.toronto.edu
 

Welcome to EDABoard.com

Sponsor

Back
Top