Lab 4 Combinational Logic Blocks


1. Think about how many states the two-way traffic lights may have for each cycle. The green light on one side truns yellow and then turns red before the other light changes to green from red.



Draw the truth table for all the states in one cycle of the traffic light change. Simplify the logic equations for each light using the K map. Design the Verilog model and the testbench, show the simulation results in Vivado. Use 6 leds on your Basys 3 board to implement the design. Show the demo video for credits. (50 points)

2. While the first problem cycles through all states with the same durations, during rush hours, the busy road has a longer duration for the green light than the red light. Use a switch to trigger the rush hour mode, which keeps one of the green lights ON for double the duration compared to the other road. Show the code, code explanation, and demo video in your report. ( 50 points)