• 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. Deleting multiple shapes from a layout database

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 15656
  • 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

Deleting multiple shapes from a layout database

LeJonT
LeJonT over 14 years ago

Hi,

I have a large flattened layout. I wanted to delete all the shapes covered by a shape drawn on a specific layer. I'm using a code similar to this:

custShapes = setof( shapes cellView~>shapes ( shapes~>lpp == ( "NAME" "PURPOSE" ) ) )
toBeDeletedObjs = setof( shapes cellView~>shapes isCovered( shapes custShape ) )
;isCovered(): checks whether the first shape is inside any of the other shapes in the second list
foreach( obj toBeDeletedObjs
  dbDeleteObj( obj )
) ;foreach


This is taking very long time since the number of shapes is very high. Strange thing is if I select all those objects in the layout editor and delete them by pressing the delete button, the deletion is almost instantaneous.


1. Is the any fast method to get the above thing done?
2. What is the method to delete a list of objects?
3. How will I get the list of all shapes completely covered by another shape or a list of shapes?
4. Is there any better way to achieve the above functionality?

 

foreach( obj geGetSelSet() dbDeleteObj( obj ) ) ;foreach

Why the above sentence is taking much longer than the press of a delete key?

  • Cancel
  • skillUser
    skillUser over 14 years ago

    Hi Leo,

    The first statement can be replaced with a more efficient approach - you are iterating over all of the shapes to find those on a specific layer-purpose pair, another approach which is generally much more efficient is to iterate over the layer-purpose objects to find the one you're interested in, and then to get all of the shapes on that lpp.  Usually the number of shapes is one or more orders of magnitude larger than the number of lpps, so this is where you gain efficiency.  In code, it might look something like this:

    
      lpp = car(setof(lpp cellView~>lpps lpp~>layerName=="NAME" && lpp~>purpose=="PURPOSE"))
    
      custShapes = lpp~>shapes
    
      ...
    
      mapcar('dbDeleteObj toBeDeletedObjs)  ;; might be marginally more efficient than above code?
    
    

     I don't know about your "isCovered" algorithm, but this is being called while iterating over the list of all shapes, so this is likely to be an "expensive" step in the above flow.  For "isCovered" you might use the dbGetOverlaps() function to see if the "custShape" has any overlaps with another non-custShape shape? Then you only need to iterate over the custShapes list rather than all of the cellview shapes; use the output of dbGetOverlaps to determine if the current shape overlaps anything that is not on the custShapes list, if not return "t", otherwise "nil" (I'm guessing that this is what isCovered does).

    I hope this helps you.

    regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • LeJonT
    LeJonT over 14 years ago

    Hi Lawrence,

    It really helped! The performance improvement achieved is in terms of tens of minutes.

    1. The number of lpps in my layout is close to a hundred while the number of shapes being few ten thousands. The performance increment that I had is significantly big; in terms of tens of minutes while I've used the suggested method for deleting the objects.

    2. isCovered: it accepts two inputs; [either a point and a bBox] or [two bBoxes]. It actually checks whether the first point/bBox is inside the second bBox. dbGetOverlaps() function cannot be a direct replacement for this functionality, I guess. Is there any function to achieve the above?

    Thanks a lot..

    • Cancel
    • Vote Up 0 Vote Down
    • 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