• 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. Bounding box of a layer in an instance in layout

Stats

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

Bounding box of a layer in an instance in layout

lahsivece
lahsivece over 11 years ago

Hi ,

I want to get bounding box of a drawing layer inside an instance (could be a pcell or a userdefined cell). (Ex: Bounding box of Poly 1 layer inside a transistor pcell ). dbComuteBBoxNoNLP gives me the bounding box of the instance.

Is there a function that can do this? 

Thanks

Vishal

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    Hi Vishal,

    There's no built-in function to do this, but it's easy to write one. I just threw this together (this uses destructuringBind, which is available from IC615 onwards, but you could just pull apart each bBox yourself instead if using an earlier version:

    procedure(CCFinstLayerBBox(inst layerName @optional (purpose "drawing"))
        let((shapes)
            shapes=car(exists(LP inst~>master~>lpps
                LP~>layerName==layerName && LP~>purpose==purpose))~>shapes
            when(shapes
                destructuringBind(((mllx mlly) (murx mury)) car(shapes)~>bBox
                    foreach(shape cdr(shapes)
                        destructuringBind(((llx lly) (urx ury)) shape~>bBox
                            mllx=min(mllx llx)
                            mlly=min(mlly lly)
                            murx=max(murx urx)
                            mury=max(mury ury)
                        )
                    )
                    dbTransformBBox(list(mllx:mlly murx:mury) inst~>transform)
                )
            )
        )
    )

    Regards,

    Andrew.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    Hi Vishal,

    There's no built-in function to do this, but it's easy to write one. I just threw this together (this uses destructuringBind, which is available from IC615 onwards, but you could just pull apart each bBox yourself instead if using an earlier version:

    procedure(CCFinstLayerBBox(inst layerName @optional (purpose "drawing"))
        let((shapes)
            shapes=car(exists(LP inst~>master~>lpps
                LP~>layerName==layerName && LP~>purpose==purpose))~>shapes
            when(shapes
                destructuringBind(((mllx mlly) (murx mury)) car(shapes)~>bBox
                    foreach(shape cdr(shapes)
                        destructuringBind(((llx lly) (urx ury)) shape~>bBox
                            mllx=min(mllx llx)
                            mlly=min(mlly lly)
                            murx=max(murx urx)
                            mury=max(mury ury)
                        )
                    )
                    dbTransformBBox(list(mllx:mlly murx:mury) inst~>transform)
                )
            )
        )
    )

    Regards,

    Andrew.

     

    • 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