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

Back to eFEX documentation
tide_mark_block.vhd
Go to the documentation of this file.
1 
10 
12 LIBRARY ieee;
13 USE ieee.std_logic_1164.all;
14 use ieee.numeric_std.all;
15 
17 ENTITY tide_mark_block IS
18  generic (
19  width : integer := 16
20  );
21  PORT (
22  clk_in: in std_logic;
23  rst_in: in std_logic; -- reset all packet status counters
24  value_bus: in STD_LOGIC_VECTOR (width-1 downto 0);
25  tide_mark_out: out STD_LOGIC_VECTOR (width-1 downto 0)
26  );
27 END ENTITY tide_mark_block;
28 
30 Architecture rtl of tide_mark_block is
31 Begin
32 
33  tide_mark_block: Process(clk_in)
34  Variable tide_mark: unsigned(width-1 downto 0);
35  Begin
36  if rising_edge(clk_in) then
37  if (rst_in = '1') then
38  tide_mark := (Others => '0');
39  elsif (tide_mark < unsigned(value_bus)) then
40  tide_mark := unsigned(value_bus);
41  end if;
42  tide_mark_out <= std_logic_vector(tide_mark);
43  end if;
44  End Process tide_mark_block;
45 
46 End rtl;
Instantiate tide mark calculation for a 16 bit data input.
Instantiate tide mark calculation for a 16 bit data input.