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

Subversion Repositories btc_dsha256

[/] [btc_dsha256/] [trunk/] [rtl/] [vhdl/] [misc/] [SyncReset.vhd] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 nuxi1209
------------------------------------------------------------------- 
2
--                                                               --
3
--  Copyright (C) 2013 Author and VariStream Studio              --
4
--  Author : Yu Peng                                             --
5
--                                                               -- 
6
--  This source file may be used and distributed without         -- 
7
--  restriction provided that this copyright statement is not    -- 
8
--  removed from the file and that any derivative work contains  -- 
9
--  the original copyright notice and the associated disclaimer. -- 
10
--                                                               -- 
11
--  This source file is free software; you can redistribute it   -- 
12
--  and/or modify it under the terms of the GNU Lesser General   -- 
13
--  Public License as published by the Free Software Foundation; -- 
14
--  either version 2.1 of the License, or (at your option) any   -- 
15
--  later version.                                               -- 
16
--                                                               -- 
17
--  This source is distributed in the hope that it will be       -- 
18
--  useful, but WITHOUT ANY WARRANTY; without even the implied   -- 
19
--  warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      -- 
20
--  PURPOSE.  See the GNU Lesser General Public License for more -- 
21
--  details.                                                     -- 
22
--                                                               -- 
23
--  You should have received a copy of the GNU Lesser General    -- 
24
--  Public License along with this source; if not, download it   -- 
25
--  from http://www.opencores.org/lgpl.shtml                     -- 
26
--                                                               -- 
27
------------------------------------------------------------------- 
28
--  Notes: 
29
--      Generates a "synchronous" reset from the async global 
30
--      reset.
31
-------------------------------------------------------------------
32 2 nuxi1209
 
33
LIBRARY ieee;
34
USE ieee.std_logic_1164.all;
35
USE ieee.std_logic_unsigned.all;
36
 
37
entity SyncReset is
38
        port(
39
                iClk                            : in std_logic;                                         -- Clock domain that the reset should be resynchronyze to
40
                iAsyncReset             : in std_logic;                                         -- Asynchronous reset that should be resynchronyse
41
                oSyncReset              : out std_logic                                         -- Synchronous reset output
42
        );
43
end SyncReset;
44
 
45
architecture SyncReset of SyncReset is
46
 
47
        signal sResetStage1                             : std_logic;
48
 
49
begin
50
 
51
        process(iClk, iAsyncReset)
52
        begin
53
                if iAsyncReset = '1' then
54
                        sResetStage1            <= '1';
55
                        oSyncReset                      <= '1';
56
                elsif rising_edge(iClk) then
57
                        sResetStage1            <= '0';
58
                        oSyncReset                      <= sResetStage1;
59
                end if;
60
        end process;
61
 
62
end SyncReset;
63
 
64
 
65
 

powered by: WebSVN 2.1.0

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