b8449ce01eb434a6868571160276995fc1a0c270
Stefan Schuermans added file headers

Stefan Schuermans authored 12 years ago

1) -- MIPS I system
2) -- Copyright 2011-2012 Stefan Schuermans <stefan@schuermans.info>
3) -- Copyleft GNU public license V2 or later
4) --          http://www.gnu.org/copyleft/gpl.html
5) 
Stefan Schuermans implented basic system with...

Stefan Schuermans authored 12 years ago

6) LIBRARY IEEE;
7) USE IEEE.STD_LOGIC_1164.ALL;
8) USE IEEE.NUMERIC_STD.ALL;
Stefan Schuermans records for ethernet pins

Stefan Schuermans authored 12 years ago

9) USE work.io_eth_pins.all;
Stefan Schuermans implemented LCD peripheral

Stefan Schuermans authored 12 years ago

10) USE work.io_lcd_pins.all;
Stefan Schuermans implemented switches

Stefan Schuermans authored 12 years ago

11) USE work.io_switches_pins.all;
Stefan Schuermans implented basic system with...

Stefan Schuermans authored 12 years ago

12) 
13) ENTITY e_system IS
14)     PORT (
Stefan Schuermans records for ethernet pins

Stefan Schuermans authored 12 years ago

15)         clk:            IN  std_logic;
16)         pin_o_leds:     OUT std_logic_vector(7 DOWNTO 0);
17)         pin_o_lcd:      OUT t_io_lcd_pins;
18)         pin_i_switches: IN  t_io_switches_pins;
19)         pin_i_uart_rx:  IN  std_logic;
20)         pin_o_uart_tx:  OUT std_logic;
21)         pin_o_eth:      OUT t_io_eth_o_pins;
22)         pin_i_eth:      IN  t_io_eth_i_pins
Stefan Schuermans implented basic system with...

Stefan Schuermans authored 12 years ago

23)     );
24) END ENTITY e_system;
25) 
26) ARCHITECTURE a_system OF e_system IS
27) 
Stefan Schuermans progmem 8KB -> 16KB

Stefan Schuermans authored 12 years ago

28)     CONSTANT c_instr_addr_width: natural := 14;
Stefan Schuermans increased code and data add...

Stefan Schuermans authored 12 years ago

29)     CONSTANT c_data_addr_width:  natural := 13;
30) 
Stefan Schuermans implemented switches

Stefan Schuermans authored 12 years ago

31)     SIGNAL rst: std_logic := '0';
32) 
Stefan Schuermans implented basic system with...

Stefan Schuermans authored 12 years ago

33)     SIGNAL s_instr_addr:   std_logic_vector(31 DOWNTO 0);
34)     SIGNAL s_instr_data:   std_logic_vector(31 DOWNTO 0);
Stefan Schuermans implemented multi-master fe...

Stefan Schuermans authored 12 years ago

35) 
36)     SIGNAL s_core_req:     std_logic;
37)     SIGNAL s_core_grant:   std_logic;
38)     SIGNAL s_core_addr:    std_logic_vector(31 DOWNTO 0);
39)     SIGNAL s_core_rd_data: std_logic_vector(31 DOWNTO 0);
40)     SIGNAL s_core_rd_en:   std_logic_vector( 3 DOWNTO 0);
41)     SIGNAL s_core_wr_data: std_logic_vector(31 DOWNTO 0);
42)     SIGNAL s_core_wr_en:   std_logic_vector( 3 DOWNTO 0);
43)     SIGNAL s_ethbm_req:     std_logic;
44)     SIGNAL s_ethbm_grant:   std_logic;
45)     SIGNAL s_ethbm_addr:    std_logic_vector(31 DOWNTO 0);
46)     SIGNAL s_ethbm_rd_data: std_logic_vector(31 DOWNTO 0);
47)     SIGNAL s_ethbm_rd_en:   std_logic_vector( 3 DOWNTO 0);
48)     SIGNAL s_ethbm_wr_data: std_logic_vector(31 DOWNTO 0);
49)     SIGNAL s_ethbm_wr_en:   std_logic_vector( 3 DOWNTO 0);
50) 
Stefan Schuermans added "LEDs" I/O peripheral...

Stefan Schuermans authored 12 years ago

51)     SIGNAL s_dbus_addr:    std_logic_vector(31 DOWNTO 0);
52)     SIGNAL s_dbus_rd_data: std_logic_vector(31 DOWNTO 0);
Stefan Schuermans add read_enable signal to d...

Stefan Schuermans authored 12 years ago

53)     SIGNAL s_dbus_rd_en:   std_logic_vector( 3 DOWNTO 0);
Stefan Schuermans added "LEDs" I/O peripheral...

Stefan Schuermans authored 12 years ago

54)     SIGNAL s_dbus_wr_data: std_logic_vector(31 DOWNTO 0);
55)     SIGNAL s_dbus_wr_en:   std_logic_vector( 3 DOWNTO 0);
Stefan Schuermans removed bottleneck from dat...

Stefan Schuermans authored 12 years ago

56) 
57)     SIGNAL r_dbus_addr_delay: std_logic_vector(31 DOWNTO 0) := (OTHERS => '0');
58) 
Stefan Schuermans implented basic system with...

