Tool Command Language
1. Getting Started

1.1 Overview
1.2 Basic Tcl Conventions
1.3 Starting Tcl Shells and Executing Tcl Scripts From Command Prompt
1.4 Further Reading

Objectives

1.1 Overview

Tcl is an interpreted (scripting) language with programming features available across platforms using different operating systems.

It is a string-based language that has only a few fundamental constructs and relatively little syntax, which makes it easy to learn.

Several Sentaurus tools use Tcl including Sentaurus Workbench, Sentaurus Process, and Inspect. Therefore, it is advantageous to know some Tcl basics.

Tcl is a powerful scripting language. However, only a small subset of Tcl commands is needed to accomplish most tasks with regard to Synopsys tools.

This module introduces this subset of Tcl commands. For more details, refer to Tcl references such as B. B. Welch, Practical Programming in Tcl & Tk, New Jersey: Prentice Hall PTR, 3rd ed., 2000.

1.1.1 Working With Tcl

Use this module as a quick reference guide or as a clipboard for creating your own Tcl scripts.

In this section, you will learn Tcl basics by looking at a Sentaurus Workbench project, which can be found in the directory Applications_Library/GettingStarted/tcl/tcl_basics.

All examples discussed here are part of the demonstration Tcl script gtclsh_tcl.cmd, which is used as the input for the corresponding TCLSH project tool.

Click to view the command file gtclsh_tcl.cmd.

Copy the above project to your local project directory $STDB and run it. Then, open the input and output files in separate windows to see how the Tcl interpreter interprets the input commands. Section 2. Basics discusses the commands in detail.

1.2 Basic Tcl Conventions

The basic Tcl conventions are:

1.3 Starting Tcl Shells and Executing Tcl Scripts From Command Prompt

Start an interactive Tcl shell with:

> gtclsh

Synopsys distributes a Tcl command interpreter called gtclsh, instead of tclsh, which is compatible with Tcl version 8.6.

To determine the version of the Tcl shell, type:

> gtclsh 
% info tclversion
8.6

Execute the Tcl script tcl_basics.tcl with:

> gtclsh tcl_basics.tcl

Alternatively, a Tcl script can be loaded from the Tcl prompt with the source command:

> gtclsh
% source tcl_basics.tcl

Close the Tcl shell with:

% exit

Sentaurus Process uses a Tcl shell in interactive mode. Therefore, Tcl code can be entered directly on the command line in exactly the same manner as for the Tcl shell.

1.4 Further Reading

Some recommended websites are:

main menu    |   module menu    |   << previous section    |   next section >>