|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区
您需要 登录 才可以下载或查看,没有账号?立即注册
×
reg [3:0]led=0;
reg [1:0]state=0;
reg [23:0]counter=0;
always@(posedge clk)
begin
counter<=counter+1'h1;
if(counter==10000)
state<=state+1'h1;
end
always@(posedge clk )
begin
case(state)
0: led<=4'b0001;
1: led<=4'b0010;
2: led<=4'b0100;
3: led<=4'b1000;
endcase
end |
|