From: Shalom Bresticker (Shalom.Bresticker@motorola.com)
Date: Tue Oct 16 2001 - 07:38:52 PDT
Dennis,
You are correct.
I brought this up in July 2000 on Draft 5, but it was not corrected in Draft 6.
See http://boyd.com/1364_btf/btf_2000/0149.html , attached.
Thanks,
Shalom
<p>Dennis Marsa wrote:
> The BNF rules for net_lvalue and net_concatenation_value
> seem to be inconsistent with respect to index expressions.
>
> The net_lvalue rule requires the use of constant expressions
> in any indexing operations.
>
> It also allows concatenations, via the net_concatenation,
> and ultimately the net_concatenation_value rule.
>
> In the net_concatenation_value rule, non-constant expressions
> are allowed in indexing operations.
>
> Thus, the following inconsistency:
>
> module example;
>
> integer i;
> wire [31:0] a;
>
> assign a[i] = 1'b0; // illegal syntax
> assign {a[i]} = 1'b0; // legal syntax
>
> endmodule
>
> The first assign is illegal since only the rule for
> net_lvalue comes into play, and it requires constant
> index expressions.
>
> The second assign is legal since net_concatenation_value
> comes into play, which allows non-constant index expressions.
>
> Which rule (net_lvalue or net_concatenation_value) is incorrect
> wrt to constness of index expressions?
>
> Or is this the intended behavior?
>
> Dennis Marsa
> Xilinx, Inc.
-- ************************************************************************** Shalom Bresticker Shalom.Bresticker@motorola.com Motorola Semiconductor Israel, Ltd. Tel #: +972 9 9522268 P.O.B. 2208, Herzlia 46120, ISRAEL Fax #: +972 9 9522890 **************************************************************************<p><p><p>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<head> <title>btf_2000: Re: IEEE 1364-2000 Draft 5</title> <meta name="Author" content="Shalom Bresticker (shalom@msil.sps.mot.com)"> <meta name="Subject" content="Re: IEEE 1364-2000 Draft 5"> </head> <body bgcolor="#FFFFFF" text="#000000"> <h1>Re: IEEE 1364-2000 Draft 5</h1> <strong>From:</strong> Shalom Bresticker (<a href="mailto:shalom@msil.sps.mot.com?Subject=Re:%20IEEE%201364-2000%20Draft%205&In-Reply-To=<396C4CC6.44451EE8@msil.sps.mot.com>">shalom@msil.sps.mot.com</em></a>) <strong>Date:</strong> Wed Jul 12 2000 - 03:47:34 PDT
<li><strong>Next message:</strong> Shalom.Bresticker@motorola.com: "errata/53: net_lvalue BNF allows {x[i]}" <ul> <li><strong>Next message:</strong> Thomas Fitzpatrick: "BNF parser, anyone?" <li><strong>Previous message:</strong> Shalom Bresticker (r50386): "Errata in IEEE 1364-2000 Draft 5" <li><strong>Messages sorted by:</strong> [ date ] [ thread ] [ subject ] [ author ] </ul> <hr noshade>
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/ ************************************************************************
This archive was generated by hypermail 2.1.4
: Mon Jul 08 2002 - 12:54:47 PDT
and
sponsored by Boyd Technology, Inc.