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-82 4 - VHDL simulation<br />

Simulating with an elaboration file<br />

Overview<br />

Elaboration file flow<br />

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

The <strong>ModelSim</strong> compiler generates a library format that is compatible across platforms.<br />

This means the simulator can load your design on any supported platform without having<br />

to recompile first. Though this architecture offers a benefit, it also comes with a possible<br />

detriment: the simulator has to generate platform-specific code every time you load your<br />

design. This impacts the speed with which the design is loaded.<br />

Starting with <strong>ModelSim</strong> version 5.6, you can generate a loadable image (elaboration file)<br />

which can be simulated repeatedly. On subsequent simulations, you load the elaboration<br />

file rather than loading the design "from scratch." Elaboration files load quickly.<br />

Why an elaboration file?<br />

In many cases design loading time is not that important. For example, if you’re doing<br />

"iterative design," where you simulate the design, modify the source, recompile <strong>and</strong><br />

resimulate, the load time is just a small part of the overall flow. However, if your design is<br />

locked down <strong>and</strong> only the test vectors are modified between runs, loading time may<br />

materially impact overall simulation time, particularly for large designs loading SDF files.<br />

Another reason to use elaboration files is for benchmarking purposes. Other simulator<br />

vendors use elaboration files, <strong>and</strong> they distinguish between elaboration <strong>and</strong> run times. If<br />

you are benchmarking <strong>ModelSim</strong> against another simulator that uses elaboration, make<br />

sure you use an elaboration file with <strong>ModelSim</strong> as well so you’re comparing like to like.<br />

One caveat with elaboration files is that they must be created <strong>and</strong> used in the same<br />

environment. The same environment means the same hardware platform, the same OS <strong>and</strong><br />

patch version, <strong>and</strong> the same version of any PLI/FLI code loaded in the simulation.<br />

We recommend the following flow to maximize the benefit of simulating elaboration files.<br />

1 If timing for your design is fixed, include all timing data when you create the elaboration<br />

file (using the -sdf instance= argument). If your timing is not fixed<br />

in a Verilog design, you’ll have to use $sdf_annotate system tasks. Note that use of<br />

$sdf_annotate causes timing to be applied after elaboration.<br />

2 Apply all normal vsim arguments when you create the elaboration file. Some arguments<br />

(primarily related to stimulus) may be superseded later during loading of the elaboration<br />

file (see "Modifying stimulus" (UM-84) below).<br />

3 Load the elaboration file along with any arguments that modify the stimulus (see below).

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

Saved successfully!

Ooh no, something went wrong!