P
Paul Johnson
Guest
I've got the following legacy (VHDL) code, which is meant to detect an
INF condition and store it in 'result':
variable result : real;
....
result := 1.0 / 0.0;
However, when this runs on Modelsim, I get this fatal error:
** Fatal: (vsim-3421) Value inf is out of range 1e+308 to -1e+308.
Well, that makes sense, except that this code is known to work (unless
this line was never executed; I'm not sure). It ran on Modelsim (and
compiled on DC), although on an older version of Modelsim.
Could this code have ever worked? And how? A quick look through the
Modelsim manuals doesn't give any hits on INF or NAN.
Many thanks -
Paul
[I've copied comp.lang.verilog as I don't think that this is
language-specific].
INF condition and store it in 'result':
variable result : real;
....
result := 1.0 / 0.0;
However, when this runs on Modelsim, I get this fatal error:
** Fatal: (vsim-3421) Value inf is out of range 1e+308 to -1e+308.
Well, that makes sense, except that this code is known to work (unless
this line was never executed; I'm not sure). It ran on Modelsim (and
compiled on DC), although on an older version of Modelsim.
Could this code have ever worked? And how? A quick look through the
Modelsim manuals doesn't give any hits on INF or NAN.
Many thanks -
Paul
[I've copied comp.lang.verilog as I don't think that this is
language-specific].