---**********************************************************
---*** COMMAND FSM ***
---**********************************************************
-
- process (PCI_CLOCK, PCI_RSTn)
- begin
- if PCI_RSTn = '0' then COMM_STATE <= "0000";
-
- elsif (PCI_CLOCK'event and PCI_CLOCK = '1') then
-
- case COMM_STATE is
-
- when ST_IDLE_COMM =>
- if IO_READ = '1' then COMM_STATE <= ST_IO_READ;
-
- elsif CONF_READ = '1' then COMM_STATE <= ST_CONF_READ;
-
- elsif IO_WRITE = '1' then COMM_STATE <= ST_IO_WRITE;
-
- elsif CONF_WRITE = '1' then COMM_STATE <= ST_CONF_WRITE;
-
- else COMM_STATE <= ST_IDLE_COMM;
- end if;
-
- when ST_IO_READ => if DEVSELn = '1' then COMM_STATE <= ST_IDLE_COMM; end if;
- when ST_CONF_READ => if DEVSELn = '1' then COMM_STATE <= ST_IDLE_COMM; end if;
- when ST_IO_WRITE => if DEVSELn = '1' then COMM_STATE <= ST_IDLE_COMM; end if;
- when ST_CONF_WRITE => if DEVSELn = '1' then COMM_STATE <= ST_IDLE_COMM; end if;
-
- when others => COMM_STATE <= ST_IDLE_COMM;
-
- end case; -- COMM_STATE
- end if; -- CLOCK
- end process; -- PROCESS
-
- IO_RD_COM <= COMM_STATE(3);
- CF_RD_COM <= COMM_STATE(2);
- IO_WR_COM <= COMM_STATE(1);
- CF_WR_COM <= COMM_STATE(0);
-
-end architecture COMM_FSM_DESIGN ;
+ --**********************************************************
+ --*** COMMAND FSM ***
+ --**********************************************************
+
+ process (PCI_CLOCK, PCI_RSTn)
+ begin
+ if PCI_RSTn = '0' then
+ COMM_STATE <= "0000";
+
+ elsif (PCI_CLOCK'event and PCI_CLOCK = '1') then
+ case COMM_STATE is
+ when ST_IDLE_COMM =>
+ if IO_READ = '1' then COMM_STATE <= ST_IO_READ;
+
+ elsif CONF_READ = '1' then
+ COMM_STATE <= ST_CONF_READ;
+
+ elsif IO_WRITE = '1' then
+ COMM_STATE <= ST_IO_WRITE;
+
+ elsif CONF_WRITE = '1' then
+ COMM_STATE <= ST_CONF_WRITE;
+
+ else
+ COMM_STATE <= ST_IDLE_COMM;
+ end if;
+
+ when ST_IO_READ =>
+ if DEVSELn = '1' then
+ COMM_STATE <= ST_IDLE_COMM;
+ end if;
+
+ when ST_CONF_READ =>
+ if DEVSELn = '1' then
+ COMM_STATE <= ST_IDLE_COMM;
+ end if;
+
+ when ST_IO_WRITE =>
+ if DEVSELn = '1' then
+ COMM_STATE <= ST_IDLE_COMM;
+ end if;
+
+ when ST_CONF_WRITE =>
+ if DEVSELn = '1' then
+ COMM_STATE <= ST_IDLE_COMM;
+ end if;
+
+ when others =>
+ COMM_STATE <= ST_IDLE_COMM;
+
+ end case; -- COMM_STATE
+ end if; -- CLOCK
+end process; -- PROCESS
+
+ IO_RD_COM <= COMM_STATE(3);
+ CF_RD_COM <= COMM_STATE(2);
+ IO_WR_COM <= COMM_STATE(1);
+ CF_WR_COM <= COMM_STATE(0);
+
+end architecture COMM_FSM_DESIGN;