AMC13
Firmwares for the different applications of the AMC13 uTCA board made at Boston University
 All Classes Variables
reset_resync.vhd
1 --###################################################
2 -- clock domain translate
3 --
4 -- V1.00 : clock IN should be lower that clock out
5 -- v2.00 : clock IN and clock out can be anything
6 --
7 --
8 --
9 
10 
11 LIBRARY ieee;
12 USE ieee.std_logic_1164.all;
13 use ieee.numeric_std.all;
14 entity reset_resync is
15 port (
16  reset : in std_logic;
17  clock : in std_logic;
18 
19  Reset_sync : out std_logic
20  );
21 end reset_resync;
22 
23 architecture behavioral of reset_resync is
24 signal reg : std_logic_vector(1 downto 0);
25 
26 
27 --#################################################
28 --# here start code
29 --#################################################
30 begin
31 
32 process(reset,clock)
33 begin
34  if reset = '0' then
35  reg <= (others => '0');
36  elsif rising_edge(clock) then
37  reg(1) <= reg(0);
38  reg(0) <= '1';
39  end if;
40 end process;
41 
42 Reset_sync <= reg(1);
43 
44 end behavioral;