CDL Modules
|
Constants, types and modules for various LED drivers. More...
Constants, types and modules for various LED drivers.
Header file for the types and modules controlling LEDs, including Neopixel chains.
Data Structures | |
struct | t_led_ws2812_data |
struct | t_led_ws2812_request |
Variables | |
constant bit[16] | led_seven_seg_hex_a = 16b_1101011111101101 |
constant bit[16] | led_seven_seg_hex_b = 16b_0010011110011111 |
constant bit[16] | led_seven_seg_hex_c = 16b_0010111111111011 |
constant bit[16] | led_seven_seg_hex_d = 16b_0111101101101101 |
constant bit[16] | led_seven_seg_hex_e = 16b_1111110101000101 |
constant bit[16] | led_seven_seg_hex_f = 16b_1101111101110001 |
constant bit[16] | led_seven_seg_hex_g = 16b_1110111101111100 |
struct t_led_ws2812_data |
struct t_led_ws2812_request |
module led_seven_segment | ( | input bit | hex[4], |
output bit | leds[7] | ||
) |
[in] | hex | Hexadecimal to display on 7-segment LED |
[out] | leds | 1 for LED on, 0 for LED off, for segments a-g in bits 0-7 |
module led_ws2812_chain | ( | clock | clk, |
input bit | reset_n, | ||
input bit | divider_400ns[8], | ||
output t_led_ws2812_request | led_request, | ||
input t_led_ws2812_data | led_data, | ||
output bit | led_chain | ||
) |
clk | system clock - not the pin clock |
reset_n | async reset |
divider_400ns | clock divider value to provide for generating a pulse every 400ns based on clk |
led_request | LED data request |
led_data | LED data, for the requested led |
led_chain | Data in pin for LED chain |
constant bit [16] led_seven_seg_hex_a = 16b_1101011111101101 |
constant bit [16] led_seven_seg_hex_b = 16b_0010011110011111 |
constant bit [16] led_seven_seg_hex_c = 16b_0010111111111011 |
constant bit [16] led_seven_seg_hex_d = 16b_0111101101101101 |
constant bit [16] led_seven_seg_hex_e = 16b_1111110101000101 |
constant bit [16] led_seven_seg_hex_f = 16b_1101111101110001 |
constant bit [16] led_seven_seg_hex_g = 16b_1110111101111100 |