The big problem here is keeping ambiguity out
of the language.
Jim Lewis wrote:
> David,
> > I would propose that we put these into the
> > fixed and floating point packages.
> I don't like the idea of these being in a
> package other than std.standard/std.textio.
>
> Real is a signed floating point number.
> If we don't require a sign (+ or -) then
> an unsigned quantity must have a leading
> zero.
This is far too simplistic a way to look at a floating point
number.
1) Is it rounded? How is it rounded, there are 4 different
ways. According to the spec, they are selectable.
2) How do you process "not a number" (NAN)? Infinity? If we treat it
as a floating point number than "1111.1111" = NAN, and "1111.0000"
= negative infinity.
3) What radix? 32 bit and 64 bits are defaults, but any width
is allowed with IEEE 854.
> Alternately if requiring a sign (+ or -) is
> ok, then the read/write of all formats for
> real and the proposed fixed and floating point
> packages could be based on the current
> read/write format for real (decimal).
The problem here is that "real" is "implimentation_defined" in
the 2002 LRM. Thus the binary representation can vary simulator
to simulator. Again ambiguity.
> A third alternative for real and integer is
> to not implement bwrite/bread, owrite/oread,
> and hwrite/hread.
This sounds like a plan. At least for VHDL-200X-FT.
-- David W. Bishop dbishop@vhdl.org All standard disclaimers apply.Received on Mon Jun 28 10:01:14 2004
This archive was generated by hypermail 2.1.8 : Mon Jun 28 2004 - 10:01:16 PDT