Re: errata/53: net_lvalue BNF allows {x[i]}

From: Dennis Marsa (drm@xilinx.com)
Date: Tue Oct 16 2001 - 08:50:00 PDT


Precedence: bulk

The following reply was made to PR errata/53; it has been noted by GNATS.

From: Dennis Marsa <drm@xilinx.com>
To: Shalom.Bresticker@motorola.com
Cc: btf-bugs@boyd.com
Subject: Re: errata/53: net_lvalue BNF allows {x[i]}
Date: Tue, 16 Oct 2001 09:48:34 -0600

 Shalom.Bresticker@motorola.com wrote:
>
> Precedence: bulk
>
> >Number: 53
> >Category: errata
> >Originator: Shalom.Bresticker@motorola.com
> >Description:
>
> Re: net_lvalue BNF rule
> Date:
> Tue, 16 Oct 2001 16:38:52 +0200
> From:
> Shalom Bresticker <Shalom_Bresticker-R50386@email.mot.com>
> Organization:
> Motorola Semiconductor Israel, Ltd. (MSIL)
> To:
> Dennis Marsa <drm@xilinx.com>
> CC:
> btf@boyd.com
> References:
> 1
>
 
  
> Re: IEEE 1364-2000 Draft 5
>
> From: Shalom Bresticker (shalom@msil.sps.mot.com)
> Date: Wed Jul 12 2000 - 03:47:34 PDT
>
> Next message: Thomas Fitzpatrick: "BNF parser, anyone?"
> Previous message: Shalom Bresticker (r50386): "Errata in IEEE 1364-2000 Draft 5"
> Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>
> Patrick and IEEE 1364:
>
> Patrick Doane wrote:
>
> > So far, I've noticed one additional major problem:
> >
> > wire [0:3] x;
> > integer i;
> >
> > assign x[i] = 1'b0; // <-- this is illegal
> > assign {x[i]} = 1'b0; // <-- this is legal!
> >
> > Note that this is just from a syntactic level, and I have not had a chance
> > to review the language document to see if it makes any additional semantic
> > requirements that would disallow it.
>
> >
> > It is however a little disconerning to see that using a concatenation in
> > an net_lvalue changes whether or not a range_expression is legal for use
> > on a hierarchical_net_identifier.
>
> Hi, Patrick.
>
> It took me a while to figure out what is going on.
>
> Your second example is not legal - see Table 6-1 on p. 73.
>
> It is true that the grammar appears to allow it, but that was unintended.
>
> ( net_lvalue may be net_concatenation and net_concatenation allows non-constant range expressions.)
>
> Apparently the following happened: net_concatenation and variable_concatenation
> were defined for general use. In the end, they found use only in net_lvalue and variable_lvalue.
> However, we forgot that net_concatenation allows non-constant ranges whereas net_lvalue
> is restricted to constant ranges. This problem does not arise in variable_lvalue.
>
> So: the definition of net_lvalue must be fixed, and net_concatenation and net_concatenation_value are without
> use.
>
> > As a more minor comment, the rule for variable_concatenation_value could
> > be:
> >
> > variable_concatenation_value ::= variable_lvalue
> >
> > since they share the same productions.
>
> Correct, but it should be reversed: variable_lvalue ::= variable_concatenation_value .
>
> In related issues, the production of net_lvalue should be copied or moved from Syntax 9-3 to Syntax 6-1.
> Also, variable_concatenation is referenced in Syntax 9-1, 9-2, 9-3, but not defined there, only in App. A.
>
> Thanks again, Patrick !
>
> Shalom
>
> --
> ************************************************************************
> Shalom Bresticker email: shalom@msil.sps.mot.com
> Motorola Semiconductor Israel, Ltd. Tel #: +972 9 9522268
> P.O.B. 2208, Herzlia 46120, ISRAEL Fax #: +972 9 9522890
> http://www.motorola-semi.co.il/
> ************************************************************************
 
 
 The above seems vague to me on what exactly the proposed fix to the BNF
 should be:
 
 Here's my interpretation, please correct if I am wrong:
 
 * New productions for net_lvalue and variable_lvalue (only last alternative
   in each is different)
 
   net_lvalue ::= hierarchical_net_identifier
                | hierarchical_net_identifier '[' constant_expression ']' { '[' constant_expression
 ']' }
                | hierarchical_net_identifier '[' constant_expression ']' { '[' constant_expression
 ']' } '[' constant_range_expression ']'
                | hierarchical_net_identifier '[' constant_range_expression ']'
                | '{' net_lvalue { ',' net_lvalue } '}'
 
   variable_lvalue ::= hierarchical_net_identifier
                     | hierarchical_net_identifier '[' expression ']' { '[' expression ']' }
                     | hierarchical_net_identifier '[' expression ']' { '[' expression ']' } '['
 range_expression ']'
                     | hierarchical_net_identifier '[' range_expression ']'
                     | '{' variable_lvalue { ',' variable_lvalue } '}'
 
 
 * Eliminate productions:
 
   net_concatenation
   net_concatenation_value
   variable_concatenation
   variable_concatenation_value
 
 
 Dennis Marsa
 Xilinx, Inc.



This archive was generated by hypermail 2.1.4 : Mon Jul 08 2002 - 12:54:47 PDT and
sponsored by Boyd Technology, Inc.