Stefan Schuermans authored 12 years ago

59)     SIGNAL s_data_addr:    std_logic_vector(31 DOWNTO 0);
60)     SIGNAL s_data_rd_data: std_logic_vector(31 DOWNTO 0);
61)     SIGNAL s_data_wr_data: std_logic_vector(31 DOWNTO 0);
62)     SIGNAL s_data_wr_en:   std_logic_vector( 3 DOWNTO 0);
Stefan Schuermans added "LEDs" I/O peripheral...

Stefan Schuermans authored 12 years ago

63)     SIGNAL s_leds_rd_data: std_logic_vector( 7 DOWNTO 0);
64)     SIGNAL s_leds_wr_data: std_logic_vector( 7 DOWNTO 0);
65)     SIGNAL s_leds_wr_en:   std_logic;
Stefan Schuermans implemented LCD peripheral

Stefan Schuermans authored 12 years ago

66)     SIGNAL s_lcd_rd_data: std_logic_vector(31 DOWNTO 0);
67)     SIGNAL s_lcd_wr_data: std_logic_vector(31 DOWNTO 0);
68)     SIGNAL s_lcd_wr_en:   std_logic_vector( 3 DOWNTO 0);
Stefan Schuermans implemented switches

Stefan Schuermans authored 12 years ago

69)     SIGNAL s_switches_addr:    std_logic_vector( 2 DOWNTO 0);
70)     SIGNAL s_switches_rd_data: std_logic_vector(31 DOWNTO 0);
Stefan Schuermans implemented TX part of UART...

Stefan Schuermans authored 12 years ago

71)     SIGNAL s_uart_addr:    std_logic_vector( 3 DOWNTO 0);
72)     SIGNAL s_uart_rd_data: std_logic_vector(31 DOWNTO 0);
Stefan Schuermans add read_enable signal to d...

Stefan Schuermans authored 12 years ago

73)     SIGNAL s_uart_rd_en:   std_logic_vector( 3 DOWNTO 0);
Stefan Schuermans implemented TX part of UART...

Stefan Schuermans authored 12 years ago

74)     SIGNAL s_uart_wr_data: std_logic_vector(31 DOWNTO 0);
75)     SIGNAL s_uart_wr_en:   std_logic_vector( 3 DOWNTO 0);
Stefan Schuermans implemented ethernet TX fra...

Stefan Schuermans authored 12 years ago

76)     SIGNAL s_eth_addr:    std_logic_vector( 5 DOWNTO 0);
Stefan Schuermans begin of ethernet RX implem...

Stefan Schuermans authored 12 years ago

77)     SIGNAL s_eth_rd_data: std_logic_vector(31 DOWNTO 0);
Stefan Schuermans add read_enable signal to d...

Stefan Schuermans authored 12 years ago

78)     SIGNAL s_eth_rd_en:   std_logic_vector( 3 DOWNTO 0);
Stefan Schuermans begin of ethernet RX implem...

Stefan Schuermans authored 12 years ago

79)     SIGNAL s_eth_wr_data: std_logic_vector(31 DOWNTO 0);
80)     SIGNAL s_eth_wr_en:   std_logic_vector( 3 DOWNTO 0);
Stefan Schuermans added cycle counter peripheral

Stefan Schuermans authored 12 years ago

81)     SIGNAL s_cyc_cnt_rd_data: std_logic_vector(31 DOWNTO 0);
82)     SIGNAL s_cyc_cnt_wr_data: std_logic_vector(31 DOWNTO 0);
83)     SIGNAL s_cyc_cnt_wr_en:   std_logic;
Stefan Schuermans implented basic system with...

Stefan Schuermans authored 12 years ago

84) 
85)     COMPONENT e_mips_core IS
86)         PORT (
87)             rst:            IN  std_logic;
88)             clk:            IN  std_logic;
89)             o_instr_addr:   OUT std_logic_vector(31 DOWNTO 0);
90)             i_instr_data:   IN  std_logic_vector(31 DOWNTO 0);
Stefan Schuermans implemented multi-master fe...

Stefan Schuermans authored 12 years ago

91)             o_data_req:     OUT std_logic;
92)             i_data_grant:   IN  std_logic;
Stefan Schuermans implented basic system with...

Stefan Schuermans authored 12 years ago

93)             o_data_addr:    OUT std_logic_vector(31 DOWNTO 0);
94)             i_data_rd_data: IN  std_logic_vector(31 DOWNTO 0);
Stefan Schuermans add read_enable signal to d...

Stefan Schuermans authored 12 years ago

95)             o_data_rd_en:   OUT std_logic_vector( 3 DOWNTO 0);
Stefan Schuermans implented basic system with...

Stefan Schuermans authored 12 years ago

96)             o_data_wr_data: OUT std_logic_vector(31 DOWNTO 0);
Stefan Schuermans implemented multi-master fe...

Stefan Schuermans authored 12 years ago

97)             o_data_wr_en:   OUT std_logic_vector( 3 DOWNTO 0)
Stefan Schuermans implented basic system with...

Stefan Schuermans authored 12 years ago

