⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 debouncing.vhd

📁 用于模仿密码锁的工作过程。完成密码锁的核心控制功能。可实现数码输入、清除、退位、设置密码、错误提示、系统报警、解除报警、系统关闭等功能。
💻 VHD
字号:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;

library altera;
use altera.maxplus2.all;


entity debouncing is
port(
     d_in:in std_logic;
     d_out:out std_logic;
     clk:in std_logic);
end debouncing;


architecture behavior of debouncing is
  signal vcc,inv_d:std_logic;
  signal d1,d0:std_logic;
  signal q1,q0:std_logic;

  
begin
  vcc<='1';
  inv_d<=not d_in;
  dff1:dff port map(d=>vcc,Q=>q0,clk=>clk,clrn=>inv_d,prn=>vcc);
  dff2:dff port map(d=>vcc,Q=>q1,clk=>clk,clrn=>q0,prn=>vcc);
process(clk)
begin
  if clk'event and clk='1' then
     d0<=not q1;
     d1<=d0;
  end if;
end process;
d_out<=not(d1 and not d0);
end behavior;

  



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -