1 --+-------------------------------------------------------------------------------------------------+
5 --| Components: pci32lite.vhd |
13 --| Description: RS1 PCI Demo : (TOP) Main file. |
17 --+-------------------------------------------------------------------------------------------------+
19 --| Revision history : |
20 --| Date Version Author Description |
25 --+-------------------------------------------------------------------------------------------------+
28 --+-----------------------------------------------------------------------------+
30 --+-----------------------------------------------------------------------------+
33 use ieee.std_logic_1164.all;
34 use ieee.std_logic_arith.all;
35 use ieee.std_logic_unsigned.all;
37 --+-----------------------------------------------------------------------------+
39 --+-----------------------------------------------------------------------------+
45 PCI_CLK : in std_logic;
46 PCI_nRES : in std_logic;
49 PCI_AD : inout std_logic_vector(31 downto 0);
50 PCI_CBE : in std_logic_vector(3 downto 0);
51 PCI_PAR : out std_logic;
52 PCI_nFRAME : in std_logic;
53 PCI_nIRDY : in std_logic;
54 PCI_nTRDY : out std_logic;
55 PCI_nDEVSEL : out std_logic;
56 PCI_nSTOP : out std_logic;
57 PCI_IDSEL : in std_logic;
58 PCI_nPERR : out std_logic;
59 PCI_nSERR : out std_logic;
60 PCI_nINT : out std_logic;
72 --+-----------------------------------------------------------------------------+
74 --+-----------------------------------------------------------------------------+
76 architecture dhwk_arch of dhwk is
79 --+-----------------------------------------------------------------------------+
81 --+-----------------------------------------------------------------------------+
91 ad : inout std_logic_vector(31 downto 0);
92 cbe : in std_logic_vector(3 downto 0);
97 devsel : out std_logic;
100 perr : out std_logic;
101 serr : out std_logic;
102 intb : out std_logic;
105 wb_adr_o : out std_logic_vector(24 downto 1);
106 wb_dat_i : in std_logic_vector(15 downto 0);
107 wb_dat_o : out std_logic_vector(15 downto 0);
108 wb_sel_o : out std_logic_vector(1 downto 0);
109 wb_we_o : out std_logic;
110 wb_stb_o : out std_logic;
111 wb_cyc_o : out std_logic;
112 wb_ack_i : in std_logic;
113 wb_err_i : in std_logic;
114 wb_int_i : in std_logic;
117 debug_init : out std_logic;
118 debug_access : out std_logic
125 clk_i : in std_logic;
126 nrst_i : in std_logic;
127 led2_o : out std_logic;
128 led3_o : out std_logic;
129 led4_o : out std_logic;
130 led5_o : out std_logic
134 component generic_fifo_sc_a
139 din : in std_logic_vector(7 downto 0);
141 dout : out std_logic_vector(7 downto 0);
143 full : out std_logic;
144 full_r : out std_logic;
145 empty : out std_logic;
146 empty_r : out std_logic;
147 full_n : out std_logic;
148 full_n_r : out std_logic;
149 empty_n : out std_logic;
150 empty_n_r : out std_logic;
151 level : out std_logic_vector(1 downto 0)
155 component generic_dpram
161 raddr : in std_logic_vector(11 downto 0);
162 do : out std_logic_vector(7 downto 0);
167 waddr : in std_logic_vector(11 downto 0);
168 di : in std_logic_vector(7 downto 0);
173 --+-----------------------------------------------------------------------------+
175 --+-----------------------------------------------------------------------------+
176 --+-----------------------------------------------------------------------------+
178 --+-----------------------------------------------------------------------------+
180 signal wb_adr : std_logic_vector(24 downto 1);
181 signal wb_dat_out : std_logic_vector(15 downto 0);
182 signal wb_dat_in : std_logic_vector(15 downto 0);
183 signal wb_sel : std_logic_vector(1 downto 0);
184 signal wb_we : std_logic;
185 signal wb_stb : std_logic;
186 signal wb_cyc : std_logic;
187 signal wb_ack : std_logic;
188 signal wb_err : std_logic;
189 signal wb_int : std_logic;
194 --+-----------------------------------------+
196 --+-----------------------------------------+
198 u_pci: component pci32tlite
208 devsel => PCI_nDEVSEL,
215 wb_dat_i => wb_dat_out,
216 wb_dat_o => wb_dat_in,
224 -- debug_init => LED3,
225 -- debug_access => LED2
228 --+-----------------------------------------+
230 --+-----------------------------------------+
232 my_heartbeat: component heartbeat