always@(posedge clk )
begin
count=count+1;
if(count==32'd25000000)
begin
count=32'b0;
clk_s=~clk_s;
end always@(posedge clk_s)
begin
led={led【6:0】,led【7】};
end
endmodule
always @ (posedge clk)
if((cnt_20ms == 20'hfffff) &key_in) //key_in=1表示按键
begin
key_in_r <= ~key_in_r;
end
always@(posedge clk )
begin
count=count+1;
if(count==32'd25000000)
begin
count=32'b0;
clk_s=~clk_s;
end
always@(posedge clk_s)
begin
if(!key_in_r )
led={led【6:0】,led【7】};
else
led=led;
end
endmodule