implemented ethernet TX int...
Stefan Schuermans authored 12 years ago
|
1) LIBRARY IEEE;
2) USE IEEE.STD_LOGIC_1164.ALL;
3) USE IEEE.NUMERIC_STD.ALL;
4)
5) ENTITY e_io_eth_txif IS
6) PORT (
7) rst: IN std_logic;
8) clk: IN std_logic;
9) i_data: IN std_logic_vector(7 DOWNTO 0);
10) i_data_en: IN std_logic;
11) o_data_ack: OUT std_logic;
12) pin_i_tx_clk: IN std_logic;
13) pin_o_txd: OUT std_logic_vector(3 DOWNTO 0);
14) pin_o_tx_en: OUT std_logic
15) );
16) END ENTITY e_io_eth_txif;
17)
18) ARCHITECTURE a_io_eth_txif OF e_io_eth_txif IS
19)
20) TYPE t_out_state IS (out_idle, out_data_l, out_data_h);
21)
22) TYPE t_in_state IS (in_idle, in_wait);
23)
24) SIGNAL r_out_state: t_out_state := out_idle;
25) SIGNAL r_out_data: std_logic_vector(7 DOWNTO 0) := X"00";
26)
27) SIGNAL r_if_tx_clk_trigger: std_logic := '0';
28) SIGNAL r_if_tx_clk_detect: std_logic := '0';
29)
30) SIGNAL r_if_clk_data: std_logic_vector(7 DOWNTO 0) := X"00";
31) SIGNAL r_if_clk_trigger: std_logic := '0';
32) SIGNAL r_if_clk_detect: std_logic := '0';
33)
34) SIGNAL r_in_state: t_in_state := in_idle;
35)
36) BEGIN
37)
38) p_out: PROCESS(rst, pin_i_tx_clk)
39) BEGIN
40) IF rst = '1' THEN
41) pin_o_txd <= X"0";
42) pin_o_tx_en <= '0';
|