-
Notifications
You must be signed in to change notification settings - Fork 59
/
pe.v
56 lines (51 loc) · 1.04 KB
/
pe.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
module pe(clk_noc, clk_pe, ifmap, filt, input_psum, output_psum)
input clk_noc;
input clk_pe;
input ifmap;
input filt;
input input_psum;
output out_psum;
reg [1:0] state;
parameter IDLE=2'b00, DATA=2'b01, MULT=2'b10, ACCU=2'b11;
I0 dual_clock_fifo(
.wr_rst_i(wr_rst_i),
.wr_clk_i(clk_noc),
.wr_en_i(wr_en_i),
.wr_data_i(),
.rd_rst_i(),
.rd_clk_i(clk_pe),
.rd_en_i(),
.rd_data_o(),
.full_o(),
.empty_o(),
);
I1 ifmap_spad(.clk(clk_pe), .addr(), .we(), .data_port());
/* psum */
I2 dual_clock_fifo(
.wr_rst_i(wr_rst_i),
.wr_clk_i(clk_noc),
.wr_en_i(wr_en_i),
.wr_data_i(),
.rd_rst_i(),
.rd_clk_i(clk_pe),
.rd_en_i(),
.rd_data_o(),
.full_o(),
.empty_o(),
);
I3 psum_spad(.clk(clk_pe), .addr(), .we(), .data_port());
/* filter kernel IO */
I4 dual_clock_fifo(
.wr_rst_i(wr_rst_i),
.wr_clk_i(clk_noc),
.wr_en_i(wr_en_i),
.wr_data_i(),
.rd_rst_i(),
.rd_clk_i(),
.rd_en_i(),
.rd_data_o(),
.full_o(),
.empty_o(),
);
I5 filt_spad(.clk(clk_pe), .addr(), .we(), .data_port());
endmodule