电子科技 ›› 2019, Vol. 32 ›› Issue (11): 43-47.doi: 10.16180/j.cnki.issn1007-7820.2019.11.009

• • 上一篇    下一篇

基于FPGA的PTP时间同步技术实现

房晓瑜,王京梅,晏子杰,陈卓   

  1. 电子科技大学 电子科学与工程学院,四川 成都 610054
  • 收稿日期:2018-11-27 出版日期:2019-11-15 发布日期:2019-11-15
  • 作者简介:房晓瑜(1993- ),男,硕士研究生。研究方向:网络通信与图像处理。|王京梅(1968- ),女,副教授。研究方向:电路与系统。
  • 基金资助:
    中央高校基本科研业务费(ZYGX2016J162)

Implementation of PTP Time Synchronization Technology Based on FPGA

FANG Xiaoyu,WANG Jingmei,YAN Zijie,CHEN Zhuo   

  1. School of Electronic Science and Engineering,University of Electronic Science and Technology of China,Chengdu 610054,China
  • Received:2018-11-27 Online:2019-11-15 Published:2019-11-15
  • Supported by:
    The Fundamental Research Funds for the Central Universities(ZYGX2016J162)

摘要:

针对现有PTP时间同步技术实现方案系统复杂、结构冗余以及成本高的问题,文中提出了一种基于FPGA的PTP时间同步技术实现方案。通过在确立主从关系的FPGA系统之间交互四种报文的方式,从系统在数据链路层截取Sync和Delay_req报文的时间戳,并计算主从系统之间的链路延迟和时间偏移量,对本地时钟进行补偿以实现时间同步。文中采用Xilinx公司提供的ChipScope Pro工具做板级验证,抓取主从系统的时间信息,并测试同步精度和成功率。实验结果表明,所设计的系统在时间同步精度上可以达到纳秒级,同步的成功率基本维持在99.99%。

关键词: PTP, 时间同步, 延迟, 偏移量, 同步精度, 成功率

Abstract:

Aiming the problem of complexity, redundant structure and high cost in the implementation scheme of the existing PTP technology, this paper proposed an implementation scheme of PTP time synchronization technology based on FPGA. The timestamps of Sync and Delay_req messages were intercepted in the data link layer by establishing four kinds of messages between systems of FPGA which had the master-slave structure. Then, slave system calculated the link delay and time offset according to timestamps. Finally, the local clock of slave system was compensated to achieve the goal of time synchronization. ChipScope Pro tool provided by Xilinx was used to capture the time information of master and slave system, as well as to test time accuracy and success rate for board level verification in this study. The experimental results showed that the designed system could reach nanosecond accuracy in time synchronization, and the success rate of synchronization was basically maintained at 99.99%.

Key words: PTP, timesynchronization, delay, offset, synchronizationprecision, success rate

中图分类号: 

  • TN91