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

Subversion Repositories gecko3

[/] [gecko3/] [trunk/] [GECKO3COM/] [gecko3com-ip/] [core/] [gpif_com_test.vhd] - Diff between revs 19 and 20

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

Rev 19 Rev 20
Line 77... Line 77...
  -----------------------------------------------------------------------------
  -----------------------------------------------------------------------------
  -- controll bus
  -- controll bus
  -----------------------------------------------------------------------------
  -----------------------------------------------------------------------------
  signal s_EMPTY, s_FULL : std_logic;
  signal s_EMPTY, s_FULL : std_logic;
  signal s_RX_DATA : std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
  signal s_RX_DATA : std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
  signal s_RD_EN, s_WR_EN : std_logic;
  signal s_RD_EN, s_WR_EN, s_EOM : std_logic;
  signal s_TX_DATA : std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
  signal s_TX_DATA : std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
 
 
  signal s_ABORT, s_ABORT_TMP : std_logic;
  signal s_ABORT, s_ABORT_TMP : std_logic;
 
 
  signal s_RX_DATA_TMP : std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
  signal s_RX_DATA_TMP : std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
Line 102... Line 102...
      o_RX       : out   std_logic;
      o_RX       : out   std_logic;
      o_TX       : out   std_logic;
      o_TX       : out   std_logic;
      i_RD_EN    : in    std_logic;
      i_RD_EN    : in    std_logic;
      o_EMPTY    : out   std_logic;
      o_EMPTY    : out   std_logic;
      o_RX_DATA  : out   std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
      o_RX_DATA  : out   std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
 
      i_EOM      : in    std_logic;
      i_WR_EN    : in    std_logic;
      i_WR_EN    : in    std_logic;
      o_FULL     : out   std_logic;
      o_FULL     : out   std_logic;
      i_TX_DATA  : in    std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
      i_TX_DATA  : in    std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
      i_IFCLK    : in    std_logic;
      i_IFCLK    : in    std_logic;
      i_WRU      : in    std_logic;
      i_WRU      : in    std_logic;
Line 131... Line 132...
      o_RX       => o_LEDrx,
      o_RX       => o_LEDrx,
      o_TX       => o_LEDtx,
      o_TX       => o_LEDtx,
      i_RD_EN    => s_RD_EN,
      i_RD_EN    => s_RD_EN,
      o_EMPTY    => s_EMPTY,
      o_EMPTY    => s_EMPTY,
      o_RX_DATA  => s_RX_DATA,
      o_RX_DATA  => s_RX_DATA,
 
      i_EOM      => s_EOM,
      i_WR_EN    => s_WR_EN,
      i_WR_EN    => s_WR_EN,
      o_FULL     => s_FULL,
      o_FULL     => s_FULL,
      i_TX_DATA  => s_TX_DATA,
      i_TX_DATA  => s_TX_DATA,
      --i_IFCLK    => i_SYSCLK,
      --i_IFCLK    => i_SYSCLK,
      i_IFCLK    => i_IFCLK,
      i_IFCLK    => i_IFCLK,
Line 164... Line 166...
  begin
  begin
    if i_nReset = '0' then
    if i_nReset = '0' then
      v_rx_throtle_count := (others => '0');
      v_rx_throtle_count := (others => '0');
      s_RD_EN <= '0';
      s_RD_EN <= '0';
    elsif i_SYSCLK = '1' and i_SYSCLK'event then
    elsif i_SYSCLK = '1' and i_SYSCLK'event then
      if v_rx_throtle_count >= 2 then
      if v_rx_throtle_count >= 10 then
        s_RD_EN <= '1';
        s_RD_EN <= '1';
        v_rx_throtle_count := (others => '0');
        v_rx_throtle_count := (others => '0');
      else
      else
        v_rx_throtle_count := v_rx_throtle_count + 1;
        v_rx_throtle_count := v_rx_throtle_count + 1;
        s_RD_EN <= '0';
        s_RD_EN <= '0';
Line 218... Line 220...
  -- outputs: s_RX_DATA_TMP
  -- outputs: s_RX_DATA_TMP
  rom_adress_counter: process (i_SYSCLK, i_nReset)
  rom_adress_counter: process (i_SYSCLK, i_nReset)
  begin
  begin
    if i_nReset = '0' then
    if i_nReset = '0' then
      s_rom_adress <= (others => '0');
      s_rom_adress <= (others => '0');
      --s_WR_EN <= '1';
 
      s_WR_EN <= '0';
      s_WR_EN <= '0';
 
      --s_WR_EN <= '0';
    elsif i_SYSCLK = '1' and i_SYSCLK'event then
    elsif i_SYSCLK = '1' and i_SYSCLK'event then
      if s_rom_adress = 24 then
      if s_rom_adress >= 24 then
        s_rom_adress <= s_rom_adress;
        s_rom_adress <= s_rom_adress;
        s_WR_EN <= '0';
        s_WR_EN <= '0';
 
        s_EOM <= '1';
      else
      else
 
        if s_FULL ='0' then
        s_rom_adress <= s_rom_adress + 1;
        s_rom_adress <= s_rom_adress + 1;
        --s_WR_EN <= '1';
          s_WR_EN <= '1';
        s_WR_EN <= '0';
        end if;
 
        s_EOM <= '0';
      end if;
      end if;
    end if;
    end if;
  end process rom_adress_counter;
  end process rom_adress_counter;
 
 
end behaviour;
end behaviour;

powered by: WebSVN 2.1.0

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