• 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. How to access the auto calculation command or function of...

Stats

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

How to access the auto calculation command or function of some devices' second-order parameters (e.g., SCA), better in command line form?

Alex Liao
Alex Liao over 8 years ago

Hey smart guys,

As you know, if you change the w, l and nf, and enable the WPE effects for lower-than-CMOS90nm technology MOSFET device, you can see the SCA/SCB/SCC are auto-calculated and reflected through the device property window. And if you change w and nf, the SCA dynamically updates. That means, when you change the w and nf, a black box function is called to do the calculation of such second-order parameters. If you only calculate couples of SCA based on few different w and nf, you can let the property window do it for you manually (i.e., GUI-based approach). If you have 1000 test cases, how can you do this? Is there a command line based approach that when you specify a change of w and nf in a netlist maybe, and you proceed to call a certain command or a function to do the calculation of SCA and then get the SCA value back annotated to the netlist to have the netlist consider the WPE effect?

Because the device property window have such dynamics, so behind the GUI, there must be a function called. Or I guess it kind of finds the corresponding SCA value through the foundry provided model. In this case, the Cadence must have a search or map function operated on the foundry model to be dynamic in terms of SCA calculation.

Any knowledge is appreciated.

Thanks,

Alex

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    Alex,

    This is something that is likely to be implemented as a CDF callback for the parameters of the MOS device in the PDK. It's implemented by the foundry themselves - it's not a core function that Cadence provides (we provide the callback mechanism, but a PDK developer can do pretty much what they want in the callback to implement such functionality). Sometimes it might be computed in the device models (particularly if they are subckt models), but most commonly it's done via a CDF callback.

    In essence, in the CDF for each component (Tools->CDF->Edit CDF in the CIW), you can define a SKILL function (the callback) for each CDF parameter, which is called when that parameter is changed through the user interface.

    It is possible to call this procedurally in most cases if you want to do batch updates; you should be able to search (in these forums, or on the Cadence support site support.cadence.com) for either abInvokeCdfCallbacks or CCSinvokeCdfCallbacks (which is the same as my code, but with the prefix changed to follow our normal support site policy). This allows you to update the parameters (or user defined properties) on instances and then call the callbacks afterwards to do any calculation that might normally have been done if you made the change interactively.

    Hope that helps,

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Alex Liao
    Alex Liao over 8 years ago

    Hello Andrew,

    Thanks for your knowledge. I have searched few application notes and understood the callbacks.

    One drawback of the CCSinvokeCdfCallbacks.il is that it seems it requires a UI-based operation. When executing the CCSinvokeCdfCallbacks("MyLib" ?callInitProc t ?useInstCDF t ?order list("l" "w")), it will proceed to detect an mouse click. Your CCSCdfCallback.il is decent to fix this problem. It enables to run in a batch mode, but takes a lot of time given a large size of cells and views.

    So is there a neat way that can specify which library’s which cell’s which view’s all instances’ CDF parameters that I am going to update through the callbacks? Just like those CCSReportInstProp.il and CCSchangeParam.il that enable specifying of cellview path. (e.g., CSchangeParam("testLib" "testCell" "schematic" "cap" "model" "CAP").

    Based on the idea from CSchangeParam.il, I did the following modification and named them accordingly (e.g., CCSinvokeCdfCallbacksMy.il and CCSinvokeCdfCallbacksMy.il)  and hope it could work.

    But when I call via: CCSCdfCallbackMyLib("MyLib" "MyCell" "schematic")

    it says:

    *Error* CCSinvokeCdfCallbacksMy: extra arguments or keyword missing - (("l" "w" "nf")).

    So I guess I did not do it completely due to my less knowledge on SKILL language.

    Could you update your code to another version and enable a user to specify such path details? Or if it is simple you can directly put it here. Thanks.

    B.T.W, is it easy to call those CIW-based command like load(“xxx.il”) and  xxx("MyLib" "MyCell" "schematic") in linux prompt or embedded in a system call, or C++ call? Because I need to update them iteratively and I cannot put them in the CIW window and execute 1000 times. Thanks.

    My Adaption of Codes:

    In my CCSCdfCallbackMyLib.il:

    procedure(CCSCdfCallbackMyLib(library cellname viewname)

    let((cv)

    unless(libName=ddGetObj(library) error("Library %s does not exists\n" library))

    ; cv = dbOpenCellViewByType(library cell~>name "schematic" "schematic" "a")

    cv = dbOpenCellViewByType(library cellname viewname "schematic" "a")

    /* Run CDF Callback.*/

    CCSinvokeCdfCallbacksMy(cv ?order list("l" "w" "nf"))

    ;Run schematic heck and Save

    schCheck(cv)

    dbSave(cv)

    ) ;let

    ) ; procedure

    In my CCSinvokeCdfCallbacksMy.il:

    (procedure (CCSinvokeCdfCallbacksMy cellname viewname @key (debug nil)

    (order nil)

    (callInitProc nil) (useInstCDF nil)

    (addFormFields nil))

     (let ((success t))

          (when debug

        (printf "Invoking callbacks for all instances in cell '%s'\n"

        (dbGetq viewname cellName)))

          (foreach instance (dbGetq cellname~>viewname instances)

    (unless

    (CCSinvokeInstCdfCallbacks instance

      ?debug debug

      ?order order

      ?callInitProc callInitProc

      ?useInstCDF useInstCDF

      ?addFormFields addFormFields

      )

    (setq success nil)

    )

    ) ; foreach

          success

          )

     ) ; procedure

    Kind Regards,

    Alex

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

    Hi Alex,

    CCSinvokeCdfCallbacks doesn't require any UI (unless the callback itself brings up some kind of form or dialog box). I'm not sure why you think that.

    It's far from clear what your changes are trying to do, but the code won't work for various reasons - for a start, the way you're calling CCSinvokeCdfCallbacksMy is different from the way it's defined, and the lines such as (dbGetq cellname~>viewname instances) make no sense whatsoever.

    My guess is that you probably just want to do:

    procedure(CCFcallCallbacksForLCV(libName cellName viewName paramOrder)
      let((cv)
        cv=dbOpenCellViewByType(libName cellName viewName "" "a")
        when(cv
          CCSinvokeCdfCallbacks(cv ?order paramOrder)
          schCheck(cv)
          dbSave(cv)
        )
      )
    )

    If you want to restrict the components it calls the callbacks for within the lib/cell/view specified, you probably would need to iterate over the instances, finding those with matching cell names and then call CCSinvokeInstCdfCallbacks. Something like:

    procedure(CCFcallCallbacksForLCVcomp(libName cellName viewName componentNames paramOrder)
      let((cv)
        cv=dbOpenCellViewByType(libName cellName viewName "" "a")
        when(cv
          foreach(inst cv~>instances
            when(member(inst~>cellName componentNames
              CCSinvokeInstCdfCallbacks(inst ?order paramOrder)
            )
          )
          schCheck(cv)
          dbSave(cv)
        )
      )
    )

    Then you'd call (for example):

    CCFcallCallbacksForLCVcomp("mylib" "mycell" "schematic" list("nch" "pch") list("w" "l" "nf"))

    Note that I haven't tested or checked any of the code written above - I just typed this into a web browser without access to the Cadence tools to try it out. I'm just trying to give you a rough idea.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Alex Liao
    Alex Liao over 8 years ago

    Hi Andrew,

    Because I saw the usage as follows in the application note “How to call CDF callbacks procedurally from SKILL?”:

    “Usage

    1. Load the code via the CIW:

    load("CCSinvokeCdfCallbacks.il")

    1. 2.      Open the schematic on which you want to run the code, and then call:

    CCSinvokeCdfCallbacks(geGetEditCellView())

    ”

    Then I thought, oh, this method/function needs to be work with a mouse click~

    But now I understand the geGetEditCellView() is just one way to of fitting parameters to the callback functions. And you have another way to specify a path, anyway.

    Your code actually performs quite well. I only tested the first one and it is enough for my use. Thank you for this and without you I cannot achieve this.

    I also have another scenario of using callbacks. I am not sure if my understanding is correct or not, but it is a general problem.

    In the Cadence ADE Parametric Analysis, if I set ‘nf’ as a variable and then do a sweep nf (1 to 10) on M1, the SCA parameter does not change for every step in the sweep. This proves that the callbacks may not be called for a parameter changes as a user-defined variable. That is, the SCA which should be nf-dependent does not update accordingly. But in order to use Parametric Analysis to generate many sample points, at least one variable has to be given. So how to solve this conflict? Can I force a callback function call inside the Parametric Analysis (seems complicated) or you may have another way to resolve this?

    Like I may want to get a curve which needs many sample points but a manual way of repeatedly running simulation is tedious and time-consuming:

     SCA = function(nf) | w=W/nf, W & L = fixed.

    Thanks,

    Alex

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

    Alex,

    This is one of the kinds of problems I describe in another one of my articles "The Dangers of CDF Callbacks" (you can find this on the support site too), caused by the fact that CDF callbacks are called when you change the value of the field on the edit properties/create instance forms. With ADE L parametric analysis, the callbacks do not (and cannot) get called because the parameter evaluation is done in the simulator.

    However, this can be done in ADE XL (and ADE Explorer and ADE Assembler in IC617). Rather than putting a variable in the field and sweeping the variable, instead use the "Parameters" capability of ADE XL to perform the sweep. In the parameters section of the data view assistant (having enabled parameters via the check box) you can click on the click to add line and it will open up the schematic with the Variables and Parameters assistant. Select the component you wish to sweep the number of fingers, then click on the parameter in the assistant and right mouse->Create Parameter. In the bottom box you can then define your sweep (or in the original data view assistant). When parameters are swept this way, the callbacks are called.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Alex Liao
    Alex Liao over 8 years ago
    Hi Andrew,

    After I played with the ADE XL I really learned a lot and benefited from those new features regardless of the more complex settings and some learning efforts. Initially I thought there were only w, l, fingers, and m that can be set as “Parameters”, but once I chose Variables and Parameters => from Whitelist by default to All, I could choose any parameter to be a “Parameter” and callbacks are enabled for sure. That’s a huge convenience. A lot of thanks here.

    One last thing that bothers me is that I do not know how to specify a Parameter dependent variable. For example, I can specify fingers (nf) as a Parameter, but when I do the sweeping, from nf = 1 to 8, w=8u, it goes to cases of 1*8u, 2*8u, 3*8u, …, 8*8u which is not what I want. If I also specify w to be a Parameter, then it will generate 64 points and only 8 of them are desired.

    I tried to put M0/nf and M0/w into a Group Parameter Set and specify nf changes from 1 to 8 with 8 steps, and w changes from 8u to 1u with 8 steps as well. Then it gives me 8 simulations but with incorrect combination. That is, 1*8u, 2*7u, 3*6u,…,8*1u (linear changes). Only the first and last simulations are wanted. Certainly I can specify the 8 changes of w in the inclusion list individually but very low efficient in a large sweep case. I tried to put ‘M0/w’ = 8u/nf with 8 steps in the Group Parameter Set with the ‘M0/nf’, but the XL treats the nf as a variable rather than a Parameter. I researched a little bit about Match Parameters and Ratio Parameters but do no help on this case. Do you have any idea on this?

    Thanks,
    Alex
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    Alex,

    It's not completely obvious to me what you actually want, but you could create a global variable called (say) "nf" which you sweep from 1 to 8, and then in the parameters, set M0/nf to be nf (no sweep) and M0/w to be 8u/nf. Does that do what you want?

    Regards,

    Andrew.

    • 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