-
Notifications
You must be signed in to change notification settings - Fork 1
/
chip.v
74 lines (62 loc) · 1.24 KB
/
chip.v
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
module chip (
// 25MHz clock input
input clk,
// Led outputs
output [3:0] led,
// The WS2811 output
output dout
);
wire clkhigh;
// turn other leds off (active low)
assign led[3:1] = 4'b111;
assign led[0] = stepclock[0];
reg [7:0] red;
reg [7:0] green;
reg [7:0] blue;
reg [7:0] ledindex;
reg [7:0] animationcounter;
reg [7:0] stepclock;
animationclock theanimationlock
(
.clk(clkhigh),
.animationcounter(animationcounter),
.stepclock(stepclock)
);
ledcontroller thecontroller
(
.clk(clkhigh),
.mode(8'd1),
.colmode(8'd2),
.blocksize(8'd12),
.usera_red(8'd255),
.usera_green(8'd0),
.usera_blue(8'd0),
.userb_red(8'd0),
.userb_green(8'd0),
.userb_blue(8'd255),
.masterfader(8'd80),
.ledindex(ledindex),
.animationcounter(animationcounter),
.stepclock(stepclock),
.glitterrate(8'd245),
.glittervolume(8'd10),
.red(red),
.green(green),
.blue(blue)
);
ws2811 driver
(
.clk(clkhigh),
.reset(1'b0),
.address(ledindex),
.red_in(red),
.green_in(green),
.blue_in(blue),
.DO(dout)
);
pll u_pll(
.clock_in(clk),
.clock_out(clkhigh),
.locked()
);
endmodule