User`s manual
Preference variable loading order
A-282 ModelSim Variables ModelSim Xilinx User’s Manual
Preference variable loading order
ModelSim .tcl, INI, and MPF files all contain variables that are loaded when you
start ModelSim. The files are evaluated for variable settings in the order below.
.tcl file variables are evaluated before the design is loaded
ModelSim evaluates .tcl files prior to loading a design for simulation.
1 The <install_dir>/modeltech/tcl/vsim/pref.tcl file is always loaded.
2 The file specified by the MODELSIM_TCL
(A-256) environment variable is loaded
next,
3 if MODELSIM_TCL does not exist, the modelsim.tcl in the current directory is
evaluated,
4 or if MODELSIM_TCL and ./modelsim.tcl do not exist, the file specified by the
HOME
(A-255) environment variable used.
INI and MPF file variables are evaluated after the design is loaded
After the design is loaded, INI or MPF file variables are found in these locations:
1 First the location specified by the MODELSIM
(A-256) environment variable,
If no MODELSIM variable exists, ModelSim looks for MPF and INI files in the
locations shown below. Project files (MPF) are evaluated first, if no project file is
found, ModelSim looks for a INI file in the same location.
2 next in the current directory if no MODELSIM variable exists,
3 then in the directory where the executable exists (/install_dir/modeltech/<platform>),
4 finally in the parent of the directory where the executable is (/install_dir/modeltech).
Note: The MODELSIM variable is generally set to an INI file. Setting the variable to a MPF file is not
recommended since the file would contain project-specific information. Setting the MODELSIM variable to
a MPF file is only recommended for batch-mode usage.