RE: Mantis 2593 about non-ANSI port declarations (Was: [sv-bc] Mantis 1111, omitting range on port declaration)

From: Steven Sharp <sharp_at_.....>
Date: Wed Apr 29 2009 - 18:20:52 PDT
>From: "Bresticker, Shalom" <shalom.bresticker@intel.com>

>> >Also, the reason that 1111 never passed was to allow "input 
>> in1" to be followed 
>> by "wire [5:0] in1" for back-compatibility.
>> >The proposed wording might disallow that.
>> 
>> As I said for 1111, I think the current wording disallows 
>> that.  This is
>> just a case where the "de facto" standard is to ignore the 
>> standard and
>> allow what Verilog-XL did.
>
>So you claim and I agree. However, other people have claimed that the current 
wording allows it by the word "if", saying that it says nothing about the "else" 
case.


This situation doesn't fall into the "else" case.  The LRM says

"If the net or variable is declared as a vector, the range specification
between the two declarations of a port shall be identical."

In this situation, the net is declared as a vector.  It falls into the "if"
case, not the "else" case.  The only argument that can be made about it
is to claim that a given range specification is identical to a missing
range specification.  Since that is not what "identical" means, such an
argument would be wrong.

The "else" case would be the case where the net or variable is not
declared as a vector.  In that case I will acknowledge that the LRM
does not actually say that the ranges must be identical.  So that would
allow

  input [5:0] in1;
  wire in1;
  
I don't think anybody is really arguing in favor of allowing this.
If you wanted to allow it for backward compatibility in legacy code,
you would have to treat it as a scalar, because Verilog-XL did.

So if you want to allow "input in1; wire [5:0] in1;" we will need to
change the LRM.  The current LRM clearly does not allow it.

Steven Sharp
sharp@cadence.com


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Wed Apr 29 18:22:29 2009

This archive was generated by hypermail 2.1.8 : Wed Apr 29 2009 - 18:24:19 PDT