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

From: Rich, Dave <Dave_Rich_at_.....>
Date: Sat Apr 08 2006 - 22:52:35 PDT
This is mantis 331. The 1364 LRM has no rules for restricting
unformatted expressions in $display, and we haven't defined the behavior
of $display when it has aggregate data types. At least 2 simulators I
know of do not error on the second $display.

Dave

http://www.eda.org/svdb/bug_view_page.php?bug_id=0000331

> -----Original Message-----
> From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of
> Bresticker, Shalom
> Sent: Saturday, April 08, 2006 10:32 PM
> To: sv-bc@eda.org
> Subject: [sv-bc] 8.13.2: $display(unpacked struct)
> 
> 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:52:47 2006

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