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

Back to eFEX documentation
packet_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 
16 LIBRARY infrastructure_lib;
17 use infrastructure_lib.packet_mux_type.all;
18 
21  GENERIC(
22  NChannels: positive := 4 -- number of signals being monitored
23  );
24  PORT (
25  clk_320: in std_logic;
26  rst_status_cntrs: in std_logic; -- reset all packet status counters
27  value_bus: in fifo_status_array(NChannels - 1 downto 0);
28  tide_mark_bus: out fifo_status_array(NChannels - 1 downto 0)
29  );
30 END ENTITY packet_tide_mark_block;
31 
33 Architecture rtl of packet_tide_mark_block is
34 Begin
35 
36 tide_mark_procs: for i in 0 to NChannels - 1 generate
37 
38  tide_mark_block: Process(clk_320)
39  Variable tide_mark: unsigned(15 downto 0);
40  Begin
41  if rising_edge(clk_320) then
42  if (rst_status_cntrs = '1') then
43  tide_mark := (Others => '0');
44  elsif (tide_mark < unsigned(value_bus(i))) then
45  tide_mark := unsigned(value_bus(i));
46  end if;
47  tide_mark_bus(i) <= std_logic_vector(tide_mark);
48  end if;
49  End Process tide_mark_block;
50 
51 End generate tide_mark_procs;
52 
53 End rtl;
Instantiate tide mark calculation for a set of 16 bit values...
Instantiate tide mark calculation for a set of 16 bit values...