RE: [sv-bc] Question about shortint'(8'hFF + 8'h01)

From: Mark Hartoog <Mark.Hartoog@synopsys.com>
Date: Fri Sep 17 2004 - 12:55:14 PDT

In section 3.14 of SV 3.1a LRM it says:

<quote>
A data type can be changed by using a cast ( ' ) operation. The
expression to be cast must be enclosed in parentheses or within
concatenation or replication braces and is self-determined.
</quote>

Making this self-determined means the answer would be 16'h0000.

However, this LRM language was changed by Issue 111
(http://www.eda.org/svdb/bug_view_page.php?bug_id=0000111).

I believe Issue 111 is an approved errata.

This means casts are now context determined, which means the
correct answer is now 16'h0100.

Mark Hartoog
700 E. Middlefield Road
Mountain View, CA 94043
650 584-5404
markh@synopsys.com

> -----Original Message-----
> From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org]On Behalf Of Andy
> Tsay
> Sent: Friday, September 17, 2004 11:14 AM
> To: sv-bc@eda.org
> Subject: [sv-bc] Question about shortint'(8'hFF + 8'h01)
>
>
> Hi,
>
> Please help to clarify the evaluation of the expression below:
> shortint'(8'hFF + 8'h01)
>
> Is the result value (16'h0000) or (16'h0100)?
>
> Thanks,
> Andy
Received on Fri Sep 17 12:55:18 2004

This archive was generated by hypermail 2.1.8 : Fri Sep 17 2004 - 12:55:27 PDT