• 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. Is there a method that I can judge if any instance is located...

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 144
  • Views 10108
  • 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

Is there a method that I can judge if any instance is located at a point?

richardyuan
richardyuan over 3 years ago

For some reason, plenty of instances are placed regularly but not in an array in the cellview. I need to check if any intance exists at some given points. Is that possible?

  • Cancel
  • marcelpreda
    marcelpreda over 3 years ago

    If you want to check if a x,y coordinate is already "covered" by some instance , the procedure bellow is what you want

    /**
    Check if x:y coordinate is inside bBox
    @return - boolean
    - t if x:y inside
    - nil if outside
    border cases (on edges) are considered inside
    */
    procedure( MyPkgIsXyInsideBBox(x y bBox)
    x >= xCoord(car(bBox)) && x<= xCoord(cadr(bBox)) &&
    y >= yCoord(car(bBox)) && y<= yCoord(cadr(bBox))
    )

    And here is how to call it

    instId->bBox
    ((10.4125 0.85)
    (11.7625 1.275)
    )

    x = 0
    0
    y = 0
    0

    MyPkgIsXyInsideBBox(x y instId->bBox)
    nil

    x = 11
    11
    y = 1
    1

    MyPkgIsXyInsideBBox(x y instId->bBox)
    t
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • richardyuan
    richardyuan over 3 years ago in reply to marcelpreda

    Thank you. But I'm afraid tha's not what I want.

    Over 200x200 instances are supposed to be arranged in fhe form of array, but actually not. I need to check each lowerleft corner of the array if any instance is located on, which means >40000 instances will be examined by the procedure "MyPkgIsXyInsideBBox" for each corner point, and there're >40000 points. This is too much time-consuming.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to richardyuan

    It's dbInstQuery() that you'd want to use. This uses the OA region query to find objects in a particular area - in this case, instances. If you specify the start/stop levels as 0, it will find top-level instances, and you can specify the area as a zero-area box if you want to find instances under a specific point, specify the bounding box as list(pt pt).

    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