diff options
| author | Alejandro Soto <alejandro@34project.org> | 2023-10-27 05:02:31 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2023-10-27 05:55:04 -0600 |
| commit | a1135fc271f503bdc85508211c12201a38c646b8 (patch) | |
| tree | 241114055a5012b0053cf8ffe0c9b371c1db0ab0 /rtl/gfx/mat_mat_mul.sv | |
| parent | ebd3ef9b8ebe6c19d0965c3d5ee741c725180f85 (diff) | |
rtl/gfx: fix linear combiner
Diffstat (limited to 'rtl/gfx/mat_mat_mul.sv')
| -rw-r--r-- | rtl/gfx/mat_mat_mul.sv | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/rtl/gfx/mat_mat_mul.sv b/rtl/gfx/mat_mat_mul.sv index 7c21249..85ff7d6 100644 --- a/rtl/gfx/mat_mat_mul.sv +++ b/rtl/gfx/mat_mat_mul.sv @@ -15,7 +15,7 @@ module mat_mat_mul out_valid ); - mat4 a_hold, b_hold, b_transpose, q_hold, mul_b; + mat4 a_hold, b_hold, b_transpose, q_hold, q_transpose, mul_b; vec4 mul_q; logic mul_in_ready, mul_in_valid, mul_out_ready, mul_out_valid; index4 in_index, out_index; @@ -26,7 +26,7 @@ module mat_mat_mul assign mul_in_valid = in_valid || in_index != `INDEX4_MIN; assign mul_out_ready = out_ready || out_index != `INDEX4_MAX; - transpose transpose + transpose transpose_b ( .in(b), .out(b_transpose) @@ -44,12 +44,18 @@ module mat_mat_mul .* ); + transpose transpose_q + ( + .in(q_transpose), + .out(q) + ); + always_comb begin mul_b = b_hold; mul_b[0] = b_transpose[0]; - q = q_hold; - q[`VECS_PER_MAT - 1] = mul_q; + q_transpose = q_hold; + q_transpose[`VECS_PER_MAT - 1] = mul_q; end always_ff @(posedge clk or negedge rst_n) |
