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

Subversion Repositories rio

[/] [rio/] [trunk/] [rtl/] [vhdl/] [RioPacketBuffer.vhd] - Diff between revs 7 and 20

Show entire file | Details | Blame | View Log

Rev 7 Rev 20
Line 53... Line 53...
use work.rio_common.all;
use work.rio_common.all;
 
 
 
 
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-- Entity for RioPacketBuffer.
-- Entity for RioPacketBuffer.
 
--
 
-- Generic variables
 
-- -----------------
 
-- SIZE_ADDRESS_WIDTH - The number of frames in powers of two.
 
-- CONTENT_ADDRESS_WIDTH - The total number of entries in the memory that can
 
-- be used to store packet data.
 
-- CONTENT_WIDTH - The width of the data to store as packet content in the memory.
 
-- MAX_PACKET_SIZE - The number of entries that must be available for a new
 
-- complete full sized packet to be received. This option is present to ensure
 
-- that it is always possible to move a packet to the storage without being
 
-- surprised that the storage is suddenly empty.
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
entity RioPacketBuffer is
entity RioPacketBuffer is
  generic(
  generic(
    SIZE_ADDRESS_WIDTH : natural := 6;
    SIZE_ADDRESS_WIDTH : natural := 6;
    CONTENT_ADDRESS_WIDTH : natural := 8);
    CONTENT_ADDRESS_WIDTH : natural := 8;
 
    CONTENT_WIDTH : natural := 32;
 
    MAX_PACKET_SIZE : natural := 69);
  port(
  port(
    clk : in std_logic;
    clk : in std_logic;
    areset_n : in std_logic;
    areset_n : in std_logic;
 
 
    inboundWriteFrameFull_o : out std_logic;
    inboundWriteFrameFull_o : out std_logic;
    inboundWriteFrame_i : in std_logic;
    inboundWriteFrame_i : in std_logic;
    inboundWriteFrameAbort_i : in std_logic;
    inboundWriteFrameAbort_i : in std_logic;
    inboundWriteContent_i : in std_logic;
    inboundWriteContent_i : in std_logic;
    inboundWriteContentData_i : in std_logic_vector(31 downto 0);
    inboundWriteContentData_i : in std_logic_vector(CONTENT_WIDTH-1 downto 0);
    inboundReadFrameEmpty_o : out std_logic;
    inboundReadFrameEmpty_o : out std_logic;
    inboundReadFrame_i : in std_logic;
    inboundReadFrame_i : in std_logic;
    inboundReadFrameRestart_i : in std_logic;
    inboundReadFrameRestart_i : in std_logic;
    inboundReadFrameAborted_o : out std_logic;
    inboundReadFrameAborted_o : out std_logic;
 
    inboundReadFrameSize_o : out std_logic_vector(CONTENT_ADDRESS_WIDTH-1 downto 0);
    inboundReadContentEmpty_o : out std_logic;
    inboundReadContentEmpty_o : out std_logic;
    inboundReadContent_i : in std_logic;
    inboundReadContent_i : in std_logic;
    inboundReadContentEnd_o : out std_logic;
    inboundReadContentEnd_o : out std_logic;
    inboundReadContentData_o : out std_logic_vector(31 downto 0);
    inboundReadContentData_o : out std_logic_vector(CONTENT_WIDTH-1 downto 0);
 
 
    outboundWriteFrameFull_o : out std_logic;
    outboundWriteFrameFull_o : out std_logic;
    outboundWriteFrame_i : in std_logic;
    outboundWriteFrame_i : in std_logic;
    outboundWriteFrameAbort_i : in std_logic;
    outboundWriteFrameAbort_i : in std_logic;
    outboundWriteContent_i : in std_logic;
    outboundWriteContent_i : in std_logic;
    outboundWriteContentData_i : in std_logic_vector(31 downto 0);
    outboundWriteContentData_i : in std_logic_vector(CONTENT_WIDTH-1 downto 0);
    outboundReadFrameEmpty_o : out std_logic;
    outboundReadFrameEmpty_o : out std_logic;
    outboundReadFrame_i : in std_logic;
    outboundReadFrame_i : in std_logic;
    outboundReadFrameRestart_i : in std_logic;
    outboundReadFrameRestart_i : in std_logic;
    outboundReadFrameAborted_o : out std_logic;
    outboundReadFrameAborted_o : out std_logic;
 
    outboundReadFrameSize_o : out std_logic_vector(CONTENT_ADDRESS_WIDTH-1 downto 0);
    outboundReadContentEmpty_o : out std_logic;
    outboundReadContentEmpty_o : out std_logic;
    outboundReadContent_i : in std_logic;
    outboundReadContent_i : in std_logic;
    outboundReadContentEnd_o : out std_logic;
    outboundReadContentEnd_o : out std_logic;
    outboundReadContentData_o : out std_logic_vector(31 downto 0));
    outboundReadContentData_o : out std_logic_vector(CONTENT_WIDTH-1 downto 0));
