diff --git a/rtl/axis_async_fifo.v b/rtl/axis_async_fifo.v index 659b2698d..d1b9fb4a4 100644 --- a/rtl/axis_async_fifo.v +++ b/rtl/axis_async_fifo.v @@ -302,7 +302,7 @@ always @* begin wr_ptr_cur_gray_next = wr_ptr_cur_next ^ (wr_ptr_cur_next >> 1); if (s_axis_tlast) begin // end of frame - if (DROP_BAD_FRAME && (USER_BAD_FRAME_MASK & s_axis_tuser == USER_BAD_FRAME_VALUE)) begin + if (DROP_BAD_FRAME && USER_BAD_FRAME_MASK & ~(s_axis_tuser ^ USER_BAD_FRAME_VALUE)) begin // bad packet, reset write pointer wr_ptr_cur_next = wr_ptr_reg; wr_ptr_cur_gray_next = wr_ptr_cur_next ^ (wr_ptr_cur_next >> 1); diff --git a/rtl/axis_fifo.v b/rtl/axis_fifo.v index 83d89900d..d6329b1d9 100644 --- a/rtl/axis_fifo.v +++ b/rtl/axis_fifo.v @@ -207,7 +207,7 @@ always @* begin wr_ptr_cur_next = wr_ptr_cur_reg + 1; if (s_axis_tlast) begin // end of frame - if (DROP_BAD_FRAME && (USER_BAD_FRAME_MASK & s_axis_tuser == USER_BAD_FRAME_VALUE)) begin + if (DROP_BAD_FRAME && USER_BAD_FRAME_MASK & ~(s_axis_tuser ^ USER_BAD_FRAME_VALUE)) begin // bad packet, reset write pointer wr_ptr_cur_next = wr_ptr_reg; bad_frame_next = 1'b1;