hi
is there any function for converting fixed point numbers (for example (7 downto -8)) to the nearest std_logic_vector(7 downto 0)?
if yes which packages and libraries shoulld be added?
thanks
thanks for answering,
I want to convert the number 119.7(ufixed(7 downto -8)) to 119(std_logic_vectror(7 downto 0)).
I meant rounding the numbers by nearest .
- - - Updated - - -
this error happens when I use
Code:
my_slv <= to_slv( my_ufxied(7 downto 0) );
** Error: C:\modeltech_6.5c\examples\main1.vhd(83): Target type ieee.NUMERIC_STD.UNSIGNED in variable assignment is different from expression type ieee.std_logic_1164.STD_ULOGIC_VECTOR.
thanks for answering,
I want to convert the number 119.7(ufixed(7 downto -8)) to 119(std_logic_vectror(7 downto 0)).
I meant rounding the numbers by nearest .
thanks for answering,
I want to convert the number 119.7(ufixed(7 downto -8)) to 119(std_logic_vectror(7 downto 0)).
I meant rounding the numbers by nearest .