end entity;
end entity;
 
 
 
 
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-- Architecture for RioPacketBuffer.
-- Architecture for RioPacketBuffer.
Line 100... Line 115...
architecture RioPacketBufferImpl of RioPacketBuffer is
architecture RioPacketBufferImpl of RioPacketBuffer is
 
 
  component PacketBufferContinous is
  component PacketBufferContinous is
    generic(
    generic(
      SIZE_ADDRESS_WIDTH : natural;
      SIZE_ADDRESS_WIDTH : natural;
      CONTENT_ADDRESS_WIDTH : natural);
      CONTENT_ADDRESS_WIDTH : natural;
 
      CONTENT_WIDTH : natural;
 
      MAX_PACKET_SIZE : natural);
    port(
    port(
      clk : in std_logic;
      clk : in std_logic;
      areset_n : in std_logic;
      areset_n : in std_logic;
 
 
      writeFrameFull_o : out std_logic;
      writeFrameFull_o : out std_logic;
      writeFrame_i : in std_logic;
      writeFrame_i : in std_logic;
      writeFrameAbort_i : in std_logic;
      writeFrameAbort_i : in std_logic;
      writeContent_i : in std_logic;
      writeContent_i : in std_logic;
      writeContentData_i : in std_logic_vector(31 downto 0);
      writeContentData_i : in std_logic_vector(CONTENT_WIDTH-1 downto 0);
 
 
      readFrameEmpty_o : out std_logic;
      readFrameEmpty_o : out std_logic;
      readFrame_i : in std_logic;
      readFrame_i : in std_logic;
      readFrameRestart_i : in std_logic;
      readFrameRestart_i : in std_logic;
      readFrameAborted_o : out std_logic;
      readFrameAborted_o : out std_logic;
 
      readFrameSize_o : out std_logic_vector(CONTENT_ADDRESS_WIDTH-1 downto 0);
      readContentEmpty_o : out std_logic;
      readContentEmpty_o : out std_logic;
      readContent_i : in std_logic;
      readContent_i : in std_logic;
      readContentEnd_o : out std_logic;
      readContentEnd_o : out std_logic;
      readContentData_o : out std_logic_vector(31 downto 0));
      readContentData_o : out std_logic_vector(CONTENT_WIDTH-1 downto 0));
  end component;
  end component;
 
 
