EDA Solutions logo

Utilising Triggers in Calibre Interactive

02/08/2024 – Ethan Wilkinson

Relevant product(s): Calibre Interactive
Operating systems: Linux
Versions affected: All
Relevant area(s): Automation

Contents

Summary

Triggers in Calibre are functions which are executed at specific times in a workflow to aids designers in automating the physical verification flow and decrease the need for interaction during the flow. Triggers can be external (executes before or after Calibre Interactive) or internal (executes before or after a Calibre run).

Details

The following section will describe how to setup Internal and External Calibre triggers at different stages of the physical verification flow.

Internal Triggers

Internal triggers are defined within Calibre Interactive and can be saved to a “runset”. A runset is a file which stores the setup of a Calibre run created within Calibre Interactive so the options do not need to be loaded each time. These functions can be run either in a Linux shell or within a supported design tool.

To create an internal trigger, in the menu go to Settings > Show Pages > Triggers.

Pre-Execution

Use the plus sign to add a new trigger.

Triggers can be toggled on and off with the “Use” button. The type of trigger can be selected as “Process”, “Layout” or “Schematic” which refers to where the function executes from. A process will use a Linux bash terminal where Layout will use the layout editor connected with the tool, for example L-Edit.

Post-Execution

Post-Execution triggers can be created in the same way as Pre-Execution but from within the Post-Execution tab instead. The options for new triggers are the same apart from some additional options on how they run:

The options can be toggled on and off depending on the users preferences and goals.

NOTE: the option to still run trigger if DRC is terminated applies to other physical verification methods.

Writing an Internal trigger

In the Trigger line, users can write commands to perform actions or reference scripts. These scripts can be written in bash/python/tclsh. To simplify automation, Parameter Substitution Information is given:

For example, a script written by a user takes in the Layout primary cell, which changes from design to design. In the trigger pane would be a trigger “/home/user/my_script.sh %L”.

External Trigger

Calibre Interactive external triggers execute when the user starts or closes the tool from a layout or schematic viewer which supports external triggers. External triggers are written in the API for the supported design environment using the API Language (Tcl, SKILL, Scheme…).

Pre-Execution

The function named “mgc_start_calibre_trigger” can be used to set triggers to go off on the opening of Calibre Interactive. “User environment” triggers can be defined in the users environment and will be applied to all Calibre sessions for that specific user. The function can also be set locally as a “Local trigger” in the run directory for the design tool or directly loaded into the design environment. This can be achieved with a command line argument or in a shell window for the design tool. The local triggers take priority over user environment trigger definitions.

Post-Execution

Using the function name “mgc_close_calibre_trigger” will set triggers to be used on the closing of Calibre Interactive. Like Pre-Execution triggers, Local and User environment triggers are available and apply in the same way.

Writing an External trigger

External triggers can be written for Calibre’s layout tool, Calibre DESIGNrev, using Tcl:

proc mgc_start_calibre_trigger {run_type cell} {
<Tcl code>
}

proc mgc_close_calibre_trigger {run_type cell} {
<Tcl code>
}

The parameter “run_type” refers to the Calibre Interactive application to be used (drc, lvs, pex, perc, dfm). The other parameter “cell” refers to the cell which is open in the viewer. By default, the external triggers in Calibre DESIGNrev return 1.

To define an external trigger to be used with Calibre DESIGNrev, create/edit a file named “wbinit.tcl”. This file is what is known as an application extension file which allows the user to write Tcl-based scripts. The location of this file should be as follows:

Trigger ScopeFile Location
User Environment~/.calibrewb_workspace/wbinit.tcl
LocalIn a directory which the environment variable MGC_CWB_CONFIG_DIRS points to

Tcl scripts can also be run with the command line argument “-s” when launching Calibre DESIGNrev.

References

https://support.sw.siemens.com/en-US

https://docs.sw.siemens.com/en-US/doc/862138555/202402009.calbr_interactive_n_user/ided2acdf4-8f8e-49e0-a726-8d083583f1e7