• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. Finding overlapping shapes/instances over instances

Stats

  • Locked Locked
  • Replies 0
  • Subscribers 143
  • Views 4249
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Finding overlapping shapes/instances over instances

skillUserD
skillUserD over 5 years ago

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

  • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information