From 3db2ff7bc0dae34b7468df0173ec984b9c99cf8a Mon Sep 17 00:00:00 2001 From: Marcel Kant Date: Mon, 18 Nov 2024 16:51:22 +0100 Subject: [PATCH] Fixed synthesize errors --- src/ita_controller.sv | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/ita_controller.sv b/src/ita_controller.sv index 5f5bc9d..74de76a 100644 --- a/src/ita_controller.sv +++ b/src/ita_controller.sv @@ -84,9 +84,7 @@ module ita_controller step_d = step_q; softmax_tile_d = softmax_tile_q; softmax_div_done_d = softmax_div_done_q; - requant_add_d = {N {requant_add_i}}; last_time = 1'b0; - inp_bias = inp_bias_i; busy_d = busy_q; softmax_fifo = 1'b0; @@ -347,6 +345,8 @@ module ita_controller end endcase + inp_bias = inp_bias_i; + requant_add_d = {N {requant_add_i}}; bias_count = (count_q == 0) ? 255 : count_q - 1; bias_tile_x_d = (count_q == 0) ? bias_tile_x_q : tile_x_q; bias_tile_y_d = (count_q == 0) ? bias_tile_y_q : tile_y_q; @@ -363,9 +363,11 @@ module ita_controller end else begin if ( ((bias_count) + bias_tile_x_d * M*M/N) >= (second_outer_dim_d / N) * M ) begin if ( (((bias_count) / M) * N + bias_tile_x_d * M ) < second_outer_dim_d) begin - for (int i = (second_outer_dim_d & (N-1)); i < N; i++) begin - requant_add_d[i] = 1'b0; - inp_bias[i] = 1'b0; + for (int i = 0; i < N; i++) begin + if (i >= (second_outer_dim_d & (N-1))) begin + requant_add_d[i] = 1'b0; + inp_bias[i] = 1'b0; + end end end else begin requant_add_d = {N {1'b0}};