Professional Documents
Culture Documents
toffset =
( t2 − t1 ) − ( t4 − t3 ) (4)
registers updated in real time according to the information
filtered and requirements of each type of PTP frame. According
2 to the PTP type frame flag registers and filtered information,
The slave clock should be adjusted according to the toffset , so PTP event frame flag registers are refreshed.
(4) Generating timestamp
as to realize synchronization between master clock and slave
Combined with user configuration information and each type
clock.
of PTP event frame flag register information, the module
generates a flag signal that indicates whether or not to product
III. SYSTEM DESIGN
timestamp. If the flag signal is high, it will drive the
A. Timestamp Mark Position corresponding logic to write the arrive time recorded into the
The timestamp mark position determines the time precision timestamp FIFO and update the corresponding flag signal;
[10]. In engineering applications, there are many places to otherwise, arrived time will be discarded.
CPU
Send MAC_IP
MAC Receive Control
Interface
rx_dv
tx_en
CPU
Receive
MAC Send Control
Interface
7.98090
7.99901
8.10013
8.00001
7.98999
V. CONCLUSION
This paper presented a hardware and software
implementation using FPGA+ARM verification platform to
improve the synchronization of Ethernet master-slave clock
system by using improved MAC IP core capable of handling
IEEE 1588 protocol. Test shows that the system can work at
10/100/1000M Ethernet rate. The system uses a common
Ethernet PHY with RGMII interface, and has the advantages of
Fig. 7. Time deviation diagram before system synchronization fast synchronization, high precision, low requirements on the
peripheral chip, with good portability and scalability.
ACKNOWLEDGMENTS
This work is supported in part by Science and Technology on
Information Transmission and Dissemination in
Communication Networks Laboratory Project (KX152600020/
ITD-U15011), Fundamental Research Funds for the Central
Universities (JB140112), National Natural Science Foundation
(61306047).
REFERENCE
Fig. 8. Time deviation diagram after system synchronization [1] F.-Steinhauser, C.-Riesch, M.-Rudigier, “IEEE 1588 for time
In order to more intuitively display the time deviation synchronization of devices in the electric power industry”, in Proceedings
between the master clock and the slave clock, this paper uses the of International IEEE Symposium on Precision Clock Synchronization for
Measurement Control and Communication, Oct. 2010, pp.1-6
serial port to send the deviation calculated by the CPU to the PC
[2] Y. Peng, Q.-H. Luo, and Z.-Q. Liu, “An automatic evaluation system for
in real time when setting up the verification platform. Using IEEE1588 synchronization clock unit,” in Proceedings of the Ninth
self-developed real-time monitoring software, the time International Conference on Electronic Measurement and Instruments,
deviation between master and slave clock can be displayed in Aug. 2009, pp.408-413.
[3] J. Eidson and Kang Lee, “IEEE 1588 standard for a precision clock
real time after each synchronization. The actual test results are
synchronization protocol for networked measurement and control
shown in Fig. 7 and Fig. 8. The test results are as follows: systems,” in Proc. 2nd ISA/IEEE Sensors for Industry Conference, Nov.
(1) With 30cm network cable or 3m cable, the path delay time 2002, pp. 98-105.
is always around 340us; [4] Zhao, Hongkun, X. Wang, and Z. Yang. "Design and implementation of
precision time synchronization system based on IEEE1588." In
(2) Since the master and slave clocks have different power-
International Conference on Electric Utility Deregulation and
on times, a large deviation will exist at the beginning. But the Restructuring and Power Technologies, 2011, Vol.47, pp, 610-613.
slave clock can quickly lock the master clock and adjust to a [5] Moreira, N., Astarloa, A., Lazaro, J., Garcia, A., & Ormaetxea, E. “IEEE
steady state; 1588 Transparent Clock architecture for FPGA-based network devices.”
in Industrial Electronics (ISIE), 2013 IEEE International Symposium,
(3) After the system is stable, the time deviation between the
May, 2013, pp. 1-6.
master clock and the slave clock remain within ±20ns. [6] C Kutschera, C Veigl, R Höller, et al, “Background IEEE 1588 Clock
(4) Since the time deviation calculation program runs on the Synchronization over IEEE 802.3/Ethernet,” in Proc. ISPCS, Sep. 2008,
CPU, it is possible for the upper layer to use a more advanced pp. 22-26
[7] B. Zhao and N. Wang, “The implementation of IEEE 1588 clock
synchronization algorithm. synchronization system based on FPGA,” in Proc. ICICIP, Aug. 2014, pp.
There are three main reasons for time offset: 216-220.
(1) The difference of synchronization cycle can make [8] IEEE Standard for a Precision Clock Synchronization Protocol for
different time offset. The shorter the synchronization period, the Networked Measurement and Control Systems, IEEE Standard 1588,
2008.
higher the synchronization accuracy. However, in practical [9] K Correll, N Barendt, M Branicky, “Design considerations for software
applications, the performance of the system decreases with the only implementations of the IEEE 1588 precision time protocol,” in Proc.
decreases of clock synchronization cycle. Conference on IEEE 1588 Standard for A Precision Clock
(2) There is a frequency difference between the master clock Synchronization Protocol for Networked Measurement and Control
Systems, Oct. 2005, pp. 11-15.
and the slave clock crystal oscillation that affects the [10] M Ouellette, K Ji, S Liu, et al, “Using IEEE 1588 and boundary clocks for
synchronization precision. clock synchronization in telecom networks,” IEEE Communications
(3) The temperature drift of the crystal oscillation itself has a Magazine, vol. 49, no. 2, pp. 164-171, Feb. 2011.
great influence on the synchronization accuracy. And the PHY