From 2794c315e840562a1facdb87b4bb34740928cfc5 Mon Sep 17 00:00:00 2001 From: Alex Forencich Date: Sat, 8 Jun 2019 17:36:09 -0700 Subject: [PATCH] Fix synthesizer complaints --- rtl/axis_baser_rx_64.v | 4 ++-- rtl/axis_baser_tx_64.v | 4 ++-- rtl/axis_xgmii_rx_64.v | 4 ++-- rtl/axis_xgmii_tx_64.v | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/rtl/axis_baser_rx_64.v b/rtl/axis_baser_rx_64.v index e37b8294c..93d17b397 100644 --- a/rtl/axis_baser_rx_64.v +++ b/rtl/axis_baser_rx_64.v @@ -545,10 +545,10 @@ always @(posedge clk) begin end end else if (encoded_rx_hdr == SYNC_CTRL && (encoded_rx_data[7:0] == BLOCK_TYPE_START_4 || encoded_rx_data[7:0] == BLOCK_TYPE_OS_START)) begin if (PTP_TS_WIDTH == 96) begin - ptp_ts_reg[45:0] <= ptp_ts[45:0] + (PTP_PERIOD_NS * 2**16 + PTP_PERIOD_FNS) * 1.5; + ptp_ts_reg[45:0] <= ptp_ts[45:0] + (((PTP_PERIOD_NS * 2**16 + PTP_PERIOD_FNS) * 3) >> 1); ptp_ts_reg[95:48] <= ptp_ts[95:48]; end else begin - ptp_ts_reg <= ptp_ts + (PTP_PERIOD_NS * 2**16 + PTP_PERIOD_FNS) * 1.5; + ptp_ts_reg <= ptp_ts + (((PTP_PERIOD_NS * 2**16 + PTP_PERIOD_FNS) * 3) >> 1); end end diff --git a/rtl/axis_baser_tx_64.v b/rtl/axis_baser_tx_64.v index 4487053a2..f76704b99 100644 --- a/rtl/axis_baser_tx_64.v +++ b/rtl/axis_baser_tx_64.v @@ -532,10 +532,10 @@ always @* begin // need to send more idles - swap lanes swap_lanes = 1'b1; if (PTP_TS_WIDTH == 96) begin - m_axis_ptp_ts_next[45:0] <= ptp_ts[45:0] + (PTP_PERIOD_NS * 2**16 + PTP_PERIOD_FNS) * 1.5; + m_axis_ptp_ts_next[45:0] <= ptp_ts[45:0] + (((PTP_PERIOD_NS * 2**16 + PTP_PERIOD_FNS) * 3) >> 1); m_axis_ptp_ts_next[95:48] <= ptp_ts[95:48]; end else begin - m_axis_ptp_ts_next = ptp_ts + (PTP_PERIOD_NS * 2**16 + PTP_PERIOD_FNS) * 1.5; + m_axis_ptp_ts_next = ptp_ts + (((PTP_PERIOD_NS * 2**16 + PTP_PERIOD_FNS) * 3) >> 1); end m_axis_ptp_ts_tag_next = s_axis_tuser >> 1; m_axis_ptp_ts_valid_int_next = 1'b1; diff --git a/rtl/axis_xgmii_rx_64.v b/rtl/axis_xgmii_rx_64.v index 45838e0ee..f0790ce33 100644 --- a/rtl/axis_xgmii_rx_64.v +++ b/rtl/axis_xgmii_rx_64.v @@ -516,10 +516,10 @@ always @(posedge clk) begin end end else if (xgmii_rxc[4] && xgmii_rxd[39:32] == XGMII_START) begin if (PTP_TS_WIDTH == 96) begin - ptp_ts_reg[45:0] <= ptp_ts[45:0] + (PTP_PERIOD_NS * 2**16 + PTP_PERIOD_FNS) * 1.5; + ptp_ts_reg[45:0] <= ptp_ts[45:0] + (((PTP_PERIOD_NS * 2**16 + PTP_PERIOD_FNS) * 3) >> 1); ptp_ts_reg[95:48] <= ptp_ts[95:48]; end else begin - ptp_ts_reg <= ptp_ts + (PTP_PERIOD_NS * 2**16 + PTP_PERIOD_FNS) * 1.5; + ptp_ts_reg <= ptp_ts + (((PTP_PERIOD_NS * 2**16 + PTP_PERIOD_FNS) * 3) >> 1); end end diff --git a/rtl/axis_xgmii_tx_64.v b/rtl/axis_xgmii_tx_64.v index 67f30ce87..6bb73a1a6 100644 --- a/rtl/axis_xgmii_tx_64.v +++ b/rtl/axis_xgmii_tx_64.v @@ -479,10 +479,10 @@ always @* begin // need to send more idles - swap lanes swap_lanes = 1'b1; if (PTP_TS_WIDTH == 96) begin - m_axis_ptp_ts_next[45:0] <= ptp_ts[45:0] + (PTP_PERIOD_NS * 2**16 + PTP_PERIOD_FNS) * 1.5; + m_axis_ptp_ts_next[45:0] <= ptp_ts[45:0] + (((PTP_PERIOD_NS * 2**16 + PTP_PERIOD_FNS) * 3) >> 1); m_axis_ptp_ts_next[95:48] <= ptp_ts[95:48]; end else begin - m_axis_ptp_ts_next = ptp_ts + (PTP_PERIOD_NS * 2**16 + PTP_PERIOD_FNS) * 1.5; + m_axis_ptp_ts_next = ptp_ts + (((PTP_PERIOD_NS * 2**16 + PTP_PERIOD_FNS) * 3) >> 1); end m_axis_ptp_ts_tag_next = s_axis_tuser >> 1; m_axis_ptp_ts_valid_int_next = 1'b1;