| 1 |
module top( |
| 2 |
input r_in, |
| 3 |
input g_in, |
| 4 |
input b_in, |
| 5 |
output r_led, |
| 6 |
output g_led, |
| 7 |
output b_led); |
| 8 |
|
| 9 |
wire curren; |
| 10 |
wire rgbleden; |
| 11 |
|
| 12 |
SB_RGBA_DRV RGBA_DRIVER ( |
| 13 |
.CURREN(curren), |
| 14 |
.RGBLEDEN(rgbleden), |
| 15 |
.RGB0PWM(r_in), |
| 16 |
.RGB1PWM(r_in), |
| 17 |
.RGB2PWM(r_in), |
| 18 |
.RGB0(r_led), |
| 19 |
.RGB1(g_led), |
| 20 |
.RGB2(b_led) |
| 21 |
); |
| 22 |
|
| 23 |
defparam RGBA_DRIVER.CURRENT_MODE = "0b0"; |
| 24 |
defparam RGBA_DRIVER.RGB0_CURRENT = "0b000011"; |
| 25 |
defparam RGBA_DRIVER.RGB1_CURRENT = "0b001111"; |
| 26 |
defparam RGBA_DRIVER.RGB2_CURRENT = "0b111111"; |
| 27 |
|
| 28 |
assign curren = 1'b1; |
| 29 |
assign rgbleden = 1'b1; |
| 30 |
|
| 31 |
|
| 32 |
endmodule |