Hugo17
Junior Member level 1
Hello
I do have following signals:
Now I would like to multiply following expression with a type conversion to sfixed:
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:
Thanks in advance
I do have following signals:
Code:
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:
Thanks in advance