WO2012071977A1 - Method and device for time synchronisation on rack - Google Patents

Method and device for time synchronisation on rack Download PDF

Info

Publication number
WO2012071977A1
WO2012071977A1 PCT/CN2011/082105 CN2011082105W WO2012071977A1 WO 2012071977 A1 WO2012071977 A1 WO 2012071977A1 CN 2011082105 W CN2011082105 W CN 2011082105W WO 2012071977 A1 WO2012071977 A1 WO 2012071977A1
Authority
WO
WIPO (PCT)
Prior art keywords
signal line
time value
signal
receiving
data
Prior art date
Application number
PCT/CN2011/082105
Other languages
French (fr)
Chinese (zh)
Inventor
陈晖�
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2012071977A1 publication Critical patent/WO2012071977A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • 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

Definitions

  • the present invention relates to a communication device, and in particular, to a time synchronization method and device in a rack. Background technique
  • Time synchronization is a very important technical indicator for 3G network construction, and the accuracy of time synchronization requirements is also getting higher and higher.
  • the time source of the network device, the master clock can be obtained from the GPS (Global Positioning System) or obtained by other means, such as obtaining through the 1588 message, and then sending other network nodes through the message, and time synchronization between the network nodes.
  • the 1588 protocol time synchronization between the main control and the line card inside the rack, usually using the standard TOD (Time Of Day, usually translated as "year, month, day, hour, minute, second” or "current time") interface
  • TOD interface is composed of lpps signal (1 Pulse per Second) and 232 serial port, which can realize one time per second.
  • the disadvantage is that the positive time interval is long (1 second), which cannot meet the application of high precision applications. Summary of the invention
  • the technical problem solved by the present invention is to provide a time synchronization method and apparatus in a rack.
  • a time synchronization method in a rack is provided in the embodiment of the present invention, including:
  • the transmitting side uses the rising edge of the synchronization pulse to indicate to the receiving side that data transmission will begin;
  • the transmitting side transmits a pulse signal to the receiving side at a frequency greater than nHz, where n is greater than 1;
  • the transmitting side transmits the time value data when the signal on the second signal line is at the falling edge after the synchronization pulse is in the active state of the high level, and the receiving side is the second signal line after receiving the indication. Sampling time value data when the signal is at the rising edge;
  • the receiving side After receiving the time value, the receiving side corrects the local clock according to the received time value.
  • the time value data sent by the transmitting side is a time value indicated by the transmitting side on the first signal line plus a clock period correction value, and a line delay between the transmitting side and the receiving side, where
  • the clock period correction value is: [(number of bits of time value / time value transmitted per cycle) - 0.5] clock cycles.
  • n 2M; and/or, the time value is 80bit;
  • the transmitting side sends the time value data when the signal on the second signal line is at a falling edge after the synchronization pulse is in the active state of the high level:
  • the transmitting side transmits the lbit time value data each time the signal on the second signal line is at the falling edge after the synchronization pulse is in the active state of the high level.
  • the method further includes:
  • the synchronizing pulse signal on the first signal line is in a low-level failure state.
  • the failure state of the synchronization pulse signal on the first signal line is at a low level:
  • the sync pulse signal on the first signal line is at a low level Failure status.
  • the embodiment of the present invention provides a time synchronization interface device in a rack, comprising: a sending module and a receiving module, wherein the synchronous sending unit in the sending module is connected to the synchronous receiving unit in the receiving module, and the clock sending unit in the sending module Connected to a clock receiving unit in the receiving module, the data transmitting unit in the transmitting module is connected to the data receiving unit in the receiving module, and the receiving module Also included is a correction unit, wherein:
  • a synchronous transmitting unit configured to indicate, by using a rising edge of the synchronization pulse, to the synchronous receiving unit to start data transmission on the first signal line;
  • a clock sending unit configured to transmit a pulse signal to the clock receiving unit at a frequency greater than nHz on the second signal line, where n is greater than 1;
  • a data sending unit configured to send, on the third signal line, the time value data when the signal on the second signal line is at a falling edge after the synchronous pulse sent by the synchronous transmitting unit is in an active state of a high level
  • a data receiving unit configured to: on the third signal line, sample the time value data when the signal on the second signal line is at a rising edge after the synchronization pulse received by the synchronous receiving unit is in an active state of a high level;
  • the correcting unit is configured to correct the local clock according to the received time value after the time value is received.
  • the data sending unit is further configured to determine that the sent time value data is a time value indicated by the synchronous transmitting unit on the first signal line, plus a clock period correction value, and then between the sending module and the receiving module.
  • the line delay, where the clock period correction value is: [(number of bits of the time value / time value transmitted per cycle) - 0.5] clock cycles.
  • the clock sending unit is further configured to use a frequency of n being 2M; and/or, the data sending unit is further configured to determine that the sent time value is 80 bits, and each time the wrist is transmitted.
  • the sending module further includes:
  • the failing unit is configured to make the synchronous pulse signal on the first signal line in a low state after the data receiving unit receives the signal.
  • the failing unit is further configured to start from a rising edge of the synchronization pulse after receiving the data receiving unit, and then pass [(the bit value of the time value/time value is transmitted per cycle) Quantity) -0.5] A failure state in which the sync pulse signal on the first signal line is at a low level after one clock cycle.
  • FIG. 1 is a schematic flowchart of a method for implementing a time synchronization method in a rack according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of timings of signal transmission according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a time synchronization implementation process of a transmitting side and a receiving side according to an embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of a time synchronization interface device in a rack according to an embodiment of the present invention.
  • Figure 1 is a schematic diagram of the implementation process of the time synchronization method in the rack. As shown in Figure 1, the following steps can be included:
  • Step 101 On the first signal line, the transmitting side uses a rising edge of the synchronization pulse to indicate to the receiving side that data transmission will start;
  • Step 102 On the second signal line, the transmitting side transmits a pulse signal to the receiving side at a frequency greater than n Hz, where n is greater than 1;
  • Step 103 On the third signal line, the transmitting side is in an active state in which the synchronization pulse is at a high level. After the signal on the second signal line is at the falling edge, the time value data is transmitted, and the receiving side samples the time value data when the signal on the second signal line is at the rising edge after receiving the indication;
  • Step 104 After receiving the time value, the receiving side corrects the local clock according to the received time value.
  • it may further include:
  • Step 105 After the receiving side receives the receiving side, the transmitting side makes the synchronous pulse signal on the first signal line in a low state.
  • the time synchronization process in the time synchronization process, it may be composed of three line signals: Psync+Time_data+Time_clk.
  • the three signal lines are a first signal line Psync (synchronous signal;), a third signal line Time_data (time data), and a second signal line Time_clk (clock).
  • the clock on the second signal line is used. 2MHz.
  • the signals of the three signal lines are output signals; for the received line card (referred to as the receiving side in this application), three The signals of the signal lines are all input signals. Or, conversely, the master receives and the line card sends, and the effect is the same.
  • Psync is a synchronization pulse, which is used to prompt the subsequent Time_clk rising edge to start data transmission;
  • Time_data transmits time information, which can transmit the year, month, day, hour, minute and second in sequence. In practice, it can be accurate to ns level according to needs;
  • Time_clk is the transmission clock.
  • the receiving side samples the data on the rising edge.
  • Figure 2 is a schematic diagram of signal transmission timing. The timing of the three signal lines is shown in Figure 2.
  • the transmitting side sends time information.
  • the receiving side has a local clock module, and then adjusts and corrects according to the received time value.
  • Time_data starts to transmit time information in sequence: year, month, day, hour, minute, and second (for convenience of description, a fixed 80-bit content is taken as an example), each time lbit is transmitted, The data is valid on the rising edge of Time_clk, and the accumulated transmission of 80 bits is completed, and then the Psync signal is invalidated.
  • the Psync signal pulse pulse (sampling to the rising edge), it starts to enter the receiving program. On the rising edge of Time_clk, the data on Time_data is sampled until all 80 bits are received.
  • the transmitting side transmits a pulse signal to the receiving side at a frequency of 2 MHz, and on the third signal line, the transmitting side transmits a time value of 80 bits, each time transmitting lbit.
  • the values of 2 MHz, 80 bit, etc. are only used to teach the person skilled in the art how to implement the invention, but it does not mean that only the value in the embodiment can be used. In fact, as long as the frequency is greater than 1, it is better than the present. There is a common TOD interface in the technology to correct the time in one second. Of course, in practice, the length of the actual transmitted time value must be considered to determine the specific frequency. For example, when transmitting the time value of 80 bits, the frequency is only The technical concept of the technical solution provided by the embodiment of the present invention is easy to implement by selecting the corresponding time value length and frequency. At the same time, the accuracy of the time value can be determined according to the time precision. Of course, the time value is not necessarily 80 bits. Similarly, each transmission is not limited to lbit. Therefore, it is easy for those skilled in the art to refer to the present embodiment to determine corresponding values in the implementation process in conjunction with practical needs.
  • FIG. 3 is a schematic diagram of a time synchronization implementation process on the transmitting side and the receiving side. As shown in FIG. 3, referring to FIG. 3, the following steps may be included:
  • Step 301 At the time T1, the Psync signal is valid, and the subsequent transmission time value is added to the reception delay At.
  • Step 302 Time_data sends data, sends data on the falling edge of Time_clk, and the receiving side samples on the rising edge.
  • Time_data On the transmitting side, after the falling edge of Time_clk, the time value is sent on Time_data, and sequentially transmitted in the order of year, month, day, hour, minute, and second, until the 80-bit transmission is completed.
  • the receiving side On the receiving side, on the rising edge of Time_clk, the data on the Time_data line is sampled.
  • Step 303 It is judged whether the 80 bit transmission is finished, if yes, the process proceeds to step 304, otherwise, the process proceeds to step 302.
  • the transmitting side determines whether the 80 bit transmission is completed, and if it is not finished, returns to step 302. If the 80bit transmission is completed, go to step 304. On the receiving side, if the 80bit is not received, continue to wait for the following data bits until the 80bit reception is completed.
  • Step 304 The transmitting side waits for a half Time_clk period after the T2 time to invalidate the Psync signal.
  • the transmitting side waits for half of the Time_clk period after the time T2 shown in FIG. 2, and disables the Psync signal from high to low.
  • the receiving side performs sampling and correction of all clock values substantially at time T2.
  • the processing of the failure may also be: after the receiving side receives the receiving side, the synchronization pulse signal on the first signal line is low after [1/2] clock cycles.
  • the flat failure state or, at the time T1 as shown in Fig. 2, passes through [(the number of bits of the time value/time value is transmitted per cycle) - 0.5] clock cycles to make the first signal line
  • the sync pulse signal is in a low state of failure.
  • FIG. 4 is a schematic structural diagram of a time synchronization interface device in a rack. As shown in the figure, the interface device may include:
  • the synchronous transmitting unit 4011 in the transmitting module 401 is connected to the synchronous receiving unit 4021 in the receiving module 402, the clock transmitting unit 4012 in the transmitting module 401 is connected to the clock receiving unit 4022 in the receiving module 402, and the data transmitting unit in the transmitting module 401 4013 is connected to the data receiving unit 4023 in the receiving module 402.
  • the receiving module 402 further includes a correcting unit 4024, where:
  • the synchronous transmitting unit 4011 is configured to, on the first signal line, indicate to the synchronization receiving unit 4021 that the data transmission will be started by using the rising edge of the synchronization pulse;
  • the clock sending unit 4012 is configured to transmit a pulse signal to the clock receiving unit 4022 at a frequency greater than n Hz on the second signal line, where n is greater than 1;
  • the data sending unit 4013 is configured to send, on the third signal line, the time value data when the synchronization pulse sent by the synchronous transmitting unit 4011 is in an active state of a high level, and when the signal on the second signal line is at a falling edge;
  • the data receiving unit 4023 is configured to, on the third signal line, sample the time value data when the signal on the second signal line is at a rising edge after the synchronization pulse received by the synchronization receiving unit 4021 is in an active state of a high level;
  • the correcting unit 4024 is configured to correct the local clock according to the received time value after the time value is received.
  • the data sending unit 4013 may further be configured to determine that the time value of the sending is the time value indicated by the synchronous transmitting unit 4011 on the first signal line plus the clock period correction value, and then the sending module 401 and the receiving module. Line delay between 402, where the clock period correction value is: [(number of bit values of time value / time value transmitted per cycle) -0.5] clock cycles, or, [(bit value bit bit) The number is -0.5] clock cycles per clock cycle.
  • the clock sending unit 4012 may further be configured to adopt a frequency where n is 2 ⁇ ; and/or, the data transmitting unit 4013 may be further configured to determine that the transmitted time value is 80 bits, and each time the bit is transmitted.
  • the sending module 401 may further include:
  • the failing unit 4014 is configured to enable the synchronization pulse signal on the first signal line to be in a low state after the data receiving unit 4023 receives the completion.
  • the failing unit 4014 may further be configured to enable the synchronization pulse signal on the first signal line to be in a low state after [1/2] clock cycles after the data receiving unit 4023 is received, or As shown in Fig. 2 at time T1, after [(the number of bits of the time value/time value is transmitted per cycle) -0.5] clock cycles, the synchronization pulse signal on the first signal line is at a low level. Failure status.
  • modules or units For convenience of description, the various parts of the above described devices are described separately by function into various modules or units. Of course, in implementing the present invention, the functions of the modules or units can be implemented in the same software or hardware, for example, by using the CPU 10 or the programmable device 10 pins.
  • Ordinary TOD interface usually sends a TOD message once every second, and the receiving side checks for one time. If the master receives time information from the 1588 packet mode, the master clock frequency differs from the 1588 master by 1 PPM (this should be the case;), because the 1 second interval is too long, 1 second response on the line card The time error is lus. After the multi-level time node is transmitted, the error accumulation is larger, which also leads to the inability to meet the application requirements. For example, TD-SCDMA (Time Division Synchronized Code Division Multiple Access) is required to meet the application requirements of time difference between base stations within 1.5 us, and cannot satisfy CDMA (Code Division Multiple Access). Address access requirements are application requirements within 3us.
  • TD-SCDMA Time Division Synchronized Code Division Multiple Access
  • the method of improving the time proofing frequency is used to compensate for the above defects, for example, it can be increased to 490 times per second, which is obviously greatly reduced. Short adjustment time interval. In the specific implementation, it is only necessary to set the number of times per second to be sent by software.
  • the internal time synchronization of the rack can be realized by using only the three-wire interface, and the positive time interval can be modified by software, and the accumulated error is small, and the precision is high (the inside of the rack is nanoseconds) Level error), the implementation of the CPU 10 or programmable device 10 feet can be achieved, do not need to use a dedicated 232 serial port, the hardware resources are not high. It is simple, reliable and easy to implement.
  • embodiments of the present invention can be provided as a method, system, or computer program product.
  • the present invention can take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware.
  • the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

