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

Subversion Repositories gecko3

[/] [gecko3/] [trunk/] [GECKO3COM/] [gecko3com-ip/] [core/] [gpif_com.vhd] - Diff between revs 29 and 30

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

Rev 29 Rev 30
Line 102... Line 102...
    s_X2U_AM_FULL,
    s_X2U_AM_FULL,
    s_X2U_EMPTY,
    s_X2U_EMPTY,
    s_X2U_AM_EMPTY  : std_logic;
    s_X2U_AM_EMPTY  : std_logic;
  signal s_X2U_DATA : std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
  signal s_X2U_DATA : std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
 
 
 
  signal s_dbus_out_mux_sel : std_logic;
 
 
  -----------------------------------------------------------------------------
  -----------------------------------------------------------------------------
  -- data bus
  -- data bus
  -----------------------------------------------------------------------------
  -----------------------------------------------------------------------------
 
 
  -- data signals
  -- data signals
  signal s_dbus_trans_dir : std_logic;
  signal s_dbus_trans_dir : std_logic;
  signal s_dbus_in        : std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
  signal s_dbus_in        : std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
  signal s_dbus_out       : std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
  signal s_dbus_out       : std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
  signal s_dbus_out_fifo  : std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
 
 
  signal s_fifo_out       : std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
 
  signal s_fifo_old       : std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
 
 
  -----------------------------------------------------------------------------
  -----------------------------------------------------------------------------
  -- COMPONENTS
  -- COMPONENTS
  -----------------------------------------------------------------------------
  -----------------------------------------------------------------------------
 
 
Line 126... Line 130...
      i_WRU            : in  std_logic;
      i_WRU            : in  std_logic;
      i_RDYU           : in  std_logic;
      i_RDYU           : in  std_logic;
      i_EOM            : in  std_logic;
      i_EOM            : in  std_logic;
      i_U2X_FULL       : in  std_logic;
      i_U2X_FULL       : in  std_logic;
      i_U2X_AM_FULL    : in  std_logic;
      i_U2X_AM_FULL    : in  std_logic;
      i_X2U_FULL_IFCLK : in  std_logic;
 
      i_X2U_AM_EMPTY   : in  std_logic;
      i_X2U_AM_EMPTY   : in  std_logic;
      i_X2U_EMPTY      : in  std_logic;
      i_X2U_EMPTY      : in  std_logic;
 
      o_dbus_out_mux_sel : out std_logic;
      o_bus_trans_dir  : out std_logic;
      o_bus_trans_dir  : out std_logic;
      o_U2X_WR_EN      : out std_logic;
      o_U2X_WR_EN      : out std_logic;
      o_X2U_RD_EN      : out std_logic;
      o_X2U_RD_EN      : out std_logic;
      o_FIFOrst        : out std_logic;
      o_FIFOrst        : out std_logic;
      o_WRX            : out std_logic;
      o_WRX            : out std_logic;
Line 189... Line 193...
      i_rst          => s_FIFOrst,
      i_rst          => s_FIFOrst,
      i_wr_clk       => i_SYSCLK,
      i_wr_clk       => i_SYSCLK,
      i_wr_en        => s_X2U_WR_EN,
      i_wr_en        => s_X2U_WR_EN,
      o_almost_empty => s_X2U_AM_EMPTY,
      o_almost_empty => s_X2U_AM_EMPTY,
      o_almost_full  => s_X2U_AM_FULL,
      o_almost_full  => s_X2U_AM_FULL,
      o_dout         => s_dbus_out_fifo,
      o_dout         => s_fifo_out,
      o_empty        => s_X2U_EMPTY,
      o_empty        => s_X2U_EMPTY,
      o_full         => s_X2U_FULL
      o_full         => s_X2U_FULL
      );
      );
 
 
 
 
