User manual

Table Of Contents
Zynq-7000 AP SoC Technical Reference Manual www.xilinx.com 523
UG585 (v1.11) September 27, 2016
Chapter 16: Gigabit Ethernet Controller
16.4.5 PTP Packet Handling at the Slave
Refer to IEEE 1588 Standard Specification for more information on packet formats and protocol.
1. Calculate the peer delay as described in steps 5-9 in section 16.4.4 PTP Packet Handling at
the Master.
Note: When the slave sends timestamps, the delays introduced by the external PHY at the slave
clock port should be taken care of.
2. Read and store timestamp for the received Sync frame. The controller generates an interrupt
for PTP Sync frame received. The slave reads the gem.ptp_rx_s and gem.ptp_rx_ns registers and
stores them. Let this time stamp be t5.
3. Process the Follow_Up frame received. The controller does not generate a PTP event interrupt
for a received Follow_Up frame. The Slave does a validation for the sequenceId field which should
match with that for the previously received Sync frame. The slave extracts the
preciseOriginTimestamp field from the Follow_up frame and stores it. This is the time at which the
Sync frame left the master. The slave then adds the peer delay calculated in step (1) with this time
to take care of the path delay of the PTP frame from master to slave. Let this time be t6.
4. Calculate the final clock offset. This is the difference between t6 and t5 and is typically
represented in nanoseconds.
5. Adjust the PTP clock. The slave adjusts the PTP clock by writing to the gem.timer_adjust
register. If t6 is greater than t5, the gem.timer_adjust[add_subn] is written as 0, otherwise it is
written as 1. The actual nanosecond difference is written in the gem.timer_adjust[ns_delta]
register bits.
6. Become the master in the event of a Sync or Announce timeout.
16.5 Register Overview
16.5.1 Control Registers
Control registers drive the management data input/output (MDIO) interface, set-up DMA activity,
start frame transmission, and select the different modes of operation such as full duplex, half duplex
and 10/100/1000 Mb/s operation. (See Table 16-9.)