|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
×
module counter(reset,clk,out);
input reset,clk;
output [2:0]out;
reg [2:0]out;
[email=always@(posedge]always@(posedge[/email] clk or posedge reset)
if (reset)
out<=0;
else
begin
if (out==2) out<=0;
else out<=out+1;
end
endmodule |
|