From: Shalom Bresticker (Shalom.Bresticker@motorola.com)
Date: Sun Aug 31 2003 - 02:00:01 PDT
Precedence: bulk
The following reply was made to PR errata/454; it has been noted by GNATS.
From: Shalom Bresticker <Shalom.Bresticker@motorola.com>
To: Steven Sharp <sharp@cadence.com>
Cc: etf-bugs@boyd.com
Subject: Re: errata/454: 2.3.1: 2'sb0000000_10 == 2'sb10 ?
Date: Sun, 31 Aug 2003 11:49:09 +0300
Actually, by IEEE standard rules, anything not forbidden is permitted.
(That's not exactly what the rules say, but that's approximately the meaning.)
So a tool should not produce an error.
Especially because it is explicitly permitted that the unsigned number be
smaller than the size constant.
Shalom
> >In a numerical constant, if the unsigned number is larger than
> >the size specified for the constant, is the unsized number
> >truncated, losing the bits on the left?
>
> Well, the size of the resulting constant definitely has to be the size
> that was specified. That much is clear in the LRM. How the value of
> those bits are determined in this situation is not clear. Truncation
> would be consistent with all other related situations in the language.
>
> I would expect a tool to at least provide a warning in this situation.
> It would not be unreasonable to consider this to be illegal syntax and
> produce an error. However, Verilog-XL just produces a warning and
> truncates. The result is as you suggested.
--
Shalom Bresticker Shalom.Bresticker@motorola.com
Design & Reuse Methodology Tel: +972 9 9522268
Motorola Semiconductor Israel, Ltd. Fax: +972 9 9522890
POB 2208, Herzlia 46120, ISRAEL Cell: +972 50 441478
This archive was generated by hypermail 2.1.4
: Sun Aug 31 2003 - 02:03:54 PDT
and
sponsored by Boyd Technology, Inc.