See bellow a starting example.
- scan all instances in the cell
- if your isnt has an schematic view descend in it
- if no schematic view available I assume that it is a primitive (I print for it lib/cell)
you should decided the "primitives" lib/cell which are interesting for you.
If your design is big the code bellow may slow,
think of a nonrecursive implementation, or to not visist the already seen lib/cell/view .
;; traverse schematic hier
;; and print all the instances that do not have any schematic view
;; most likely those are your primitives
;; cv - cv to scan
;; level - level down into hierarchy, used just to indent the printed lines.
procedure( mpTraverseHierSch( cv @optional (level 0) )
if( cview = dbGetAnyInstSwitchMaster(inst "schematic") then
;; some preety printing
for( i 1 level
printf("%s %s/%s in %L\n"
inst->name inst->libName inst->cellName
list(cv->libName cv->cellName cv->viewName))