• 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. Find all libraries used in design hierarchy

Stats

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

Find all libraries used in design hierarchy

MorrisDH
MorrisDH over 3 years ago

Trying to generate a list of all libraries that are used in a design hierarchy.

This code does not work:

procedure( getLibsUsed(libName cellName viewName libList)
 let( (cvId)
    printf("Finding libraries used in %s\n" cellName)
    cvId=dbOpenCellViewByType( libName cellName viewName "" "r")
    foreach(master cvId~>instanceMasters
      unless(!master || member(master~>libName libList) || master~>superMaster
        libList = cons(master~>libName libList)
        getLibsUsed(master~>libName master~>cellName master~>viewName libList)
      ) ; unless
    ) ; foreach
    println(libList)
  ) ; let
) ; procedure

The last print statement from the above list only library name of two instances at the top level.

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago

    Because the cons is a non-destructive operator, I would change this by having your function pass back the libList it builds. So for example (and I didn't test this):

    procedure( getLibsUsed(libName cellName viewName libList)
     let( (cvId)
        printf("Finding libraries used in %s\n" cellName)
        cvId=dbOpenCellViewByType( libName cellName viewName "" "r")
        foreach(master cvId~>instanceMasters
          unless(!master || member(master~>libName libList) || master~>superMaster
            libList = cons(master~>libName libList)
            libList = getLibsUsed(master~>libName master~>cellName master~>viewName libList)
          ) ; unless
        ) ; foreach
        ; probably don't want to print at each level - unless for debugging

        ; println(libList)
        libList

      ) ; let
    ) ; procedure

    Andrew

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

    I think that worked.

    • 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