按键防抖动模块.txt
来自「设计制作一个用于十字路口的交通灯控制器 有一组绿、黄、红灯用于指挥交通」· 文本 代码 · 共 20 行
TXT
20 行
library ieee;
use ieee.std_logic_1164.all;
entity fangdou is
port(clk100:in std_logic;
keyin:in std_logic;
keyout:out std_logic);
end fangdou;
architecture a of fangdou is
signal tmp1,tmp2:std_logic;
begin
process(clk100)
begin
if(clk100'event and clk100='0') then
tmp2<=tmp1;
tmp1<=keyin;
end if;
end process;
keyout<=clk100 and tmp1 and (not tmp2);
end a;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?