An 8-LED visual effects controller with multiple animated patterns, speed control, and pause functionality implemented in Verilog for ASIC fabrication.
This project creates an engaging LED display controller that generates 8 different animated lighting patterns. From classic Knight Rider effects to random sparkle patterns, it provides a versatile platform for visual displays, status indicators, or decorative lighting applications.
The LED Pattern Generator operates on a 5MHz system clock and uses a built-in clock divider to create two speed modes:
The system uses a 5MHz input clock that gets divided internally:
This clock division provides precise timing control for smooth pattern animations while maintaining synchronization across all LED effects.
pat_sel
) selects from 8 different patternsPattern | Description | Visual Effect |
---|---|---|
Knight Rider | Two LEDs start at opposite ends, meet in middle, return | Symmetric converging/diverging LED effect |
Walking Pairs | Adjacent LED pair walks left-to-right and back | Bidirectional pair movement with direction reversal |
Expand/Contract | LEDs expand from center outward, then contract | Breathing effect from middle |
Blink All | All 8 LEDs flash simultaneously | Simple synchronized blinking |
Alternate | Checkerboard pattern alternates | 10101010 ↔ 01010101 pattern |
Marquee | 3-LED group rotates around the strip | Theater marquee chasing lights |
Random Sparkle | Pseudo-random twinkling using LFSR | Unpredictable sparkle effects |
All Off | All LEDs disabled | System standby mode |
rst_n
(active low reset) to initialize the systemena
high to activate pattern generationpat_sel[2:0]
to choose desired pattern (000-111)speed_sel
for fast (4Hz) or slow (1Hz) operationpause
to freeze current pattern stateInput | Pin | Function | Values |
---|---|---|---|
ui_in[2:0] |
Pattern Select | Choose active pattern | 000-111 |
ui_in[3] |
Speed Select | Control update rate | 0=Fast (4Hz), 1=Slow (1Hz) |
ui_in[4] |
Pause | Freeze pattern | 0=Run, 1=Pause |
ui_in[5] |
Enable | Module enable/disable | 0=Disable, 1=Enable |
ui_in[7:6] |
Unused | Reserved for future use | Don't care |
The 8-bit uo_out[7:0]
directly drives the LED array. Each bit corresponds to one LED:
uo_out[0]
→ LED 0 (leftmost)uo_out[7]
→ LED 7 (rightmost)# | Input | Output | Bidirectional |
---|---|---|---|
0 | pat_sel[0] | led_out[0] | |
1 | pat_sel[1] | led_out[1] | |
2 | pat_sel[2] | led_out[2] | |
3 | speed_sel | led_out[3] | |
4 | pause | led_out[4] | |
5 | en | led_out[5] | |
6 | led_out[6] | ||
7 | led_out[7] |