A traffic light with only green and red; either the North-South road has green or the East-West road has green (both can’t be red); there are detectors on the roads to indicate if a car is on the road; the lights are updated every 30 seconds; a light needs to change only if a car is waiting on the other road.
•How many outputs signals?
•NSlite: When this signal is asserted, the light on the North-South road is green; when this signal is deasserted, the light on the North-South road is red.
•EWlite: When this signal is asserted, the light on the East-West road is green; when this signal is deasserted, the light on the East-West road is red.
•NScar: Indicates that a car is over the detector placed in the roadbed in front of the light on the north-south road (going North or South).
•EWcar: Indicates that a car is over the detector placed in the roadbed in front of the light on the East-West road (going East or West).
•NSgreen: The traffic light is green in the North-South direction.
•EWgreen: The traffic light is green in the East-West direction.
Finite-State Machine Assignment (Traffic Control):
We wish to add a yellow light to our traffic light example discussed in Lecture. We will do this by changing the clock to run at 0.25 Hz (a 4-second clock cycle time), which is the duration of a yellow light. To prevent the green and red lights from cycling too fast, we add a 30-second timer. The timer has a single input, called TimerReset, which restarts the timer, and a single output, called TimerSignal, which indicates that the 30-second period has expired. Both green and yellow lights cannot be lit at the same time in any direction. Now, complete the following tasks for this improved traffic controller.
a. Identify/specify all the outputs, inputs, states (choose names for the states that are different from the names of the outputs). (5 points)
b. Write down the next-state function and output function tables. (8 points)
c. Draw the graphical representation for the finite-state machine. (7 points)