WO2014048167A1 - 分组传送网络中的系统时间同步装置及方法 - Google Patents

分组传送网络中的系统时间同步装置及方法 Download PDF

Info

Publication number
WO2014048167A1
WO2014048167A1 PCT/CN2013/080010 CN2013080010W WO2014048167A1 WO 2014048167 A1 WO2014048167 A1 WO 2014048167A1 CN 2013080010 W CN2013080010 W CN 2013080010W WO 2014048167 A1 WO2014048167 A1 WO 2014048167A1
Authority
WO
WIPO (PCT)
Prior art keywords
nanosecond
counter
time
compensation
signal
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.)
Ceased
Application number
PCT/CN2013/080010
Other languages
English (en)
French (fr)
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.)
Fiberhome Telecommunication Technologies Co Ltd
Original Assignee
Fiberhome Telecommunication Technologies Co Ltd
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 Fiberhome Telecommunication Technologies Co Ltd filed Critical Fiberhome Telecommunication Technologies Co Ltd
Publication of WO2014048167A1 publication Critical patent/WO2014048167A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0685Clock or time synchronisation in a node; Intranode synchronisation
    • H04J3/0697Synchronisation in a packet node
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/12Protocol engines
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/28Timers or timing mechanisms used in protocols

Definitions

  • the present invention relates to packet transport networks in optical communications, and more particularly to a system time synchronization apparatus and method in a packet transport network. Background technique
  • IP Internet Protocol
  • MSTP Multi-Service Transfer Platform
  • SDH-based multi-service delivery platform The network has become the mainstream transport bearer network.
  • the packet transmission network not only needs to be compatible with the frequency synchronization of the traditional SDH (Synchronous Digital Hierarchy) network, but also provides higher accuracy and more accurate timing requirements for time synchronization.
  • Time synchronization is CDMA (Code Division Multiple Access) and TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), TD-LTE (TD-SCDMA Long Term Evolution, TD-
  • CDMA Code Division Multiple Access
  • TD-SCDMA Time Division-Synchronous Code Division Multiple Access
  • TD-LTE TD-SCDMA Long Term Evolution, TD-
  • the traditional timing uses GPS (Global Positioning System) satellite timing, and the satellite timing is limited by antenna installation, weather, radio waves and other unfavorable factors; therefore, the new communication network proposes a method of GPS combined with ground time transmission.
  • NTP Network Time Protocol
  • NTP is timed by software. It can only meet the time transfer accuracy of milliseconds, and the time precision is low, which cannot meet the requirements of nanosecond accuracy.
  • PTP Precision Time Protocal
  • IEEE Institute of Electrical and Electronics Engineers
  • the synchronization protocol is designed to achieve accurate time synchronization of the control and test system.
  • the IEEE1588 protocol can implement ground transmission of the base station clock.
  • Time synchronization refers to the effective moment of the source end and the sink end, and the phase difference or frequency difference is kept within a certain precision tolerance range.
  • time synchronization technology uses software to time-stamp, and there are uncertain factors such as scheduling and jitter delay of the operating system process, affecting time synchronization. Precision. Summary of the invention
  • the object of the present invention is to overcome the deficiencies of the above background art and to provide a system time in a packet transmission network.
  • the synchronization device and method can realize the system time synchronization of nanosecond precision between the master and the slave in the packet transmission network effectively and quickly by the combination of software and hardware, and realize high-precision timing of the entire network.
  • the system time synchronization device in the packet transfer network comprises a CPU, a time synchronization module, an FPGA, a 1PPS+TOD time interface, the FPGA is connected to the CPU through a time synchronization module, and the FPGA also has a CPU, 1PPS+TOD time respectively.
  • the interfaces are connected, wherein: the CPU is used to: manage the FPGA; the input/output working mode of the 1PPS+TOD time interface is configured according to the mobile 1PPS+TOD time interface standard, and the 1PPS+TOD time interface is in the input working mode, when the CPU receives the time The PTP message is stamped, and the time stamp of the PTP message is extracted and recorded.
  • the combined FPGA calculates the nanosecond compensation value and the second compensation value of the local time deviation from the main time, and configures the nanosecond compensation value and the second compensation value into the FPGA; 1PPS When the +TOD time interface is in the output working mode, the CPU periodically generates a PTP packet, and encapsulates the time stamp sent by the time synchronization module into the PTP packet to form a PTP packet with a timestamp and sends it;
  • the synchronization module is used to: generate a time stamp and send to the CPU; receive a time stamped PTP message sent by the CPU, and the nanosecond synchronization information sent by the FPGA
  • the signal is combined with the FPGA to adjust the local clock, and the nanosecond information is synchronized to realize the synchronization between the local clock and the master clock.
  • the FPGA is used for: the joint time synchronization module maintains the local global time, and supports the initial value of the software; 1PPS+TOD time interface is in When inputting the working mode, the FPGA receives the standard time information directly input from the outside, and the joint CPU calculates the nanosecond compensation value and the second compensation value of the local time deviation from the main time, and performs the positive and negative time compensation of the nanosecond level and the other level of the nanosecond.
  • the system time synchronization of the device in the packet transmission network is realized; when the PPP+TOD time interface is in the output working mode, the FPGA outputs the accurate time information adjusted by the local 1588 protocol to the 1PPS+TOD time interface; the 1PPS+TOD time
  • the interface is used to: when receiving the input working mode, send the received TOD information and PPS information from the external network to the FPGA; when in the output working mode, send the TOD information and PPS information from the FPGA to the external network, the base station or other needs Time synchronized device obtains time synchronization letter directly from this interface interest.
  • the system time synchronization device further includes an entry time stamp module, an egress time stamp module, a first PTP port, and a second PTP port, where the first PTP port is connected to the CPU through an entry time stamp module.
  • the second PTP port is connected to the CPU through an egress timestamp module, where: the first PTP port is configured to: receive a data packet from an external network, and identify a time stamp according to a PTP message type identifier in the data packet.
  • the PTP packet is forwarded to the ingress timestamp module to be synchronized with the upstream device;
  • the ingress timestamp module is configured to: receive the PTP packet with the timestamp sent by the first PTP port, Recording the receiving time, and sending the time stamped PTP message to the CPU;
  • the export time stamping module is configured to: receive the time stamped PTP message sent by the CPU, send it to the second PTP port, and record and send
  • the second PTP port is configured to: receive the PTP packet sent by the egress timestamp module, and send the received PTP packet to the port of the external network.
  • the FPGA includes a local global time module, a second pulse control module, and a TOD codec control module, and the local global time module is respectively connected to the second pulse control module, the TOD codec control module, the time synchronization module, and the CPU.
  • the second pulse control module is connected to the 1PPS+TOD time interface, and the TOD codec control module is also respectively connected to the CPU and the 1PPS+TOD time interface, wherein: the local global time module is used to: receive the CPU The nanosecond initial value loading pulse, the nanosecond initial value, the second initial value loading pulse, the second initial value, the loading nanosecond initial value and the second initial value, and the nanosecond counting accumulation operation based on the initial value of the nanosecond, The accumulation operation of the second count is performed on the basis of the initial value of the second, and the local global time is maintained during the accumulation operation of the nanosecond count and the second count; the second pulse control module is configured to: input the PPS signal by using the concurrent selection method.
  • the TOD codec control The module is used to: select the input/output working mode of the 1PPS+TOD time interface.
  • the TOD interface decodes the input signal according to the mobile specification, and generates a clear signal, which is sent to the local global time. Module;
  • the TOD interface coded output signal is performed according to the mobile specification.
  • the local global time module includes a nanosecond counter and a second counter, the nanosecond counter is connected to the second counter, the nanosecond counter and the second counter are all connected to the time synchronization module, and the nanosecond counter also passes the second pulse.
  • the control module is connected to the 1PPS+TOD time interface, and the nanosecond counter is used to: load the pulse according to the nanosecond initial value sent by the CPU, the initial value of the nanosecond, and load the initial value of the nanosecond, and start on the basis of the initial value of the nanosecond.
  • the counting and accumulating operation is performed; the second counter is used to: load the pulse according to the initial value sent by the CPU, the initial value of the second, and load the initial value of the second, and start the counting operation of the second counting based on the initial value of the second.
  • the nanosecond counter is a nanosecond counter with a system clock of 30 bits.
  • the second counter is a second counter whose system clock is 32 bits.
  • the local global time module further includes a nanosecond enable control register, a second enable control register, and the nanosecond enable control register is connected to the nanosecond counter, and the second enable control register and the second The counters are connected, and the nanosecond enable control register is configured to: first disable the nanosecond counter counting, then enable the nanosecond counter to start counting, and map the nanosecond counter to a read-only register; the second enable control register is used for : Disable the second counter count first, then enable the second counter to start counting, and map the second counter to a read-only register.
  • the CPU is further configured to: obtain a current count value of the nanosecond counter and the second counter from the read-only register, and calculate a current time value.
  • the nanosecond counter is further configured to: add a clock signal of 125 MHz frequency, add 8 nanoseconds each time on the rising edge of the 125 MHz clock, perform a time accumulation count of 8 nanoseconds, and accumulate the total At 1 second, the nanosecond counter is carried to the second counter and generates a first PPS signal containing nanosecond synchronization information.
  • the nanosecond counter simultaneously transmits the first PPS signal to the time synchronization module and the second pulse control module, in the nanosecond counter.
  • the time value is the current local global nanosecond time value.
  • the second counter is further configured to: add 1 when the carry is valid, and perform an accumulated count in a step of 1 second, and the time value in the second counter is the current local global second time value.
  • the local global time module further includes an assignment enable pulse generation unit, wherein the assignment enable pulse generation unit is respectively connected to a CPU, a nanosecond counter, and a second counter, wherein the assignment enable pulse generation unit is used.
  • the assignment enable pulse generation unit is respectively connected to a CPU, a nanosecond counter, and a second counter, wherein the assignment enable pulse generation unit is used.
  • Second compensation signal When the nanosecond compensation signal is high level, the assignment enable pulse generation unit triggers the nanosecond counter to compensate for one nanosecond deviation data; when the second compensation signal is high level, the assignment enable pulse generation unit triggers the second counter to perform Compensation for one second deviation data.
  • the assignment enable pulse generating unit is further configured to receive a nanosecond compensation value and a second compensation value sent by the CPU, and when the nanosecond compensation signal is at a high level, the assignment enable pulse generation unit will receive nanoseconds.
  • the compensation signal and the nanosecond compensation value sent by the CPU are sent to the nanosecond counter, which triggers the nanosecond counter to compensate for the nanosecond deviation data; when the second compensation signal is high, the assignment enable pulse generation unit will compensate the second compensation signal and
  • the second compensation value sent by the CPU is sent to the second counter, which triggers the second counter to compensate for the second deviation data.
  • the nanosecond counter is further configured to: when detecting that the nanosecond compensation signal is valid, in combination with the nanosecond compensation value sent by the assignment enable pulse generating unit, perform nanosecond compensation on the current nanosecond data.
  • the nanosecond counter performs positive and negative nanosecond compensation on the current nanosecond data by setting a nanosecond addition and subtraction flag bit.
  • the nanosecond addition and subtraction flag when the nanosecond addition and subtraction flag is 0, the local clock lags behind the input signal, and the nanosecond counter performs positive nanosecond compensation on the current nanosecond data; when the nanosecond addition and subtraction flag is 1, local The clock leads the input signal, and the nanosecond counter compensates for the nanosecond data in the negative nanosecond.
  • the nanosecond compensation value is added to the current value of the nanosecond counter on the rising edge of the nanosecond compensation signal, and is assigned to the next nanometer.
  • the second counting period the nanosecond counter continues to count on this basis until the nanosecond counter counts for 1 second, the nanosecond counter advances to the second counter, and generates a first PPS signal containing nanosecond synchronization information, and the nanosecond counter will be first
  • the PPS signal is simultaneously sent to the time synchronization module and the second pulse control module; the second pulse control module sends the first PPS signal sent from the nanosecond counter to the 1PPS+TOD time interface, and the 1PPS+TOD time interface sends the second pulse control module.
  • the first PPS signal is sent to the external network; the time synchronization module keeps the nanosecond information synchronized according to the first PPS signal sent from the nanosecond counter.
  • the nanosecond compensation value is subtracted from the current value of the nanosecond counter on the rising edge of the nanosecond compensation signal, and is assigned to the next nanometer.
  • the second counting period the nanosecond counter continues to count on this basis, until the nanosecond counter is reduced to zero, the nanosecond counter borrows from the second counter; the nanosecond counter continues to count on this basis until the nanosecond counter counts for 1 second
  • the nanosecond counter is carried to the second counter, and generates a first PPS signal containing nanosecond synchronization information, the nanosecond counter simultaneously transmits the first PPS signal to the time synchronization module and the second pulse control module; the second pulse control module will be a nanosecond counter
  • the first PPS signal sent is sent to the 1PPS+TOD time interface, and the 1PPS+TOD time interface sends the first PPS signal sent by the second pulse control module to the external network; the time synchronization module sends the first according to the nanosecond counter.
  • PPS signal keeping nanosecond
  • the second counter is further configured to: when detecting that the second compensation signal is valid, combined with the second compensation value sent by the assignment enable pulse generating unit, perform second compensation on the current second data.
  • the second counter performs positive and negative second compensation on the current second data by setting a second addition and subtraction flag bit.
  • the second addition and subtraction flag when the second addition and subtraction flag is 0, the local clock lags behind the input signal, and the second counter performs positive second compensation on the current second data; when the second addition and subtraction flag is 1, the local clock leads the input signal.
  • the second counter compensates for the current second data in negative seconds.
  • the second compensation value is added to the current value of the second counter on the rising edge of the second compensation signal, and is assigned to the next second counting period, and the second counter is Continue counting on this basis.
  • the second compensation value is subtracted from the current value of the second counter on the rising edge of the second compensation signal, and is assigned to the next second counting period, and the second counter is Continue counting on this basis.
  • the CPU is further configured to perform an operation of clearing the configuration data, and set a content of the clear register.
  • the local global time module further includes a clear pulse generating unit, and the clear pulse generating unit is respectively connected to a nanosecond counter, a second counter, a CPU, a TOD codec control module, and the clear pulse
  • the generating unit is configured to: when the CPU finds that the time deviation is large or the synchronization source changes, a clear instruction is generated, and the clear instruction is sent to the clear pulse generating unit; the clear pulse generating unit receives the clear instruction sent by the CPU.
  • the clear signal sent by the TOD codec control module is synchronized
  • the system 125M clock signal is synchronized to generate a 125MHz pulse width clear pulse, which is simultaneously sent to the nanosecond counter and the second counter.
  • the nanosecond counter is further configured to: when receiving the clear pulse sent by the clear pulse generating unit, trigger a clear operation.
  • the second counter is further configured to: when receiving the clear pulse sent by the clear pulse generating unit, trigger a clear operation.
  • the CPU is further configured to: after implementing time synchronization, the CPU selects a single-step working mode or a two-step working mode according to an actual engineering application, and in the single-step working mode, the CPU sends the 1588 protocol packet.
  • Synchronous message to the external network the timestamp of the synchronization message is a nanosecond precision timestamp; in the two-step mode, the CPU sends the synchronization message in the 1588 protocol packet and sends the synchronization message.
  • the time following message is sent to the external network, and the time stamp of the synchronization message is a time stamp of nanosecond precision.
  • the physical interface of the 1PPS+TOD time interface adopts an RJ45 interface.
  • the invention also provides a system time synchronization method in a packet transfer network based on the system time synchronization device, which comprises the following steps: Sl, preparation work: after the device is powered on, the nanosecond counter and the second counter are prohibited from being counted, and then enabled.
  • the nanosecond counter and the second counter start counting, and both the nanosecond counter and the second counter are mapped into read-only registers, and the CPU obtains the current count value of the nanosecond counter and the second counter from the read-only register, and calculates the current time value; , initial value: CPU write load bit, generate nanosecond initial value load pulse under 125M clock signal, early second The value loads the pulse, and sends the nanosecond initial value loading pulse and the determined nanosecond initial value to the nanosecond counter, and sends the second initial value loading pulse and the determined initial value to the second counter; the nanosecond counter detects the CPU sending The nanosecond initial value loading pulse, the nanosecond initial value, and the loading nanosecond initial value; the second counter detects the second initial value loading pulse sent by the CPU, the initial value of the second, and the initial value of the loading second; S3, maintaining the local global time: The second counter starts the accumulation operation of the nanosecond count on the basis of the initial value of the nanosecond, and maintains the local global time during the accumulation operation of the nanosecond count to realize time synchron
  • step S3 includes the following steps: the nanosecond counter is clocked at a frequency of 125 MHz, and each time 8 nanoseconds is added on the rising edge of the 125 MHz clock, and the time is accumulated in a step of 8 nanoseconds, accumulating When 1 second is counted, the nanosecond counter is carried to the second counter, and a first PPS signal containing nanosecond synchronization information is generated, and the nanosecond counter simultaneously transmits the first PPS signal to the time synchronization module and the second pulse control module; When the carry is valid, 1 is added, and the count is counted in steps of 1 second.
  • the time values in the nanosecond counter and the second counter are all current local global time values.
  • step S3 further includes the following steps: the second pulse control module sends the first PPS signal sent by the nanosecond counter to the 1PPS+TOD time interface, and the 1PPS+TOD time interface sends the second pulse control module.
  • the incoming first PPS signal is sent to the external network; the time synchronization module keeps the nanosecond information synchronized according to the first PPS signal sent from the nanosecond counter.
  • step S3 further includes the following steps: the 1PPS+TOD time interface sends the received second PPS signal containing the nanosecond synchronization information from the external network to the second pulse control module, and the second pulse control module The second PPS signal is broadcasted to the time synchronization module, and the time synchronization module keeps the nanosecond information synchronized according to the second PPS signal.
  • step S3 further includes the following steps: when the nanosecond counter and the second counter are in the process of normal accumulating counting, when the nanosecond data and the second data are deviated, the CPU cooperates with the global time module in the FPGA to the nanosecond. The deviation data and the second deviation data are compensated.
  • the process in which the CPU cooperates with the global time module in the FPGA to compensate the nanosecond deviation data and the second deviation data is as follows:
  • the CPU 1588 software calculates the received PTP time packet with a time stamp.
  • the local time deviates from the nanosecond compensation value and the second compensation value of the main time, and the CPU sends the generated write signal, the chip select address signal, the nanosecond compensation value, and the second compensation value to the assignment enable pulse generation unit; the assignment enable pulse generation unit
  • a write pulse signal is synthesized and synchronized by the system 125M clock signal to generate two 125MHz pulse width assignment enable pulses, wherein an assignment enable pulse
  • As the nanosecond compensation signal another assignment enable pulse is used as the second compensation signal; when the nanosecond compensation signal is high, the nanosecond counter is triggered to compensate for the nanosecond deviation data; when the second compensation signal is high, the second counter is triggered. Perform a compensation for the second deviation data.
  • the assignment enable pulse generation unit when the nanosecond compensation signal is at a high level, the assignment enable pulse generation unit will make nanosecond compensation
  • the nanosecond compensation value sent by the compensation signal and the CPU is sent to the nanosecond counter; when the nanosecond counter detects that the nanosecond compensation signal is valid, the nanosecond compensation value sent by the assignment enable pulse generation unit is used to perform the current nanosecond data. Nanosecond compensation.
  • the nanosecond counter performs positive and negative nanosecond compensation on the current nanosecond data by setting a nanosecond addition and subtraction flag bit.
  • the nanosecond addition and subtraction flag when the nanosecond addition and subtraction flag is 0, the local clock lags behind the input signal, and the nanosecond counter performs positive nanosecond compensation on the current nanosecond data; when the nanosecond addition and subtraction flag is 1, local The clock leads the input signal, and the nanosecond counter compensates for the nanosecond data in the negative nanosecond.
  • the nanosecond compensation value is added to the current value of the nanosecond counter on the rising edge of the nanosecond compensation signal, and is assigned to the next nanometer.
  • the second counting period the nanosecond counter continues to count on this basis until the nanosecond counter counts for 1 second, the nanosecond counter advances to the second counter, and generates a first PPS signal containing nanosecond synchronization information, and the nanosecond counter will be first
  • the PPS signal is simultaneously sent to the time synchronization module and the second pulse control module; the second pulse control module sends the first PPS signal sent from the nanosecond counter to the 1PPS+TOD time interface, and the 1PPS+TOD time interface sends the second pulse control module.
  • the first PPS signal is sent to the external network; the time synchronization module keeps the nanosecond information synchronized according to the first PPS signal sent from the nanosecond counter.
  • the nanosecond compensation value is subtracted from the current value of the nanosecond counter on the rising edge of the nanosecond compensation signal, and is assigned to the next nanometer.
  • the second counting period the nanosecond counter continues to count on this basis, until the nanosecond counter is reduced to zero, the nanosecond counter borrows from the second counter; the nanosecond counter continues to count on this basis until the nanosecond counter counts for 1 second
  • the nanosecond counter is carried to the second counter, and generates a first PPS signal containing nanosecond synchronization information, the nanosecond counter simultaneously transmits the first PPS signal to the time synchronization module and the second pulse control module; the second pulse control module will be a nanosecond counter
  • the first PPS signal sent is sent to the 1PPS+TOD time interface, and the 1PPS+TOD time interface sends the first PPS signal sent by the second pulse control module to the external network; the time synchronization module sends the first according to the nanosecond counter.
  • PPS signal keeping nanosecond
  • the assignment enable pulse generation unit sends the second compensation signal and the second compensation value sent by the CPU to the second counter; when the second counter detects that the second compensation signal is valid, The value enables the second compensation value sent by the pulse generation unit, and performs second compensation on the current second data.
  • the second counter performs positive and negative second compensation on the current second data by setting a second addition and subtraction flag.
  • the second addition and subtraction flag when the second addition and subtraction flag is 0, the local clock lags behind the input signal, and the second counter performs positive second compensation on the current second data; when the second addition and subtraction flag is 1, the local clock leads the input signal.
  • the second counter compensates for the current second data in negative seconds.
  • the second compensation value is added to the current value of the second counter on the rising edge of the second compensation signal, and is assigned to the next second counting period, and the second counter is Continue counting on this basis.
  • the second compensation signal is The rising edge subtracts the current value of the second counter from the second offset value, and assigns it to the next second counting period, on which the second counter continues to count.
  • step S3 when the CPU finds that the time deviation is large or the synchronization source changes, a clear instruction is generated, and the clear instruction is sent to the clear pulse generating unit; the clear pulse generating unit is cleared.
  • the system 125M clock signal is synchronized to generate a 125MHz pulse width clear pulse, which is sent to the nanosecond counter and When the second counter, the nanosecond counter, and the second counter receive the clear pulse, the clear operation is triggered and the counting is restarted.
  • the CPU selects the single-step working mode or the double-step working mode according to the actual engineering application, and in the single-step working mode, the CPU sends the 1588 protocol packet.
  • Synchronous message in the medium to the external network the timestamp of the synchronization message is a nanosecond precision timestamp; in the two-step mode, the CPU sends the synchronization message in the 1588 protocol packet, and the synchronization message
  • the following message of the sending time is sent to the external network, and the time stamp of the synchronous message is a time stamp of nanosecond precision.
  • the invention adjusts the time deviation and maintains the local global time and the master time through the FPGA on the basis of the frequency synchronization of the slave station of the primary station, and has high flexibility and is convenient for upgrading and maintenance;
  • the CPU transmits PTP message information between the master and the slave station, and calculates Time deviation, through the combination of software and hardware, using time stamp compensation technology to process time, has high network reliability, can effectively and quickly realize system time synchronization of nanosecond accuracy between master and slave stations in packet transmission network
  • the high-precision timing of the entire network is realized, and the problem of low synchronization precision of the software time stamping is solved, and the application field of the packet transmission network has a wide application prospect.
  • FIG. 1 is a block diagram showing the structure of a system time synchronization apparatus in an embodiment of the present invention.
  • FIG. 2 is a structural block diagram of a local global time module in an embodiment of the present invention. detailed description
  • an embodiment of the present invention provides a system time synchronization device in a packet transmission network, including a CPU, a time synchronization module, an FPGA (Field-Programmable Gate Array), and a 1PPS+TOD (1).
  • Pulse Per Second+Time of Day time interface, entry time stamp module, exit time stamp module, first PTP port, second PTP port, the FPGA is connected to the CPU through the time synchronization module, and the first PTP port passes The entry time stamp module is connected to the CPU, and the second PTP port is connected to the CPU through the egress time stamping module, and the FPGA is also connected to the CPU and the 1PPS+TOD time interface respectively.
  • the first PTP port is configured to: receive a data packet from an external network, and identify according to a PTP packet type in the data packet. A PTP message with a timestamp is identified, and a timestamped message is forwarded to the entry timestamp module to synchronize with the upstream device.
  • the entry time stamp module is configured to: receive a time stamped ⁇ message sent by the first port, record the receiving time, and send the time stamped ⁇ message to the CPU.
  • the time synchronization module is configured to: generate a time stamp and send it to the CPU; receive a PTP message with a time stamp sent by the CPU, a signal sent by the FPGA containing nanosecond synchronization information, and the FPGA adjusts the local clock to keep the nanosecond information synchronized. , to achieve local clock and master clock synchronization.
  • the CPU is used to: manage the FPGA; configure the input/output working mode of the 1PPS+TOD time interface according to the mobile 1PPS+TOD time interface standard; when the 1PPS+TOD time interface is in the input working mode, the CPU receives the incoming time stamp module.
  • a time-stamped PTP message extracts and records the timestamp of the PTP message, and the combined FPGA calculates the nanosecond compensation value and the second compensation value of the local time deviation from the main time, and configures the nanosecond compensation value and the second compensation value into the FPGA.
  • the CPU When the 1PPS+TOD time interface is in the output working mode, the CPU periodically generates a PTP packet, and encapsulates the timestamp sent by the time synchronization module into the PTP packet to form a PTP packet with a timestamp and sends it.
  • To the exit time stamp module perform the operation of clearing the configuration data, and set the contents of the clear register.
  • the CPU selects the single-step working mode or the double-step working mode according to the actual engineering application. In the single-step working mode, the CPU sends the synchronous packet in the 1588 protocol packet to the external network, and the synchronous message is sent.
  • the time stamp is a time stamp of nanosecond precision; in the two-step working mode, the CPU sends the synchronization message in the 1588 protocol packet and the following message with the synchronization message transmission time to the external network, and the synchronization message The timestamp is sent in nanosecond precision.
  • the egress timestamp module is configured to: receive a timestamp PTP message sent by the CPU, send it to the second PTP port, and record the sending time.
  • the second PTP port is configured to: receive the PTP packet sent by the egress timestamp module, and send the received PTP packet to the port of the external network.
  • the FPGA is used to:
  • the joint time synchronization module maintains the local global time and supports the initial value of the software; when the 1PPS+TOD time interface is in the input working mode, the FPGA receives the standard time information directly input from the outside, and the joint CPU calculates the local time.
  • the nanosecond compensation value and the second compensation value deviating from the main time, and the positive and negative time compensation of the nanosecond level and the second level are performed, thereby realizing the system time synchronization of the device in the packet transmission network; when the 1PPS+TOD time interface is in the output working mode,
  • the FPGA outputs the accurate time information adjusted by the local 1588 protocol to the 1PPS+TOD time interface, so that the 1PPS+TOD time interface sends accurate time information to the external network.
  • the 1PPS+TOD time interface is used to: transmit TOD (Time of Day) information and PPS (Pulse Per Second) information from the FPGA to an external network, and the base station or other devices requiring time synchronization directly from the interface. Acquiring time synchronization information; transmitting received TOD information and PPS information from an external network to the FPGA; the physical connector adopts an RJ45 interface.
  • the FPGA includes a local global time module, a second pulse control module, and a TOD codec control module, wherein the local global time module and the second pulse control module, the TOD codec control module, and the time synchronization module respectively.
  • the block and the CPU are connected, and the second pulse control module is connected to the 1PPS+TOD time interface, and the TOD codec control module is also connected to the CPU and the 1PPS+TOD time interface respectively.
  • the local global time module is used to: receive the nanosecond initial value loading pulse sent by the CPU, the nanosecond initial value, the second initial value loading pulse, the second initial value, the loading nanosecond initial value and the second initial value, in the nanosecond initial value. Based on the accumulation operation of the nanosecond count, the accumulation operation of the second count is performed on the basis of the initial value of the second, and the local global time is maintained during the accumulation operation of the nanosecond count and the second count.
  • the second pulse control module is configured to: perform input/output processing on the PPS signal by using a concurrent selection method, and send the first PPS signal sent by the local global time module to the 1PPS+TOD time interface, and send the 1PPS+TOD time interface.
  • the incoming second PPS signal is broadcast to the time synchronization module.
  • the TOD codec control module is used to: select the input/output working mode of the 1PPS+TOD time interface.
  • the TOD interface decodes the input signal according to the mobile specification, and generates a clear signal, and sends For the local global time module; when the 1PPS+TOD time interface is in the output working mode, the TOD interface coded output signal is performed according to the mobile specification.
  • the local global time module includes a nanosecond counter with a system clock of 30 bits, a second counter with a system clock of 32 bits, a nanosecond enable control register, a second enable control register, and an assignment enable pulse generation unit.
  • the zero pulse generating unit, the nanosecond counter and the second counter are all connected to the time synchronization module, and the nanosecond counter is also connected to the 1PPS+TOD time interface through the second pulse control module, and the nanosecond enable control register is connected to the nanosecond counter, and the second enable is enabled.
  • the control register is connected to the second counter, the nanosecond counter is connected to the second counter, and the assignment enable pulse generating unit is respectively connected to the CPU, the nanosecond counter, and the second counter, and the clear pulse generating unit and the nanosecond counter, the second counter, the CPU, and the TOD, respectively.
  • the codec control module is connected.
  • the nanosecond counter is used to: load the pulse according to the initial value of the nanosecond, the initial value of the nanosecond, load the initial value of the nanosecond, and start the counting and accumulating operation based on the initial value of the nanosecond: the clock signal with a frequency of 125MHz, Add 8 nanoseconds each time on the rising edge of the 125MHz clock, and accumulate the time in steps of 8 nanoseconds.
  • the nanosecond counter advances to the second counter and generates the first information containing the nanosecond synchronization information.
  • the PPS signal, the nanosecond counter sends the first PPS signal to the time synchronization module and the second pulse control module simultaneously, and the time value in the nanosecond counter is the current local global nanosecond time value.
  • the second counter is used to: load the pulse according to the initial value sent by the CPU, the initial value of the second, load the initial value of the second, and start the accumulation of the second count based on the initial value of the second: add 1 to the 1st, when the carry is valid
  • the clock counts up for the step size, and the time value in the second counter is the current local global time value.
  • the nanosecond enable control register is used to: first disable the nanosecond counter count, then enable the nanosecond counter to start counting, and map the nanosecond counter to a read-only register.
  • the second enable control register is used to: first disable the second counter count, then enable the second counter to start counting, and map the second counter to a read-only register.
  • the assignment enable pulse generation unit is configured to: receive a write signal sent by the CPU, a chip select address signal, a nanosecond compensation value, The second compensation value, using the write signal sent by the CPU and the chip select address signal, synthesizes a write pulse signal, and synchronizes the clock signal through the system 125M to generate two 125MHz pulse width assignment enable pulses, one of which The assignment enable pulse is used as the nanosecond compensation signal, and the other assignment enable pulse is used as the second compensation signal.
  • the nanosecond compensation signal is high, the assignment enable pulse generation unit compensates the nanosecond compensation signal and the nanosecond compensation sent by the CPU.
  • the value is sent to the nanosecond counter, which triggers the nanosecond counter to compensate for the nanosecond deviation data.
  • the assignment enable pulse generation unit sends the second compensation signal and the second compensation value sent by the CPU to the second.
  • the counter the trigger second counter, compensates for one second of the deviation data.
  • the nanosecond counter is also used to: when detecting that the nanosecond compensation signal is valid, combined with the nanosecond compensation value sent by the assignment enable pulse generating unit, nanosecond compensation is performed on the current nanosecond data.
  • the nanosecond counter compensates for the current nanosecond data by setting the nanosecond addition and subtraction flag. When the nanosecond addition and subtraction flag is 0, the local clock lags behind the input signal, and the nanosecond counter compensates for the current nanosecond data. When the nanosecond addition and subtraction flag is 1, the local clock leads the input signal, nanoseconds.
  • the counter performs negative nanosecond compensation on the current nanosecond data.
  • the nanosecond compensation value is added to the current value of the nanosecond counter on the rising edge of the nanosecond compensation signal, and is assigned to the next nanosecond counting period, and the nanosecond counter is On this basis, counting continues until the nanosecond counter counts for 1 second, the nanosecond counter is carried to the second counter, and a first PPS signal containing nanosecond synchronization information is generated, and the nanosecond counter simultaneously transmits the first PPS signal to the time synchronization module.
  • the second pulse control module sends the first PPS signal sent by the nanosecond counter to the 1PPS+TOD time interface, and the 1PPS+TOD time interface sends the first PPS signal sent by the second pulse control module to the outside.
  • the time synchronization module keeps the nanosecond information synchronized according to the first PPS signal sent from the nanosecond counter.
  • the nanosecond counter performs negative nanosecond compensation on the current nanosecond data
  • the nanosecond compensation value is subtracted from the current value of the nanosecond counter on the rising edge of the nanosecond compensation signal, and is assigned to the next nanosecond counting period, and the nanosecond counter is On this basis, continue counting until the nanosecond counter is reduced to zero, the nanosecond counter borrows from the second counter;
  • the nanosecond counter continues to count on this basis until the nanosecond counter counts for 1 second, and the nanosecond counter carries the second counter
  • the second pulse control module sends the first PPS signal sent by the nanosecond counter To the 1PPS+TOD time interface, the 1PPS+TOD time interface sends the first PPS signal sent by the second pulse control module to the external network; the time synchronization
  • the second counter is further configured to: when the second compensation signal is valid, combined with the second compensation value sent by the assignment enable pulse generating unit, perform second compensation on the current second data.
  • the second counter compensates for the current second data by setting the second addition and subtraction flag.
  • the second addition and subtraction flag is 0, the local clock lags behind the input signal, and the second counter compensates for the current second data.
  • the second addition and subtraction flag is 1, the local clock leads the input signal, and the second counter performs the current second data.
  • Negative seconds compensation When the second counter performs positive second compensation on the current second data, the second compensation value is added to the current value of the second counter on the rising edge of the second compensation signal, and is assigned to the next second counting period, and the second counter continues counting on this basis.
  • the clear pulse generating unit is configured to: when the CPU finds that the time deviation is large or the synchronization source changes, a clear instruction is generated, and the clear instruction is sent to the clear pulse generating unit; the clear pulse generating unit receives the sending from the CPU
  • the system 125M clock signal is synchronized to generate a 125MHz pulse width clear pulse, which is simultaneously sent to the nanosecond counter, the second counter, and the nanosecond counter.
  • the second counter receives the clear pulse, it triggers the clear operation.
  • the embodiment of the present invention further provides a system time synchronization method in a packet transmission network, which includes the following steps:
  • initial value CPU write load bit, generate nanosecond initial value loading pulse, second initial value loading pulse under 125M clock signal, and send nanosecond initial value loading pulse and determined nanosecond initial value to nanosecond
  • the counter sends the second initial value loading pulse and the determined initial value of the second to the second counter;
  • the nanosecond counter detects the nanosecond initial value loading pulse sent by the CPU, the nanosecond initial value, and the loading nanosecond initial value;
  • the second counter detects The initial value of the second value sent by the CPU loads the pulse, the initial value of the second, and loads the initial value of the second.
  • the nanosecond counter starts the accumulation operation of the nanosecond count on the basis of the initial value of the nanosecond, and maintains the local global time during the accumulation operation of the nanosecond count, realizing the time synchronization; the second counter is in the second On the basis of the initial value, the accumulation operation of the second count is started, and the local global time is maintained during the accumulation operation of the second count to realize time synchronization.
  • the nanosecond counter has a clock signal of 125MHz (corresponding to 8 nanosecond period), and adds 8 nanoseconds (that is, a resolution of 8 nanoseconds) on the rising edge of the 125MHz clock, and accumulates the time in steps of 8 nanoseconds. .
  • the first PTP port and the second PTP port support asymmetric adjustment of the path delay, and the adjustment range is 0 nanoseconds to 100 microseconds, and the adjusted step size is required to be no more than 10 nanoseconds. Therefore, the time adjustment of the embodiment of the present invention is designed.
  • the step size is 8 nanoseconds, which can meet the requirements of the adjustment range.
  • the first PTP port and the second PTP port support the delay adjustment setting function.
  • the nanosecond counter performs an accumulated count in steps of 8 nanoseconds.
  • the accumulated count is 1 second (that is, the period of 125 million 8 nanoseconds is counted)
  • the nanosecond counter is carried to the second counter, and the second minute synchronization information is generated.
  • a PPS signal the nanosecond counter sends the first PPS signal to the time synchronization module and the second pulse control module simultaneously; the second counter is incremented by 1 when the carry is valid, and the count is accumulated in steps of 1 second, the nanosecond counter, seconds
  • the time value in the counter is the current local global time value.
  • the second pulse control module sends the first PPS signal sent by the nanosecond counter to the 1PPS+TOD time interface, and the 1PPS+TOD time interface sends the first PPS signal sent by the second pulse control module to the external network; the time synchronization module is based on The first PPS signal sent from the nanosecond counter keeps the nanosecond information synchronized.
  • the 1PPS+TOD time interface sends the received second PPS signal containing the nanosecond synchronization information from the external network to the second pulse control module, and the second pulse control module broadcasts the second PPS signal to the time synchronization module, and the time synchronization module
  • the block keeps the nanosecond information synchronized according to the second PPS signal.
  • the CPU 1588 software calculates the nanosecond compensation value and the second compensation value of the local time deviation from the main time through the received PTP time message with time stamp, the write signal generated by the CPU, the chip select address signal, and the nanosecond.
  • the compensation value and the second compensation value are sent to the assignment enable pulse generation unit; the assignment enable pulse generation unit synthesizes a write pulse signal by using the write signal and the chip select address signal sent from the CPU, and synchronizes through the system 125M clock signal.
  • Second compensation When the second compensation signal is high, the assignment enable pulse generation unit sends the second compensation signal and the second compensation value sent by the CPU to the second counter, and triggers the second counter to compensate for one second deviation data; the second counter detects the second. When the compensation signal is valid, the second compensation value is added to the current second data in combination with the second compensation value sent by the assignment enable pulse generation unit.
  • the nanosecond counter performs positive and negative nanosecond compensation for the data before and after the nanosecond by setting the nanosecond addition and subtraction flag: When the nanosecond addition and subtraction flag is 0, the local clock lags behind the input signal, and the nanosecond counter is for the current nanosecond.
  • the data is positive nanosecond compensation; when the nanosecond addition and subtraction flag is 1, the local clock leads the input signal, and the nanosecond counter compensates for the nanosecond data.
  • the nanosecond counter When the nanosecond counter compensates for the current nanosecond data, the nanosecond counter adds: the nanosecond compensation value is added to the current value of the nanosecond counter on the rising edge of the nanosecond compensation signal, and is assigned to the next nanosecond. Counting cycle, the nanosecond counter continues counting on this basis until the nanosecond counter counts for 1 second, the nanosecond counter is carried to the second counter, and a first PPS signal containing nanosecond synchronization information is generated, and the nanosecond counter will be the first PPS
  • the signal is simultaneously sent to the time synchronization module and the second pulse control module; the second pulse control module sends the first PPS signal sent by the nanosecond counter to the 1PPS+TOD time interface, and the 1PPS+TOD time interface sends the second pulse control module.
  • the first PPS signal is sent to the external network; the time synchronization module keeps the nanosecond information synchronized according to the first PPS signal sent from the nanosecond counter.
  • the nanosecond counter When the nanosecond counter compensates for the nanosecond data, the nanosecond counter performs subtraction: subtracts the nanosecond compensation value from the current value of the nanosecond counter on the rising edge of the nanosecond compensation signal, and assigns it to the next nanosecond. Counting period, the nanosecond counter continues to count on this basis, until the nanosecond counter is reduced to zero, the nanosecond counter borrows from the second counter; the nanosecond counter continues to count on this basis until the nanosecond counter counts for 1 second,
  • the nanosecond counter carries the second counter and generates a first PPS signal containing nanosecond synchronization information, and the nanosecond counter simultaneously transmits the first PPS signal to the time synchronization module and the second pulse control module; the second pulse control module sends the nanosecond counter
  • the first PPS signal is sent to the 1PPS+TOD time interface, and the 1PPS+TOD time interface sends the first PPS signal sent by the second pulse control module to the external network; the time synchronization module sends the first PPS according to the nanosecond counter
  • the second counter performs positive and negative second compensation for the current second data by setting the second addition and subtraction flag: When the second addition and subtraction flag is 0, the local clock lags behind the input signal, and the second counter compensates the current second data for positive seconds; When the flag is 1, the local clock leads the input signal, and the second counter compensates for the current second data in negative seconds.
  • the second counter performs positive second compensation on the current second data
  • the second counter performs addition: the second compensation value is added to the current value of the second counter on the rising edge of the second compensation signal, and is assigned to the next second counting period.
  • the second counter performs subtraction: the second compensation value is subtracted from the second offset counter value on the rising edge of the second compensation signal, and is assigned to the next second counting period. Continue counting.
  • a clear instruction is generated, and the clear instruction is sent to the clear pulse generating unit; the clear pulse generating unit receives the clear instruction and the TOD codec sent by the CPU.
  • the clear signal from the control module is synchronized, the system 125M clock signal is synchronized to generate a 125MHz pulse width clear pulse, which is sent to the nanosecond counter, the second counter, the nanosecond counter, and the second counter to be cleared.
  • the clear operation is triggered and the counting is restarted.
  • the CPU selects the single-step working mode or the double-step working mode according to the actual engineering application.
  • the CPU sends the synchronous packet in the 1588 protocol packet to the external network, and the synchronous message is sent.
  • the time stamp is a time stamp of nanosecond precision; in the two-step working mode, the CPU sends the synchronization message in the 1588 protocol packet and the following message with the synchronization message transmission time to the external network, and the synchronization message
  • the timestamp is sent in nanosecond precision.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Electric Clocks (AREA)

Description

分组传送网络中的系统时间同步装置及方法 技术领域
本发明涉及光通信中的分组传送网络, 特别是涉及一种分组传送网络中的系统时间同 步装置及方法。 背景技术
随着 3G/4G业务的应用及普及, 业务向 IP (Internet Protocol, 网络之间互连的协议) 化多业务发展发展, 分组传送网络是以分组为核心的传送网络, 替代 MSTP (Multi-Service Transfer Platform, 基于 SDH的多业务传送平台) 网络成为了主流的传送承载网络。 分组传 送网络不仅需要兼容传统的 SDH ( Synchronous Digital Hierarchy, 同步数字系列) 网络的频 率同步, 还对时间同步提出了更高精确度, 更准确的定时要求。 时间同步是 CDMA (Code Division Multiple Access , 码分多址) 和 TD-SCDMA ( Time Division- Synchronous Code Division Multiple Access , 时分同步码分多址) 、 TD-LTE ( TD-SCDMA Long Term Evolution, TD-SCDMA长期演进) 业务的基本需求, 实现时间同步是通信系统网络可靠工 作的保障。
传统的定时采用 GPS (Global Positioning System, 全球定位系统)卫星定时, 卫星定时 受天线安装、 天气、 无线电波等不利因素的限制; 故新的通信网络提出了 GPS结合地面时 间传送的方式。 起初地面时间同步链路采用 NTP (Network Time Protocol, 网络时间协议) 传送, NTP通过软件进行定时, 只能满足毫秒级别的时间传递精度, 时间精度低, 无法满 足纳秒级精度的要求。 为满足无线时间同步基站的微秒级时间的精度要求, 提出了 PTP (Precision Time Protocal, 精石角时间协议) , 即 IEEE (Institute of Electrical and Electronics Engineers, 美国电气和电子工程师协会) 1588v2 精确时间同步协议, 目的是为实现控制及 测试系统的精确的时间同步, IEEE1588协议可以实现基站时钟的地面传送。 时间同步指源 端与宿端在相对应的有效瞬间, 其相位差或频率差保持在一定精度允许范围之内。
随着网络数据 IP多业务的发展, 对时间同步的要求越来越高, 目前的时间同步技术使 用软件打时戳的方式, 存在操作系统进程的调度、 抖动延迟等不确定因素, 影响时间同步 的精度。 发明内容
本发明的目的是为了克服上述背景技术的不足, 提供一种分组传送网络中的系统时间 同步装置及方法, 通过软硬件结合的方式, 能有效快速地实现分组传送网络中主从站之间 纳秒级精度的系统时间同步, 实现整个网络的高精度定时。
本发明提供的分组传送网络中的系统时间同步装置, 包括 CPU、 时间同步模块、 FPGA, 1PPS+TOD时间接口, 所述 FPGA通过时间同步模块与 CPU相连, FPGA还分别与 CPU、 1PPS+TOD时间接口相连, 其中: 所述 CPU用于: 管理 FPGA; 按移动 1PPS+TOD 时间接口标准配置 1PPS+TOD时间接口的输入 /输出工作模式, 1PPS+TOD时间接口处于输 入工作模式时, CPU接收带有时戳的 PTP报文, 提取并记录 PTP报文的时戳, 联合 FPGA 计算出本地时间偏离主时间的纳秒补偿值、 秒补偿值, 将纳秒补偿值、 秒补偿值配置到 FPGA中; 1PPS+TOD时间接口处于输出工作模式时, CPU周期性的产生 PTP报文, 并将 时间同步模块发来的时戳封装到 PTP报文中, 形成带有时戳的 PTP报文并发送; 所述时间 同步模块用于: 产生时戳并发送到 CPU; 接收 CPU发来的带有时戳的 PTP报文、 FPGA发 来的含有纳秒同步信息的信号, 联合 FPGA调整本地时钟, 保持纳秒信息同步, 实现本地 时钟和主时钟同步; 所述 FPGA用于: 联合时间同步模块维护本地的全局时间, 支持软件 赋初值; 1PPS+TOD 时间接口处于输入工作模式时, FPGA接收到从外部直接输入的标准 时间信息, 联合 CPU计算出本地时间偏离主时间的纳秒补偿值、 秒补偿值, 进行纳秒级 另 lj、 秒级别的正负时间补偿, 从而实现分组传送网络中设备的系统时间同步; 1PPS+TOD 时间接口处于输出工作模式时, FPGA将本地经过 1588协议调整后的精确时间信息输出到 1PPS+TOD时间接口; 所述 1PPS+TOD时间接口用于: 处于输入工作模式时, 将接收的来 自外部网络的 TOD信息、 PPS信息发送到 FPGA; 处于输出工作模式时, 将来自 FPGA的 TOD信息、 PPS信息发送到外部网络, 基站或其他需要时间同步的设备直接从该接口获取 时间同步信息。
在上述技术方案中, 所述系统时间同步装置还包括入口时戳模块、 出口时戳模块、 第 一 PTP端口、 第二 PTP端口, 所述第一 PTP端口通过入口时戳模块与 CPU相连, 所述第 二 PTP端口通过出口时戳模块与 CPU相连, 其中: 所述第一 PTP端口用于: 接收来自外部 网络的数据包, 根据数据包中的 PTP报文类型识别符, 识别出带有时戳的 PTP报文, 将带 有时戳的 PTP报文转发到入口时戳模块, 与上游设备同步; 所述入口时戳模块用于: 接收 第一 PTP端口发来的带有时戳的 PTP报文, 记录接收时间, 并将带有时戳的 PTP报文发送 给 CPU; 所述出口时戳模块用于: 接收 CPU发来的带有时戳的 PTP报文, 再发送到第二 PTP端口, 并记录发送时间; 所述第二 PTP端口用于: 接收出口时戳模块发来的 PTP报 文, 将接收的 PTP报文发送到外部网络的端口。
在上述技术方案中, 所述 FPGA包括本地全局时间模块、 秒脉冲控制模块和 TOD编解 码控制模块, 本地全局时间模块分别与秒脉冲控制模块、 TOD 编解码控制模块、 时间同步 模块、 CPU相连, 秒脉冲控制模块与 1PPS+TOD时间接口相连, TOD编解码控制模块还分 别与 CPU、 1PPS+TOD时间接口相连, 其中: 所述本地全局时间模块用于: 接收 CPU发来 的纳秒初值装载脉冲、 纳秒初值、 秒初值装载脉冲、 秒初值, 装载纳秒初值和秒初值, 在 纳秒初值的基础上进行纳秒计数的累加操作, 在秒初值的基础上进行秒计数的累加操作, 在纳秒计数、 秒计数的累加操作过程中维护本地全局时间; 所述秒脉冲控制模块用于: 采 用并发选收的方式对 PPS信号进行输入 /输出的处理, 将本地全局时间模块发来的第一 PPS 信号发送到 1PPS+TOD时间接口, 将 1PPS+TOD时间接口发来的第二 PPS信号广播到时间 同步模块; 所述 TOD编解码控制模块用于: 选择 1PPS+TOD时间接口的输入 /输出工作模 式, 当 1PPS+TOD 时间接口处于输入工作模式时, 按移动规范进行 TOD接口解码输入信 号, 并产生清零信号, 发送给本地全局时间模块; 当 1PPS+TOD时间接口处于输出工作模 式时, 按移动规范进行 TOD接口编码输出信号。
在上述技术方案中, 所述本地全局时间模块包括纳秒计数器和秒计数器, 所述纳秒计 数器与秒计数器相连, 纳秒计数器、 秒计数器均与时间同步模块相连, 纳秒计数器还通过 秒脉冲控制模块与 1PPS+TOD时间接口相连, 所述纳秒计数器用于: 根据 CPU发来的纳秒 初值装载脉冲、 纳秒初值, 装载纳秒初值, 在纳秒初值的基础上开始进行计数累加操作; 所述秒计数器用于: 根据 CPU发来的秒初值装载脉冲、 秒初值, 装载秒初值, 在秒初值的 基础上开始进行秒计数的累加操作。
在上述技术方案中, 所述纳秒计数器是系统时钟为 30位的纳秒计数器。
在上述技术方案中, 所述秒计数器是系统时钟为 32位的秒计数器。
在上述技术方案中, 所述本地全局时间模块还包括纳秒使能控制寄存器、 秒使能控制 寄存器, 所述纳秒使能控制寄存器与纳秒计数器相连, 所述秒使能控制寄存器与秒计数器 相连, 所述纳秒使能控制寄存器用于: 先禁止纳秒计数器计数, 再使能纳秒计数器开始计 数, 并将纳秒计数器映射成只读寄存器; 所述秒使能控制寄存器用于: 先禁止秒计数器计 数, 再使能秒计数器开始计数, 并将秒计数器映射成只读寄存器。
在上述技术方案中, 所述 CPU还用于: 从只读寄存器中获取纳秒计数器、 秒计数器的 当前计数值, 并计算出当前时间值。
在上述技术方案中, 所述纳秒计数器还用于: 以 125MHz频率的时钟信号, 在 125MHz 时钟的上升沿每次加 8纳秒, 进行步长为 8纳秒的时间累加计数, 累加计满 1秒时, 纳秒计 数器向秒计数器进位, 并产生含有纳秒同步信息的第一 PPS信号, 纳秒计数器将第一 PPS 信号同时发送到时间同步模块和秒脉冲控制模块, 纳秒计数器中的时间值为当前本地全局 的纳秒时间值。
在上述技术方案中, 所述秒计数器还用于: 在进位有效时加 1, 以 1秒钟为步长进行累 加计数, 秒计数器中的时间值为当前本地全局的秒时间值。
在上述技术方案中, 所述本地全局时间模块还包括赋值使能脉冲产生单元, 所述赋值 使能脉冲产生单元分别与 CPU、 纳秒计数器、 秒计数器相连, 所述赋值使能脉冲产生单元 用于: 接收 CPU发来的写信号、 片选地址信号, 利用 CPU发来的写信号和片选地址信号, 综合出一个写脉冲信号, 并通过系统 125M 时钟信号进行同步化处理, 产生两个 125MHz 脉冲宽度的赋值使能脉冲, 其中, 一个赋值使能脉冲作为纳秒补偿信号, 另一个赋值使能 脉冲作为秒补偿信号; 纳秒补偿信号为高电平时, 赋值使能脉冲产生单元触发纳秒计数器 进行一次纳秒偏差数据的补偿; 秒补偿信号为高电平时, 赋值使能脉冲产生单元触发秒计 数器进行一次秒偏差数据的补偿。
在上述技术方案中, 所述赋值使能脉冲产生单元还用于接收 CPU发来的纳秒补偿值、 秒补偿值, 当纳秒补偿信号为高电平时, 赋值使能脉冲产生单元将纳秒补偿信号和 CPU发 来的纳秒补偿值发送到纳秒计数器, 触发纳秒计数器进行一次纳秒偏差数据的补偿; 当秒 补偿信号为高电平时, 赋值使能脉冲产生单元将秒补偿信号和 CPU发来的秒补偿值发送到 秒计数器, 触发秒计数器进行一次秒偏差数据的补偿。
在上述技术方案中, 所述纳秒计数器还用于: 检测到纳秒补偿信号有效时, 结合赋值 使能脉冲产生单元发来的纳秒补偿值, 对当前纳秒数据进行纳秒补偿。
在上述技术方案中, 所述纳秒计数器通过设置纳秒加减标志位, 对当前纳秒数据进行 正负纳秒补偿。
在上述技术方案中, 所述纳秒加减标志位为 0 时, 本地时钟落后于输入信号, 纳秒计 数器对当前纳秒数据进行正纳秒补偿; 纳秒加减标志位为 1 时, 本地时钟超前于输入信 号, 纳秒计数器对当前纳秒数据进行负纳秒补偿。
在上述技术方案中, 所述纳秒计数器对当前纳秒数据进行正纳秒补偿时, 在纳秒补偿 信号的上升沿将纳秒补偿值加上纳秒计数器的当前值, 赋值到下一个纳秒计数周期, 纳秒 计数器在此基础上继续计数, 直至纳秒计数器计数满 1 秒, 纳秒计数器向秒计数器进位, 并产生含有纳秒同步信息的第一 PPS信号, 纳秒计数器将第一 PPS信号同时发送到时间同 步模块和秒脉冲控制模块; 秒脉冲控制模块将纳秒计数器发来的第一 PPS 信号发送到 1PPS+TOD时间接口, 1PPS+TOD时间接口再将秒脉冲控制模块发来的第一 PPS信号发送 到外部网络; 时间同步模块根据纳秒计数器发来的第一 PPS信号, 保持纳秒信息同步。
在上述技术方案中, 所述纳秒计数器对当前纳秒数据进行负纳秒补偿时, 在纳秒补偿 信号的上升沿将纳秒补偿值减去纳秒计数器的当前值, 赋值到下一个纳秒计数周期, 纳秒 计数器在此基础上继续计数, 直至纳秒计数器减到零时, 纳秒计数器向秒计数器借位; 纳 秒计数器在此基础上继续计数, 直至纳秒计数器计数满 1 秒, 纳秒计数器向秒计数器进 位, 并产生含有纳秒同步信息的第一 PPS信号, 纳秒计数器将第一 PPS信号同时发送到时 间同步模块和秒脉冲控制模块; 秒脉冲控制模块将纳秒计数器发来的第一 PPS信号发送到 1PPS+TOD时间接口, 1PPS+TOD时间接口再将秒脉冲控制模块发来的第一 PPS信号发送 到外部网络; 时间同步模块根据纳秒计数器发来的第一 PPS信号, 保持纳秒信息同步。
在上述技术方案中, 所述秒计数器还用于: 检测到秒补偿信号有效时, 结合赋值使能 脉冲产生单元发来的秒补偿值, 对当前秒数据进行秒补偿。 在上述技术方案中, 所述秒计数器通过设置秒加减标志位, 对当前秒数据进行正负秒 补偿。
在上述技术方案中, 所述秒加减标志位为 0 时, 本地时钟落后于输入信号, 秒计数器 对当前秒数据进行正秒补偿; 秒加减标志位为 1 时, 本地时钟超前于输入信号, 秒计数器 对当前秒数据进行负秒补偿。
在上述技术方案中, 所述秒计数器对当前秒数据进行正秒补偿时, 在秒补偿信号的上 升沿将秒补偿值加上秒计数器的当前值, 赋值到下一个秒计数周期, 秒计数器在此基础上 继续计数。
在上述技术方案中, 所述秒计数器对当前秒数据进行负秒补偿时, 在秒补偿信号的上 升沿将秒补偿值减去秒计数器的当前值, 赋值到下一个秒计数周期, 秒计数器在此基础上 继续计数。
在上述技术方案中, 所述 CPU还用于进行清零配置数据的操作, 设置清零寄存器的内 容。
在上述技术方案中, 所述本地全局时间模块还包括清零脉冲产生单元, 所述清零脉冲 产生单元分别与纳秒计数器、 秒计数器、 CPU、 TOD 编解码控制模块相连, 所述清零脉冲 产生单元用于: CPU发现时间偏差较大或者同步源发生改变时, 产生一个清零指令, 将清 零指令发送到清零脉冲产生单元; 清零脉冲产生单元接收到 CPU发来的清零指令和 TOD编 解码控制模块发来的清零信号时, 通过系统 125M 时钟信号进行同步化处理, 产生一个 125MHz脉冲宽度的清零脉冲, 同时发送到纳秒计数器、 秒计数器。
在上述技术方案中, 所述纳秒计数器还用于: 接收到所述清零脉冲产生单元发来的清 零脉冲时, 触发清零操作。
在上述技术方案中, 所述秒计数器还用于: 接收到所述清零脉冲产生单元发来的清零 脉冲时, 触发清零操作。
在上述技术方案中, 所述 CPU还用于: 实现时间同步以后, CPU根据实际工程应用选 择单步式工作模式或双步式工作模式, 在单步式工作模式下, CPU发送 1588协议包中的同 步报文到外部网络, 同步报文的发送时戳为纳秒级精度的时戳; 在双步式工作模式下, CPU发送 1588协议包中的同步报文、 以及带有同步报文发送时间的跟随报文到外部网络, 同步报文的发送时戳为纳秒级精度的时戳。
在上述技术方案中, 所述 1PPS+TOD时间接口的物理接头采用 RJ45接口。
本发明还提供一种基于上述系统时间同步装置的分组传送网络中的系统时间同步方 法, 包括以下步骤: Sl、 准备工作: 设备上电后, 先禁止纳秒计数器、 秒计数器计数, 再 使能纳秒计数器、 秒计数器开始计数, 同时将纳秒计数器和秒计数器均映射成只读寄存 器, CPU 从只读寄存器中获取纳秒计数器、 秒计数器的当前计数值, 并计算出当前时间 值; S2、 赋初值: CPU写装载比特位, 在 125M时钟信号下产生纳秒初值装载脉冲、 秒初 值装载脉冲, 并将纳秒初值装载脉冲和确定的纳秒初值发送到纳秒计数器, 将秒初值装载 脉冲和确定的秒初值发送到秒计数器; 纳秒计数器检测到 CPU发来的纳秒初值装载脉冲、 纳秒初值, 装载纳秒初值; 秒计数器检测到 CPU发来的秒初值装载脉冲、 秒初值, 装载秒 初值; S3、 维护本地全局时间: 纳秒计数器在纳秒初值的基础上开始进行纳秒计数的累加 操作, 并在纳秒计数的累加操作过程中维护本地全局时间, 实现时间同步; 秒计数器在秒 初值的基础上开始进行秒计数的累加操作, 并在秒计数的累加操作过程中维护本地全局时 间, 实现时间同步。
在上述技术方案中, 步骤 S3包括以下步骤: 所述纳秒计数器以 125MHz频率的时钟信 号, 在 125MHz时钟的上升沿每次加 8纳秒, 进行步长为 8纳秒的时间累加计数, 累加计 满 1秒时, 纳秒计数器向秒计数器进位, 并产生含有纳秒同步信息的第一 PPS信号, 纳秒 计数器将第一 PPS信号同时发送到时间同步模块和秒脉冲控制模块; 秒计数器则在进位有 效时加 1, 以 1秒钟为步长进行累加计数, 纳秒计数器、 秒计数器里的时间值均为当前本地 全局的时间值。
在上述技术方案中, 步骤 S3还包括以下步骤: 所述秒脉冲控制模块将纳秒计数器发来 的第一 PPS信号发送到 1PPS+TOD时间接口, 1PPS+TOD时间接口再将秒脉冲控制模块发 来的第一 PPS信号发送到外部网络; 时间同步模块根据纳秒计数器发来的第一 PPS信号, 保持纳秒信息同步。
在上述技术方案中, 步骤 S3还包括以下步骤: 所述 1PPS+TOD时间接口将接收到的来 自外部网络的含有纳秒同步信息的第二 PPS信号发送到秒脉冲控制模块, 秒脉冲控制模块 将第二 PPS信号广播到时间同步模块, 时间同步模块根据第二 PPS信号, 保持纳秒信息同 步。
在上述技术方案中, 步骤 S3还包括以下步骤: 在纳秒计数器、 秒计数器在正常累加计 数的过程中, 发生纳秒数据和秒数据的偏差时, CPU联合 FPGA中的全局时间模块对纳秒 偏差数据和秒偏差数据进行补偿。
在上述技术方案中, 所述 CPU联合 FPGA中的全局时间模块对纳秒偏差数据和秒偏差 数据进行补偿的过程如下: CPU的 1588软件通过接收到的带有时戳的 PTP时间报文, 计算 出本地时间偏离主时间的纳秒补偿值、 秒补偿值, CPU将产生的写信号、 片选地址信号、 纳秒补偿值、 秒补偿值发送给赋值使能脉冲产生单元; 赋值使能脉冲产生单元利用 CPU发 来的写信号和片选地址信号, 综合出一个写脉冲信号, 并通过系统 125M 时钟信号进行同 步化处理, 产生两个 125MHz脉冲宽度的赋值使能脉冲, 其中, 一个赋值使能脉冲作为纳 秒补偿信号, 另一个赋值使能脉冲作为秒补偿信号; 纳秒补偿信号为高电平时, 触发纳秒 计数器进行一次纳秒偏差数据的补偿; 秒补偿信号为高电平时, 触发秒计数器进行一次秒 偏差数据的补偿。
在上述技术方案中, 所述纳秒补偿信号为高电平时, 赋值使能脉冲产生单元将纳秒补 偿信号和 CPU发来的纳秒补偿值发送给纳秒计数器; 纳秒计数器检测到纳秒补偿信号有效 时, 结合赋值使能脉冲产生单元发来的纳秒补偿值, 对当前纳秒数据进行纳秒补偿。
在上述技术方案中, 所述纳秒计数器通过设置纳秒加减标志位, 对当前纳秒数据进行 正负纳秒补偿。
在上述技术方案中, 所述纳秒加减标志位为 0 时, 本地时钟落后于输入信号, 纳秒计 数器对当前纳秒数据进行正纳秒补偿; 纳秒加减标志位为 1 时, 本地时钟超前于输入信 号, 纳秒计数器对当前纳秒数据进行负纳秒补偿。
在上述技术方案中, 所述纳秒计数器对当前纳秒数据进行正纳秒补偿时, 在纳秒补偿 信号的上升沿将纳秒补偿值加上纳秒计数器的当前值, 赋值到下一个纳秒计数周期, 纳秒 计数器在此基础上继续计数, 直至纳秒计数器计数满 1 秒, 纳秒计数器向秒计数器进位, 并产生含有纳秒同步信息的第一 PPS信号, 纳秒计数器将第一 PPS信号同时发送到时间同 步模块和秒脉冲控制模块; 秒脉冲控制模块将纳秒计数器发来的第一 PPS 信号发送到 1PPS+TOD时间接口, 1PPS+TOD时间接口再将秒脉冲控制模块发来的第一 PPS信号发送 到外部网络; 时间同步模块根据纳秒计数器发来的第一 PPS信号, 保持纳秒信息同步。
在上述技术方案中, 所述纳秒计数器对当前纳秒数据进行负纳秒补偿时, 在纳秒补偿 信号的上升沿将纳秒补偿值减去纳秒计数器的当前值, 赋值到下一个纳秒计数周期, 纳秒 计数器在此基础上继续计数, 直至纳秒计数器减到零时, 纳秒计数器向秒计数器借位; 纳 秒计数器在此基础上继续计数, 直至纳秒计数器计数满 1 秒, 纳秒计数器向秒计数器进 位, 并产生含有纳秒同步信息的第一 PPS信号, 纳秒计数器将第一 PPS信号同时发送到时 间同步模块和秒脉冲控制模块; 秒脉冲控制模块将纳秒计数器发来的第一 PPS信号发送到 1PPS+TOD时间接口, 1PPS+TOD时间接口再将秒脉冲控制模块发来的第一 PPS信号发送 到外部网络; 时间同步模块根据纳秒计数器发来的第一 PPS信号, 保持纳秒信息同步。
在上述技术方案中, 所述秒补偿信号为高电平时, 赋值使能脉冲产生单元将秒补偿信 号和 CPU发来的秒补偿值发送给秒计数器; 秒计数器检测到秒补偿信号有效时, 结合赋值 使能脉冲产生单元发来的秒补偿值, 对当前秒数据进行秒补偿。
在上述技术方案中, 所述秒计数器通过设置秒加减标志位, 对当前秒数据进行正负秒 补偿。
在上述技术方案中, 所述秒加减标志位为 0 时, 本地时钟落后于输入信号, 秒计数器 对当前秒数据进行正秒补偿; 秒加减标志位为 1 时, 本地时钟超前于输入信号, 秒计数器 对当前秒数据进行负秒补偿。
在上述技术方案中, 所述秒计数器对当前秒数据进行正秒补偿时, 在秒补偿信号的上 升沿将秒补偿值加上秒计数器的当前值, 赋值到下一个秒计数周期, 秒计数器在此基础上 继续计数。
在上述技术方案中, 所述秒计数器对当前秒数据进行负秒补偿时, 在秒补偿信号的上 升沿将秒补偿值减去秒计数器的当前值, 赋值到下一个秒计数周期, 秒计数器在此基础上 继续计数。
在上述技术方案中, 步骤 S3之后还包括以下步骤: CPU发现时间偏差较大或者同步源 发生改变时, 产生一个清零指令, 将清零指令发送到清零脉冲产生单元; 清零脉冲产生单 元接收到 CPU发来的清零指令和 TOD编解码控制模块发来的清零信号时, 通过系统 125M 时钟信号进行同步化处理, 产生一个 125MHz脉冲宽度的清零脉冲, 同时发送到纳秒计数 器和秒计数器, 纳秒计数器、 秒计数器接收到清零脉冲时, 触发清零操作, 重新开始计 数。
在上述技术方案中, 步骤 S3之后还包括以下步骤: 实现时间同步以后, CPU根据实际 工程应用选择单步式工作模式或双步式工作模式, 在单步式工作模式下, CPU发送 1588协 议包中的同步报文到外部网络, 同步报文的发送时戳为纳秒级精度的时戳; 在双步式工作 模式下, CPU发送 1588协议包中的同步报文、 以及带有同步报文发送时间的跟随报文到外 部网络, 同步报文的发送时戳为纳秒级精度的时戳。
与现有技术相比, 本发明的优点如下:
本发明在主站从站频率同步的基础上, 通过 FPGA调整时间偏差、 维护本地全局时间 与主时间同步, 灵活度高, 便于升级维护; CPU在主从站之间传递 PTP报文信息, 计算时 间偏差, 通过软硬件结合的方式, 利用时戳补偿等技术对时间进行处理, 具有较高网络可 靠性, 能有效快速地实现分组传送网络中主从站之间纳秒级精度的系统时间同步, 实现整 个网络的高精度定时, 解决了软件打时戳的同步精度低的问题, 在分组传送网络的同步领 域具有很广泛的应用前景。 附图说明
图 1是本发明实施例中系统时间同步装置的结构框图。
图 2是本发明实施例中本地全局时间模块的结构框图。 具体实施方式
下面结合附图及具体实施例对本发明作进一步的详细描述。
参见图 1 所示, 本发明实施例提供一种分组传送网络中的系统时间同步装置, 包括 CPU、 时间同步模块、 FPGA (Field -Programmable Gate Array, 现场可编程门阵列) 、 1PPS+TOD ( 1 Pulse Per Second+Time of Day, 秒脉冲日时间)时间接口、 入口时戳模块、 出 口时戳模块、 第一 PTP端口、 第二 PTP端口, FPGA通过时间同步模块与 CPU相连, 第一 PTP端口通过入口时戳模块与 CPU相连, 第二 PTP端口通过出口时戳模块与 CPU相连, FPGA还分别与 CPU、 1PPS+TOD时间接口相连。
第一 PTP端口用于: 接收来自外部网络的数据包, 根据数据包中的 PTP报文类型识别 符, 识别出带有时戳的 PTP报文, 将带有时戳的 ΡΤΡ报文转发到入口时戳模块, 与上游设 备同步。
入口时戳模块用于: 接收第一 ΡΤΡ端口发来的带有时戳的 ΡΤΡ报文, 记录接收时间, 并将带有时戳的 ΡΤΡ报文发送给 CPU。
时间同步模块用于: 产生时戳并发送到 CPU; 接收 CPU发来的带有时戳的 PTP报文、 FPGA发来的含有纳秒同步信息的信号, 联合 FPGA调整本地时钟, 保持纳秒信息同步, 实 现本地时钟和主时钟同步。
CPU用于: 管理 FPGA; 按移动 1PPS+TOD时间接口标准配置 1PPS+TOD时间接口同 步的输入 /输出工作模式; 当 1PPS+TOD时间接口处于输入工作模式时, CPU接收入口时戳 模块发来的带有时戳的 PTP报文, 提取并记录 PTP报文的时戳, 联合 FPGA计算出本地时 间偏离主时间的纳秒补偿值、 秒补偿值, 将纳秒补偿值、 秒补偿值配置到 FPGA 中; 当 1PPS+TOD时间接口处于输出工作模式时, CPU周期性的产生 PTP报文, 并将时间同步模 块发来的时戳封装到 PTP报文中, 形成带有时戳的 PTP报文, 并发送到出口时戳模块; 进 行清零配置数据的操作, 设置清零寄存器的内容。 实现时间同步以后, CPU根据实际工程 应用选择单步式工作模式或双步式工作模式, 在单步式工作模式下, CPU发送 1588协议包 中的同步报文到外部网络, 同步报文的发送时戳为纳秒级精度的时戳; 在双步式工作模式 下, CPU发送 1588协议包中的同步报文、 以及带有同步报文发送时间的跟随报文到外部网 络, 同步报文的发送时戳为纳秒级精度的时戳。
出口时戳模块用于: 接收 CPU发来的带有时戳的 PTP报文, 再发送到第二 PTP端口, 并记录发送时间。
第二 PTP端口用于: 接收出口时戳模块发来的 PTP报文, 将接收的 PTP报文发送到外 部网络的端口。
FPGA 用于: 联合时间同步模块维护本地的全局时间, 支持软件赋初值; 当 1PPS+TOD 时间接口处于输入工作模式时, FPGA接收到从外部直接输入的标准时间信 息, 联合 CPU计算出本地时间偏离主时间的纳秒补偿值、 秒补偿值, 进行纳秒级别、 秒级 别的正负时间补偿, 从而实现分组传送网络中设备的系统时间同步; 当 1PPS+TOD时间接 口处于输出工作模式时, FPGA 将本地经过 1588 协议调整后的精确时间信息输出到 1PPS+TOD时间接口, 以便 1PPS+TOD时间接口将精确时间信息发送到外部网络。
1PPS+TOD时间接口用于: 将来自 FPGA的 TOD (Time of Day, 日时间) 信息、 PPS ( Pulse Per Second, 秒脉冲)信息发送到外部网络, 基站或其他需要时间同步的设备直接从 该接口获取时间同步信息; 将接收的来自外部网络的 TOD信息、 PPS信息发送到 FPGA; 物理接头采用 RJ45接口。
参见图 1所示, FPGA包括本地全局时间模块、 秒脉冲控制模块和 TOD编解码控制模 块, 其中, 本地全局时间模块分别与秒脉冲控制模块、 TOD 编解码控制模块、 时间同步模 块、 CPU相连, 秒脉冲控制模块与 1PPS+TOD时间接口相连, TOD编解码控制模块还分别 与 CPU、 1PPS+TOD时间接口相连。
本地全局时间模块用于: 接收 CPU发来的纳秒初值装载脉冲、 纳秒初值、 秒初值装载 脉冲、 秒初值, 装载纳秒初值和秒初值, 在纳秒初值的基础上进行纳秒计数的累加操作, 在秒初值的基础上进行秒计数的累加操作, 在纳秒计数、 秒计数的累加操作过程中维护本 地全局时间。
秒脉冲控制模块用于: 采用并发选收的方式对 PPS信号进行输入 /输出的处理, 将本地 全局时间模块发来的第一 PPS信号发送到 1PPS+TOD时间接口, 将 1PPS+TOD时间接口发 来的第二 PPS信号广播到时间同步模块。
TOD 编解码控制模块用于: 选择 1PPS+TOD 时间接口的输入 /输出工作模式, 当 1PPS+TOD时间接口处于输入工作模式时, 按移动规范进行 TOD接口解码输入信号, 并产 生清零信号, 发送给本地全局时间模块; 当 1PPS+TOD时间接口处于输出工作模式时, 按 移动规范进行 TOD接口编码输出信号。
参见图 2所示, 本地全局时间模块包括系统时钟为 30位的纳秒计数器、 系统时钟为 32 位的秒计数器、 纳秒使能控制寄存器、 秒使能控制寄存器、 赋值使能脉冲产生单元清零脉 冲产生单元, 纳秒计数器、 秒计数器均与时间同步模块相连, 纳秒计数器还通过秒脉冲控 制模块与 1PPS+TOD时间接口相连, 纳秒使能控制寄存器与纳秒计数器相连, 秒使能控制 寄存器与秒计数器相连, 纳秒计数器与秒计数器相连, 赋值使能脉冲产生单元分别与 CPU, 纳秒计数器、 秒计数器相连, 清零脉冲产生单元分别与纳秒计数器、 秒计数器、 CPU, TOD编解码控制模块相连。
纳秒计数器用于: 根据 CPU发来的纳秒初值装载脉冲、 纳秒初值, 装载纳秒初值, 在 纳秒初值的基础上开始进行计数累加操作: 以 125MHz频率的时钟信号, 在 125MHz时钟 的上升沿每次加 8纳秒, 进行步长为 8纳秒的时间累加计数, 累加计满 1秒时, 纳秒计数器 向秒计数器进位, 并产生含有纳秒同步信息的第一 PPS信号, 纳秒计数器将第一 PPS信号 同时发送到时间同步模块和秒脉冲控制模块, 纳秒计数器中的时间值为当前本地全局的纳 秒时间值。
秒计数器用于: 根据 CPU发来的秒初值装载脉冲、 秒初值, 装载秒初值, 在秒初值的 基础上开始进行秒计数的累加操作: 在进位有效时加 1, 以 1秒钟为步长进行累加计数, 秒 计数器中的时间值为当前本地全局的秒时间值。
纳秒使能控制寄存器用于: 先禁止纳秒计数器计数, 再使能纳秒计数器开始计数, 并 将纳秒计数器映射成只读寄存器。
秒使能控制寄存器用于: 先禁止秒计数器计数, 再使能秒计数器开始计数, 并将秒计 数器映射成只读寄存器。
赋值使能脉冲产生单元用于: 接收 CPU发来的写信号、 片选地址信号、 纳秒补偿值、 秒补偿值, 利用 CPU发来的写信号和片选地址信号, 综合出一个写脉冲信号, 并通过系统 125M时钟信号进行同步化处理, 产生两个 125MHz脉冲宽度的赋值使能脉冲, 其中, 一个 赋值使能脉冲作为纳秒补偿信号, 另一个赋值使能脉冲作为秒补偿信号; 当纳秒补偿信号 为高电平时, 赋值使能脉冲产生单元将纳秒补偿信号和 CPU发来的纳秒补偿值发送到纳秒 计数器, 触发纳秒计数器进行一次纳秒偏差数据的补偿; 当秒补偿信号为高电平时, 赋值 使能脉冲产生单元将秒补偿信号和 CPU发来的秒补偿值发送到秒计数器, 触发秒计数器进 行一次秒偏差数据的补偿。
纳秒计数器还用于: 检测到纳秒补偿信号有效时, 结合赋值使能脉冲产生单元发来的 纳秒补偿值, 对当前纳秒数据进行纳秒补偿。 纳秒计数器通过设置纳秒加减标志位, 对当 前纳秒数据进行正负纳秒补偿。 纳秒加减标志位为 0 时, 本地时钟落后于输入信号, 纳秒 计数器对当前纳秒数据进行正纳秒补偿; 纳秒加减标志位为 1 时, 本地时钟超前于输入信 号, 纳秒计数器对当前纳秒数据进行负纳秒补偿。 纳秒计数器对当前纳秒数据进行正纳秒 补偿时, 在纳秒补偿信号的上升沿将纳秒补偿值加上纳秒计数器的当前值, 赋值到下一个 纳秒计数周期, 纳秒计数器在此基础上继续计数, 直至纳秒计数器计数满 1 秒, 纳秒计数 器向秒计数器进位, 并产生含有纳秒同步信息的第一 PPS信号, 纳秒计数器将第一 PPS信 号同时发送到时间同步模块和秒脉冲控制模块; 秒脉冲控制模块将纳秒计数器发来的第一 PPS信号发送到 1PPS+TOD时间接口, 1PPS+TOD时间接口再将秒脉冲控制模块发来的第 一 PPS信号发送到外部网络; 时间同步模块根据纳秒计数器发来的第一 PPS信号, 保持纳 秒信息同步。 纳秒计数器对当前纳秒数据进行负纳秒补偿时, 在纳秒补偿信号的上升沿将 纳秒补偿值减去纳秒计数器的当前值, 赋值到下一个纳秒计数周期, 纳秒计数器在此基础 上继续计数, 直至纳秒计数器减到零时, 纳秒计数器向秒计数器借位; 纳秒计数器在此基 础上继续计数, 直至纳秒计数器计数满 1 秒, 纳秒计数器向秒计数器进位, 并产生含有纳 秒同步信息的第一 PPS信号, 纳秒计数器将第一 PPS信号同时发送到时间同步模块和秒脉 冲控制模块; 秒脉冲控制模块将纳秒计数器发来的第一 PPS信号发送到 1PPS+TOD时间接 口, 1PPS+TOD时间接口再将秒脉冲控制模块发来的第一 PPS信号发送到外部网络; 时间 同步模块根据纳秒计数器发来的第一 PPS信号, 保持纳秒信息同步。
秒计数器还用于: 检测到秒补偿信号有效时, 结合赋值使能脉冲产生单元发来的秒补 偿值, 对当前秒数据进行秒补偿。 秒计数器通过设置秒加减标志位, 对当前秒数据进行正 负秒补偿。 秒加减标志位为 0 时, 本地时钟落后于输入信号, 秒计数器对当前秒数据进行 正秒补偿; 秒加减标志位为 1 时, 本地时钟超前于输入信号, 秒计数器对当前秒数据进行 负秒补偿。 秒计数器对当前秒数据进行正秒补偿时, 在秒补偿信号的上升沿将秒补偿值加 上秒计数器的当前值, 赋值到下一个秒计数周期, 秒计数器在此基础上继续计数。 秒计数 器对当前秒数据进行负秒补偿时, 在秒补偿信号的上升沿将秒补偿值减去秒计数器的当前 值, 赋值到下一个秒计数周期, 秒计数器在此基础上继续计数。 清零脉冲产生单元用于: CPU发现时间偏差较大或者同步源发生改变时, 产生一个清 零指令, 将清零指令发送到清零脉冲产生单元; 清零脉冲产生单元接收到 CPU发来的清零 指令和 TOD 编解码控制模块发来的清零信号时, 通过系统 125M 时钟信号进行同步化处 理, 产生一个 125MHz脉冲宽度的清零脉冲, 同时发送到纳秒计数器、 秒计数器, 纳秒计 数器、 秒计数器接收到清零脉冲时, 触发清零操作。
在上述系统时间同步装置的基础上, 本发明实施例还提供一种分组传送网络中的系统 时间同步方法, 包括以下步骤:
51、 准备工作: 设备上电后, 先禁止纳秒计数器、 秒计数器计数, 再使能纳秒计数 器、 秒计数器开始计数, 同时将纳秒计数器和秒计数器均映射成只读寄存器, CPU从只读 寄存器中获取纳秒计数器、 秒计数器的当前计数值, 并计算出当前时间值。
52、 赋初值: CPU写装载比特位, 在 125M时钟信号下产生纳秒初值装载脉冲、 秒初 值装载脉冲, 并将纳秒初值装载脉冲和确定的纳秒初值发送到纳秒计数器, 将秒初值装载 脉冲和确定的秒初值发送到秒计数器; 纳秒计数器检测到 CPU发来的纳秒初值装载脉冲、 纳秒初值, 装载纳秒初值; 秒计数器检测到 CPU发来的秒初值装载脉冲、 秒初值, 装载秒 初值。
53、 维护本地全局时间: 纳秒计数器在纳秒初值的基础上开始进行纳秒计数的累加操 作, 并在纳秒计数的累加操作过程中维护本地全局时间, 实现时间同步; 秒计数器在秒初 值的基础上开始进行秒计数的累加操作, 并在秒计数的累加操作过程中维护本地全局时 间, 实现时间同步。
纳秒计数器以 125MHz频率 (对应 8纳秒周期) 的时钟信号, 在 125MHz时钟的上升 沿每次加 8纳秒(即分辨率为 8纳秒), 进行步长为 8纳秒的时间累加计数。 基于第一 PTP 端口、 第二 PTP端口支持路径延迟的不对称调整, 调整的范围为 0纳秒〜 100微秒, 调整的 步长要求不大于 10纳秒, 所以本发明实施例设计的时间调整的步长为 8纳秒, 能够达到调 整范围的要求, 同时第一 PTP端口、 第二 PTP端口均支持时延调整设置功能。 纳秒计数器 进行以 8纳秒为步长的累加计数, 累加计满 1秒(即计满 125000000个 8纳秒周期)时, 纳 秒计数器向秒计数器进位, 并产生含有纳秒同步信息的第一 PPS信号, 纳秒计数器将第一 PPS信号同时发送到时间同步模块和秒脉冲控制模块; 秒计数器则在进位有效时加 1, 以 1 秒钟为步长进行累加计数, 纳秒计数器、 秒计数器里的时间值均为当前本地全局的时间 值。
秒脉冲控制模块将纳秒计数器发来的第一 PPS 信号发送到 1PPS+TOD 时间接口, 1PPS+TOD时间接口再将秒脉冲控制模块发来的第一 PPS信号发送到外部网络; 时间同步 模块根据纳秒计数器发来的第一 PPS信号, 保持纳秒信息同步。
1PPS+TOD时间接口将接收到的来自外部网络的含有纳秒同步信息的第二 PPS信号发 送到秒脉冲控制模块, 秒脉冲控制模块将第二 PPS信号广播到时间同步模块, 时间同步模 块根据第二 PPS信号, 保持纳秒信息同步。
在纳秒计数器、 秒计数器正常进行累加计数的过程中, 容易发生纳秒数据和秒数据的 偏差, 此时 CPU联合 FPGA中的全局时间模块对纳秒偏差数据和秒偏差数据进行补偿, 补 偿过程如下: CPU的 1588软件通过接收到的带有时戳的 PTP时间报文, 计算出本地时间偏 离主时间的纳秒补偿值、 秒补偿值, CPU将产生的写信号、 片选地址信号、 纳秒补偿值、 秒补偿值发送给赋值使能脉冲产生单元; 赋值使能脉冲产生单元利用 CPU发来的写信号和 片选地址信号, 综合出一个写脉冲信号, 并通过系统 125M 时钟信号进行同步化处理, 产 生两个 125MHz脉冲宽度的赋值使能脉冲, 其中, 一个赋值使能脉冲作为纳秒补偿信号, 另一个赋值使能脉冲作为秒补偿信号; 纳秒补偿信号为高电平时, 赋值使能脉冲产生单元 将纳秒补偿信号和 CPU发来的纳秒补偿值发送给纳秒计数器, 触发纳秒计数器进行一次纳 秒偏差数据的补偿; 纳秒计数器检测到纳秒补偿信号有效时, 结合赋值使能脉冲产生单元 发来的纳秒补偿值, 对当前纳秒数据进行纳秒补偿; 秒补偿信号为高电平时, 赋值使能脉 冲产生单元将秒补偿信号和 CPU发来的秒补偿值发送给秒计数器, 触发秒计数器进行一次 秒偏差数据的补偿; 秒计数器检测到秒补偿信号有效时, 结合赋值使能脉冲产生单元发来 的秒补偿值, 对当前秒数据进行秒补偿。
纳秒计数器通过设置纳秒加减标志位, 对当纳前秒数据来进行正负纳秒补偿: 纳秒加 减标志位为 0 时, 本地时钟落后于输入信号, 纳秒计数器对当前纳秒数据进行正纳秒补 偿; 纳秒加减标志位为 1 时, 本地时钟超前于输入信号, 纳秒计数器对当前纳秒数据进行 负纳秒补偿。
纳秒计数器对当前纳秒数据进行正纳秒补偿时, 纳秒计数器做加法运算: 在纳秒补偿 信号的上升沿将纳秒补偿值加上纳秒计数器的当前值, 赋值到下一个纳秒计数周期, 纳秒 计数器在此基础上继续计数, 直至纳秒计数器计数满 1 秒, 纳秒计数器向秒计数器进位, 并产生含有纳秒同步信息的第一 PPS信号, 纳秒计数器将第一 PPS信号同时发送到时间同 步模块和秒脉冲控制模块; 秒脉冲控制模块将纳秒计数器发来的第一 PPS 信号发送到 1PPS+TOD时间接口, 1PPS+TOD时间接口再将秒脉冲控制模块发来的第一 PPS信号发送 到外部网络; 时间同步模块根据纳秒计数器发来的第一 PPS信号, 保持纳秒信息同步。
纳秒计数器对当前纳秒数据进行负纳秒补偿时, 纳秒计数器做减法运算: 在纳秒补偿 信号的上升沿将纳秒补偿值减去纳秒计数器的当前值, 赋值到下一个纳秒计数周期, 纳秒 计数器在此基础上继续计数, 直至纳秒计数器减到零时, 纳秒计数器向秒计数器借位; 纳 秒计数器在此基础上继续计数, 直至纳秒计数器计数满 1 秒, 纳秒计数器向秒计数器进 位, 并产生含有纳秒同步信息的第一 PPS信号, 纳秒计数器将第一 PPS信号同时发送到时 间同步模块和秒脉冲控制模块; 秒脉冲控制模块将纳秒计数器发来的第一 PPS信号发送到 1PPS+TOD时间接口, 1PPS+TOD时间接口再将秒脉冲控制模块发来的第一 PPS信号发送 到外部网络; 时间同步模块根据纳秒计数器发来的第一 PPS信号, 保持纳秒信息同步。 秒计数器通过设置秒加减标志位, 对当前秒数据进行正负秒补偿: 秒加减标志位为 0 时, 本地时钟落后于输入信号, 秒计数器对当前秒数据进行正秒补偿; 秒加减标志位为 1 时, 本地时钟超前于输入信号, 秒计数器对当前秒数据进行负秒补偿。 秒计数器对当前秒 数据进行正秒补偿时, 秒计数器做加法运算: 在秒补偿信号的上升沿将秒补偿值加上秒计 数器的当前值, 赋值到下一个秒计数周期, 秒计数器在此基础上继续计数。 秒计数器对当 前秒数据进行负秒补偿时, 秒计数器做减法运算: 在秒补偿信号的上升沿将秒补偿值减去 秒计数器的当前值, 赋值到下一个秒计数周期, 秒计数器在此基础上继续计数。
当 CPU发现时间偏差较大或者同步源发生改变时, 产生一个清零指令, 将清零指令发 送到清零脉冲产生单元; 清零脉冲产生单元接收到 CPU发来的清零指令和 TOD编解码控制 模块发来的清零信号时, 通过系统 125M时钟信号进行同步化处理, 产生一个 125MHz脉冲 宽度的清零脉冲, 同时发送到纳秒计数器、 秒计数器, 纳秒计数器、 秒计数器接收到清零 脉冲时, 触发清零操作, 重新开始计数。
实现时间同步以后, CPU根据实际工程应用选择单步式工作模式或双步式工作模式, 在单步式工作模式下, CPU发送 1588协议包中的同步报文到外部网络, 同步报文的发送时 戳为纳秒级精度的时戳; 在双步式工作模式下, CPU发送 1588协议包中的同步报文、 以及 带有同步报文发送时间的跟随报文到外部网络, 同步报文的发送时戳为纳秒级精度的时 戳。
显然, 本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和 范围, 倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内, 则本 发明包含这些改动和变型在内。 本说明书中未作详细描述的内容属于本领域专业技术人员 公知的现有技术。

Claims

权 利 要 求 书
1、 一种分组传送网络中的系统时间同步装置, 其特征在于: 包括 CPU、 时间同步模 块、 FPGA、 1PPS+TOD时间接口, 所述 FPGA通过时间同步模块与 CPU相连, FPGA还分 别与 CPU、 1PPS+TOD时间接口相连, 其中:
所述 CPU用于: 管理 FPGA;按移动 1PPS+TOD时间接口标准配置 1PPS+TOD时间接 口的输入 /输出工作模式, 1PPS+TOD时间接口处于输入工作模式时, CPU接收带有时戳的 PTP报文, 提取并记录 PTP报文的时戳, 联合 FPGA计算出本地时间偏离主时间的纳秒补 偿值、 秒补偿值, 将纳秒补偿值、 秒补偿值配置到 FPGA中; 1PPS+TOD时间接口处于输 出工作模式时, CPU周期性的产生 PTP报文, 并将时间同步模块发来的时戳封装到 PTP报 文中, 形成带有时戳的 PTP报文并发送;
所述时间同步模块用于: 产生时戳并发送到 CPU;接收 CPU发来的带有时戳的 PTP报 文、 FPGA发来的含有纳秒同步信息的信号,联合 FPGA调整本地时钟, 保持纳秒信息同步, 实现本地时钟和主时钟同步;
所述 FPGA 用于: 联合时间同步模块维护本地的全局时间, 支持软件赋初值; 1PPS+TOD 时间接口处于输入工作模式时, FPGA接收到从外部直接输入的标准时间信 息, 联合 CPU计算出本地时间偏离主时间的纳秒补偿值、 秒补偿值, 进行纳秒级别、 秒级 别的正负时间补偿, 从而实现分组传送网络中设备的系统时间同步; 1PPS+TOD时间接口处 于输出工作模式时, FPGA将本地经过 1588协议调整后的精确时间信息输出到 1PPS+TOD 时间接口;
所述 1PPS+TOD时间接口用于: 处于输入工作模式时, 将接收的来自外部网络的 TOD 信息、 PPS信息发送到 FPGA; 处于输出工作模式时, 将来自 FPGA的 TOD信息、 PPS信 息发送到外部网络, 基站或其他需要时间同步的设备直接从该接口获取时间同步信息。
2、 如权利要求 1所述的分组传送网络中的系统时间同步装置, 其特征在于: 所述系统 时间同步装置还包括入口时戳模块、 出口时戳模块、 第一 PTP端口、 第二 PTP端口, 所述 第一 PTP端口通过入口时戳模块与 CPU相连, 所述第二 PTP端口通过出口时戳模块与 CPU 相连, 其中:
所述第一 PTP端口用于: 接收来自外部网络的数据包, 根据数据包中的 PTP报文类型 识别符, 识别出带有时戳的 PTP报文, 将带有时戳的 PTP报文转发到入口时戳模块, 与上 游设备同步;
所述入口时戳模块用于: 接收第一 PTP端口发来的带有时戳的 PTP报文, 记录接收时 间, 并将带有时戳的 PTP报文发送给 CPU;
所述出口时戳模块用于: 接收 CPU发来的带有时戳的 PTP报文,再发送到第二 PTP端 口, 并记录发送时间; 所述第二 PTP端口用于: 接收出口时戳模块发来的 ΡΤΡ报文, 将接收的 ΡΤΡ报文发送 到外部网络的端口。
3、 如权利要求 2 所述的分组传送网络中的系统时间同步装置, 其特征在于: 所述 FPGA包括本地全局时间模块、 秒脉冲控制模块和 TOD编解码控制模块, 本地全局时间模 块分别与秒脉冲控制模块、 TOD编解码控制模块、 时间同步模块、 CPU相连, 秒脉冲控制 模块与 1PPS+TOD时间接口相连, TOD编解码控制模块还分别与 CPU、 1PPS+TOD时间接 口相连, 其中:
所述本地全局时间模块用于: 接收 CPU发来的纳秒初值装载脉冲、 纳秒初值、 秒初值 装载脉冲、秒初值, 装载纳秒初值和秒初值,在纳秒初值的基础上进行纳秒计数的累加操作, 在秒初值的基础上进行秒计数的累加操作,在纳秒计数、秒计数的累加操作过程中维护本地 全局时间;
所述秒脉冲控制模块用于: 采用并发选收的方式对 PPS信号进行输入 /输出的处理, 将 本地全局时间模块发来的第一 PPS信号发送到 1PPS+TOD时间接口, 将 1PPS+TOD时间接 口发来的第二 PPS信号广播到时间同步模块;
所述 TOD编解码控制模块用于: 选择 1PPS+TOD时间接口的输入 /输出工作模式, 当 1PPS+TOD时间接口处于输入工作模式时, 按移动规范进行 TOD接口解码输入信号, 并产 生清零信号, 发送给本地全局时间模块; 当 1PPS+TOD时间接口处于输出工作模式时, 按 移动规范进行 TOD接口编码输出信号。
4、 如权利要求 3所述的分组传送网络中的系统时间同步装置, 其特征在于: 所述本地 全局时间模块包括纳秒计数器和秒计数器, 所述纳秒计数器与秒计数器相连, 纳秒计数器、 秒计数器均与时间同步模块相连, 纳秒计数器还通过秒脉冲控制模块与 1PPS+TOD时间接 口相连, 所述纳秒计数器用于: 根据 CPU发来的纳秒初值装载脉冲、 纳秒初值, 装载纳秒 初值, 在纳秒初值的基础上开始进行计数累加操作; 所述秒计数器用于: 根据 CPU发来的 秒初值装载脉冲、 秒初值, 装载秒初值, 在秒初值的基础上开始进行秒计数的累加操作。
5、 如权利要求 4所述的分组传送网络中的系统时间同步装置, 其特征在于: 所述纳秒 计数器是系统时钟为 30位的纳秒计数器。
6、 如权利要求 5所述的分组传送网络中的系统时间同步装置, 其特征在于: 所述秒计 数器是系统时钟为 32位的秒计数器。
7、 如权利要求 6所述的分组传送网络中的系统时间同步装置, 其特征在于: 所述本地 全局时间模块还包括纳秒使能控制寄存器、 秒使能控制寄存器,所述纳秒使能控制寄存器与 纳秒计数器相连, 所述秒使能控制寄存器与秒计数器相连, 所述纳秒使能控制寄存器用于: 先禁止纳秒计数器计数, 再使能纳秒计数器开始计数, 并将纳秒计数器映射成只读寄存器; 所述秒使能控制寄存器用于: 先禁止秒计数器计数, 再使能秒计数器开始计数, 并将秒计数 器映射成只读寄存器。 8、 如权利要求 7所述的分组传送网络中的系统时间同步装置, 其特征在于: 所述 CPU 还用于: 从只读寄存器中获取纳秒计数器、 秒计数器的当前计数值, 并计算出当前时间值。
9、 如权利要求 8所述的分组传送网络中的系统时间同步装置, 其特征在于: 所述纳秒 计数器还用于: 以 125MHz频率的时钟信号, 在 125MHz时钟的上升沿每次加 8纳秒, 进 行步长为 8纳秒的时间累加计数, 累加计满 1秒时,纳秒计数器向秒计数器进位,并产生含 有纳秒同步信息的第一 PPS信号, 纳秒计数器将第一 PPS信号同时发送到时间同步模块和 秒脉冲控制模块, 纳秒计数器中的时间值为当前本地全局的纳秒时间值。
10、 如权利要求 9 所述的分组传送网络中的系统时间同步装置, 其特征在于: 所述秒 计数器还用于: 在进位有效时加 1, 以 1秒钟为步长进行累加计数, 秒计数器中的时间值为 当前本地全局的秒时间值。
11、 如权利要求 10所述的分组传送网络中的系统时间同步装置, 其特征在于: 所述本 地全局时间模块还包括赋值使能脉冲产生单元, 所述赋值使能脉冲产生单元分别与 CPU、 纳秒计数器、 秒计数器相连, 所述赋值使能脉冲产生单元用于: 接收 CPU发来的写信号、 片选地址信号, 利用 CPU发来的写信号和片选地址信号, 综合出一个写脉冲信号, 并通过 系统 125M时钟信号进行同步化处理, 产生两个 125MHz脉冲宽度的赋值使能脉冲, 其中, 一个赋值使能脉冲作为纳秒补偿信号, 另一个赋值使能脉冲作为秒补偿信号;纳秒补偿信号 为高电平时,赋值使能脉冲产生单元触发纳秒计数器进行一次纳秒偏差数据的补偿;秒补偿 信号为高电平时, 赋值使能脉冲产生单元触发秒计数器进行一次秒偏差数据的补偿。
12、 如权利要求 11所述的分组传送网络中的系统时间同步装置, 其特征在于: 所述赋 值使能脉冲产生单元还用于接收 CPU发来的纳秒补偿值、 秒补偿值, 当纳秒补偿信号为高 电平时, 赋值使能脉冲产生单元将纳秒补偿信号和 CPU发来的纳秒补偿值发送到纳秒计数 器, 触发纳秒计数器进行一次纳秒偏差数据的补偿; 当秒补偿信号为高电平时, 赋值使能脉 冲产生单元将秒补偿信号和 CPU发来的秒补偿值发送到秒计数器, 触发秒计数器进行一次 秒偏差数据的补偿。
13、 如权利要求 12所述的分组传送网络中的系统时间同步装置, 其特征在于: 所述纳 秒计数器还用于:检测到纳秒补偿信号有效时, 结合赋值使能脉冲产生单元发来的纳秒补偿 值, 对当前纳秒数据进行纳秒补偿。
14、 如权利要求 13所述的分组传送网络中的系统时间同步装置, 其特征在于: 所述纳 秒计数器通过设置纳秒加减标志位, 对当前纳秒数据进行正负纳秒补偿。
15、 如权利要求 14所述的分组传送网络中的系统时间同步装置, 其特征在于: 所述纳 秒加减标志位为 0 时, 本地时钟落后于输入信号, 纳秒计数器对当前纳秒数据进行正纳秒 补偿;纳秒加减标志位为 1时, 本地时钟超前于输入信号, 纳秒计数器对当前纳秒数据进行 负纳秒补偿。
16、 如权利要求 15所述的分组传送网络中的系统时间同步装置, 其特征在于: 所述纳 秒计数器对当前纳秒数据进行正纳秒补偿时, 在纳秒补偿信号的上升沿将纳秒补偿值加上 纳秒计数器的当前值, 赋值到下一个纳秒计数周期, 纳秒计数器在此基础上继续计数, 直至 纳秒计数器计数满 1秒, 纳秒计数器向秒计数器进位,并产生含有纳秒同步信息的第一 PPS 信号, 纳秒计数器将第一 PPS信号同时发送到时间同步模块和秒脉冲控制模块; 秒脉冲控 制模块将纳秒计数器发来的第一 PPS信号发送到 1PPS+TOD时间接口, 1PPS+TOD时间接 口再将秒脉冲控制模块发来的第一 PPS信号发送到外部网络; 时间同步模块根据纳秒计数 器发来的第一 PPS信号, 保持纳秒信息同步。
17、 如权利要求 15所述的分组传送网络中的系统时间同步装置, 其特征在于: 所述纳 秒计数器对当前纳秒数据进行负纳秒补偿时, 在纳秒补偿信号的上升沿将纳秒补偿值减去 纳秒计数器的当前值, 赋值到下一个纳秒计数周期, 纳秒计数器在此基础上继续计数, 直至 纳秒计数器减到零时, 纳秒计数器向秒计数器借位; 纳秒计数器在此基础上继续计数, 直 至纳秒计数器计数满 1 秒, 纳秒计数器向秒计数器进位, 并产生含有纳秒同步信息的第一 PPS信号, 纳秒计数器将第一 PPS信号同时发送到时间同步模块和秒脉冲控制模块; 秒脉 冲控制模块将纳秒计数器发来的第一 PPS信号发送到 1PPS+TOD时间接口, 1PPS+TOD时 间接口再将秒脉冲控制模块发来的第一 PPS信号发送到外部网络; 时间同步模块根据纳秒 计数器发来的第一 PPS信号, 保持纳秒信息同步。
18、 如权利要求 12所述的分组传送网络中的系统时间同步装置, 其特征在于: 所述秒 计数器还用于:检测到秒补偿信号有效时, 结合赋值使能脉冲产生单元发来的秒补偿值,对 当前秒数据进行秒补偿。
19、 如权利要求 18所述的分组传送网络中的系统时间同步装置, 其特征在于: 所述秒 计数器通过设置秒加减标志位, 对当前秒数据进行正负秒补偿。
20、 如权利要求 19所述的分组传送网络中的系统时间同步装置, 其特征在于: 所述秒 加减标志位为 0时, 本地时钟落后于输入信号, 秒计数器对当前秒数据进行正秒补偿;秒加 减标志位为 1时, 本地时钟超前于输入信号, 秒计数器对当前秒数据进行负秒补偿。
21、 如权利要求 20所述的分组传送网络中的系统时间同步装置, 其特征在于: 所述秒 计数器对当前秒数据进行正秒补偿时, 在秒补偿信号的上升沿将秒补偿值加上秒计数器的 当前值, 赋值到下一个秒计数周期, 秒计数器在此基础上继续计数。
22、 如权利要求 20所述的分组传送网络中的系统时间同步装置, 其特征在于: 所述秒 计数器对当前秒数据进行负秒补偿时, 在秒补偿信号的上升沿将秒补偿值减去秒计数器的 当前值, 赋值到下一个秒计数周期, 秒计数器在此基础上继续计数。
23、 如权利要求 22 所述的分组传送网络中的系统时间同步装置, 其特征在于: 所述 CPU还用于进行清零配置数据的操作, 设置清零寄存器的内容。
24、 如权利要求 23所述的分组传送网络中的系统时间同步装置, 其特征在于: 所述本 地全局时间模块还包括清零脉冲产生单元,所述清零脉冲产生单元分别与纳秒计数器、 秒计 数器、 CPU、 TOD编解码控制模块相连, 所述清零脉冲产生单元用于: CPU发现时间偏差 较大或者同步源发生改变时, 产生一个清零指令, 将清零指令发送到清零脉冲产生单元; 清零脉冲产生单元接收到 CPU发来的清零指令和 TOD编解码控制模块发来的清零信号时, 通过系统 125M时钟信号进行同步化处理,产生一个 125MHz脉冲宽度的清零脉冲, 同时发 送到纳秒计数器、 秒计数器。
25、 如权利要求 24所述的分组传送网络中的系统时间同步装置, 其特征在于: 所述纳 秒计数器还用于: 接收到所述清零脉冲产生单元发来的清零脉冲时, 触发清零操作。
26、 如权利要求 25所述的分组传送网络中的系统时间同步装置, 其特征在于: 所述秒 计数器还用于: 接收到所述清零脉冲产生单元发来的清零脉冲时, 触发清零操作。
27、 如权利要求 1至 26中任一项所述的分组传送网络中的系统时间同步装置, 其特征 在于: 所述 CPU还用于: 实现时间同步以后, CPU根据实际工程应用选择单步式工作模式 或双步式工作模式, 在单步式工作模式下, CPU发送 1588协议包中的同步报文到外部网络, 同步报文的发送时戳为纳秒级精度的时戳; 在双步式工作模式下, CPU发送 1588协议包中 的同步报文、以及带有同步报文发送时间的跟随报文到外部网络, 同步报文的发送时戳为纳 秒级精度的时戳。
28、 如权利要求 1至 26中任一项所述的分组传送网络中的系统时间同步装置, 其特征 在于: 所述 1PPS+TOD时间接口的物理接头采用 RJ45接口。
29、 一种基于权利要求 4至 28任一项所述系统时间同步装置的分组传送网络中的系统 时间同步方法, 其特征在于包括以下步骤:
51、 准备工作:设备上电后, 先禁止纳秒计数器、 秒计数器计数,再使能纳秒计数器、 秒计数器开始计数, 同时将纳秒计数器和秒计数器均映射成只读寄存器, CPU从只读寄存 器中获取纳秒计数器、 秒计数器的当前计数值, 并计算出当前时间值;
52、 赋初值: CPU写装载比特位, 在 125M时钟信号下产生纳秒初值装载脉冲、 秒初 值装载脉冲, 并将纳秒初值装载脉冲和确定的纳秒初值发送到纳秒计数器,将秒初值装载脉 冲和确定的秒初值发送到秒计数器; 纳秒计数器检测到 CPU发来的纳秒初值装载脉冲、 纳 秒初值, 装载纳秒初值; 秒计数器检测到 CPU发来的秒初值装载脉冲、 秒初值, 装载秒初 值;
53、 维护本地全局时间: 纳秒计数器在纳秒初值的基础上开始进行纳秒计数的累加操 作, 并在纳秒计数的累加操作过程中维护本地全局时间, 实现时间同步; 秒计数器在秒初值 的基础上开始进行秒计数的累加操作,并在秒计数的累加操作过程中维护本地全局时间,实 现时间同步。
30、 如权利要求 29所述的分组传送网络中的系统时间同步方法, 其特征在于: 步骤 S3 包括以下步骤: 所述纳秒计数器以 125MHz频率的时钟信号, 在 125MHz时钟的上升沿每 次加 8纳秒, 进行步长为 8纳秒的时间累加计数, 累加计满 1秒时,纳秒计数器向秒计数器 进位, 并产生含有纳秒同步信息的第一 PPS信号, 纳秒计数器将第一 PPS信号同时发送到 时间同步模块和秒脉冲控制模块; 秒计数器则在进位有效时加 1, 以 1秒钟为步长进行累加 计数, 纳秒计数器、 秒计数器里的时间值均为当前本地全局的时间值。
31、 如权利要求 30所述的分组传送网络中的系统时间同步方法, 其特征在于: 步骤 S3 还包括以下步骤:所述秒脉冲控制模块将纳秒计数器发来的第一 PPS信号发送到 1PPS+TOD 时间接口, 1PPS+TOD时间接口再将秒脉冲控制模块发来的第一 PPS信号发送到外部网络; 时间同步模块根据纳秒计数器发来的第一 PPS信号, 保持纳秒信息同步。
32、 如权利要求 31所述的分组传送网络中的系统时间同步方法, 其特征在于: 步骤 S3 还包括以下步骤: 所述 1PPS+TOD时间接口将接收到的来自外部网络的含有纳秒同步信息 的第二 PPS信号发送到秒脉冲控制模块, 秒脉冲控制模块将第二 PPS信号广播到时间同步 模块, 时间同步模块根据第二 PPS信号, 保持纳秒信息同步。
33、 如权利要求 32所述的分组传送网络中的系统时间同步方法, 其特征在于: 步骤 S3 还包括以下步骤:在纳秒计数器、 秒计数器在正常累加计数的过程中,发生纳秒数据和秒数 据的偏差时, CPU联合 FPGA中的全局时间模块对纳秒偏差数据和秒偏差数据进行补偿。
34、 如权利要求 33 所述的分组传送网络中的系统时间同步方法, 其特征在于: 所述 CPU联合 FPGA中的全局时间模块对纳秒偏差数据和秒偏差数据进行补偿的过程如下: CPU 的 1588软件通过接收到的带有时戳的 PTP时间报文, 计算出本地时间偏离主时间的纳秒补 偿值、 秒补偿值, CPU将产生的写信号、 片选地址信号、 纳秒补偿值、 秒补偿值发送给赋 值使能脉冲产生单元; 赋值使能脉冲产生单元利用 CPU发来的写信号和片选地址信号, 综 合出一个写脉冲信号, 并通过系统 125M时钟信号进行同步化处理,产生两个 125MHz脉冲 宽度的赋值使能脉冲, 其中, 一个赋值使能脉冲作为纳秒补偿信号, 另一个赋值使能脉冲作 为秒补偿信号; 纳秒补偿信号为高电平时, 触发纳秒计数器进行一次纳秒偏差数据的补偿; 秒补偿信号为高电平时, 触发秒计数器进行一次秒偏差数据的补偿。
35、 如权利要求 34所述的分组传送网络中的系统时间同步方法, 其特征在于: 所述纳 秒补偿信号为高电平时, 赋值使能脉冲产生单元将纳秒补偿信号和 CPU发来的纳秒补偿值 发送给纳秒计数器;纳秒计数器检测到纳秒补偿信号有效时, 结合赋值使能脉冲产生单元发 来的纳秒补偿值, 对当前纳秒数据进行纳秒补偿。
36、 如权利要求 35所述的分组传送网络中的系统时间同步方法, 其特征在于: 所述纳 秒计数器通过设置纳秒加减标志位, 对当前纳秒数据进行正负纳秒补偿。
37、 如权利要求 36所述的分组传送网络中的系统时间同步方法, 其特征在于: 所述纳 秒加减标志位为 0 时, 本地时钟落后于输入信号, 纳秒计数器对当前纳秒数据进行正纳秒 补偿;纳秒加减标志位为 1时, 本地时钟超前于输入信号, 纳秒计数器对当前纳秒数据进行 负纳秒补偿。
38、 如权利要求 37所述的分组传送网络中的系统时间同步方法, 其特征在于: 所述纳 秒计数器对当前纳秒数据进行正纳秒补偿时, 在纳秒补偿信号的上升沿将纳秒补偿值加上 纳秒计数器的当前值, 赋值到下一个纳秒计数周期, 纳秒计数器在此基础上继续计数, 直至 纳秒计数器计数满 1秒, 纳秒计数器向秒计数器进位,并产生含有纳秒同步信息的第一 PPS 信号, 纳秒计数器将第一 PPS信号同时发送到时间同步模块和秒脉冲控制模块; 秒脉冲控 制模块将纳秒计数器发来的第一 PPS信号发送到 1PPS+TOD时间接口, 1PPS+TOD时间接 口再将秒脉冲控制模块发来的第一 PPS信号发送到外部网络; 时间同步模块根据纳秒计数 器发来的第一 PPS信号, 保持纳秒信息同步。
39、 如权利要求 37所述的分组传送网络中的系统时间同步方法, 其特征在于: 所述纳 秒计数器对当前纳秒数据进行负纳秒补偿时, 在纳秒补偿信号的上升沿将纳秒补偿值减去 纳秒计数器的当前值, 赋值到下一个纳秒计数周期, 纳秒计数器在此基础上继续计数, 直至 纳秒计数器减到零时, 纳秒计数器向秒计数器借位;纳秒计数器在此基础上继续计数,直至 纳秒计数器计数满 1秒, 纳秒计数器向秒计数器进位,并产生含有纳秒同步信息的第一 PPS 信号, 纳秒计数器将第一 PPS信号同时发送到时间同步模块和秒脉冲控制模块; 秒脉冲控 制模块将纳秒计数器发来的第一 PPS信号发送到 1PPS+TOD时间接口, 1PPS+TOD时间接 口再将秒脉冲控制模块发来的第一 PPS信号发送到外部网络; 时间同步模块根据纳秒计数 器发来的第一 PPS信号, 保持纳秒信息同步。
40、 如权利要求 34所述的分组传送网络中的系统时间同步方法, 其特征在于: 所述秒 补偿信号为高电平时, 赋值使能脉冲产生单元将秒补偿信号和 CPU发来的秒补偿值发送给 秒计数器; 秒计数器检测到秒补偿信号有效时, 结合赋值使能脉冲产生单元发来的秒补偿 值, 对当前秒数据进行秒补偿。
41、 如权利要求 40所述的分组传送网络中的系统时间同步方法, 其特征在于: 所述秒 计数器通过设置秒加减标志位, 对当前秒数据进行正负秒补偿。
42、 如权利要求 41所述的分组传送网络中的系统时间同步方法, 其特征在于: 所述秒 加减标志位为 0时, 本地时钟落后于输入信号, 秒计数器对当前秒数据进行正秒补偿;秒加 减标志位为 1时, 本地时钟超前于输入信号, 秒计数器对当前秒数据进行负秒补偿。
43、 如权利要求 42所述的分组传送网络中的系统时间同步方法, 其特征在于: 所述秒 计数器对当前秒数据进行正秒补偿时, 在秒补偿信号的上升沿将秒补偿值加上秒计数器的 当前值, 赋值到下一个秒计数周期, 秒计数器在此基础上继续计数。
44、 如权利要求 42所述的分组传送网络中的系统时间同步方法, 其特征在于: 所述秒 计数器对当前秒数据进行负秒补偿时, 在秒补偿信号的上升沿将秒补偿值减去秒计数器的 当前值, 赋值到下一个秒计数周期, 秒计数器在此基础上继续计数。
45、 如权利要求 29至 44中任一项所述的分组传送网络中的系统时间同步方法, 其特征 在于: 步骤 S3之后还包括以下步骤: CPU发现时间偏差较大或者同步源发生改变时, 产生 一个清零指令, 将清零指令发送到清零脉冲产生单元; 清零脉冲产生单元接收到 CPU发来 的清零指令和 TOD编解码控制模块发来的清零信号时, 通过系统 125M时钟信号进行同步 化处理, 产生一个 125MHz脉冲宽度的清零脉冲, 同时发送到纳秒计数器和秒计数器, 纳 秒计数器、 秒计数器接收到清零脉冲时, 触发清零操作, 重新开始计数。
46、 如权利要求 29至 44中任一项所述的分组传送网络中的系统时间同步方法, 其特征 在于: 步骤 S3 之后还包括以下步骤: 实现时间同步以后, CPU根据实际工程应用选择单 步式工作模式或双步式工作模式, 在单步式工作模式下, CPU发送 1588协议包中的同步报 文到外部网络, 同步报文的发送时戳为纳秒级精度的时戳; 在双步式工作模式下, CPU发 送 1588协议包中的同步报文、 以及带有同步报文发送时间的跟随报文到外部网络, 同步报 文的发送时戳为纳秒级精度的时戳。
PCT/CN2013/080010 2012-09-27 2013-07-24 分组传送网络中的系统时间同步装置及方法 Ceased WO2014048167A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210365607.0 2012-09-27
CN201210365607.0A CN102868515B (zh) 2012-09-27 2012-09-27 分组传送网络中的系统时间同步装置及方法

Publications (1)

Publication Number Publication Date
WO2014048167A1 true WO2014048167A1 (zh) 2014-04-03

Family

ID=47447123

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/080010 Ceased WO2014048167A1 (zh) 2012-09-27 2013-07-24 分组传送网络中的系统时间同步装置及方法

Country Status (4)

Country Link
CN (1) CN102868515B (zh)
CL (1) CL2015000171A1 (zh)
MY (1) MY166754A (zh)
WO (1) WO2014048167A1 (zh)

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109581917A (zh) * 2018-11-27 2019-04-05 浙江双成电气有限公司 一种gnss秒脉冲平滑输出的控制装置
CN110611544A (zh) * 2019-09-12 2019-12-24 成都府河电力自动化成套设备有限责任公司 一种利用rs232串口精确对时的方法及装置
CN111884746A (zh) * 2020-07-17 2020-11-03 爱瑟福信息科技(上海)有限公司 用于soc平台上进行gptp对时的pps秒脉冲信号输出方法及系统
CN112492679A (zh) * 2020-10-23 2021-03-12 许继集团有限公司 一种利用5g通信终端产生b码对时输出的方法及系统
CN113515184A (zh) * 2021-07-01 2021-10-19 北京华电众信技术股份有限公司 降低成本型b码解码对时方法
CN114355316A (zh) * 2021-12-06 2022-04-15 中国电波传播研究所(中国电子科技集团公司第二十二研究所) 一种面阵盖革模式apd阵列三维成像激光雷达的时间同步系统和方法
CN114614935A (zh) * 2022-04-01 2022-06-10 南京海兴电网技术有限公司 基于sntp和pps的时钟同步方法、装置
CN115865252A (zh) * 2022-11-23 2023-03-28 淮阴工学院 一种可设定周期的高精度gnss时间同步方法
CN115987437A (zh) * 2022-12-01 2023-04-18 斑马网络技术有限公司 一种时钟同步装置、设备及车辆
CN116113030A (zh) * 2023-01-30 2023-05-12 中国联合网络通信集团有限公司 时间同步方法、装置、设备及存储介质
CN116346275A (zh) * 2023-03-23 2023-06-27 杭州和利时自动化有限公司 一种脉冲时间校准方法、系统、装置及介质
CN116755318A (zh) * 2023-06-26 2023-09-15 天津福来铭科技有限公司 纳秒级测流设备双机校时方法
CN117240392A (zh) * 2023-08-30 2023-12-15 中科驭数(北京)科技有限公司 一种基于现场可编程门阵列的ieee1588时钟同步方法及系统
TWI838900B (zh) * 2022-10-06 2024-04-11 神雲科技股份有限公司 用於資料收發控制所需時間同步的同步系統
WO2024193224A1 (zh) * 2023-03-22 2024-09-26 中兴通讯股份有限公司 时间同步方法、装置、对时设备及可读存储介质
CN119414688A (zh) * 2024-12-23 2025-02-11 北京中航通用科技有限公司 一种适用于嵌入式设备的高精度守时方法
CN120468953A (zh) * 2025-07-11 2025-08-12 中国海洋大学 一种海洋可控源电磁探测授时及时间同步系统及其工作流程
CN120935312A (zh) * 2025-10-13 2025-11-11 国科大杭州高等研究院 星载高分辨率成像系统的自校正时间同步装置和方法
CN121333472A (zh) * 2025-12-11 2026-01-13 杭州来克莎科技有限公司 时间同步装置及通信设备
CN121643973A (zh) * 2026-02-05 2026-03-10 太原市优特奥科电子科技有限公司 采样信号的同步方法和系统

Families Citing this family (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9882823B2 (en) * 2012-03-08 2018-01-30 Marvell World Trade Ltd. Systems and methods for blocking transmission of a frame in a network device
CN102868515B (zh) * 2012-09-27 2015-04-29 烽火通信科技股份有限公司 分组传送网络中的系统时间同步装置及方法
US9292036B2 (en) * 2013-05-24 2016-03-22 Arm Limited Data processing apparatus and method for communicating between a master device and an asynchronous slave device via an interface
CN103532652B (zh) * 2013-10-18 2016-06-08 杭州华三通信技术有限公司 一种时间同步装置和方法
CN103581205B (zh) * 2013-11-20 2017-01-11 盛科网络(苏州)有限公司 在多个mac中实现精准时戳的方法及系统
CN103647615B (zh) * 2013-12-05 2016-05-25 华为技术有限公司 报文传输过程中延迟抖动消除方法及装置
CN105610537B (zh) * 2016-01-08 2018-02-13 烽火通信科技股份有限公司 ToD业务场景下GPON OLT和上级时钟同步的系统及方法
CN107528654B (zh) * 2016-06-21 2020-06-05 中兴通讯股份有限公司 一种基于1588的时间同步方法及装置
CN106788847B (zh) * 2016-12-28 2019-02-15 大唐电信(成都)信息技术有限公司 一种ptp gm时钟设备及其实现方法
CN106817184B (zh) * 2017-01-19 2018-10-23 重庆重邮汇测通信技术有限公司 网络测量中本地时钟与gps时钟的时间同步方法及装置
CN109001769B (zh) * 2017-06-06 2021-12-24 国网上海市电力公司 一种基于北斗卫星的dcls时间偏差监测方法及系统
CN109150351B (zh) * 2017-06-27 2021-02-02 许继集团有限公司 一种应用于变电站的utc时间实现方法及系统
CN108092730B (zh) * 2017-12-27 2019-04-26 中国电子科技集团公司第五十四研究所 一种适用于多设备的时序控制方法
CN108259109B (zh) * 2018-03-30 2019-12-13 新华三技术有限公司 Ptp域中的网络设备及tod同步方法
CN109462453A (zh) * 2018-11-22 2019-03-12 电信科学技术第五研究所有限公司 一种基于光纤网络的高精度时间同步方法
CN110989327B (zh) * 2019-12-26 2021-03-30 中国计量科学研究院 分布式高精度时间频率实时综合系统
CN111538060B (zh) * 2020-05-14 2023-10-13 上海海洋大学 一种基于Lora网络的相对定位方法
CN112131159B (zh) * 2020-09-21 2022-09-23 苏州盛科通信股份有限公司 基于内嵌CPU的ToD消息处理方法及系统
CN114430302B (zh) * 2020-10-29 2025-05-06 南京中兴新软件有限责任公司 时间同步方法及装置
CN113904747B (zh) * 2021-05-25 2024-07-12 北京卫星导航中心 一种基于多网系的时间同步方法、系统和介质
CN113839767B (zh) * 2021-09-13 2024-08-13 许昌许继软件技术有限公司 一种多片fpga系统及其时戳同步方法
CN117008515B (zh) * 2023-08-07 2026-04-10 西北核技术研究所 一种基于ptp协议的分布式控制系统及控制方法
CN117439691B (zh) * 2023-10-23 2024-05-28 合芯科技有限公司 时间信息同步系统、处理器芯片以及电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101729240A (zh) * 2009-11-13 2010-06-09 北京中创信测科技股份有限公司 一种实现时间同步的方法和装置
CN102195768A (zh) * 2011-05-30 2011-09-21 神州数码网络(北京)有限公司 一种纳秒级精度ptp实现方法
US20110228888A1 (en) * 2010-03-16 2011-09-22 Harman International Industries, Incorporated Media clock recovery
CN102299788A (zh) * 2011-09-21 2011-12-28 烽火通信科技股份有限公司 自动发送ieee1588协议报文的控制方法及装置
CN102868515A (zh) * 2012-09-27 2013-01-09 烽火通信科技股份有限公司 分组传送网络中的系统时间同步装置及方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102123046B (zh) * 2011-01-21 2013-09-04 烽火通信科技股份有限公司 Ptn设备及其主备交叉盘实现时间同步保护倒换的方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101729240A (zh) * 2009-11-13 2010-06-09 北京中创信测科技股份有限公司 一种实现时间同步的方法和装置
US20110228888A1 (en) * 2010-03-16 2011-09-22 Harman International Industries, Incorporated Media clock recovery
CN102195768A (zh) * 2011-05-30 2011-09-21 神州数码网络(北京)有限公司 一种纳秒级精度ptp实现方法
CN102299788A (zh) * 2011-09-21 2011-12-28 烽火通信科技股份有限公司 自动发送ieee1588协议报文的控制方法及装置
CN102868515A (zh) * 2012-09-27 2013-01-09 烽火通信科技股份有限公司 分组传送网络中的系统时间同步装置及方法

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109581917B (zh) * 2018-11-27 2023-07-25 浙江双成电气有限公司 一种gnss秒脉冲平滑输出的控制装置
CN109581917A (zh) * 2018-11-27 2019-04-05 浙江双成电气有限公司 一种gnss秒脉冲平滑输出的控制装置
CN110611544A (zh) * 2019-09-12 2019-12-24 成都府河电力自动化成套设备有限责任公司 一种利用rs232串口精确对时的方法及装置
CN111884746A (zh) * 2020-07-17 2020-11-03 爱瑟福信息科技(上海)有限公司 用于soc平台上进行gptp对时的pps秒脉冲信号输出方法及系统
CN111884746B (zh) * 2020-07-17 2022-10-18 爱瑟福信息科技(上海)有限公司 用于soc平台上进行gptp对时的pps秒脉冲信号输出方法及系统
CN112492679A (zh) * 2020-10-23 2021-03-12 许继集团有限公司 一种利用5g通信终端产生b码对时输出的方法及系统
CN113515184A (zh) * 2021-07-01 2021-10-19 北京华电众信技术股份有限公司 降低成本型b码解码对时方法
CN114355316A (zh) * 2021-12-06 2022-04-15 中国电波传播研究所(中国电子科技集团公司第二十二研究所) 一种面阵盖革模式apd阵列三维成像激光雷达的时间同步系统和方法
CN114614935A (zh) * 2022-04-01 2022-06-10 南京海兴电网技术有限公司 基于sntp和pps的时钟同步方法、装置
TWI838900B (zh) * 2022-10-06 2024-04-11 神雲科技股份有限公司 用於資料收發控制所需時間同步的同步系統
CN115865252A (zh) * 2022-11-23 2023-03-28 淮阴工学院 一种可设定周期的高精度gnss时间同步方法
CN115865252B (zh) * 2022-11-23 2023-12-01 淮阴工学院 一种可设定周期的高精度gnss时间同步方法
CN115987437A (zh) * 2022-12-01 2023-04-18 斑马网络技术有限公司 一种时钟同步装置、设备及车辆
CN116113030A (zh) * 2023-01-30 2023-05-12 中国联合网络通信集团有限公司 时间同步方法、装置、设备及存储介质
WO2024193224A1 (zh) * 2023-03-22 2024-09-26 中兴通讯股份有限公司 时间同步方法、装置、对时设备及可读存储介质
CN116346275A (zh) * 2023-03-23 2023-06-27 杭州和利时自动化有限公司 一种脉冲时间校准方法、系统、装置及介质
CN116755318A (zh) * 2023-06-26 2023-09-15 天津福来铭科技有限公司 纳秒级测流设备双机校时方法
CN117240392A (zh) * 2023-08-30 2023-12-15 中科驭数(北京)科技有限公司 一种基于现场可编程门阵列的ieee1588时钟同步方法及系统
CN119414688A (zh) * 2024-12-23 2025-02-11 北京中航通用科技有限公司 一种适用于嵌入式设备的高精度守时方法
CN120468953A (zh) * 2025-07-11 2025-08-12 中国海洋大学 一种海洋可控源电磁探测授时及时间同步系统及其工作流程
CN120468953B (zh) * 2025-07-11 2025-09-12 中国海洋大学 一种海洋可控源电磁探测授时及时间同步系统及其工作流程
CN120935312A (zh) * 2025-10-13 2025-11-11 国科大杭州高等研究院 星载高分辨率成像系统的自校正时间同步装置和方法
CN121333472A (zh) * 2025-12-11 2026-01-13 杭州来克莎科技有限公司 时间同步装置及通信设备
CN121643973A (zh) * 2026-02-05 2026-03-10 太原市优特奥科电子科技有限公司 采样信号的同步方法和系统

Also Published As

Publication number Publication date
CN102868515B (zh) 2015-04-29
MY166754A (en) 2018-07-20
CN102868515A (zh) 2013-01-09
CL2015000171A1 (es) 2015-04-24

Similar Documents

Publication Publication Date Title
WO2014048167A1 (zh) 分组传送网络中的系统时间同步装置及方法
CN101594673B (zh) 一种分布式处理1588时间戳的方法及系统
JP5811794B2 (ja) 通信装置
CN102098155B (zh) 基于ptp协议实现亚微秒级同步精度的方法
CN101247168B (zh) 一种时间同步的方法及系统
CN102013931B (zh) 时间同步方法及系统、从属定时设备及主定时设备
CN101515831B (zh) 一种时间同步传递方法、系统及装置
CN106027193B (zh) 用于网络授时系统的时钟同步方法、模块、设备及系统
WO2012003746A1 (zh) 一种实现边界时钟的方法和装置
WO2012065334A1 (zh) 在时分复用网络中实现时间同步的方法、设备和系统
CN101582733A (zh) 一种在sdh设备之间实现高精度时间同步的方法和系统
CN101621713B (zh) 无源光网络同步时间的计算方法、系统及光网络设备
CN101447861A (zh) Ieee 1588时间同步系统及其实现方法
WO2019174554A1 (zh) 一种补偿时延的方法和设备
CN104836630A (zh) Ieee1588时钟同步系统及其实现方法
CN105027489B (zh) 精确时钟协议同步方法和节点
WO2011009386A1 (zh) 实现时间同步的方法、装置及系统
CN107295627B (zh) 基带池服务器的时间同步方法及时间同步装置
CN103475461A (zh) 一种1588时钟同步功能实现系统及方法
WO2008098450A1 (fr) Procédé, système et dispositif pour la mise en oeuvre de synchronisation temporelle dans un réseau de communications
CN103546273B (zh) 基于ptp帧的频率同步装置及方法
US12556356B2 (en) Clock determining method and related apparatus
WO2013155944A1 (zh) 一种时钟传输方法、边界时钟及透传时钟
CN103117829A (zh) 一种不对称网络间的时间同步与补偿方法或者装置
CN101998192A (zh) 无源光网络上时间同步的方法和系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13841375

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2015000171

Country of ref document: CL

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13841375

Country of ref document: EP

Kind code of ref document: A1