中圖分類號(hào): TN927 文獻(xiàn)標(biāo)識(shí)碼: A DOI:10.16157/j.issn.0258-7998.201167 中文引用格式: 宋艷,應(yīng)斌杰,,楊成鋼,,等. 基于ZYNQ的PTP授時(shí)精度測(cè)量方法與實(shí)現(xiàn)[J].電子技術(shù)應(yīng)用,2021,,47(6):115-118,,130. 英文引用格式: Song Yan,Ying Binjie,,Yang Chenggang,,et al. A method and implementation of PTP timing accuracy measurement based on ZYNQ[J]. Application of Electronic Technique,2021,,47(6):115-118,,130.
A method and implementation of PTP timing accuracy measurement based on ZYNQ
Song Yan1,Ying Binjie1,,Yang Chenggang1,,Hao Zifei1,,Mao Lizhen2
1.Lishui Power Supply Company,State Grid Zhejiang Electric Power Co.,,Ltd,,Lishui 316021,China,; 2.Hangzhou Quantum Sensing Technology Co.,,Ltd.,Hangzhou 310019,,China
Abstract: Aiming at the difficulties of PTP timing accuracy measurement, this paper puts forward using μCOS operating system and LWIP protocol stack on ZYNQ SOC to realize PTP timing accuracy measurement. Accurate system time and clock source difference are obtained by receiving GNSS signals, and the system time is synchronized to the nanosecond counter of ZYNQ by hardware. The ZYNQ EMAC interface is used to acquire the observation time of PTP frames, and the source difference is used to compensate the measurement time. Finally, an accurate time stamps are obtained, which can be used to measure the timing accuracy of the PTP master clock. The test results show that using this method to measure PTP clock, the measurement accuracy is better than 10 ns.
Key words : PTP,;timing;GNSS,;time stamp
0 引言
精確時(shí)間協(xié)議(Precision Time Protocol,,PTP)是一種高精度網(wǎng)絡(luò)時(shí)間同步協(xié)議[1-2],具體內(nèi)容由IEEE 1588協(xié)議定義,。IEEE1588協(xié)議目前有V1和V2兩個(gè)版本,。其支持多種形式的傳輸,比如UDP/IPv4,、UDP/IPv6以及IEEE 802.3等,。PTP與網(wǎng)絡(luò)授時(shí)協(xié)議(Network Timing Protocol,NTP)的主要區(qū)別是,,PTP是在物理層實(shí)現(xiàn)而NTP是在應(yīng)用層實(shí)現(xiàn),。因此,PTP比NTP具有更高的同步精度,。PTP可以達(dá)到亞微秒級(jí)授時(shí)精度,,在網(wǎng)絡(luò)的節(jié)點(diǎn)(交換機(jī))支持PTP協(xié)議的情況下,能夠?qū)崿F(xiàn)納秒量級(jí)的授時(shí)精度[3-4],。