begin
begin
 
 
  -----------------------------------------------------------------------------
  -----------------------------------------------------------------------------
  -- Outbound frame buffers.
  -- Outbound frame buffers.
  -----------------------------------------------------------------------------
  -----------------------------------------------------------------------------
  OutboundPacketBuffer: PacketBufferContinous
  OutboundPacketBuffer: PacketBufferContinous
    generic map(
    generic map(
      SIZE_ADDRESS_WIDTH=>SIZE_ADDRESS_WIDTH,
      SIZE_ADDRESS_WIDTH=>SIZE_ADDRESS_WIDTH,
      CONTENT_ADDRESS_WIDTH=>CONTENT_ADDRESS_WIDTH)
      CONTENT_ADDRESS_WIDTH=>CONTENT_ADDRESS_WIDTH,
 
      CONTENT_WIDTH=>CONTENT_WIDTH,
 
      MAX_PACKET_SIZE=>MAX_PACKET_SIZE)
    port map(
    port map(
      clk=>clk,
      clk=>clk,
      areset_n=>areset_n,
      areset_n=>areset_n,
      writeFrameFull_o=>outboundWriteFrameFull_o,
      writeFrameFull_o=>outboundWriteFrameFull_o,
      writeFrame_i=>outboundWriteFrame_i, writeFrameAbort_i=>outboundWriteFrameAbort_i,
      writeFrame_i=>outboundWriteFrame_i, writeFrameAbort_i=>outboundWriteFrameAbort_i,
      writeContent_i=>outboundWriteContent_i, writeContentData_i=>outboundWriteContentData_i,
      writeContent_i=>outboundWriteContent_i, writeContentData_i=>outboundWriteContentData_i,
 
 
      readFrameEmpty_o=>outboundReadFrameEmpty_o,
      readFrameEmpty_o=>outboundReadFrameEmpty_o,
      readFrame_i=>outboundReadFrame_i, readFrameRestart_i=>outboundReadFrameRestart_i,
      readFrame_i=>outboundReadFrame_i, readFrameRestart_i=>outboundReadFrameRestart_i,
      readFrameAborted_o=>outboundReadFrameAborted_o,
      readFrameAborted_o=>outboundReadFrameAborted_o,
 
      readFrameSize_o=>outboundReadFrameSize_o,
      readContentEmpty_o=>outboundReadContentEmpty_o,
      readContentEmpty_o=>outboundReadContentEmpty_o,
      readContent_i=>outboundReadContent_i, readContentEnd_o=>outboundReadContentEnd_o,
      readContent_i=>outboundReadContent_i, readContentEnd_o=>outboundReadContentEnd_o,
      readContentData_o=>outboundReadContentData_o);
      readContentData_o=>outboundReadContentData_o);
 
 
  -----------------------------------------------------------------------------
  -----------------------------------------------------------------------------
  -- Inbound frame buffers.
  -- Inbound frame buffers.
  -----------------------------------------------------------------------------
  -----------------------------------------------------------------------------
  InboundPacketBuffer: PacketBufferContinous
  InboundPacketBuffer: PacketBufferContinous
    generic map(
    generic map(
      SIZE_ADDRESS_WIDTH=>SIZE_ADDRESS_WIDTH,
      SIZE_ADDRESS_WIDTH=>SIZE_ADDRESS_WIDTH,
      CONTENT_ADDRESS_WIDTH=>CONTENT_ADDRESS_WIDTH)
      CONTENT_ADDRESS_WIDTH=>CONTENT_ADDRESS_WIDTH,
 
      CONTENT_WIDTH=>CONTENT_WIDTH,
 
      MAX_PACKET_SIZE=>MAX_PACKET_SIZE)
    port map(
    port map(
      clk=>clk,
      clk=>clk,
      areset_n=>areset_n,
      areset_n=>areset_n,
      writeFrameFull_o=>inboundWriteFrameFull_o,
      writeFrameFull_o=>inboundWriteFrameFull_o,
      writeFrame_i=>inboundWriteFrame_i, writeFrameAbort_i=>inboundWriteFrameAbort_i,
      writeFrame_i=>inboundWriteFrame_i, writeFrameAbort_i=>inboundWriteFrameAbort_i,
      writeContent_i=>inboundWriteContent_i, writeContentData_i=>inboundWriteContentData_i,
      writeContent_i=>inboundWriteContent_i, writeContentData_i=>inboundWriteContentData_i,
 
 
      readFrameEmpty_o=>inboundReadFrameEmpty_o,
      readFrameEmpty_o=>inboundReadFrameEmpty_o,
      readFrame_i=>inboundReadFrame_i, readFrameRestart_i=>inboundReadFrameRestart_i,
      readFrame_i=>inboundReadFrame_i, readFrameRestart_i=>inboundReadFrameRestart_i,
      readFrameAborted_o=>inboundReadFrameAborted_o,
      readFrameAborted_o=>inboundReadFrameAborted_o,
 
      readFrameSize_o=>inboundReadFrameSize_o,
      readContentEmpty_o=>inboundReadContentEmpty_o,
      readContentEmpty_o=>inboundReadContentEmpty_o,
      readContent_i=>inboundReadContent_i, readContentEnd_o=>inboundReadContentEnd_o,
      readContent_i=>inboundReadContent_i, readContentEnd_o=>inboundReadContentEnd_o,
      readContentData_o=>inboundReadContentData_o);
      readContentData_o=>inboundReadContentData_o);
 
 
