[sv-bc] RE: initialization of unpacked union in declaration

From: Maidment, Matthew R <matthew.r.maidment@intel.com>
Date: Sun Aug 05 2012 - 23:46:54 PDT

I would guess that it would be an aggregate expression of the type of the first member.

module bar();

union {
  bit a;
  string b;
} c = '{1'b1};

endmodule

--
Matt Maidment
mmaidmen@ichips.intel.com
From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Bresticker, Shalom
Sent: Sunday, August 05, 2012 11:10 PM
To: sv-bc@eda.org
Subject: [sv-bc] FW: initialization of unpacked union in declaration
Hi,
I never got any response to this.
I know some people are on vacation, but does no one have anything to say?
Thanks,
Shalom
From: owner-sv-bc@eda.org<mailto:owner-sv-bc@eda.org> [mailto:owner-sv-bc@eda.org]<mailto:[mailto:owner-sv-bc@eda.org]> On Behalf Of Bresticker, Shalom
Sent: Thursday, July 26, 2012 12:08
To: sv-bc@eda.org<mailto:sv-bc@eda.org>
Subject: [sv-bc] initialization of unpacked union in declaration
Hi,
The LRM says in 7.3,
"If no initial value is specified in the declaration of a variable of an unpacked union type, then the variable shall be initialized to the default initial value for variables of the type of the first member in declaration order of the union type."
Question: how *does* one specify an initial value of an unpacked union variable in its declaration?
Thanks,
Shalom
Shalom Bresticker
Intel LAD DA, Jerusalem, Israel
+972  2 589 6582 (office)
+972 54 721 1033 (cell)
http://www.linkedin.com/in/shalombresticker
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
--
This message has been scanned for viruses and
dangerous content by MailScanner<http://www.mailscanner.info/>, and is
believed to be clean.
-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Sun Aug 5 23:47:35 2012

This archive was generated by hypermail 2.1.8 : Sun Aug 05 2012 - 23:47:41 PDT