From fbcbbe3a69f899c18a8c4fd95b8f8f6d8fea5e4b Mon Sep 17 00:00:00 2001 From: Alex Forencich Date: Fri, 21 Nov 2014 10:43:20 -0800 Subject: [PATCH] Remove adder tree --- rtl/axis_stat_counter.v | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rtl/axis_stat_counter.v b/rtl/axis_stat_counter.v index 64a10d279..a99834262 100644 --- a/rtl/axis_stat_counter.v +++ b/rtl/axis_stat_counter.v @@ -220,8 +220,9 @@ always @* begin // increment byte count by number of words transferred bit_cnt = 0; - for (i = 0; i < KEEP_WIDTH; i = i + 1) begin - bit_cnt = bit_cnt + monitor_axis_tkeep[i]; + for (i = 0; i <= KEEP_WIDTH; i = i + 1) begin + //bit_cnt = bit_cnt + monitor_axis_tkeep[i]; + if (monitor_axis_tkeep == ({KEEP_WIDTH{1'b1}}) >> (KEEP_WIDTH-i)) bit_cnt = i; end byte_count_next = byte_count_next + bit_cnt;