Question: [ Write Verilog code to implement the operation mechanism for two elevators based on the following conditions. DIP Switch 1 ~ 7 : Select the

[Write Verilog code to implement the operation mechanism for two elevators based on the following conditions.
DIP Switch 1~7: Select the floor to call the elevator.
Press the elevator call button switch after selecting the floor using the DIP switch.
( Reality: Implementing the functionality of determining which floor button is pressed to call the elevator.)
8 Array 7-Segment 0,4: Displays the current floor of the elevator.
8 Array 7-Segment 1,5: Displays the direction of movement (symbols like U or d).
One floor movement time is 2 seconds: 8 Array 7-Segment 2,6 will display the 2-second count.
When the elevator arrives at the destination floor, an alarm sound is played, and after 2 seconds, the LED4/ LED8 lights up to indicate that the door is open.
(* LED4/ LED8 on: Indicates the door is open. LED4/ LED8 off: Indicates the door is closed.)
( Reality: When the destination floor is reached, an announcement is made, and the door doesnt open immediately but after a brief delay.)
When the elevator door is open, if the button switch is pressed to input the destination floor, and the start button switch is pressed or not, the door will close after counting 4 seconds.
4-second count is displayed on 8 Array 7-Segment 2,6.
( Reality: After boarding the elevator, pressing the floor button and the close button will close the door, or the door will close automatically after a set time even if the close button is not pressed.)
The elevator starts moving 2 seconds after the door closes. These 2 seconds are also displayed on 8 Array 7-Segment 2,6.
( Reality: The elevator does not start moving immediately after the door closes but waits for a short period before moving.)
One floor movement time is 2 seconds, which is displayed on 8 Array 7-Segment 2,6.
8 Array 7-Segment 1,5 displays the direction of movement (symbols like U or d).
When the destination floor is reached, an alarm sound is played, and after 2 seconds, the door opens.
( Reality: When the destination floor is reached, an announcement is made, and the door doesnt open immediately but after a brief delay.)
When the door is open, if no button is pressed and 4 seconds pass, the door closes. Since no destination floor was entered, the elevator does not move.
( Reality: The elevator stays idle at the current floor if no boarding occurs or no button is pressed for another floor.)
When in the "elevator idle" state as described above, if the elevator is called from another floor, the elevator moves to that floor without delay.
If called from the same floor, the door reopens without delay, and the 4-second count restarts.
( Reality: If the elevator is idle and called from another floor, it moves to that floor without any delay. Additionally, if the elevator is idle and a button is pressed on the same floor, the door reopens without delay.)
If the door is open and the elevator is called from another floor, the door will close automatically after a 4-second count, then after waiting for 2 seconds, the elevator moves to the called floor.
If called from the same floor, the 4-second count restarts.
( Reality: If the door is open and the elevator is called from another floor, the door closes automatically after a set time, and the elevator moves after a brief wait. Additionally, if the door is open and a button is pressed on the same floor, the open time is extended.)
Assume there are two elevators: Elevator 1 and Elevator 2.
Only one elevator can be called at a time.
If both elevators are stationary: The elevator closest to the called floor will be selected. If the distance to the called floor is the same for both, Elevator 1 will be selected.
If one elevator is moving: The stationary elevator will be called.
If both elevators are moving: Considering factors such as door open time, departure and arrival wait times (2 seconds each), and floor-to-floor travel time, the elevator that can arrive first will be called.
If implementing only one elevator is possible, demonstrate the operation of one elevator. If implementing two elevators:
If one elevator experiences an issue and stops suddenly while both are moving, the other elevator should continue operating.
In this case, display a message on the text LCD indicating which elevator is out of service. For example:
"EV1 out of service. Please use EV2" or"EV2 out of service. Please use EV1."
Two emergency switches can be used to handle such scenarios.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!