• 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. Method to Add table as a property to the view

Stats

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

Method to Add table as a property to the view

Saikrishna14
Saikrishna14 over 11 years ago
Hi

I have used the function dbCreateProp and i could add strings as properties to the views.By using for loop,i have tried to add the individual key value pairs as properties to the view.I am looking for a way to add an entire association table consisting of key value pairs as a property to the view instead of doing each key value pair as a separate property.Could you suggest a way for me to do so? The main reason for avoiding eack key value pair as property is that the number of key-values in the table is very high and there is also a chance that the values corresponding to the key might be altered/tampered.I want the values to be fixed and unchanged.

I should also be able to access the key value pairs of the table (added as a property) later at some point of time.

Regards!
Sai Krishna
  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    You can't store data structures such as tables in a cellView property - they are constrained to int, float, string, time, and list types (there are a couple of others, but these are the main types).

    However, you can effectively serialize the table to a list to store it, and vice versa to restore it.

    Assuming you have a table, myTable - you can do:

    dbCreateProp(cvId  "myTable" "ILList" tableToList(myTable))

    or you could just use:

    cvId~>myTable=tableToList(myTable)

    then to convert it back to a table later, you'd do:

    myTable=makeTable('mytab nil) ; default value as second argument - whatever you used when creating it
    append(myTable cvId~>myTable)

    If you append an assoc list onto a table, it adds them as key-value pairs.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    You can't store data structures such as tables in a cellView property - they are constrained to int, float, string, time, and list types (there are a couple of others, but these are the main types).

    However, you can effectively serialize the table to a list to store it, and vice versa to restore it.

    Assuming you have a table, myTable - you can do:

    dbCreateProp(cvId  "myTable" "ILList" tableToList(myTable))

    or you could just use:

    cvId~>myTable=tableToList(myTable)

    then to convert it back to a table later, you'd do:

    myTable=makeTable('mytab nil) ; default value as second argument - whatever you used when creating it
    append(myTable cvId~>myTable)

    If you append an assoc list onto a table, it adds them as key-value pairs.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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