From: Michael McNamara (mac@verisity.com)
Date: Fri May 09 2003 - 14:10:08 PDT
Precedence: bulk
The following reply was made to PR errata/344; it has been noted by GNATS.
From: Michael McNamara <mac@verisity.com>
To: Steven Sharp <sharp@cadence.com>
Cc: etf-bugs@boyd.com, mac@verisity.com
Subject: Re: errata/344: Case Statements with Real Expressions
Date: Fri, 9 May 2003 14:05:43 -0700
Steven Sharp writes:
>
> > Hence my rather tenuous logic takes 4.5.1, with 4.1.8 implying that
> > case is the same as '===', and 4.5.2 to say that we should coerce the
> > argumenmts to === and !=== to unsigned, absent other statements (note
> > that other statements do exist specifing the type coercion for the <,
> > >, <= and >= operators, in section 4.1.7)
>
> This argument is invalid. The fact that the result of the compare is
> an unsigned value does not imply that the inputs are coerced to unsigned,
> any more than the fact that the result of the compare is 1 bit wide
> implies that the inputs are coerced to 1 bit wide before the compare.
>
> Note that the result of '==' is also 1 bit unsigned, but it can still
> be used to perform compares between real values, which do not get
> converted to unsigned integers before the compare.
>
> Steven Sharp
> sharp@cadence.com
Don't get me wrong -- I know the right answer -- it is just that the
standard is silent on whether reals can be used in case statements,
and there is ambiguous language in various places that _might_ lead
you down various paths.
This archive was generated by hypermail 2.1.4
: Fri May 09 2003 - 14:10:44 PDT
and
sponsored by Boyd Technology, Inc.