-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework code in SBLED so LED information is in the platform #20
Comments
Important information seems to be....
|
It's slightly more complicated than that because of how the |
Your doing the remapping between the SB_LEDDA_IP PWM outputs and the SB_RGBA_DRV inputs if I understand correctly? |
It's remapping both the |
Something like; rgba_drv_pins = {
'pin 1': 'RGB0',
'pin 2': 'RGB1',
'pin 3': 'RGB2',
}
r_led = platform.request('user_led_r')
self.comb += [
If(csr.storage[RED], platform.get_pin(rgba_drv_pins[r_led.pin]).eq(ledda_ip.pwmout0), ...)
]
g_led = platform.request('user_led_g')
self.comb += [
platform.get_pin(rgba_drv_pins[g_led.pin]).eq(ledda_ip.pwmout1),
]
b_led = platform.request('user_led_b')
self.comb += [
platform.get_pin(rgba_drv_pins[b_led.pin]).eq(ledda_ip.pwmout1),
] |
Currently the SBLED has the following horrible hack;
foboot/hw/foboot-bitstream.py
Lines 343 to 360 in a4a3dad
What should be done is that the "platform" should define the RGB and rgb0/rgb1/rgb2 relationship and the SBLED should just ask which one is the red/green/blue.
The text was updated successfully, but these errors were encountered: