blob: d445808731f3fa033e41a8a10fcea3b00d303766 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
library ieee;
use ieee.std_logic_1164.all;
use ieee.fixed_pkg.all;
use ieee.fixed_float_types.all;
entity fixed_point_example is
port (
data_in : in std_logic_vector(7 downto 0);
data_out : out std_logic_vector(7 downto 0)
);
end fixed_point_example;
architecture behavioral of fixed_point_example is
begin
data_out <= to_slv(to_sfixed(data_in, 7, 0));
end behavioral;
|