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.

<strong>ModelSim</strong> Tcl time comm<strong>and</strong>s<br />

Conversions<br />

Relations<br />

<strong>ModelSim</strong> Tcl time comm<strong>and</strong>s UM-481<br />

<strong>ModelSim</strong> Tcl time comm<strong>and</strong>s make simulator-time-based values available for use within<br />

other Tcl procedures.<br />

Time values may optionally contain a units specifier where the intervening space is also<br />

optional. If the space is present, the value must be quoted (e.g. 10ns, "10 ns"). Time values<br />

without units are taken to be in the UserTimeScale. Return values are always in the current<br />

Time Scale Units. All time values are converted to a 64-bit integer value in the current Time<br />

Scale. This means that values smaller than the current Time Scale will be truncated to 0.<br />

Comm<strong>and</strong> Description<br />

intToTime converts two 32-bit pieces (high <strong>and</strong> low<br />

order) into a 64-bit quantity (Time in<br />

<strong>ModelSim</strong> is a 64-bit integer)<br />

RealToTime converts a number to a 64-bit integer<br />

in the current Time Scale<br />

scaleTime returns the value of multiplied by the<br />

integer<br />

Comm<strong>and</strong> Description<br />

eqTime evaluates for equal<br />

neqTime evaluates for not equal<br />

gtTime evaluates for greater than<br />

gteTime evaluates for greater than or equal<br />

ltTime evaluates for less than<br />

lteTime evaluates for less than or equal<br />

All relation operations return 1 or 0 for true or false respectively <strong>and</strong> are suitable return<br />

values for TCL conditional expressions. For example,<br />

if {[eqTime $Now 1750ns]} {<br />

...<br />

}<br />

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

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

Saved successfully!

Ooh no, something went wrong!