change reference library of SOME cells

Discussion in 'Cadence' started by Raf Karakiewicz, May 10, 2005.

  1. 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
     
    Raf Karakiewicz, May 10, 2005
    #1
  2. Raf Karakiewicz

    S. Badel Guest

    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
     
    S. Badel, May 11, 2005
    #2
  3. Hi Badel,

    Thanks! This is what I needed.


    Raf Karakiewicz
    Electrical Engineer
     
    Raf Karakiewicz, May 12, 2005
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.