eFEX firmware  1.7.3
ATLAS l1-calo - electron and tau feature extraction firmware for eFEX boards

Back to eFEX documentation
RAW_fifo_full_flag_gen.vhd
Go to the documentation of this file.
1 
16 
17 
18 
19 library IEEE;
20 use IEEE.STD_LOGIC_1164.ALL;
21 use IEEE.NUMERIC_STD.ALL;
22 
23 
26  Port (
27  rst_in : in STD_LOGIC;
28  clk_in : in STD_LOGIC;
30  fifo_data_count : in STD_LOGIC_VECTOR (8 downto 0);
32  assert_count_in : in STD_LOGIC_VECTOR (8 downto 0);
34  negate_count_in : in STD_LOGIC_VECTOR (8 downto 0);
36  full_flag_out : out STD_LOGIC
37  );
39 
42 
43 begin
44 
45 U0: process (clk_in)
46  begin
47  if (clk_in'event and clk_in = '1') then
48  if (rst_in = '1') then
49  full_flag_out <= '0' ; -- set flag ZERO
50  else
51  if (unsigned(fifo_data_count) > unsigned(assert_count_in)) then -- greater
52  full_flag_out <= '1' ; -- set full flag
53  else
54  if (unsigned(fifo_data_count) < unsigned(negate_count_in)) then -- smaller
55  full_flag_out <= '0' ; -- set flag ZERO
56  end if;
57  end if;
58  end if;
59  end if;
60  end process;
61 
62 end Behavioral;
Generate Full Flag for RAW data de-randomisation FIFO.
Generate Full Flag for RAW data de-randomisation FIFO.
out full_flag_out STD_LOGIC
Full Flag for RAW input FIFO.
in negate_count_in STD_LOGIC_VECTOR( 8 downto 0)
negate count input to set Full Flag
in assert_count_in STD_LOGIC_VECTOR( 8 downto 0)
assert count input to set Full Flag
in fifo_data_count STD_LOGIC_VECTOR( 8 downto 0)
RAW FIFO data count input.