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
|
`include "gfx/gfx_defs.sv"
module gfx_dot
(
input logic clk,
input logic stall_mul,
stall_fold,
feedback,
feedback_last,
input vec4 a,
b,
output fp q
);
vec4 products_fold, products_mul;
gfx_fold fold
(
.vec(products_fold),
.stall(stall_fold),
.*
);
genvar i;
generate
for (i = 0; i < `FLOATS_PER_VEC; ++i) begin: entries
gfx_fp_mul entry_i
(
.a(a[i]),
.b(b[i]),
.q(products_mul[i]),
.stall(stall_mul),
.*
);
gfx_skid_buf #(.WIDTH($bits(fp))) skid_i
(
.in(products_mul[i]),
.out(products_fold[i]),
.stall(stall_mul),
.*
);
end
endgenerate
endmodule
|