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-494 20 - Tcl <strong>and</strong> macros (DO files)<br />

The Debugger<br />

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

procedures, Popup the debugger window or Exit TDebug. Exiting from TDebug doesn't<br />

terminate <strong>ModelSim</strong>, it merely detaches from vsim.op_, restoring all prepared procedures<br />

to their unmodified state.<br />

Select the Popup button in the Chooser to open the debugger window.<br />

The debugger window is divided into the main region with the name of the current<br />

procedure (Proc), a listing in which the expression just executed is highlighted, the Result<br />

of this execution <strong>and</strong> the currently available Variables <strong>and</strong> their values, an entry to Eval<br />

expressions in the context of the current procedure, <strong>and</strong> some button controls for the state<br />

of the debugger.<br />

A procedure listing displayed in the main region will have a darker background on all lines<br />

that have been prepared. You can prepare or restore additional lines by selecting a region<br />

(, st<strong>and</strong>ard selection) <strong>and</strong> choosing Selection > Prepare Proc or Selection ><br />

Restore Proc from the debugger menu (or by pressing ^P or ^R).<br />

When using `Prepare' <strong>and</strong> `Restore', try to be smart about what you intend to do. If you<br />

select just a single word (plus some optional white space) it will be interpreted as the name<br />

of a procedure to prepare or restore. Otherwise, if the selection is owned by the listing, the<br />

corresponding lines will be used.<br />

Be careful with partial prepare or restore! If you prepare r<strong>and</strong>om lines inside a `switch' or<br />

`bind' expression, you may get surprising results on execution, because the parser doesn't<br />

know about the surrounding expression <strong>and</strong> can't try to prevent problems.

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

Saved successfully!

Ooh no, something went wrong!