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