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

M

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
 
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
 
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.
 
Thanks! It works out great!

On Aug 11, 4:27 am, Riad KACED <riad.ka...@gmail.com> wrote:
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.
 

Welcome to EDABoard.com

Sponsor

Back
Top