Page 792 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 792
// 라인트레이서 멈춤 지연 시간 발생 회로
always @ (posedge clk, negedge reset)
begin
if(!reset)
begin
stop_cnt <= 0;
stop <= 0;
end
else
begin
if(stop_flag == 1 || stop_flag == 2)
begin
if(stop_cnt >= 74999999 || (flag1 == "X" && flag2 == "X"))
begin
stop <= 0;
stop_cnt <= 0;
end
else
begin
stop <= 1;
stop_cnt <= stop_cnt+1;
end
end
else
begin
stop <= 0;
stop_cnt <= 0;
end
end
end
endmodule
- 785 -