Working with design libraries
The implementation of a design library is not defined within standard VHDL or Verilog. Within ModelSim, design libraries are implemented as directories and can have any legal name allowed by the operating system, with one exception; extended identifiers are not supported for library names.
Creating a library
When you create a project (see "Getting started with projects" ), ModelSim automatically creates a working design library. If you don't create a project, you need to create a working design library before you run the compiler. This can be done from either the command line or from the ModelSim graphic interface.
From the ModelSim prompt or a UNIX/DOS prompt, use this vlib command:
vlib <directory_pathname>To create a new library with the ModelSim graphic interface, select Design > Create a New Library (Main window). This brings up a dialog box that allows you to specify the library name and its logical mapping.
The Create a New Library dialog box includes these options:
- Create a new library and a logical mapping to it
Type the new library name into the Library Name field. This creates a library sub-directory in your current working directory, initially mapped to itself. Once created, the mapped library is easily remapped to a different library.- Create a map to an existing library
Type the new library name into the Library Name field, then type into the Library Maps to field or Browse to select a library name for the mapping.- Library Name
Type the new library name into this field.- Library Maps to
Type or Browse for a mapping for the specified library. This field can be changed only when the Create a map to an existing library option is selected.When you click OK, ModelSim creates the specified library directory and writes a specially-formatted file named _info into that directory. The _info file must remain in the directory to distinguish it as a ModelSim library.
The new map entry is written to the modelsim.ini file in the [Library] section. See "[Library] library path variables" for more information.
Note: Remember that a design library is a special kind of directory; the only way to create a library is to use the ModelSim GUI or the vlib command. Do not create libraries using UNIX or Windows commands.
Model Technology Incorporated Voice: (503) 641-1340 Fax: (503)526-5410 www.model.com sales@model.com |