Answered step by step
Verified Expert Solution
Link Copied!

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 2 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 4 and is nearing Switch 3, moving counterclockwise. Train B, also moving counterclockwise is approaching Sensor 2. Since Train B is about to enter the common track segment (Track 2), Train A must be stopped when it reaches Sensor 1 and wait until Train B has passed Sensor 3, indicating it is no longer on the shared portion of the track. At that point, Train A will be allowed to proceed and Switch 2 will ensure Train A proceeds to the segment designated Track 1. The controller is a finite state machine that uses the sensors (S1 through S5) 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: DA1, DA0 for Train A, and DB1, DB0 for train B. When 00 the train is stopped. When 01, 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Reliability Engineering Designing And Operating Resilient Database Systems

Authors: Laine Campbell, Charity Majors

1st Edition

978-1491925942

More Books

Students also viewed these Databases questions

Question

Define self-esteem and discuss its impact on your life.

Answered: 1 week ago

Question

Discuss how selfesteem is developed.

Answered: 1 week ago