• 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. get the bBox of lower level cells in layout

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 143
  • Views 14706
  • 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

get the bBox of lower level cells in layout

nicola91it
nicola91it over 6 years ago

Dear all,

I am quite new to SKILL and I am trying to deal with db objects. What I'd like to do is to get some coordinates of sub-instances in layout, to be able then to draw certain shapes in top level according to those coordinates.

Let's suppose, for example, that in my top layout (level 0) I have 10 instances I0, I1, ...I9 (level 1), and each of them has 3 further cells (level 2): I0 has A0, A1, A2, I1 has B0, B1, B2, and so on. Now, I'd like to get the bBox of all cells in level2, such as A0, A1, and so on. The problem is that I don't figure out how to refer these coordinates to the top level.

After obtaining the list of the ID of my layout window, suppose cv, I encounter the following problems:

 - if I use cv~>instanceMasters~>bBox, the list of bBox related to I0,I1,...I9 are not referring to the top level coordinates. For example, if the layout of the cell I0 starts at (0 0), but in the top this instance is placed at (100 0), the lower left corner that I get is (0 0)

 - if I use cv~>instances~>bBox, the lower left corners that I get for each cell I0,I1,....I9 is now correctly referring to the top. However, I need to descend another level to manipulate A0, A1,...., but with ~>instances for the level 1 it seems that I cannot manipulate anymore the list of cells in level2

The only way that kind of worked was to use ~>instanceMasters to get the cells of level1, and then for each of them to use ~>instances to get the cells in level2 and manipulate them. In this way I could get all bBoxes for A0,A1,......, but the origin still doesn't refer to the top level.

So, repeating, how can I refer those coordinates that I get for cells in level2 to the top level, so that I'll draw something in the top and not in those sub-cells?

I hope my explanation is clear and somebody could help me with this.

Thank you and kind regards,

Nicola

  • Cancel
  • dmay
    dmay over 6 years ago

    Instances have a transform attribute that indicates the location and orientation of the instance relative to the cell in which it is placed. Select your I0 instance and type this in your CIW:

    trans = css()~>transform

    This will return something like: ((5.33 -9.35) "R0" 1.0)

    car(trans) is the xy location of the instance, cadr(trans) is the rotation of the instance and 1.0 is the magnification (typically not used, but here for backward compatibility)

    You can then take a shape from the master for instance I0 and use dbTransformPoint, dbTransformPointList or dbTransformBBox to translate coordinates from the lower cell to the upper cell. The second coordinate to these commands is the transform of the instance (trans) and the return value is the point, points or bBox in the top level coordinate space.

    For example:

    I0 is placed at 10,12, with an R90 orientation.

    r1 is the object id for a rectangle in I0 with bBox coordinates of: list(1:1 2:2)

    newTrans = dbTransformBBox(r1~>bBox trans) 

    newTrans == ((8.0 13.0) (9.0 14.0))

    If you need to combine transforms through two levels of hierarchy, you can use dbConcatTransform to combine two transforms at a time.

    Finally, you can use dbCopyFig to copy the shape from the lower level cell to the top cell and this command takes a transform as the third argument. 

    I hope this helps.

    Derek

    • 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