4 -- File: CONFIG_WR_0.VHD
7 use IEEE.std_logic_1164.all;
12 ADDR_REG :in std_logic_vector(31 downto 0);
13 CF_WR_COM :in std_logic;
14 IRDY_REGn :in std_logic;
16 CONF_WR_04H :out std_logic;
17 CONF_WR_10H :out std_logic;
18 CONF_WR_3CH :out std_logic
19 --CONF_WR_40H :out std_logic
21 end entity CONFIG_WR_0;
23 architecture CONFIG_WR_0_DESIGN of CONFIG_WR_0 is
30 -- PCI Configuration Space Header
34 --Address |31 24|23 16|15 8|7 0|
35 -----------------------------------------------------------------
36 --00 |Device ID |Vendor ID |
37 --04 |Status |Command |
38 --08 |Class Code |Revision ID |
39 --0C |BIST |Header Type |Latency T. |Cache L.S. |
40 --10-24 |Base Address Register |
41 --28 |Cardbus CIS Pointer |
42 --2C |Subsystem ID |Subsystem Vendor ID |
43 --30 |Expansion ROM Base Address |
46 --3C |Max_Lat |Min_Gnt |Int_Pin |Int_Line |
48 -----------------------------------------------------------------
52 --C/BE[3..0] Command Type
53 --------------------------------------
54 -- 0000 Interrupt Acknowledge
65 -- 1010 Configuration Read
66 -- 1011 Configuration Write
67 -- 1100 Memory Read Multiple
68 -- 1101 Dual Address Cycle
69 -- 1110 Memory Read Line
70 -- 1111 Memory Write and Invalidate
74 --C/BE[3..0] gueltige Datenbits
75 -------------------------------
81 constant CMD_INT_ACK :std_logic_vector(3 downto 0) := "0000";
82 constant CMD_SP_CYC :std_logic_vector(3 downto 0) := "0001";
83 constant CMD_IO_READ :std_logic_vector(3 downto 0) := "0010";
84 constant CMD_IO_WRITE :std_logic_vector(3 downto 0) := "0011";
85 constant CMD_RES_4 :std_logic_vector(3 downto 0) := "0100";
86 constant CMD_RES_5 :std_logic_vector(3 downto 0) := "0101";
87 constant CMD_MEM_READ :std_logic_vector(3 downto 0) := "0110";
88 constant CMD_MEM_WRITE :std_logic_vector(3 downto 0) := "0111";
89 constant CMD_RES_8 :std_logic_vector(3 downto 0) := "1000";
90 constant CMD_RES_9 :std_logic_vector(3 downto 0) := "1001";
91 constant CMD_CONF_READ :std_logic_vector(3 downto 0) := "1010";
92 constant CMD_CONF_WRITE :std_logic_vector(3 downto 0) := "1011";
93 constant CMD_MEM_READ_M :std_logic_vector(3 downto 0) := "1100";
94 constant CMD_DU_ADR_CYC :std_logic_vector(3 downto 0) := "1101";
95 constant CMD_MEN_READ_L :std_logic_vector(3 downto 0) := "1110";
96 constant CMD_MEM_WRITE_I :std_logic_vector(3 downto 0) := "1111";
98 signal CONFIG_ADDR :std_logic_vector(7 downto 0);
99 signal CONFIG_WRITE :std_logic_vector(3 downto 0);
104 --*******************************************************************
105 --******************* PCI Write Configuration Address ***************
106 --*******************************************************************
108 CONFIG_ADDR(7 downto 0) <= ADDR_REG(7 downto 0);
111 process (CF_WR_COM,IRDY_REGn,TRDYn,CONFIG_ADDR)
114 if CF_WR_COM = '1' and IRDY_REGn = '0' and TRDYn = '0' then
116 if CONFIG_ADDR = X"04" then
117 CONFIG_WRITE <= "0001";
119 elsif CONFIG_ADDR = X"10" then
120 CONFIG_WRITE <= "0010";
122 elsif CONFIG_ADDR = X"3C" then
123 CONFIG_WRITE <= "0100";
125 -- elsif CONFIG_ADDR = X"40" then
126 -- CONFIG_WRITE <= "1000";
128 CONFIG_WRITE <= "0000";
131 CONFIG_WRITE <= "0000";
135 CONF_WR_04H <= CONFIG_WRITE(0);
136 CONF_WR_10H <= CONFIG_WRITE(1);
137 CONF_WR_3CH <= CONFIG_WRITE(2);
138 --CONF_WR_40H <= CONFIG_WRITE(3);
140 end architecture CONFIG_WR_0_DESIGN;