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
|
`include "gfx/gfx_defs.sv"
module gfx_fp_mul
(
input logic clk,
input fp a,
b,
input logic stall,
output fp q
);
`ifndef VERILATOR
ip_fp_mul ip_mul
(
.en(!stall),
.areset(0),
.*
);
`else
fp a_pop, b_pop;
assign q = $c("taller::fp_mul(", a_pop, ", ", b_pop, ")");
gfx_pipes #(.WIDTH($bits(a)), .DEPTH(`FP_MUL_STAGES)) a_pipes
(
.in(a),
.out(a_pop),
.*
);
gfx_pipes #(.WIDTH($bits(b)), .DEPTH(`FP_MUL_STAGES)) b_pipes
(
.in(b),
.out(b_pop),
.*
);
`endif
endmodule
|