• 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 shapes outside prBoundary

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 143
  • Views 17362
  • 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 shapes outside prBoundary

pham777
pham777 over 10 years ago

I used this code from Cadence on my layout:

procedure(CCSFindShapesOutsidePrBoundary(@optional (cv geGetWindowCellView()))
  let((temp_list prShapeID realShapes (finalShapes nil)(rest nil))
 
    realShapes=cv~>shapes
    prShapeID=dbCreatePolygon(cv leGetEntryLayer() cv~>prBoundary~>points)

    foreach(shape realShapes
temp_list=dbLayerXor(cv leGetEntryLayer() list(shape) list(prShapeID))
if(length(temp_list)==1 then
    mapcar('dbDeleteObject temp_list)
else
    printf("\n shape with bBox %L is outside prBoundary object\n"
    shape~>bBox)
   finalShapes=cons(shape finalShapes)
   mapcar('dbDeleteObject temp_list)
) ;if length
      ) ;foreach shape
   
    foreach(x realShapes if(!member(x finalShapes) then rest=cons(x rest)))
    foreach(x rest
  if(temp_list=dbLayerAnd(cv leGetEntryLayer() list(x) list(prShapeID))
  then     
     mapcar('dbDeleteObject temp_list)
else
printf("\n shape with bBox %L is outside prBoundary object\n"
x~>bBox)
finalShapes=cons(x finalShapes)
    ); if temp_list
);foreach x
   
   dbDeleteObject(prShapeID)
   finalShapes
  ) ;let
) ;procedure

but got the error:

*Error* dbCreatePolygon: Polygon needs at least 3 points - nil

Is there something wrong with this code ?  It seems that cv~>prBoundary~>points return nil.

Please help,

Thanks,

HP

  • Cancel
Parents
  • skillUser
    skillUser over 10 years ago

     Hi HP,

    The via objects are not found because they are not shapes but objects in the OA database.
    You might need to consider other approaches to finding all objects such as dbGetOverlaps().  You could also work with a flattened version of the layout, but that might work out cumbersome (copying everything to a scratch cellview, processing). Another approach could be to copy everything to a scratch cellview and Chop out the prBoundary rectangle which should also remove any content within the boundary, but leave behind anything that was outside or overlapping the boundary.

    Hope this helps?

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • skillUser
    skillUser over 10 years ago

     Hi HP,

    The via objects are not found because they are not shapes but objects in the OA database.
    You might need to consider other approaches to finding all objects such as dbGetOverlaps().  You could also work with a flattened version of the layout, but that might work out cumbersome (copying everything to a scratch cellview, processing). Another approach could be to copy everything to a scratch cellview and Chop out the prBoundary rectangle which should also remove any content within the boundary, but leave behind anything that was outside or overlapping the boundary.

    Hope this helps?

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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