98)         );
99)     END COMPONENT e_mips_core;
100) 
Stefan Schuermans added "LEDs" I/O peripheral...

Stefan Schuermans authored 12 years ago

101)     COMPONENT e_rom IS
102)         GENERIC (
Stefan Schuermans implemented loading of data...

Stefan Schuermans authored 12 years ago

103)             addr_width: natural
Stefan Schuermans added "LEDs" I/O peripheral...

Stefan Schuermans authored 12 years ago

104)         );
105)         PORT (
106)             clk:    IN  std_logic;
107)             i_addr: IN  std_logic_vector(addr_width - 1 DOWNTO 0);
108)             o_data: OUT std_logic_vector(            31 DOWNTO 0)
109)         );
110)     END COMPONENT e_rom;
111) 
Stefan Schuermans implemented loading of data...

Stefan Schuermans authored 12 years ago

112)     COMPONENT e_ram_0 IS
Stefan Schuermans implented basic system with...

Stefan Schuermans authored 12 years ago

113)         GENERIC (
Stefan Schuermans implemented loading of data...

Stefan Schuermans authored 12 years ago

114)             addr_width: natural
Stefan Schuermans implented basic system with...

Stefan Schuermans authored 12 years ago

115)         );
116)         PORT (
117)             clk:       IN  std_logic;
118)             i_addr:    IN  std_logic_vector(addr_width - 1 DOWNTO 0);
Stefan Schuermans implemented loading of data...

Stefan Schuermans authored 12 years ago

119)             o_rd_data: OUT std_logic_vector(             7 DOWNTO 0);
120)             i_wr_data: IN  std_logic_vector(             7 DOWNTO 0);
Stefan Schuermans implented basic system with...

Stefan Schuermans authored 12 years ago

121)             i_wr_en:   IN  std_logic
122)         );
Stefan Schuermans implemented loading of data...

Stefan Schuermans authored 12 years ago

123)     END COMPONENT e_ram_0;
124) 
125)     COMPONENT e_ram_1 IS
126)         GENERIC (
127)             addr_width: natural
128)         );
129)         PORT (
130)             clk:       IN  std_logic;
131)             i_addr:    IN  std_logic_vector(addr_width - 1 DOWNTO 0);
132)             o_rd_data: OUT std_logic_vector(             7 DOWNTO 0);
133)             i_wr_data: IN  std_logic_vector(             7 DOWNTO 0);
134)             i_wr_en:   IN  std_logic
135)         );
136)     END COMPONENT e_ram_1;
137) 
138)     COMPONENT e_ram_2 IS
139)         GENERIC (
140)             addr_width: natural
141)         );
142)         PORT (
143)             clk:       IN  std_logic;
144)             i_addr:    IN  std_logic_vector(addr_width - 1 DOWNTO 0);
145)             o_rd_data: OUT std_logic_vector(             7 DOWNTO 0);
146)             i_wr_data: IN  std_logic_vector(             7 DOWNTO 0);
147)             i_wr_en:   IN  std_logic
148)         );
149)     END COMPONENT e_ram_2;
150) 
151)     COMPONENT e_ram_3 IS
152)         GENERIC (
153)             addr_width: natural
154)         );
155)         PORT (
156)             clk:       IN  std_logic;
157)             i_addr:    IN  std_logic_vector(addr_width - 1 DOWNTO 0);
158)             o_rd_data: OUT std_logic_vector(             7 DOWNTO 0);
159)             i_wr_data: IN  std_logic_vector(             7 DOWNTO 0);
160)             i_wr_en:   IN  std_logic
161)         );
162)     END COMPONENT e_ram_3;
Stefan Schuermans implented basic system with...

Stefan Schuermans authored 12 years ago

163) 
Stefan Schuermans added "LEDs" I/O peripheral...

Stefan Schuermans authored 12 years ago

164)     COMPONENT e_io_leds IS
Stefan Schuermans implented basic system with...

Stefan Schuermans authored 12 years ago

165)         PORT (
Stefan Schuermans added "LEDs" I/O peripheral...

Stefan Schuermans authored 12 years ago

166)             rst:        IN  std_logic;
167)             clk:        IN  std_logic;
168)             o_rd_data:  OUT std_logic_vector(7 DOWNTO 0);
169)             i_wr_data:  IN  std_logic_vector(7 DOWNTO 0);
170)             i_wr_en:    IN  std_logic;
171)             pin_o_leds: OUT std_logic_vector(7 DOWNTO 0)
Stefan Schuermans implented basic system with...

Stefan Schuermans authored 12 years ago

172)         );
Stefan Schuermans added "LEDs" I/O peripheral...

Stefan Schuermans authored 12 years ago

173)     END COMPONENT e_io_leds;
Stefan Schuermans implented basic system with...

Stefan Schuermans authored 12 years ago

174) 
Stefan Schuermans implemented LCD peripheral

Stefan Schuermans authored 12 years ago

