AMC13
Firmwares for the different applications of the AMC13 uTCA board made at Boston University
 All Classes Variables
FIFO_RESET_7S.vhd
1 ----------------------------------------------------------------------------------
2 -- Company:
3 -- Engineer:
4 --
5 -- Create Date: 07:11:35 04/14/2014
6 -- Design Name:
7 -- Module Name: FIFO_RESET_7S - Behavioral
8 -- Project Name:
9 -- Target Devices:
10 -- Tool versions:
11 -- Description:
12 --
13 -- Dependencies:
14 --
15 -- Revision:
16 -- Revision 0.01 - File Created
17 -- Additional Comments:
18 --
19 ----------------------------------------------------------------------------------
20 library IEEE;
21 use IEEE.STD_LOGIC_1164.ALL;
22 
23 -- Uncomment the following library declaration if using
24 -- arithmetic functions with Signed or Unsigned values
25 --use IEEE.NUMERIC_STD.ALL;
26 
27 -- Uncomment the following library declaration if instantiating
28 -- any Xilinx primitives in this code.
29 --library UNISIM;
30 --use UNISIM.VComponents.all;
31 
32 entity FIFO_RESET_7S is
33  Port ( reset : in STD_LOGIC;
34  clk : in STD_LOGIC;
35  fifo_rst : out STD_LOGIC;
36  fifo_en : out STD_LOGIC);
37 end FIFO_RESET_7S;
38 
39 architecture Behavioral of FIFO_RESET_7S is
40 signal ResetFIFO_sync : std_logic_vector(5 downto 0) := (others => '1');
41 begin
42 fifo_rst <= ResetFIFO_sync(5);
43 process(clk,reset)
44 begin
45  if(reset = '1')then
46  ResetFIFO_sync <= (others => '1');
47  fifo_en <= '0';
48  elsif(clk'event and clk = '1')then
49  ResetFIFO_sync <= ResetFIFO_sync(4 downto 0) & '0';
50  if(ResetFIFO_sync(5) = '0')then
51  fifo_en <= '1';
52  end if;
53  end if;
54 end process;
55 end Behavioral;
56