-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathled_driver_tb.v
More file actions
83 lines (75 loc) · 1.73 KB
/
led_driver_tb.v
File metadata and controls
83 lines (75 loc) · 1.73 KB
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
75
76
77
78
79
80
81
82
83
/*
* This file is part of LEDMatrixDriver.
* Copyright 2018 Mario Gomez <mario.gomez@teubi.co>
*
* LEDMatrixDriver is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* LEDMatrixDriver is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with LEDMatrixDriver. If not, see <http://www.gnu.org/licenses/>.
*/
`timescale 1ms / 1ms
module led_driver_tb(); // BEGIN: Test bench for LED Matrix Driver
// Clock generation
reg CLK_I = 0;
always #10 CLK_I = ~CLK_I;
// Pin connections
wire
R0,
G0,
B0,
R1,
G1,
B1,
RA,
RB,
RC,
RD,
CLK_O,
LATCH,
OE,
LED1,
LED2,
LED3,
LED4,
LED5,
LED6,
LED7,
LED8;
// Module initialization
led_driver #(.BASE_FREQ(12000000),.TARGET_FREQ(6000000)) DUT(
.CLK_I(CLK_I),
.R0(R0),
.G0(G0),
.B0(B0),
.R1(R1),
.G1(G1),
.B1(B1),
.RA(RA),
.RB(RB),
.RC(RC),
.RD(RD),
.CLK_O(CLK_O),
.LATCH(LATCH),
.OE(OE),
.LED1(LED1),
.LED2(LED2),
.LED3(LED3),
.LED4(LED4),
.LED5(LED5),
.LED6(LED6),
.LED7(LED7),
.LED8(LED8)
);
// Generate output for the wave analyzer
initial begin
$dumpfile("led_driver_tb.vcd");
$dumpvars(0, led_driver_tb);
# 400000 $finish;
end
endmodule // END: Test bench for LED Matrix Driver