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

Back to eFEX documentation
GeneralDelay.vhd
Go to the documentation of this file.
1 
6 library IEEE;
7 use IEEE.STD_LOGIC_1164.all;
8 
10 entity GeneralDelay is
11  generic (delay : integer := 1;
12  size : integer := 32
13  );
14 
15  port (
16  clk : in std_logic;
17  data_in : in std_logic_vector(size-1 downto 0);
18  data_out : out std_logic_vector(size-1 downto 0)
19  );
20 end GeneralDelay;
21 
23 architecture Behavioral of GeneralDelay is
24 
25  type t_DelayedSignal is array (delay downto 0) of std_logic_vector(size-1 downto 0);
26  signal DelayedSignal : t_DelayedSignal := (others => (others => '0'));
27 
28 begin
29 
30  dalay_proc : process (clk)
31  begin
32  if rising_edge(clk) then
33  DelayedSignal(DelayedSignal'high) <= data_in;
34  DelayedSignal(DelayedSignal'high-1 downto 0) <= DelayedSignal(DelayedSignal'high downto 1);
35  end if;
36  end process;
37 
38  data_out <= DelayedSignal(0);
39 end Behavioral;
Shift register for data delay.
Shift register for data delay.