|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区
您需要 登录 才可以下载或查看,没有账号?立即注册
×
else MINL<=MINL+1;
end
else if(SECL==9) //
时钟正常跳动状态
begin
SECL<=0;
if(SECH==5)
begin
SECH<=0;
if(MINL==9)
begin
MINL<=0;
if(MINH==5)
begin
MINH<=0;
if(HOURL==9) begin
HOURL<=0;HOURH<=HOURH+1;end
else if(HOURH==2&&HOURL==3) begin HOURL<=0;
HOURH<=0;end
else HOURL<=HOURL+1;
end
else MINH<=MINH+1;
end
else MINL<=MINL+1;
end
else SECH<=SECH+1;
end
else SECL<=SECL+1;
end
else
begin
HOURH<=HOURH;
HOURL<=HOURL;
MINH<=MINH;
MINL<=MINL;
SECH<=SECH;
SECL<=SECL;
end
always @(posedge CLK) //
产生报警声音模块
begin
if(MINH==5&&MINL==9&&SECH==5) begin spk<=CLK;end
else if(MINH==0&&MINL==0&&SECH==0) spk<=CLK;
else spk<=0;
end
endmodule |
|