From ccb98ec24625dab19a8f76cfa22a5a3703090c90 Mon Sep 17 00:00:00 2001 From: IstvanZsSzekely <122256380+IstvanZsSzekely@users.noreply.github.com> Date: Fri, 22 Nov 2024 15:04:34 +0200 Subject: [PATCH] util_axis_fifo: Fix tkeep signal value when KEEP_EN is 0 (#1455) util_axis_fifo: Set tkeep and tlast values to 1 when KEEP_EN and LAST_EN are 0 as the standard requires Signed-off-by: Istvan-Zsolt Szekely --- library/util_axis_fifo/util_axis_fifo.v | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/library/util_axis_fifo/util_axis_fifo.v b/library/util_axis_fifo/util_axis_fifo.v index a130779116..c07a740fb6 100644 --- a/library/util_axis_fifo/util_axis_fifo.v +++ b/library/util_axis_fifo/util_axis_fifo.v @@ -149,7 +149,7 @@ module util_axis_fifo #( end assign m_axis_tlast = axis_tlast_d; end else - assign m_axis_tlast = 'b0; + assign m_axis_tlast = 1'b1; // TKEEP support if (TKEEP_EN) begin @@ -162,7 +162,7 @@ module util_axis_fifo #( end assign m_axis_tkeep = axis_tkeep_d; end else - assign m_axis_tkeep = {DATA_WIDTH/8{1'b1}}; + assign m_axis_tkeep = ~0; end /* zerodeep */ else @@ -206,7 +206,7 @@ module util_axis_fifo #( end assign m_axis_tlast = axis_tlast_d; end else - assign m_axis_tlast = 'b0; + assign m_axis_tlast = 1'b1; // TKEEP support if (TKEEP_EN) begin @@ -221,7 +221,7 @@ module util_axis_fifo #( end assign m_axis_tkeep = axis_tkeep_d; end else - assign m_axis_tkeep = {DATA_WIDTH/8{1'b1}}; + assign m_axis_tkeep = ~0; end /* !ASYNC_CLK */ @@ -289,17 +289,17 @@ module util_axis_fifo #( end else if (TKEEP_EN) begin assign s_axis_data_int_s = {s_axis_tkeep, s_axis_data}; assign m_axis_tkeep = m_axis_data_int_s[MEM_WORD-1-:DATA_WIDTH/8]; - assign m_axis_tlast = 'b0; + assign m_axis_tlast = 1'b1; assign m_axis_data = m_axis_data_int_s[DATA_WIDTH-1:0]; end else if (TLAST_EN) begin assign s_axis_data_int_s = {s_axis_tlast, s_axis_data}; - assign m_axis_tkeep = {DATA_WIDTH/8{1'b1}}; + assign m_axis_tkeep = ~0; assign m_axis_tlast = m_axis_data_int_s[DATA_WIDTH]; assign m_axis_data = m_axis_data_int_s[DATA_WIDTH-1:0]; end else begin assign s_axis_data_int_s = {s_axis_data}; - assign m_axis_tkeep = {DATA_WIDTH/8{1'b1}}; - assign m_axis_tlast = 'b0; + assign m_axis_tkeep = ~0; + assign m_axis_tlast = 1'b1; assign m_axis_data = m_axis_data_int_s[DATA_WIDTH-1:0]; end