24.03.2013 Views

ModelSim SE User's Manual - Electrical and Computer Engineering

ModelSim SE User's Manual - Electrical and Computer Engineering

ModelSim SE User's Manual - Electrical and Computer Engineering

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Referencing source files with location maps<br />

Using location mapping<br />

Referencing source files with location maps UM-67<br />

Pathnames to source files are recorded in libraries by storing the working directory from<br />

which the compile is invoked <strong>and</strong> the pathname to the file as specified in the invocation of<br />

the compiler. The pathname may be either a complete pathname or a relative pathname.<br />

<strong>ModelSim</strong> tools that reference source files from the library locate a source file as follows:<br />

If the pathname stored in the library is complete, then this is the path used to reference<br />

the file.<br />

If the pathname is relative, then the tool looks for the file relative to the current working<br />

directory. If this file does not exist, then the path relative to the working directory stored<br />

in the library is used.<br />

This method of referencing source files generally works fine if the libraries are created <strong>and</strong><br />

used on a single system. However, when multiple systems access a library across a<br />

network, the physical pathnames are not always the same <strong>and</strong> the source file reference rules<br />

do not always work.<br />

Location maps are used to replace prefixes of physical pathnames in the library with<br />

environment variables. The location map defines a mapping between physical pathname<br />

prefixes <strong>and</strong> environment variables.<br />

<strong>ModelSim</strong> tools open the location map file on invocation if the MGC_LOCATION_MAP<br />

(UM-521) environment variable is set. If MGC_LOCATION_MAP is not set, <strong>ModelSim</strong><br />

will look for a file named "mgc_location_map" in the following locations, in order:<br />

the current directory<br />

your home directory<br />

the directory containing the <strong>ModelSim</strong> binaries<br />

the <strong>ModelSim</strong> installation directory<br />

Use these two steps to map your files:<br />

1 Set the environment variable MGC_LOCATION_MAP to the path to your location map<br />

file.<br />

2 Specify the mappings from physical pathnames to logical pathnames:<br />

$SRC<br />

/home/vhdl/src<br />

/usr/vhdl/src<br />

$IEEE<br />

/usr/modeltech/ieee<br />

<strong>ModelSim</strong> <strong>SE</strong> User’s <strong>Manual</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!