Re: [sv-bc] Proposal for compatibility problems with mixed Verilog/SystemVerilog code

From: <Shalom.Bresticker@freescale.com>
Date: Tue Nov 30 2004 - 08:08:40 PST

Hi, Adam.

On Tue, 30 Nov 2004, Adam Krolnik wrote:

> Hi Stuart;
>
> I've read your proposal and I have a few questions...
>
> 1. With the introduction of an end directive "`endkeywords", what shall the parser
> revert to? Can these directives be nested?
>
> `keywords "1364-2001"
>
> `keywords 1800-2005"
>
> ...
>
> `endkeywords
> `endkeywords
>
> Why follow the model of ifdef ... endif ?

I don't think they are intended to be nested, and therefore they are not following the model of `ifdef.

`ifdef was a natural need, a way to do "`ifdef (A & B)", which does not exist for other directives.
For `ifdef, it is also parallel to if-then constructs in all languages and preprocessors.

> 2. Why the quotations marks on the name? We should allow for other names there so that
> we do not have to list all the legal versions now, hoping that we don't miss one.

Why do quotation marks prevent allowing for other names?

> 3. You wrote:
>
> "It affects all modules, primitives, interfaces, programs or packages that follow the
> directive, even across source code file boundaries."
>
> Allowing this directive to cross file boundaries does not IMHO provide any benefit. Some
> compilers only read one file at a time while othes compile many. If one uses a single
> file compiler, then every old file needs the directive. Also, given alternative orders
> for compiling files, a simulation may stop compiliing due to a new file being compiled
> while the compiler is in a compatibility keyword mode.
>
> Yes, I know that the rest of the directives cross source code boundaries, but it would
> be nice to fix this particularly for this compatibility option. If this can be done,
> then it would also be nice to not follow the ifdef ... endif model and just terminate
> the compatibility mode at the end of a compiled file (not the same as an included file.)
> A user can then simply end the file and end the compatibilty mode, or be explicit and
> use the "default" option.

What compilers don't preserve compiler directives across all files?
An extremely high percentage of code depends on that.

Besides, if you are compiling an entire block of dozens or even hundreds
of files of old code, you don't want to have to add the directive on each
one.

Shalom

-- 
Shalom Bresticker                        Shalom.Bresticker @freescale.com
Design & Verification Methodology                    Tel: +972 9  9522268
Freescale Semiconductor Israel, Ltd.                 Fax: +972 9  9522890
POB 2208, Herzlia 46120, ISRAEL                     Cell: +972 50 5441478
  
[ ]Freescale Internal Use Only      [ ]Freescale Confidential Proprietary
Received on Tue Nov 30 08:08:52 2004

This archive was generated by hypermail 2.1.8 : Tue Nov 30 2004 - 08:08:55 PST