|
|
Sequential Circuit Implementation of a State MachineWe are all familiar with the traffic signals. The traffic signal control can be mapped by a state machine, which can be implemented by sequential logic circuit. This is a classic example which I borrow my Class notes.Sequential Circuit Design Steps
Z1=0=Red Z1=1=Green Z2=0=Red Z2=1=Green X=1=Pedestrian wants to cross X=0=No Pedestrian East West traffic is allowed if Z1=1=Green and Z2=0=Red. North South traffic is allowed if Z1=0=Red and Z2=1=Green. If a pedestrian want to cross, she/he must press X. To reduce the state machine possibilities, the pedestrian can only if all traffic stops, that is Z1=Z2=Red=0. The State Machine
Case Descriptions Assume that state machine spends equal time at each state after switching. If there is no pedestrian then X=0, and after the set time the state machine will go from state0 to state1. Also, if there is no pedestrian then X=0, and after the set time the state machine will go from state1 to state0. When the state machine is in state0 and pedestrian presses X=1, she/he will be allowed to cross. The state machine goes to state2. When the state machine is in state1 and pedestrian presses X=1, she/he will be allowed to cross. The state machine goes to state3. After the state2, the state machine goes to state1 regardless of whether there is a pedestrian or not. In state2 the North South traffic is allowed. Going from state 2 to state1 is justified, since originally the East West traffic was following and then pedestrian crossed. After the state3, the state machine goes to state0 regardless of whether there is a pedestrian or not. In state0 the East West traffic is allowed. Going from state3 to state0 is justified, since originally the North South traffic was following and then pedestrian crossed. Transition Table
Function specification There are three possible inputs X, Q1, Q0 and four outputs Q1(t+1), Q0(t+1), Z1 and Z2. The Boolean expression is expressed as sum of minterms.
Circuit Implementation
|