696ded12 |
1 | -- J.STELZNER |
2 | -- INFORMATIK-3 LABOR |
3 | -- 23.08.2006 |
4 | -- File: IO_MUX.VHD |
5 | |
6 | library IEEE; |
7 | use IEEE.std_logic_1164.all; |
8 | |
9 | entity IO_MUX is |
2612d712 |
10 | port |
11 | ( |
12 | READ_SEL :in std_logic_vector ( 1 downto 0); |
13 | USER_DATA :in std_logic_vector (31 downto 0); |
14 | CONFIG_DATA :in std_logic_vector (31 downto 0); |
15 | PCI_AD :in std_logic_vector (31 downto 0); |
16 | IO_DATA :out std_logic_vector (31 downto 0) |
17 | ); |
696ded12 |
18 | end entity IO_MUX; |
19 | |
20 | architecture IO_MUX_DESIGN of IO_MUX is |
21 | |
2612d712 |
22 | signal MUX :std_logic_vector (31 downto 0); |
696ded12 |
23 | |
2612d712 |
24 | begin |
696ded12 |
25 | |
2612d712 |
26 | MUX <= PCI_AD when READ_SEL = "00" else -- WRITE_CONFIG |
27 | PCI_AD when READ_SEL = "01" else -- WRITE_IO |
28 | CONFIG_DATA when READ_SEL = "10" else -- READ_CONFIG |
29 | USER_DATA when READ_SEL = "11" else -- READ_IO |
30 | CONFIG_DATA; |
696ded12 |
31 | |
2612d712 |
32 | -- MUX; |
696ded12 |
33 | |
2612d712 |
34 | IO_DATA <= MUX; |
696ded12 |
35 | |
36 | end architecture IO_MUX_DESIGN; |