[source]

Entity io_Debounce

CLOCK_FREQBOUNCE_TIMEBITSINITADD_INPUT_SYNCHRONIZERSCOMMON_LOCKClockstd_logicResetstd_logicInput[BITS - 1 downto 0]std_logic_vectorOutputstd_logic_vector[BITS - 1 downto 0]

Block Diagram of io_Debounce

This module debounces several input pins preventing input changes following a previous one within the configured BOUNCE_TIME to pass. Internally, the forwarded state is locked for, at least, this BOUNCE_TIME. As the backing timer is restarted on every input fluctuation, the next passing input update must have seen a stabilized input.

The parameter COMMON_LOCK uses a single internal timer for all processed inputs. Thus, all inputs must stabilize before any one may pass changed. This option is usually fully acceptable for user inputs such as push buttons.

The parameter ADD_INPUT_SYNCHRONIZERS triggers the optional instantiation of a two-FF input synchronizer on each input bit.

Generics

Name

Type

Default

Description

CLOCK_FREQ

FREQ

BOUNCE_TIME

time

BITS

positive

1

INIT

std_logic_vector

x"00000000"

initial state of Output

ADD_INPUT_SYNCHRONIZERS

boolean

true

COMMON_LOCK

boolean

false

Ports

Name

Type

Direction

Description

Clock

std_logic

in

Reset

std_logic

in

Input

std_logic_vector

in

Output

std_logic_vector

out