Re: handling reals

From: Shalom Bresticker (shalom@msil.sps.mot.com)
Date: Mon Sep 14 1998 - 23:30:53 PDT


BAD MSG:
I am a little familiar with IEEE 754. I fear that a sweeping generalization
hat Verilog will use IEEE 754 will make for great complications in
dealing with all the special cases (denormalized numbers, NaNs (Not a
Number),etc.).
X-Lines: 46
Content-Type: text/plain; charset="us-ascii"
Content-Length: 1621
X-Status: $$$$
X-UID: 0000000651
Status: RO

I think it might be wiser to do as some processors do, which is to
support the format, but not all the special cases.

This is one of those cases where 80% of the code will be needed to
deal with the exception cases, and only 20% to the regular cases.

Shalom Bresticker
Motorola Semiconductor Israel

>
> Hi. It appears that the behavior of real variables and values is not
> well defined in Verilog. Not being a Verilog expert on this subject, I
> need to enlist your assistance in nailing down the expected behavior so
> that we can document how it should work.
>
> We also have the issue of what happens with "unusual" values in real
> expressions, eg, 0**0 -- it is an intermediate according to IEEE
> 754-1985, I believe. And MaxReal**MaxReal should be something like
> infinity.
>
> We already use IEEE 754-1985 for $realtobits();
>
> It would be wonderful to say that Verilog will just use the IEEE
> 754-1985 standard for real computation, and that way, much desirable
> behavior should be readily inherited.
>
> Rough Proposal (since I'm really sounding you out here, rather than
> making a tight detailed complete proposal),
>
> Use IEEE 754-1985 for real computations in Verilog.
>
> In particular, it seems that reals can not hold the value x. It would
> be nice to make that more explicit, rather than have it be emergent
> behavior.
>
> Proposal -- add following to secion 3.9.2
>
> real variables only hold IEEE 754-1985 reals; they do not hold x
> or z values
>
> Proposal -- expand $bitstoreal to say
>
> x and z bits are treated as 0 when converting to a real value
>
> /Jskud
>



This archive was generated by hypermail 2.1.4 : Mon Jul 08 2002 - 12:53:00 PDT and
sponsored by Boyd Technology, Inc.