The issue is that unpacked union members do not have to be the same size.
The other members may be larger than the first member.
typedef union { logic [7:0] b; logic [31:0] i; } UT;
UT u;
initial $display(u.i);
What is suppose to be the result here? Is it undefined, and implementations
may do
different things? If that is the case, I think we should say that more
clearly.
-----Original Message-----
From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org]On Behalf Of Rich,
Dave
Sent: Saturday, November 20, 2004 9:20 PM
To: sv-bc@eda.org
Subject: [sv-bc] Comments on 285 - initialization of unions
Regarding the comments from Mark and Surrendra via the email vote
285 ___Yes _x_No
http://www.eda.org/svdb/bug_view_page.php?bug_id=0000285
I think this description applies to packed unions, but it is not
clear how it applies to unpacked unions.
I don't see why the proposal needs to address packed or unpacked unions
specifically. An initialization behaves like an assignment, so the values of
the other members of an unpacked union are undefined.
Dave
Received on Sat Nov 20 22:47:13 2004
This archive was generated by hypermail 2.1.8 : Sat Nov 20 2004 - 22:47:24 PST