📄 hourcount.tdf
字号:
subdesign hourcount
(
clk : input;
manu : input;
rst : input;
hour[4..0] : output;
)
variable
count[5..0]:dff;
hourcount[4..0]:dff;
begin
count[].clk=clk;
hourcount[].clk=clk;
if rst then count[].d=0;
hourcount[].d=0;
elsif count[].q==59
then count[].d=0;
if hourcount[].q==23
then hourcount[].d=0;
else hourcount[].d=hourcount[].q+1;
end if;
else count[].d=count[].q+1;
end if;
if manu
then if hourcount[].q==23
then hourcount[].d=0;
else hourcount[].d=hourcount[].q+1;
end if;
end if;
hour[]=hourcount[];
end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -