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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [processor/] [VHDL/] [ext_modules/] [ext_key_matrix/] [debounce/] [debounce_pkg.vhd] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 jlechner
-----------------------------------------------------------------------
2
-- This file is part of SCARTS.
3
-- 
4
-- SCARTS is free software: you can redistribute it and/or modify
5
-- it under the terms of the GNU General Public License as published by
6
-- the Free Software Foundation, either version 3 of the License, or
7
-- (at your option) any later version.
8
-- 
9
-- SCARTS is distributed in the hope that it will be useful,
10
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-- GNU General Public License for more details.
13
-- 
14
-- You should have received a copy of the GNU General Public License
15
-- along with SCARTS.  If not, see <http://www.gnu.org/licenses/>.
16
-----------------------------------------------------------------------
17
 
18
 
19
library ieee;
20
use ieee.std_logic_1164.all;
21
use work.math_pkg.all;
22
 
23
package debounce_pkg is
24
  component debounce_fsm is
25
    generic
26
    (
27
      CLK_FREQ    : integer;
28
      TIMEOUT     : time range 100 us to 100 ms := 1 ms;
29
      RESET_VALUE : std_logic
30
    );
31
    port
32
    (
33
      sys_clk : in std_logic;
34
      sys_res_n : in std_logic;
35
      i : in std_logic;
36
      o : out std_logic;
37
      reinit  : in std_logic;
38
      reinit_value  : in std_logic
39
    );
40
  end component debounce_fsm;
41
 
42
  component debounce is
43
    generic
44
    (
45
      CLK_FREQ    : integer;
46
      TIMEOUT     : time range 100 us to 100 ms := 1 ms;
47
      RESET_VALUE : std_logic := '0';
48
      SYNC_STAGES : integer range 2 to integer'high
49
    );
50
    port
51
    (
52
      sys_clk : in std_logic;
53
      sys_res_n : in std_logic;
54
 
55
      data_in : in std_logic;
56
      data_out : out std_logic;
57
 
58
      reinit  : in std_logic;
59
      reinit_value  : in std_logic
60
    );
61
  end component debounce;
62
end package debounce_pkg;

powered by: WebSVN 2.1.0

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