Disclosed are a method and a device for time synchronisation on a rack. The method includes: indicating by a transmitting side to a receiving side that a data transfer is about to begin by means of a rising edge of a synchronisation pulse on a first signal line; transferring by the transmitting side a pulse signal to the receiving side at a frequency higher than n Hz on a second signal line, with n being larger than 1; after the synchronisation pulse has reached an active state with a high level, transmitting by the transmitting side data of a time value on a third signal line when the signal on the second signal line is at a falling edge, and after having received the indication, sampling by the receiving side the data of the time value when the signal on the second signal line is at a rising edge; and after the time value has been received, correcting by the receiving side a local clock according to the received time value. The present invention has a small cumulative error, high accuracy and low requirements on hardware resources. In general, it is simple, reliable, and easy to realise.

Description

一种机架内的时间同步方法及设备 技术领域  Time synchronization method and device in rack
本发明涉及通信设备, 特别涉及一种机架内的时间同步方法及设备。 背景技术  The present invention relates to a communication device, and in particular, to a time synchronization method and device in a rack. Background technique
目前中国 3G网络建设规模日益扩大, 时间同步是 3G网络建设的非常 重要的技术指标, 时间同步要求的精度也越来越高。  At present, the scale of China's 3G network construction is expanding day by day. Time synchronization is a very important technical indicator for 3G network construction, and the accuracy of time synchronization requirements is also getting higher and higher.
网络设备的时间源 , 主时钟可以从 GPS ( Global Positioning System, 全 球定位系统)获取或通过其它方式获取, 如通过 1588报文获取, 然后通过 报文下发其它网络节点,网络节点之间时间同步由 1588协议来实现和保证; 机架内部如主控与线卡之间的时间同步, 通常使用标准的 TOD ( Time Of Day, 通常翻译为 "年月日时分秒" 或 "当前时间")接口来实现, TOD接 口是由 lpps信号( 1 Pulse per Second, 1秒脉沖)和 232串口组成, 可以实 现每秒钟效正一次时间。 然而其不足在于: 效正时间间隔长( 1秒钟), 无 法满足高精度场合的应用。 发明内容  The time source of the network device, the master clock can be obtained from the GPS (Global Positioning System) or obtained by other means, such as obtaining through the 1588 message, and then sending other network nodes through the message, and time synchronization between the network nodes. Implemented and guaranteed by the 1588 protocol; time synchronization between the main control and the line card inside the rack, usually using the standard TOD (Time Of Day, usually translated as "year, month, day, hour, minute, second" or "current time") interface To achieve, the TOD interface is composed of lpps signal (1 Pulse per Second) and 232 serial port, which can realize one time per second. However, the disadvantage is that the positive time interval is long (1 second), which cannot meet the application of high precision applications. Summary of the invention
本发明所解决的技术问题在于提供了一种机架内的时间同步方法及设 备。  The technical problem solved by the present invention is to provide a time synchronization method and apparatus in a rack.
本发明实施例中提供了一种机架内的时间同步方法, 包括:  A time synchronization method in a rack is provided in the embodiment of the present invention, including:
在第一信号线上, 发送侧用同步脉沖的上升沿向接收侧指示将开始数 据传送;  On the first signal line, the transmitting side uses the rising edge of the synchronization pulse to indicate to the receiving side that data transmission will begin;
在第二信号线上, 发送侧以大于 nHz的频率向接收侧传输脉沖信号, n 大于 1 ; 在第三信号线上, 发送侧在同步脉沖处于高电平的有效状态后当第二 信号线上的信号处于下降沿时发送时间值数据, 接收侧在接收到指示后当 第二信号线上的信号处于上升沿时采样时间值数据; On the second signal line, the transmitting side transmits a pulse signal to the receiving side at a frequency greater than nHz, where n is greater than 1; On the third signal line, the transmitting side transmits the time value data when the signal on the second signal line is at the falling edge after the synchronization pulse is in the active state of the high level, and the receiving side is the second signal line after receiving the indication. Sampling time value data when the signal is at the rising edge;
接收侧在时间值接收完毕后, 根据接收的时间值对本地时钟进行校正。 其中, 所述发送侧发送的时间值数据为发送侧在第一信号线上进行指 示的时间值加上时钟周期校正值后, 再加上发送侧与接收侧之间的线路延 时, 其中, 时钟周期校正值为: [ (时间值的 bit位数 /时间值每个周期传输 的数量) -0.5]个时钟周期 。  After receiving the time value, the receiving side corrects the local clock according to the received time value. The time value data sent by the transmitting side is a time value indicated by the transmitting side on the first signal line plus a clock period correction value, and a line delay between the transmitting side and the receiving side, where The clock period correction value is: [(number of bits of time value / time value transmitted per cycle) - 0.5] clock cycles.
其中, 所述 n为 2M; 和 /或, 所述时间值为 80bit;  Wherein n is 2M; and/or, the time value is 80bit;
所述发送侧在同步脉沖处于高电平的有效状态后当第二信号线上的信 号处于下降沿时发送时间值数据为:  The transmitting side sends the time value data when the signal on the second signal line is at a falling edge after the synchronization pulse is in the active state of the high level:
所述发送侧每次在同步脉沖处于高电平的有效状态后当第二信号线上 的信号处于下降沿时传送 lbit时间值数据。  The transmitting side transmits the lbit time value data each time the signal on the second signal line is at the falling edge after the synchronization pulse is in the active state of the high level.
进一步地, 所述方法还包括:  Further, the method further includes:
发送侧在接收侧接收完毕后, 使第一信号线上的同步脉沖信号处于低 电平的失效状态。  After the receiving side receives the receiving side, the synchronizing pulse signal on the first signal line is in a low-level failure state.
其中, 所述发送侧在接收侧接收完毕后, 使第一信号线上的同步脉沖 信号处于低电平的失效状态为:  After the receiving side receives the receiving side, the failure state of the synchronization pulse signal on the first signal line is at a low level:
从同步脉沖的上升沿开始, 再经过 [ (时间值的 bit位数 /时间值每个周 期传输的数量) -0.5]个时钟周期后使第一信号线上的同步脉沖信号处于低 电平的失效状态。  Starting from the rising edge of the sync pulse, after [(the number of bits of the time value / time value is transmitted per cycle) -0.5] clock cycles, the sync pulse signal on the first signal line is at a low level Failure status.
本发明实施例中提供了一种机架内的时间同步接口设备, 包括: 发送 模块与接收模块, 发送模块中的同步发送单元与接收模块中的同步接收单 元相连, 发送模块中的时钟发送单元与接收模块中的时钟接收单元相连, 发送模块中的数据发送单元与接收模块中的数据接收单元相连, 接收模块 还包括校正单元, 其中: The embodiment of the present invention provides a time synchronization interface device in a rack, comprising: a sending module and a receiving module, wherein the synchronous sending unit in the sending module is connected to the synchronous receiving unit in the receiving module, and the clock sending unit in the sending module Connected to a clock receiving unit in the receiving module, the data transmitting unit in the transmitting module is connected to the data receiving unit in the receiving module, and the receiving module Also included is a correction unit, wherein:
同步发送单元, 用于在第一信号线上, 用同步脉沖的上升沿向同步接 收单元指示将开始数据传送;  a synchronous transmitting unit, configured to indicate, by using a rising edge of the synchronization pulse, to the synchronous receiving unit to start data transmission on the first signal line;
时钟发送单元, 用于在第二信号线上, 以大于 nHz的频率向时钟接收 单元传输脉沖信号, n大于 1 ;  a clock sending unit, configured to transmit a pulse signal to the clock receiving unit at a frequency greater than nHz on the second signal line, where n is greater than 1;
数据发送单元, 用于在第三信号线上, 在同步发送单元发送的同步脉 沖处于高电平的有效状态后当第二信号线上的信号处于下降沿时发送时间 值数据;  a data sending unit, configured to send, on the third signal line, the time value data when the signal on the second signal line is at a falling edge after the synchronous pulse sent by the synchronous transmitting unit is in an active state of a high level;
数据接收单元, 用于在第三信号线上, 在同步接收单元接收的同步脉 沖处于高电平的有效状态后当第二信号线上的信号处于上升沿时采样时间 值数据;  a data receiving unit, configured to: on the third signal line, sample the time value data when the signal on the second signal line is at a rising edge after the synchronization pulse received by the synchronous receiving unit is in an active state of a high level;
校正单元, 用于在时间值接收完毕后, 根据接收的时间值对本地时钟 进行校正。  The correcting unit is configured to correct the local clock according to the received time value after the time value is received.
其中, 所述数据发送单元, 进一步用于确定发送的时间值数据为同步 发送单元在第一信号线上进行指示的时间值加上时钟周期校正值后, 再加 上发送模块与接收模块之间的线路延时, 其中, 时钟周期校正值为: [ (时 间值的 bit位数 /时间值每个周期传输的数量 ) -0.5]个时钟周期。  The data sending unit is further configured to determine that the sent time value data is a time value indicated by the synchronous transmitting unit on the first signal line, plus a clock period correction value, and then between the sending module and the receiving module. The line delay, where the clock period correction value is: [(number of bits of the time value / time value transmitted per cycle) - 0.5] clock cycles.
其中, 所述时钟发送单元, 进一步用于采用 n为 2M的频率; 和 /或, 数据发送单元进一步用于确定发送的时间值为 80bit, 每次传送 腕。  The clock sending unit is further configured to use a frequency of n being 2M; and/or, the data sending unit is further configured to determine that the sent time value is 80 bits, and each time the wrist is transmitted.
其中, 所述发送模块进一步包括:  The sending module further includes:
失效单元, 用于在数据接收单元接收完毕后, 使第一信号线上的同步 脉沖信号处于低电平的失效状态。  The failing unit is configured to make the synchronous pulse signal on the first signal line in a low state after the data receiving unit receives the signal.
其中, 所述失效单元, 进一步用于在数据接收单元接收完毕后, 从同 步脉沖的上升沿开始, 再经过 [ (时间值的 bit位数 /时间值每个周期传输的 数量) -0.5]个时钟周期后使第一信号线上的同步脉沖信号处于低电平的失 效状态。 The failing unit is further configured to start from a rising edge of the synchronization pulse after receiving the data receiving unit, and then pass [(the bit value of the time value/time value is transmitted per cycle) Quantity) -0.5] A failure state in which the sync pulse signal on the first signal line is at a low level after one clock cycle.
本发明有益效果如下:  The beneficial effects of the present invention are as follows:
由于发送侧以大于 nHz的频率向接收侧传输脉沖信号, n大于 1; 并且 在处于下降沿时发送时间值数据, 接收侧在处于上升沿时采样时间值数据。 而当脉沖信号频率大于 1Hz时, 第二信号线上的信号周期必定小于 1秒, 也即: 用于同步校正的时间值发送周期必定小于 1秒, 相对普通的 TOD接 口 1 秒钟校对一次时间而言, 其同步精度必定更高。 也易知, 当确定各种 通信系统的时间误差需要后, 容易采用本发明实施例提供的技术方案来满 足各种通信系统的应用要求。 附图说明 图 1为本发明实施例中机架内的时间同步方法实施流程示意图; 图 2为本发明实施例中信号发送时序示意图;  Since the transmitting side transmits the pulse signal to the receiving side at a frequency greater than nHz, n is greater than 1; and when the falling edge is transmitting time value data, the receiving side samples the time value data while at the rising edge. When the pulse signal frequency is greater than 1 Hz, the signal period on the second signal line must be less than 1 second, that is, the time value for the synchronization correction must be less than 1 second, and the calibration time is 1 second with respect to the normal TOD interface. In terms of accuracy, the synchronization accuracy must be higher. It is also known that the technical solutions provided by the embodiments of the present invention are easily used to meet the application requirements of various communication systems after determining the time error of various communication systems. BRIEF DESCRIPTION OF DRAWINGS FIG. 1 is a schematic flowchart of a method for implementing a time synchronization method in a rack according to an embodiment of the present invention; FIG. 2 is a schematic diagram of timings of signal transmission according to an embodiment of the present invention;
图 3为本发明实施例中发送侧和接收侧时间同步实施流程示意图; 图 4为本发明实施例中机架内的时间同步接口设备结构示意图。 具体实施方式 下面结合附图对本发明的具体实施方式进行说明。  3 is a schematic diagram of a time synchronization implementation process of a transmitting side and a receiving side according to an embodiment of the present invention; FIG. 4 is a schematic structural diagram of a time synchronization interface device in a rack according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, specific embodiments of the present invention will be described with reference to the accompanying drawings.
图 1为机架内的时间同步方法实施流程示意图, 如图 1所示, 可以包 括如下步驟:  Figure 1 is a schematic diagram of the implementation process of the time synchronization method in the rack. As shown in Figure 1, the following steps can be included:
步驟 101、在第一信号线上,发送侧用同步脉沖的上升沿向接收侧指示 将开始数据传送;  Step 101: On the first signal line, the transmitting side uses a rising edge of the synchronization pulse to indicate to the receiving side that data transmission will start;
步驟 102、 在第二信号线上, 发送侧以大于 n Hz的频率向接收侧传输 脉沖信号, n大于 1;  Step 102: On the second signal line, the transmitting side transmits a pulse signal to the receiving side at a frequency greater than n Hz, where n is greater than 1;
步驟 103、在第三信号线上,发送侧在同步脉沖处于高电平的有效状态 后当第二信号线上的信号处于下降沿时发送时间值数据, 接收侧在接收到 指示后当第二信号线上的信号处于上升沿时采样时间值数据; Step 103: On the third signal line, the transmitting side is in an active state in which the synchronization pulse is at a high level. After the signal on the second signal line is at the falling edge, the time value data is transmitted, and the receiving side samples the time value data when the signal on the second signal line is at the rising edge after receiving the indication;
步驟 104、接收侧在时间值接收完毕后,根据接收的时间值对本地时钟 进行校正。  Step 104: After receiving the time value, the receiving side corrects the local clock according to the received time value.
实施中, 还可以进一步包括:  In the implementation, it may further include:
步驟 105、发送侧在接收侧接收完毕后,使第一信号线上的同步脉沖信 号处于低电平的失效状态。  Step 105: After the receiving side receives the receiving side, the transmitting side makes the synchronous pulse signal on the first signal line in a low state.
具体实施中, 在时间同步过程中, 可以由三根线信号组成: Psync+Time_data+Time_clk 。 三根信号线分别是第一信号线 Psync ( synchronous signal, 同步信号;), 第三信号线 Time_data (时间数据 ), 第 二信号线 Time_clk (时钟), 为说明方便, 第二信号线上的时钟采用 2MHz。  In a specific implementation, in the time synchronization process, it may be composed of three line signals: Psync+Time_data+Time_clk. The three signal lines are a first signal line Psync (synchronous signal;), a third signal line Time_data (time data), and a second signal line Time_clk (clock). For convenience of explanation, the clock on the second signal line is used. 2MHz.
在机架内实施时, 对主控而言(本申请中称为发送侧), 三根信号线的 信号都是输出信号; 对接收的线卡(本申请中称为接收侧) 来说, 三根信 号线的信号都是输入信号。 或反过来, 主控接收, 线卡发送, 其效果也是 一样的。  When implemented in a rack, for the master (referred to as the transmitting side in this application), the signals of the three signal lines are output signals; for the received line card (referred to as the receiving side in this application), three The signals of the signal lines are all input signals. Or, conversely, the master receives and the line card sends, and the effect is the same.
Psync是同步脉沖, 用于提示随后的 Time_clk上升沿开始数据传送; Time_data上传送的是时间信息, 可以依次传送年月日时分秒, 具体实践中 可以根据需要精确到 ns等级别; Time_clk是发送时钟, 接收侧在上升沿采 样数据。 图 2为信号发送时序示意图, 三条信号线的时序配合如图 2所示, 发送侧发送时间信息, 接收侧有本地时钟模块, 再根据接收到时间值进行 调节、 校正即可。  Psync is a synchronization pulse, which is used to prompt the subsequent Time_clk rising edge to start data transmission; Time_data transmits time information, which can transmit the year, month, day, hour, minute and second in sequence. In practice, it can be accurate to ns level according to needs; Time_clk is the transmission clock. The receiving side samples the data on the rising edge. Figure 2 is a schematic diagram of signal transmission timing. The timing of the three signal lines is shown in Figure 2. The transmitting side sends time information. The receiving side has a local clock module, and then adjusts and corrects according to the received time value.
从发送侧来看, Psync信号生效(高电平)后, Time_data上开始依次 传送时间信息: 年月日, 时分秒(为说明方便, 以固定 80bit内容为例进行 说明), 每次传送 lbit, 在 Time_clk的上升沿数据有效, 累计传送 80bit完 毕, 再让 Psync信号失效。 从接收侧来看, 收到 Psync信号脉沖(采样到上升沿 )后, 开始进入接 收程序, 在 Time_clk的上升沿, 采样 Time_data上的数据, 直到 80bit全部 接收完毕。 From the transmitting side, after the Psync signal is active (high level), Time_data starts to transmit time information in sequence: year, month, day, hour, minute, and second (for convenience of description, a fixed 80-bit content is taken as an example), each time lbit is transmitted, The data is valid on the rising edge of Time_clk, and the accumulated transmission of 80 bits is completed, and then the Psync signal is invalidated. From the receiving side, after receiving the Psync signal pulse (sampling to the rising edge), it starts to enter the receiving program. On the rising edge of Time_clk, the data on Time_data is sampled until all 80 bits are received.
为更好的理解, 下面以实例进行说明。  For a better understanding, the following is an example.
在本实施例中, 在第二信号线上, 发送侧以 2MHz的频率向接收侧传 输脉沖信号,在第三信号线上,发送侧发送的时间值为 80bit,每次传送 lbit。  In the present embodiment, on the second signal line, the transmitting side transmits a pulse signal to the receiving side at a frequency of 2 MHz, and on the third signal line, the transmitting side transmits a time value of 80 bits, each time transmitting lbit.
在实施中 2MHz、 80bit等取值仅用于教导本领域技术人员具体如何实 施本发明,但不意味仅能使用本实施例中的取值,实际上,只要频率大于 1 , 即可优于现有技术中普通的 TOD接口 1秒钟校对一次时间的方案; 当然, 具体实践中还需考虑实际传输的时间值数据长度来确定具体选用的频率, 例如在传输 80bit长度的时间值时, 频率只需大于 100Hz即可, 对本领域技 术人员来说, 根据本发明实施例提供的技术方案的技术构思选用相应的时 间值长度以及频率是容易实现的。 同时, 可以根据时间精度需要确定时间 值的精度, 那么当然时间值也就并不一定是 80bit了, 同样, 每次传输也不 仅限于 lbit。 因此, 本领域技术人员易知, 可以参考本实施例在实施过程中 结合实践需要来确定相应的取值。  In the implementation, the values of 2 MHz, 80 bit, etc. are only used to teach the person skilled in the art how to implement the invention, but it does not mean that only the value in the embodiment can be used. In fact, as long as the frequency is greater than 1, it is better than the present. There is a common TOD interface in the technology to correct the time in one second. Of course, in practice, the length of the actual transmitted time value must be considered to determine the specific frequency. For example, when transmitting the time value of 80 bits, the frequency is only The technical concept of the technical solution provided by the embodiment of the present invention is easy to implement by selecting the corresponding time value length and frequency. At the same time, the accuracy of the time value can be determined according to the time precision. Of course, the time value is not necessarily 80 bits. Similarly, each transmission is not limited to lbit. Therefore, it is easy for those skilled in the art to refer to the present embodiment to determine corresponding values in the implementation process in conjunction with practical needs.
图 3为发送侧和接收侧时间同步实施流程示意图, 如图 3所示, 参考 图 3所示, 可以包括如下步驟:  FIG. 3 is a schematic diagram of a time synchronization implementation process on the transmitting side and the receiving side. As shown in FIG. 3, referring to FIG. 3, the following steps may be included:
步驟 301 : 在 T1时刻 Psync信号生效, 后面发送时间值加上发送到接 收延时 A t。  Step 301: At the time T1, the Psync signal is valid, and the subsequent transmission time value is added to the reception delay At.
本步驟中, 在图 2所示的 T1时刻, 发送侧给出 Psync有效信号, 从低 变高。 通知接收侧做好接收时间值的准备工作。 随后发送的时间值并不是 T1时刻的时间值, 而是需要加上从发送到接收的固定延时 A t, Time_clk在 本实施例中暂选用 2M时钟时, A t则为 79.5个 Time_clk时钟周期( 3975ns ) +线路延时。 如果 Time_clk频率改变, A t值也作相应改变即可。 对于同一 个系统, 线路延时基本是固定的, 可以用测量的方法获取具体值(ns级)。 步驟 302: Time_data发送数据, 在 Time_clk下降沿发送数据, 接收侧 在上升沿采样。 In this step, at the time T1 shown in FIG. 2, the transmitting side gives a Psync effective signal, which changes from low to high. The receiving side is notified to prepare for the receiving time value. The time value to be transmitted is not the time value at time T1, but the fixed delay At from transmission to reception needs to be added. When Time_clk temporarily selects 2M clock in this embodiment, A t is 79.5 Time_clk clock cycles. (3975ns) + line delay. If the Time_clk frequency changes, the A t value also changes accordingly. For the same For each system, the line delay is basically fixed, and the specific value (ns level) can be obtained by measurement. Step 302: Time_data sends data, sends data on the falling edge of Time_clk, and the receiving side samples on the rising edge.
本步驟中, 发送侧, 在 Time_clk下降沿后, 在 Time_data上发送时间 值, 按照年月日, 时分秒的顺序, 依次传送, 直到 80bit传送完毕。 接收侧, 在 Time_clk上升沿, 采样 Time_data线上的数据。  In this step, on the transmitting side, after the falling edge of Time_clk, the time value is sent on Time_data, and sequentially transmitted in the order of year, month, day, hour, minute, and second, until the 80-bit transmission is completed. On the receiving side, on the rising edge of Time_clk, the data on the Time_data line is sampled.
步驟 303: 判断 80bit是否传送结束, 是则转入步驟 304, 否则转入步 驟 302。  Step 303: It is judged whether the 80 bit transmission is finished, if yes, the process proceeds to step 304, otherwise, the process proceeds to step 302.
本步驟中, 发送侧, 判断 80bit是否发送完毕, 没有结束的话, 回到步 驟 302。 80bit发送完毕的话, 转到步驟 304; 接收侧, 80bit没有接收完毕 的话, 继续等待后面数据位, 直到 80bit接收完毕。  In this step, the transmitting side determines whether the 80 bit transmission is completed, and if it is not finished, returns to step 302. If the 80bit transmission is completed, go to step 304. On the receiving side, if the 80bit is not received, continue to wait for the following data bits until the 80bit reception is completed.
步驟 304: 发送侧在 T2时刻后再等待半个 Time_clk周期, 使 Psync信 号失效。  Step 304: The transmitting side waits for a half Time_clk period after the T2 time to invalidate the Psync signal.
本步驟中, 发送侧在图 2所示的 T2时刻后再等待半个 Time_clk周期, 使 Psync信号失效, 从高变为低电平。 接收侧基本在 T2时刻完成全部时钟 值的采样和校正。  In this step, the transmitting side waits for half of the Time_clk period after the time T2 shown in FIG. 2, and disables the Psync signal from high to low. The receiving side performs sampling and correction of all clock values substantially at time T2.
具体实施中, 在其它情况下, 对于失效的情况处理也可以是: 发送侧 在接收侧接收完毕后, 在 [1/2]个时钟周期后使第一信号线上的同步脉沖信 号处于低电平的失效状态, 或, 如图 2所示的 T1时刻开始, 再经过 [ (时 间值的 bit位数 /时间值每个周期传输的数量)-0.5]个时钟周期后使第一信号 线上的同步脉沖信号处于低电平的失效状态。  In other implementations, in other cases, the processing of the failure may also be: after the receiving side receives the receiving side, the synchronization pulse signal on the first signal line is low after [1/2] clock cycles. The flat failure state, or, at the time T1 as shown in Fig. 2, passes through [(the number of bits of the time value/time value is transmitted per cycle) - 0.5] clock cycles to make the first signal line The sync pulse signal is in a low state of failure.
通过以上方式即可实现机架内部发送侧和接收侧时间的同步。  In this way, synchronization between the transmitting side and the receiving side of the rack can be achieved.
基于同一发明构思, 本发明实施例中还提供了机架内的时间同步接口 设备, 由于该设备解决问题的原理与机架内的时间同步方法相似, 因此该 设备的实施可以参见方法的实施, 重复之处不再赘述。 图 4为机架内的时间同步接口设备结构示意图, 如图所示, 在接口设 备中可以包括: Based on the same inventive concept, the time synchronization interface device in the rack is also provided in the embodiment of the present invention. Since the principle of solving the problem is similar to the time synchronization method in the rack, the implementation of the device can refer to the implementation of the method. The repetitions are not repeated here. Figure 4 is a schematic structural diagram of a time synchronization interface device in a rack. As shown in the figure, the interface device may include:
发送模块 401与接收模块 402;  Transmitting module 401 and receiving module 402;
发送模块 401中的同步发送单元 4011与接收模块 402中的同步接收单 元 4021相连, 发送模块 401中的时钟发送单元 4012与接收模块 402中的 时钟接收单元 4022相连, 发送模块 401 中的数据发送单元 4013与接收模 块 402中的数据接收单元 4023相连, 接收模块 402还包括校正单元 4024, 其中:  The synchronous transmitting unit 4011 in the transmitting module 401 is connected to the synchronous receiving unit 4021 in the receiving module 402, the clock transmitting unit 4012 in the transmitting module 401 is connected to the clock receiving unit 4022 in the receiving module 402, and the data transmitting unit in the transmitting module 401 4013 is connected to the data receiving unit 4023 in the receiving module 402. The receiving module 402 further includes a correcting unit 4024, where:
同步发送单元 4011 , 用于在第一信号线上, 用同步脉沖的上升沿向同 步接收单元 4021指示将开始数据传送;  The synchronous transmitting unit 4011 is configured to, on the first signal line, indicate to the synchronization receiving unit 4021 that the data transmission will be started by using the rising edge of the synchronization pulse;
时钟发送单元 4012, 用于在第二信号线上, 以大于 n Hz的频率向时钟 接收单元 4022传输脉沖信号, n大于 1 ;  The clock sending unit 4012 is configured to transmit a pulse signal to the clock receiving unit 4022 at a frequency greater than n Hz on the second signal line, where n is greater than 1;
数据发送单元 4013 , 用于在第三信号线上, 在同步发送单元 4011发送 的同步脉沖处于高电平的有效状态后当第二信号线上的信号处于下降沿时 发送时间值数据;  The data sending unit 4013 is configured to send, on the third signal line, the time value data when the synchronization pulse sent by the synchronous transmitting unit 4011 is in an active state of a high level, and when the signal on the second signal line is at a falling edge;
数据接收单元 4023 , 用于在第三信号线上,在同步接收单元 4021接收 的同步脉沖处于高电平的有效状态后当第二信号线上的信号处于上升沿时 采样时间值数据;  The data receiving unit 4023 is configured to, on the third signal line, sample the time value data when the signal on the second signal line is at a rising edge after the synchronization pulse received by the synchronization receiving unit 4021 is in an active state of a high level;
校正单元 4024, 用于在时间值接收完毕后, 根据接收的时间值对本地 时钟进行校正。  The correcting unit 4024 is configured to correct the local clock according to the received time value after the time value is received.
实施中, 数据发送单元 4013还可以进一步用于确定发送的时间值为同 步发送单元 4011 在第一信号线上进行指示的时间值加上时钟周期校正值 后, 再加上发送模块 401与接收模块 402之间的线路延时, 其中, 时钟周 期校正值为: [ (时间值的 bit位数 /时间值每个周期传输的数量) -0.5]个时 钟周期, 或, [ (时间值的 bit位数 -0.5]个时钟周期个时钟周期。 实施中, 时钟发送单元 4012还可以进一步用于采用 η为 2Μ的频率; 和 /或, 数据发送单元 4013可以进一步用于确定发送的时间值为 80bit, 每次传送 lbit。 In the implementation, the data sending unit 4013 may further be configured to determine that the time value of the sending is the time value indicated by the synchronous transmitting unit 4011 on the first signal line plus the clock period correction value, and then the sending module 401 and the receiving module. Line delay between 402, where the clock period correction value is: [(number of bit values of time value / time value transmitted per cycle) -0.5] clock cycles, or, [(bit value bit bit) The number is -0.5] clock cycles per clock cycle. In an implementation, the clock sending unit 4012 may further be configured to adopt a frequency where n is 2Μ; and/or, the data transmitting unit 4013 may be further configured to determine that the transmitted time value is 80 bits, and each time the bit is transmitted.
实施中, 发送模块 401中还可以进一步包括:  In the implementation, the sending module 401 may further include:
失效单元 4014, 用于在数据接收单元 4023接收完毕后,使第一信号线 上的同步脉沖信号处于低电平的失效状态。  The failing unit 4014 is configured to enable the synchronization pulse signal on the first signal line to be in a low state after the data receiving unit 4023 receives the completion.
实施中, 失效单元 4014还可以进一步用于在数据接收单元 4023接收 完毕后, 在 [1/2]个时钟周期后使第一信号线上的同步脉沖信号处于低电平 的失效状态, 或, 如图 2的 T1时刻开始, 再经过 [ (时间值的 bit位数 /时间 值每个周期传输的数量) -0.5]个时钟周期后使第一信号线上的同步脉沖信 号处于低电平的失效状态。  In the implementation, the failing unit 4014 may further be configured to enable the synchronization pulse signal on the first signal line to be in a low state after [1/2] clock cycles after the data receiving unit 4023 is received, or As shown in Fig. 2 at time T1, after [(the number of bits of the time value/time value is transmitted per cycle) -0.5] clock cycles, the synchronization pulse signal on the first signal line is at a low level. Failure status.
为了描述的方便, 以上所述装置的各部分以功能分为各种模块或单元 分别描述。 当然, 在实施本发明时可以把各模块或单元的功能在同一个或 多个软件或硬件中实现,例如:利用 CPU的 10或可编程器件 10脚来实现。  For convenience of description, the various parts of the above described devices are described separately by function into various modules or units. Of course, in implementing the present invention, the functions of the modules or units can be implemented in the same software or hardware, for example, by using the CPU 10 or the programmable device 10 pins.
普通的 TOD接口, 一般是 1秒钟发送一次 TOD报文, 接收侧 1秒钟 校对一次时间。 如果主控是从 1588报文方式获取时间信息, 主控的时钟频 率和 1588 master的频率相差 1PPM时(这种情况应该存在;), 由于 1秒时 间间隔太长, 1秒时间反应在线卡上的时间误差就是 lus, 多级时间节点传 递后, 误差累积更大, 这也导致了无法满足应用要求。 比如: 不能满足 TD-SCDMA ( Time Division Synchronized Code Division Multiple Access, 时 分同步码分多址接入)要求基站之间时间差在 1.5us以内的应用要求, 不能 满足 CDMA ( Code Division Multiple Access , 码分多址接入)要求是 3us以 内的应用要求。  Ordinary TOD interface usually sends a TOD message once every second, and the receiving side checks for one time. If the master receives time information from the 1588 packet mode, the master clock frequency differs from the 1588 master by 1 PPM (this should be the case;), because the 1 second interval is too long, 1 second response on the line card The time error is lus. After the multi-level time node is transmitted, the error accumulation is larger, which also leads to the inability to meet the application requirements. For example, TD-SCDMA (Time Division Synchronized Code Division Multiple Access) is required to meet the application requirements of time difference between base stations within 1.5 us, and cannot satisfy CDMA (Code Division Multiple Access). Address access requirements are application requirements within 3us.
而采用发明实施例中提供的技术方案, 采用提高时间校对频率的办法 来弥补上面的缺陷, 例如可以提高到每秒钟发送 490次, 这显然也大大缩 短调整时间的间隔。 具体实施中只需用软件对每秒下发的次数进行设置即 可。 However, by adopting the technical solution provided in the embodiment of the invention, the method of improving the time proofing frequency is used to compensate for the above defects, for example, it can be increased to 490 times per second, which is obviously greatly reduced. Short adjustment time interval. In the specific implementation, it is only necessary to set the number of times per second to be sent by software.
发明实施例提供的技术方案中, 只需采用三线接口便可实现机架内部 时间同步, 而效正时间间隔可以通过软件修改设置即可, 并且累计误差小, 精度高(机架内部是纳秒级误差), 具体实施中利用 CPU的 10或可编程器 件 10脚实现即可, 不需要使用专门的 232串口, 对硬件资源要求不高。 总 体来说简便可靠, 比较容易实现。  In the technical solution provided by the embodiment of the invention, the internal time synchronization of the rack can be realized by using only the three-wire interface, and the positive time interval can be modified by software, and the accumulated error is small, and the precision is high (the inside of the rack is nanoseconds) Level error), the implementation of the CPU 10 or programmable device 10 feet can be achieved, do not need to use a dedicated 232 serial port, the hardware resources are not high. It is simple, reliable and easy to implement.
本领域内的技术人员应明白, 本发明的实施例可提供为方法、 系统、 或计算机程序产品。 因此, 本发明可采用完全硬件实施例、 完全软件实施 例、 或结合软件和硬件方面的实施例的形式。 而且, 本发明可采用在一个 或多个其中包含有计算机可用程序代码的计算机可用存储介质 (包括但不 限于磁盘存储器、 CD-ROM、 光学存储器等)上实施的计算机程序产品的 形式。  Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Thus, the present invention can take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
本发明是参照根据本发明实施例的方法、 设备(系统)、 和计算机程序 产品的流程图和 /或方框图来描述的。 应理解可由计算机程序指令实现流 程图和 /或方框图中的每一流程和 /或方框、 以及流程图和 /或方框图中 的流程和 /或方框的结合。 可提供这些计算机程序指令到通用计算机、 专 机器, 使得通过计算机或其他可编程数据处理设备的处理器执行的指令产 生用于实现在流程图一个流程或多个流程和 /或方框图一个方框或多个方 框中指定的功能的装置。  The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart and/or block diagrams, and combinations of flows and/or blocks in the flowcharts and/or block diagrams can be implemented by computer program instructions. These computer program instructions may be provided to a general purpose computer, a special machine, such that instructions executed by a processor of a computer or other programmable data processing device are used to implement a block or a block and/or block diagram of a flowchart or A device that has multiple functions specified in the box.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理 设备以特定方式工作的计算机可读存储器中, 使得存储在该计算机可读存 储器中的指令产生包括指令装置的制造品, 该指令装置实现在流程图一个 流程或多个流程和 /或方框图一个方框或多个方框中指定的功能。 这些计算机程序指令也可装载到计算机或其他可编程数据处理设备 上, 使得在计算机或其他可编程设备上执行一系列操作步驟以产生计算机 实现的处理, 从而在计算机或其他可编程设备上执行的指令提供用于实现 在流程图一个流程或多个流程和 /或方框图一个方框或多个方框中指定的 功能的步驟。 The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart. These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
尽管已描述了本发明的优选实施例, 但本领域内的技术人员一旦得知 了基本创造性概念, 则可对这些实施例作出另外的变更和修改。 所以, 所 附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和 修改。  While the preferred embodiment of the invention has been described, the subject matter Therefore, it is intended that the appended claims be interpreted as including
显然, 本领域的技术人员可以对本发明进行各种改动和变型而不脱离 本发明的精神和范围。 这样, 倘若本发明的这些修改和变型属于本发明权 利要求及其等同技术的范围之内, 则本发明也意图包含这些改动和变型在 内。  It is apparent that those skilled in the art can make various modifications and variations to the invention without departing from the spirit and scope of the invention. Thus, it is intended that the present invention cover the modifications and modifications of the invention

