12 USE ieee.std_logic_1164.
all;
13 use ieee.numeric_std.
all;
18 RAM_ADDR_WIDTH : positive := 12;
19 MAX_PACKET_WIDTH : positive := 8
22 clk_320 : in std_logic;
23 rst_320 : in std_logic;
25 fifo_data : in std_logic_vector (63 DOWNTO 0);
26 fifo_valid : in std_logic;
27 fifo_last : in std_logic;
29 packet_data : OUT std_logic_vector (63 DOWNTO 0);
30 packet_valid : OUT std_logic;
31 packet_last : OUT std_logic;
32 packet_ready : IN std_logic;
34 fifo_fill_level : out std_logic_vector(15 downto 0);
35 packet_count : out STD_LOGIC_VECTOR(15 downto 0);
36 fifo_empty : OUT std_logic;
37 input_error : OUT std_logic;
38 fifo_error : OUT std_logic
66 end Component packet_ram_fifo;
88 SIGNAL data_fifo_data : STD_LOGIC_VECTOR(63 DOWNTO 0);
89 signal fifo_fill_level_i : std_logic_vector(15 downto 0);
90 SIGNAL data_fifo_pause, data_fifo_valid, data_fifo_last, data_fifo_error, ram_fifo_error, local_reset : STD_LOGIC;
135 local_reset_block:
process(clk_320)
136 Variable stretch: std_logic_vector(7 downto 0) := (Others => '1');
139 if rising_edge(clk_320) then
140 if (ram_fifo_error = '1') or (data_fifo_error = '1') or (rst_320 = '1') then
141 stretch := (Others => '1');
143 stretch := stretch(6 downto 0) & "0";
145 local_reset <= stretch(7)
151 end process local_reset_block;
153 fifo_empty_block:
process(clk_320)
155 if rising_edge(clk_320) then
156 if (unsigned(fifo_fill_level_i) = 0) then
170 end process fifo_empty_block;
172 fifo_error <= ram_fifo_error or data_fifo_error;
173 fifo_fill_level <= fifo_fill_level_i;
175 END Architecture rtl;
Instantiate a Block RAM storage and Distributed RAM AXI interface block...
Instantiate a Block RAM storage and Distributed RAM AXI interface block...
Optimised RAM-based single clock packet FIFO.
out out_data STD_LOGIC_VECTOR( DATA_WIDTH- 1 downto 0)
AXI stream output.
in in_data STD_LOGIC_VECTOR( DATA_WIDTH- 1 downto 0)
AXI stream input.
out in_pause STD_LOGIC
AXI stream input pause request.
out out_error STD_LOGIC
AXI stream output error (asserted on last)
in rst_clk STD_LOGIC
Synchronous reset.
DATA_WIDTH positive := 64
Width of data for RAM.
out out_valid STD_LOGIC
AXI stream output valid.
in in_last STD_LOGIC
AXI stream input last.
in in_valid STD_LOGIC
AXI stream input valid.
in out_ready STD_LOGIC
AXI stream output ready.
out out_last STD_LOGIC
AXI stream output last.
BUFWIDTH positive := 4
Width of address bus for buffer, i.e. array (0 to 2**BUFWIDTH - 1)
Optimised RAM-based single clock packet FIFO.
out out_data STD_LOGIC_VECTOR( DATA_WIDTH- 1 downto 0)
AXI stream output.
in in_data STD_LOGIC_VECTOR( DATA_WIDTH- 1 downto 0)
AXI stream input.
MAXWIDTH positive := 5
Parameter for maximum packet size (2**MAXWIDTH - 1) on input or output before trigger reset mechanism...
out out_error STD_LOGIC
AXI stream output error (asserted on last)
in rst_clk STD_LOGIC
Synchronous reset.
out packet_count STD_LOGIC_VECTOR( 15 downto 0)
Number of packets stored in the FIFO.
DATA_WIDTH positive := 64
Width of data for RAM.
in out_pause STD_LOGIC
AXI stream output pause request.
out out_valid STD_LOGIC
AXI stream output valid.
in in_last STD_LOGIC
AXI stream input last.
in in_valid STD_LOGIC
AXI stream input valid.
out fifo_fill_level STD_LOGIC_VECTOR( 15 downto 0)
Number of words stored in the FIFO.
BUFWIDTH positive := 10
Width of address bus for RAM, i.e. array (0 to 2**BUFWIDTH - 1)
out out_last STD_LOGIC
AXI stream output last.
out in_error STD_LOGIC
AXI stream input error.