User`s manual

Design library contents
2-24 Design Libraries ModelSim Xilinx Users Manual
Design library contents
A design library is a directory that serves as a repository for compiled design
units. The design units contained in a design library consist of VHDL entities,
packages, architectures, configurations, and Verilog modules and UDPs (user
defined primitives). The design units are classed as follows:
Primary design units
Consists of entities, package declarations, configuration declarations, modules,
and UDPs. Primary design units within a given library must have unique names.
Secondary design units
Consist of architecture bodies and package bodies. Secondary design units are
associated with a primary design unit. Architectures by the same name can exist
if they are associated with different entities.
Design unit information
The information stored for each design unit in a design library is:
retargetable, executable code
debugging information
dependency information
Design library types
There are two kinds of design libraries: working libraries and resource libraries.
A working library is the library into which a design unit is placed after
compilation. A resource library contains design units that can be referenced
within the design unit being compiled. Only one library can be the working
library; in contrast, any number of libraries (including the working library itself)
can be resource libraries during the compilation.
The library named work has special attributes within ModelSim; it is predefined
in the compiler and need not be declared explicitly (i.e. library work). It is also
the library name used by the compiler as the default destination of compiled
design units. In other words the work library is the working library. In all other
aspects it is the same as any other library.