175)     COMPONENT e_io_lcd IS
176)         PORT (
177)             rst:       IN  std_logic;
178)             clk:       IN  std_logic;
179)             o_rd_data: OUT std_logic_vector(31 DOWNTO 0);
180)             i_wr_data: IN  std_logic_vector(31 DOWNTO 0);
181)             i_wr_en:   IN  std_logic_vector( 3 DOWNTO 0);
182)             pin_o_lcd: OUT t_io_lcd_pins
183)         );
184)     END COMPONENT e_io_lcd;
185) 
Stefan Schuermans implemented switches

Stefan Schuermans authored 12 years ago

186)     COMPONENT e_io_switches IS
187)         PORT (
188)             rst:            IN  std_logic;
189)             clk:            IN  std_logic;
190)             i_addr:         IN  std_logic_vector( 0 DOWNTO 0);
191)             o_rd_data:      OUT std_logic_vector(31 DOWNTO 0);
192)             pin_i_switches: IN  t_io_switches_pins
193)         );
194)     END COMPONENT e_io_switches;
195) 
Stefan Schuermans implemented TX part of UART...

Stefan Schuermans authored 12 years ago

196)     COMPONENT e_io_uart IS
197)         PORT (
198)             rst:       IN  std_logic;
199)             clk:       IN  std_logic;
200)             i_addr:    IN  std_logic_vector( 1 DOWNTO 0);
201)             o_rd_data: OUT std_logic_vector(31 DOWNTO 0);
Stefan Schuermans add read_enable signal to d...

Stefan Schuermans authored 12 years ago

202)             i_rd_en:   IN  std_logic_vector( 3 DOWNTO 0);
Stefan Schuermans implemented TX part of UART...

Stefan Schuermans authored 12 years ago

203)             i_wr_data: IN  std_logic_vector(31 DOWNTO 0);
204)             i_wr_en:   IN  std_logic_vector( 3 DOWNTO 0);
Stefan Schuermans implemented RX part of UART...

Stefan Schuermans authored 12 years ago

205)             pin_i_rx:  IN  std_logic;
Stefan Schuermans implemented TX part of UART...

Stefan Schuermans authored 12 years ago

206)             pin_o_tx:  OUT std_logic
207)         );
208)     END COMPONENT e_io_uart;
209) 
Stefan Schuermans begin of ethernet RX implem...

Stefan Schuermans authored 12 years ago

210)     COMPONENT e_io_eth IS
211)         PORT (
212)             rst:          IN  std_logic;
213)             clk:          IN  std_logic;
Stefan Schuermans implemented ethernet TX fra...

Stefan Schuermans authored 12 years ago

214)             i_addr:       IN  std_logic_vector( 3 DOWNTO 0);
Stefan Schuermans begin of ethernet RX implem...

Stefan Schuermans authored 12 years ago

215)             o_rd_data:    OUT std_logic_vector(31 DOWNTO 0);
Stefan Schuermans add read_enable signal to d...

Stefan Schuermans authored 12 years ago

216)             i_rd_en:      IN  std_logic_vector( 3 DOWNTO 0);
Stefan Schuermans begin of ethernet RX implem...

Stefan Schuermans authored 12 years ago

217)             i_wr_data:    IN  std_logic_vector(31 DOWNTO 0);
218)             i_wr_en:      IN  std_logic_vector( 3 DOWNTO 0);
Stefan Schuermans implemented multi-master fe...

Stefan Schuermans authored 12 years ago

219)             o_bm_req:     OUT std_logic;
220)             i_bm_grant:   IN  std_logic;
221)             o_bm_addr:    OUT std_logic_vector(31 DOWNTO 0);
222)             i_bm_rd_data: IN  std_logic_vector(31 DOWNTO 0);
223)             o_bm_rd_en:   OUT std_logic_vector( 3 DOWNTO 0);
224)             o_bm_wr_data: OUT std_logic_vector(31 DOWNTO 0);
225)             o_bm_wr_en:   OUT std_logic_vector( 3 DOWNTO 0);
Stefan Schuermans records for ethernet pins

Stefan Schuermans authored 12 years ago

226)             pin_o:        OUT t_io_eth_o_pins;
227)             pin_i:        IN  t_io_eth_i_pins
Stefan Schuermans begin of ethernet RX implem...

Stefan Schuermans authored 12 years ago

228)         );
229)     END COMPONENT e_io_eth;
230) 
Stefan Schuermans added cycle counter peripheral

Stefan Schuermans authored 12 years ago

231)     COMPONENT e_io_cyc_cnt IS
232)         PORT (
Stefan Schuermans implemented LCD peripheral

Stefan Schuermans authored 12 years ago

233)             rst:       IN  std_logic;
234)             clk:       IN  std_logic;
235)             o_rd_data: OUT std_logic_vector(31 DOWNTO 0);
236)             i_wr_data: IN  std_logic_vector(31 DOWNTO 0);
237)             i_wr_en:   IN  std_logic
Stefan Schuermans added cycle counter peripheral

Stefan Schuermans authored 12 years ago

238)         );
239)     END COMPONENT e_io_cyc_cnt;
240) 
Stefan Schuermans implented basic system with...

Stefan Schuermans authored 12 years ago

241) BEGIN
242) 
243)     core: e_mips_core
244)         PORT MAP (
245)             rst            => rst,
246)             clk            => clk,
247)             o_instr_addr   => s_instr_addr,
248)             i_instr_data   => s_instr_data,
Stefan Schuermans implemented multi-master fe...

