Computer Engineering and Applications ›› 2013, Vol. 49 ›› Issue (2): 72-75.

Previous Articles     Next Articles

Based on PTPd improved high-precision clock synchronization

SONG Shengjin, XU Yonghui, JIANG Shouda   

  1. Automatic Test and Control Institute, Harbin Institute of Technology, Harbin 150001, China
  • Online:2013-01-15 Published:2013-01-16

基于PTPd改进的高精密时钟同步实现

宋升金,许永辉,姜守达   

  1. 哈尔滨工业大学 自动化测试与控制研究所,哈尔滨 150001

Abstract: IEEE1588?defines a?Precision Clock Synchronization(PTP) protocol,?widely used in distributed measurement and control?systems.?The?PTP protocol?can be?achieved by pure software or?pure?hardware.?The?pure?software method can use the?open source?PTPd?code. It is simple but it can only?obtain millisecond?synchronization accuracy, while the pure hardware method through the?hardware programming can achieve?the synchronization precision?up?to?nanoseconds,?but?the?development?is difficult.?In this paper, based on?the?open source?PTPd,?it reserves?the upper portion of?the agreement, and uses?the DP83640?hardware?to capture the timestamp at the bottom instead of the original one. The test proves that it?greatly improves the?PTPd?synchronization?accuracy to?within?20 ns.

Key words: IEEE1588, PTPd, DP83640;?clock synchronization

摘要: IEEE1588定义了一种精密时钟同步(PTP)协议,广泛应用于分布式测控系统中。PTP协议可以通过纯软件或者纯硬件的方式实现。纯软件方式可采用开源的PTPd代码,开发简单,协议实现完整,但只能达到毫秒级同步精度;纯硬件方式通过硬件编程实现,同步精度可达纳秒量级,但是开发难度大。在开源的PTPd的基础上,保留协议上层部分,底层则采用DP83640硬件代替原有的软件捕获时间戳,经过测试,大大提高了PTPd的同步精度,达到了20 ns以内。

关键词: IEEE1588, PTPd, DP83640, 时钟同步