VHDL-verification
Package to ease directed testing of HDL entities
|
Emulates PMOD keypad. More...
Emulates PMOD keypad.
Propagates inputs from keypad_columns
into keypad_rows
, according to the bits of pressed_keys
, which is a vector that has 1 bit for each key in the keypad. Please read the detailed description of the architecture to understand which bit of the vector maps to each key.
Definition at line 20 of file keypad_emu.vhd.
Entities | |
keypad_emu_arch | architecture |
Architecture is based on multiple concurrent assignments to the same signal, but some of the drivers are weak (pullups), just like the real hardware. More... | |
Libraries | |
ieee | |
Use IEEE standard definitions library. |
Use Clauses | |
std_logic_1164 | |
Use std_logic* signal types. | |
vhdl_verification | Package <vhdl_verification> |
Use the slv2string function. |
Generics | |
VERBOSE | boolean := false |
If true, log changes in the pressed_keys vector, apart from the changes in the individual keys. Also log which row is connected to which column when a key is pressed. |
Ports | |
keypad_rows | out std_logic_vector ( 3 downto 0 ) |
This is the signal that must be read from the keypad. | |
keypad_columns | in std_logic_vector ( 3 downto 0 ) |
Connect here the signal that drives the keypad. | |
pressed_keys | in std_logic_vector ( 15 downto 0 ) |
One bit for each key. Set to '1' to emulate key press, set to '0' to emulate key release. |