📄 hour.v
字号:
module hour(ckhour,Rest,sethour,A,B);
input ckhour,sethour,Rest;
output[3:0]A,B;
reg[3:0]A,B;
wire code;
assign code=ckhour|sethour;
always @(posedge code or negedge Rest )begin
if(!Rest)begin A=0;B=0;end
else begin A=A+1;end
if(A==9)begin A=0;B=B+1;end
else if(A==4&&B==2)begin A=0;B=0;end
end
endmodule
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -