• 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
  • 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
  • ag2888
    ag2888 over 11 years ago

    Hi Andrew,

     I tried using the above code in a "*.ils" file in my local area and loaded it using .cdsinit file. In the .cdsinit file i also loaded the local copy of the libInit.il and my model.il after this. That way it works.

    But there are some issues that i see. 

    1. The local libInit.il starts loading but then after the first line itself it starts loading the project libInit file. After successfully loading it, it reloads the local one.

    Thus giving out some errors like

    *Error* User post install trigger already registered for viewType maskLayout 

    The libInit.il in both project and local area is as below -

    let( ( ddObj (success t) (libName "Lib_Name") )

      printf("Loading LOCAL %s/libInit.il ...\n" libName)

      if( ddGetObj(libName) then

         ;; load custom library initialization file

         ;; load library display resource file

         ;; load custom library initialization file (exit) 

    else

        success = nil

    ) 

    If any of the 3 files aren't loaded then also success is set as nil, which is then used to display a status message at the end of the file. 

    2. The CustomExit script (3rd file) that is called to load all .ile and .il, is the one that is causing the overriding of the local model.il. I have added the path of my local model file there as well but this doesn't seem to take it.

    Also if i just load the local copy of libInit.il and then load the model.il then also it works. i.e. without using the .ils file.

    I am very new to Skill hence I am not sure whether it is because of something wrong in the script or the file s being sourced due to some other command elsewhere. 

     

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

    I suspect it's because you are unnecessarily redefining some things in your "local" libInit.il which are already in the main libInit.il

    You might be better off simply doing:

    ddGetObj("yourTechLibName")~>prop
    load("yourLocalLibinit.il")

    in your .cdsinit (the top line forces the library to be accessed, and for it to load its libInit.il, and then your code will be executed). You can omit using my ".ils" file altogether - it's probably a complicated way to achieve the same end.

    If you're not able to get this to work - I think seeing your code and data will be necessary - so go to customer support for that.

    Regards,

    Andrew.

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

    HI Andrew,

     I edited the .cdsinit as you suggested. So i do the following in there now and it works:

    ddGetObj("yourTechLibName") 

    load("myLocalModel.il") 

    I did not load my loca libInit file as i was doing it to just change the customExit version of same and my basic aim was to load some user defined set of model files for ADE at statup. This way now it works. Thanks a lot!

    Also i have one more doubt wrt to the display of the schematic in schematic composer. The colours for the various components seem to be different from what is seen normally. For e.g : yellow colour for the wires, Instance names for the ports in pink etc.

    I tried editing and loading the changed display.drf from my local path but the colours dont change still. Any suggestion for this?

     

     

     

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

    Are you loading it with drLoadDrf()? And are you doing so after the ddGetObj bit?

    Regards,

    Andrew.

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

    I was loading it using the normal load command hence the problem.. USing drLoadDrf() it works.. Thanks!

    Have another query wrt the PCF file for corner analysis. My Model file is a single file containing different sections(models) for the different devices like the 1.5V mos, 5V mos, diodes, cap etc. So how can i add all of them for a single corner?

    For e.g : Say,

    Typical : tt1p5, tt5, ttdio and ttcap

    Fast : ff1p5, ff5, ffdio and ffcap     etc. in many combinations

    I tried exploring the singleModelFile and singleNumeric styles but not able to get the desired result. Any suggestions for this?

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

     I think (if my memory is correct) that the only way you can do this is to create a number of individual files. For example cor_cap.scs :

    library cor_cap
    section ttcap
      include "singleModelFile.scs" section=ttcap
    endsection ttcap
    section ffcap
      include "singleModelFile.scs" section=ffcap
    endsection ffcap
    section sscap
      include "singleModelFile.scs" section=sscap
    endsection sscap
    endlibrary

    You'd create one of these for each individual device type, and then you'd use the corners tool with the multipleModelFiles style. A pain, but that's how it is.

    The corners tool was completely reimplemented in IC61X as part of ADE XL and can handle this now without the need to produce the wrapper .scs files.

    Regards,

    Andrew.

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

    Hi Andrew,

     I actually needed only a fixed combination of the corners for the devices and hence i combined all of them in a single *.scs file.

    Hence I am trying to use the singleModelLib style, but i am facing an issue wrt names of the corner in this.

    E.g

    In my Combined.scs i have sections under the name ttt, fff, sss, fst, sft etc..

    So in my pcf i aim to combine these sections with the 3 temp values (27,-40,150) by doing the following - 

    corAddCorner ("proc1" "ttt")

    corSetCornerRunTempVal( "proc1" "ttt" 27 )

    corAddCorner ("proc1" "ttt")

    corSetCornerRunTempVal( "proc1" "ttt" -40 ) 

    corAddCorner ("proc1" "ttt")

    corSetCornerRunTempVal( "proc1" "ttt" 150 ) 

     So this definitely overwrites the previous corners and only 150 is seen in the tool.

    From the documentation and the various examples online, i gather that it is corAddCorner ("process_name" "Section_Name").

    So, How can i select the same section but give a different corner name to each of the above? 

     

     

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

    You should use multiple model corner. Even though you only have a single model file, this allows you to have the corner name different from the section used in the model file - so you can define a corner "tttl" "tttn" "ttth" (low, nominal, high temperature) - and the only difference between them is the temperature used.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ag2888
    ag2888 over 11 years ago
    So can i ignore the below command- 
     
    corAddModelFileAndSectionChoices( "proc1" "combined.scs" '("ttt" "fft" "sst" "fst" "sft") )
     
    And just add the corner as below after adding the process- 
    corAddCorner( "proc1" "typ" )
    corSetCornerGroupVariant( "proc1" "typ" "combined.scs" "ttt" )
    corSetCornerRunTempVal( "proc1" "typ" 27 )
     
    Because i dont want to have options in the corner tool to select the section from the model file. 
    • 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