From: Adam Krolnik (adamk@cyrix.com)
Date: Mon Apr 26 1999 - 08:55:19 PDT
[Note: Removed proposal for `if functionality.]
B29: Line and File compiler directive.
Justifications:
The line number compiler directive is useful for source to source
translators to reflect original file/line numbers to the compiler for
future reference to the original source code. In order for this
information to be useful there must be a single syntax to accept this
information in order to properly report it.
Proposal:
Add section 16.7, `line
The compiler is expected to maintain current line and the filename of
the file being compiled. The line number (`line) compiler directive is
used to reset the current line number and filename of the current file
to the line number and filename presented. This can be used to reflect
the location in an original file - if the actual source file has been
modified by addition or reduction of lines. After specifying the new
line number or file name, the compiler can correctly refer to the
original source file location. For example error messages, source code
debugging, etc. can direct the user to the actual original line.
The syntax for the 'line compiler directive is given in Syntax 16-X.
line_compiler_directive ::=
`line number "filename" level
The directive can be specified anywhere within the Verilog HDL source
description. The number parameter is the new line number of the next
line. The filename parameter is the new name of the file. The filename
can be a full or relative path name. The level parameter indicates
whether you have entered (value is 1) an include file, exited (value is
2) an include file or (value is 0) have done neither.
The results of this directive are not affected by the compiler
directive `resetall. 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 filename will be updated to the new current file being
processed. 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.
<p> Adam Krolnik
Verification Engineer
Cyrix - NSC.
Richardson TX. 75085
This archive was generated by hypermail 2.1.4
: Mon Jul 08 2002 - 12:53:26 PDT
and
sponsored by Boyd Technology, Inc.