• 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. Adding library pathes

Stats

  • Locked Locked
  • Replies 10
  • Subscribers 145
  • Views 21663
  • 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

Adding library pathes

psill000
psill000 over 11 years ago

The envirnoment  creates a new cds.lib file when cadence virtuoso starts per session.

Is there a better way of adding additional library pathes than creating a procedure to append the cds.lib by printing out a text file to the cds.lib file?

 Example of current procedure:

procedure(addLibPath()
let(    (
    (addLibFile "./adLibs.txt")
    (mainLibFile "./cds.lib")
    )
if(isFile(addLibFile) && isFile(mainLibFile) csh(strcat("cat " addLibFile " >> " mainLibFile)))
)
)

Thanks

  • Cancel
  • skillUser
    skillUser over 11 years ago

    Hi,

    a new cds.lib file is only created if one does not exist and you try to access a library (e.g. open the Library Manager).  You could open the cds.lib for writing in append mode (fileHandle = open("cds.lib" "a")) and write the new definitions (fprintf(fileHandle "define ....\n")) and then save it (close(fileHandle))...  I have not tried this but it should work (unless the cds.lib file is somehow locked?)  Have I understood what you are trying to do?

    Hope it helps!

    Regards,

    Lawrence.

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

    Lawrence,

    There's an easier solution. Use ddCreateLib - if you give this the name and path to an existing library, all it will do is add that entry into the cds.lib - no need to use file I/O functions.

    Regards,

    Andrew 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillUser
    skillUser over 11 years ago

     Great!  I didn't know about that, but it makes sense that ddCreateLib behaves that way.

    Regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • tyanata
    tyanata over 11 years ago

     Hello,

    If we have in cds.lib file INCLUDE statement and for example file try.lib is included, is there a way during the library creation to select if we want the new library definition to be written in cds.lib or in try.lib file?

     

    Best regards,

    tyanata

     

     

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

    This should (I think) do it:

    ddSetForcedLib("/path/to/includedcds.lib")
    ddCreateLib(...)
    ddSetForcedLib("")
    ddUpdateLibList()

    I would try to do this before you've opened any design though, because if designs are open which are no longer referenced from the "forced" cds.lib, you may get a popup...

    Regards,

    Andrew.

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

    I tried this can got this a warning about using an illegal library name. I can add the same library through skill but ddCreateLib doesn't cooperate.

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

    Please read the forum guidelines. You've posted on the end of an 8 year old thread, with no information about the version you're using, no details of the actual warning you got or how you were calling ddCreateLib. I'm not sure how you expect anyone to help you?

    Andrew

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

    Sorry about all that - didn't notice the age of the thread. It was returned on a duckduckgo search and I jumped in with guns blazing without concern for anything. My apologies.

    My apologies also for the vagueness. And the bare minimum I did offer is stated incorrectly. Correction on my previous:  I can add the "illegally" named library through the GUI, not skill. It is the skill command that returns the warning.

    In my defense it was very late, I needed sleep, and the actual warning from the CIW is not much more informative than I was. Below is the input in the CIW and returned warning.


    ddCreateLib("/path/to/myLib")
    *WARNING* ddCreateLib: lib name '/path/to/myLib' is not a legal library name.

    Tool Version

    Program:        @(#)$CDS: virtuoso version 6.1.8-64b 04/27/2021 19:30 (cpgsrv11) $
    Sub version:        sub-version  IC6.1.8-64b.500.18  (64-bit addresses)

    As stated, the exact same library path can be added using the interface. I also cut and pasted the path into a terminal to make sure an 'ls' command on that path within a shell terminal works. Also verified that tech.db, cdsinfo.tag, etc existed.

    I can also manually edit the cds.lib with "DEFINE myLib /path/to/myLib" and that also works.

    Next I attempted the same command on two other libraries and got the same warning.

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

    That's because you've used the function incorrectly. The first argument is the library name not path. The second argument (which is optional) is the library path. Consequently it is objecting to there being a "/" in the library name, which is indeed illegal. To use it correctly (as is clear from the documentation), it would be:

    ddCreateLib("myLib" "/path/to/myLib")

    Andrew

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

    Perfect!

    Yes, it is clear in the documentation. I looked at the documentation but I have a tendency to skip down to the examples. Shame on me.

    • 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