OpenCores
URL https://opencores.org/ocsvn/gigabit_udp_mac/gigabit_udp_mac/trunk

Subversion Repositories gigabit_udp_mac

[/] [gigabit_udp_mac/] [trunk/] [LAN/] [reset_gen.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 boa_a_m
--****************************************************************************************
2
-- Engineer:                                   Mehran.HekmatPanah
3
-- Module Name:                            Reset_Gen
4
-- Project Name:                   Ethernet_1G
5
-- Version:                                v0.0
6
-- Difference with Old Version:
7
-- Target Devices:                         XC6VLX240t-1FF1156
8
-- Code Status:                            Final 
9
-- Operation Clock:                        Input:100MHz,Output:100MHz
10
-- In/Out Rate:                    --
11
-- Block RAM Usage:
12
-- Slice Usage: 
13
-- Block Technical Info:
14
-- Additional Comments: 
15
 
16
--****************************************************************************************
17
library IEEE;
18
use IEEE.STD_LOGIC_1164.all;
19
use IEEE.NUMERIC_STD.all;
20
use IEEE.std_logic_unsigned.all;
21
 
22
--library work;
23
--use work.signal_Package.all;
24
 
25
entity reset_gen is
26
port
27
(
28
    i_clk              : in std_logic;
29
    i_reset            : in std_logic;
30
    o_global_reset     : out std_logic:='1';
31
    o_vector_reset     : out std_logic:='1';
32
    o_phy_rstn         : out std_logic:='1'
33
);
34
end reset_gen;
35
 
36
architecture Behavioral of reset_gen is
37
 
38
signal   s_cnt_rst     : std_logic_vector(31 downto 0):=(others=>'0');
39
signal   s_reset       :  std_logic:='1';
40
 
41
begin
42
 
43
 
44
--================ Generate Reset's =======================
45
p_reset_generator: process(i_clk)
46
        begin
47
        if rising_edge(i_clk) then
48
           if(s_reset='1') then
49
                    s_cnt_rst <= (others=>'0');
50
                        o_global_reset    <= '1';
51
                    o_phy_rstn        <= '1';
52
                    s_reset           <=  '0';
53
                else
54
                   s_cnt_rst          <= s_cnt_rst+1;
55
                   o_global_reset     <= '1';
56
                   o_phy_rstn         <= '1';
57
                   if (s_cnt_rst>=8000000) then   --8ms
58
                       s_cnt_rst        <= x"007A1200"; --8000000
59
                       --s_cnt_rst        <= x"00000320"; 
60
                           o_global_reset   <= '0';
61
           elsif (s_cnt_rst>7000000) then --40ms
62
                            o_phy_rstn       <= '1';
63
                   elsif (s_cnt_rst>2000000) then --16ms
64
                            o_phy_rstn       <= '0';
65
                             o_vector_reset  <= '0';
66
                   end if;
67
 
68
       end if;
69
          end if;
70
        end process p_reset_generator;
71
--==========================================================
72
 
73
end Behavioral;
74
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.