end architecture;
end architecture;
Line 186... Line 210...
-- Entity for RioPacketBufferWindow.
-- Entity for RioPacketBufferWindow.
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
entity RioPacketBufferWindow is
entity RioPacketBufferWindow is
  generic(
  generic(
    SIZE_ADDRESS_WIDTH : natural := 6;
    SIZE_ADDRESS_WIDTH : natural := 6;
    CONTENT_ADDRESS_WIDTH : natural := 8);
    CONTENT_ADDRESS_WIDTH : natural := 8;
 
    CONTENT_WIDTH : natural := 32;
 
    MAX_PACKET_SIZE : natural := 69);
  port(
  port(
    clk : in std_logic;
    clk : in std_logic;
    areset_n : in std_logic;
    areset_n : in std_logic;
 
 
    inboundWriteFrameFull_o : out std_logic;
    inboundWriteFrameFull_o : out std_logic;
    inboundWriteFrame_i : in std_logic;
    inboundWriteFrame_i : in std_logic;
    inboundWriteFrameAbort_i : in std_logic;
    inboundWriteFrameAbort_i : in std_logic;
    inboundWriteContent_i : in std_logic;
    inboundWriteContent_i : in std_logic;
    inboundWriteContentData_i : in std_logic_vector(31 downto 0);
    inboundWriteContentData_i : in std_logic_vector(CONTENT_WIDTH-1 downto 0);
    inboundReadFrameEmpty_o : out std_logic;
    inboundReadFrameEmpty_o : out std_logic;
    inboundReadFrame_i : in std_logic;
    inboundReadFrame_i : in std_logic;
    inboundReadFrameRestart_i : in std_logic;
    inboundReadFrameRestart_i : in std_logic;
    inboundReadFrameAborted_o : out std_logic;
    inboundReadFrameAborted_o : out std_logic;
    inboundReadContentEmpty_o : out std_logic;
    inboundReadContentEmpty_o : out std_logic;
    inboundReadContent_i : in std_logic;
    inboundReadContent_i : in std_logic;
    inboundReadContentEnd_o : out std_logic;
    inboundReadContentEnd_o : out std_logic;
    inboundReadContentData_o : out std_logic_vector(31 downto 0);
    inboundReadContentData_o : out std_logic_vector(CONTENT_WIDTH-1 downto 0);
 
 
    outboundWriteFrameFull_o : out std_logic;
    outboundWriteFrameFull_o : out std_logic;
    outboundWriteFrame_i : in std_logic;
    outboundWriteFrame_i : in std_logic;
    outboundWriteFrameAbort_i : in std_logic;
    outboundWriteFrameAbort_i : in std_logic;
    outboundWriteContent_i : in std_logic;
    outboundWriteContent_i : in std_logic;
    outboundWriteContentData_i : in std_logic_vector(31 downto 0);
    outboundWriteContentData_i : in std_logic_vector(CONTENT_WIDTH-1 downto 0);
    outboundReadFrameEmpty_o : out std_logic;
    outboundReadFrameEmpty_o : out std_logic;
    outboundReadFrame_i : in std_logic;
    outboundReadFrame_i : in std_logic;
    outboundReadFrameRestart_i : in std_logic;
    outboundReadFrameRestart_i : in std_logic;
    outboundReadFrameAborted_o : out std_logic;
    outboundReadFrameAborted_o : out std_logic;
    outboundReadWindowEmpty_o : out std_logic;
    outboundReadWindowEmpty_o : out std_logic;
    outboundReadWindowReset_i : in std_logic;
    outboundReadWindowReset_i : in std_logic;
    outboundReadWindowNext_i : in std_logic;
    outboundReadWindowNext_i : in std_logic;
    outboundReadContentEmpty_o : out std_logic;
    outboundReadContentEmpty_o : out std_logic;
    outboundReadContent_i : in std_logic;
    outboundReadContent_i : in std_logic;
    outboundReadContentEnd_o : out std_logic;
    outboundReadContentEnd_o : out std_logic;
    outboundReadContentData_o : out std_logic_vector(31 downto 0));
    outboundReadContentData_o : out std_logic_vector(CONTENT_WIDTH-1 downto 0));
