📄 count10.v
字号:
module count10(out,cout,en,clr,clk);
output[3:0] out;
output cout;
input en,clr,clk;
reg[3:0] out;
always @(posedge clk or posedge clr)
begin
if (clr) out = 0;
else if(en)
begin
if(out==9) out=0;
else out = out+1;
end
end
assign cout =((out==9)&en)?1:0;
endmodule
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -