Subject: Re: [sv-bc] funny example of cast operator
From: Peter Flake (Peter.Flake@synopsys.com)
Date: Tue Jan 13 2004 - 07:02:10 PST
Hi Paul,
The intent is to cast the whole concatenation rather than each element.
Regards,
Peter.
At 18:18 12/01/2004 -0800, Paul Graham wrote:
>Section 3.14 has this example of the cast operator:
>
> shortint'{8'hFA, 8'hCE}
>
>It looks like the intent is to cast each element of the concat to shortint.
>If so, that feature should be documented.
>
>This feature brings up a possible ambiguity. Suppose I have:
>
> typedef struct packed {
> shortint a, b;
> } mytype;
>
> ... mytype'{8'hFA, 8'hCE} ...
>
>Is the intent here to cast the entire concat to type mytype, or to cast
>each element of the concat to type mytype?
>
>Paul
This archive was generated by hypermail 2b28 : Tue Jan 13 2004 - 07:04:28 PST