summaryrefslogtreecommitdiff
path: root/rtl/gfx/gfx_fp_inv.sv
blob: 33f7bf8b2e6dd52eef56eb1efc9841bac5892ce5 (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
`include "gfx/gfx_defs.sv"

module gfx_fp_inv
(
	input  logic clk,

	input  fp    a,
	input  logic stall,

	output fp    q
);

`ifndef VERILATOR
	ip_fp_inv ip_inv
	(
		.en(!stall),
		.areset(0),
		.*
	);
`else
	fp a_pop;

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

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

endmodule