1、 Design with function unitChapter 7Finite state machine designStep 1:set up enough state with different meaning;State name state meaningIDLE all lights are off;L1 one left light is on;L2 two left lights are on;L3 three left lights are on;R1 one rignt light is on;R2 two right lights are on;R3 three r
2、ight lights are on;LR3 all lights are on;Examples:T-bird tail lights control Step 1:set up enough state with different meaning;Examples:T-bird tail lights control Step 2-3:from state diagram to the transition listExamples:T-bird tail lights control Step 4:from the state diagram to the transition tab
3、leExamples:T-bird tail lights control Step 5:get the excite equations for D flip-flopRQQQHQQHQQQD0 12 1 20022 01HQDRLHQQRLHQQHQQD 1 2 1 20 10Examples:T-bird tail lights control State machine decomposingLarge state machine may be decomposed to a collection of smaller state machine,or even decomposed
4、to combinational blocks and memory blocks.State machine decomposingTwo conditions for Z=1:(A=last_A)or (B=1 and last_Z=1)Example:the simple state machineState machine decomposingSubmachine design:0AQKDecomposing state machine Main machine design:QBKQ*Examples:T-bird tail lights control Examples:T-bi
5、rd tail lights control LRHCHRLHCLRLHCRExamples:T-bird tail lights control 013QQCLL12QCLL011QQCLLExamples:Vending machine Basic unit:Mode 2 counter*QQD Binary counterCan not control?Which is the final state?Control and final stateAscending up Descending down Binary counterUp/down counter Binary counter