d1693e89d9e8bb47c3e377a82be14ec7faa64235
Stefan Schuermans implented basic system with...

Stefan Schuermans authored 12 years ago

1) LIBRARY IEEE;
2) USE IEEE.STD_LOGIC_1164.ALL;
3) USE IEEE.NUMERIC_STD.ALL;
Stefan Schuermans implemented LCD peripheral

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

6) 
7) ENTITY e_system IS
8)     PORT (
Stefan Schuermans begin of ethernet RX implem...

Stefan Schuermans authored 12 years ago

9)         clk:              IN  std_logic;
10)         pin_o_leds:       OUT std_logic_vector(7 DOWNTO 0);
11)         pin_o_lcd:        OUT t_io_lcd_pins;
12)         pin_i_switches:   IN  t_io_switches_pins;
13)         pin_i_uart_rx:    IN  std_logic;
14)         pin_o_uart_tx:    OUT std_logic;
15)         pin_o_eth_nrst:   OUT std_logic;
16)         pin_i_eth_rx_clk: IN  std_logic;
17)         pin_i_eth_rxd:    IN  std_logic_vector(4 DOWNTO 0);
18)         pin_i_eth_rx_dv:  IN  std_logic;
19)         pin_i_eth_crs:    IN  std_logic;
20)         pin_i_eth_col:    IN  std_logic;
21)         pin_i_eth_tx_clk: IN  std_logic;
22)         pin_o_eth_txd:    OUT std_logic_vector(3 DOWNTO 0);
23)         pin_o_eth_tx_en:  OUT std_logic
Stefan Schuermans implented basic system with...

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

52)     SIGNAL s_dbus_addr:    std_logic_vector(31 DOWNTO 0);
53)     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

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

72)     SIGNAL s_uart_addr:    std_logic_vector( 3 DOWNTO 0);
73)     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

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

78)     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

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

94)             o_data_addr:    OUT std_logic_vector(31 DOWNTO 0);
95)             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

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

175) 
Stefan Schuermans implemented LCD peripheral

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

220)             o_bm_req:     OUT std_logic;
221)             i_bm_grant:   IN  std_logic;
222)             o_bm_addr:    OUT std_logic_vector(31 DOWNTO 0);
223)             i_bm_rd_data: IN  std_logic_vector(31 DOWNTO 0);
224)             o_bm_rd_en:   OUT std_logic_vector( 3 DOWNTO 0);
225)             o_bm_wr_data: OUT std_logic_vector(31 DOWNTO 0);
226)             o_bm_wr_en:   OUT std_logic_vector( 3 DOWNTO 0);
Stefan Schuermans begin of ethernet RX implem...

Stefan Schuermans authored 12 years ago

227)             pin_o_nrst:   OUT std_logic;
228)             pin_i_rx_clk: IN  std_logic;
229)             pin_i_rxd:    IN  std_logic_vector(4 DOWNTO 0);
230)             pin_i_rx_dv:  IN  std_logic;
231)             pin_i_crs:    IN  std_logic;
232)             pin_i_col:    IN  std_logic;
233)             pin_i_tx_clk: IN  std_logic;
234)             pin_o_txd:    OUT std_logic_vector(3 DOWNTO 0);
235)             pin_o_tx_en:  OUT std_logic
236)         );
237)     END COMPONENT e_io_eth;
238) 
Stefan Schuermans added cycle counter peripheral

Stefan Schuermans authored 12 years ago

239)     COMPONENT e_io_cyc_cnt IS
240)         PORT (
Stefan Schuermans implemented LCD peripheral

Stefan Schuermans authored 12 years ago

241)             rst:       IN  std_logic;
242)             clk:       IN  std_logic;
243)             o_rd_data: OUT std_logic_vector(31 DOWNTO 0);
244)             i_wr_data: IN  std_logic_vector(31 DOWNTO 0);
245)             i_wr_en:   IN  std_logic
Stefan Schuermans added cycle counter peripheral

Stefan Schuermans authored 12 years ago

246)         );
247)     END COMPONENT e_io_cyc_cnt;
248) 
Stefan Schuermans implented basic system with...

Stefan Schuermans authored 12 years ago

249) BEGIN
250) 
251)     core: e_mips_core
252)         PORT MAP (
253)             rst            => rst,
254)             clk            => clk,
255)             o_instr_addr   => s_instr_addr,
256)             i_instr_data   => s_instr_data,
Stefan Schuermans implemented multi-master fe...