Stefan Schuermans authored 12 years ago

249)             o_data_req     => s_core_req,
250)             i_data_grant   => s_core_grant,
251)             o_data_addr    => s_core_addr,
252)             i_data_rd_data => s_core_rd_data,
253)             o_data_rd_en   => s_core_rd_en,
254)             o_data_wr_data => s_core_wr_data,
255)             o_data_wr_en   => s_core_wr_en
Stefan Schuermans implented basic system with...

Stefan Schuermans authored 12 years ago

256)         );
257) 
Stefan Schuermans added "LEDs" I/O peripheral...

Stefan Schuermans authored 12 years ago

258)     instr: e_rom
Stefan Schuermans implented basic system with...

Stefan Schuermans authored 12 years ago

259)         GENERIC MAP (
Stefan Schuermans increased code and data add...

Stefan Schuermans authored 12 years ago

260)             addr_width => c_instr_addr_width - 2
Stefan Schuermans implented basic system with...

Stefan Schuermans authored 12 years ago

261)         )
262)         PORT MAP (
263)             clk    => clk,
Stefan Schuermans increased code and data add...

Stefan Schuermans authored 12 years ago

264)             i_addr => s_instr_addr(c_instr_addr_width - 1 DOWNTO 2),
Stefan Schuermans added "LEDs" I/O peripheral...

Stefan Schuermans authored 12 years ago

265)             o_data => s_instr_data
Stefan Schuermans implented basic system with...

Stefan Schuermans authored 12 years ago

266)         );
267) 
Stefan Schuermans implemented multi-master fe...

Stefan Schuermans authored 12 years ago

268)     p_dbus_arbit: PROCESS(s_ethbm_req, s_core_req)
269)     BEGIN
270)         s_ethbm_grant <= '0';
271)         s_core_grant  <= '0';
272)         IF s_ethbm_req = '1' THEN
273)             s_ethbm_grant <= '1';
274)         ELSIF s_core_req = '1' THEN
275)             s_core_grant <= '1';
276)         END IF;
277)     END PROCESS p_dbus_arbit;
278) 
279)     p_dbus_arbit_wr: PROCESS(s_ethbm_grant, s_ethbm_addr, s_ethbm_rd_en,
280)                                             s_ethbm_wr_data, s_ethbm_wr_en,
281)                              s_core_grant, s_core_addr, s_core_rd_en,
282)                                            s_core_wr_data, s_core_wr_en)
283)     BEGIN
284)         s_dbus_addr    <= (OTHERS => '0');
285)         s_dbus_rd_en   <= (OTHERS => '0');
286)         s_dbus_wr_data <= (OTHERS => '0');
287)         s_dbus_wr_en   <= (OTHERS => '0');
288)         IF s_ethbm_grant = '1' THEN
289)             s_dbus_addr    <= s_ethbm_addr;
290)             s_dbus_rd_en   <= s_ethbm_rd_en;
291)             s_dbus_wr_data <= s_ethbm_wr_data;
292)             s_dbus_wr_en   <= s_ethbm_wr_en;
293)         ELSIF s_core_grant = '1' THEN
294)             s_dbus_addr    <= s_core_addr;
295)             s_dbus_rd_en   <= s_core_rd_en;
296)             s_dbus_wr_data <= s_core_wr_data;
297)             s_dbus_wr_en   <= s_core_wr_en;
298)         END IF;
299)     END PROCESS p_dbus_arbit_wr;
300) 
301)     s_ethbm_rd_data <= s_dbus_rd_data;
302)     s_core_rd_data  <= s_dbus_rd_data;
303) 
Stefan Schuermans removed bottleneck from dat...

Stefan Schuermans authored 12 years ago

304)     p_dbus_rd_sync: PROCESS(rst, clk)
305)     BEGIN
306)         IF rst = '1' THEN
307)             r_dbus_addr_delay <= (OTHERS => '0');
308)         ELSIF rising_edge(clk) THEN
309)             r_dbus_addr_delay <= s_dbus_addr;
310)         END IF;
311)     END PROCESS p_dbus_rd_sync;
312) 
313)     p_dbus_rd: PROCESS(r_dbus_addr_delay,
314)                        s_data_rd_data,
315)                        s_leds_rd_data,
316)                        s_lcd_rd_data,
317)                        s_switches_rd_data,
318)                        s_uart_rd_data,
319)                        s_eth_rd_data,
320)                        s_cyc_cnt_rd_data)
321)     BEGIN
322)         s_dbus_rd_data <= (OTHERS => '0');
323)         IF r_dbus_addr_delay(31) = '0' THEN
324)             s_dbus_rd_data <= s_data_rd_data;
325)         ELSIF r_dbus_addr_delay(31 DOWNTO 16) = X"8000" THEN
326)             CASE r_dbus_addr_delay(15 DOWNTO 8) IS
327)                 WHEN X"00" =>
328)                     s_dbus_rd_data <= X"000000" & s_leds_rd_data;
329)                 WHEN X"01" =>
330)                     s_dbus_rd_data <= s_lcd_rd_data;
331)                 WHEN X"02" =>
332)                     s_dbus_rd_data <= s_switches_rd_data;
333)                 WHEN X"03" =>
334)                     s_dbus_rd_data <= s_uart_rd_data;
335)                 WHEN X"04" =>
336)                     s_dbus_rd_data <= s_eth_rd_data;
337)                 WHEN X"10" =>
338)                     s_dbus_rd_data <= s_cyc_cnt_rd_data;
339)                 WHEN OTHERS => NULL;
340)             END CASE;
341)         END IF;
342)     END PROCESS p_dbus_rd;
343) 
Stefan Schuermans add read_enable signal to d...

