Presentation is loading. Please wait.

Presentation is loading. Please wait.

State Machine Homework Solution sWAIT1 S0 iBLK oPUSH=1 oPUSH=0 sPUSH1sPASS2 sRET1sWAIT2 iEXT iRET  /iBLK iBLK /iBLK oPUSH=0.

Similar presentations


Presentation on theme: "State Machine Homework Solution sWAIT1 S0 iBLK oPUSH=1 oPUSH=0 sPUSH1sPASS2 sRET1sWAIT2 iEXT iRET  /iBLK iBLK /iBLK oPUSH=0."— Presentation transcript:

1 State Machine Homework Solution sWAIT1 S0 iBLK oPUSH=1 oPUSH=0 sPUSH1sPASS2 sRET1sWAIT2 iEXT iRET  /iBLK iBLK /iBLK oPUSH=0

2 Big State Machine Example cCUTEXT sBLKIDLE iBLKIN load BLKTBL[BLKNUM] into vCURRBLK increment vBLKNUM vSLOTNUM = 0 vBLKNUM=0 sBLKGO sCUTDONEsSLOTCHKsSLOTINCR vBLKNUM<6 /vCURRSLOT.0 cPOSDN /iBLKIN load vCURRBLK, shift right by vSLOTNUM, store into vCURRSLOT increment vSLOTNUM output position oPOSSTART=1 sBLKWAIT sCUTGOsSLOTPOS vBLKNUM>=6 cCUTRET vCURRSLOT.0 oCUT=1 vSLOTNUM<4 vSLOTNUM>=4 sSLOTPWAIT /cPOSDN

3 Big State Machine Example cCUTEXT sBLKIDLE iBLKIN load BLKTBL[BLKNUM] into vCURRBLK increment vBLKNUM vSLOTNUM = 0 vBLKNUM=0 sBLKGO sCUTDONEsSLOTCHKsSLOTINCR vBLKNUM<6 /vCURRSLOT.0 cPOSDN /iBLKIN load vCURRBLK, shift right by vSLOTNUM, store into vCURRSLOT increment vSLOTNUM output position sBLKWAIT sCUTGOsSLOTPOS vBLKNUM>=6 cCUTRET vCURRSLOT.0 oCUT=1 vSLOTNUM<4 vSLOTNUM>=4 sBLKGO2


Download ppt "State Machine Homework Solution sWAIT1 S0 iBLK oPUSH=1 oPUSH=0 sPUSH1sPASS2 sRET1sWAIT2 iEXT iRET  /iBLK iBLK /iBLK oPUSH=0."

Similar presentations


Ads by Google