Re: [sv-bc] Interface issues

From: Francoise Martinolle <fm@cadence.com>
Date: Tue Mar 09 2004 - 12:05:15 PST

Peter,

what you said is true, I should have expressed my concern as:

    it would facilitate the parser task if the keyword interface were
required for an interface declaration (no unnecessary lookup for type
names), additionally it would improve readability and understandability of
the code and help catch user errors at parse time rather than at
elaboration. For example, in the current state, if a user forgets to make
the type "myI" visible in the module variable "i "is declared, the parser
will complete successfully and the elaborator will expect to find myI as an
interface and would issue a message that myI cannot be resolved. All this
pain can be suppressed by adding the keyword interface for an interface
declaration. I think it would nicer if the parser could tell you
immediately that the type myI is used but not visible in that context.

Francoise
        '

At 04:00 PM 3/9/2004 +0000, you wrote:
>Hi Francoise,
>
>If myl is not a typedef or a class, then you know that i must be an interface.
>
>Regards,
>
>Peter
>
>At 17:48 05/03/2004 -0500, Francoise Martinolle wrote:
>>5) ambiguity of interface declarations with variable declarations
>>-------------------------------------------------------------------------------------------
>>When a module has an interface port and uses the non ansi port
>>declaration, the compiler cannot determine if it was an interface
>>declaration or a variable declaration.
>>Ex:
>>
>>module ( i);
>>myI i; // what is i? an interface or a variable, we cannot determine
>>until the resolution of myI is completed.
>>
>>Suggestion is to add the keyword interface before myI:
>>interface myI i;
>
>
Received on Tue Mar 9 12:05:23 2004

This archive was generated by hypermail 2.1.8 : Tue Mar 09 2004 - 12:05:31 PST