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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

UM-24 1 - Introduction<br />

Basic steps for simulation<br />

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

This section provides further detail related to each step in the process of simulating your<br />

design using <strong>ModelSim</strong>.<br />

Step 1 - Collecting Files <strong>and</strong> Mapping Libraries<br />

Files needed to run <strong>ModelSim</strong> on your design:<br />

design files (VHDL, Verilog, <strong>and</strong>/or Sy stemC), including stimulus for the design<br />

libraries, both working <strong>and</strong> resource<br />

modelsim.ini (automatically creat ed by the library mapping comm<strong>and</strong><br />

Providing stimulus to the design<br />

You can provide stimulus to your design in several ways:<br />

Language based testbench<br />

Tcl-based <strong>ModelSim</strong> interactive comm<strong>and</strong>, force (CR-180)<br />

VCD files / comm<strong>and</strong>s<br />

See "Using extended VCD as stimulus" (UM-458) <strong>and</strong> "Using extended VCD as stimulus"<br />

(UM-458)<br />

3rd party testbench generation tools<br />

What is a library in <strong>ModelSim</strong>?<br />

A library is a location where data to be used for simulation is stored. Libraries are<br />

<strong>ModelSim</strong>’s way of managing the creation of data before it is needed for use in simulation.<br />

It also serves as a way to streamline simulation invocation. Instead of compiling all design<br />

data each <strong>and</strong> every time you simulate, <strong>ModelSim</strong> uses binary pre-compiled data from these<br />

libraries. So, if you make a changes to a single Verilog module, only that module is<br />

recompiled, rather than all modules in the design.<br />

Working <strong>and</strong> 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 />

unchanging, <strong>and</strong> serves as a parts source for your design. Examples of resource libraries<br />

might be: shared information within your group, vendor libraries, packages, or previously<br />

compiled elements of your own working 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 />

For more information on resource libraries <strong>and</strong> working libraries, see "Working library<br />

versus resource libraries" (UM-58), "Managing library contents" (UM-61), "Working with<br />

design libraries" (UM-60), <strong>and</strong> "Specifying the resource libraries" (UM-64).<br />

Creating the logical library - vlib<br />

Before you can compile your source files, you must create a library in which to store the<br />

compilation results. You can create the logical library using the GUI, using File > New >

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

Saved successfully!

Ooh no, something went wrong!