RE: [sv-bc] Merged LRM/D2, 21.3: `include

From: Gran, Alex <alex_gran_at_.....>
Date: Wed May 30 2007 - 15:21:59 PDT
There was a 'general' section added to Sec 21 in D3 so `include is now
21.4
Reading this Section 21.4 again, I am of the opinion that we should
explicitly state the behavior for the double quote "filename" case.

How does something like this sound?

	The filename can be enclosed in either quotes or angle brackets,
which affects how a
	tool searches for the file.

	- When the filename is enclosed in angle brackets (<filename>),
then only the vendor-defined 
	location containing files defined by the language standard is
searched. Relative path 
	names given inside the < > are interpreted relative to the
vendor-defined location in 
	all cases.
	
	- When the filename is enclosed in double quotes ("filename"),
**for relative paths the
	compiler's current working directory, and optionally an
implementation specific 
	include-file-search-directory specified by user is searched.**

	When the filename is an absolute path, only that filename is
included and only the double
	quote form of the `include can be used.


Since this is plain text, I can't do fancy things with colors and
strikethroughs so I've but **s around the new text I have added
  
~Alex



________________________________

From: owner-sv-bc@server.eda.org [mailto:owner-sv-bc@server.eda.org] On
Behalf Of Bresticker, Shalom
Sent: Sunday, April 22, 2007 7:06 AM
To: stuart@sutherland-hdl.com
Cc: sv-bc@server.eda-stds.org
Subject: [sv-bc] Merged LRM/D2, 21.3: `include


 

In 21.3 of Merged LRM Draft 2, on `include, this is the text from
1800-2005:

The syntax of the `include compiler directive is as follows:

include_compiler_directive ::=
    `include "filename"
  | `include <filename>

When the filename is an absolute path, only that filename is included
and only the double quote form of the `include can be used.

When the double quote ("filename") version is used, the behavior of
`include is unchanged from Verilog.

When the angle bracket (<filename>) notation is used, then only the
vendor-defined location containing files defined by the language
standard is searched. Relative path names given inside the < > are
interpreted relative to the vendor-defined location in all cases.

Stu asked, what is this "unchanged from Verilog"?

Answer: Since absolute paths are allowed only with double quotes, assume
we have only a filename or a relative path. With double quotes, the file
is searched in the current working directory or in an
include-file-search-directory specified by user with switch such as
+incdir. With angle brackets, the vendor-defined location containing
files defined by the language standard is searched. Relative path names
given inside the < > are interpreted relative to the vendor-defined
location in all cases.

Shalom

 

Shalom Bresticker

Intel Jerusalem LAD DA

+972 2 589-6852

+972 54 721-1033 

 


-- 
This message has been scanned for viruses and 
dangerous content by MailScanner <http://www.mailscanner.info/> , and is

believed to be clean. 

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Wed May 30 15:22:30 2007

This archive was generated by hypermail 2.1.8 : Wed May 30 2007 - 15:22:52 PDT