Technical data
ModelSim EE/PLUS Reference Manual Using Tcl -
513
15 -
Using Tcl
Chapter contents
Tcl commands . . . . . . . . . . . . . . . . . . . 514
Command separator. . . . . . . . . . . . . . . . . 516
Command substitution . . . . . . . . . . . . . . . . 516
Multiple-line commands . . . . . . . . . . . . . . . 516
Evaluation order . . . . . . . . . . . . . . . . . 516
Tcl relational expression evaluation . . . . . . . . . . . . 516
System commands . . . . . . . . . . . . . . . . . 517
Variable substitution . . . . . . . . . . . . . . . . 517
List processing . . . . . . . . . . . . . . . . . . . 518
VSIM Tcl commands . . . . . . . . . . . . . . . . . 518
Tcl examples. . . . . . . . . . . . . . . . . . . . 519
This chapter provides an overview of Tcl (tool command language) as used with
Model
Sim
. Additional Tcl and Tk (Tcl’s toolkit) can be found through several Tcl
online references (p514).
Tcl is a scripting language for controlling and extending Model
Sim
. Within
Model
Sim
you can develop implementations from Tcl scripts without the use of C
code. Because Tcl is interpreted, development is rapid; you can generate and
execute Tcl scripts on the fly without stopping to recompile or restart VSIM. In
addition, if VSIM does not provide the command you need, you can use Tcl to
create your own commands.
Tcl features within ModelSim
Using Tcl with Model
Sim
gives you these features:
• command history (like that in C shells)
• full expression evaluation and support for all C-language operators
• a full range of math and trig functions
• support of lists and arrays
• regular expression pattern matching
• procedures
• the ability to define your own commands
• command substitution (that is, commands may be nested)