-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdesynk_tb.sv
74 lines (50 loc) · 1.06 KB
/
desynk_tb.sv
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
`timescale 1ns/100ps
module desynk_tb;
reg rst;
reg clk;
reg led1;
parameter CLOCK_HALF_PERIOD = 1;
initial begin
clk = 0;
#CLOCK_HALF_PERIOD;
forever clk = #(CLOCK_HALF_PERIOD) ~clk;
end
initial begin
string filename;
// This is the +vcd=desynk_tb.vcd on the command line
if (!$value$plusargs("vcd=%s", filename))
filename = "default.vcd";
$dumpfile(filename);
$dumpvars(0, desynk_tb);
rst <= 1;
#4;
rst <= 0;
#40;
$finish;
end
wire target_clk;
dummy_target_clk #(
) TARGET (
.clk(target_clk),
.rst(rst),
.soft_reset(target_reset),
.power(target_power),
.throttle(target_throttle),
.ready(target_ready),
.success(target_success)
);
desynk #(
/*
* Parameters
*/
) DUT (
.clk(clk),
.io_reset(rst),
.io_target_clk(target_clk),
.io_target_reset(target_reset),
.io_target_power(target_power),
.io_target_throttle(target_throttle),
.io_target_ready(target_ready),
.io_target_success(target_success)
);
endmodule