Stefan Schuermans authored 12 years ago

257)             o_data_req     => s_core_req,
258)             i_data_grant   => s_core_grant,
259)             o_data_addr    => s_core_addr,
260)             i_data_rd_data => s_core_rd_data,
261)             o_data_rd_en   => s_core_rd_en,
262)             o_data_wr_data => s_core_wr_data,
263)             o_data_wr_en   => s_core_wr_en
Stefan Schuermans implented basic system with...

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

269)         )
270)         PORT MAP (
271)             clk    => clk,
Stefan Schuermans increased code and data add...

Stefan Schuermans authored 12 years ago

272)             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

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

Stefan Schuermans authored 12 years ago

274)         );
275) 
Stefan Schuermans implemented multi-master fe...

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

355)     BEGIN
Stefan Schuermans added cycle counter peripheral

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

358)         s_data_addr    <= (OTHERS => '0');
359)         s_data_wr_data <= (OTHERS => '0');
360)         s_data_wr_en   <= (OTHERS => '0');
361)         s_leds_wr_data <= (OTHERS => '0');
362)         s_leds_wr_en   <= '0';
Stefan Schuermans implemented LCD peripheral

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

376)         IF s_dbus_addr(31) = '0' THEN
377)             s_data_addr    <= s_dbus_addr;
378)             s_data_wr_data <= s_dbus_wr_data;
379)             s_data_wr_en   <= s_dbus_wr_en;
Stefan Schuermans added cycle counter peripheral

Stefan Schuermans authored 12 years ago

380)         ELSIF s_dbus_addr(31 DOWNTO 16) = X"8000" THEN
381)             CASE s_dbus_addr(15 DOWNTO 8) IS
382)                 WHEN X"00" =>
383)                     s_leds_wr_data <= s_dbus_wr_data(7 DOWNTO 0);
384)                     s_leds_wr_en   <= s_dbus_wr_en(0);
Stefan Schuermans implemented LCD peripheral

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

386)                     s_lcd_wr_data <= s_dbus_wr_data;
387)                     s_lcd_wr_en   <= s_dbus_wr_en;
Stefan Schuermans implemented switches

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

398)                     s_eth_wr_data <= s_dbus_wr_data;
399)                     s_eth_wr_en   <= s_dbus_wr_en;
Stefan Schuermans added cycle counter peripheral

Stefan Schuermans authored 12 years ago

400)                 WHEN X"10" =>
401)                     s_cyc_cnt_wr_data <= s_dbus_wr_data;
402)                     s_cyc_cnt_wr_en   <= v_wr_en_word;
403)                 WHEN OTHERS => NULL;
404)             END CASE;
Stefan Schuermans added "LEDs" I/O peripheral...

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

407) 
Stefan Schuermans implemented loading of data...

Stefan Schuermans authored 12 years ago

408)     data_0: e_ram_0
409)         GENERIC MAP (
Stefan Schuermans increased code and data add...

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

411)         )
412)         PORT MAP (
413)             clk       => clk,
Stefan Schuermans increased code and data add...

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

415)             o_rd_data => s_data_rd_data(7 DOWNTO 0),
416)             i_wr_data => s_data_wr_data(7 DOWNTO 0),
417)             i_wr_en   => s_data_wr_en(0)
418)         );
419) 
420)     data_1: e_ram_1
421)         GENERIC MAP (
Stefan Schuermans increased code and data add...

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

423)         )
424)         PORT MAP (
425)             clk       => clk,
Stefan Schuermans increased code and data add...

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

427)             o_rd_data => s_data_rd_data(15 DOWNTO 8),
428)             i_wr_data => s_data_wr_data(15 DOWNTO 8),
429)             i_wr_en   => s_data_wr_en(1)
430)         );
431) 
432)     data_2: e_ram_2
433)         GENERIC MAP (
Stefan Schuermans increased code and data add...

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

435)         )
436)         PORT MAP (
437)             clk       => clk,
Stefan Schuermans increased code and data add...

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

439)             o_rd_data => s_data_rd_data(23 DOWNTO 16),
440)             i_wr_data => s_data_wr_data(23 DOWNTO 16),
441)             i_wr_en   => s_data_wr_en(2)
442)         );
443) 
444)     data_3: e_ram_3
445)         GENERIC MAP (
Stefan Schuermans increased code and data add...

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

447)         )
448)         PORT MAP (
449)             clk       => clk,
Stefan Schuermans increased code and data add...

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

