• 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. How do I get an instances - List from a database ID of an...

Stats

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

How do I get an instances - List from a database ID of an instance?

Socks and Shoes
Socks and Shoes over 2 years ago

Hey, I'm new to SKILL.

For traversing the hierarchy in my schematic I wanted to write a recursive program.
My problem is, that I have the CellViewID of my top-cell, but I dont know how to descend into lower hierarchies just using the database IDs.

Of course I dont want to open every Instance in my window, that would be very inefficient.

cv = geGetWindowCellView(hiGetCurrentWindow())

first_instance = car( cv ~> instances )

Lets say, that I saved the first Instance-DatabaseID in my variable "first_instance". How do I get to the instances in the next lower hierarchy?

Thanks for your help!

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago

    There are a few approaches for doing this. First of all a couple of discussions before (there are many more on the forums):

    • https://community.cadence.com/cadence_technology_forums/f/custom-ic-skill/17718/how-to-traverse-the-hierarchy-in-a-schematic/1353372#1353372
    • https://community.cadence.com/cadence_technology_forums/f/custom-ic-skill/46694/list-all-sub-cells-without-opening-it-schematic-layout/1369215#1369215

    and there are quite a few articles on http://support.cadence.com

    The first thing to decide is whether you need to visit every instance, or every master. By that I mean, do you repeatedly want to visit each sub-cell for each repeated instance or is visiting it just once enough?

    If you're doing it for every instance, the pseudo code is:

    procedure(VisitAllInstance(cv @optional (viewList "schematic symbol") (hierPath ""))
      let((newMaster)
        foreach(inst cv~>instances
          ; could check inst~>pin to omit pins if you wanted
          printf("Inst %s%s of cell %s\n" hierPath inst~>name inst~>cellName)
          newMaster=dbGetAnyInstSwitchMaster(inst viewList)
          when(newMaster
            VisitAllInstance(newMaster viewList strcat(hierPath inst~>name "/"))
          )
        )
        t
      )
    )

    If you don't need to visit every instance, you could traverse the instMasters or instHeaders so you only get each type of component once. Another example can be found in this article: 11300048

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • Socks and Shoes
    Socks and Shoes over 2 years ago in reply to Andrew Beckett

    That helped a lot! Thank you 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