pos : in std_logic_vector(15 downto 0) := (others => '0');
constant PtA : real := 1.0;
signal ang : sfixed(2*PtA_FP'high + 1 downto 2*PtA_FP'low);
Now I would like to multiply following expression with a type conversion to sfixed:
Code:
ang <= PtA_FP * to_sfixed(signed(pos),PtA_FP'high,PtA_FP'low);
for some reason the value ang is wrong and I assume the type conversion from the pos to a to_sfixed is not correct. Can anyone tell me what goes wrong here? :bang:
to_sfixed can covert signed or std_logic_vector types to sfixed, so the signed conversion is not necessary
Without the error, not much more can say really, as it is possible - you must have an error elsewhere. Please post the whole code