• 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. Integrate a lookup table and readout the values line by...

Stats

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

Integrate a lookup table and readout the values line by line

Peach99
Peach99 over 15 years ago

Hello I want to integrate a lookup table in skill and I want to readout the values line by line! According to which device is selected the function that I search should readout a designated line of the table! I think I can use the function "list" to create the table but I can't find out how I can do this and how I can readout a designated value in the list!

Regards

Daniel Pietsch 

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    Hi Daniel,

    There are several ways you could do this. One is to create your lookup in the file as an assoc list. For example:

    (
      ("fred" 1)
      ("jim" 1 2 3)
      ("harry" 4 5)
    )
    
    And then read it:
    fp=infile("lookup.txt")
    data=car(lineread(fp))
    close(fp)
    assoc("jim" data) => ("jim" 1 2 3)
    
    Or you could convert it into a table:
    tab=makeTable('dataTable nil)
    foreach(entry data
      tab[car(entry)]=cdr(entry)
    )
    tab["harry"] => (4 5)
    

    Or you could use readTable/writeTable to read and write directly into the table - see the documentation for more details.

    Essentially both lists (e.g. using assoc lists) and tables (which are associative arrays, or hash tables) are good for lookup of data based on a key. Note that an assoc list is less efficient for large lookup tables, because it does a sequential search, whereas an association table (as produced by makeTable) hashes the key and is then faster to lookup (and uses a little less memory).

    Best Regards,

    Andrew.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Peach99
    Peach99 over 15 years ago

    Thank you for the answer!

    Regards

    Daniel Pietsch

    • 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