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
|
module gfx_fixed_dotadd
(
input logic clk,
input gfx::fixed a0,
b0,
a1,
b1,
c,
input logic stall,
output gfx::fixed q
);
import gfx::*;
fixed q0, a1_hold, b1_hold;
gfx_fixed_muladd muladd_0
(
.clk,
.a(a0),
.b(b0),
.c,
.q(q0),
.stall
);
gfx_pipes #(.WIDTH($bits(fixed)), .DEPTH(FIXED_MULADD_DEPTH)) a_pipes
(
.clk,
.in(a1),
.out(a1_hold),
.stall
);
gfx_pipes #(.WIDTH($bits(fixed)), .DEPTH(FIXED_MULADD_DEPTH)) b_pipes
(
.clk,
.in(b1),
.out(b1_hold),
.stall
);
gfx_fixed_muladd muladd_1
(
.clk,
.a(a1_hold),
.b(b1_hold),
.c(q0),
.q,
.stall
);
endmodule
|