用STATECAD快速设计有限状态机
POWERSWITCH='1'ANDSTOPSWITCH='0')THEN
next_sreg<=RECORDING;next_POWERLED<='1';
next_PLAYLED<='0';next_RECORDLED<='1';
ENDIF;
IF(POWERSWITCH='0')THEN
next_sreg<=OFF;next_POWERLED<='0';
next_PLAYLED<='0';next_RECORDLED<='0';
ENDIF;
IF(STOPSWITCH='1'ANDPOWERSWITCH='1')THEN
next_sreg<=POWERON;next_POWERLED<='1';
next_PLAYLED<='0';next_RECORDLED<='0';
ENDIF;
WHENOTHERS=>
ENDCASE;
ENDPROCESS;
ENDBEHAVIOR;
整个状态机实现过程比相当简单。快捷。有效 《用STATECAD快速设计有限状态机(第3页)》
本文链接地址:http://www.oyaya.net/fanwen/view/172835.html
next_sreg<=RECORDING;next_POWERLED<='1';
next_PLAYLED<='0';next_RECORDLED<='1';
ENDIF;
IF(POWERSWITCH='0')THEN
next_sreg<=OFF;next_POWERLED<='0';
next_PLAYLED<='0';next_RECORDLED<='0';
ENDIF;
IF(STOPSWITCH='1'ANDPOWERSWITCH='1')THEN
next_sreg<=POWERON;next_POWERLED<='1';
next_PLAYLED<='0';next_RECORDLED<='0';
ENDIF;
WHENOTHERS=>
ENDCASE;
ENDPROCESS;
ENDBEHAVIOR;
整个状态机实现过程比相当简单。快捷。有效 《用STATECAD快速设计有限状态机(第3页)》