File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -545,10 +545,10 @@ always @(posedge clk) begin
545545 end
546546 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
547547 if (PTP_TS_WIDTH == 96 ) begin
548- ptp_ts_reg[45 :0 ] <= ptp_ts[45 :0 ] + (PTP_PERIOD_NS * 2 ** 16 + PTP_PERIOD_FNS) * 1 . 5 ;
548+ ptp_ts_reg[45 :0 ] <= ptp_ts[45 :0 ] + ((( PTP_PERIOD_NS * 2 ** 16 + PTP_PERIOD_FNS) * 3 ) >> 1 ) ;
549549 ptp_ts_reg[95 :48 ] <= ptp_ts[95 :48 ];
550550 end else begin
551- ptp_ts_reg <= ptp_ts + (PTP_PERIOD_NS * 2 ** 16 + PTP_PERIOD_FNS) * 1 . 5 ;
551+ ptp_ts_reg <= ptp_ts + ((( PTP_PERIOD_NS * 2 ** 16 + PTP_PERIOD_FNS) * 3 ) >> 1 ) ;
552552 end
553553 end
554554
Original file line number Diff line number Diff line change @@ -532,10 +532,10 @@ always @* begin
532532 // need to send more idles - swap lanes
533533 swap_lanes = 1'b1 ;
534534 if (PTP_TS_WIDTH == 96 ) begin
535- m_axis_ptp_ts_next[45 :0 ] <= ptp_ts[45 :0 ] + (PTP_PERIOD_NS * 2 ** 16 + PTP_PERIOD_FNS) * 1 . 5 ;
535+ m_axis_ptp_ts_next[45 :0 ] <= ptp_ts[45 :0 ] + ((( PTP_PERIOD_NS * 2 ** 16 + PTP_PERIOD_FNS) * 3 ) >> 1 ) ;
536536 m_axis_ptp_ts_next[95 :48 ] <= ptp_ts[95 :48 ];
537537 end else begin
538- m_axis_ptp_ts_next = ptp_ts + (PTP_PERIOD_NS * 2 ** 16 + PTP_PERIOD_FNS) * 1 . 5 ;
538+ m_axis_ptp_ts_next = ptp_ts + ((( PTP_PERIOD_NS * 2 ** 16 + PTP_PERIOD_FNS) * 3 ) >> 1 ) ;
539539 end
540540 m_axis_ptp_ts_tag_next = s_axis_tuser >> 1 ;
541541 m_axis_ptp_ts_valid_int_next = 1'b1 ;
Original file line number Diff line number Diff line change @@ -516,10 +516,10 @@ always @(posedge clk) begin
516516 end
517517 end else if (xgmii_rxc[4 ] && xgmii_rxd[39 :32 ] == XGMII_START) begin
518518 if (PTP_TS_WIDTH == 96 ) begin
519- ptp_ts_reg[45 :0 ] <= ptp_ts[45 :0 ] + (PTP_PERIOD_NS * 2 ** 16 + PTP_PERIOD_FNS) * 1 . 5 ;
519+ ptp_ts_reg[45 :0 ] <= ptp_ts[45 :0 ] + ((( PTP_PERIOD_NS * 2 ** 16 + PTP_PERIOD_FNS) * 3 ) >> 1 ) ;
520520 ptp_ts_reg[95 :48 ] <= ptp_ts[95 :48 ];
521521 end else begin
522- ptp_ts_reg <= ptp_ts + (PTP_PERIOD_NS * 2 ** 16 + PTP_PERIOD_FNS) * 1 . 5 ;
522+ ptp_ts_reg <= ptp_ts + ((( PTP_PERIOD_NS * 2 ** 16 + PTP_PERIOD_FNS) * 3 ) >> 1 ) ;
523523 end
524524 end
525525
Original file line number Diff line number Diff line change @@ -479,10 +479,10 @@ always @* begin
479479 // need to send more idles - swap lanes
480480 swap_lanes = 1'b1 ;
481481 if (PTP_TS_WIDTH == 96 ) begin
482- m_axis_ptp_ts_next[45 :0 ] <= ptp_ts[45 :0 ] + (PTP_PERIOD_NS * 2 ** 16 + PTP_PERIOD_FNS) * 1 . 5 ;
482+ m_axis_ptp_ts_next[45 :0 ] <= ptp_ts[45 :0 ] + ((( PTP_PERIOD_NS * 2 ** 16 + PTP_PERIOD_FNS) * 3 ) >> 1 ) ;
483483 m_axis_ptp_ts_next[95 :48 ] <= ptp_ts[95 :48 ];
484484 end else begin
485- m_axis_ptp_ts_next = ptp_ts + (PTP_PERIOD_NS * 2 ** 16 + PTP_PERIOD_FNS) * 1 . 5 ;
485+ m_axis_ptp_ts_next = ptp_ts + ((( PTP_PERIOD_NS * 2 ** 16 + PTP_PERIOD_FNS) * 3 ) >> 1 ) ;
486486 end
487487 m_axis_ptp_ts_tag_next = s_axis_tuser >> 1 ;
488488 m_axis_ptp_ts_valid_int_next = 1'b1 ;
You can’t perform that action at this time.
0 commit comments