Initialization sequence
The following list describes in detail ModelSim's initialization sequence. The sequence includes a number of conditional structures, the results of which are determined by the existence of certain files and the current settings of environment variables.
In the steps below, names in uppercase denote environment variables (except MTI_LIB_DIR which is a Tcl variable). Instances of $(NAME) denote paths that are determined by an environment variable (except $(MTI_LIB_DIR) which is determined by a Tcl variable).
- Determines the path to the executable directory (../modeltech/<platform>/). Sets MODEL_TECH to this path, unless MODEL_TECH_OVERRIDE exists, in which case MODEL_TECH is set to the same value as MODEL_TECH_OVERRIDE.
- Finds the modelsim.ini file by evaluating the following conditions:
- use MODELSIM if it exists; else
- use $(MGC_WD)/modelsim.ini; else
- use ./modelsim.ini; else
- use $(MODEL_TECH)/modelsim.ini; else
- use $(MODEL_TECH)/../modelsim.ini; else
- use $(MGC_HOME)/lib/modelsim.ini; else
- set path to ./modelsim.ini even though the file doesn't exist
- Finds the location map file by evaluating the following conditions:
- use MGC_LOCATION_MAP if it exists (if this variable is set to "no_map", ModelSim skips initialization of the location map); else
- use mgc_location_map if it exists; else
- use $(HOME)/mgc/mgc_location_map; else
- use $(HOME)/mgc_location_map; else
- use $(MGC_HOME)/etc/mgc_location_map; else
- use $(MGC_HOME)/shared/etc/mgc_location_map; else
- use $(MODEL_TECH)/mgc_location_map; else
- use $(MODEL_TECH)/../mgc_location_map; else
- use no map
- Reads various variables from the [vsim] section of the modelsim.ini file. See "[vsim] simulator control variables" for more details.
- Parses any command line arguments that were included when you started ModelSim and reports any problems.
- Defines the following environment variables:
- use MODEL_TECH_TCL if it exists; else
- set MODEL_TECH_TCL=$(MODEL_TECH)/../tcl
- set TCL_LIBRARY=$(MODEL_TECH_TCL)/tcl8.0
- set TK_LIBRARY=$(MODEL_TECH_TCL)/tk8.0
- set TIX_LIBRARY=$(MODEL_TECH_TCL)/tix4.1
- set ITCL_LIBRARY=$(MODEL_TECH_TCL)/itcl3.0
- set ITK_LIBRARY=$(MODEL_TECH_TCL)/itk3.0
- set VSIM_LIBRARY=$(MODEL_TECH_TCL)/vsim
- Initializes the simulator's Tcl interpreter.
- Checks for a valid license (a license is not checked out unless specified by a modelsim.ini setting or command line option).
The next four steps relate to initializing the graphical user interface.
- Sets Tcl variable "MTI_LIB_DIR"=MODEL_TECH_TCL
- Loads $(MTI_LIB_DIR)/pref.tcl.
- Loads last working directory, project init, project history, and printer defaults from the registry (Windows) or $(HOME)/.modelsim (UNIX).
- Finds the modelsim.tcl file by evaluating the following conditions:
That completes the initialization sequence. Also note the following about the modelsim.ini file:
- When you change the working directory within ModelSim, the tool reads the [library], [vcom], and [vlog] sections of the local modelsim.ini file. When you make changes in the compiler options dialog or use the vmap command, the tool updates the appropriate sections of the file.
- The pref.tcl file references the default .ini file via the [GetPrivateProfileString] Tcl command. The .ini file that is read will be the default file defined at the time pref.tcl is loaded.
Model Technology Incorporated Voice: (503) 641-1340 Fax: (503)526-5410 www.model.com sales@model.com |