summaryrefslogtreecommitdiff
path: root/rtl/legacy_gfx/gfx_fp_add.sv
blob: 0b3058a48212dd3e9eeb0bc99dae43747e290a57 (plain)
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_add
(
	input  logic clk,

	input  fp    a,
	             b,
	input  logic stall,

	output fp    q
);

`ifndef VERILATOR
	ip_fp_add ip_add
	(
		.en(!stall),
		.areset(0),
		.*
	);
`else
	fp a_pop, b_pop;

	assign q = $c("taller::fp_add(", a_pop, ", ", b_pop, ")");

	gfx_pipes #(.WIDTH($bits(a)), .DEPTH(`FP_ADD_STAGES)) a_pipes
	(
		.in(a),
		.out(a_pop),
		.*
	);

	gfx_pipes #(.WIDTH($bits(b)), .DEPTH(`FP_ADD_STAGES)) b_pipes
	(
		.in(b),
		.out(b_pop),
		.*
	);
`endif

endmodule