Ieee 1588
Ieee 1588
Ieee 1588
Introduction
COUNTER
CONVERSION
SOFTWARE
TIME
HOUR:MIN:SEC
EPOCH
DIVIDER
NUMBER OF
PULSES
H:M:S TIME
API FUNCTIONS
CLOCK OUTPUT
LOCAL TIME SYSTEM
APPLICATION
APPLICATION HARDWARE
APPLICATION SOFTWARE
All the devices could use a single physical oscillator. This is only feasible
for distributed systems in close proximity; a high-frequency clock
signal cannot be reliably delivered over a long distance.
www.analog.com/analogdialogue
software has the two times, Ts1' (Sync arrival time) and Tm1'
(Sync departure time). The master-to-slave path delay, Tmsd, is
determined by Equation 1.
SLAVE
SOFTWARE
MASTER
HARDWARE
SLAVE
SOFTWARE
Ts1'
SYNC
CARRIES Tm1
SLAVE GETS Ts1'
Ts1
Ts2'
Ts2
FOLLOWUP
CARRIES Tm1'
SLAVE GETS Tm1'
Tm4
HARDWARE
TIME-STAMP
POINT
HARDWARE
TIME-STAMP
POINT
SOFTWARE
TIME-STAMP
POINT
MASTER
SENDS DELAYRESP
WHICH CARRIES Tm3'
Tm4'
Ts4'
Ts4
SLAVE GETS Tm3'
HARDWARE
TIME-STAMP
POINT
HARDWARE
TIME-STAMP
POINT
SOFTWARE
TIME-STAMP
POINT
(2)
SOFTWARE
TIME-STAMP
POINT
Tm3
Tm2'
MASTER
SOFTWARE
MASTER
RECEIVES DELAYREQ
SAVES Tm3'
Tm3'
SOFTWARE
TIME-STAMP
POINT
Tm1'
Tm2
MASTER
SENDS
FOLLOWUP
MASTER
HARDWARE
Ts3'
COMMUNICATION
PATH
MASTER
SENDS SYNC
Tm1
COMMUNICATION
PATH
SLAVE
HARDWARE
SLAVE SENDS
DELAYREQ
Ts3
MASTER
SOFTWARE
(1)
(3)
(4)
Once the communication path delay, Td, is obtained, the slavemaster time difference is easy to calculate, using either Equation 1
or Equation 2, as shown in Equation 5 and Equation 6.
(5)
(6)
With the time difference from the master clock known, each slaveclock device needs to adjust its own local time to match the master
clock. This task has two aspects. First, slave-clock devices need to
adjust their absolute time by adding the time difference to make
their time perfectly match the master-clock time at this moment.
Then, each slave-clock device needs to adjust its clock frequency
to match the frequency of the master clock. We cannot rely on the
absolute time alone, since the time difference is applied only at a
certain period and could be either positive or negative; as a result,
the adjustment will make the slave-clock time jumpy or even run
backward. So, in practice, the adjustment takes two steps.
1. If the time difference is too big, for example, larger than
one second, absolute time adjustment is applied.
2. If the time difference is small, a percentage change of frequency
is applied to slave clocks.
Generally speaking, the system becomes a control loop, where
master-clock time is the reference command, slave-clock time is
the output tracking the master-clock time, and their difference
drives the adjustable clock. PID control, which is commonly
used by many IEEE 1588 implementations, could be used to
achieve specific tracking performance. Figure 4 illustrates this
control loop.
MASTER
TIME
CONTROL LAW
ADJUSTABLE
CLOCK
SLAVE
TIME
Peer-to-Peer Delay
CLOCK OUTPUT
DRIVER
ADSP-BF518
TSYNC MODULE
PPS
GENERATOR
PPS
OUTPUT
EXTERNAL
CLOCK
MII/RMII
CLOCK
SYSTEM
CLOCK
EVENT
FLAG
CLOCK SOURCE
MUX
ADDEND
ADJUSTABLE
CLOCK
LOCAL TIME
COUNTER
ALARM
GENERATOR
EVENT DETECTION
PTP Tx EVENT
PACKET DETECTION
INTERRUPT
MII Rx
PTP Rx EVENT
PACKET DETECTION
INTERRUPT
REQUEST
Rx
TIMESTAMPING
Packet Detection
PPS Output
Auxiliary Snapshot
Tx
TIMESTAMPING
MII Tx
Alarm
Adjustable Clock
(7)
ADDEND-BASED ADJUSTABLE CLOCK
32-BIT
ADDEND
CARRY
INPUT CLOCK
32-BIT
ACCUMULATOR
SUM
64-BIT
LOCAL TIME
COUNTER
SUM
32-BIT
OFFSET
Conclusion
APPLICATION
ADSP-BF518
PROCESSOR
IEEE 1588-2008 STACK SOFTWARE
TSYNC MODULE
DRIVER SOFTWARE
MAC CONTROLLER
DRIVER SOFTWARE
TSYNC MODULE
HARDWARE
MAC CONTROLLER
HARDWARE
PROCESSOR
SYSTEM CLOCK
PPS
OUTPUT
References
1
ETHERNET PHY
IEEE 1588 PTP
SYSTEM
ETHERNET
NUMBER OF SAMPLES
1200
1000
800
600
400
200
0
60
40
20
20
40
60
ERROR (ns)
Authors