SKILL: How to create a list of all the cells in a library?

Discussion in 'Cadence' started by Min Ting, Aug 11, 2009.

  1. Min Ting

    Min Ting Guest

    Hi all,

    I am writing a script to add net expressions to all the global signals
    in a schematic for all the cells in a library. At the current stage,
    my function is able to make change in one cell. However, I could not
    find a good way to go through every cell in the library.

    Is typing out all the cell names the only way to form the list? or
    there is some other ways, that allow me to go through the whole list
    of cells in the library?

    Thanks,

    Min
     
    Min Ting, Aug 11, 2009
    #1
  2. Min Ting

    KB.How Guest

    Hi Min Ting,

    You can use function ddGetObj(libName)~>cells~>name to list out all
    the cell name in the input library.
    In the other hand, to create a list, you just assign a variable to
    above functions and you will able to get a whole list in a variable.

    CellList = ddGetObj(libName)~>cells~>name

    Hoping it helps!!


    How
     
    KB.How, Aug 11, 2009
    #2
  3. Min Ting

    Riad KACED Guest

    Hi Min,

    I have written this as an example in this forum a while back. You
    might be interested in giving it a look.
    I have broken down the processing of a database into 4 entries. This
    makes it very portable and easy to maintain.

    ; process a list of libraries
    procedure(RKparseSchematicsInLibList(libList)
    foreach(lib libList
    RKparseSchematicsInLib(lib)
    )
    )
    ; process a library
    procedure(RKparseSchematicsInLib(libName)
    foreach(cell ddGetObj(libName)~>cells~>name
    RKparseSchematicsInCell(libName cell)
    )
    )
    ; process a cell
    procedure(RKparseSchematicsInCell(libName cellName)
    foreach(view ddGetObj(libName cellName)~>views~>name
    ; look for view Name whse viewType is schematic.
    if(ddMapGetFileViewType(ddGetObj(libName cellName
    view "*"))== "schematic" then
    RKparseSchematics(libName cellName view)
    )
    )
    )
    ; process a view
    procedure(RKparseSchematics(libName cellName viewName)
    printf("Processing %s/%s/%s ... \n" libName cellName viewName)
    ; Do what ever processing to the cellView.
    t
    )

    Cheers,
    Riad.
     
    Riad KACED, Aug 11, 2009
    #3
  4. Min Ting

    Min Ting Guest

    Thanks! It works out great!
     
    Min Ting, Aug 11, 2009
    #4
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.