• 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. Program for finding the bBox of the intersection (or AND...

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 144
  • Views 7851
  • 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

Program for finding the bBox of the intersection (or AND operator) of two layers

Arokia
Arokia over 2 years ago

Hi all,

Need help writing a program to find all the bBox of the intersection (or AND operators) of two layers

Lets say there only two layers in the Layout for example M0 and M1, I'm trying to write a program which returns all the bBoxs of all the intersections between the two layers. For example, in the below diagram, there will be two bBoxes, because of two intersections( Or overlaps), so hence I need a program which can print the bBoxes of both the intersection locations.

Thanks

Arokia Bharat

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago

    Arokia,

    There are several ways this could be done - you could find the shapes and then use dbLayerAnd to create a temporary layer. Or construct point lists and use dbPointArrayAnd and figure out the bounding boxes from the results. The simplest is to use the abeLayer* functions though - these even would allow you to deal with the shapes not being in this cellVIew but lower in the hierarchy, and they also don't require temporary shapes.

    abeInit(cv)
    m0=abeLayerFromCellView("Metal1")
    m1=abeLayerFromCellView("Metal2")
    intersections=abeNewLayer()
    abeLayerAnd(m0 m1 intersections)

    islandIter=abeIslandIterator(intersections)
    while(
      island=islandIter->next
      println(island)
    )
    abeDone()

    Alternatively, you might be better off using tiles instead as these can retrieve the bounding box of each shape:

    abeInit(cv)
    m0=abeLayerFromCellView("Metal1")
    m1=abeLayerFromCellView("Metal2")
    intersections=abeNewLayer()
    abeLayerAnd(m0 m1 intersections)
    tileIter=abeTileIterator(intersections)
    while(
      tile=tileIter->next
      println(tile->bbox)
    )
    abeDone()

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Tejaskill
    Tejaskill over 2 years ago in reply to Andrew Beckett

    Hi Andrew,

    I was exactly looking for this I want to create a layer on these intersections.
    What if the intersection points are in the form of polygon.
    How should I create a layer on that polygon?

    Thanks in advance
    Teja.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago in reply to Tejaskill

    Teja,

    The abeIslandIterator will return the points in a polygon. However, you could just use abeLayerToCellView(intersection "M2") for example (silly example) - that would create shapes on M2 for all the intersection points.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Anmoljot
    Anmoljot over 1 year ago in reply to Andrew Beckett

    Hello Andrew. 

    Is there a way to save the intersection shapes to a new layer (which doesn't exist in the technology database)?

    For example: abeLayerToCellView(intersection "Outline")

    Also, is there a way to merge all the abutted intersection shapes and get the outline polygon?

    Thanks,

    Anmol

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Anmoljot
    Anmoljot over 1 year ago in reply to Anmoljot

    Hello Andrew,

    Found the answer to the second question above in another thread, answered by you.

    That is an option to merge all the abutted intersection shapes and get the outline polygon.

    Kindly help with the first question above.

    Thanks,

    Anmol

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 1 year ago in reply to Anmoljot

    Anmol,

    Anmoljot said:

    Is there a way to save the intersection shapes to a new layer (which doesn't exist in the technology database)?

    For example: abeLayerToCellView(intersection "Outline")

    Well, you could create a new layer and layer-purpose using techCreateLayer and techCreateLP - if done in memory, then this would be discarded on exit (and can be done if the technology is readonly). You could also iterate over the islands (using abeIslandIterator) and then use dbCreatePolygon to create the resulting polygons, specifying an unused layer number. 

    However, I'm uncertain why you'd want to do this - the layer would either then not be visible or interactable with after quitting and restarting, or immediately if you just used the layer number.

    Perhaps you should just use one of the system reserved layers (e.g. y0-y9)?

    Andrew

    • 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