[sv-bc] Please help to clarify the SV unpacked array examples

From: Andy Tsay <andytsay@yahoo.com>
Date: Tue Mar 09 2004 - 12:59:43 PST

Hi,

Is a multi-concat represents one element or multiple elements in an aggregate?
Do we need to invent a new syntax to represent multiple elements and leave
the multi-concat as a single element?
Please help to clarify the following SV examples.

Thanks,
Andy

Example 1)
  int e1 [7:0] = {8{1'b0}};
  It seems to be legal, and each element of e1 is set to 32'b0.

Example 2)
  int e2 [7:0] = {1'b0, {7{1'b1}}};
  Is this legal? Is the {7{1'b1}} one element or seven elements?

Example 3)
  int e3 [7:0] = {1'b0, 1, 2'd2, {3{1'b1}}, 4'd4, 5'd5, 6'd6, 7};
  Is this legal?

Example 4)
  int e4 [7:0];
  assign e4 = { e4[1], {3{1}}, e4[2:1], 3, 2, 1, 0 };

Example 5)
  int e5 [7:0] = {{{{8{1'b0}}}}};
Received on Tue Mar 9 12:59:45 2004

This archive was generated by hypermail 2.1.8 : Tue Mar 09 2004 - 12:59:47 PST