Claims

权利要求书 Claim
1、 一种机架内的时间同步方法, 其特征在于, 所述方法包括: 在第一信号线上, 发送侧用同步脉沖的上升沿向接收侧指示将开始数 据传送;  A time synchronization method in a rack, the method comprising: transmitting, on a first signal line, a rising edge of a synchronization pulse on a transmitting side to a receiving side to start data transmission;
在第二信号线上, 发送侧以大于 n Hz的频率向接收侧传输脉沖信号, n大于 1 ;  On the second signal line, the transmitting side transmits a pulse signal to the receiving side at a frequency greater than n Hz, where n is greater than 1;
在第三信号线上, 发送侧在同步脉沖处于高电平的有效状态后当第二 信号线上的信号处于下降沿时发送时间值数据, 接收侧在接收到指示后当 第二信号线上的信号处于上升沿时采样时间值数据;  On the third signal line, the transmitting side transmits the time value data when the signal on the second signal line is at the falling edge after the synchronization pulse is in the active state of the high level, and the receiving side is the second signal line after receiving the indication. Sampling time value data when the signal is at the rising edge;
接收侧在时间值接收完毕后, 根据接收的时间值对本地时钟进行校正。 After receiving the time value, the receiving side corrects the local clock according to the received time value.
2、 如权利要求 1所述的方法, 其特征在于, 所述发送侧发送的时间值 数据为发送侧在第一信号线上进行指示的时间值加上时钟周期校正值后, 再加上发送侧与接收侧之间的线路延时, 其中, 时钟周期校正值为: [ (时 间值的 bit位数 /时间值每个周期传输的数量) -0.5]个时钟周期 。 2. The method according to claim 1, wherein the time value data sent by the transmitting side is a time value indicated by the transmitting side on the first signal line plus a clock period correction value, and then sent The line delay between the side and the receiving side, where the clock period correction value is: [(number of bits of the time value / time value transmitted per cycle) - 0.5] clock cycles.
3、 如权利要求 2所述的方法, 其特征在于, 所述 n为 2M; 和 /或, 所 述时间值为 80bit;  3. The method according to claim 2, wherein the n is 2M; and/or, the time value is 80 bits;
所述发送侧在同步脉沖处于高电平的有效状态后当第二信号线上的信 号处于下降沿时发送时间值数据为:  The transmitting side sends the time value data when the signal on the second signal line is at a falling edge after the synchronization pulse is in the active state of the high level:
所述发送侧每次在同步脉沖处于高电平的有效状态后当第二信号线上 的信号处于下降沿时传送 lbit时间值数据。  The transmitting side transmits the lbit time value data each time the signal on the second signal line is at the falling edge after the synchronization pulse is in the active state of the high level.
4、 如权利要求 1至 3任一项所述的方法, 其特征在于, 所述方法进一 步包括:  The method according to any one of claims 1 to 3, wherein the method further comprises:
发送侧在接收侧接收完毕后, 使第一信号线上的同步脉沖信号处于低 电平的失效状态。  After the receiving side receives the receiving side, the synchronizing pulse signal on the first signal line is in a low-level failure state.
5、 如权利要求 4所述的方法, 其特征在于, 所述发送侧在接收侧接收 完毕后, 使第一信号线上的同步脉沖信号处于低电平的失效状态为: 从同步脉沖的上升沿开始, 再经过 [ (时间值的 bit位数 /时间值每个周 期传输的数量) -0.5]个时钟周期后使第一信号线上的同步脉沖信号处于低 电平的失效状态。 5. The method according to claim 4, wherein the transmitting side receives on the receiving side After the completion, the failure state of the synchronization pulse signal on the first signal line is at a low level: starting from the rising edge of the synchronization pulse, and then passing [(the number of bits of the time value/time value is transmitted per cycle) -0.5] A fail state in which the sync pulse signal on the first signal line is at a low level after one clock cycle.
6、 一种机架内的时间同步接口设备, 其特征在于, 所述设备包括: 发 送模块与接收模块, 发送模块中的同步发送单元与接收模块中的同步接收 单元相连, 发送模块中的时钟发送单元与接收模块中的时钟接收单元相连, 发送模块中的数据发送单元与接收模块中的数据接收单元相连, 接收模块 还包括校正单元, 其中:  A time synchronization interface device in a rack, the device comprising: a sending module and a receiving module, wherein the synchronous sending unit in the sending module is connected to the synchronous receiving unit in the receiving module, and the clock in the sending module The sending unit is connected to the clock receiving unit in the receiving module, and the data sending unit in the sending module is connected to the data receiving unit in the receiving module, and the receiving module further comprises a correcting unit, wherein:
同步发送单元, 用于在第一信号线上, 用同步脉沖的上升沿向同步接 收单元指示将开始数据传送;  a synchronous transmitting unit, configured to indicate, by using a rising edge of the synchronization pulse, to the synchronous receiving unit to start data transmission on the first signal line;
时钟发送单元, 用于在第二信号线上, 以大于 n Hz的频率向时钟接收 单元传输脉沖信号, n大于 1 ;  a clock sending unit, configured to transmit a pulse signal to the clock receiving unit at a frequency greater than n Hz on the second signal line, where n is greater than 1;
数据发送单元, 用于在第三信号线上, 在同步发送单元发送的同步脉 沖处于高电平的有效状态后当第二信号线上的信号处于下降沿时发送时间 值数据;  a data sending unit, configured to send, on the third signal line, the time value data when the signal on the second signal line is at a falling edge after the synchronous pulse sent by the synchronous transmitting unit is in an active state of a high level;
数据接收单元, 用于在第三信号线上, 在同步接收单元接收的同步脉 沖处于高电平的有效状态后当第二信号线上的信号处于上升沿时采样时间 值数据;  a data receiving unit, configured to: on the third signal line, sample the time value data when the signal on the second signal line is at a rising edge after the synchronization pulse received by the synchronous receiving unit is in an active state of a high level;
校正单元, 用于在时间值接收完毕后, 根据接收的时间值对本地时钟 进行校正。  The correcting unit is configured to correct the local clock according to the received time value after the time value is received.
7、 如权利要求 6所述的设备, 其特征在于, 所述数据发送单元, 进一 时间值加上时钟周期校正值后, 再加上发送模块与接收模块之间的线路延 时, 其中, 时钟周期校正值为: [ (时间值的 bit位数 /时间值每个周期传输 的数量) -0.5]个时钟周期。 The device according to claim 6, wherein the data transmitting unit adds a time period value to the clock period correction value, and further adds a line delay between the transmitting module and the receiving module, wherein The clock period correction value is: [ (the bit value of the time value / time value is transmitted per cycle) The number) -0.5] clock cycles.
8、 如权利要求 7所述的设备, 其特征在于, 所述时钟发送单元, 进一 步用于采用 n为 2M的频率;  8. The device according to claim 7, wherein the clock transmitting unit is further used to adopt a frequency of n of 2M;
和 /或, 数据发送单元进一步用于确定发送的时间值为 80bit, 每次传送 lbito  And / or, the data sending unit is further configured to determine that the time value sent is 80 bits, each time transmitting lbito
9、 如权利要求 6至 8任一项所述的设备, 其特征在于, 所述发送模块 进一步包括:  The device according to any one of claims 6 to 8, wherein the sending module further comprises:
失效单元, 用于在数据接收单元接收完毕后, 使第一信号线上的同步 脉沖信号处于低电平的失效状态。  The failing unit is configured to make the synchronous pulse signal on the first signal line in a low state after the data receiving unit receives the signal.
10、 如权利要求 9所述的设备, 其特征在于, 所述失效单元, 进一步 用于在数据接收单元接收完毕后, 从同步脉沖的上升沿开始, 再经过 [ (时 间值的 bit位数 /时间值每个周期传输的数量)-0.5]个时钟周期后使第一信号 线上的同步脉沖信号处于低电平的失效状态。  The device according to claim 9, wherein the failing unit is further configured to start from a rising edge of the synchronization pulse after receiving the data receiving unit, and then pass [(bit value bit number/ The time value is transmitted per cycle) -0.5] After the clock cycle, the sync pulse signal on the first signal line is in a low state.
PCT/CN2011/082105 2010-11-30 2011-11-11 Method and device for time synchronisation on rack WO2012071977A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010566514.5A CN102142954B (en) 2010-11-30 2010-11-30 Time synchronization method and equipment in rack
CN201010566514.5 2010-11-30

