RE: [sv-bc] streaming operator and class static members

From: Bresticker, Shalom <shalom.bresticker@intel.com>
Date: Sun Feb 13 2011 - 06:07:38 PST

In this case, the two simulators I tested gave the same results:

00000001000000020000000300000004
00000002000000040000000000000000

One explicitly noted that the static data members would be ignored.

Regards,
Shalom

From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Daniel Mlynek
Sent: Friday, February 11, 2011 11:08 AM
To: sv-bc@eda.org
Subject: [sv-bc] streaming operator and class static members

LRM do not say explicitly if static class members should be packed with streaming operator.
IMO it should be said as this is not so obvious.
From one perspective static member is a data member, from the other it will not carry data specific to the handle....

Please take a look on example:
class A;
static int p1=1;
int p2=2;
static int p3=3;
int p4=4;
endclass
 module top;
bit [127:0] v;
A a = new;

initial begin
  v = { >> {a} }; // tylko pola p2, p4? Wszystkie pola?
  $display("%h",{a.p1, a.p2, a.p3, a.p4});
  $display("%h", v);
end

endmodule

DANiel

--
This message has been scanned for viruses and
dangerous content by MailScanner<http://www.mailscanner.info/>, and is
believed to be clean.
---------------------------------------------------------------------
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, and is
believed to be clean.
Received on Sun, 13 Feb 2011 16:07:38 +0200

This archive was generated by hypermail 2.1.8 : Sun Feb 13 2011 - 06:08:51 PST