Global training solutions for engineers creating the world's electronics

What is Tcl?

Tcl is a programming language, but it's tailored to work best as a command language for controlling the behaviour of other tools. In fact, the name Tcl stands for "Tool Control Language" and Tcl was originally designed by programmers whose main interest was in developing tools for physical layout of integrated circuits.

Whenever you use the command-line prompt in EDA tools such as Mentor's ModelSim, Cadence's NC simulator or Synopsys's FPGA Express synthesis tool, you are probably issuing commands to Tcl. Fully integrated with the EDA tool, Tcl deals with your commands, decides which internal functions of the tool to execute, and passes your command-line arguments to those functions.

Why is Tcl helpful for tool control?

Tcl provides a uniform, flexible framework for manipulating the commands that drive your EDA tool. Once you know Tcl's core flow control and data manipulation capabilities, you can use them to write scripts for any Tcl-equipped EDA tool. Although you'll need to learn the specific commands for each individual tool, the way those commands work together and the way you supply arguments to them is the same for any tool that uses Tcl.

Stand-alone Tcl

Although it's often integrated in other tools such as HDL simulators, Tcl is such a useful language in its own right that it is also available as a stand-alone program known as Tclsh, the Tcl shell. In a stand-alone Tcl environment, of course, you won't find commands like "run" and "force" that might be available in a simulator. But the sixty or so commands that form the core of Tcl are still available, and can be used to write all kinds of utility programs for file management, text processing and similar tasks. File and text processing is very much easier to program in Tcl than in traditional programming languages such as C.

What is Tcl/Tk?

Tk is the graphical user interface toolkit for Tcl. It provides an astonishingly straightforward way to add GUI functionality to a Tcl program - windows, menus, dialog boxes, drawing, the whole works. If you haven't tried it yet, you're missing a lot of fun!

How do I find out more?

Tcl is developed, maintained, distributed and discussed on the Web. Our favourite starting point for all things Tcl is http://tcl.projectforum.com/wikiforum/11 which will guide you to a vast range of other resources including access to various free source and binary distributions of Tcl, Tk and extensions.

Go to the main Doulos Tcl KnowHow Page page to find some Tcl examples and case studies appropriate for synthesis and simulation users. And don't forget that Doulos offers Tcl training at public venues, live online, or at your own site if your company has several engineers who need training.

Great training!! Excellent Instructor, Excellent facility ...Met all my expectations.
Henry Hastings
Lockheed Martin

View more references