end entity;
end entity;
 
 
 
 
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-- Architecture for RioPacketBufferWindow.
-- Architecture for RioPacketBufferWindow.
Line 232... Line 258...
architecture RioPacketBufferWindowImpl of RioPacketBufferWindow is
architecture RioPacketBufferWindowImpl of RioPacketBufferWindow is
 
 
  component PacketBufferContinous is
  component PacketBufferContinous is
    generic(
    generic(
      SIZE_ADDRESS_WIDTH : natural;
      SIZE_ADDRESS_WIDTH : natural;
      CONTENT_ADDRESS_WIDTH : natural);
      CONTENT_ADDRESS_WIDTH : natural;
 
      CONTENT_WIDTH : natural;
 
      MAX_PACKET_SIZE : natural);
    port(
    port(
      clk : in std_logic;
      clk : in std_logic;
      areset_n : in std_logic;
      areset_n : in std_logic;
 
 
      writeFrameFull_o : out std_logic;
      writeFrameFull_o : out std_logic;
      writeFrame_i : in std_logic;
      writeFrame_i : in std_logic;
      writeFrameAbort_i : in std_logic;
      writeFrameAbort_i : in std_logic;
      writeContent_i : in std_logic;
      writeContent_i : in std_logic;
      writeContentData_i : in std_logic_vector(31 downto 0);
      writeContentData_i : in std_logic_vector(CONTENT_WIDTH-1 downto 0);
 
 
      readFrameEmpty_o : out std_logic;
      readFrameEmpty_o : out std_logic;
      readFrame_i : in std_logic;
      readFrame_i : in std_logic;
      readFrameRestart_i : in std_logic;
      readFrameRestart_i : in std_logic;
      readFrameAborted_o : out std_logic;
      readFrameAborted_o : out std_logic;
 
      readFrameSize_o : out std_logic_vector(CONTENT_ADDRESS_WIDTH-1 downto 0);
 
 
      readContentEmpty_o : out std_logic;
      readContentEmpty_o : out std_logic;
      readContent_i : in std_logic;
      readContent_i : in std_logic;
      readContentEnd_o : out std_logic;
      readContentEnd_o : out std_logic;
      readContentData_o : out std_logic_vector(31 downto 0));
      readContentData_o : out std_logic_vector(CONTENT_WIDTH-1 downto 0));
  end component;
  end component;
 
 
  component PacketBufferContinousWindow is
  component PacketBufferContinousWindow is
    generic(
    generic(
      SIZE_ADDRESS_WIDTH : natural;
      SIZE_ADDRESS_WIDTH : natural;
      CONTENT_ADDRESS_WIDTH : natural);
      CONTENT_ADDRESS_WIDTH : natural;
 
      CONTENT_WIDTH : natural;
 
      MAX_PACKET_SIZE : natural);
    port(
    port(
      clk : in std_logic;
      clk : in std_logic;
      areset_n : in std_logic;
      areset_n : in std_logic;
 
 
      writeFrameFull_o : out std_logic;
      writeFrameFull_o : out std_logic;
      writeFrame_i : in std_logic;
      writeFrame_i : in std_logic;
      writeFrameAbort_i : in std_logic;
      writeFrameAbort_i : in std_logic;
      writeContent_i : in std_logic;
      writeContent_i : in std_logic;
      writeContentData_i : in std_logic_vector(31 downto 0);
      writeContentData_i : in std_logic_vector(CONTENT_WIDTH-1 downto 0);
 
 
      readFrameEmpty_o : out std_logic;
      readFrameEmpty_o : out std_logic;
      readFrame_i : in std_logic;
      readFrame_i : in std_logic;
      readFrameRestart_i : in std_logic;
      readFrameRestart_i : in std_logic;
      readFrameAborted_o : out std_logic;
      readFrameAborted_o : out std_logic;
Line 280... Line 311...
      readWindowNext_i : in std_logic;
      readWindowNext_i : in std_logic;
 
 
      readContentEmpty_o : out std_logic;
      readContentEmpty_o : out std_logic;
      readContent_i : in std_logic;
      readContent_i : in std_logic;
      readContentEnd_o : out std_logic;
      readContentEnd_o : out std_logic;
      readContentData_o : out std_logic_vector(31 downto 0));
      readContentData_o : out std_logic_vector(CONTENT_WIDTH-1 downto 0));
  end component;
  end component;
 
 
