The LED controller is implemented in LED_controller.v
The WS2812 LEDs are driven by a single data line using a timing code: WS2812.pdf
The code consists of different patterns for 1s and 0s. After 24bit (8*3 brightness levels) are received by an LED, it passes on all subsequent codes to the next LED in the chain. Once a reset code (gap of >50us) is sent, the first LED will receive data again, repeating the cycle.
We therefore want to send 24*8 codes, then wait a bit, and repeat that.
Here's a quick description of the state machine used to generate the data driving the 8 LEDs:
...