From 0efb135b7a5feb228734b651647bf1ad5219b79a Mon Sep 17 00:00:00 2001 From: Alex Forencich Date: Mon, 25 Mar 2019 15:06:45 -0700 Subject: [PATCH] Fix STATE_WAIT_END --- rtl/axis_xgmii_tx_32.v | 8 ++++++-- rtl/axis_xgmii_tx_64.v | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/rtl/axis_xgmii_tx_32.v b/rtl/axis_xgmii_tx_32.v index 7c8ab7d9e..bdcda1cc0 100644 --- a/rtl/axis_xgmii_tx_32.v +++ b/rtl/axis_xgmii_tx_32.v @@ -482,8 +482,10 @@ always @* begin end STATE_WAIT_END: begin // wait for end of frame - if (ifg_count_reg > 8'd8) begin - ifg_count_next = ifg_count_reg - 8'd8; + s_axis_tready_next = 1'b1; + + if (ifg_count_reg > 8'd4) begin + ifg_count_next = ifg_count_reg - 8'd4; end else begin ifg_count_next = 8'd0; end @@ -492,6 +494,8 @@ always @* begin if (s_axis_tvalid) begin if (s_axis_tlast) begin + s_axis_tready_next = 1'b0; + if (ENABLE_DIC) begin if (ifg_count_next > 8'd3) begin state_next = STATE_IFG; diff --git a/rtl/axis_xgmii_tx_64.v b/rtl/axis_xgmii_tx_64.v index e6f8c2569..3f260133e 100644 --- a/rtl/axis_xgmii_tx_64.v +++ b/rtl/axis_xgmii_tx_64.v @@ -597,6 +597,8 @@ always @* begin end STATE_WAIT_END: begin // wait for end of frame + s_axis_tready_next = 1'b1; + if (ifg_count_reg > 8'd8) begin ifg_count_next = ifg_count_reg - 8'd8; end else begin @@ -607,6 +609,8 @@ always @* begin if (s_axis_tvalid) begin if (s_axis_tlast) begin + s_axis_tready_next = 1'b0; + if (ENABLE_DIC) begin if (ifg_count_next > 8'd7) begin state_next = STATE_IFG;