Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 2 (60) Improved trafic lights: Below is the block diagram of factored traffic lights: the ok signal indicates that the rest of the circuit
Problem 2 (60) Improved trafic lights: Below is the block diagram of factored traffic lights: the ok signal indicates that the rest of the circuit is finished processing the first request. eastwestwaiting leftane Master FSM Combiner lights 009 The other relationships in the block diagram are master-slave relationships. The Master FSM acts as a master to Timeri, giving it commands, and Timer 1 acts as a slave, receiving the commands and carrying them out. In a similar manner the combiner is the master of the Light FSM which in turn is the master of Timer2. The light FSM sequences the traffic lights from green to red and then back to green. It receives requests from the combiner on the on signal and responds to these Light FSM Timer s Timer2 This machine has two inputs eastwestwaiting that indicate that cars are waiting on the east-west road (ew) And input leftlane that cars are waiting in a left-turn lane (lt). The machine has nine output lines that drive three sets of three lights each one set each for the north-south road, the east-west road, and the left-turn lane (from the northsouth road). At the default state north-south road light will be green for the north-south road. When a car is detected on the east-west road or the left-turn lane, we wish to switch the lights so that the east-west or left- turn light is green (with priority going to the left-turn lane). A master FSM accepts the inputs and decides which direction should be green dir. To time when it is time to force the lights back to north-south, it uses a timer, Timern. It also receives a signal ok back from the combiner that indicates that the sequence from the last direction change is complete and the direction is allowed to change again. requests with the done signal. It also generates the 3-bit light signal which indicates which light in the current direction should be illuminated. When the on signal is set high, it requests that the light signal switch the light signal to green. When this is completed, and the minimum green time interval has elapsed, the light FSM responds by asserting done. When the on signal is set low, it requests that the light FSM sequence the light signal to red - via a yellow state and observing the required time intervals. When this is completed done is set low. The light FSM uses its own timer (Timer2) to count out the time intervals required for light sequencing. For the interface between the light FSM and the combiner, the done signal provides flow control. The combiner can only toggle on high when done is low and can only toggle on low when done is high. After toggling on, it must wait for done to switch to the same state as on before switching on again. Once the lights are switched to east-west or left-turn, we leave them switched until either no more cars are detected in that direction, or until a timer expires. The lights then return to green in the north-south direction. The modules here illustrate two types of relationships. The master FSM and combiner modules form a pipeline. Requests flow down this pipeline from left to right. A request is input to the Master FSM in the form of a transition on the eastwestwaiting and leftlane inputs. The Master processes this request and in turn issues a request to the combiner on the dir lines. The combiner in turn processes the request and outputs the appropriate sequence on the lights output in response.. The ok signal here is an example of a flow control signal. It provides backpressure on the master FSM to prevent it from getting ahead of the combiner and light FSMs. The master FSM makes a request and it is not allowed to make another request until A) (10) Draw the state diagram for the master FSM (The names of the state) Ns Lt EW Each time the lights are switched the lights in the active direction go from green to yellow. Then, after a time interval, they are switched to red. B) (10) Draw the state diagram for light fsm (name the states as yesil, sari, kirmizi) C) (5) state your encoding for each fsm D) (35)implement the all the necassay modules in verilog. Each module should be in its own file. Then, after a second time interval, the lights in the active direction are switched to green. The lights are not allowed to change again until a third time Page 3 interval. Problem 2 (60) Improved trafic lights: Below is the block diagram of factored traffic lights: the ok signal indicates that the rest of the circuit is finished processing the first request. eastwestwaiting leftane Master FSM Combiner lights 009 The other relationships in the block diagram are master-slave relationships. The Master FSM acts as a master to Timeri, giving it commands, and Timer 1 acts as a slave, receiving the commands and carrying them out. In a similar manner the combiner is the master of the Light FSM which in turn is the master of Timer2. The light FSM sequences the traffic lights from green to red and then back to green. It receives requests from the combiner on the on signal and responds to these Light FSM Timer s Timer2 This machine has two inputs eastwestwaiting that indicate that cars are waiting on the east-west road (ew) And input leftlane that cars are waiting in a left-turn lane (lt). The machine has nine output lines that drive three sets of three lights each one set each for the north-south road, the east-west road, and the left-turn lane (from the northsouth road). At the default state north-south road light will be green for the north-south road. When a car is detected on the east-west road or the left-turn lane, we wish to switch the lights so that the east-west or left- turn light is green (with priority going to the left-turn lane). A master FSM accepts the inputs and decides which direction should be green dir. To time when it is time to force the lights back to north-south, it uses a timer, Timern. It also receives a signal ok back from the combiner that indicates that the sequence from the last direction change is complete and the direction is allowed to change again. requests with the done signal. It also generates the 3-bit light signal which indicates which light in the current direction should be illuminated. When the on signal is set high, it requests that the light signal switch the light signal to green. When this is completed, and the minimum green time interval has elapsed, the light FSM responds by asserting done. When the on signal is set low, it requests that the light FSM sequence the light signal to red - via a yellow state and observing the required time intervals. When this is completed done is set low. The light FSM uses its own timer (Timer2) to count out the time intervals required for light sequencing. For the interface between the light FSM and the combiner, the done signal provides flow control. The combiner can only toggle on high when done is low and can only toggle on low when done is high. After toggling on, it must wait for done to switch to the same state as on before switching on again. Once the lights are switched to east-west or left-turn, we leave them switched until either no more cars are detected in that direction, or until a timer expires. The lights then return to green in the north-south direction. The modules here illustrate two types of relationships. The master FSM and combiner modules form a pipeline. Requests flow down this pipeline from left to right. A request is input to the Master FSM in the form of a transition on the eastwestwaiting and leftlane inputs. The Master processes this request and in turn issues a request to the combiner on the dir lines. The combiner in turn processes the request and outputs the appropriate sequence on the lights output in response.. The ok signal here is an example of a flow control signal. It provides backpressure on the master FSM to prevent it from getting ahead of the combiner and light FSMs. The master FSM makes a request and it is not allowed to make another request until A) (10) Draw the state diagram for the master FSM (The names of the state) Ns Lt EW Each time the lights are switched the lights in the active direction go from green to yellow. Then, after a time interval, they are switched to red. B) (10) Draw the state diagram for light fsm (name the states as yesil, sari, kirmizi) C) (5) state your encoding for each fsm D) (35)implement the all the necassay modules in verilog. Each module should be in its own file. Then, after a second time interval, the lights in the active direction are switched to green. The lights are not allowed to change again until a third time Page 3 interval
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started