output out;
input in;
input clk;
input rst;
reg out;
reg [2:0] m;
reg [3:0] count;
always@(posedge in or negedge rst)
begin
if(!rst)
begin
m<=0;
end
else
begin
m<=m+1;
end
end
always@(posedge clk or negedge rst)
begin
if(!rst)
begin
count<=0;
out<=0;
end
else if(count==4'b1110)
begin
if(m<=3'b001)
out<=0;
else
out<=1;
count<=count+1;
end
else if(count==4'b1111)
count<=0;
m<=0;
else
count<=count+1;
end
endmodule
	

 
					
				
 
			
			
			
						
			 我要赚赏金
 我要赚赏金 STM32
STM32 MCU
MCU 通讯及无线技术
通讯及无线技术 物联网技术
物联网技术 电子DIY
电子DIY 板卡试用
板卡试用 基础知识
基础知识 软件与操作系统
软件与操作系统 我爱生活
我爱生活 小e食堂
小e食堂

