Table of Contents Previous page Next page Index

ModelSim Documentation Bookcase

Model Technology Inc.


How Tcl/Tk works with ModelSim

ModelSim incorporates Tcl as an embedded library package. The Tcl library consists of a parser for the Tcl language, routines to implement the Tcl built-in commands, and procedures that allow Tcl to be extended with additional commands specific to ModelSim.

ModelSim generates Tcl commands and passes them to the Tcl parser for execution. Commands may be generated by reading characters from an input source, or by associating command strings with ModelSim's user interface features, such as menu entries, buttons, or keystrokes.

When the Tcl interpreter receives commands it parses them into component fields and executes built-in commands directly. For commands implemented by ModelSim, Tcl calls back to the application to execute the commands. In many cases commands will invoke recursive invocations of the Tcl interpreter by passing in additional strings to execute (procedures, looping commands, and conditional commands all work in this way).

ModelSim gains a programming advantage by using Tcl for its command language. ModelSim can focus on simulation-specific commands, while Tcl provides many utility commands, graphic interface features, and a general programming interface for building up complex command procedures.

By using Tcl, ModelSim need not re-implement these features, a benefit that allows its graphic interface to remain consistent on all platforms. (The only vestige of the host platform's graphic interface is the window frame manager.)


Model Technology Inc.
Model Technology Incorporated
Voice: (503) 641-1340
Fax: (503)526-5410
www.model.com
sales@model.com
Table of Contents Previous page Next page Index

ModelSim