forked from jbosset/innovation_project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtb_throttle.v
61 lines (51 loc) · 1.07 KB
/
tb_throttle.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
module tb_throttle;
reg CLK_50;
reg reset;
reg pb_freq_up;
reg pb_freq_dn;
wire slow_clk;
wire freq_num;
throttle throttle_DUT(
.CLK_50(CLK_50),
.reset(reset),
.pb_freq_up(pb_freq_up),
.pb_freq_dn(pb_freq_dn),
.slow_clk(slow_clk),
.freq_num(freq_num)
);
initial begin
CLK_50 = 0;
forever #10 CLK_50 = ~CLK_50;
end
initial begin
reset = 1;
pb_freq_up = 0;
pb_freq_dn = 0;
#40 reset = 0;
#60000 pb_freq_up = 1;
#200 pb_freq_up = 0;
#60000 pb_freq_up = 1;
#200 pb_freq_up = 0;
#60000 pb_freq_up = 1;
#200 pb_freq_up = 0;
#60000 pb_freq_up = 1;
#200 pb_freq_up = 0;
#60000 pb_freq_up = 1;
#200 pb_freq_up = 0;
#60000 pb_freq_up = 1;
#200 pb_freq_up = 0;
#60000 pb_freq_dn = 1;
#200 pb_freq_dn = 0;
#60000 pb_freq_dn = 1;
#200 pb_freq_dn = 0;
#60000 pb_freq_dn = 1;
#200 pb_freq_dn = 0;
#60000 pb_freq_dn = 1;
#200 pb_freq_dn = 0;
#60000 pb_freq_dn = 1;
#200 pb_freq_dn = 0;
#60000 pb_freq_dn = 1;
#200 pb_freq_dn = 0;
$stop;
end
endmodule