From: palka Date: Thu, 3 Dec 2009 16:28:42 +0000 (+0000) Subject: new X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=e6481ddf1dd63fcc442955dd61f6de9a739fc3d7;p=trbv2.git new --- diff --git a/multiplexer.vhd b/multiplexer.vhd new file mode 100644 index 0000000..e1ac8ea --- /dev/null +++ b/multiplexer.vhd @@ -0,0 +1,30 @@ +library IEEE; +use IEEE.STD_LOGIC_UNSIGNED.ALL; +use ieee.std_logic_1164.all; +use ieee.numeric_std.all; + +library work; +use work.all; +use work.version.all; +use work.trb_net_std.all; +use work.trb_net16_hub_func.all; +use ieee.std_logic_arith.all; + +entity multiplexer is + port ( + RESET : in std_logic; + CLK : in std_logic; + MULTIPLEXER_OUT : out std_logic; + MULTIPLEXER_IN : in std_logic_vector(7 downto 0); + MULTIPLEXER_SELECT : in std_logic_vector(2 downto 0) + ); +end multiplexer; + +architecture multiplexer of multiplexer is + signal input_address : integer range 0 to 7 :=0; + + +begin + input_address <= conv_integer(MULTIPLEXER_SELECT(2 downto 0)); + MULTIPLEXER_OUT <= MULTIPLEXER_IN(input_address); +end multiplexer;