File tree 4 files changed +8
-8
lines changed
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
545
545
end
546
546
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
547
547
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 ) ;
549
549
ptp_ts_reg[95 :48 ] <= ptp_ts[95 :48 ];
550
550
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 ) ;
552
552
end
553
553
end
554
554
Original file line number Diff line number Diff line change @@ -532,10 +532,10 @@ always @* begin
532
532
// need to send more idles - swap lanes
533
533
swap_lanes = 1'b1 ;
534
534
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 ) ;
536
536
m_axis_ptp_ts_next[95 :48 ] <= ptp_ts[95 :48 ];
537
537
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 ) ;
539
539
end
540
540
m_axis_ptp_ts_tag_next = s_axis_tuser >> 1 ;
541
541
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
516
516
end
517
517
end else if (xgmii_rxc[4 ] && xgmii_rxd[39 :32 ] == XGMII_START) begin
518
518
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 ) ;
520
520
ptp_ts_reg[95 :48 ] <= ptp_ts[95 :48 ];
521
521
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 ) ;
523
523
end
524
524
end
525
525
Original file line number Diff line number Diff line change @@ -479,10 +479,10 @@ always @* begin
479
479
// need to send more idles - swap lanes
480
480
swap_lanes = 1'b1 ;
481
481
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 ) ;
483
483
m_axis_ptp_ts_next[95 :48 ] <= ptp_ts[95 :48 ];
484
484
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 ) ;
486
486
end
487
487
m_axis_ptp_ts_tag_next = s_axis_tuser >> 1 ;
488
488
m_axis_ptp_ts_valid_int_next = 1'b1 ;
You can’t perform that action at this time.
0 commit comments