7 use ieee.std_logic_1164.all;
12 PCI_CLOCK :in std_logic;
13 PCI_RSTn :in std_logic;
14 IO_READ :in std_logic;
15 IO_WRITE :in std_logic;
16 CONF_READ :in std_logic;
17 CONF_WRITE :in std_logic;
18 DEVSELn :in std_logic;
20 IO_RD_COM : out std_logic;--> MUX_SEL(0)
21 CF_RD_COM :out std_logic;
22 IO_WR_COM :out std_logic;
23 CF_WR_COM :out std_logic
27 architecture COMM_FSM_DESIGN of COMM_FSM is
30 --**********************************************************
31 --*** COMMAND FSM CODIERUNG ***
32 --**********************************************************
35 -- |--------- IO_RD_COM
36 -- ||-------- CF_RD_COM
37 -- |||------- IO_WR_COM
38 -- ||||------ CF_WR_COM
40 constant ST_IDLE_COMM :std_logic_vector (3 downto 0) := "0000";--
41 constant ST_CONF_WRITE :std_logic_vector (3 downto 0) := "0001";--
42 constant ST_IO_WRITE :std_logic_vector (3 downto 0) := "0010";--
43 constant ST_CONF_READ :std_logic_vector (3 downto 0) := "0100";--
44 constant ST_IO_READ :std_logic_vector (3 downto 0) := "1000";--
46 signal COMM_STATE :std_logic_vector (3 downto 0);
48 --************************************************************
49 --*** FSM SPEICHER-AUTOMAT ***
50 --************************************************************
52 attribute syn_state_machine : boolean;
53 attribute syn_state_machine of COMM_STATE : signal is false;
57 --**********************************************************
59 --**********************************************************
61 process (PCI_CLOCK, PCI_RSTn)
63 if PCI_RSTn = '0' then
66 elsif (PCI_CLOCK'event and PCI_CLOCK = '1') then
69 if IO_READ = '1' then COMM_STATE <= ST_IO_READ;
71 elsif CONF_READ = '1' then
72 COMM_STATE <= ST_CONF_READ;
74 elsif IO_WRITE = '1' then
75 COMM_STATE <= ST_IO_WRITE;
77 elsif CONF_WRITE = '1' then
78 COMM_STATE <= ST_CONF_WRITE;
81 COMM_STATE <= ST_IDLE_COMM;
86 COMM_STATE <= ST_IDLE_COMM;
91 COMM_STATE <= ST_IDLE_COMM;
96 COMM_STATE <= ST_IDLE_COMM;
100 if DEVSELn = '1' then
101 COMM_STATE <= ST_IDLE_COMM;
105 COMM_STATE <= ST_IDLE_COMM;
107 end case; -- COMM_STATE
109 end process; -- PROCESS
111 IO_RD_COM <= COMM_STATE(3);
112 CF_RD_COM <= COMM_STATE(2);
113 IO_WR_COM <= COMM_STATE(1);
114 CF_WR_COM <= COMM_STATE(0);
116 end architecture COMM_FSM_DESIGN;