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