Publications (1)

Publication Number Publication Date
WO2012071977A1 true WO2012071977A1 (en) 2012-06-07

Family

ID=44410202

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/082105 WO2012071977A1 (en) 2010-11-30 2011-11-11 Method and device for time synchronisation on rack

Country Status (2)

Country Link
CN (1) CN102142954B (en)
WO (1) WO2012071977A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102142954B (en) * 2010-11-30 2014-11-05 中兴通讯股份有限公司 Time synchronization method and equipment in rack
CN103684736A (en) * 2013-11-21 2014-03-26 国网上海市电力公司 Clock synchronization method for high-speed communication
CN105281882A (en) * 2014-06-30 2016-01-27 中兴通讯股份有限公司 Method and device for realizing time synchronization
CN107786294B (en) * 2017-09-22 2019-04-30 烽火通信科技股份有限公司 A kind of centralized 1588 realization system and method
CN115085851B (en) * 2022-07-20 2022-12-20 深圳市徐港电子有限公司 Vehicle-mounted ECU time synchronization method and device, vehicle-mounted ECU and storage medium
CN115801165A (en) * 2022-09-29 2023-03-14 成都赛力斯科技有限公司 Time synchronization method, system, device and medium for vehicle-mounted controller

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1384692A (en) * 2001-04-30 2002-12-11 华为技术有限公司 Multiplex circuit data transmitting method via back board high-speed serial lines
US20070097940A1 (en) * 2005-11-03 2007-05-03 Autocell Laboratories, Inc. Pre-scan for wireless channel selection
CN101432762A (en) * 2006-04-26 2009-05-13 松下电器产业株式会社 Signal transmission method, transmission/reception device, and communication system
CN102142954A (en) * 2010-11-30 2011-08-03 中兴通讯股份有限公司 Time synchronization method and equipment in rack

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101741853B (en) * 2009-12-11 2013-01-16 中兴通讯股份有限公司 Method for synchronizing clock time, line card veneer and network equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1384692A (en) * 2001-04-30 2002-12-11 华为技术有限公司 Multiplex circuit data transmitting method via back board high-speed serial lines
US20070097940A1 (en) * 2005-11-03 2007-05-03 Autocell Laboratories, Inc. Pre-scan for wireless channel selection
CN101432762A (en) * 2006-04-26 2009-05-13 松下电器产业株式会社 Signal transmission method, transmission/reception device, and communication system
CN102142954A (en) * 2010-11-30 2011-08-03 中兴通讯股份有限公司 Time synchronization method and equipment in rack

Also Published As

Publication number Publication date
CN102142954A (en) 2011-08-03
CN102142954B (en) 2014-11-05

Similar Documents

Publication Publication Date Title
CN112672415B (en) Multi-sensor time synchronization method, device, system, electronic device and medium
WO2012071977A1 (en) Method and device for time synchronisation on rack
US8793524B2 (en) Method and apparatus for synchronising the local time of a plurality of instruments
CN110493744B (en) Data synchronous acquisition method and system of master-slave wireless sensor
US20200127752A1 (en) Time synchronization device and time synchronization method
JP2013505653A (en) Method and system for realizing time synchronization in a local area network
WO2013020499A1 (en) Method and device for implementing automatic compensation for asymmetric delay of 1588 link
JP2018534686A (en) Apparatus and method for synchronizing controllers and sensors
AU2013204757A1 (en) Synchronisation of a system of distributed computers
JP2009111654A (en) Time synchronization processing system, time information distributor, time synchronization processor, time information distribution program, and time synchronization processing program
CN106707736A (en) Automobile instrument clock precision measuring method and automobile instrument clock precision measuring device
WO2017019678A1 (en) Pps tagging of acoustic sample data
CN104837197A (en) Method for synchronizing two-way time of wireless sensor network
JPWO2019003320A1 (en) Communication system and slave device
CN113419598B (en) Clock synchronization system and method for multi-SOC (system on chip)
CN114615736A (en) Time synchronization network device and method
CN102651685B (en) Signal delay device and method
WO2016065642A1 (en) Synchronization device and method
CN104935394A (en) Time signal generator and time tester
WO2016000324A1 (en) Method and apparatus for implementing time synchronization
CN204697070U (en) Time signal generator and time tester
Zhao et al. The implementation of IEEE 1588 clock synchronization system based on FPGA
CN101465704B (en) Method for asynchronously loading and accurately positioning impulse signal in synchronous channel
CN103684730A (en) Time synchronization method
CN107995681B (en) Time synchronization method and device for wireless sensor network

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: 11845673

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11845673

Country of ref document: EP

Kind code of ref document: A1