9 use ieee.std_logic_1164.
all;
10 use ieee.numeric_std.
all;
21 FASTFIFO_DATA_DEPTH : integer := 8;
22 FASTFIFO_ADDRESS_DEPTH : integer := 3
27 IN_Reset : in std_logic;
29 IN_Write : in std_logic;
30 IN_Ack : in std_logic;
31 OUT_Empty : out std_logic;
44 signal mem : AlgoTriggerObjects(FASTFIFO_DATA_DEPTH-1 downto 0) := (others => ZERO_ALGO_TRIGGER_OBJECT);
45 signal ReadAddress : std_logic_vector(FASTFIFO_ADDRESS_DEPTH-1 downto 0) := (others => '0');
46 signal WriteAddress : std_logic_vector(FASTFIFO_ADDRESS_DEPTH-1 downto 0) := (others => '0');
47 signal Address : std_logic_vector(FASTFIFO_ADDRESS_DEPTH-1 downto 0) := (others => '0');
48 signal Empty : std_logic;
51 Empty <= '0' when unsigned(WriteAddress) > unsigned(ReadAddress) else '1';
54 OUT_data <= mem(to_integer(unsigned(ReadAddress))) when Empty = '0' else ZERO_ALGO_TRIGGER_OBJECT;
56 reading :
process (clk)
58 if rising_edge(clk) then
59 if IN_Reset = '1' then
60 ReadAddress <= (others => '0');
61 elsif IN_Ack = '1' and unsigned(ReadAddress) < (FASTFIFO_DATA_DEPTH-1) then
62 ReadAddress <= std_logic_vector(unsigned(ReadAddress) + 1);
64 ReadAddress <= ReadAddress;
71 writing :
process (clk)
72 variable temp : std_logic_vector(1 downto 0);
74 if rising_edge(clk) then
75 temp := IN_Reset&IN_Write;
78 WriteAddress <= (0 => '1', others => '0');
80 WriteAddress <= (others => '0');
82 if unsigned(WriteAddress) >= FASTFIFO_DATA_DEPTH then
83 report "Writing on full FIFO!" severity error;
85 WriteAddress <= std_logic_vector(unsigned(WriteAddress) + 1);
87 WriteAddress <= WriteAddress;
94 mem(mem'high) <= ZERO_ALGO_TRIGGER_OBJECT;
97 Address <= WriteAddress when IN_Reset = '0' else (others => '0');
99 memory :
process (clk)
101 if rising_edge(clk) then
102 for i in 0 to mem'high-1 loop
103 if IN_Write = '1' and i = to_integer(unsigned(Address)) then
114 end architecture str;
External data-types and functions.
array(natural range <> ) of AlgoTriggerObject AlgoTriggerObjects
Algorithm OUTPUT port.
std_logic_vector( OUT_TOB_WIDTH- 1 downto 0) AlgoTriggerObject
Algorithm Trigger Object TOB.
Fast FIFO, without control signal but with 1 clock tick i/0 delay.
Fast FIFO, without control signal but with 1 clock tick i/0 delay.