Entity: Debouncer

Diagram

time TPD_G sl RST_POLARITY_G boolean RST_ASYNC_G sl INPUT_POLARITY_G sl OUTPUT_POLARITY_G real CLK_FREQ_G real DEBOUNCE_PERIOD_G boolean SYNCHRONIZE_G sl clk sl rst sl i sl o

Description


Company : SLAC National Accelerator Laboratory

Description: Debouncer for pushbutton switches

This file is part of 'SLAC Firmware Standard Library'. It is subject to the license terms in the LICENSE.txt file found in the top-level directory of this distribution and at: https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. No part of 'SLAC Firmware Standard Library', including this file, may be copied, modified, propagated, or distributed except according to

the terms contained in the LICENSE.txt file.

Generics

Generic name Type Value Description
TPD_G time 1 ns
RST_POLARITY_G sl '1' '1' for active high rst, '0' for active low
RST_ASYNC_G boolean false
INPUT_POLARITY_G sl '0'
OUTPUT_POLARITY_G sl '1'
CLK_FREQ_G real 156.250E+6 units of Hz
DEBOUNCE_PERIOD_G real 1.0E-3 units of seconds
SYNCHRONIZE_G boolean true

Ports

Port name Direction Type Description
clk in sl
rst in sl
i in sl
o out sl

Signals

Name Type Description
r RegType
rin RegType
iSynced sl

Constants

Name Type Value Description
CLK_PERIOD_C real 1.0/CLK_FREQ_G
CNT_MAX_C natural getTimeRatio(DEBOUNCE_PERIOD_G,
CLK_PERIOD_C) - 1
POLARITY_EQ_C boolean ite(INPUT_POLARITY_G = OUTPUT_POLARITY_G,
true,
false)
SYNC_INIT_C slv(1 downto 0) (others => not INPUT_POLARITY_G)
REG_RESET_C RegType (filter => 0,
iSyncedDly => not INPUT_POLARITY_G,
o => not OUTPUT_POLARITY_G)

Types

Name Type Description
RegType

Processes