debounce.vhd
来自「VHDL实现的交通灯程序」· VHDL 代码 · 共 22 行
VHD
22 行
library ieee;
use ieee.std_logic_1164.all;
entity Debounce is
port(
key,clk: in std_logic;
key_out: out std_logic
);
end Debounce;
architecture Debounce_arc of Debounce is
signal temp1,temp2: std_logic;
begin
process(key,clk)
begin
if clk'event and clk='0' then
temp2<=temp1;
temp1<=key;
end if;
end process;
key_out<=temp1 and (not temp2) and clk;
end;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?