[sv-bc] 8.13.2: $display(unpacked struct)

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Sat Apr 08 2006 - 22:32:15 PDT
8.13.2 has the following example:

typedef struct {
  int x;
  int y;
} st;

st s1;
int k = 1;

initial begin
  #1 s1 = '{1, 2+k}; // by position
  #1 $display( s1.x, s1.y);
  #1 s1 = '{x:2, y:3+k); // by name
  #1 $display( s1);
  #1 $finish;
end

The second $display takes as an argument the entire unpacked struct s1. This looks like an error. The second $display should be the same as the first.

Shalom

Shalom Bresticker
Intel Jerusalem LAD DA
+972 2 589-6852
+972 54 721-1033
I don't represent Intel 
Received on Sat Apr 8 22:33:08 2006

This archive was generated by hypermail 2.1.8 : Sat Apr 08 2006 - 22:33:19 PDT