1 |
42 |
lmaarsen |
--------------------------------------------------------------------------------
|
2 |
|
|
---- ----
|
3 |
|
|
---- Ethernet Switch on Configurable Logic IP Core ----
|
4 |
|
|
---- ----
|
5 |
|
|
---- This file is part of the ESoCL project ----
|
6 |
|
|
---- http://www.opencores.org/cores/esoc/ ----
|
7 |
|
|
---- ----
|
8 |
|
|
---- Description: see design description ESoCL_dd_71022001.pdf ----
|
9 |
|
|
---- ----
|
10 |
|
|
---- To Do: see roadmap description ESoCL_dd_71022001.pdf ----
|
11 |
|
|
---- and/or release bulleting ESoCL_rb_71022001.pdf ----
|
12 |
|
|
---- ----
|
13 |
|
|
---- Author(s): L.Maarsen ----
|
14 |
|
|
---- Bert Maarsen, lmaarsen@opencores.org ----
|
15 |
|
|
---- ----
|
16 |
|
|
--------------------------------------------------------------------------------
|
17 |
|
|
---- ----
|
18 |
|
|
---- Copyright (C) 2009 Authors and OPENCORES.ORG ----
|
19 |
|
|
---- ----
|
20 |
|
|
---- This source file may be used and distributed without ----
|
21 |
|
|
---- restriction provided that this copyright statement is not ----
|
22 |
|
|
---- removed from the file and that any derivative work contains ----
|
23 |
|
|
---- the original copyright notice and the associated disclaimer. ----
|
24 |
|
|
---- ----
|
25 |
|
|
---- This source file is free software; you can redistribute it ----
|
26 |
|
|
---- and/or modify it under the terms of the GNU Lesser General ----
|
27 |
|
|
---- Public License as published by the Free Software Foundation; ----
|
28 |
|
|
---- either version 2.1 of the License, or (at your option) any ----
|
29 |
|
|
---- later version. ----
|
30 |
|
|
---- ----
|
31 |
|
|
---- This source is distributed in the hope that it will be ----
|
32 |
|
|
---- useful, but WITHOUT ANY WARRANTY; without even the implied ----
|
33 |
|
|
---- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ----
|
34 |
|
|
---- PURPOSE. See the GNU Lesser General Public License for more ----
|
35 |
|
|
---- details. ----
|
36 |
|
|
---- ----
|
37 |
|
|
---- You should have received a copy of the GNU Lesser General ----
|
38 |
|
|
---- Public License along with this source; if not, download it ----
|
39 |
|
|
---- from http://www.opencores.org/lgpl.shtml ----
|
40 |
|
|
---- ----
|
41 |
|
|
--------------------------------------------------------------------------------
|
42 |
|
|
-- Object : Entity work.esoc_reset
|
43 |
|
|
-- Last modified : Mon Apr 14 12:49:49 2014.
|
44 |
|
|
--------------------------------------------------------------------------------
|
45 |
|
|
|
46 |
|
|
|
47 |
|
|
|
48 |
|
|
library ieee, std, work;
|
49 |
|
|
use ieee.std_logic_1164.all;
|
50 |
|
|
use std.textio.all;
|
51 |
|
|
use ieee.numeric_std.all;
|
52 |
|
|
use work.package_esoc_configuration.all;
|
53 |
|
|
|
54 |
|
|
entity esoc_reset is
|
55 |
|
|
port(
|
56 |
|
|
clk_control : in std_logic;
|
57 |
|
|
esoc_areset : in std_logic;
|
58 |
|
|
pll1_locked : in STD_LOGIC;
|
59 |
|
|
pll2_locked : in STD_LOGIC;
|
60 |
|
|
reset : out std_logic);
|
61 |
|
|
end entity esoc_reset;
|
62 |
|
|
|
63 |
|
|
--------------------------------------------------------------------------------
|
64 |
|
|
-- Object : Architecture work.esoc_reset.esoc_reset
|
65 |
|
|
-- Last modified : Mon Apr 14 12:49:49 2014.
|
66 |
|
|
--------------------------------------------------------------------------------
|
67 |
|
|
|
68 |
|
|
|
69 |
|
|
---------------------------------------------------------------------------------------------------------------
|
70 |
|
|
-- architecture and declarations
|
71 |
|
|
---------------------------------------------------------------------------------------------------------------
|
72 |
|
|
architecture esoc_reset of esoc_reset is
|
73 |
|
|
|
74 |
|
|
---------------------------------------------------------------------------------------------------------------
|
75 |
|
|
-- signals
|
76 |
|
|
---------------------------------------------------------------------------------------------------------------
|
77 |
|
|
signal esoc_areset_sync : std_logic_vector(1 downto 0);
|
78 |
|
|
|
79 |
|
|
begin
|
80 |
|
|
|
81 |
|
|
--=============================================================================================================
|
82 |
|
|
-- Process : synchronise asynchronous reset input plus filtering
|
83 |
|
|
-- Description :
|
84 |
|
|
--=============================================================================================================
|
85 |
|
|
sync: process(clk_control,pll1_locked,pll2_locked)
|
86 |
|
|
begin
|
87 |
|
|
-- keep device in reset if pll's not locked
|
88 |
|
|
if pll1_locked = '0' or pll2_locked = '0' then
|
89 |
|
|
esoc_areset_sync <= (others => '1');
|
90 |
|
|
|
91 |
|
|
-- synchronise external reset
|
92 |
|
|
elsif clk_control'event and clk_control = '1' then
|
93 |
|
|
esoc_areset_sync <= esoc_areset & esoc_areset_sync(esoc_areset_sync'high downto 1);
|
94 |
|
|
|
95 |
|
|
end if;
|
96 |
|
|
end process;
|
97 |
|
|
|
98 |
|
|
reset <= esoc_areset_sync(0);
|
99 |
|
|
|
100 |
|
|
end architecture esoc_reset ; -- of esoc_reset
|
101 |
|
|
|