Stefan Schuermans authored 12 years ago

344)     p_dbus_wr: PROCESS(s_dbus_addr, s_dbus_rd_en,
345)                        s_dbus_wr_data, s_dbus_wr_en)
Stefan Schuermans added cycle counter peripheral

Stefan Schuermans authored 12 years ago

346)         VARIABLE v_wr_en_word: std_logic;
Stefan Schuermans added "LEDs" I/O peripheral...

Stefan Schuermans authored 12 years ago

347)     BEGIN
Stefan Schuermans added cycle counter peripheral

Stefan Schuermans authored 12 years ago

348)         v_wr_en_word := s_dbus_wr_en(0) AND s_dbus_wr_en(1) AND
349)                         s_dbus_wr_en(2) AND s_dbus_wr_en(3);
Stefan Schuermans added "LEDs" I/O peripheral...

Stefan Schuermans authored 12 years ago

350)         s_data_addr    <= (OTHERS => '0');
351)         s_data_wr_data <= (OTHERS => '0');
352)         s_data_wr_en   <= (OTHERS => '0');
353)         s_leds_wr_data <= (OTHERS => '0');
354)         s_leds_wr_en   <= '0';
Stefan Schuermans implemented LCD peripheral

Stefan Schuermans authored 12 years ago

355)         s_lcd_wr_data <= (OTHERS => '0');
356)         s_lcd_wr_en   <= (OTHERS => '0');
Stefan Schuermans remove unwanted latch

Stefan Schuermans authored 12 years ago

357)         s_switches_addr <= (OTHERS => '0');
Stefan Schuermans implemented TX part of UART...

Stefan Schuermans authored 12 years ago

358)         s_uart_addr    <= (OTHERS => '0');
Stefan Schuermans add read_enable signal to d...

Stefan Schuermans authored 12 years ago

359)         s_uart_rd_en   <= (OTHERS => '0');
Stefan Schuermans implemented TX part of UART...

Stefan Schuermans authored 12 years ago

360)         s_uart_wr_data <= (OTHERS => '0');
361)         s_uart_wr_en   <= (OTHERS => '0');
Stefan Schuermans begin of ethernet RX implem...

Stefan Schuermans authored 12 years ago

362)         s_eth_addr    <= (OTHERS => '0');
Stefan Schuermans add read_enable signal to d...

Stefan Schuermans authored 12 years ago

363)         s_eth_rd_en   <= (OTHERS => '0');
Stefan Schuermans begin of ethernet RX implem...

Stefan Schuermans authored 12 years ago

364)         s_eth_wr_data <= (OTHERS => '0');
365)         s_eth_wr_en   <= (OTHERS => '0');
Stefan Schuermans implemented LCD peripheral

Stefan Schuermans authored 12 years ago

366)         s_cyc_cnt_wr_data <= (OTHERS => '0');
367)         s_cyc_cnt_wr_en   <= '0';
Stefan Schuermans added "LEDs" I/O peripheral...

Stefan Schuermans authored 12 years ago

368)         IF s_dbus_addr(31) = '0' THEN
369)             s_data_addr    <= s_dbus_addr;
370)             s_data_wr_data <= s_dbus_wr_data;
371)             s_data_wr_en   <= s_dbus_wr_en;
Stefan Schuermans added cycle counter peripheral

Stefan Schuermans authored 12 years ago

372)         ELSIF s_dbus_addr(31 DOWNTO 16) = X"8000" THEN
373)             CASE s_dbus_addr(15 DOWNTO 8) IS
374)                 WHEN X"00" =>
375)                     s_leds_wr_data <= s_dbus_wr_data(7 DOWNTO 0);
376)                     s_leds_wr_en   <= s_dbus_wr_en(0);
Stefan Schuermans implemented LCD peripheral

Stefan Schuermans authored 12 years ago

377)                 WHEN X"01" =>
Stefan Schuermans removed bottleneck from dat...

Stefan Schuermans authored 12 years ago

378)                     s_lcd_wr_data <= s_dbus_wr_data;
379)                     s_lcd_wr_en   <= s_dbus_wr_en;
Stefan Schuermans implemented switches

Stefan Schuermans authored 12 years ago

380)                 WHEN X"02" =>
381)                     s_switches_addr <= s_dbus_addr(2 DOWNTO 0);
Stefan Schuermans implemented TX part of UART...

Stefan Schuermans authored 12 years ago

382)                 WHEN X"03" =>
383)                     s_uart_addr    <= s_dbus_addr(3 DOWNTO 0);
Stefan Schuermans add read_enable signal to d...

