• 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. Cadence IC5.1.41 libInit.il

Stats

  • Locked Locked
  • Replies 19
  • Subscribers 144
  • Views 22854
  • 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

Cadence IC5.1.41 libInit.il

ag2888
ag2888 over 11 years ago
Hi,

I wanted to know is it possible to overwrite the libInit.il file, which is specified in the project area by a local version of the same??
I am actually trying to load a user defined set of "modelPath"s for the analog design environment. So i have another skill script in my local area to do that (this is loaded using .cdsinit). But the libInit.il file in the project area, that is sourced whenever i open the library manager, overwrites the "modelPath"s by loading a script in the project area.

Any suggestions how this can be done?

Any other suggestions on how to add some default set of "modelPath"s for the ADE?

Thanks
  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    This isn't entirely trivial due to a bug in one of the "FirstAccessLib" triggers which means that it doesn't return t (in some cases) and prevents subsequent triggers from running.

    Put this in a file with a ".ils" suffix, and load it:

     let(((libTable makeTable('libTable nil)))
        procedure(doSomethingAfter(libName function)
            libTable[libName]=function
        )
        procedure(doSomethingAfterTrigger(@optional libId)
            when(isCallable('hiRegTimer)
                hiRegTimer(sprintf(nil "abDoSomethingAfterLibInitDeferredTrigger(%L)" libId~>name) 0)
            )
        )
        procedure(deferredDoSomethingAfterTrigger(libName)
            let((function)
                function=libTable[libName]
                when(function
                    errset(funcall(function libName) t)
                )
            ;----------------------------------------------------------------
            ; this is so that the trigger always returns t
            ; so that subsequent triggers get called, just in
            ; case the user forgets in their code
            ;----------------------------------------------------------------
            t
            )
        )
        ;--------------------------------------------------------------------
        ; Make all the functions global. Can't use defglobalfun or globalProc since
        ; this is for IC5141
        ;--------------------------------------------------------------------
        abDoSomethingAfterLibInit=doSomethingAfter
        abDoSomethingAfterLibInitTrigger=doSomethingAfterTrigger
        abDoSomethingAfterLibInitDeferredTrigger=deferredDoSomethingAfterTrigger
        ;--------------------------------------------------------------------
        ; because there's an issue with one of the existing triggers not
        ; returning t in IC5141, can't omit the third argument and have the
        ; trigger called last, because it never gets called. So instead call it
        ; first (or at least early), but use hiRegTimer to call the real
        ; function once the UI returns
        ;--------------------------------------------------------------------
        ddRegTrigger("FirstAccessLib" 'abDoSomethingAfterLibInitTrigger 1)
    )

    Then you'd use it like this:

    procedure(myDoSomethingAfter(libName)
      printf("DO MY STUFF for lib %L\n" libName)
    )
    abDoSomethingAfterLibInit("gpdk090" 'myDoSomethingAfter)

    Note that the code will only work in interactive virtuoso sessions (non-graphical too) - but not things like the stream interfaces or "dbAccess". That's because it relies on using hiRegTimer to get around the issue with the built-in trigger not returning t (I forget which one it is; it's been fixed in IC61X though).

    Regards,

    Andrew.

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

    This isn't entirely trivial due to a bug in one of the "FirstAccessLib" triggers which means that it doesn't return t (in some cases) and prevents subsequent triggers from running.

    Put this in a file with a ".ils" suffix, and load it:

     let(((libTable makeTable('libTable nil)))
        procedure(doSomethingAfter(libName function)
            libTable[libName]=function
        )
        procedure(doSomethingAfterTrigger(@optional libId)
            when(isCallable('hiRegTimer)
                hiRegTimer(sprintf(nil "abDoSomethingAfterLibInitDeferredTrigger(%L)" libId~>name) 0)
            )
        )
        procedure(deferredDoSomethingAfterTrigger(libName)
            let((function)
                function=libTable[libName]
                when(function
                    errset(funcall(function libName) t)
                )
            ;----------------------------------------------------------------
            ; this is so that the trigger always returns t
            ; so that subsequent triggers get called, just in
            ; case the user forgets in their code
            ;----------------------------------------------------------------
            t
            )
        )
        ;--------------------------------------------------------------------
        ; Make all the functions global. Can't use defglobalfun or globalProc since
        ; this is for IC5141
        ;--------------------------------------------------------------------
        abDoSomethingAfterLibInit=doSomethingAfter
        abDoSomethingAfterLibInitTrigger=doSomethingAfterTrigger
        abDoSomethingAfterLibInitDeferredTrigger=deferredDoSomethingAfterTrigger
        ;--------------------------------------------------------------------
        ; because there's an issue with one of the existing triggers not
        ; returning t in IC5141, can't omit the third argument and have the
        ; trigger called last, because it never gets called. So instead call it
        ; first (or at least early), but use hiRegTimer to call the real
        ; function once the UI returns
        ;--------------------------------------------------------------------
        ddRegTrigger("FirstAccessLib" 'abDoSomethingAfterLibInitTrigger 1)
    )

    Then you'd use it like this:

    procedure(myDoSomethingAfter(libName)
      printf("DO MY STUFF for lib %L\n" libName)
    )
    abDoSomethingAfterLibInit("gpdk090" 'myDoSomethingAfter)

    Note that the code will only work in interactive virtuoso sessions (non-graphical too) - but not things like the stream interfaces or "dbAccess". That's because it relies on using hiRegTimer to get around the issue with the built-in trigger not returning t (I forget which one it is; it's been fixed in IC61X though).

    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