The problem lies in the fact that you can represent real values in
different ways as bits. The IEEE floating point format defines a
standard doing this for single/double precision. First converting to a
signed or unsigned integer does not solve the problem in all cases. I
do not know of any standard library functions to convert
std_logic_vector representations of IEEE floating point to real.
As the term "floating point" suggests, the decimal point floats. An
part of the format (exponent) defines the position of the decimal point
here.
In hardware, often fixed point arithmetic will do. You could use 24
bits before and 8 bits after the decimal point. In this case, convert
to integer, divide by 2**8 and assign to the real value.
Integer aithmetic in VHDL is restricted to the range integer'low to
integer'high, which is only guaranteed to work for vectors up to 32
bits, so first converting to integer and then to real may not work for
larger vectors
Hubble.
