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

Subversion Repositories uart16750

[/] [uart16750/] [trunk/] [rtl/] [vhdl/] [slib_input_sync.vhd] - Blame information for rev 2

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 hasw
--
2
-- Input synchronization
3
--
4
-- Author:   Sebastian Witt
5
-- Data:     27.01.2008
6
-- Version:  1.0
7
--
8
-- This code is free software; you can redistribute it and/or
9
-- modify it under the terms of the GNU Lesser General Public
10
-- License as published by the Free Software Foundation; either
11
-- version 2.1 of the License, or (at your option) any later version.
12
--
13
-- This code is distributed in the hope that it will be useful,
14
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
15
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16
-- Lesser General Public License for more details.
17
--
18
-- You should have received a copy of the GNU Lesser General Public
19
-- License along with this library; if not, write to the
20
-- Free Software  Foundation, Inc., 59 Temple Place, Suite 330,
21
-- Boston, MA  02111-1307  USA
22
--
23
 
24
LIBRARY IEEE;
25
USE IEEE.std_logic_1164.all;
26
USE IEEE.std_logic_unsigned.all;
27
USE IEEE.numeric_std.all;
28
 
29
entity slib_input_sync is
30
    port (
31
        CLK         : in std_logic;     -- Clock
32
        RST         : in std_logic;     -- Reset
33
        D           : in std_logic;     -- Signal input
34
        Q           : out std_logic     -- Signal output
35
    );
36
end slib_input_sync;
37
 
38
architecture rtl of slib_input_sync is
39
    signal iD : std_logic_vector(1 downto 0);
40
begin
41
    IS_D: process (RST, CLK)
42
    begin
43
        if (RST  = '1') then
44
            iD <= (others => '0');
45
        elsif (CLK'event and CLK='1') then
46
            iD(0) <= D;
47
            iD(1) <= iD(0);
48
        end if;
49
    end process;
50
 
51
    -- Output ports
52
    Q <= iD(1);
53
 
54
end rtl;
55
 

powered by: WebSVN 2.1.0

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