I just threw together this bit of code to do this. It doesn't use the tree report - very little point since it's just as easy to traverse the hierarchy and collect the data rather than producing a tree and munging the output somehow. To use it, if you have the top layout view open, simply do: CCFprintAllCellsUsed() or CCFprintAllCellsUsed(?fileName "./report.txt") Regards, Andrew. /************************************************************************* * * * CCFallCellViewsUsed([cv] [visited]) * * * * Traverse the hierarchy recursively, visiting each master and recording * * in a table every cellView id visited. Intentionally visit subMasters * * of pcells because there may be different hierarchy under each. * * Returns the table. * * * *************************************************************************/ procedure(CCFallCellViewsUsed(@optional (cv geGetEditCellView()) (visited makeTable('visited nil)) ) foreach(master cv~>instanceMasters unless(visited[master] visited[master]=t CCFallCellViewsUsed(master visited) ) ) visited ) /**************************************************************** * * * CCFprintAllCellsUsed(?cv cvId ?fileName fileName) * * * * Starting from a given cellView (defaults to current cellView) * * collect all library/cell combos used and write to the given * * fileName. If no fileName supplied, prints to standard output * * (e.g. CIW). * * * ****************************************************************/ procedure(CCFprintAllCellsUsed(@key (cv geGetEditCellView()) fileName) let((port visited cellsUsed cellUsedList) if(stringp(fileName) then port=outfile(fileName) else port=poport ) visited=CCFallCellViewsUsed(cv) ;---------------------------------------------------------------- ; Uniquify the list to just the lib and cell names ; (so ignores the views and different variants of pcells) ;---------------------------------------------------------------- cellsUsed=makeTable('cellsUsed nil) foreach(master visited cellsUsed[list(master~>libName master~>cellName)]=t ) ;---------------------------------------------------------------- ; Sort into alphabetical order, by libName then cellName ;---------------------------------------------------------------- cellUsedList=sort(cellsUsed~>? lambda((a b) car(a)==car(b) && alphalessp(cadr(a) cadr(b)) || alphalessp(car(a) car(b)) ) ) ;---------------------------------------------------------------- ; Now print the report and close the file ;---------------------------------------------------------------- foreach(cellUsed cellUsedList fprintf(port "%-20s %s\n" car(cellUsed) cadr(cellUsed)) ) when(stringp(fileName) close(port) ) t ) )
↧