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

Back to eFEX documentation
cntr_L1A_generic.vhd
Go to the documentation of this file.
1 
10 
11 library IEEE;
12 use IEEE.STD_LOGIC_1164.ALL;
13 USE ieee.std_logic_arith.all;
14 
17  Port (
18  CE : in STD_LOGIC;
19  CLK : in STD_LOGIC;
20  RST : in STD_LOGIC;
21  Q : out STD_LOGIC_VECTOR (23 downto 0)
22  );
24 
26 architecture Behavioral of cntr_L1A_generic is
27 
28  signal temp : unsigned (23 downto 0):= X"000000" ;
29 -- signal terminal_cnt : unsigned (23 downto 0):= (others => '1') ;
30 
31 begin
32 process (CLK)
33  -- variable temp : unsigned (23 downto 0):= (others => '0') ;
34  -- variable terminal_cnt : unsigned (23 downto 0):= (others => '1') ;
35  begin
36  if CLK'event AND CLK = '1' then
37  if RST = '1' then -- this is a synchronous reset
38  temp <= X"000000" ; -- set counter to 1.
39  -- temp := to_unsigned(1, testSignal'24);
40  -- terminal_cnt <= (others => '1'); -- set terminal count value given.
41  else
42  if CE = '1' then
43  temp <= temp + 1; -- else increment the value by one
44  end if;
45  end if;
46  end if;
47  end process;
48  Q <= std_logic_vector(temp) ; -- push out new value
49 
50 end Behavioral;
24 bit Counter for L1A ID of process FPGA
24 bit Counter for L1A ID of process FPGA