4 -- File: CONNECTING_FSM.VHD
7 use ieee.std_logic_1164.all ;
9 entity CONNECTING_FSM is
12 PCI_CLOCK :in std_logic;
14 PSC_ENABLE :in std_logic;
15 SYNC_S_FIFO_EFn :in std_logic;
16 SPC_ENABLE :in std_logic;
17 SYNC_R_FIFO_FFn :in std_logic;
18 S_FIFO_Q_OUT :in std_logic_vector(7 downto 0);
19 S_FIFO_READn :out std_logic;
20 R_FIFO_WRITEn :out std_logic;
21 R_FIFO_D_IN :out std_logic_vector(7 downto 0)
23 end entity CONNECTING_FSM;
25 architecture CONNECTING_FSM_DESIGN of CONNECTING_FSM is
27 signal REG :std_logic_vector(7 downto 0);
28 signal HELP_0,HELP_1 :std_logic;
29 signal SIG_LOAD :std_logic;
32 --**********************************************************
33 --*** CONNECTING FSM CODIERUNG ***
34 --**********************************************************
43 constant S0 :std_logic_vector(4 downto 0) := "00011";--
44 constant S1 :std_logic_vector(4 downto 0) := "01010";--READ
45 constant S2 :std_logic_vector(4 downto 0) := "10010";--READ
46 constant S3 :std_logic_vector(4 downto 0) := "11110";--READ,LOAD
47 constant S4 :std_logic_vector(4 downto 0) := "11011";--
48 constant S5 :std_logic_vector(4 downto 0) := "01001";--WRITE
49 constant S6 :std_logic_vector(4 downto 0) := "10001";--WRITE
50 constant S7 :std_logic_vector(4 downto 0) := "11001";--WRITE
52 signal STATES :std_logic_vector(4 downto 0);
54 --************************************************************
55 --*** FSM SPEICHER-AUTOMAT ***
56 --************************************************************
58 attribute syn_state_machine : boolean;
59 attribute syn_state_machine of STATES : signal is false;
61 --************************************************************
62 --*** REGISTER BESCHREIBUNG ***
63 --************************************************************
69 if (PCI_CLOCK'event and PCI_CLOCK = '1') then
70 if SIG_LOAD = '1' then REG <= S_FIFO_Q_OUT;
71 elsif SIG_LOAD = '0' then REG <= REG;
76 --************************************************************
77 --*** FSM BESCHREIBUNG ***
78 --************************************************************
82 if (PCI_CLOCK'event and PCI_CLOCK = '1') then
84 if RESET = '1' then STATES <= S0;
90 if PSC_ENABLE = '1' and
92 SYNC_S_FIFO_EFn = '1' then
99 when S1 => STATES <= S2;
100 when S2 => STATES <= S3;
101 when S3 => STATES <= S4;
104 if SYNC_R_FIFO_FFn = '1' then
111 when S5 => STATES <= S6;
112 when S6 => STATES <= S7;
113 when S7 => STATES <= S0;
122 end process; -- PROCESS
124 --************************************************************
125 --*** ZUWEISUNG signal/out <= STATES ***
126 --************************************************************
130 SIG_LOAD <= STATES(2);
131 R_FIFO_WRITEn <= STATES(1);
132 S_FIFO_READn <= STATES(0);
136 end architecture CONNECTING_FSM_DESIGN;