From 70da4bd8b3c61add371065da8de3895fc6b9f639 Mon Sep 17 00:00:00 2001 From: Istvan-Zsolt Szekely Date: Tue, 6 Aug 2024 12:27:23 +0100 Subject: [PATCH] util_axis_fifo_asym: Fixed a couple of specific cases Signed-off-by: Istvan-Zsolt Szekely --- .../util_axis_fifo_asym/util_axis_fifo_asym.v | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/library/util_axis_fifo_asym/util_axis_fifo_asym.v b/library/util_axis_fifo_asym/util_axis_fifo_asym.v index 30b3564d23..1fc3007679 100644 --- a/library/util_axis_fifo_asym/util_axis_fifo_asym.v +++ b/library/util_axis_fifo_asym/util_axis_fifo_asym.v @@ -180,13 +180,15 @@ module util_axis_fifo_asym #( 2'b00 : s_axis_valid_int_d = {RATIO{1'b0}}; 2'b01 : s_axis_valid_int_d = {RATIO{1'b0}}; 2'b10 : s_axis_valid_int_d = {{RATIO-1{1'b0}}, 1'b1} << s_axis_counter; - 2'b11 : s_axis_valid_int_d = {RATIO{1'b1}} << s_axis_counter; + 2'b11 : s_axis_valid_int_d = {RATIO{&(s_axis_ready_int_s)}} << s_axis_counter; endcase end assign s_axis_valid_int_s = s_axis_valid_int_d; - // READY/FULL/ALMOST_FULL is driven by the current atomic instance - assign s_axis_ready = s_axis_ready_int_s >> s_axis_counter; + // disable read enable if the TLAST arrives before address handshake occurs + assign s_axis_ready = (s_axis_tlast) ? &(s_axis_ready_int_s) : s_axis_ready_int_s >> s_axis_counter; + + // FULL/ALMOST_FULL is driven by the current atomic instance assign s_axis_almost_full = s_axis_almost_full_int_s >> s_axis_counter; // the FIFO has the same room as the last atomic instance @@ -224,12 +226,12 @@ module util_axis_fifo_asym #( end else begin : big_master for (i=0; i