📄 debounce.vhd
字号:
library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all; -- use for da, comment out for actmapuse ieee.std_logic_arith.all;entity debounce is port(clk,button : in std_logic; cntpulse : out std_logic );end debounce;architecture behavioural of debounce isbegin counter : process(button,clk) variable count : std_logic_vector(5 downto 0); begin if(button = '0') then count := "101000"; -- value 40 cntpulse <= '0'; elsif(rising_edge(clk)) then if (count /= "000000") then count := count - '1'; cntpulse <= '0'; else cntpulse <= '1'; end if; end if; end process counter;end behavioural;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -