Gordon Vreugdenhil wrote: > > You'll likely be unhappy about > what "type(...) == type(...)" means in any case. > > 6.10 says: > Two type references shall be considered equal in such comparisons > if, and only if, the types to which they refer match (see 6.9.1). > > 6.9.1 boils down to saying that a packed vector can match > a predefined but it is NEVER the case that two "anonymous" > packed vectors will match. So, for a packed item "bit [1:0] a", > even the trivial condition > type(a[1:0]) == type(a[1:0]) > will be false. > > Such types are equivalent but not matching. If true, that seems like an unfortunate mistake in the wording. The "match" relation is (mathematically) an equivalence relation - it should be transitive. Fortunately, it is not the applicable clause. Consider "f) Two array types match if they have the same number of unpacked dimensions and their slowest varying dimensions have matching types and the same left and right range bounds." a[1:0] and a[1:0] both have 0 unpacked dimensions, and the type of the elements along their only packed dimension is bit, which matches bit. They part selects also yield the same (normalized) left and right bounds. Greg I think the best repair is to add the phrase "or two types -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Thu Mar 8 10:20:41 2007
This archive was generated by hypermail 2.1.8 : Thu Mar 08 2007 - 10:20:48 PST