miao.vhd

来自「智能化微机测量和控制技术的迅速发展和广泛应用己经渗透到国民经济的各个部门。不但国」· VHDL 代码 · 共 21 行

VHD
21
字号
-----------60进制计数器模块  用于对秒和分的计数
library ieee; 
use ieee.std_logic_1164.all; 
use ieee.std_logic_unsigned.all; 
------------------------------
entity miao is 
port(clr,clk,en:in std_logic; 
sec1,sec0:out std_logic_vector(3 downto 0); 
c0:out std_logic); 
end miao; 
------------------------------------
architecture miao_arc of miao is 
begin 
process(clk,clr) 
variable cnt0,cnt1:std_logic_vector(3 downto 0); 
begin 
if clr='0'then 
cnt0:="0000";         ---低电平清零
cnt1:="0000"; 
elsif clk'event and clk='1'then   ---在时钟的上升沿
if en='1'then                         ---使能端有

⌨️ 快捷键说明

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