Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The track layout of a small electric train system is shown in the figure below. Two trains run on the tracks. Train A travels counterclockwise
The track layout of a small electric train system is shown in the figure below. Two trains run on the tracks. Train A travels counterclockwise on the outer track while train B travels counterclockwise on the inner track. The layout is divided into four segments. To avoid collisions, only one train at a time can be present on a given track segment. In this case, it means ensuring that only one train is on the shared track segment, labeled Track below. Each track segment has sensors at the entry and exit points of the segment to indicate a train is about to pass the sensor For example, assume Train A has passed Sensor and is nearing Switch moving counterclockwise. Train B also moving counterclockwise is approaching Sensor Since Train B is about to enter the common track segment Track Train A must be stopped when it reaches Sensor and wait until Train B has passed Sensor indicating it is no longer on the shared portion of the track. At that point, Train A will be allowed to proceed and Switch will ensure Train A proceeds to the segment designated Track The controller is a finite state machine that uses the sensors S through S as inputs. The outputs of the controller control the direction of the trains and the position of the switches. Note that the controller does not control the speed of the trains and it must function independently of the speed of the trains. We ensure the clock rate is fast enough relative to the trains speeds to halt a train before it proceeds past a sensor Moreover a trains length does not exceed the length of a segment of track. Note that the sensors are not asserted for only a single clock. A trains direction is controlled by two bits: DA DA for Train A and DB DB for train B When the train is stopped. When the train goes forward trains, we'll call A and B run on the tracks, hopefully without colliding.
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