Question: Design a digital system that controls traffic lights. The system generates the color of the traffic light according to parameters. There is only one output

Design a digital system that controls traffic lights. The system generates the color of
the traffic light according to parameters. There is only one output of the
system, light_o, that changes its value between RED, YELLOW, and GREEN
synchronously with respect to the rising edge of the system clock input signal,
named clk_i.
The light_o signal should follow the sequence of RED YELLOW GREEN
YELLOW RED continuously when updating the color of the traffic light.
The system also incDesign a digital system that controls traffic lights. The system generates the color of the traffic light according to parameters. There is only one output of the system, light_o, that changes its value between RED, YELLOW, and GREEN synchronously with respect to the rising edge of the system clock input signal, named clk_i. The light_o signal should follow the sequence of RED YELLOW GREEN YELLOW RED continuously when updating the color of the traffic light. The system also includes an active-high reset input signal, rst_i, synchronous to the rising edge of the clk_i signal. When the rst_i signal is set to logic '1', the output resets to the RESET_COLOR state. The following parameters govern the behavior of the system: RED_DURATION, YELLOW_DURATION, and GREEN_DURATION: Represent the durations of the RED, YELLOW, and GREEN lights, respectively. These durations are defined in terms of the number of clk_i cycles. RESET_COLOR: Defines the state of light_o when the reset signal (rst_i) is asserted to logic '1'. ENABLE_YELLOW: A boolean parameter that enables or disables the YELLOW light. When set to 1, the light_o signal sequence is RED YELLOW GREEN YELLOW RED. When set to 0, the YELLOW color is removed, and the sequence becomes RED GREEN RED. The system must adhere to the following requirements: The light_o output signal should update only on the rising edge of the clk_i signal. Upon assertion of the rst_i signal, the light_o output should immediately reset to the value defined by the RESET_COLOR parameter. Implementation Requirements: Implement the system in Verilog. Develop a testbench in Verilog (or SystemVerilog) to verify the functionality of your design. The testbench should: o Generate clock and reset signals. o Monitor the light_o output and validate that the sequence and timing match the expected behavior based on the provided parameters. o Include stimulus to test the functionality with ENABLE_YELLOW set to both 1 and 0. o Test the reset functionality and ensure the system resets to RESET_COLOR.
ALSO DON'T USE AI IF YOU DON'T KNOW HOW TO SOLVE JUST DON'T TAKE THE QUESTON PLS APPRECATE T...
Design a digital system that controls traffic

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 Electrical Engineering Questions!