• 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. Search Schematic Hierarchy for user added net property and...

Stats

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

Search Schematic Hierarchy for user added net property and return hierarchy path

rfontaine
rfontaine over 9 years ago

My goal is to open a top level schematic and scan through all of it's hierarchy and look for any cells that contain a specific user added property. When the property is found, the code would return the exact hierarchy path back to the top cell (/Xchip/Xbandgap/Xosc/XcellA). Where cellA would be the cell that a prop was found in.

  • Cancel
  • JayR
    JayR over 9 years ago
    Not going to write the routine for you. But suffice it to say that dbGetAnyInstSwitchMaster() is your friend.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • rfontaine
    rfontaine over 9 years ago
    I've already got the dbGetAnyInstSwitchMaster() portion figured out and have the code setup to recursively loop to find all instances in the hierarchy. My problem is keeping track of which instance I've descending into, such that when I find a net that matches my criteria I can report the hierarchical net name all the way back to the top level.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Probably easiest to pass a list containing the list of instance names that you've visited down through the hierarchy into the function. So your function could be something like this:

    procedure(myRecursiveFunc(cv ... hierPathList)
       ...
       when(netIwantToReport
         printf("Net: %s/%s\n" buildString(reverse(hierPathList) "/") netName)
       )
       ...
       foreach(inst cv~>instances
         newMaster=dbGetAnyInstSwitchMaster(inst ...)
         myRecursiveFunc(cv ... cons(inst~>name hierPathList))
       )
    )

    I'm showing the list being built up in reverse order because that way it's easiest for you to cons on the instance name at each call - and it will naturally get knocked off again when you return because you're not destructively modifying the list. Yes, you have to reverse it when you report - but assuming you don't have massive numbers of nets to report this should be quick enough.

    Regards,

    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