Hello.
I am in the need to find and mark shapes/instances that are overlapping instances within a cell view in Virtuoso.
I am using the code below which is taken from Cadence support. The code successfully recognizes instances overlap, but not shapes (polygons, path, pathSegs, etc) that are overlapping instances. I am using ICADVM18.1-64.
Any advice would be greatly appreciated.
Thanks,
Danny
----------------------
procedure(CCScreateOverlapArea(dst src)
let((llAx llBx llAy llBy urAx urBx urAy urBy boxLL boxUR )
llAx = xCoord( lowerLeft( dst ))
llBx = xCoord( lowerLeft( src ))
llAy = yCoord( lowerLeft( dst ))
llBy = yCoord( lowerLeft( src ))
urAx = xCoord( upperRight( dst ))
urBx = xCoord( upperRight( src ))
urAy = yCoord( upperRight( dst ))
urBy = yCoord( upperRight( src ))
boxLL = max( llAx llBx ):max( llAy llBy )
boxUR = min( urAx urBx ):min( urAy urBy )
list( boxLL boxUR )
);let
);proc
procedure(CCScheckInstOverlap( @optional (cv geGetEditCellView()))
let(( visited dinstList dbox sbox overlap ignoreCellList)
ignoreCellList=list("abc" "sealring" "mycell")
foreach(sinst cv~>instances
unless(member(sinst~>cellName ignoreCellList)
dinstList=dbGetOverlaps(cv dbTransformBBox(sinst~>master~>prBoundary~>bBox list(sinst~>xy sinst~>orient)) nil )
foreach(dinst dinstList
when(dinst~>objType=="inst" && dinst~>name != sinst~>name && !member(dinst~>cellName ignoreCellList) && !member(dinst visited)
dbox=dbTransformBBox(dinst~>master~>prBoundary~>bBox list(dinst~>xy dinst~>orient) )
sbox=dbTransformBBox(sinst~>master~>prBoundary~>bBox list(sinst~>xy sinst~>orient) )
overlap=CCScreateOverlapArea(dbox sbox)
unless(abs(caar(overlap) - caadr(overlap)) < 1e-6 || abs(cadar(overlap) - cadadr(overlap)) < 1e-6
dbCreateMarker(cv sprintf(nil "Instance %s overlaps with instance %s" dinst~>name sinst~>name) "CCS"
list(car(overlap) list(caadr(overlap) cadar(overlap)) cadr(overlap)
list(caar(overlap) cadadr(overlap))) nil t t "warning" "overlap"
)
printf("Instance %s overlaps with instance %s \n" dinst~>name sinst~>name)
)
)
)
visited=cons(sinst visited)
);unless
);foreach
t
);let
);proc