summaryrefslogtreecommitdiff
path: root/rtl/gfx/vec_dot.sv
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2023-10-22 00:16:40 -0600
committerAlejandro Soto <alejandro@34project.org>2023-10-22 00:16:50 -0600
commitc1c1f1e823099c82d02e94827a64d7a0b223048e (patch)
treecc6466fad9a943bbde314feb151bbacadf5b338a /rtl/gfx/vec_dot.sv
parenta14fc04f3b9f5bcef941ea79c794532d7ca0e7fc (diff)
rtl/gfx: reimplement multiplier as a much smaller mat-vec pipeline
Diffstat (limited to 'rtl/gfx/vec_dot.sv')
-rw-r--r--rtl/gfx/vec_dot.sv15
1 files changed, 8 insertions, 7 deletions
diff --git a/rtl/gfx/vec_dot.sv b/rtl/gfx/vec_dot.sv
index d984504..4e1fdee 100644
--- a/rtl/gfx/vec_dot.sv
+++ b/rtl/gfx/vec_dot.sv
@@ -3,23 +3,24 @@
module vec_dot
(
input logic clk,
- rst_n,
- input logic start,
+ input logic stall_mul,
+ stall_fold,
+ feedback,
+ feedback_last,
+
input vec4 a,
b,
- output logic done,
output fp q
);
vec4 products;
- logic dones[`FLOATS_PER_VEC];
- horizontal_fold #(.N(`FLOATS_PER_VEC)) fold
+ horizontal_fold fold
(
- .start(dones[0]),
.vec(products),
+ .stall(stall_fold),
.*
);
@@ -30,8 +31,8 @@ module vec_dot
(
.a(a[i]),
.b(b[i]),
- .done(dones[i]),
.q(products[i]),
+ .stall(stall_mul),
.*
);
end