Skip to content

Commit

Permalink
Fix bad frame mask
Browse files Browse the repository at this point in the history
  • Loading branch information
alexforencich committed Jun 10, 2019
1 parent 8e969aa commit ccc1532
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rtl/axis_async_fifo.v
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion rtl/axis_fifo.v
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ccc1532

Please sign in to comment.