摘要
IEEE1588定义了一种精密时钟同步(PTP)协议,广泛应用于分布式测控系统中。PTP协议可以通过纯软件或者纯硬件的方式实现。纯软件方式可采用开源的PTPd代码,开发简单,协议实现完整,但只能达到毫秒级同步精度;纯硬件方式通过硬件编程实现,同步精度可达纳秒量级,但是开发难度大。在开源的PTPd的基础上,保留协议上层部分,底层则采用DP83640硬件代替原有的软件捕获时间戳,经过测试,大大提高了PTPd的同步精度,达到了20ns以内。
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 diffi- cult. In this paper, based on the open source PTPd, it reserves the upper portion of the agreement, and uses the DP83640 hard- ware to capture the timestamp at the bottom instead of the original one. The test proves that it greatly improves the PTPd syn- chronization accuracy to within 20 ns.
出处
《计算机工程与应用》
CSCD
2013年第2期72-75,85,共5页
Computer Engineering and Applications