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-538 B - <strong>ModelSim</strong> variables<br />

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

Using a startup file<br />

The system initialization file allows you to specify a comm<strong>and</strong> or a do file that is to be<br />

executed after the design is loaded. For example:<br />

; VSIM Startup comm<strong>and</strong><br />

Startup = do mystartup.do<br />

The line shown above instructs <strong>ModelSim</strong> to execute the comm<strong>and</strong>s in the macro file<br />

named mystartup.do.<br />

; VSIM Startup comm<strong>and</strong><br />

Startup = run -all<br />

The line shown above instructs VSIM to run until there are no events scheduled.<br />

See the do comm<strong>and</strong> (CR-151) for additional information on creating do files.<br />

Turning off assertion messages<br />

You can turn off assertion messages from your VHDL code by setting a switch in the<br />

modelsim.ini file. This option was added because some utility packages print a huge<br />

number of warnings.<br />

[vsim]<br />

IgnoreNote = 1<br />

IgnoreWarning = 1<br />

IgnoreError = 1<br />

IgnoreFailure = 1<br />

Turning off warnings from arithmetic packages<br />

You can disable warnings from the Synopsys <strong>and</strong> numeric st<strong>and</strong>ard packages by adding the<br />

following lines to the [vsim] section of the modelsim.ini file.<br />

[vsim]<br />

NumericStdNoWarnings = 1<br />

StdArithNoWarnings = 1<br />

These variables can also be set interactively using the Tcl set comm<strong>and</strong> (UM-477). This<br />

capability provides an answer to a common question about disabling warnings at time 0.<br />

You might enter comm<strong>and</strong>s like the following in a DO file or at the <strong>ModelSim</strong> prompt:<br />

set NumericStdNoWarnings 1<br />

run 0<br />

set NumericStdNoWarnings 0<br />

run -all<br />

Alternatively, you could use the when comm<strong>and</strong> (CR-407) to accomplish the same thing:<br />

when {$now = @1ns } {set NumericStdNoWarnings 1}<br />

run -all<br />

Note that the time unit (ns in this case) would vary depending on your simulation<br />

resolution.

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

Saved successfully!

Ooh no, something went wrong!