2 use ieee.std_logic_1164.all;
3 use ieee.numeric_std.all;
7 dat : std_logic_vector (7 downto 0);
8 mask : std_logic_vector (1 downto 0);
9 res : out std_logic_vector (7 downto 0));
12 architecture behav of slice04 is
13 signal z : natural range 0 to 0;
14 signal mem : std_logic_vector (7 downto 0);
16 z <= to_integer(unsigned(mask));
19 variable hi, lo : natural;
21 if rising_edge (clk) then
22 mem (z*3 + 7 downto z*3) <= dat;