[an error occurred while processing this directive]
|
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
-- Uncomment the following lines to use the declarations that are
-- provided for instantiating Xilinx primitive components.
--library UNISIM;
--use UNISIM.VComponents.all;
entity try_try is
Port ( X : in std_logic_vector(7 downto 0);
I: in std_logic_vector(2 downto 0);
Y :out std_logic_vector(3 downto 0)
);
end try_try;
architecture Behavioral of try_try is
begin
process(X, I)
variable tmp : std_logic_vector (3 downto 0);
variable I_integer : integer range 0 to 7;
begin
tmp := (others=>'0');
I_integer := conv_integer(unsigned(I));
tmp := X(I_integer downto I_integer-3);
Y(3 downto 0) <= tmp;
end process;
end Behavioral;
E-mail: info@telesys.ru