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.

UM-58 3 - Design libraries<br />

Design library overview<br />

Design unit information<br />

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

A design library is a directory or archive that serves as a repository for compiled design<br />

units. The design units contained in a design library consist of VHDL entities, packages,<br />

architectures, <strong>and</strong> configurations; Verilog modules <strong>and</strong> UDPs (user-defined primitives);<br />

<strong>and</strong> SystemC modules. The design units are classified as follows:<br />

Primary design units<br />

Consist of entities, package declarations, configuration declarations, modules, UDPs,<br />

<strong>and</strong> SystemC modules. Primary design units within a given library must have unique<br />

names.<br />

Secondary design units<br />

Consist of architecture bodies, package bodies, <strong>and</strong> optimized Verilog modules.<br />

Secondary design units are associated with a primary design unit. Architectures by the<br />

same name can exist if they are associated with different entities or modules.<br />

The information stored for each design unit in a design library is:<br />

retargetable, executable code<br />

debugging information<br />

dependency information<br />

Working library versus resource libraries<br />

Design libraries can be used in two ways: 1) as a local working library that contains the<br />

compiled version of your design; 2) as a resource library. The contents of your working<br />

library will change as you update your design <strong>and</strong> recompile. A resource library is typically<br />

static <strong>and</strong> serves as a parts source for your design. You can create your own resource<br />

libraries, or they may be supplied by another design team or a third party (e.g., a silicon<br />

vendor).<br />

Only one library can be the working library. In contrast any number of libraries can be<br />

resource libraries during a compilation. You specify which resource libraries will be used<br />

when the design is compiled, <strong>and</strong> there are rules to specify in which order they are searched<br />

(see "Specifying the resource libraries" (UM-64)).<br />

A common example of using both a working library <strong>and</strong> a resource library is one where<br />

your gate-level design <strong>and</strong> testbench are compiled into the working library, <strong>and</strong> the design<br />

references gate-level models in a separate resource library.<br />

The library named "work"<br />

The library named "work" has special attributes within <strong>ModelSim</strong>; it is predefined in the<br />

compiler <strong>and</strong> need not be declared explicitly (i.e. library work). It is also the library name<br />

used by the compiler as the default destination of compiled design units (i.e., it doesn’t need<br />

to be mapped). In other words the work library is the default working library.

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

Saved successfully!

Ooh no, something went wrong!