Technical data

Referencing source files with location maps
ModelSim EE/PLUS Reference Manual Tips and Techniques
-
539
See "System Initialization/Project File" (p413) for more information on
modifying the
modelsim.ini
file. Also see "Installed technotes" (p28) for more
information on Tcl commands. And see "Simulator control variables" (p253) for
more information on Tcl variables.
Referencing source files with location maps
Pathnames to source files are recorded in libraries by storing the working directory
from which the compile is invoked and the pathname to the file as specified in the
invocation of the compiler. The pathname may be either a complete pathname or
a relative pathname.
Model
Sim
tools that reference source files from the library, such as VSIM in the
Source window, locate a source file as follows:
• If the pathname stored in the library is complete, then this is the path used to
reference the file.
• If the pathname is relative, then the tool looks for the file relative to the current
working directory. If this file does not exist, then the path relative to the working
directory stored in the library is used.
This method of referencing source files generally works fine if the libraries are
created and used on a single system. However, when multiple systems access a
library across a network the physical pathnames are not always the same and the
source file reference rules do not always work.
Usin
g
location mappin
g
Location maps are used to replace prefixes of physical pathnames in the library
with environment variables. The location map defines a mapping between
physical pathname prefixes and environment variables.
Model
Sim
tools open the location map file on invocation if the
MGC_LOCATION_MAP (p55) environment variable is set. If
MGC_LOCATION_MAP is not set, Model
Sim
will look for a file named
"mgc_location_map"
in the following locations, in order:
• the current directory
• your home directory
• the directory containing the Model
Sim
binaries
• the Model
Sim
installation directory