1 ------------------------------------------------------------------------------- 2 -- File : Debouncer.vhd 3 -- Company : SLAC National Accelerator Laboratory 4 -- Created : 2013-04-30 5 -- Last update: 2013-08-02 6 ------------------------------------------------------------------------------- 7 -- Description: Debouncer for pushbutton switches 8 ------------------------------------------------------------------------------- 9 -- This file is part of 'SLAC Firmware Standard Library'. 10 -- It is subject to the license terms in the LICENSE.txt file found in the 11 -- top-level directory of this distribution and at: 12 -- https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. 13 -- No part of 'SLAC Firmware Standard Library', including this file, 14 -- may be copied, modified, propagated, or distributed except according to 15 -- the terms contained in the LICENSE.txt file. 16 ------------------------------------------------------------------------------- 19 use ieee.std_logic_1164.
all;
20 use ieee.numeric_std.
all;
24 --! @ingroup base_general 46 type RegType is record 51 constant REG_RESET_C : RegType := 55 signal r : RegType := REG_RESET_C;
76 end generate SynchronizerGen;
78 comb :
process (r,
i, iSynced,
rst)
is 93 -- else v.o retains current value 106 seq :
process (
clk,
rst)
is 109 r <= REG_RESET_C after TPD_G;
110 elsif (rising_edge(clk)) then 111 r <= rin after TPD_G;
115 end architecture rtl;
FILTER_SIZE_Gpositive := 16
in rstsl :=not RST_POLARITY_G
FILTER_INIT_Gslv := X"0000"
RST_ASYNC_Gboolean := false
SYNCHRONIZE_Gboolean := true
OUTPUT_POLARITY_Gsl := '1'
RST_ASYNC_Gboolean := false
in rstsl :=not RST_POLARITY_G
INPUT_POLARITY_Gsl := '0'