From: Shalom.Bresticker@motorola.com
Date: Tue May 04 2004 - 07:23:44 PDT
REWRITE 19.7 as follows:
19.7 `line
It is important for Verilog tools to keep track of the filenames of the
Verilog source files and the line numbers in the files. This information
can be used for error messages or source code debugging, and can be
accessed by the Verilog PLI.
In many cases, however, the Verilog source is preprocessed by some other
tool, and the line and file information of the original source file can
be lost because the preprocessor might add additional lines to the source
code file, combine multiple source code lines into one line, concatenate
multiple source files, and so on.
The `line compiler directive can be used to specify the original source
code line number and filename. This allows the location in the original
file to be maintained if another process modifies the source. After the
new line number and filename are specified, the compiler can correctly
refer to the original source location. However, a tool is not required to
produce `line directives. These directives are not intended to be inserted
manually into the code, although they can be.
The compiler shall maintain the current line number and filename
of the file being compiled. The `line directive shall set the current line
number and filename to those specified in the directive.
The directive can be specified anywhere within the Verilog HDL source
description. However, only white space may appear on the
same line as the `line directive.
All parameters in the `line directive are required.
The results of this file are not affected by the `resetall directive.
The syntax for the `line directive is given in Syntax 19-7.
line_compiler_directive ::=
`line number "filename" level
Syntax 19-7 Syntax for `line compiler directive
The number parameter shall be a positive integer that specifies
the new line number of the following text line. The filename parameter shall
be a string constant that is treated as the new name of the file. The filename
can also be a full or relative path name. The level parameter shall be 0, 1,
or 2. The value 1 indicates that the following line is the first line after
an include file has been entered. The value 2 indicates that the following line
is the first line after an include file has been exited. The value 0 indicates
any other line.
Example:
`line 3 "orig.v" 2 // Next line is line 3 of orig.v after exiting include file
As the compiler processes the remainder of the file and new
files, the line number shall be incremented as each line is
read and the name shall be updated to the new current file
being processed. The line number shall be reset to 1 at the
beginning of each file. When beginning to read include files, the current line
and filename shall be stored for restoration at the termination of the include
file. The updated line number and filename information shall be available for
PLI access. The mechanism of library searching is not affected by the effects
of the `line compiler directive.
http://boydtechinc.com/cgi-bin/issueproposal.pl?cmd=view&database=default&pr=16
This archive was generated by hypermail 2.1.4
: Tue May 04 2004 - 07:23:47 PDT
and
sponsored by Boyd Technology, Inc.