• 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 to get all of the layout layers in a window

Stats

  • Locked Locked
  • Replies 7
  • Subscribers 143
  • Views 10331
  • 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 to get all of the layout layers in a window

Martinsh
Martinsh over 2 years ago

Is there a function that can return all the layout layers in a layout window?

  • Cancel
  • mbracht
    mbracht over 2 years ago

    removeListDuplicates((geGetWindowCellView)~>shapes~>layerName)

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

    Better is to use: geGetEditCellView()~>lpps~>layerName - this is more efficient and also includes the layers further down in the hierarchy. Max's approach will look at only the shapes in this cellView. You can filter this to just be those in the cellView by doing: setof(lpp geGetEditCellView()~>lpps lpp~>nShapes>0)~>layerName

    This avoids having to traverse every shape in the design.

    Andrew

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

    Andrew,

    geGetEditCellView()~>lpps is an effient way to get the layers displayed in the window. But if we open a layout cell and only level 0 is displayed in the window, cells in lower levels are not loaded into memory, geGetEditCellView()~>lpps will return only the layers displayed, the layers used by low level cells are not in the return list. By press Shift+F, all levels are displayed, geGetEditCellView()~>lpps will return all the layers used by all hierarchy cells.

    Martin

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

    Martin,

    You can also just use dbOpenHier(geGetEditCellView() 32) to force all lower cellViews to be loaded into memory without needing to use shift-F to display all layers of hierarchy.

    Andrew

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

    Andrew,

    Thanks! dbOpenHier(geGetEditCellView() 32) works well. Being picky, there also has a problem that should be improved. If we put the command dbOpenHier() there, it will open hierarchy each time when we run the script, even all cells have been opened. If the layout design is large, it will take a long time to exec dbOpenHier() command. So, can we put a judge there, if all cells are opened, skip dbOpenHier()?

    Martin

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

    Martin,

    dbOpenHier is pretty quick if everything is already opened. I could imagine that it might take a while if there is a big hierarchy as it will need to revisit everything in the hierarchy to see if there are any cellViews that have not been opened yet (this could happen if a lower level cell was changed - maybe in another session - and refreshed but not opened to full depth). As a result, having a single flag to know that the hierarchy has been opened to full depth is not feasible because it is dependent upon the state of lower level data.

    You could of course keep your own flag to determine this for each cellView, but I'm kind of surprised that it is significant unless the design is massive (the decent-sized design example I used takes almost no time to do dbOpenHier - it took 4.4s the first time, and 3ms the second time).

    Andrew

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

    Andrew,

    Yes, it's a huge design including many different dies on a reticle area.

    I put cputime() command before and after dbOpenHier () to calculate the time used. It takes 36.5s the first time, and 7s the second time.

    I find another way, hiGetCurrentWindow()->stopLevel = dbGetMaxHierDepth()-1. This is equal to Ctrl-F. This way looks better. The first time it takes 42s, the second time it take 0s.

    Martin

    • 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