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.
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).
A third alternative for real and integer is
to not implement bwrite/bread, owrite/oread,
and hwrite/hread.
Cheers,
Jim
> I have a basic problem of implimenting these.
>
> Look at the following number:
>
> 11011.1100 (using the "." as a seperator)
>
> as an Unsigned fixed number, this means 27.75
> as a singed fixed point number, this means a negative 2s compliment
> number.
> as a floating point number, this is -1.75 * 2**4
>
> I would propose that we put these into the fixed and floating
> point packages. That way there will be no question on what
> this means.
>
> We do need a way to read and write reals, as long as they are
> expressed as reals.
>
>> 3)
>>
>> procedure HREAD (L: inout LINE; VALUE: out REAL; GOOD : out
>> BOOLEAN);
>> procedure HREAD (L: inout LINE; VALUE: out REAL);
>> procedure HWRITE (L: inout LINE; VALUE: in REAL;
>> JUSTIFIED: in SIDE := RIGHT; FIELD:in WIDTH := 0);
>> procedure OREAD (L: inout LINE; VALUE: out REAL; GOOD : out
>> BOOLEAN);
>> procedure OREAD (L: inout LINE; VALUE: out REAL);
>> procedure BREAD (L: inout LINE; VALUE: out REAL; GOOD : out
>> BOOLEAN);
>> procedure BREAD (L: inout LINE; VALUE: out REAL);
>> procedure BWRITE (L: inout LINE; VALUE: in REAL;
>> JUSTIFIED: in SIDE := RIGHT; FIELD:in WIDTH := 0);
>> procedure DREAD (L: inout LINE; VALUE: out REAL; GOOD : out
>> BOOLEAN);
>> procedure DREAD (L: inout LINE; VALUE: out REAL);
>> procedure DWRITE (L: inout LINE; VALUE: in REAL;
>> JUSTIFIED: in SIDE := RIGHT; FIELD:in WIDTH := 0);
>
>
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Jim Lewis Director of Training mailto:Jim@SynthWorks.com SynthWorks Design Inc. http://www.SynthWorks.com 1-503-590-4787 Expert VHDL Training for Hardware Design and Verification ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Received on Mon Jun 28 08:20:53 2004
This archive was generated by hypermail 2.1.8 : Mon Jun 28 2004 - 08:20:55 PDT