• 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. Selecting shapes that enclose text of a certain value, for...

Stats

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

Selecting shapes that enclose text of a certain value, for use by ABE functions

caver456
caver456 over 8 years ago

FETs in our pcell library include a label in the middle of the gate whose text is equal to the device type name, i.e. "nchn5".

I would like to select all gates of a certain device type, i.e. all gates that enclose a label with text=="nchn5", and use those gates in some existing Advanced Boolean Engine code.

Pseudo-code would look something like this, if the above could be boiled down to a Calibre-style "with text" command:

pgate=abeLayerFromCellView("pgate")

pgate_nchn5=pgate with text "nchn5"

abeLayerSize(pgate_nchn5 pgate_nchn5_big 1.0)

What's the best way to accomplish this?

My first thought was to draw a little dummy rectangle around each nchn5 label, so we would have a shape to use in the abe commands, from where it would be easy to come up with the pgate_nchn5 layer, so:

I can select said labels from any hierarchy level with this code:

nchn5_labels=leSearchHierarchy(cv cv->bBox 30 "label" list(list("layer" "==" list("pgate" "drawing")) list("text" "==" "nchn5")))

But, the returned objects may be from various levels of hierarchy, so their ->xy is not necessarily relative to the top level, and the return value of leSearchHierarchy does not give the full hierarchical path of each object, from which you could concatenate the transforms.

From here, it seems like there are a few options:

1) find out the way to return the ->xy of each label in top-level-coordinates

or

2) find some other way to get to the same goal, i.e. a command  such as abeCreateBoxAtLabelOrigin("nchn5" 0.01) which would create an in-memory box on an abe layer without having to modify the layout

Any thoughts?

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

    Probably you'd have to do something like a dbShapeQuery or a dbGetOverlaps to find the paths to the objects in that particular lpp, filter it to just find the labels, and then you can use the dbGetHierPathTransform to find the overall transformation needed to transform the xy of the leaf label to the top level coordinate system. This might be useful to find the leaf shape so you can determine whether it's a label or not:

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

    You could then either construct small rectangles as you suggested in an abeLayer object and then use abeLayerTouch or similar to select the gate shapes you want, or you could use dbShapeQuery for each transformed xy to find the gate shapes you want, transform these to the top level, and add to your abeLayer and then grow them - depends what you're trying to do and how many shapes there are as to what is the most efficient.

    Of course, it would be nice if there was an abe function to deal with labels in some interesting way - but there isn't (not sure how easy it would be since that would probably require new data structures to deal with labels).

    Regards,

    Andrew.

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

    Probably you'd have to do something like a dbShapeQuery or a dbGetOverlaps to find the paths to the objects in that particular lpp, filter it to just find the labels, and then you can use the dbGetHierPathTransform to find the overall transformation needed to transform the xy of the leaf label to the top level coordinate system. This might be useful to find the leaf shape so you can determine whether it's a label or not:

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

    You could then either construct small rectangles as you suggested in an abeLayer object and then use abeLayerTouch or similar to select the gate shapes you want, or you could use dbShapeQuery for each transformed xy to find the gate shapes you want, transform these to the top level, and add to your abeLayer and then grow them - depends what you're trying to do and how many shapes there are as to what is the most efficient.

    Of course, it would be nice if there was an abe function to deal with labels in some interesting way - but there isn't (not sure how easy it would be since that would probably require new data structures to deal with labels).

    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