summaryrefslogtreecommitdiff
path: root/rtl/gfx/gfx_fp_mul.sv
diff options
context:
space:
mode:
Diffstat (limited to 'rtl/gfx/gfx_fp_mul.sv')
-rw-r--r--rtl/gfx/gfx_fp_mul.sv27
1 files changed, 14 insertions, 13 deletions
diff --git a/rtl/gfx/gfx_fp_mul.sv b/rtl/gfx/gfx_fp_mul.sv
index eb7d7d7..7ff3c02 100644
--- a/rtl/gfx/gfx_fp_mul.sv
+++ b/rtl/gfx/gfx_fp_mul.sv
@@ -19,22 +19,23 @@ module gfx_fp_mul
.*
);
`else
- fp a_pipeline[`FP_MUL_STAGES - 1], b_pipeline[`FP_MUL_STAGES - 1];
+ fp a_pop, b_pop;
- integer i;
+ assign q = $c("taller::fp_mul(", a_pop, ", ", b_pop, ")");
- always_ff @(posedge clk)
- if (!stall) begin
- a_pipeline[0] <= a;
- b_pipeline[0] <= b;
-
- for (i = 1; i < `FP_MUL_STAGES - 1; ++i) begin
- a_pipeline[i] <= a_pipeline[i - 1];
- b_pipeline[i] <= b_pipeline[i - 1];
- end
+ gfx_pipes #(.WIDTH($bits(a)), .DEPTH(`FP_MUL_STAGES)) a_pipes
+ (
+ .in(a),
+ .out(a_pop),
+ .*
+ );
- q <= $c("taller::fp_mul(", a_pipeline[`FP_MUL_STAGES - 2], ", ", b_pipeline[`FP_MUL_STAGES - 2], ")");
- end
+ gfx_pipes #(.WIDTH($bits(b)), .DEPTH(`FP_MUL_STAGES)) b_pipes
+ (
+ .in(b),
+ .out(b_pop),
+ .*
+ );
`endif
endmodule