Limited Offer Get 25% off — use code BESTW25
No AI No Plagiarism On-Time Delivery Free Revisions
Claim Now

You need to design a traffic light controller for an intersection between a Main Road and a Side Street shown in the figure below. Both the Main Road and Side Street have a red, yellow, and green signal light. The Main Road typically carries more traffic than the side street, but at peak times the side street has enough traffic that the traffic lights must adjust their timing.

SCHOOL OF ELECTRICAL ENGINEERING & TELECOMMUNICATIONS

ELEC2141 – DIGITAL CIRCUIT DESIGN ASSIGNMENT 2

DUE DATE: 30th April 2019, 11:55 PM

Your assignment solutions are to be submitted in pdf format on Moodle. Combine all scanned copies of your handwritten work and electronic documents into one pdf file for the submission.

In your submission file include a scanned copy of a completed and signed assignment submission form as the front page.

Use Xilinx ISE (or any other appropriate CAD tool) to simulate and verify your design. Attach all design and simulation materials such as schematics, HDL code, simulation outputs and testing fixtures.       

Traffic Light Controller

You need to design a traffic light controller for an intersection between a Main Road and a Side Street shown in the figure below. Both the Main Road and Side Street have a red, yellow, and green signal light. The Main Road typically carries more traffic than the side street, but at peak times the side street has enough traffic that the traffic lights must adjust their timing.

 

The traffic light controller works as follows:

  1. The traffic light uses sensors at the intersection of the Side Street (ST) with the Main Road (MD) to sense the presence of cars.
  2. The traffic light controller makes use of three timers: a 60 seconds timer (T60), a 30 seconds timer (T30), and a 10 seconds timer (T10). Once a trigger signal is applied to a timer, the timer output is zero and becomes 1 after the programmed time period. For example, upon reset, the T30 timer output is ‘0’ and will become ‘1’ after 30s have elapsed and stays ‘1’ until reset by the controller.
  3. Pedestrians can use the intersection by pressing buttons. Pedestrians will need to cross MD only since crossing the side road is assured most of the time.
  4. MD lights remain green as long as there are no cars triggering the ST sensors or pedestrians the crossing button.
  5. When MD lights have been green for a minimum of 60 seconds, a car on ST may cause MD lights to cycle through yellow to red states.
  6. Meanwhile, ST lights will turn green and remain green for a minimum of 30 seconds. Further application of ST sensors within the 30 seconds will enable ST to remain green for a maximum of 60 seconds.
  7. ST lights will cycle through yellow and red states and MD lights will then turn green.
  8. The lights stay yellow for 10 seconds.
  9. In the default state, MD lights show GREEN and ST lights show RED.

 

The controller inputs include:

  • clk: System clock
  • reset: System asynchronous reset
  • car: A car in ST wants to cross MD
  • ped: A pedestrian wants to cross MD
  • T60: A sixty second timer signal
  • T30: A thirty-second timer signal
  • T10: A ten-second timer signal The controller outputs include:
  • trigger: Reset all timers
  • RM: MD red light enable
  • YM: MD yellow light enable
  • GM: MD green light enable
  • RS: ST red light enable
  • YS: ST yellow light enable
  • GS: ST green light enable

 

Transform the traffic light controller word description into a finite-state machine (FSM). Decide which features are implemented by the FSM and which features by combinational logic.

  1. Draw a state diagram for the FSM.
  2. Implement the FSM using D, T and JK flip-flops.
  3. Verify your D flip-flop implementation.

Write Verilog HDL models for your FSM and the D flip-flop sequential circuit that you implemented.

  1. Make sure you have adequate and clear comments in your code.
  2. Write a testbench to verify the operation of the FSM.
  3. The testbench should try different scenarios for cars or pedestrians attempting to cross MD or ST at different traffic loads.
  4. Simulate the behaviour of the FSM using the testbench you developed.

 

Hint: Use a separate counter (incremented once each clock cycle) to keep track of the number of seconds that have elapsed.

 

 

 

Plagiarism Free Assignment Help

Expert Help With This Assignment — On Your Terms

Native UK, USA & Australia writers Deadline from 3 hours 100% Plagiarism-Free — Turnitin included Unlimited free revisions Free to submit — compare quotes
Scroll to Top