begin
begin
 
 
  -----------------------------------------------------------------------------
  -----------------------------------------------------------------------------
  -- Outbound frame buffers.
  -- Outbound frame buffers.
  -----------------------------------------------------------------------------
  -----------------------------------------------------------------------------
  OutboundPacketBuffer: PacketBufferContinousWindow
  OutboundPacketBuffer: PacketBufferContinousWindow
    generic map(
    generic map(
      SIZE_ADDRESS_WIDTH=>SIZE_ADDRESS_WIDTH,
      SIZE_ADDRESS_WIDTH=>SIZE_ADDRESS_WIDTH,
      CONTENT_ADDRESS_WIDTH=>CONTENT_ADDRESS_WIDTH)
      CONTENT_ADDRESS_WIDTH=>CONTENT_ADDRESS_WIDTH,
 
      CONTENT_WIDTH=>CONTENT_WIDTH,
 
      MAX_PACKET_SIZE=>MAX_PACKET_SIZE)
    port map(
    port map(
      clk=>clk,
      clk=>clk,
      areset_n=>areset_n,
      areset_n=>areset_n,
      writeFrameFull_o=>outboundWriteFrameFull_o,
      writeFrameFull_o=>outboundWriteFrameFull_o,
      writeFrame_i=>outboundWriteFrame_i, writeFrameAbort_i=>outboundWriteFrameAbort_i,
      writeFrame_i=>outboundWriteFrame_i, writeFrameAbort_i=>outboundWriteFrameAbort_i,
Line 315... Line 348...
  -- Inbound frame buffers.
  -- Inbound frame buffers.
  -----------------------------------------------------------------------------
  -----------------------------------------------------------------------------
  InboundPacketBuffer: PacketBufferContinous
  InboundPacketBuffer: PacketBufferContinous
    generic map(
    generic map(
      SIZE_ADDRESS_WIDTH=>SIZE_ADDRESS_WIDTH,
      SIZE_ADDRESS_WIDTH=>SIZE_ADDRESS_WIDTH,
      CONTENT_ADDRESS_WIDTH=>CONTENT_ADDRESS_WIDTH)
      CONTENT_ADDRESS_WIDTH=>CONTENT_ADDRESS_WIDTH,
 
      CONTENT_WIDTH=>CONTENT_WIDTH,
 
      MAX_PACKET_SIZE=>MAX_PACKET_SIZE)
    port map(
    port map(
      clk=>clk,
      clk=>clk,
      areset_n=>areset_n,
      areset_n=>areset_n,
      writeFrameFull_o=>inboundWriteFrameFull_o,
      writeFrameFull_o=>inboundWriteFrameFull_o,
      writeFrame_i=>inboundWriteFrame_i, writeFrameAbort_i=>inboundWriteFrameAbort_i,
      writeFrame_i=>inboundWriteFrame_i, writeFrameAbort_i=>inboundWriteFrameAbort_i,
      writeContent_i=>inboundWriteContent_i, writeContentData_i=>inboundWriteContentData_i,
      writeContent_i=>inboundWriteContent_i, writeContentData_i=>inboundWriteContentData_i,
 
 
      readFrameEmpty_o=>inboundReadFrameEmpty_o,
      readFrameEmpty_o=>inboundReadFrameEmpty_o,
      readFrame_i=>inboundReadFrame_i, readFrameRestart_i=>inboundReadFrameRestart_i,
      readFrame_i=>inboundReadFrame_i, readFrameRestart_i=>inboundReadFrameRestart_i,
      readFrameAborted_o=>inboundReadFrameAborted_o,
      readFrameAborted_o=>inboundReadFrameAborted_o,
 
      readFrameSize_o=>open,
      readContentEmpty_o=>inboundReadContentEmpty_o,
      readContentEmpty_o=>inboundReadContentEmpty_o,
      readContent_i=>inboundReadContent_i, readContentEnd_o=>inboundReadContentEnd_o,
      readContent_i=>inboundReadContent_i, readContentEnd_o=>inboundReadContentEnd_o,
      readContentData_o=>inboundReadContentData_o);
      readContentData_o=>inboundReadContentData_o);
 
 
end architecture;
end architecture;
Line 353... Line 389...
-- Entity for PacketBufferContinous.
-- Entity for PacketBufferContinous.
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
entity PacketBufferContinous is
entity PacketBufferContinous is
  generic(
  generic(
    SIZE_ADDRESS_WIDTH : natural;
    SIZE_ADDRESS_WIDTH : natural;
    CONTENT_ADDRESS_WIDTH : natural);
    CONTENT_ADDRESS_WIDTH : natural;
 
    CONTENT_WIDTH : natural;
 
    MAX_PACKET_SIZE : natural);
  port(
  port(
    clk : in std_logic;
    clk : in std_logic;
    areset_n : in std_logic;
    areset_n : in std_logic;
 
 
    writeFrameFull_o : out std_logic;
    writeFrameFull_o : out std_logic;
    writeFrame_i : in std_logic;
    writeFrame_i : in std_logic;
    writeFrameAbort_i : in std_logic;
    writeFrameAbort_i : in std_logic;
    writeContent_i : in std_logic;
    writeContent_i : in std_logic;
    writeContentData_i : in std_logic_vector(31 downto 0);
    writeContentData_i : in std_logic_vector(CONTENT_WIDTH-1 downto 0);
 
 
    readFrameEmpty_o : out std_logic;
    readFrameEmpty_o : out std_logic;
    readFrame_i : in std_logic;
    readFrame_i : in std_logic;
    readFrameRestart_i : in std_logic;
    readFrameRestart_i : in std_logic;
    readFrameAborted_o : out std_logic;
    readFrameAborted_o : out std_logic;
 
    readFrameSize_o : out std_logic_vector(CONTENT_ADDRESS_WIDTH-1 downto 0);
 
 
    readContentEmpty_o : out std_logic;
    readContentEmpty_o : out std_logic;
    readContent_i : in std_logic;
    readContent_i : in std_logic;
    readContentEnd_o : out std_logic;
    readContentEnd_o : out std_logic;
    readContentData_o : out std_logic_vector(31 downto 0));
    readContentData_o : out std_logic_vector(CONTENT_WIDTH-1 downto 0));
end entity;
end entity;
 
 
 
 
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-- Architecture for PacketBufferContinous.
-- Architecture for PacketBufferContinous.
Line 456... Line 495...
  -----------------------------------------------------------------------------
  -----------------------------------------------------------------------------
  -- Writer logic.
  -- Writer logic.
  -----------------------------------------------------------------------------
  -----------------------------------------------------------------------------
 
 
  writeFrameFull_o <= '1' when ((backIndexNext = frontIndex) or
  writeFrameFull_o <= '1' when ((backIndexNext = frontIndex) or
                                (available <= 68)) else '0';
                                (available < MAX_PACKET_SIZE)) else '0';
 
 
  Writer: process(clk, areset_n)
  Writer: process(clk, areset_n)
  begin
  begin
    if (areset_n = '0') then
    if (areset_n = '0') then
      backIndex <= (others=>'0');
      backIndex <= (others=>'0');
Line 508... Line 547...
  -----------------------------------------------------------------------------
  -----------------------------------------------------------------------------
 
 
  readFrameEmpty_o <= '1' when (frontIndex = backIndex) else '0';
  readFrameEmpty_o <= '1' when (frontIndex = backIndex) else '0';
  readContentEmpty_o <= '1' when ((frontIndex = backIndex) and
  readContentEmpty_o <= '1' when ((frontIndex = backIndex) and
                                  (memoryWrite_p = memoryRead_p)) else '0';
                                  (memoryWrite_p = memoryRead_p)) else '0';
 
  readFrameSize_o <= std_logic_vector(readFrameEnd_p - memoryStart_p);
 
 
  Reader: process(clk, areset_n)
  Reader: process(clk, areset_n)
  begin
  begin
    if (areset_n = '0') then
    if (areset_n = '0') then
      frontIndex <= (others=>'0');
      frontIndex <= (others=>'0');
Line 561... Line 601...
 
 
  -- Memory to keep frame content in.
  -- Memory to keep frame content in.
  -- REMARK: Use paritybits here as well to make sure the frame data does not
  -- REMARK: Use paritybits here as well to make sure the frame data does not
  -- become corrupt???
  -- become corrupt???
  FrameContent: MemorySimpleDualPort
  FrameContent: MemorySimpleDualPort
    generic map(ADDRESS_WIDTH=>CONTENT_ADDRESS_WIDTH, DATA_WIDTH=>32)
    generic map(ADDRESS_WIDTH=>CONTENT_ADDRESS_WIDTH, DATA_WIDTH=>CONTENT_WIDTH)
    port map(
    port map(
      clkA_i=>clk, enableA_i=>writeContent_i,
      clkA_i=>clk, enableA_i=>writeContent_i,
      addressA_i=>std_logic_vector(memoryWrite_p), dataA_i=>writeContentData_i,
      addressA_i=>std_logic_vector(memoryWrite_p), dataA_i=>writeContentData_i,
      clkB_i=>clk, enableB_i=>readContent_i,
      clkB_i=>clk, enableB_i=>readContent_i,
      addressB_i=>std_logic_vector(memoryRead_p), dataB_o=>readContentData_o);
      addressB_i=>std_logic_vector(memoryRead_p), dataB_o=>readContentData_o);
Line 590... Line 630...
-- Entity for PacketBufferContinousWindow.
-- Entity for PacketBufferContinousWindow.
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
entity PacketBufferContinousWindow is
entity PacketBufferContinousWindow is
  generic(
  generic(
    SIZE_ADDRESS_WIDTH : natural;
    SIZE_ADDRESS_WIDTH : natural;
    CONTENT_ADDRESS_WIDTH : natural);
    CONTENT_ADDRESS_WIDTH : natural;
 
    CONTENT_WIDTH : natural;
 
    MAX_PACKET_SIZE : natural);
  port(
  port(
    clk : in std_logic;
    clk : in std_logic;
    areset_n : in std_logic;
    areset_n : in std_logic;
 
 
    writeFrameFull_o : out std_logic;
    writeFrameFull_o : out std_logic;
    writeFrame_i : in std_logic;
    writeFrame_i : in std_logic;
    writeFrameAbort_i : in std_logic;
    writeFrameAbort_i : in std_logic;
    writeContent_i : in std_logic;
    writeContent_i : in std_logic;
    writeContentData_i : in std_logic_vector(31 downto 0);
    writeContentData_i : in std_logic_vector(CONTENT_WIDTH-1 downto 0);
 
 
    readFrameEmpty_o : out std_logic;
    readFrameEmpty_o : out std_logic;
    readFrame_i : in std_logic;
    readFrame_i : in std_logic;
    readFrameRestart_i : in std_logic;
    readFrameRestart_i : in std_logic;
    readFrameAborted_o : out std_logic;
    readFrameAborted_o : out std_logic;
Line 613... Line 655...
    readWindowNext_i : in std_logic;
    readWindowNext_i : in std_logic;
 
 
    readContentEmpty_o : out std_logic;
    readContentEmpty_o : out std_logic;
    readContent_i : in std_logic;
    readContent_i : in std_logic;
    readContentEnd_o : out std_logic;
    readContentEnd_o : out std_logic;
    readContentData_o : out std_logic_vector(31 downto 0));
    readContentData_o : out std_logic_vector(CONTENT_WIDTH-1 downto 0));
end entity;
end entity;
 
 
 
 
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-- Architecture for PacketBufferContinousWindow.
-- Architecture for PacketBufferContinousWindow.
Line 699... Line 741...
  -----------------------------------------------------------------------------
  -----------------------------------------------------------------------------
  -- Writer logic.
  -- Writer logic.
  -----------------------------------------------------------------------------
  -----------------------------------------------------------------------------
 
 
  writeFrameFull_o <= '1' when ((backIndexNext = frontIndex) or
  writeFrameFull_o <= '1' when ((backIndexNext = frontIndex) or
                                (available <= 68)) else '0';
                                (available < MAX_PACKET_SIZE)) else '0';
 
 
  Writer: process(clk, areset_n)
  Writer: process(clk, areset_n)
  begin
  begin
    if (areset_n = '0') then
    if (areset_n = '0') then
      backIndex <= (others=>'0');
      backIndex <= (others=>'0');
Line 819... Line 861...
 
 
  -- Memory to keep frame content in.
  -- Memory to keep frame content in.
  -- REMARK: Use paritybits here as well to make sure the frame data does not
  -- REMARK: Use paritybits here as well to make sure the frame data does not
  -- become corrupt???
  -- become corrupt???
  FrameContent: MemorySimpleDualPort
  FrameContent: MemorySimpleDualPort
    generic map(ADDRESS_WIDTH=>CONTENT_ADDRESS_WIDTH, DATA_WIDTH=>32)
    generic map(ADDRESS_WIDTH=>CONTENT_ADDRESS_WIDTH, DATA_WIDTH=>CONTENT_WIDTH)
    port map(
    port map(
      clkA_i=>clk, enableA_i=>writeContent_i,
      clkA_i=>clk, enableA_i=>writeContent_i,
      addressA_i=>std_logic_vector(memoryWrite_p), dataA_i=>writeContentData_i,
      addressA_i=>std_logic_vector(memoryWrite_p), dataA_i=>writeContentData_i,
      clkB_i=>clk, enableB_i=>readContent_i,
      clkB_i=>clk, enableB_i=>readContent_i,
      addressB_i=>std_logic_vector(memoryRead_p), dataB_o=>readContentData_o);
      addressB_i=>std_logic_vector(memoryRead_p), dataB_o=>readContentData_o);

powered by: WebSVN 2.1.0

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