6. Using Tcl Interface

6. 1. Script Launch

All functionalities of the HITAS platform can be accessed with the avt_shell Tcl scripting interface. avt_shell can be used the same way as any .tcl script. It is statically linked with all HITAS libraries, and thus contains all HITAS functions.

avt_shell can be used in interactive mode or in script mode. In interactive mode, it is invoked as follow:

> avt_shell

In script mode, the first line of the script file should look like:

#!/usr/bin/env avt_shell

6. 2. Tools Configuration

The configuration of all the timing tools of the HITAS platform is done in the same way, by the mean of configuration variables. The value given to the variable determines the specific behavior of the tool. When using the Tcl interface, the setting of the values for the configuration variables can be done in two ways:

There is a precedence of the values set in the avt_shell script file on the values set in the avttools.conf.

6. 3. Error Policy

HITAS distinguishes three levels of error:

level 0 WARNING, unrecognized or redundant configuration
level 1 ERROR, inconsistencies in the inputs possibly workaround by defaulted values. Results are not guaranteed to be valid
level 2 FATAL ERROR, inconsistencies in the inputs with no possible workaround. Results will not be valid.

Errors of level 0 and 2 lead to a predefined behavior of the tool, which cannot be tuned.

When encountering an error of level 0, the tool always print a [Warning] message. The tool does not abort. Example:

[Warning AVT-044] Multiple settings for variable 'simSlope'

When encountering an error of level 2, the tool always print an [Error] message, and aborts. Example:

[Error SPI-009] Can't open file ./inv.spi

The user can tune the strictness the tool treats errors of level 1 with. This is done through the configuration variable avtErrorPolicy, which can take values strict or lenient. When set to lenient (default setting), errors of level 1 are treated as errors of level 0, and the tool issues a [Warning] message, for example:

[Warning SPI-070] Conflicting power supply on node 'gnd' keeping 1.62v

When avtErrorPolicy is set to strict, errors of level 1 are treated as errors of level 2. The tool issues an [Error] message and aborts, for example:

[Error SPI-070] Conflicting power supply on node 'gnd' keeping 1.62v

6. 4. Objects

HITAS platform functionalities, such as database construction, static timing analysis, path searching..., can be accessed through Tcl functions. Those functions may either display results on standard output, create files, or return pointers on objects. Returned pointers on objects can in turn become arguments of other Tcl functions.

Here is a list of the objects returned by the Tcl functions. For more information about objects, see HITAS Reference Guide.

Netlist Electrical view of a Subcircuit, which may be either flat or hierarchical, and contain components of the files it originates from: mosfets, resistances capacitances and instances.
TimingFigure Unified Timing Database
TimingSignal Node of the subcircuit on which one a timing event can occur. Timing Signals are built on outputs of cones (partitions), on outputs of RC networks, and on input connectors. They can be typed as latches, precharges, latch or precharge commands, connectors, user-defined breakpoints or simple signals.
TimingEvent Rising or Falling transition on a timing signal
TimingPath Concatenation of propagation delays through cones and RC networks, between reference points (latches, precharges, latch or precharge commands, connectors, user-defined breakpoints)
TimingDetail Detail about a propagation delay within a timing path
StabilityFigure Back-annotation of a TimingFigure. Contains the switching windows associated to the TimingSignal objects of the TimingFigure.
StabilityPath Object associated with each TimingSignal requiring setup/hold verification (latch, latch command, precharge, output connector). Contains timing information about the input logical cone (do not mismatch with cone as a partition) of the TimingSignal object.

6. 5. Functions

Here is a list of the families of Tcl functions that can be found within the avt_shell interface. For more information, see HITAS Reference Guide.

General Global configuration, file loading, netlist manipulation, statistics
INF Configuration Configuration though the INF functions
SDC Support SDC functions supported for STA configuration
DB Construction Automatic or manual generation of the timing database
DB Browsing Functions for retrieving timing paths, propagation delays, signal properties...
STA STA launch and results analysis
Timing Abstraction Functions for generating .lib files from the timing database

6. 6. INF Configuration and SDC Support

For tool configuration needing more than the specification of a simple value (as it is done through the avt_config function), HITAS uses the INF mechanism, which is a set of Tcl configuration functions. INF functions are available for all the phases of the timing analysis process (disassembly, timing database construction, static timing analysis, crosstalk analysis and timing abstraction).

SDC commands are grouped together with the INF functions and share the same mechanisms.

All INF functions begin with the inf_ prefix, except of the SDC commands, which respect their standard naming.

Within a Tcl script, the target sub-circuit must be defined before using INF or SDC commands. Following example is given for a sub-circuit named my_design.

inf_SetFigureName my_design
 
set_case_analysis 1 reset
inf_DefineMutex muxup {i0 i1 i2}
create_clock -name ck -period 1000 [get_ports {ck}]

Outside of a Tcl script (in the Xtas GUI), the INF and SDC functions are used through the .inf file. Adding the line:

inf_Drive my_design

at the end of the previous Tcl script generates the my_design.inf file. Each INF and SDC function has a corresponding section in this file (see HITAS Reference Guide).