OpenCores
URL https://opencores.org/ocsvn/gecko3/gecko3/trunk

Subversion Repositories gecko3

[/] [gecko3/] [trunk/] [GECKO3COM/] [gecko3com-ip/] [core/] [gpif_com_fsm.vhd] - Diff between revs 21 and 27

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 21 Rev 27
Line 92... Line 92...
 
 
  type t_fsmState is (rst, idle,        -- controll states
  type t_fsmState is (rst, idle,        -- controll states
                      inRQ, inACK, inWait, inTrans, inThrot,
                      inRQ, inACK, inWait, inTrans, inThrot,
                      inThrotBreak,inThrotBreak2, inThrotEnd,
                      inThrotBreak,inThrotBreak2, inThrotEnd,
                      endInTrans,  -- in com states
                      endInTrans,  -- in com states
                      outRQ, outTrans, outACK, outUSBwait, outFIFOwait,
                      outRQ, outRQdelay, outTrans, outACK, outUSBwait,
                      endOutTrans);  -- out com states
                      outFIFOwait, endOutTrans);  -- out com states
 
 
 
 
 
 
  signal pr_state, nx_state : t_fsmState;
  signal pr_state, nx_state : t_fsmState;
  -- XST specific synthesize attributes
  -- XST specific synthesize attributes
  attribute safe_recovery_state of pr_state : signal is "idle";
  attribute safe_recovery_state of pr_state : signal is "idle";
  attribute safe_implementation of pr_state : signal is "yes";
  attribute safe_implementation of pr_state : signal is "yes";
 
 
 
 
 
 
 
 
  -- interconection signals
  -- interconection signals
  signal s_FIFOrst, s_RDYX, s_WRX, s_ABORT : std_logic;
  signal s_FIFOrst, s_RDYX, s_WRX, s_ABORT : std_logic;
 
 
  -- USB to Xilinx (U2X)
  -- USB to Xilinx (U2X)
  signal s_U2X_WR_EN : std_logic;
  signal s_U2X_WR_EN : std_logic;
Line 359... Line 357...
        if i_WRU = '1' and i_RDYU = '1' then
        if i_WRU = '1' and i_RDYU = '1' then
          nx_state <= rst;
          nx_state <= rst;
        elsif i_WRU = '1' and i_RDYU = '0' then
        elsif i_WRU = '1' and i_RDYU = '0' then
          nx_state <= inRQ;
          nx_state <= inRQ;
        else
        else
 
          nx_state <= outRQdelay;
 
        end if;
 
 
 
      when outRQdelay =>
 
        -- output signal values:
 
        s_WRX       <= '1';
 
        s_RDYX      <= '0';
 
        s_X2U_RD_EN <= '0';
 
 
 
        -- state decisions
 
        if i_WRU = '1' and i_RDYU = '1' then
 
          nx_state <= rst;
 
        elsif i_WRU = '1' and i_RDYU = '0' then
 
          nx_state <= inRQ;
 
        else
          nx_state <= outACK;
          nx_state <= outACK;
        end if;
        end if;
 
 
     when outACK =>
     when outACK =>
        state_number := x"C";
        state_number := x"C";
Line 413... Line 426...
        s_bus_trans_dir <= writeToGPIF;
        s_bus_trans_dir <= writeToGPIF;
 
 
        -- state decisions
        -- state decisions
        if i_WRU = '1' and i_RDYU = '1' then
        if i_WRU = '1' and i_RDYU = '1' then
          nx_state <= rst;
          nx_state <= rst;
 
        elsif i_X2U_EMPTY = '1' and i_EOM = '1' then
 
          nx_state <= endOutTrans;
        elsif i_WRU = '0' and i_RDYU = '1' then
        elsif i_WRU = '0' and i_RDYU = '1' then
          nx_state <= outTrans;
          nx_state <= outTrans;
        else
        else
          nx_state <= outUSBwait;
          nx_state <= outUSBwait;
        end if;
        end if;
Line 433... Line 448...
        -- state decisions
        -- state decisions
        if i_WRU = '1' and i_RDYU = '1' then
        if i_WRU = '1' and i_RDYU = '1' then
          nx_state <= rst;
          nx_state <= rst;
        elsif i_X2U_EMPTY = '1' and i_EOM = '1' then
        elsif i_X2U_EMPTY = '1' and i_EOM = '1' then
          nx_state <= endOutTrans;
          nx_state <= endOutTrans;
        elsif i_X2U_EMPTY = '0' and i_EOM = '0' then
        elsif i_X2U_EMPTY = '0' then
          nx_state <= outTrans;
          nx_state <= outTrans;
        else
        else
          nx_state <= outFIFOwait;
          nx_state <= outFIFOwait;
        end if;
        end if;
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.