User`s manual
Preference variables located in TCL files
ModelSim Xilinx User’s Manual ModelSim Variables A-271
Preference variables located in TCL files
ModelSim TCL preference variables give you control over fonts, colors, prompts,
window positions and other simulator window characteristics. Preference files,
which contain Tcl commands that set preference variables, are loaded before any
windows are created, and so will affect all windows.
When ModelSim is invoked for the first time, default preferences are loaded from
the pref.tcl file. Customized variable settings may be set from within the
ModelSim GUI or by directly editing the preference file.
The default file for customized preferences is modelsim.tcl. If your preference file
is not named modelsim.tcl, you must refer to it with the MODELSIM_TCL
(A-256)
environment variable.
User-defined variables
Temporary user-defined variables can be created with the Tcl set command. Like
simulator variables, user-defined variables are preceded by a dollar sign when
referenced. To create a variable with the set command:
set user1 7
You can use the variable in a command like:
echo "user1 = $user1"
Viewing the default preference file (pref.tcl)
This documentation covers the categories of preference variables found in the
pref.tcl file. You can open the file in any text editor to see a complete listing of the
default preferences. See "Setting Tcl preference variables"
(A-276) before you
change any of the preferences.
Note: If you do open and edit a TCL file, make sure you save it as plain text, otherwise it will not be
properly interpreted by ModelSim.