-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfw.v
72 lines (58 loc) · 1.16 KB
/
fw.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
/**
*
* fw.v
*
* $Id: fw.v,v 1.21 2005/10/06 20:22:42 osc0414 Exp $
*
* Top level module for the Floyd-Warshall Compute kernel
*
* Copyright (C) 2005 Uday Bondhugula
* Copyright (C) 2005 Ananth Devulapalli
*
* Please see the LICENSE file for details.
*
*/
`include "params.v"
module fw(
clk,
reset,
inD,
in_valid,
outD,
out_valid
);
input clk, reset, in_valid;
input [`L*`WIDTH-1 : 0] inD;
output [`L*`WIDTH-1 : 0] outD;
output out_valid;
wire [`L*`WIDTH-1:0] pe_connect[`B:0];
wire pe_out_valid[0:`B-1];
wire [`INSTR_WIDTH-1: 0] instr[0:`B];
wire [`INSTR_WIDTH-1: 0] instr_out;
wire [`L*`WIDTH-1:0] fw_control_dOut;
assign pe_connect[0] = fw_control_dOut;
assign instr[0] = instr_out;
assign outD = pe_connect[`B];
assign out_valid = pe_out_valid[`B-1];
fw_control fw_control_inst(
.reset(reset),
.clk(clk),
.in_valid(in_valid),
.inD(inD),
.dOut(fw_control_dOut),
.instr_out(instr_out)
);
generate
genvar i;
for (i=0; i<`B; i=i+1)
begin: pe_loop
pe #i pe_inst(.reset(reset),
.clk(clk),
.instr_in(instr[i]),
.in(pe_connect[i]),
.out(pe_connect[i+1]),
.out_valid(pe_out_valid[i]),
.instr_out(instr[i+1]));
end
endgenerate
endmodule