How to get ALL instances in Virtuoso

1

19martin84

Guest
Hi Folks!

I'am trying to get all instances (also the
subinstances) from my Layout.

For Example

Cell1
Cell1 --> Cell2
Cell1 --> Cell2 --> Cell3

When I'm using cv~>instances~>cellName the result
is just "Cell1"
but I want to see all cells!

Can u help me?

Thx in advance!
Martin

--
Message posted using http://www.talkaboutcad.com/group/comp.cad.cadence/
More information at http://www.talkaboutcad.com/faq.html
 
Hi Martin,

I'm just wondering if you want something similar to what you get with
Design->Hierarchy->Tree from the layout window, but displayed
differently.
All what you need actually is to traverse the hierarchy and do the
processing you want to do at each level.
This issues has already been discussed in this forum (for schematic).
You can find more :
http://groups.google.com/group/comp.cad.cadence/browse_thread/thread/d5b240cdfcc744cf/629593a0e57a8802?lnk=gst&q=report+hierarchy#629593a0e57a8802

You can use the Jim's function as a starting point.

You can also use the following piece of code (It comes with the skill
training from Cadence) :
; Function starts here
procedure( TrHierarchyTraversal( cellView listSoFar )
foreach( master cellView~>instances~>master
let( ( nextCellView )
nextCellView = master
cond(
( null( nextCellView ) ;;; couldn't find appropriate view
nil )
( member( nextCellView listSoFar ) ;;; we've already
processed this cellView
nil )
( t
listSoFar =
TrHierarchyTraversal(
nextCellView
cons( nextCellView listSoFar )
)
)
) ; cond
) ; let
) ; foreach
listSoFar ;;; return listSoFar augmented by cellView's contributions
) ; procedure
; functions ends here

You can then execute this code by typing the following :
TrHierarchyTraversal(dbOpenCellViewByType("myLib" "myCell" "layout")
nil)

You need to fine tune this function to print what you want to print,
that's not a very hard job ;-)
I think It's a good starting point for you're asking for.

Feel free to get in touch if you need further help on this.

Good luck !

Riad.
 
Hi Riad!

Thx a lot for your fast answer!
I have already seen this Tree function... But, I need it to use in my
skill Programm (as a list) and therefore it is not realy helpful to get
the cells in a TextView Window ;)

But anyway thank you!

KR,
Martin

--
Message posted using http://www.talkaboutcad.com/group/comp.cad.cadence/
More information at http://www.talkaboutcad.com/faq.html
 
Hi Martin,

Yes, I understood that indeed, that's why I provided your with the
TrHierarchyTraversal skill procedure that you can customize for your
needs and put it together with your other procedures. Hope it's
helpful. I have actually wrote a skill that does this job couple of
years ago but left it in my former company :-(
Well, one can easily re-write with the above functions.

Good luck !

Riad.
 
If you're not looking for a hierarchy structure, you can get all the
instances doing this:

procedure(myFlattenList(list)
if(listp(list) then
foreach(mapcan element list
if(listp(element)
myFlattenList(copy(element))
ncons(element)
)
);foreach
else
list
) ;if
);procedure


instances = setof(x myFlattenList(dbGetOverlaps(cv cv~>bBox nil 20))
x~>objType == "inst")

Dominic
 

Welcome to EDABoard.com

Sponsor

Back
Top