• 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 17354
  • 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
  • dmay
    dmay over 10 years ago

    If you are using Cadence 6.1.x and the cv~>prBoundary~>points is nil, then you don't have a prBoundary. The code should check for this.

    if(cv~>prBoundary then
      do the main body of code
    else
      do alternative - possibly return all shapes
      at least print error message about missing boundary
    ) 

    Derek 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • pham777
    pham777 over 10 years ago

    Hi Derek,

    I am using IC615. I do have prBoundary layer on my layout. I check:

    cv~>prBoundary

    nil

    but cv~>bBox

    ((9.175 -7.195)
        (155.37 116.48)
    )

    • prBoundary.GIF
    • View
    • Hide
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 10 years ago

    Are you sure that's a prBoundary? Or is it just a shape on the prBoundary/boundary layer purpose pair? In OA prBoundary is a separate object in the database compared with CDB where it was just a shape on a special layer.

    If you select the "prBoundary" and do an edit properties on it, does it show in the banner of the Edit Properties form as "Edit PR Boundary" or "Edit Rectangle"?

    My guess is that you've just got a shape on the old layer that was used in CDB, which is why ~>prBoundary shows nil.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • pham777
    pham777 over 10 years ago

    Hi Andrew,

    It's my bad. Yes, I draw a rectange on prBoundary layer. When I use Create->P&R Objects ->P&R Boundary then the code recognize it.

    The original code find only shapes outside prBoundary, could someone help to modify it to find vias/objects also. Please see picture below:

    • Capture01.GIF
    • View
    • Hide
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • pham777
    pham777 over 10 years ago

    after running the code, I got :

    CCSFindShapesOutsidePrBoundary()

     shape with bBox ((81.64 92.55) (85.31 115.49)) is outside prBoundary object
    (db:0x79c1611a)

    It catch one shape (yellow path on top middle of picture). It does not catch vias outside prBoundary, and does not catch shapes at the bottom, maybe not done in hierarchy way ??

    Thanks a lot,

    HP

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

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