Altera Low Latency 40-Gbps Ethernet MAC and PHY MegaCore Function User Manual
Page 91

Signal Name
Direction
Description
tx_in_ptp_
overwrite[1:0]
Input
If the current packet is a 1588 PTP packet, indicates to the TX
MAC what it should do to generate the packet exit timestamp in
one-step mode. The IP core is in one-step mode when the ptp_s2
field in bit [1] of the
TX_PTP_STATUS
register has the value of 0.
The correct action depends on the system-level application. The
client indicates the desired action with the following valid values:
• 2'b00: Add the internally maintained timestamp information to
the timestamp information in the incoming packet and write
the resulting timestamp in the outgoing packet. Exit timestamp
= entry timestamp plus expected latency through the IP core
plus user-defined value in
TX_PTP_EXTRA_LATENCY
register.
• 2'b01: Overwrite the timestamp in the outgoing packet with the
sum of the timestamp from the incoming packet plus the value
the IP core would calculate for the 2'b00 value. Exit timestamp
= (2 x entry timestamp) plus expected latency through the IP
core plus user-defined value in
TX_PTP_EXTRA_LATENCY
register. This option is useful when the receiving application
performs the subtraction after receiving the packet.
• 2'b10: Reserved.
• 2'b11: Overwrite the timestamp in the outgoing packet with the
difference of the value the IP core would calculate for the 2'b00
value and the entry timestamp. Exit timestamp = (entry
timestamp plus expected latency through the IP core plus user-
defined value in
TX_PTP_EXTRA_LATENCY
register) minus the
entry timestamp, which equals the expected latency through
the IP core plus user-defined value in
TX_PTP_EXTRA_LATENCY
register. This option is useful when the receiving application
calculates the cumulative latency.
For 1588 PTP packets, the TX client must maintain the desired
value on this signal while the TX SOP signal is asserted.
tx_in_ptp_
offset[15:0]
Input
If the current packet is a 1588 PTP packet, indicates the offset of
the timestamp information in the packet. Depending on the value
on the
tx_in_ptp_overwrite
signal, the IP core overwrites the
96-bit value at this offset or combines it with the IP core internal
timestamp information. For 1588 PTP packets, the TX client must
maintain the desired value on this signal while the TX SOP signal
is asserted.
The TX client must ensure that the timestamp bytes and the TCP
checksum bytes in the packet do not overlap. The IP core does not
check for overlap. If these two fields overlap, the results are
undefined.
3-46
1588 PTP Interface Signals
UG-01172
2015.05.04
Altera Corporation
Functional Description