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;
63 DISP_SEL : inout std_logic_vector(3 downto 0);
64 DISP_LED : out std_logic_vector(6 downto 0);
67 LED_INIT : out std_logic;
68 LED_ACCESS : out std_logic;
69 LED_ALIVE : out std_logic;
74 red, grn, blu : out std_logic;
81 --+-----------------------------------------------------------------------------+
83 --+-----------------------------------------------------------------------------+
85 architecture pci_7seg_arch of pci_7seg is
88 --+-----------------------------------------------------------------------------+
90 --+-----------------------------------------------------------------------------+
100 ad : inout std_logic_vector(31 downto 0);
101 cbe : in std_logic_vector(3 downto 0);
103 frame : in std_logic;
105 trdy : out std_logic;
106 devsel : out std_logic;
107 stop : out std_logic;
108 idsel : in std_logic;
109 perr : out std_logic;
110 serr : out std_logic;
111 intb : out std_logic;
114 wb_adr_o : out std_logic_vector(24 downto 1);
115 wb_dat_i : in std_logic_vector(15 downto 0);
116 wb_dat_o : out std_logic_vector(15 downto 0);
117 wb_sel_o : out std_logic_vector(1 downto 0);
118 wb_we_o : out std_logic;
119 wb_stb_o : out std_logic;
120 wb_cyc_o : out std_logic;
121 wb_ack_i : in std_logic;
122 wb_err_i : in std_logic;
123 wb_int_i : in std_logic;
126 debug_init : out std_logic;
127 debug_access : out std_logic
133 component wb_7seg_new
137 clk_i : in std_logic;
138 nrst_i : in std_logic;
141 wb_adr_i : in std_logic_vector(24 downto 1);
142 wb_dat_o : out std_logic_vector(15 downto 0);
143 wb_dat_i : in std_logic_vector(15 downto 0);
144 wb_sel_i : in std_logic_vector(1 downto 0);
145 wb_we_i : in std_logic;
146 wb_stb_i : in std_logic;
147 wb_cyc_i : in std_logic;
148 wb_ack_o : out std_logic;
149 wb_err_o : out std_logic;
150 wb_int_o : out std_logic;
153 DISP_SEL : inout std_logic_vector(3 downto 0);
154 DISP_LED : out std_logic_vector(6 downto 0)
160 component vgaController is
161 Port ( mclk : in std_logic;
166 blu : out std_logic);
170 --+-----------------------------------------------------------------------------+
172 --+-----------------------------------------------------------------------------+
173 --+-----------------------------------------------------------------------------+
175 --+-----------------------------------------------------------------------------+
177 signal wb_adr : std_logic_vector(24 downto 1);
178 signal wb_dat_out : std_logic_vector(15 downto 0);
179 signal wb_dat_in : std_logic_vector(15 downto 0);
180 signal wb_sel : std_logic_vector(1 downto 0);
181 signal wb_we : std_logic;
182 signal wb_stb : std_logic;
183 signal wb_cyc : std_logic;
184 signal wb_ack : std_logic;
185 signal wb_err : std_logic;
186 signal wb_int : std_logic;
192 --+-------------------------------------------------------------------------+
193 --| Component instances |
194 --+-------------------------------------------------------------------------+
196 vga1: vgaController port map (mclk => mclk,
203 --+-----------------------------------------+
205 --+-----------------------------------------+
207 u_pci: component pci32tlite
217 devsel => PCI_nDEVSEL,
224 wb_dat_i => wb_dat_out,
225 wb_dat_o => wb_dat_in,
233 debug_init => LED_INIT,
234 debug_access => LED_ACCESS
237 --+-----------------------------------------+
239 --+-----------------------------------------+
241 u_wb: component wb_7seg_new
246 wb_dat_o => wb_dat_out,
247 wb_dat_i => wb_dat_in,
255 DISP_SEL => DISP_SEL,