always@(*)
if(!rst_n)
next_state<=IDLE;
else
case(cur_state)
IDLE :begin
next_state=TRIG;
end
TRIG :begin
if(cnt==TIME_10us-1)
next_state=ECHO;
else
next_state=cur_state;
end
ECHO :begin
if(cnt==TIME_80ms-1)
next_state=IDLE;
else
next_state=cur_state;
end
endcase
有可以帮我解释下超声波测距的这段代码是啥意思不
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-