use ieee.std_logic_unsigned.all; entity cfq isport (clk,load: in std_logic;dinx,diny : in std_logic_vector(7 downto 0);dout :out std_logic_vector(15 downto 0));end cfq;architecture behav of cfq is signal b : std_logic_vector(15 downto 0);signal sum : std_logic_vector(15 downto 0);beginprocess (clk,load)variable x,y : std_logic_vector(7 downto 0);beginif clk'event and clk ='1' thenif load='1' then x:=dinx;y:=diny;else x:="10000000";y:="10000000";for n in 0 to 7 loop if(x(n)='1') then b(7+n downto n)<=y(7 downto 0);sum<=sum+b;else b<="0000000000000000";end if;end loop;end if;end if;end process;dout<=sum;end behav;