R
Ralf Hildebrandt
Guest
Mohammed A khader wrote:
result <= integer_signal * unsigned_constant;
while unsigned_constant is in <9.15> format? Well - seems to be a good
option (I have no simulator at hand to check ist). I was thinking of
something like
result <= unsigned_signal * unsigned_constant;
and there adding a (zero) fractional part is nessecary. But your
solution seems to be more elegant.
Ralf
Do you meanExtend this vector by some zeros to the left to have a fractional
part.
Suppose y is the integer variable which can be represented in 8 bit
as <8.0> format, and 1/1.36 = 0.73529 is represented in 16 bits as
1.15> format. Then under such conditions multiplication can be done
between unsymmetrical formats i.e. format of <8.0> * <1.15> gives
9.15>. I think there is no need to pad the integer to represent
fractional part. Correct me if I am going wrong.
result <= integer_signal * unsigned_constant;
while unsigned_constant is in <9.15> format? Well - seems to be a good
option (I have no simulator at hand to check ist). I was thinking of
something like
result <= unsigned_signal * unsigned_constant;
and there adding a (zero) fractional part is nessecary. But your
solution seems to be more elegant.
Ralf