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

Subversion Repositories uart16750

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

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.numeric_std.all;
27
 
28
entity slib_input_sync is
29
    port (
30
        CLK         : in std_logic;     -- Clock
31
        RST         : in std_logic;     -- Reset
32
        D           : in std_logic;     -- Signal input
33
        Q           : out std_logic     -- Signal output
34
    );
35
end slib_input_sync;
36
 
37
architecture rtl of slib_input_sync is
38
    signal iD : std_logic_vector(1 downto 0);
39
begin
40
    IS_D: process (RST, CLK)
41
    begin
42
        if (RST  = '1') then
43
            iD <= (others => '0');
44
        elsif (CLK'event and CLK='1') then
45
            iD(0) <= D;
46
            iD(1) <= iD(0);
47
        end if;
48
    end process;
49
 
50
    -- Output ports
51
    Q <= iD(1);
52
 
53
end rtl;
54
 

powered by: WebSVN 2.1.0

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