diff options
| author | Alejandro Soto <alejandro@34project.org> | 2023-11-05 22:54:19 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2023-11-10 01:43:02 -0600 |
| commit | d5783a6ebde5d38fe72dd19293d9144827c35c56 (patch) | |
| tree | e1f26ec2c89db0c5a206b97dbbf3a693c2876d6e /rtl/gfx/gfx_fixed_fma_dot.sv | |
| parent | 5c982f38139cd1b0c5b590f67e99b1bcc1a32c9b (diff) | |
rtl/gfx: add gfx_pipes
Diffstat (limited to '')
| -rw-r--r-- | rtl/gfx/gfx_fixed_fma_dot.sv | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/rtl/gfx/gfx_fixed_fma_dot.sv b/rtl/gfx/gfx_fixed_fma_dot.sv index 2831d08..c19b49e 100644 --- a/rtl/gfx/gfx_fixed_fma_dot.sv +++ b/rtl/gfx/gfx_fixed_fma_dot.sv @@ -14,7 +14,7 @@ module gfx_fixed_fma_dot output fixed q ); - fixed q0, a1_hold[`FIXED_FMA_STAGES], b1_hold[`FIXED_FMA_STAGES]; + fixed q0, a1_hold, b1_hold; gfx_fixed_fma fma0 ( @@ -24,25 +24,26 @@ module gfx_fixed_fma_dot .* ); - gfx_fixed_fma fma1 + gfx_pipes #(.WIDTH($bits(fixed)), .DEPTH(`FIXED_FMA_STAGES)) a_pipes ( - .a(a1_hold[`FIXED_FMA_STAGES - 1]), - .b(b1_hold[`FIXED_FMA_STAGES - 1]), - .c(q0), + .in(a1), + .out(a1_hold), .* ); - integer i; - - always_ff @(posedge clk) - if (!stall) begin - a1_hold[0] <= a1; - b1_hold[0] <= b1; + gfx_pipes #(.WIDTH($bits(fixed)), .DEPTH(`FIXED_FMA_STAGES)) b_pipes + ( + .in(b1), + .out(b1_hold), + .* + ); - for (i = 1; i < `FIXED_FMA_STAGES; ++i) begin - a1_hold[i] <= a1_hold[i - 1]; - b1_hold[i] <= b1_hold[i - 1]; - end - end + gfx_fixed_fma fma1 + ( + .a(a1_hold), + .b(b1_hold), + .c(q0), + .* + ); endmodule |
