]> jspc29.x-matter.uni-frankfurt.de Git - trbv2.git/commitdiff
new
authorpalka <palka>
Thu, 3 Dec 2009 16:28:42 +0000 (16:28 +0000)
committerpalka <palka>
Thu, 3 Dec 2009 16:28:42 +0000 (16:28 +0000)
multiplexer.vhd [new file with mode: 0644]

diff --git a/multiplexer.vhd b/multiplexer.vhd
new file mode 100644 (file)
index 0000000..e1ac8ea
--- /dev/null
@@ -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;