Stefan Schuermans authored 12 years ago

384)                     s_uart_rd_en   <= s_dbus_rd_en;
Stefan Schuermans implemented TX part of UART...

Stefan Schuermans authored 12 years ago

385)                     s_uart_wr_data <= s_dbus_wr_data;
386)                     s_uart_wr_en   <= s_dbus_wr_en;
Stefan Schuermans begin of ethernet RX implem...

Stefan Schuermans authored 12 years ago

387)                 WHEN X"04" =>
Stefan Schuermans implemented ethernet TX fra...

Stefan Schuermans authored 12 years ago

388)                     s_eth_addr    <= s_dbus_addr(5 DOWNTO 0);
Stefan Schuermans add read_enable signal to d...

Stefan Schuermans authored 12 years ago

389)                     s_eth_rd_en   <= s_dbus_rd_en;
Stefan Schuermans removed bottleneck from dat...

Stefan Schuermans authored 12 years ago

390)                     s_eth_wr_data <= s_dbus_wr_data;
391)                     s_eth_wr_en   <= s_dbus_wr_en;
Stefan Schuermans added cycle counter peripheral

Stefan Schuermans authored 12 years ago

392)                 WHEN X"10" =>
393)                     s_cyc_cnt_wr_data <= s_dbus_wr_data;
394)                     s_cyc_cnt_wr_en   <= v_wr_en_word;
395)                 WHEN OTHERS => NULL;
396)             END CASE;
Stefan Schuermans added "LEDs" I/O peripheral...

Stefan Schuermans authored 12 years ago

397)         END IF;
Stefan Schuermans removed bottleneck from dat...

Stefan Schuermans authored 12 years ago

398)     END PROCESS p_dbus_wr;
Stefan Schuermans added "LEDs" I/O peripheral...

Stefan Schuermans authored 12 years ago

399) 
Stefan Schuermans implemented loading of data...

Stefan Schuermans authored 12 years ago

400)     data_0: e_ram_0
401)         GENERIC MAP (
Stefan Schuermans increased code and data add...

Stefan Schuermans authored 12 years ago

402)             addr_width => c_data_addr_width - 2
Stefan Schuermans implemented loading of data...

Stefan Schuermans authored 12 years ago

403)         )
404)         PORT MAP (
405)             clk       => clk,
Stefan Schuermans increased code and data add...

Stefan Schuermans authored 12 years ago

406)             i_addr    => s_data_addr(c_data_addr_width - 1 DOWNTO 2),
Stefan Schuermans implemented loading of data...

Stefan Schuermans authored 12 years ago

407)             o_rd_data => s_data_rd_data(7 DOWNTO 0),
408)             i_wr_data => s_data_wr_data(7 DOWNTO 0),
409)             i_wr_en   => s_data_wr_en(0)
410)         );
411) 
412)     data_1: e_ram_1
413)         GENERIC MAP (
Stefan Schuermans increased code and data add...

Stefan Schuermans authored 12 years ago

414)             addr_width => c_data_addr_width - 2
Stefan Schuermans implemented loading of data...

Stefan Schuermans authored 12 years ago

415)         )
416)         PORT MAP (
417)             clk       => clk,
Stefan Schuermans increased code and data add...

Stefan Schuermans authored 12 years ago

418)             i_addr    => s_data_addr(c_data_addr_width - 1 DOWNTO 2),
Stefan Schuermans implemented loading of data...

Stefan Schuermans authored 12 years ago

419)             o_rd_data => s_data_rd_data(15 DOWNTO 8),
420)             i_wr_data => s_data_wr_data(15 DOWNTO 8),
421)             i_wr_en   => s_data_wr_en(1)
422)         );
423) 
424)     data_2: e_ram_2
425)         GENERIC MAP (
Stefan Schuermans increased code and data add...

Stefan Schuermans authored 12 years ago

426)             addr_width => c_data_addr_width - 2
Stefan Schuermans implemented loading of data...

Stefan Schuermans authored 12 years ago

427)         )
428)         PORT MAP (
429)             clk       => clk,
Stefan Schuermans increased code and data add...

Stefan Schuermans authored 12 years ago

430)             i_addr    => s_data_addr(c_data_addr_width - 1 DOWNTO 2),
Stefan Schuermans implemented loading of data...

Stefan Schuermans authored 12 years ago

431)             o_rd_data => s_data_rd_data(23 DOWNTO 16),
432)             i_wr_data => s_data_wr_data(23 DOWNTO 16),
433)             i_wr_en   => s_data_wr_en(2)
434)         );
435) 
436)     data_3: e_ram_3
437)         GENERIC MAP (
Stefan Schuermans increased code and data add...

Stefan Schuermans authored 12 years ago

438)             addr_width => c_data_addr_width - 2
Stefan Schuermans implemented loading of data...

Stefan Schuermans authored 12 years ago

439)         )
440)         PORT MAP (
441)             clk       => clk,
Stefan Schuermans increased code and data add...

Stefan Schuermans authored 12 years ago

442)             i_addr    => s_data_addr(c_data_addr_width - 1 DOWNTO 2),
Stefan Schuermans implemented loading of data...

