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-26 1 - Introduction<br />

Step 3 - Loading the design for simulation<br />

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

vsim <br />

Your design is ready for simulation after it has been compiled <strong>and</strong> (optionally) optimized<br />

with vopt (CR-371). For more information on optimization, see Optimizing Verilog<br />

designs (UM-124). You may then invoke vsim (CR-373) with the names of the top-level<br />

modules (many designs contain only one top-level module) or the name you assigned to the<br />

optimized version of the design. For example, if your top-level modules are "testbench" <strong>and</strong><br />

"globals", then invoke the simulator as follows:<br />

vsim testbench globals<br />

After the simulator loads the top-level modules, it iteratively loads the instantiated modules<br />

<strong>and</strong> UDPs in the design hierarchy, linking the design together by connecting the ports <strong>and</strong><br />

resolving hierarchical references.<br />

Using SDF<br />

Step 4 - Simulating the design<br />

Step 5- Debugging the design<br />

You can incorporate actual delay values to the simulation by applying SDF backannotation<br />

files to the design. For more information on how SDF is used in the design, see<br />

"Specifying SDF files for simulation" (UM-440).<br />

Once the design has been successfully loaded, the simulation time is set to zero, <strong>and</strong> you<br />

must enter a run comm<strong>and</strong> to begin simulation. For more information, see Verilog<br />

simulation (UM-111), VHDL simulation (UM-71), <strong>and</strong> SystemC simulation (UM-159).<br />

The basic simulator comm<strong>and</strong>s are:<br />

add wave (CR-52)<br />

force (CR-180)<br />

bp (CR-75)<br />

run (CR-252)<br />

step (CR-272)<br />

next (CR-207)<br />

Numerous tools <strong>and</strong> windows useful in debugging your design are available from the<br />

<strong>ModelSim</strong> GUI. For more information, seeWaveform analysis (UM-237), PSL Assertions<br />

(UM-359), <strong>and</strong>Tracing signals with the Dataflow window (UM-299).<br />

In addition, several basic simulation comm<strong>and</strong>s are available from the comm<strong>and</strong> line to<br />

assist you in debugging your design:<br />

describe (CR-147)<br />

drivers (CR-154)<br />

examine (CR-162)<br />

force (CR-180)<br />

log (CR-191)<br />

checkpoint (CR-93)<br />

restore (CR-248)<br />

show (CR-267)

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

Saved successfully!

Ooh no, something went wrong!