Document created by MALong Employee on Mar 25, 2020
Version 1Show Document
  • View in full screen mode

Every push button in an IC-CAP modeling project (Model File) can be automatically executed by a program and the command ICCAP_FUNC().

Its basic syntax is:

The full, complete syntax for ICCAP_FUNC is *including* the Object Name:

   ICCAP_FUNC("Macro /diode/myMacroName", "Execute")

   ICCAP_FUNC("Plot  idvd", "Close")

with the object names: Macro, Input, Output, Transform, Plot


However, provided there is no naming conflict on the pointer hierarchy, i.e. no Plot named the same as a Transform or an Input or Output, these Object Names can be omitted (in praxis, this is the default !!!)


Important Best-Practice Hint:
when you have written a Transform to calculate 'gm' of a MOS transistor,
and when you want to display the result in a Plot,

  • name the Plot differently (!!!) , g. _gm  or _gm_


The Hierarchy of an IC-CAP ModelFile

The IC-CAP ModelFile is organized like a directory structure, and like in a directory structure, you can move up and down with ICCAP_FUNC() pointers.


assume your current Program is located as a Transform
  in Model_A/Dut_1/Setup_a

  • You can program to open all Plots in the current Setup:
    ICCAP_FUNC(".", "Display Plots")
  • but you can open all the Plots in another Setup:
    ICCAP_FUNC("../../Dut_2/Setup_x", "Display Plots")

You can  execute another program in any other Setup, DUT or even Model etc.


It is like using a DOS or Unix window, and applying the 'cd' (change directory) command, or executing another program in another directory like   e.g.    ../../directory1/directory2/myProgram.exe


Notes about Path Definitions


means  'stay in this directory


means  'go up one directory hierarchy'






from the current level (e.g. Dut_1/Setup_a),

'go up 2 directory levels',

then down to directory 'Dut_2',

and further down to 'Setup_x'


Unfortunately, the syntax for ICCAP_FUNC it is not easy to remember at all.
Here an example of the dilemma with the ICCAP_FUNC syntax:

!---export measured data:
ICCAP_FUNC("/modelname/dutname/setupname", "Export  Data Measured", filename)

!---import measured data:
ICCAP_FUNC("/modelname/dutname/setupname", "Import  Measured Data", filename)


Therefore, you can download the following IC-CAP ModelFile with plenty of best-practice copy-paste examples:

IC-CAP Example File:        Automated_Mouse_Clicks_by_ICCAP_FUNC.mdl



Another location for copy-pasting ICCAP_FUNC  is in the IC-CAP  Help:

  • click Help
  • select 'Topics and Index ...'
  • search for ICCAP_FUNC

This should bring you to hyperlink 'ICCAP_FUNC Statement'


- - - - - - - - - - - - - - - - - - - - - - - - - - - -


When executing another Program by the current program and ICCAP_FUNC(), do not forget to apply
 Smart Data Exchange between Programs

  • without using auxiliary variables !
  • by direct Variable Transfer with a Subprogram Call


This is an extremely smart way to transfer data between both programs without the use of auxiliary variables. In other words, applying this feature makes your Variables list lean.


In the called Program, the GET_xxx command(s) must be placed before any ICCAP_FUNC() statement.
Reason: a new ICCAP_FUNC() statement automatically clears the list of transferred parameters.


For the special case of calling a sub-program, for example to perform some central calculations, and to return the result back into the calling program, apply:

Application Example:
central de-embedding routines