Re: [sv-bc] Equality operators on unpacked arrays

From: Greg Jaxon <Greg.Jaxon@synopsys.com>
Date: Wed Nov 24 2010 - 15:33:59 PST
Without changing my conclusion, I need to replace my argument.
Assignment compatible unpacked arrays must have equivalent type elements.  So width-adjustments are not required.
But the only other requirement for them to be assignment compatible is that:
"-- If the target is a fixed-size array or a slice, the source array shall have the same number of elements
   as the target."
This is not the same as "having the same shape", so I still think equivalence of type is the most likely interpretation.


On 11/24/2010 4:53 PM, Greg Jaxon wrote:
 I think this refers to "Equivalent types" as defined in 6.22.2.   Assignment compatible types could have
elements which differ in width, thus requiring internal padding or sign extension going into the comparator.
We have elsewhere resisted introducing this pattern of array correspondence, I don't believe this was
intended as an exception.

On 11/24/2010 4:28 PM, Brad Pierce wrote:
That sentence doesn’t use "provided" as an intransitive verb meaning to impose a stipulation or condition, but as a transitive verb meaning to furnish or supply -- "The examples provided with these rules assume that A and B are arrays of the same shape and type."

It's still a good question though. Which pairs of unpacked array operand types are compatible with == and != ?

-- Brad

-----Original Message-----
From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Paul Graham
Sent: Wednesday, November 24, 2010 1:38 PM
To: sv-bc
Subject: [sv-bc] Equality operators on unpacked arrays

The lrm says that two unpacked arrays may be compared with == or != provided the arrays have "the same shape and type".  Is this to say that the arrays must be assignment compatible?

Paul



--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean. Received on Wed Nov 24 15:34:26 2010

This archive was generated by hypermail 2.1.8 : Wed Nov 24 2010 - 15:36:57 PST