-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_spidergon.v
65 lines (43 loc) · 1.21 KB
/
test_spidergon.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
module test_spidergon
#(
`ifdef FORMAL
parameter NUM_OF_NODES=8,
parameter FLIT_DATA_WIDTH=10,
parameter NODE_BUFFER_WIDTH=2*FLIT_DATA_WIDTH, // a single vc buffer can hold 1 flit at one time
`else
parameter NUM_OF_NODES=8,
parameter FLIT_DATA_WIDTH=16,
parameter NODE_BUFFER_WIDTH=2*FLIT_DATA_WIDTH, // a single vc buffer can hold 2 flits at one time
`endif
parameter NUM_OF_VIRTUAL_CHANNELS=2 // 2 vc for each input ports of each node
);
reg clk, reset;
// Instantiate design under test
NoC
#(
.NUM_OF_NODES(NUM_OF_NODES),
.FLIT_DATA_WIDTH(FLIT_DATA_WIDTH),
.NODE_BUFFER_WIDTH(NODE_BUFFER_WIDTH),
.NUM_OF_VIRTUAL_CHANNELS(NUM_OF_VIRTUAL_CHANNELS)
)
noc(.clk(clk), .reset(reset));
initial begin
// Dump waves
$dumpfile("spidergon.vcd");
$dumpvars(0, test_spidergon);
clk = 0;
reset = 0;
end
always #5 clk = !clk;
initial begin
@(posedge clk);
@(posedge clk);
$display("Reset flop.");
reset = 1;
@(posedge clk);
@(posedge clk); // reset is extended for one more clock cycle
reset = 0;
@(posedge clk);
#300 $finish;
end
endmodule