4 -- File: CONFIG_10H.VHD
7 use IEEE.std_logic_1164.all;
12 PCI_CLOCK :in std_logic;
13 PCI_RSTn :in std_logic;
14 AD_REG :in std_logic_vector(31 downto 0);
15 CBE_REGn :in std_logic_vector( 3 downto 0);
16 CONF_WR_10H :in std_logic;
17 CONF_DATA_10H :out std_logic_vector(31 downto 0)
19 end entity CONFIG_10H;
21 architecture CONFIG_10H_DESIGN of CONFIG_10H is
23 signal CONF_BAS_ADDR_REG :std_logic_vector(31 downto 0);
27 --*******************************************************************
28 --***** PCI Configuration Space Header "BASE ADDRESS REGISTER" ******
29 --*******************************************************************
31 CONF_BAS_ADDR_REG(1 downto 0) <= "01" ;-- Base Address Register for "I/O"
32 CONF_BAS_ADDR_REG(3 downto 2) <= "00" ;-- IO Bereich = 16 BYTE
34 process (PCI_CLOCK,PCI_RSTn)
37 -- if PCI_RSTn = '0' then CONF_BAS_ADDR_REG(31 downto 2) <= (others =>'0');
38 if PCI_RSTn = '0' then CONF_BAS_ADDR_REG(31 downto 4) <= (others =>'0');
40 elsif (PCI_CLOCK'event and PCI_CLOCK = '1') then
42 if CONF_WR_10H = '1'and CBE_REGn(3) = '0' then
44 CONF_BAS_ADDR_REG(31 downto 24) <= AD_REG(31 downto 24);
46 else CONF_BAS_ADDR_REG(31 downto 24) <= CONF_BAS_ADDR_REG(31 downto 24);
49 if CONF_WR_10H = '1'and CBE_REGn(2) = '0' then
51 CONF_BAS_ADDR_REG(23 downto 16) <= AD_REG(23 downto 16);
53 else CONF_BAS_ADDR_REG(23 downto 16) <= CONF_BAS_ADDR_REG(23 downto 16);
56 if CONF_WR_10H = '1'and CBE_REGn(1) = '0' then
58 CONF_BAS_ADDR_REG(15 downto 8) <= AD_REG(15 downto 8);
60 else CONF_BAS_ADDR_REG(15 downto 8) <= CONF_BAS_ADDR_REG(15 downto 8);
63 -- if CONF_WR_10H = '1'and CBE_REGn(0) = '0' then
65 -- CONF_BAS_ADDR_REG( 7 downto 2) <= AD_REG( 7 downto 2);
67 -- else CONF_BAS_ADDR_REG( 7 downto 2) <= CONF_BAS_ADDR_REG( 7 downto 2);
70 if CONF_WR_10H = '1'and CBE_REGn(0) = '0' then
72 CONF_BAS_ADDR_REG( 7 downto 4) <= AD_REG( 7 downto 4);
74 else CONF_BAS_ADDR_REG( 7 downto 4) <= CONF_BAS_ADDR_REG( 7 downto 4);
82 CONF_DATA_10H <= CONF_BAS_ADDR_REG;
84 end architecture CONFIG_10H_DESIGN;