Subject: Re: Reminder: LRM Committee Call
From: Kevin Cameron x3251 (Kevin.Cameron@nsc.com)
Date: Mon Apr 08 2002 - 19:05:43 PDT
Martin O'Leary wrote:
>
> (XZ example for conf call.)
>
> // nan.v
>
> module foo;
>
> real r;
> integer i;
>
> initial begin
> i = 1'bX;
> r = 1'bX;
> $strobe("r =",r);
> $strobe("i =",i);
> end
>
> endmodule
>
> This gives the following output;
>
> i = X
> r =0
- same with VCS, but this also works:
module foo;
real r;
integer i;
initial begin
i = 1'bX;
r = $bitstoreal(64'hFFFFFFFFFFFFFFFF);
$strobe("r =",r);
$strobe("i =",i);
end
endmodule
>>> gives
i = X
r =-NaN
- i.e. you can propagate NaN through Verilog-D.
Kev.
-- National Semiconductor 2900 Semiconductor Drive, Mail Stop D3-500, Santa Clara, CA 95052-8090
This archive was generated by hypermail 2b28 : Mon Apr 08 2002 - 19:08:28 PDT