Line 205... Line 209...
      i_RDYU           => i_RDYU,
      i_RDYU           => i_RDYU,
      --i_EOM            => s_EOM,
      --i_EOM            => s_EOM,
      i_EOM            => s_EOM_FF,
      i_EOM            => s_EOM_FF,
      i_U2X_FULL       => s_U2X_FULL,
      i_U2X_FULL       => s_U2X_FULL,
      i_U2X_AM_FULL    => s_U2X_AM_FULL,
      i_U2X_AM_FULL    => s_U2X_AM_FULL,
      i_X2U_FULL_IFCLK => s_X2U_FULL_IFCLK,
 
      i_X2U_AM_EMPTY   => s_X2U_AM_EMPTY,
      i_X2U_AM_EMPTY   => s_X2U_AM_EMPTY,
      i_X2U_EMPTY      => s_X2U_EMPTY,
      i_X2U_EMPTY      => s_X2U_EMPTY,
      o_U2X_WR_EN      => s_U2X_WR_EN,
      o_U2X_WR_EN      => s_U2X_WR_EN,
      o_X2U_RD_EN      => s_X2U_RD_EN,
      o_X2U_RD_EN      => s_X2U_RD_EN,
 
      o_dbus_out_mux_sel => s_dbus_out_mux_sel,
      o_FIFOrst        => s_FIFOrst,
      o_FIFOrst        => s_FIFOrst,
      o_bus_trans_dir  => s_dbus_trans_dir,
      o_bus_trans_dir  => s_dbus_trans_dir,
      o_WRX            => s_WRX,
      o_WRX            => s_WRX,
      o_RDYX           => s_RDYX,
      o_RDYX           => s_RDYX,
      o_ABORT          => s_ABORT_FSM,
      o_ABORT          => s_ABORT_FSM,
Line 256... Line 260...
 
 
  -- Double buffer the s_EOM and s_X2U_FULL_IFCLK signal to avoid metastability
  -- Double buffer the s_EOM and s_X2U_FULL_IFCLK signal to avoid metastability
  double_buf_ifclk : process (i_IFCLK, i_nReset)
  double_buf_ifclk : process (i_IFCLK, i_nReset)
  begin
  begin
    if i_nReset = '0' then
    if i_nReset = '0' then
      s_X2U_FULL_TMP <= '0';
      s_EOM <= '0';
      s_X2U_FULL_IFCLK <= '0';
 
    elsif rising_edge(i_IFCLK) then
    elsif rising_edge(i_IFCLK) then
      s_EOM     <= s_EOM_TMP;
      s_EOM     <= s_EOM_TMP;
      s_EOM_TMP <= i_EOM;
      s_EOM_TMP <= i_EOM;
      s_X2U_FULL_IFCLK <= s_X2U_FULL_TMP;
 
      s_X2U_FULL_TMP <= s_X2U_FULL;
 
    end if;
    end if;
  end process double_buf_ifclk;
  end process double_buf_ifclk;
 
 
  --purpose: EOM bit flip-flop
  --purpose: EOM bit flip-flop
  --type   : sequential
  --type   : sequential
Line 309... Line 310...
  begin
  begin
    if rising_edge(i_IFCLK) then
    if rising_edge(i_IFCLK) then
      s_dbus_in <= b_gpif_bus;
      s_dbus_in <= b_gpif_bus;
 
 
      if s_X2U_RD_EN = '1' then
      if s_X2U_RD_EN = '1' then
        s_dbus_out <= s_dbus_out_fifo;
        s_fifo_old <= s_fifo_out;
      end if;
      end if;
    end if;
    end if;
  end process buf_input;
  end process buf_input;
 
 
 
  -- purpose: multiplexer to select two older copies of fifo data
 
  -- type   : combinational
 
  -- inputs : s_dbus_out_mux_sel, s_fifo_old, s_fifo_out
 
  -- outputs: s_dbus_out
 
  dbus_out_mux: process (s_dbus_out_mux_sel, s_fifo_old, s_fifo_out)
 
  begin  -- process dbus_out_mux
 
    case s_dbus_out_mux_sel is
 
      when '0' => s_dbus_out <= s_fifo_out;
 
      when '1' => s_dbus_out <= s_fifo_old;
 
      when others => s_dbus_out <= s_fifo_out;
 
    end case;
 
  end process dbus_out_mux;
 
 
end structure;
end structure;
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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