Mavnus04
Newbie level 4
I have a bit_vector(4 downto 0) and I am trying to convert it to a real so that I may write to a file.
dataout <= real(integer(to_signed(std_logic_vector(data)),5));
The error I get is illegal operand for type conversion.
I was able to change real to std_logic_vector:
datain <= std_logic_vector(to_signed(integer(read_data1),4));
So I am not sure what I am missing here. Any help would be great.
Thanks!
- - - Updated - - -
OK. Nevermind.
I was confused on how the functions worked and what they were named.
my solution:
dataout <= real(to_integer(signed(to_stdlogicvector(data))));
dataout <= real(integer(to_signed(std_logic_vector(data)),5));
The error I get is illegal operand for type conversion.
I was able to change real to std_logic_vector:
datain <= std_logic_vector(to_signed(integer(read_data1),4));
So I am not sure what I am missing here. Any help would be great.
Thanks!
- - - Updated - - -
OK. Nevermind.
I was confused on how the functions worked and what they were named.
my solution:
dataout <= real(to_integer(signed(to_stdlogicvector(data))));
Last edited: