diff options
| author | Alejandro Soto <alejandro@34project.org> | 2023-10-21 03:21:18 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2023-10-21 03:21:18 -0600 |
| commit | d84718bf7955a6bba03aa44938f0f140c1a6390d (patch) | |
| tree | 58aca8052f775ae5697688c759ef24977db4f6a2 /rtl/gfx/mat_mat_mul.sv | |
| parent | 1b5eeb9a949272232ff543f684c7be62d31d0d40 (diff) | |
rtl/gfx: implement non-synthesizable matrix multiplier
Diffstat (limited to 'rtl/gfx/mat_mat_mul.sv')
| -rw-r--r-- | rtl/gfx/mat_mat_mul.sv | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/rtl/gfx/mat_mat_mul.sv b/rtl/gfx/mat_mat_mul.sv new file mode 100644 index 0000000..aa5e769 --- /dev/null +++ b/rtl/gfx/mat_mat_mul.sv @@ -0,0 +1,33 @@ +`include "gfx/gfx_defs.sv" + +module mat_mat_mul +( + input logic clk, + rst_n, + + input logic start, + input mat4 a, + b, + + output logic done, + output mat4 q +); + + logic dones[`VECS_PER_MAT]; + + assign done = dones[0]; + + genvar i; + generate + for (i = 0; i < `VECS_PER_MAT; ++i) begin: columns + mat_vec_mul column_i + ( + .x(b[i]), + .q(q[i]), + .done(dones[i]), + .* + ); + end + endgenerate + +endmodule |
