• 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 Layer Box In a Instance

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 145
  • Views 16893
  • 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 Layer Box In a Instance

harishgurram
harishgurram over 11 years ago

 Hi,

I have placed a instance in my cell view(layout). 

Is there any functions to get the bBox of a particular layer purpose pair, with out flattening the instance.

  • Cancel
Parents
  • theopaone
    theopaone over 11 years ago

    Assuming you have the instance ID captured in the variable instId:

    ;Operate on the master of the instance.

     master = instId~>master

    ;Find the lpp in the master

    lppId = car( setof( lp master~>lpps lp~>layerName == myLayerName && lp~>purpose == myPurpose ) )
    lppShapes = lppId~>shapes

    ; Loop through each shape to find the total bounding box

    bBox = car(lppShapes)~>bBox
    llx = xCoord( car( bBox ) )
    lly = yCoord( car( bBox ) )
    urx = xCoord( cadr( bBox ) )
    ury = yCoord( cadr( bBox ) )

    foreach( shape cdr(lppShapes)
        llxy = car(shape~>bBox)
        urxy = cadr(shape~>bBox)
         when( xCoord(llxy) < llx llx = xCoord(llxy) )
         when( yCoord(llxy) < lly lly = yCoord(llxy) )

    ;; Do the same for urxy

      ) ; foreach
    ;; Now transform the points back to the top level cell
    newBBox = dbTransformUserBBox( list( list( llx lly) list(urx ury) ) getInstTransform( instId ))

    Note: This code was written in this editor and not tested. Use at your own risk.

     Ted

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • theopaone
    theopaone over 11 years ago

    Assuming you have the instance ID captured in the variable instId:

    ;Operate on the master of the instance.

     master = instId~>master

    ;Find the lpp in the master

    lppId = car( setof( lp master~>lpps lp~>layerName == myLayerName && lp~>purpose == myPurpose ) )
    lppShapes = lppId~>shapes

    ; Loop through each shape to find the total bounding box

    bBox = car(lppShapes)~>bBox
    llx = xCoord( car( bBox ) )
    lly = yCoord( car( bBox ) )
    urx = xCoord( cadr( bBox ) )
    ury = yCoord( cadr( bBox ) )

    foreach( shape cdr(lppShapes)
        llxy = car(shape~>bBox)
        urxy = cadr(shape~>bBox)
         when( xCoord(llxy) < llx llx = xCoord(llxy) )
         when( yCoord(llxy) < lly lly = yCoord(llxy) )

    ;; Do the same for urxy

      ) ; foreach
    ;; Now transform the points back to the top level cell
    newBBox = dbTransformUserBBox( list( list( llx lly) list(urx ury) ) getInstTransform( instId ))

    Note: This code was written in this editor and not tested. Use at your own risk.

     Ted

     

    • 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