hou.vhd
来自「智能化微机测量和控制技术的迅速发展和广泛应用己经渗透到国民经济的各个部门。不但国」· VHDL 代码 · 共 20 行
VHD
20 行
--------24进制计数器模块 计数输出为小时的数值
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
------------------------------------
entity hou is
port(en,clk,clr:in std_logic;
h1,h0:out std_logic_vector(3 downto 0));
end hou;
-----------------------------------------
architecture hour_arc of hou is
begin
process(clk)
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 + -
显示快捷键?