From e8fc1d013a5fa31aada5093fd9e12f4753a31b76 Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Fri, 10 Nov 2023 01:19:01 -0600 Subject: rtl/gfx: replace duplicated pipes with gfx_pipes --- rtl/gfx/gfx_fp_inv.sv | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'rtl/gfx/gfx_fp_inv.sv') diff --git a/rtl/gfx/gfx_fp_inv.sv b/rtl/gfx/gfx_fp_inv.sv index 41b3ad5..33f7bf8 100644 --- a/rtl/gfx/gfx_fp_inv.sv +++ b/rtl/gfx/gfx_fp_inv.sv @@ -18,19 +18,16 @@ module gfx_fp_inv .* ); `else - fp pipeline[`FP_INV_STAGES - 1]; + fp a_pop; - integer i; + assign q = $c("taller::fp_inv(", a_pop, ")"); - always_ff @(posedge clk) - if (!stall) begin - pipeline[0] <= a; - - for (i = 1; i < `FP_INV_STAGES - 1; ++i) - pipeline[i] <= pipeline[i - 1]; - - q <= $c("taller::fp_inv(", pipeline[`FP_INV_STAGES - 2], ")"); - end + gfx_pipes #(.WIDTH($bits(a)), .DEPTH(`FP_INV_STAGES)) a_pipes + ( + .in(a), + .out(a_pop), + .* + ); `endif endmodule -- cgit v1.2.3