CN102215078A - Method for realizing hardware timestamp based on FPGA (field programmable gate array) - Google Patents

Method for realizing hardware timestamp based on FPGA (field programmable gate array) Download PDF

Info

Publication number
CN102215078A
CN102215078A CN2011101524513A CN201110152451A CN102215078A CN 102215078 A CN102215078 A CN 102215078A CN 2011101524513 A CN2011101524513 A CN 2011101524513A CN 201110152451 A CN201110152451 A CN 201110152451A CN 102215078 A CN102215078 A CN 102215078A
Authority
CN
China
Prior art keywords
fpga
ieee1588
message
sync
chip
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2011101524513A
Other languages
Chinese (zh)
Inventor
吴维宁
奚后玮
蒋元晨
范志刚
吴军民
吴鹏
张小建
黄治
王向群
黄在朝
孙洪雷
吴明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Electric Power Research Institute
Original Assignee
State Grid Electric Power Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Electric Power Research Institute filed Critical State Grid Electric Power Research Institute
Priority to CN2011101524513A priority Critical patent/CN102215078A/en
Publication of CN102215078A publication Critical patent/CN102215078A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Small-Scale Networks (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

The invention relates to a method for realizing hardware timestamp based on an FPGA (field programmable gate array), for realizing the acquirement of timestamp with high accuracy of network data, and belongs to the innovation of the IEEE1588 synchronous system aspect of internet time. The method is characterized in that the acquirement of IEEE1588 timestamp and the frequency adjustment of adjustable crystal oscillator are realized for FPGA programming by utilizing the VHDL (hardware description language), wherein the timestamp accuracy reaches 8ns; and a processor takes the timestamp acquired by the FPGA and inserts a corresponding IEEE1588 data frame, and further all network accuracy clock synchronization is realized.

Description

A kind of hardware timestamping implementation method based on FPGA
Technical field
The invention belongs to the communication of power system technical field, relate to a kind of hardware timestamping implementation method based on FPGA, this method can be used to realize the network time communication system based on IEEE1588.
Background technology
Along with the construction of intelligent grid, clock synchronization system becomes more and more important.Conventional substation need be set up one and overlap independently clock synchronization system.Adopting the GPS or the Big Dipper is time source, by the time allocation units time signal further is dispensed to each automation equipment at interval, and data acquisition is synchronous in the realization transformer station.Intelligent substation adopts IEC61850 to unify communication protocol, adopts the Industrial Ethernet technology to set up communication network, realizes the intellectuality of transformer station.Employing then can be simplified the system configuration of transformer station greatly based on the network time synchronization system of IEEE1588, reducings the construction costs, and reduces maintenance workload, is the developing direction of transformer station's clock synchronization system.
The network time synchronization system that sets up high-precision IEEE1588 must realize catching of high precision time stamp, and the subnetwork exchange chip provides catching of hardware timestamping at present, and part physical layer interface chip also provides catching of hardware timestamping.But in actual use, which kind of mode no matter all exists and uses dumbly, and the cost problem of higher presses for flexible, economic, practical, the high performance hardware timestamping implementation method of a kind of use.
Summary of the invention
In order to overcome the deficiencies in the prior art, realize that a kind of use is flexible, economical, high performance hardware timestamping catching method, the invention provides a kind of hardware timestamping catching method based on field-programmable.Utilize this method can realize based on IEEE1588 master clock, from the clock and the network switching equipment, and then form high-accuracy network clock synchronization system based on IEEE1588.
In order to realize the foregoing invention purpose, the present invention adopts following technical scheme:
(1) FPGA is between exchange chip and the ethernet physical layer chip, and FPGA is connected with physical chip with exchange chip respectively by the MII interface.
(2) the built-in elapsed time clock module of FPGA is used to provide real-time clock output.
(3) the built-in IEEE1588 bag of FPGA parsing module is used to resolve the Ethernet data bag.This module only is responsible for resolving the Ethernet bag, the bag data is not made any modification.
When (4) IEEE1588 bag parsing module is judged current data stream for the SYNC of IEEE1588 or Delay_Req message, the bag parsing module reads the real-time clock data of elapsed time clock output, and adds the on-chip memory that information such as corresponding ports, IP deposit FPGA in.
Beneficial effect of the present invention is, adopt the FPGA field programmable logic device, software by autonomous Design is realized the communication of algorithms, overcome the drawback of special chip on flexibility and practicality, satisfied the realization demand of IEEE1588 network time synchronization system, boundless application prospect will have been arranged.
Description of drawings
Fig. 1 is based on the hardware timestamping implementation method block diagram of FPGA.
Embodiment
Be on the FPGA hardware between exchange chip and the physical chip, it is connected with physical chip with exchange chip respectively by the MII interface.
IEEE1588 bag parsing module is responsible for resolving MII interface transmitting-receiving data flow, and it does not change the legacy data content.This bag parsing module is at first judged the 62nd byte of message, if " 0x01 " judges that this message is SYNC or Delay_Req message; When message the 62nd byte content is " 0x01 ", continue the 74th byte of analytic message, if " 0x00 " judges that then message is the SYNC message, if " 0x01 " judges that then message is the Delay_Req message.
When IEEE588 bag parsing module thinks that these data are the SYNC of IEEE1588 or Delay_Req message, read the real-time clock data of elapsed time clock module output, and add contents such as IP address, port address and deposit relevant on-chip memory in.
The on-chip memory capacity:
SYNC_IN: capacity is 1.Require to have only a main equipment in the network, switch has only a port to receive the SYNC message.When receiving next SYNC message, the value of updated stored device empties the SYNC_OUT register simultaneously.
SYNC_OUT: capacity equals the switch ports themselves number.This programme is set at 64.In case data are read by CPU, then memory is no longer preserved these data.When receiving the SYNC message, this on-chip memory will be cleared at every turn.
Delay_Req_IN: capacity supports that with local area network terminal the number of devices of IEEE1588 is relevant.This programme preliminary definition is that 5k(promptly supports 5k IEEE1588 terminal equipment in the local area network (LAN) at most).In case data are read by CPU, then memory is no longer preserved these data.When receiving the SYNC message, this on-chip memory will be cleared at every turn.
Delay_Req_OUT: capacity supports that with local area network terminal the number of devices of IEEE1588 is relevant.This programme preliminary definition is that 5k(promptly supports 5k IEEE1588 terminal equipment in the local area network (LAN) at most).In case data are read by CPU, then memory is no longer preserved these data.When receiving the SYNC message, this on-chip memory will be cleared at every turn.
According to the definition of IEEE1588 about time stamp point, the time that IEEE1588 samples to the bag parsing module must just can report CPU through calibration.The calibration value of input and output needs to measure by experiment, now lacks concrete typical data.
Can draw the time difference Offset of switch and standard time according to the computing of CPU.If switch need carry out time calibration, then need in elapsed time clock and 4 memories all time values all with the addition of Offset value.
By CPU according to the Offset value of repeatedly measuring calculate toggle speed adjustment amount (be the ratio reference clock that runs of exchange clock fast what or slowly how much), according to this adjustment amount, FPGA can adjust timing circuit (can select to use adjustable crystal oscillator or change two kinds of methods of timing system of timing circuit) make own clock try one's best with reference clock walk the same fast, thereby make the clock of switch itself reach a very accurate value.

Claims (3)

1. hardware timestamping implementation method based on FPGA, it is characterized in that: FPGA is between exchange chip and the physical chip, and it is connected with the phy chip layer with exchange chip respectively by Media Independent Interface MII.
2. a kind of hardware timestamping implementation method according to claim 1 based on FPGA, it is characterized in that: IEEE1588 bag parsing module is responsible for resolving MII interface transmitting-receiving data flow, judges whether this packet is the time-delay request message of SYNC message (sync message of IEEE1588 definition) or Delay _ Req(IEEE1588 definition) message.
3. a kind of hardware timestamping implementation method according to claim 2 based on FPGA, it is characterized in that: if receive message is SYNC or Delay _ Req message, then read the output of elapsed time clock module, the real-time clock data are inserted in SYNC or the Delay _ Req message, be transmitted to ppu, otherwise, be left intact directly to deliver and change chip and carry out exchanges data.
CN2011101524513A 2011-06-09 2011-06-09 Method for realizing hardware timestamp based on FPGA (field programmable gate array) Pending CN102215078A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011101524513A CN102215078A (en) 2011-06-09 2011-06-09 Method for realizing hardware timestamp based on FPGA (field programmable gate array)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011101524513A CN102215078A (en) 2011-06-09 2011-06-09 Method for realizing hardware timestamp based on FPGA (field programmable gate array)

Publications (1)

Publication Number Publication Date
CN102215078A true CN102215078A (en) 2011-10-12

Family

ID=44746227

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011101524513A Pending CN102215078A (en) 2011-06-09 2011-06-09 Method for realizing hardware timestamp based on FPGA (field programmable gate array)

Country Status (1)

Country Link
CN (1) CN102215078A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103713544A (en) * 2013-12-18 2014-04-09 国核自仪***工程有限公司 FPGA-based SOE system and SOE realization method thereof
CN103888320A (en) * 2014-04-14 2014-06-25 北京四方继保自动化股份有限公司 Switch device and method for measuring transmission delay through FPGA
CN110244635A (en) * 2019-06-24 2019-09-17 中国航空无线电电子研究所 With the remote data concentrator for calculating forwarding time function
CN113381832A (en) * 2021-06-09 2021-09-10 北京紫玉伟业电子科技有限公司 Precise time synchronization method based on FPGA platform
CN113573403A (en) * 2021-07-26 2021-10-29 南京濠暻通讯科技有限公司 Slave clock synchronization system and method for 5G RRU

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1642087A (en) * 2004-01-13 2005-07-20 三星电子株式会社 System and method for performing transmission and reception operations based on broadcast/communication convergence
US20080080562A1 (en) * 2006-09-29 2008-04-03 Burch Jefferson B Enhancement of IEEE 1588 synchronization using out-of-band communication path
CN201667660U (en) * 2010-03-03 2010-12-08 武汉迈威光电技术有限公司 Modularized IEEE1588 clock transparent transmission structure of Ethernet switch
CN101977104A (en) * 2010-11-13 2011-02-16 上海交通大学 IEEE1588 based accurate clock synchronization protocol system and synchronization method thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1642087A (en) * 2004-01-13 2005-07-20 三星电子株式会社 System and method for performing transmission and reception operations based on broadcast/communication convergence
US20080080562A1 (en) * 2006-09-29 2008-04-03 Burch Jefferson B Enhancement of IEEE 1588 synchronization using out-of-band communication path
CN201667660U (en) * 2010-03-03 2010-12-08 武汉迈威光电技术有限公司 Modularized IEEE1588 clock transparent transmission structure of Ethernet switch
CN101977104A (en) * 2010-11-13 2011-02-16 上海交通大学 IEEE1588 based accurate clock synchronization protocol system and synchronization method thereof

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103713544A (en) * 2013-12-18 2014-04-09 国核自仪***工程有限公司 FPGA-based SOE system and SOE realization method thereof
CN103713544B (en) * 2013-12-18 2018-10-02 国核自仪***工程有限公司 A method of the SOE systems based on FPGA realize SOE
CN103888320A (en) * 2014-04-14 2014-06-25 北京四方继保自动化股份有限公司 Switch device and method for measuring transmission delay through FPGA
CN110244635A (en) * 2019-06-24 2019-09-17 中国航空无线电电子研究所 With the remote data concentrator for calculating forwarding time function
CN113381832A (en) * 2021-06-09 2021-09-10 北京紫玉伟业电子科技有限公司 Precise time synchronization method based on FPGA platform
CN113381832B (en) * 2021-06-09 2022-11-15 北京紫玉伟业电子科技有限公司 Precise time synchronization method based on FPGA platform
CN113573403A (en) * 2021-07-26 2021-10-29 南京濠暻通讯科技有限公司 Slave clock synchronization system and method for 5G RRU
CN113573403B (en) * 2021-07-26 2023-11-03 南京濠暻通讯科技有限公司 Slave clock synchronization system and method for 5G RRU

Similar Documents

Publication Publication Date Title
CN101977104B (en) IEEE1588 based accurate clock synchronization protocol system and synchronization method thereof
CN102833062B (en) Intelligent substation IEEE1588 master-salve clock synchronization message setting means and system
CN102332973B (en) Real-time communication and clock synchronization method of chain network
CN102104475B (en) IEEE 1588-based synchronization system and synchronization method thereof
CN105450323B (en) A kind of SOE time synchronization control methods and system
CN102195768B (en) Method for realizing precision time protocol (PTP) with nanosecond-level precision
CN104754722B (en) A kind of method for synchronizing time towards stratification heterogeneous network
CN102215078A (en) Method for realizing hardware timestamp based on FPGA (field programmable gate array)
CN103532652B (en) A kind of time synchronism apparatus and method
CN103067112B (en) Clock synchronizing method, device and the network equipment
CN103969500A (en) Device, method and system for collecting smart power grid analog quantity
CN102547969A (en) High-accuracy wireless clock synchronization system for power system
CN102244572A (en) Clock synchronization method and device
CN103138887B (en) A kind of processing method and system of 1588 event message
CN103378993A (en) Slave clock monitoring method based on PTP
CN207939521U (en) A kind of clock synchronization apparatus towards digital transformer substation debugging
CN105846941A (en) IEEE-1588-standard-based clock transparent transmission apparatus and method
CN105391509A (en) FPGA-based network port high-precision time calibration method
CN105939243B (en) The processing system of multiport PTP message
CN112671598B (en) Special algorithm hardware module for electric power suitable for electric power system control protection device
CN105162726A (en) Remote SV data transmission and delay compensation method based on E1 link
Qi et al. Design and implementation of IEEE1588 time synchronization messages timestamping based on FPGA
CN104994034B (en) A kind of receiving/transmission method of the point-to-point SV messages of combining unit
CN103581205A (en) Method and system for realizing precise timestamps in multiple MACs (media access controls)
CN103096458A (en) Energy conservation time synchronization method of wireless temperature detecting net

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20111012