From: Shalom.Bresticker@motorola.com
Date: Fri Feb 06 2004 - 01:40:00 PST
The following reply was made to PR errata/16; it has been noted by GNATS.
From: Shalom.Bresticker@motorola.com
To: etf-bugs@boyd.com
Cc:
Subject: Re: errata/16: 19.7 `line - meaning of level parameter is unclear
Date: Fri, 6 Feb 2004 11:39:35 +0200 (IST)
This is an attempt at a new proposal for this issue (and #291 also).
It is a rewrite of the entire section. Some of the proposed text comes from
the NCV LRM, assuming that no one minds.
In a following mail, I will present some questions/problems I still have.
The proposal or some variation of it could still be passed, leaving the
questions open as a new issue.
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 an 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, no tool is 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 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 directive can be specified anywhere within the Verilog HDL source
description. 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. All parameters in the `line directive are required.
Example:
`line 3 "orig.v" 2 // Next line is line 3 of orig.v after exiting include file
The results of this file are not affected by the `resetall directive. As the
compiler processes the remainder of the file and new files, the line 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.
On Sun, 12 Aug 2001 Shalom.Bresticker@motorola.com wrote:
> In 19.7 (`line): "The level parameter indicates whether an
> include file has been entered (value is 1), an include file
> is existed (value is), or neither has been done(value is 0)."
>
> This sentence is incomprehensible to me.
>
> At the very least, an example or examples must be added.
--
Shalom Bresticker Shalom.Bresticker@motorola.com
Design, Verification & Reuse Methodology Tel: +972 9 9522268
Motorola Semiconductor Israel, Ltd. Fax: +972 9 9522890
POB 2208, Herzlia 46120, ISRAEL Cell: +972 50 441478
This archive was generated by hypermail 2.1.4
: Fri Feb 06 2004 - 01:40:03 PST
and
sponsored by Boyd Technology, Inc.