| 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 | --
|
|---|
| 10 | LIBRARY ieee;
|
|---|
| 11 | USE ieee.std_logic_1164.all;
|
|---|
| 12 | USE ieee.std_logic_arith.all;
|
|---|
| 13 | USE 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;
|
|---|
| 17 | library ftm_definitions;
|
|---|
| 18 | USE ftm_definitions.ftm_array_types.all;
|
|---|
| 19 | USE ftm_definitions.ftm_constants.all;
|
|---|
| 20 |
|
|---|
| 21 | ENTITY 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 | );
|
|---|
| 32 | END ENTITY eth_config_modul;
|
|---|
| 33 |
|
|---|
| 34 | --
|
|---|
| 35 | ARCHITECTURE 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 |
|
|---|
| 40 | BEGIN
|
|---|
| 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 |
|
|---|
| 76 | END ARCHITECTURE beha;
|
|---|
| 77 |
|
|---|