source: firmware/FTM/ethernet/eth_config_modul_beha.vhd@ 12058

Last change on this file since 12058 was 10227, checked in by weitzel, 14 years ago
first version of FTM firmware including ethernet and FTU interface; still some debugging needed
File size: 2.0 KB
Line 
1--
2-- VHDL Architecture FACT_FTM_lib.eth_config_modul.beha
3--
4-- Created:
5-- by - kai.UNKNOWN (E5PCXX)
6-- at - 14:52:32 15.02.2011
7--
8-- using Mentor Graphics HDL Designer(TM) 2009.1 (Build 12)
9--
10LIBRARY ieee;
11USE ieee.std_logic_1164.all;
12USE ieee.std_logic_arith.all;
13USE IEEE.STD_LOGIC_UNSIGNED.all;
14-- LIBRARY FACT_FTM_lib;
15-- USE FACT_FTM_lib.ftm_array_types.all;
16-- USE FACT_FTM_lib.ftm_constants.all;
17library ftm_definitions;
18USE ftm_definitions.ftm_array_types.all;
19USE ftm_definitions.ftm_constants.all;
20
21ENTITY eth_config_modul IS
22 PORT(
23 clk : IN std_logic;
24 config_start_eth : IN std_logic;
25 config_started_eth : OUT std_logic := '0';
26 config_ready_eth : OUT std_logic := '0';
27
28 config_start_cc : OUT std_logic := '0';
29 config_started_cc : IN std_logic;
30 config_ready_cc : IN std_logic
31 );
32END ENTITY eth_config_modul;
33
34--
35ARCHITECTURE beha OF eth_config_modul IS
36
37 type state_config_proc_type is (CP_IDLE, CP_CONFIG_START, CP_CONFIG_01, CP_CONFIG_END);
38 signal state_config_proc : state_config_proc_type := CP_IDLE;
39
40BEGIN
41
42 config_proc : process (clk)
43 begin
44 if rising_edge (clk) then
45 case state_config_proc is
46
47 when CP_IDLE =>
48 if (config_start_eth = '1') then
49 config_ready_eth <= '0';
50 config_started_eth <= '1';
51 state_config_proc <= CP_CONFIG_START;
52 end if;
53
54 when CP_CONFIG_START =>
55 config_start_cc <= '1';
56 if (config_started_cc = '1') then
57 config_start_cc <= '0';
58 state_config_proc <= CP_CONFIG_01;
59 end if;
60
61 when CP_CONFIG_01 =>
62 if (config_ready_cc = '1') then
63 state_config_proc <= CP_CONFIG_END;
64 end if;
65
66 when CP_CONFIG_END =>
67 config_started_eth <= '0';
68 config_ready_eth <= '1';
69 state_config_proc <= CP_IDLE;
70
71
72 end case;
73 end if;
74 end process config_proc;
75
76END ARCHITECTURE beha;
77
Note: See TracBrowser for help on using the repository browser.