• 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. How can I get an exact BBox from lower level to top?

Stats

  • Locked Locked
  • Replies 7
  • Subscribers 142
  • Views 19410
  • 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

How can I get an exact BBox from lower level to top?

dakuang01
dakuang01 over 7 years ago

Hi there,

I'd like to get a BBox from layout mixed with instances and mosaics hierarchically to top level. It has various order; inst -> mosaic -> inst or mosaic -> inst ->mosaic -> inst

It seems dbGetHierPathTransform only gives an exact coordinate when the layout is made of instances hierarchically. 

I have no idea now how I could approach this issue.

Looking forward your advice. 

Thanks,

Jungyoon

  • Cancel
  • Marben
    Marben over 7 years ago

    Hi Jungyoon,

    Something like this,

    cb = centerBox(css()~>bBox) ; shape's centerbox inside instance.
     inst_transform = css()~>transform ;instance in the top level
     location = dbTransformPoint(cb inst_transform) ;location of instance's shape to the top level.

    You have to modify it to get the bBox, because the code gets the center box location.

    Best regards,

    Marben

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dakuang01
    dakuang01 over 7 years ago in reply to Marben

    Thank you for replying Marben,

    What you mean is dbTransformPoint works for mosaic as well unlike dbGetHierPathTransform?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Marben
    Marben over 7 years ago in reply to dakuang01

    Hi Jungyoon,

    I haven't try it in mosaic, because I'm busy now.

    You should try it and message me if it works or not.

    I will fix it if it will not work.

    Best regards,

    Marben

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 7 years ago in reply to Marben

    Hi Jungyoon,

    Not sure Marben's reply helps particularly - the complexity is that you need to know which row and column of the mosaic you are expecting to transform. dbGetHierPathTransform handles that already though - provided you give the input appropriately.

    If you use dbGetOverlaps or dbGetTrueOverlaps there's a fifth argument called doRowCol which adds the row and column information. For example:

    dbGetTrueOverlaps(geGetEditCellView() list(9:8.1 9:8.1) "Metal3" 3)
    ((db:0x234df29b db:0x234df41a))
    dbGetTrueOverlaps(geGetEditCellView() list(9:8.1 9:8.1) "Metal3" 3 t)
    (((db:0x234df29b 0 1) db:0x234df41a))

    Notice the extra information - the first entry is now a list of the mosaic and row and column. So what I would do is use my abGetHierPathShape function (probably on this forum somewhere, but just in case):

    /***************************************************************
    *                                                              *
    *                 abGetHierPathShape (overlap)                 *
    *                                                              *
    *             Find the leaf shape from an overlap              *
    *                                                              *
    ***************************************************************/
    
    (defun abGetHierPathShape (overlap)
      (if (listp overlap)
        (abGetHierPathShape (cadr overlap))
        overlap))

    then do:

    overlaps=dbGetTrueOverlaps(geGetEditCellView() list(9:8.1 9:8.1) "Metal3" 3 t)
    foreach(overlap overlaps
      shape=abGetHierPathShape(overlap)
      transform=dbGetHierPathTransform(overlap)
      printf("transformed bbox is %L\n" dbTransformBBox(shape~>bBox transform))
    )

    If you're not using dbGetOverlaps or dbGetTrueOverlaps, you would need to construct a similar list representing the hierarchical path to the shape and pass that to dbGetHierPathTransform.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dakuang01
    dakuang01 over 7 years ago in reply to Andrew Beckett

    Thank you so much for your advice, Marben and Andrew.

    Now I remember the case. I tried dbTransformPoint to get a coordinate but it didn't work for mosaic. So I am testing the function abGetHierPathShape now.

    But I cannot understand the code fully so I'd like to explain what I understand on it. It looks like abGetHierPathShape function gives me "shape = overlap" when I wrote shape = abGetHierPathShape(overlap) because it is returning overlap value. Can you please explain the function of abGetHierPathShape and what I understand wrongly, Andrew?

    If I have more mosaics in a hierarchy to get down the shape, I am wondering if this function would work or not.   

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 7 years ago in reply to dakuang01

    Again, you've not explained how you are getting the input to the function - are you using dbGetOverlaps or dbGetTrueOverlaps? The abGetHierPathShape processes one of the "overlap" descriptions returned by these functions, and gives you the leaf shape. It works with mosaics, as does dbGetHierPathTransform. The example below was a mosaic of an instance of a mosaic:

    overlaps=dbGetOverlaps(geGetEditCellView() list(6.5:-6 6.5:-6) "Metal3" 32 t)
    (((db:0x24e0f39a 1 0)
         (db:0x24e0f71a
              ((db:0x24e0fb9a 1 2) db:0x24e0fe9b)
         )
         )
    )
    firstOverlap=car(overlaps)
    ((db:0x24e0f39a 1 0)
         (db:0x24e0f71a
         ((db:0x24e0fb9a 1 2) db:0x24e0fe9b)
         )
    )

    shape=abGetHierPathShape(firstOverlap)
    db:0x24e0fe9b
    transform=dbGetHierPathTransform(firstOverlap)
    ((3.445 -8.73) "MXR90" 1.0)
    dbTransformBBox(shape~>bBox transform)
    ((6.125 -6.635)
         (8.565 -4.595)
    )

    I've put in bold everything I typed, and the other text is the outputs shown in the CIW. I've cross-highlighted (in the same colour) what abGetHierPathShape returns.

    The situation where abGetHierPathShape returns the same as its input is if you just pass it a database object directly - i.e. not one of these lists describing an overlap. So if it was a top-level shape, the leaf shape is the shape itself. The function recursively follows the list of lists down to find the leaf shape, but only does that if the input was a list in the first place.

    Regards,

    Andrew.

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • dakuang01
    dakuang01 over 7 years ago in reply to Andrew Beckett

    Andrew,

    Thank you so much!! I suddenly had an urgent tapeout last week so I’m late to test it. This issue was a problem I have not solved so far.

    It worked very well. You are such an amazing guy. Thanks again. 

    Jungyoon

    • 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