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

📄 aab.vhd

📁 智能化微机测量和控制技术的迅速发展和广泛应用己经渗透到国民经济的各个部门。不但国防技 术、航空、航天、铁路、冶金、化工等产业
💻 VHD
字号:
----秒表的启停是通过控制送给计数器的时钟来实现的,当按下启停键后,输出端Q的状态发生反转。
----Q为‘1'时,时钟可通过与门,秒表计时;Q为‘0'时,时钟被屏蔽,计数器得不到时钟,停止计数
library ieee; 
use ieee.std_logic_1164.all; 
---------------------------------
entity aab is 
port(a,clk,clr:in std_logic; 
q:out std_logic); 
end aab; 
---------------------------------
architecture aab_arc of aab is 
begin 
process(clk) 
variable tmp:std_logic; 
begin 
if clr='0'then tmp:='0';   ---清零,封锁与门
elsif clk'event and clk='1'then 
if a='1'then          ---当检测到脉冲时
tmp:=not tmp;        ---输出低电平,封锁与门
end if; 
end if; 
q<=tmp; 
end process; 
end aab_arc; 

⌨️ 快捷键说明

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