• 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. "List name" decided by a variable

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 143
  • Views 1171
  • 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

"List name" decided by a variable

gaurc
gaurc over 9 years ago

I want to create a list whose name decided by a variable. i.e. :-

x~>libName_cs = list()

so when x~>libName = "Library1" ,    then     Library1_cs = list()

and when  x~>libName = "Library2" ,    then     Library2_cs = list()

How to do it?

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    You can, but you almost certainly shouldn't do this.

    set(concat(x~>libName "_cs") list(...))

    and then:

    symeval(concat(x~>libName "_cs")

    to retrieve the value. 

    However, far better would be to use a hash table:

    cs=makeTable('libraryLists nil) ; the first argument doesn't really matter what you use - doesn't have to be unique
    cs[x~>libName]=list(...)
    cs[y~>libName]=list(...)

    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