User`s manual
10-242 Tcl and ModelSim ModelSim Xilinx User’s Manual
Tcl command syntax
The former ModelSim commands, if and set are now Tcl commands. You should
understand Tcl command syntax before using these commands. The syntax,
especially for the if command, may be unfamiliar.
The following rules define the syntax and semantics of the Tcl language. Both the
if command syntax
(10-245) and set command syntax (10-246) follow the general
discussion of Tcl command syntax.
1 A Tcl script is a string containing one or more commands. Semi-colons and newlines
are command separators unless quoted as described below. Close brackets are
command terminators during command substitution (see below) unless quoted.
2 A command is evaluated in two steps. First, the Tcl interpreter breaks the command
into words and performs substitutions as described below. These substitutions are
performed in the same way for all commands. The first word is used to locate a
command procedure to carry out the command, then all of the words of the command
are passed to the command procedure. The command procedure is free to interpret
each of its words in any way it likes, such as an integer, variable name, list, or Tcl
script. Different commands interpret their words differently.
3 Words of a command are separated by white space (except for newlines, which are
command separators).
4 If the first character of a word is double-quote (""") then the word is terminated by the
next double-quote character. If semi-colons, close brackets, or white space characters
(including newlines) appear between the quotes then they are treated as ordinary
if replaced by the Tcl if command, see "if command syntax"
(10-245) for more information
list add list
(CR-19)
nolist | nowave delete (CR-40) with either list or wave specified
set replaced by the Tcl set command, see "set command
syntax"
(10-246) for more information
source vsource
(CR-159)
wave add wave (CR-23)
Previous ModelSim command Command changed to (or replaced by)