Re: [sv-bc] RE: [sv-ec] 2380: a proposal requiring element equivalence

From: <jonathan.bromley_at_.....>
Date: Mon Jun 08 2009 - 23:59:50 PDT
Brad Pierce observed:

> I don't understand why the following are said to be
> assignment-compatible under the version 2 rules
>     int A[10:1];
>     wire [31:0] W [9:0];

Nor do I - it was simple carelessness.  Thanks for the catch.
Would you be OK with it if I were to rewrite the example thus?

  logic [7:0] V1[10:1];
  logic [7:0] V2[10];
  wire  [7:0] W[9:0];

  assign W = V1;
  initial #10 V2 = W;

Shalom also noted

> Actually, I think the whole paragraph about assignment
> array wires to variables and vice-versa is not needed.

I agree, but I didn't want to disturb any more text than I 
had to, and it seemed like a harmless (!) clarification.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Shalom's editorial notes:

> 1. In 6.22.3, the use of "shall" in "Unpacked arrays shall be 
> assignment compatible with certain other arrays that are not of 
> equivalent type," seems strange, since there is no specific 
> requirement stated here. This is more of an informative statement, 
> so "are" seems more appropriate here.
> 
> 4. In the change to 11.2.2, there should be a period after "6.22.2".

OK.  I trust EC can pass these as a "friendly amendment" at
the next meeting; I'll write up a modified proposal.


> 2. The following can be confusing: "Assignment shall be done by 
> assigning each element of the source array [...]"
> In the current LRM text, this text is part of a paragraph describing
> assignment to fixed-size arrays, where there is a requirement that 
> the source and target have the same number of elements. Deleting the
> text that restricts the paragraph to fixed-size arrays makes the 
> text more general, but it is confusing if either side is dynamic in 
size.

I don't really follow this.  Dynamic and queue arrays are effectively
declared [0:N-1] (associative arrays are not in play here) and the 
idea of "left-to-right" ordering is, I think, widely understood. 
As you say, the paragraph in question is no longer specific to 
fixed-size arrays, and the example is only an example...


> 3. In the same place, the proposal does not show the following 
> changes, which may confuse the editor: The sentence "Element 
> correspondence is defined as leftmost to leftmost, rightmost to 
> rightmost, irrespective of index values," is deleted, and so is the 
> following paragraph break.

Yes, that's my error, sorry.  I intended to delete that text, as 
you suggest, because I think it's covered by the later sentence.
Again I'll modify the proposal in the hope that it can be passed 
as a friendly amendment.

> 5. This change to 11.2.2, if passed, also resolves Mantis 2533.

OK, but we aren't permitted to vote on or resolve 2533 because
it's not a ballot issue, I think.  If 2380 passes I'll put a
bugnote on 2533 saying it can be closed in the future.

-- 
Jonathan Bromley


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Jun 9 00:01:44 2009

This archive was generated by hypermail 2.1.8 : Tue Jun 09 2009 - 00:02:22 PDT