47f05ce618f31c873c88ab640434eacbf4513740
Stefan Schuermans initial firmware and testbed

Stefan Schuermans authored 12 years ago

1) LIBRARY ieee;
2) USE ieee.std_logic_1164.all;
3) USE ieee.numeric_std.all;
4) USE std.textio.all;
Stefan Schuermans implemented LCD peripheral

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

6) USE work.io_switches_pins.all;
Stefan Schuermans initial firmware and testbed

Stefan Schuermans authored 12 years ago

7) 
8) ENTITY e_testbed IS
9) END ENTITY e_testbed;
10) 
11) ARCHITECTURE a_testbed OF e_testbed IS
12) 
13)     COMPONENT e_system IS
14)         PORT (
Stefan Schuermans begin of ethernet RX implem...

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_i_eth_rx_clk: IN  std_logic;
22)             pin_i_eth_rxd:    IN  std_logic_vector(4 DOWNTO 0);
23)             pin_i_eth_rx_dv:  IN  std_logic;
24)             pin_i_eth_crs:    IN  std_logic;
25)             pin_i_eth_col:    IN  std_logic;
26)             pin_i_eth_tx_clk: IN  std_logic;
27)             pin_o_eth_txd:    OUT std_logic_vector(3 DOWNTO 0);
28)             pin_o_eth_tx_en:  OUT std_logic
Stefan Schuermans initial firmware and testbed

Stefan Schuermans authored 12 years ago

29)         );
30)     END COMPONENT e_system;
31) 
Stefan Schuermans implemented RX part of UART...

Stefan Schuermans authored 12 years ago

32)     SIGNAL s_clk:             std_logic;
33)     SIGNAL pin_leds:          std_logic_vector(7 DOWNTO 0);
34)     SIGNAL pin_lcd:           t_io_lcd_pins;
35)     SIGNAL pin_uart_loopback: std_logic;
Stefan Schuermans begin of ethernet RX implem...

Stefan Schuermans authored 12 years ago

36)     SIGNAL pin_eth_txd:       std_logic_vector(3 DOWNTO 0);
37)     SIGNAL pin_eth_tx_en:     std_logic;
Stefan Schuermans initial firmware and testbed

Stefan Schuermans authored 12 years ago

38) 
39) BEGIN
40) 
41)     system: e_system
42)         PORT MAP (
Stefan Schuermans begin of ethernet RX implem...

Stefan Schuermans authored 12 years ago

43)             clk              => s_clk,
44)             pin_o_leds       => pin_leds,
45)             pin_o_lcd        => pin_lcd,
46)             pin_i_switches   => (sw => (OTHERS => '0'), OTHERS => '0'),
47)             pin_i_uart_rx    => pin_uart_loopback,
48)             pin_o_uart_tx    => pin_uart_loopback,
49)             pin_i_eth_rx_clk => '0',
50)             pin_i_eth_rxd    => "00000",
51)             pin_i_eth_rx_dv  => '0',
52)             pin_i_eth_crs    => '0',
53)             pin_i_eth_col    => '0',
54)             pin_i_eth_tx_clk => '0',
55)             pin_o_eth_txd    => pin_eth_txd,
56)             pin_o_eth_tx_en  => pin_eth_tx_en
Stefan Schuermans initial firmware and testbed

Stefan Schuermans authored 12 years ago

57)         );
58) 
59)     p_rst_clk: PROCESS
60)     BEGIN
Stefan Schuermans begin of ethernet RX implem...

Stefan Schuermans authored 12 years ago

61)         s_clk <= '0';
Stefan Schuermans initial firmware and testbed

Stefan Schuermans authored 12 years ago

62)         WHILE TRUE LOOP
63)             WAIT FOR 10 ns;
64)             s_clk <= '1';
65)             WAIT FOR 10 ns;
66)             s_clk <= '0';
67)         END LOOP;
68)     END PROCESS p_rst_clk;
69) 
70) END ARCHITECTURE a_testbed;