Thunderbird Tail Light DE10-Lite Edition
"It's like the real thing, minus the car!"
By Noah Schwartz
Fall 2021
"It's like the real thing, minus the car!"
By Noah Schwartz
Fall 2021
This is a digital logic FPGA project that utilizes the DE10-Lite FPGA board and Verilog code to recreate the distinctive lighting sequences of a 1966 Ford Thunderbird.
By utilizing the switches and buttons on the FPGA board, users can seamlessly switch between different tail light modes. The 7-segment hexadecimal display provides real-time feedback, indicating the current mode of the lights. Moreover, the onboard LEDs serve as a visual representation of the replicated light modes, adding an immersive and interactive aspect to the project.
The project was verified using GTKWave, a powerful tool for waveform analysis, to confirm the correct switching of light modes and the accurate illumination of LEDs for each mode.
This project serves as a testament to my foundational understanding of Verilog and FPGA development. Through this endeavor, I gained valuable experience in designing digital logic systems and implementing them on FPGA hardware.
This project involves user interaction through the manipulation of switches and buttons to control the light modes. There are four primary modes available: IDLE, LEFT, RIGHT, and HAZARD.
To switch between modes on the DE10-Lite board, the user can press the KEY0 and KEY1 buttons and toggle switches SW0-SW2. Here is a breakdown of the functions associated with each button and switch, as well as an explanation of each mode:
SW0: The Hazard Switch. Enabling this switch activates the HAZARD mode.
SW1: The Blinker Switch. Enabling this switch allows for the selection of both LEFT and RIGHT modes. LEFT mode is selected by default.
SW2: The Brake Switch. This switch turns on the LEDs on the left and right sides, keeping them illuminated unless the HAZARD mode is activated.
KEY0: This button serves as the reset key. Pressing it forces the system into an idle state, with all LEDs turned off.
KEY1: When SW1 is enabled, pressing this button transitions the mode from LEFT to RIGHT. Releasing the button reverts the system back to LEFT mode.
Now, let's delve into the specifics of each mode:
IDLE: In this mode, the device remains idle, with the LEDs turned off by default. SW2 can be flipped on to illuminate the LEDs.
LEFT: This mode replicates the left turning tail lights of the 1966 Ford Thunderbird. SW2 can be flipped on to illuminate the LEDs on the right side.
RIGHT: Similarly, this mode replicates the right turning tail lights of the 1966 Ford Thunderbird. SW2 can be flipped on to illuminate the LEDs on the left side.
HAZARD: Activating this mode causes the left and right side LEDs to blink simultaneously. Unlike the other modes, SW1 and SW2 do not affect HAZARD mode. Pressing the reset key transitions the system to idle mode until the button is released.
The software operates based on a clock signal and continuously monitors the status of buttons and keys on each rising edge of the clock. To control the frequency at which modes change, a clock divider was implemented in the project. This allows for precise control over the rate of mode transitions. During testing, the rate was set to approximately half a second per positive clock edge.
To facilitate the switching between LEDs and modes, case statements were incorporated into the code. This approach improves code readability and simplifies the switching process.
In order to validate the correct behavior of the LEDs based on the input signals, a testbench module was developed. GTKWave was utilized for simulating the testbench. The testbench is designed to manipulate the status of keys and switches, introducing different scenarios, and provides sufficient delay for the GTKWave simulation to generate readable results. Using GTKWave, each mode is verified by ensuring that the corresponding LEDs exhibit the expected behavior based on the inputs. For instance, in the HAZARD mode, the simulation confirms that six LEDs oscillate between on and off states. Pressing the reset key should turn off all six LEDs, and GTKWave should indicate a low signal.
By employing the testbench module and leveraging the capabilities of GTKWave, the project's functionality and correctness were effectively verified.
Join me for a live demonstration of this project! I'll showcase each and every possible light mode!