Stefan Schuermans authored 12 years ago

443)             o_rd_data => s_data_rd_data(31 DOWNTO 24),
444)             i_wr_data => s_data_wr_data(31 DOWNTO 24),
445)             i_wr_en   => s_data_wr_en(3)
446)         );
Stefan Schuermans implented basic system with...

Stefan Schuermans authored 12 years ago

447) 
Stefan Schuermans added "LEDs" I/O peripheral...

Stefan Schuermans authored 12 years ago

448)     leds: e_io_leds
449)         PORT MAP (
450)             rst        => rst,
451)             clk        => clk,
452)             o_rd_data  => s_leds_rd_data,
453)             i_wr_data  => s_leds_wr_data,
454)             i_wr_en    => s_leds_wr_en,
455)             pin_o_leds => pin_o_leds
456)         );
Stefan Schuermans implented basic system with...

Stefan Schuermans authored 12 years ago

457) 
Stefan Schuermans implemented LCD peripheral

Stefan Schuermans authored 12 years ago

458)     lcd: e_io_lcd
459)         PORT MAP (
460)             rst       => rst,
461)             clk       => clk,
462)             o_rd_data => s_lcd_rd_data,
463)             i_wr_data => s_lcd_wr_data,
464)             i_wr_en   => s_lcd_wr_en,
465)             pin_o_lcd => pin_o_lcd
466)         );
467) 
Stefan Schuermans implemented switches

Stefan Schuermans authored 12 years ago

468)     switches: e_io_switches
469)         PORT MAP (
470)             rst            => rst,
471)             clk            => clk,
472)             i_addr         => s_switches_addr(2 DOWNTO 2),
473)             o_rd_data      => s_switches_rd_data,
474)             pin_i_switches => pin_i_switches
475)         );
476) 
Stefan Schuermans implemented TX part of UART...

Stefan Schuermans authored 12 years ago

477)     uart: e_io_uart
478)         PORT MAP (
479)             rst       => rst,
480)             clk       => clk,
481)             i_addr    => s_uart_addr(3 DOWNTO 2),
482)             o_rd_data => s_uart_rd_data,
Stefan Schuermans add read_enable signal to d...

Stefan Schuermans authored 12 years ago

483)             i_rd_en   => s_uart_rd_en,
Stefan Schuermans implemented TX part of UART...

Stefan Schuermans authored 12 years ago

484)             i_wr_data => s_uart_wr_data,
485)             i_wr_en   => s_uart_wr_en,
Stefan Schuermans implemented RX part of UART...

Stefan Schuermans authored 12 years ago

486)             pin_i_rx  => pin_i_uart_rx,
Stefan Schuermans implemented TX part of UART...

Stefan Schuermans authored 12 years ago

487)             pin_o_tx  => pin_o_uart_tx
488)         );
489) 
Stefan Schuermans begin of ethernet RX implem...

Stefan Schuermans authored 12 years ago

490)     eth: e_io_eth
491)         PORT MAP (
492)             rst          => rst,
493)             clk          => clk,
Stefan Schuermans implemented ethernet TX fra...

Stefan Schuermans authored 12 years ago

494)             i_addr       => s_eth_addr(5 DOWNTO 2),
Stefan Schuermans begin of ethernet RX implem...

Stefan Schuermans authored 12 years ago

495)             o_rd_data    => s_eth_rd_data,
Stefan Schuermans add read_enable signal to d...

Stefan Schuermans authored 12 years ago

496)             i_rd_en      => s_eth_rd_en,
Stefan Schuermans begin of ethernet RX implem...

Stefan Schuermans authored 12 years ago

497)             i_wr_data    => s_eth_wr_data,
498)             i_wr_en      => s_eth_wr_en,
Stefan Schuermans implemented multi-master fe...

Stefan Schuermans authored 12 years ago

499)             o_bm_req     => s_ethbm_req,
500)             i_bm_grant   => s_ethbm_grant,
501)             o_bm_addr    => s_ethbm_addr,
502)             i_bm_rd_data => s_ethbm_rd_data,
503)             o_bm_rd_en   => s_ethbm_rd_en,
504)             o_bm_wr_data => s_ethbm_wr_data,
505)             o_bm_wr_en   => s_ethbm_wr_en,
Stefan Schuermans records for ethernet pins

Stefan Schuermans authored 12 years ago

506)             pin_o        => pin_o_eth,
507)             pin_i        => pin_i_eth
Stefan Schuermans begin of ethernet RX implem...

Stefan Schuermans authored 12 years ago

508)         );
509) 
Stefan Schuermans added cycle counter peripheral

Stefan Schuermans authored 12 years ago

510)     cyc_cnt: e_io_cyc_cnt
511)         PORT MAP (
Stefan Schuermans implemented LCD peripheral

Stefan Schuermans authored 12 years ago

512)             rst       => rst,
513)             clk       => clk,
514)             o_rd_data => s_cyc_cnt_rd_data,
515)             i_wr_data => s_cyc_cnt_wr_data,
516)             i_wr_en   => s_cyc_cnt_wr_en
Stefan Schuermans added cycle counter peripheral

Stefan Schuermans authored 12 years ago

517)         );
518)