aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/regressions/issue0070/sb_rgba_drv.v
blob: e5a0c369200d579f69a598715d0b85eaccae8f82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
module top(
    input r_in,
    input g_in,
    input b_in,
    output r_led,
    output g_led,
    output b_led);
  
  wire curren;
  wire rgbleden;
  
  SB_RGBA_DRV RGBA_DRIVER (
    .CURREN(curren),
    .RGBLEDEN(rgbleden),
    .RGB0PWM(r_in),
    .RGB1PWM(r_in),
    .RGB2PWM(r_in),
    .RGB0(r_led),
    .RGB1(g_led),
    .RGB2(b_led)
  );

defparam RGBA_DRIVER.CURRENT_MODE = "0b0";
defparam RGBA_DRIVER.RGB0_CURRENT = "0b000011";
defparam RGBA_DRIVER.RGB1_CURRENT = "0b001111";
defparam RGBA_DRIVER.RGB2_CURRENT = "0b111111";

assign curren = 1'b1;
assign rgbleden = 1'b1;


endmodule