RE: [sv-bc] Import directive proposal


Subject: RE: [sv-bc] Import directive proposal
From: David W. Smith (david.smith@synopsys.com)
Date: Tue Mar 18 2003 - 14:10:07 PST


Hello Peter,
You should be aware that the SV-EC has approved the following alternative
for `include:
 
`include <filename>
 
This is detailed in Section 23.3 (from CH-119 on the SV-EC) which is the
following:
 
23.3 `include

The syntax of the `include compiler directive is:

      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 IEEE Std. 1364-2001.

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

I would recommend that you consider supporting the same in your `import
proposal. Not to mention we have both created 23.3 :).
 
Regards
David

 <http://www.synopsys.com/>

-----Original Message-----
From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Peter
Flake
Sent: Friday, March 14, 2003 6:42 AM
To: sv-bc@eda.org
Cc: Arturo Salz
Subject: [sv-bc] Import directive proposal

ADD to draft 3 a new Section 23.3

23.3 Import directive

For tools which require separate analysis of modules, it is useful to be
able to `include a file of global definitions for each module. For tools
which analyze modules all together, it is necessary to avoid multiple
definitions, and so each such file should be included only once.

SystemVerilog provides an enhanced form of the `include directive, which is
the `import directive
        `import "myhead"

is similar in effect to
        `ifndef myhead
        `include "myhead"
        `define myhead
        `endif

Note that 'import is not exactly the same as the above code, because the
filename string is converted to a description of the file, such as the
absolute path, which is less sensitive to the current working directory.



This archive was generated by hypermail 2b28 : Tue Mar 18 2003 - 14:11:51 PST