• 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. Function for getting the layer information in the specific...

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 143
  • Views 7170
  • 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

Function for getting the layer information in the specific area without selection

Jinhyung
Jinhyung over 2 years ago

Thanks for your time.

I'm looking for the two functions to get the layer information.

1.

I choose the area with the function "enterScreenBox()", then I can get the two coordinates.

With these coordinates, I want to know which layers exist on that coordinates without selecting the layer directly.

Is the function exists?

2.

There are the Metal1 layer and the Metal 2 layer exist, and the Metal 2 layer crosses over the Metal 1 layer.

In this situation, I'm looking for the function that returns the coordinates of 'Metal 1 and the Metal 2 overlaped area'

Best regards.

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

    First of all, you don't want to use enterScreenBox() as this returns screen coordinates, not the coordinates in a design window. You want enterBox() instead. Then you could either use dbShapeQuery and then process the results to transform them to the top coordinate system, and use dbLayerAnd to find the overlapping regions. This will result in temporary shapes though - probably better to use abeInit, and then abeLayerFromCellView with ?bBox with the results of the enterBox for the two relevant layers, and then use abeLayerAnd. You can use the result of this to find the coordinates. The benefit of the abe functions is that it will process the hierarchy for you, and do all the transformations, and the and is only done in memory. The only downside is that it only deals with octalinear shapes (i.e. on 45-degree multiples).

    Andrew

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

    First of all, you don't want to use enterScreenBox() as this returns screen coordinates, not the coordinates in a design window. You want enterBox() instead. Then you could either use dbShapeQuery and then process the results to transform them to the top coordinate system, and use dbLayerAnd to find the overlapping regions. This will result in temporary shapes though - probably better to use abeInit, and then abeLayerFromCellView with ?bBox with the results of the enterBox for the two relevant layers, and then use abeLayerAnd. You can use the result of this to find the coordinates. The benefit of the abe functions is that it will process the hierarchy for you, and do all the transformations, and the and is only done in memory. The only downside is that it only deals with octalinear shapes (i.e. on 45-degree multiples).

    Andrew

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

    Thanks for yout time.

    I tried to use the function "dbShapeQuery".

    However, it only returns the shape that I enter.

    For example, when I use dbShapeQuery(deGetCellView()  list("ME5" "drawing")  enterBox()),

    it only returns me that ME5 layer exists or not.

    If it is possible, then I want to use the function that returns me every drawing layer in the area which I select with the function 'enterBox()'

    Is the function exists..? 

    Best regards.

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

    Apologies - it wasn't clear that you would want to get all shapes not just those on specific layers. Use dbGetTrueOverlaps instead of dbShapeQuery.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • AurelBuche
    AurelBuche over 2 years ago in reply to Jinhyung

    The following example might help you make this work with ABE:


    (defun custom_query_shapes ( @key (box    (enterBox))
                                      (cv     (geGetEditCellView))
                                      (lpps   (setof lpp (geGetEditCellView)->lpps (equal "drawing" lpp->purpose)))
                                 @rest _args)
      "Return the position of shapes in CV that are inside BOX and whose lpp belongs to LPPS"
      (abeInit cv)
      (unwindProtect
        (let ((abe_layer (abeNewLayer))
              (polygons  (makeTable 'polygons nil))
              )
          ;; Browse provided lpps to fetch shapes in box
          (foreach lpp lpps
            (abeClearLayer abe_layer)
            (abeLayerFromCellView lpp->layerName ?purpose lpp->purpose ?bBox box ?outLayer abe_layer)
            (let ((iter (abeIslandIterator abe_layer)))
              (while (setq polygon iter->next)
                (pushf polygon polygons[ (list lpp->layerName lpp->purpose) ])
                ));while ;let
            );let
          ;; Return polygons by lpp table
          polygons
          );foreach lpp
        (abeDone)
        ));def

    You can then use:
    (custom_query_shapes)[??]

    To print a report of the polygons by lpp in the box you will click

    Cheers

    Aurélien

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

    It really works well.

    Thanks a lot, Andrew Becket.

    Best Regards

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Jinhyung
    Jinhyung over 2 years ago in reply to AurelBuche

    I'm trying your code now.

    Thanks, Aurelien!

    Best regards.

    • 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