We have an intersection with thru-street and cross-street. The thru-street will have a continuous green and cross-street will have a continuous red until a car stops for the red light on the cross-street. Then, the thru-street will sequence to yellow and then red; the cross-street will sequence green, yellow, then red. The cross-street sensor (represented by a switch) will toggle to indicate the presence of a car. You cannot depend on its value being either false or true, only that it has been toggled.
Design the state machine to control the traffic lights. Implement the machine in HDL.