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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [processor/] [VHDL/] [ext_modules/] [ext_key_matrix/] [debounce/] [debounce_struct.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.sync_pkg.all;
22
use work.debounce_pkg.all;
23
use work.math_pkg.all;
24
 
25
architecture struct of debounce is
26
  signal data_sync : std_logic;
27
begin
28
  sync_inst : sync
29
    generic map
30
    (
31
      SYNC_STAGES => SYNC_STAGES,
32
      RESET_VALUE => RESET_VALUE
33
    )
34
    port map
35
    (
36
      sys_clk => sys_clk,
37
      sys_res_n => sys_res_n,
38
      data_in => data_in,
39
      data_out => data_sync
40
    );
41
 
42
  fsm_inst : debounce_fsm
43
    generic map
44
    (
45
      CLK_FREQ => CLK_FREQ,
46
      TIMEOUT => TIMEOUT,
47
      RESET_VALUE => RESET_VALUE
48
    )
49
    port map
50
    (
51
      sys_clk => sys_clk,
52
      sys_res_n => sys_res_n,
53
      i => data_sync,
54
      o => data_out,
55
      reinit => reinit,
56
      reinit_value => reinit_value
57
    );
58
end architecture struct;

powered by: WebSVN 2.1.0

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