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.

Compiler directives<br />

Compiler directives UM-153<br />

<strong>ModelSim</strong> Verilog supports all of the compiler directives defined in the IEEE Std 1364,<br />

some Verilog-XL compiler directives, <strong>and</strong> some that are proprietary.<br />

Many of the compiler directives (such as `timescale) take effect at the point they are<br />

defined in the source code <strong>and</strong> stay in effect until the directive is redefined or until it is reset<br />

to its default by a `resetall directive. The effect of compiler directives spans source files,<br />

so the order of source files on the compilation comm<strong>and</strong> line could be significant. For<br />

example, if you have a file that defines some common macros for the entire design, then<br />

you might need to place it first in the list of files to be compiled.<br />

The `resetall directive affects only the following directives by resetting them back to their<br />

default settings (this information is not provided in the IEEE Std 1364):<br />

`celldefine<br />

‘default_decay_time<br />

`default_nettype<br />

`delay_mode_distributed<br />

`delay_mode_path<br />

`delay_mode_unit<br />

`delay_mode_zero<br />

`protected<br />

`timescale<br />

`unconnected_drive<br />

`uselib<br />

<strong>ModelSim</strong> Verilog implicitly defines the following macro:<br />

`define MODEL_TECH<br />

IEEE Std 1364 compiler directives<br />

The following compiler directives are described in detail in the IEEE Std 1364.<br />

`celldefine<br />

`default_nettype<br />

`define<br />

`else<br />

`elsif<br />

`endcelldefine<br />

`endif<br />

`ifdef<br />

‘ifndef<br />

`include<br />

‘line<br />

`nounconnected_drive<br />

`resetall<br />

`timescale<br />

`unconnected_drive<br />

`undef<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!