451)             o_rd_data => s_data_rd_data(31 DOWNTO 24),
452)             i_wr_data => s_data_wr_data(31 DOWNTO 24),
453)             i_wr_en   => s_data_wr_en(3)
454)         );
Stefan Schuermans implented basic system with...

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

456)     leds: e_io_leds
457)         PORT MAP (
458)             rst        => rst,
459)             clk        => clk,
460)             o_rd_data  => s_leds_rd_data,
461)             i_wr_data  => s_leds_wr_data,
462)             i_wr_en    => s_leds_wr_en,
463)             pin_o_leds => pin_o_leds
464)         );
Stefan Schuermans implented basic system with...

Stefan Schuermans authored 12 years ago

465) 
Stefan Schuermans implemented LCD peripheral

Stefan Schuermans authored 12 years ago

466)     lcd: e_io_lcd
467)         PORT MAP (
468)             rst       => rst,
469)             clk       => clk,
470)             o_rd_data => s_lcd_rd_data,
471)             i_wr_data => s_lcd_wr_data,
472)             i_wr_en   => s_lcd_wr_en,
473)             pin_o_lcd => pin_o_lcd
474)         );
475) 
Stefan Schuermans implemented switches

Stefan Schuermans authored 12 years ago

476)     switches: e_io_switches
477)         PORT MAP (
478)             rst            => rst,
479)             clk            => clk,
480)             i_addr         => s_switches_addr(2 DOWNTO 2),
481)             o_rd_data      => s_switches_rd_data,
482)             pin_i_switches => pin_i_switches
483)         );
484) 
Stefan Schuermans implemented TX part of UART...

Stefan Schuermans authored 12 years ago

485)     uart: e_io_uart
486)         PORT MAP (
487)             rst       => rst,
488)             clk       => clk,
489)             i_addr    => s_uart_addr(3 DOWNTO 2),
490)             o_rd_data => s_uart_rd_data,
Stefan Schuermans add read_enable signal to d...

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

495)             pin_o_tx  => pin_o_uart_tx
496)         );
497) 
Stefan Schuermans begin of ethernet RX implem...

Stefan Schuermans authored 12 years ago

498)     eth: e_io_eth
499)         PORT MAP (
500)             rst          => rst,
501)             clk          => clk,
Stefan Schuermans implemented ethernet TX fra...

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

507)             o_bm_req     => s_ethbm_req,
508)             i_bm_grant   => s_ethbm_grant,
509)             o_bm_addr    => s_ethbm_addr,
510)             i_bm_rd_data => s_ethbm_rd_data,
511)             o_bm_rd_en   => s_ethbm_rd_en,
512)             o_bm_wr_data => s_ethbm_wr_data,
513)             o_bm_wr_en   => s_ethbm_wr_en,
Stefan Schuermans begin of ethernet RX implem...

Stefan Schuermans authored 12 years ago

514)             pin_o_nrst   => pin_o_eth_nrst,
515)             pin_i_rx_clk => pin_i_eth_rx_clk,
516)             pin_i_rxd    => pin_i_eth_rxd,
517)             pin_i_rx_dv  => pin_i_eth_rx_dv,
518)             pin_i_crs    => pin_i_eth_crs,
519)             pin_i_col    => pin_i_eth_col,
520)             pin_i_tx_clk => pin_i_eth_tx_clk,
521)             pin_o_txd    => pin_o_eth_txd,
522)             pin_o_tx_en  => pin_o_eth_tx_en
523)         );
524) 
Stefan Schuermans added cycle counter peripheral

Stefan Schuermans authored 12 years ago

525)     cyc_cnt: e_io_cyc_cnt
526)         PORT MAP (
Stefan Schuermans implemented LCD peripheral

Stefan Schuermans authored 12 years ago

527)             rst       => rst,
528)             clk       => clk,
529)             o_rd_data => s_cyc_cnt_rd_data,
530)             i_wr_data => s_cyc_cnt_wr_data,
531)             i_wr_en   => s_cyc_cnt_wr_en
Stefan Schuermans added cycle counter peripheral

Stefan Schuermans authored 12 years ago

532)         );
533)