7 use ieee.std_logic_1164.all ;
12 PCI_CLOCK :in std_logic;
13 PCI_RSTn :in std_logic;
14 MY_ADDR :in std_logic;
15 IDSEL_REG :in std_logic;
16 FRAME_REGn :in std_logic;
17 IO_SPACE :in std_logic;
18 AD_REG :in std_logic_vector(31 downto 0);
19 CBE_REGn :in std_logic_vector( 3 downto 0);
20 LAR :out std_logic; --LOAD_ADDR_REG
21 IO_READ :out std_logic;
22 IO_WRITE :out std_logic;
23 CONF_READ :out std_logic;
24 CONF_WRITE :out std_logic;
25 SERR_CHECK :out std_logic
29 architecture COMM_DEC_DESIGN of COMM_DEC is
33 --C/BE[3..0] Command Type
34 --------------------------------------
35 -- 0000 Interrupt Acknowledge
46 -- 1010 Configuration Read
47 -- 1011 Configuration Write
48 -- 1100 Memory Read Multiple
49 -- 1101 Dual Address Cycle
50 -- 1110 Memory Read Line
51 -- 1111 Memory Write and Invalidate
55 --C/BE[3..0] gueltige Datenbits
56 -------------------------------
62 constant cmd_int_ack :std_logic_vector(3 downto 0) := "0000";
63 constant cmd_sp_cyc :std_logic_vector(3 downto 0) := "0001";
64 constant cmd_io_read :std_logic_vector(3 downto 0) := "0010";
65 constant cmd_io_write :std_logic_vector(3 downto 0) := "0011";
66 constant cmd_res_4 :std_logic_vector(3 downto 0) := "0100";
67 constant cmd_res_5 :std_logic_vector(3 downto 0) := "0101";
68 constant cmd_mem_read :std_logic_vector(3 downto 0) := "0110";
69 constant cmd_mem_write :std_logic_vector(3 downto 0) := "0111";
70 constant cmd_res_8 :std_logic_vector(3 downto 0) := "1000";
71 constant cmd_res_9 :std_logic_vector(3 downto 0) := "1001";
72 constant cmd_conf_read :std_logic_vector(3 downto 0) := "1010";
73 constant cmd_conf_write :std_logic_vector(3 downto 0) := "1011";
74 constant cmd_mem_read_m :std_logic_vector(3 downto 0) := "1100";
75 constant cmd_du_adr_cyc :std_logic_vector(3 downto 0) := "1101";
76 constant cmd_mem_read_l :std_logic_vector(3 downto 0) := "1110";
77 constant cmd_mem_write_i :std_logic_vector(3 downto 0) := "1111";
79 signal START :std_logic;
80 signal FRAME_REG_REGn :std_logic;
82 signal SIG_IO_READ :std_logic;
83 signal SIG_IO_WRITE :std_logic;
84 signal SIG_CONF_READ :std_logic;
85 signal SIG_CONF_WRITE :std_logic;
89 process (PCI_CLOCK, PCI_RSTn)
91 if PCI_RSTn = '0' then FRAME_REG_REGn <= '1';
92 elsif (PCI_CLOCK'event and PCI_CLOCK = '1') then
94 FRAME_REG_REGn <= FRAME_REGn;
100 START <= (not FRAME_REGn) and FRAME_REG_REGn;
104 SIG_IO_READ <= '1' when START = '1'
106 and CBE_REGn = cmd_io_read
111 SIG_IO_WRITE <= '1' when START = '1'
113 and CBE_REGn = cmd_io_write
118 SIG_CONF_READ <= '1' when START = '1'
119 and AD_REG(1 downto 0) = "00"
120 and CBE_REGn = cmd_conf_read
126 SIG_CONF_WRITE <= '1' when START = '1'
127 and AD_REG(1 downto 0) = "00"
128 and CBE_REGn = cmd_conf_write
134 SERR_CHECK <= SIG_IO_READ or SIG_IO_WRITE or SIG_CONF_READ or SIG_CONF_WRITE;
136 IO_READ <= SIG_IO_READ;
137 IO_WRITE <= SIG_IO_WRITE;
138 CONF_READ <= SIG_CONF_READ;
139 CONF_WRITE <= SIG_CONF_WRITE;
141 end architecture COMM_DEC_DESIGN;