CN115080495A - Time synchronization method and system for standard peripheral extension interface equipment - Google Patents

Time synchronization method and system for standard peripheral extension interface equipment Download PDF

Info

Publication number
CN115080495A
CN115080495A CN202211003568.XA CN202211003568A CN115080495A CN 115080495 A CN115080495 A CN 115080495A CN 202211003568 A CN202211003568 A CN 202211003568A CN 115080495 A CN115080495 A CN 115080495A
Authority
CN
China
Prior art keywords
time
standard peripheral
interface device
synchronization
extension interface
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.)
Granted
Application number
CN202211003568.XA
Other languages
Chinese (zh)
Other versions
CN115080495B (en
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.)
Beijing Putai Technology Co ltd
Original Assignee
Beijing Putai Technology 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 Beijing Putai Technology Co ltd filed Critical Beijing Putai Technology Co ltd
Priority to CN202211003568.XA priority Critical patent/CN115080495B/en
Publication of CN115080495A publication Critical patent/CN115080495A/en
Application granted granted Critical
Publication of CN115080495B publication Critical patent/CN115080495B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • G06F13/4291Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus using a clocked protocol
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/04Generating or distributing clock signals or signals derived directly therefrom
    • G06F1/12Synchronisation of different clock signals provided by a plurality of clock generators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • G06F13/4295Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus using an embedded synchronisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0026PCI express

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

The invention provides a time synchronization method and a system of standard peripheral extension interface equipment, wherein the method comprises the following steps: sending a time acquisition request to each PCIE device periodically based on a time synchronization period, and recording a first time corresponding to each PCIE device; receiving time response information returned by each PCIE device, and recording second time corresponding to each PCIE device; if the time difference between the second time corresponding to the PCIE equipment and the first time corresponding to the PCIE equipment is smaller than the effective communication time threshold value, obtaining a synchronous time difference value corresponding to the PCIE equipment according to the first time, the second time and the equipment time corresponding to the PCIE equipment; and sending a time synchronization request to each PCIE device for time synchronization. The time synchronization method and the time synchronization system for the standard peripheral expansion interface device provided by the embodiment of the invention reduce the time synchronization cost among PCIE devices.

Description

Time synchronization method and system for standard peripheral extension interface equipment
Technical Field
The invention relates to the technical field of equipment testing, in particular to a time synchronization method and a time synchronization system for standard peripheral extension interface equipment.
Background
With the wide application of standard peripheral component interface (PCI Express, abbreviated as PCIE) devices, more and more application scenarios require that time between PCIE devices is synchronous.
In the prior art, time synchronization between different PCIE devices mainly provides a uniform clock crystal source for a PCIE device requiring time synchronization by a hardware means. The scheme has complex hardware design and high cost, and PCIE equipment needs to perform special processing aiming at the time synchronization requirement, so that the hardware cost is high.
Disclosure of Invention
To solve the problems in the prior art, embodiments of the present invention provide a time synchronization method and system for a standard peripheral expansion interface device, which can at least partially solve the problems in the prior art.
In a first aspect, the present invention provides a time synchronization method for a standard peripheral expansion interface device, including:
periodically sending a time acquisition request to each standard peripheral expansion interface device based on a time synchronization period, and recording first time corresponding to each standard peripheral expansion interface device; the first time is the time for sending the time acquisition request to the standard peripheral expansion interface equipment;
receiving time response information returned by each standard peripheral expansion interface device, and recording second time corresponding to each standard peripheral expansion interface device; the second time is the time of receiving time response information returned by the standard peripheral extension interface equipment; the time response information comprises the device time;
if the time difference between the second time corresponding to the standard peripheral extension interface device and the first time corresponding to the standard peripheral extension interface device is judged and obtained to be smaller than the effective communication time threshold, obtaining a synchronous time difference value corresponding to the standard peripheral extension interface device according to the first time corresponding to the standard peripheral extension interface device, the second time corresponding to the standard peripheral extension interface device and the device time included in the time response information returned by the standard peripheral extension interface device;
sending a time synchronization request to each standard peripheral expansion interface device so that each standard peripheral expansion interface device performs time synchronization according to a synchronization time difference value corresponding to the standard peripheral expansion interface device; and the time synchronization request comprises a synchronization time difference value corresponding to the standard peripheral extension interface equipment.
Further, the time synchronization method for standard peripheral extension interface devices provided in the embodiments of the present invention further includes:
recording third time corresponding to each standard peripheral extension interface device while sending a time synchronization request to each standard peripheral extension interface device; wherein the third time is the time for sending the synchronous time synchronization request to the standard peripheral extension interface device;
obtaining a synchronization starting time according to a first time corresponding to each standard peripheral expansion interface device, and obtaining a synchronization ending time according to a third time corresponding to each standard peripheral expansion interface device;
and if the time difference between the synchronization ending time and the synchronization starting time is judged and obtained to be larger than the time synchronization window threshold, outputting time synchronization failure prompt information.
Further, the time synchronization method for standard peripheral extension interface devices provided in the embodiments of the present invention further includes:
and if the residual time of the current time synchronization period is judged and obtained to be larger than or equal to the time synchronization window threshold, time synchronization is carried out on each standard peripheral expansion interface device again.
Further, the obtaining, according to the first time corresponding to the standard peripheral extension interface device, the second time corresponding to the standard peripheral extension interface device, and the device time included in the time response information returned by the standard peripheral extension interface device, the synchronization time difference value corresponding to the standard peripheral extension interface device includes:
according to the formula Δ t = t 1 –t e + (t 2 - t 1 ) And 2, calculating to obtain a synchronous time difference value delta t corresponding to the standard peripheral extension interface equipment, wherein t 1 Representing a first time, t, corresponding to the standard peripheral expansion interface device 2 Indicating a second time, t, corresponding to the standard peripheral expansion interface device e Indicating the equipment time included in the time response information returned by the standard peripheral extension interface equipment。
In a second aspect, the present invention provides a time synchronization system for a standard peripheral expansion interface device, which uses the time synchronization method for a standard peripheral expansion interface device according to any of the above embodiments, and includes an upper computer and a plurality of standard peripheral expansion interface devices, where:
the upper computer is connected with each standard peripheral expansion interface device through a standard peripheral expansion interface;
the upper computer comprises a time updating module and a first timing module, and the time updating module is connected with the first timing module; each standard peripheral extension interface device comprises a second timing module;
the time updating module is used for synchronizing the time of the first timing module to the second timing module of each standard peripheral extension interface device.
In a third aspect, the present invention provides a time synchronization system for a standard peripheral expansion interface device, which employs the time synchronization method for a standard peripheral expansion interface device described in any of the above embodiments, including a time synchronization device and a plurality of upper computers, where each upper computer corresponds to a plurality of standard peripheral expansion interface devices, and where:
the time synchronization equipment is respectively in communication connection with each upper computer; each upper computer comprises a time updating module and a first timing module, and the time updating module is connected with the first timing module; each standard peripheral extension interface device comprises a second timing module;
the time synchronization equipment is used for carrying out time calibration on the first timing module of each upper computer;
and the time updating module of the upper computer is used for synchronizing the time of the first timing module of the upper computer to the second timing module of each corresponding standard peripheral expansion interface device.
In a fourth aspect, the present invention provides a time synchronization apparatus for a standard peripheral expansion interface device, including:
the sending unit is used for regularly sending a time acquisition request to each standard peripheral expansion interface device based on a time synchronization period and recording first time corresponding to each standard peripheral expansion interface device; the first time is the time for sending the time acquisition request to the standard peripheral expansion interface equipment;
the receiving unit is used for receiving the time response information returned by each standard peripheral expansion interface device and recording the second time corresponding to each standard peripheral expansion interface device; the second time is the time of receiving time response information returned by the standard peripheral extension interface equipment; the time response information comprises the device time;
the judging unit is used for obtaining a synchronous time difference value corresponding to the standard peripheral extension interface device according to the first time corresponding to the standard peripheral extension interface device, the second time corresponding to the standard peripheral extension interface device and the device time included in the time response information returned by the standard peripheral extension interface device after judging that the time difference between the second time corresponding to the standard peripheral extension interface device and the first time corresponding to the standard peripheral extension interface device is smaller than an effective communication time threshold;
the time synchronization unit is used for sending a time synchronization request to each standard peripheral expansion interface device so that each standard peripheral expansion interface device carries out time synchronization according to a synchronization time difference value corresponding to the standard peripheral expansion interface device; and the time synchronization request comprises a synchronization time difference value corresponding to the standard peripheral extension interface equipment.
In a fifth aspect, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the time synchronization method of the standard peripheral expansion interface device according to any of the above embodiments.
In a sixth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the time synchronization method of the standard peripheral extension interface device according to any one of the above embodiments.
In a seventh aspect, the present invention provides a computer program product, where the computer program product includes a computer program, and when the computer program is executed by a processor, the computer program implements the time synchronization method for a standard peripheral extension interface device according to any of the above embodiments.
The time synchronization method and system for standard peripheral extension interface devices provided by the embodiments of the present invention periodically send a time acquisition request to each standard peripheral extension interface device based on a time synchronization period, record a first time corresponding to each standard peripheral extension interface device, receive a time response message returned by each standard peripheral extension interface device, record a second time corresponding to each standard peripheral extension interface device, if it is determined that a time difference between the second time corresponding to the standard peripheral extension interface device and the first time corresponding to the standard peripheral extension interface device is smaller than an effective communication time threshold, obtain a synchronization time difference value corresponding to the standard peripheral extension interface device according to the first time corresponding to the standard peripheral extension interface device, the second time corresponding to the standard peripheral extension interface device, and a device time included in the time response message returned by the standard peripheral extension interface device, and sending a time synchronization request to each standard peripheral expansion interface device, so that each standard peripheral expansion interface device performs time synchronization according to the synchronization time difference corresponding to the standard peripheral expansion interface device, thereby realizing the time synchronization of each PCIE device and reducing the time synchronization cost among the PCIE devices.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart illustrating a time synchronization method for a standard peripheral expansion interface device according to a first embodiment of the present invention.
Fig. 2 is a flowchart illustrating a time synchronization method for a standard peripheral expansion interface device according to a second embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a time synchronization system of a standard peripheral expansion interface device according to a third embodiment of the present invention.
Fig. 4 is a schematic structural diagram of a time synchronization system of a standard peripheral expansion interface device according to a fourth embodiment of the present invention.
Fig. 5 is a schematic structural diagram of a time synchronization apparatus of a standard peripheral expansion interface device according to a fifth embodiment of the present invention.
Fig. 6 is a schematic structural diagram of a time synchronization apparatus of a standard peripheral expansion interface device according to a sixth embodiment of the present invention.
Fig. 7 is a schematic structural diagram of a time synchronization apparatus of a standard peripheral expansion interface device according to a seventh embodiment of the present invention.
Fig. 8 is a schematic physical structure diagram of an electronic device according to an eighth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
Fig. 1 is a schematic flowchart of a time synchronization method for a standard peripheral expansion interface device according to a first embodiment of the present invention, and as shown in fig. 1, the time synchronization method for a standard peripheral expansion interface device according to the present invention includes:
s101, periodically sending a time acquisition request to each standard peripheral expansion interface device based on a time synchronization period, and recording first time corresponding to each standard peripheral expansion interface device; the first time is the time for sending the time acquisition request to the standard peripheral expansion interface equipment;
specifically, the upper computer may periodically send an acquisition time request to each PCIE device according to a time synchronization period, where the acquisition time request is used to acquire time of the PCIE device. The upper computer can record the time for sending the time acquisition request as the first time corresponding to each PCIE device when sending the time acquisition request to each PCIE device. The time synchronization period is preset and is set according to actual needs, and the embodiment of the invention is not limited. In the embodiment of the present invention, a PCIE device refers to a device having a PCIE interface, such as a PCIE network card.
For example, the time synchronization period may depend on the frequency offset of the clock crystal of the PCIE device and the desired time synchronization accuracy. For example, the frequency offset of the clock oscillator of the PCIE device is 1ppm, the timing error caused by the frequency offset within 1 second is ± 1 microsecond, and if microsecond-level time synchronization is desired, the time synchronization period is less than or equal to 1 second.
S102, receiving time response information returned by each standard peripheral expansion interface device, and recording second time corresponding to each standard peripheral expansion interface device; the second time is the time of receiving time response information returned by the standard peripheral extension interface equipment; the time response information comprises the device time;
specifically, for each PCIE device, after receiving the time obtaining request, the device time is obtained, and then the device time is carried in time response information and returned to the upper computer. The upper computer receives the time response information returned by each PCIE device, and records the time for receiving the time response information as the second time corresponding to each standard peripheral expansion interface device while receiving the time response information returned by each PCIE device. The device time can be acquired by a timing module of the PCIE device, and the timing module of the PCIE device has an independent clock source.
S103, if the time difference between the second time corresponding to the standard peripheral extension interface device and the first time corresponding to the standard peripheral extension interface device is judged and obtained to be smaller than the effective communication time threshold, obtaining a synchronous time difference value corresponding to the standard peripheral extension interface device according to the first time corresponding to the standard peripheral extension interface device, the second time corresponding to the standard peripheral extension interface device and the device time included in the time response information returned by the standard peripheral extension interface device;
specifically, for each PCIE device, the upper computer may calculate a time difference between a second time corresponding to the PCIE device and a first time corresponding to the PCIE device, then compare the time difference with an effective communication time threshold, and if the time difference is smaller than the effective communication time threshold, the upper computer may obtain a synchronization time difference value corresponding to the PCIE device according to the first time corresponding to the PCIE device, the second time corresponding to the PCIE device, and the device time included in the time response information returned by the PCIE device. The effective communication time threshold is the maximum time of one-time data interaction between the upper computer and the PCIE device, and may be calculated according to the PCIE speed and the size of the transmission message.
It can be understood that if the time difference is greater than or equal to the effective communication time threshold, it indicates that the communication between the upper computer and the PCIE device is invalid, and the upper computer may send a time acquisition request to the PCIE device again to perform time synchronization again.
S104, sending a time synchronization request to each standard peripheral expansion interface device so that each standard peripheral expansion interface device performs time synchronization according to a synchronization time difference value corresponding to the standard peripheral expansion interface device; and the time synchronization request comprises a synchronization time difference value corresponding to the standard peripheral extension interface equipment.
Specifically, for each PCIE device, after obtaining the synchronization time difference value corresponding to the PCIE device, the upper computer may send a time synchronization request to the PCIE device, where the time synchronization request includes the synchronization time difference value corresponding to the PCIE device. After receiving the time synchronization request, the PCIE device updates the time of the PCIE device according to the synchronization time difference, and then the PCIE device continues to time under the driving of the clock source independent of the timing module. The time synchronization between the PCIE equipment and the upper computer is realized. Because each PCIE device and the upper computer keep time synchronization, the time synchronization among the PCIE devices is realized.
The time synchronization method of the standard peripheral extension interface device provided by the embodiment of the invention periodically sends a time acquisition request to each standard peripheral extension interface device based on a time synchronization period, records the first time corresponding to each standard peripheral extension interface device, receives the time response information returned by each standard peripheral extension interface device, records the second time corresponding to each standard peripheral extension interface device, and obtains the synchronization time difference value corresponding to the standard peripheral extension interface device according to the first time corresponding to the standard peripheral extension interface device, the second time corresponding to the standard peripheral extension interface device and the device time included in the time response information returned by the standard peripheral extension interface device if the time difference between the second time corresponding to the standard peripheral extension interface device and the first time corresponding to the standard peripheral extension interface device is judged and known to be less than the effective communication time threshold, and sending a time synchronization request to each standard peripheral expansion interface device, so that each standard peripheral expansion interface device performs time synchronization according to the synchronization time difference corresponding to the standard peripheral expansion interface device, thereby realizing the time synchronization of each PCIE device and reducing the time synchronization cost among the PCIE devices.
Fig. 2 is a schematic flow chart of a time synchronization method for a standard peripheral expansion interface device according to a second embodiment of the present invention, and as shown in fig. 2, on the basis of the foregoing embodiments, further, the time synchronization method for a standard peripheral expansion interface device according to the embodiment of the present invention further includes:
s201, when a time synchronization request is sent to each standard peripheral expansion interface device, recording third time corresponding to each standard peripheral expansion interface device; wherein the third time is the time for sending the synchronous time synchronization request to the standard peripheral extension interface device;
specifically, for each PCIE device, the upper computer records, as third time corresponding to the PCIE device, time for sending the time synchronization request while sending the time synchronization request to the standard peripheral expansion interface device.
S202, obtaining synchronization starting time according to first time corresponding to each standard peripheral expansion interface device, and obtaining synchronization ending time according to third time corresponding to each standard peripheral expansion interface device;
specifically, the upper computer compares first time corresponding to each standard peripheral extension interface device, and obtains the earliest time from the first time as the synchronization start time of the current time synchronization period. And the upper computer compares the third time corresponding to each standard peripheral expansion interface device, and obtains the latest time from the third time as the synchronous ending time of the current time synchronization period.
S203, if the time difference between the synchronization ending time and the synchronization starting time is judged and obtained to be larger than the time synchronization window threshold, outputting time synchronization failure prompt information.
Specifically, the upper computer calculates a time difference between the synchronization end time and the synchronization start time, then compares the time difference with a time synchronization window threshold, and if the time difference is greater than the time synchronization window threshold, it indicates that time synchronization of all PCIE devices is not completed in the time synchronization window, and then the upper computer may output time synchronization failure prompt information. The time synchronization window threshold is set according to actual needs, and the embodiment of the present invention is not limited. The time of all the PCIE devices connected with the upper computer needs to be synchronized in the time synchronization window.
For example, the time synchronization window threshold may be determined according to the crystal frequency offset of the upper computer and the desired time synchronization precision. For example, the crystal oscillator frequency offset of the upper computer is 1ppm, microsecond-level time synchronization is expected, and the time synchronization window threshold is less than or equal to 1 second; the number of PCIE equipment which can be calibrated by the upper computer is limited by the size of a time synchronization window threshold, and the time synchronization window threshold is less than or equal to a time synchronization period.
On the basis of the foregoing embodiments, further, the time synchronization method for standard peripheral expansion interface devices provided in the embodiments of the present invention further includes:
and if the residual time of the current time synchronization period is judged and obtained to be larger than the time synchronization window threshold, time synchronization is carried out on each standard peripheral expansion interface device again.
Specifically, after judging that the time difference between the synchronization end time and the synchronization start time is greater than the time synchronization window threshold, the upper computer calculates the time difference from the current time to the start time of the next time synchronization period as the remaining time of the current time synchronization period, then compares the remaining time of the current time synchronization period with the time synchronization window threshold, and if the remaining time of the current time synchronization period is greater than the time synchronization window threshold, it indicates that the remaining time of the current time synchronization period is sufficient to perform time synchronization again, and the upper computer may send a time acquisition request to each standard peripheral expansion interface device again to perform time synchronization again on each PCIE device. The specific implementation process of re-performing time synchronization is similar to the process of steps S101, S102, S103 and S104, and is not described herein again.
On the basis of the foregoing embodiments, further, the obtaining, according to the first time corresponding to the standard peripheral extension interface device, the second time corresponding to the standard peripheral extension interface device, and the device time included in the time response information returned by the standard peripheral extension interface device, the synchronization time difference value corresponding to the standard peripheral extension interface device includes:
according to the formula Δ t = t 1 –t e + (t 2 - t 1 ) And 2, calculating to obtain a synchronous time difference value delta t corresponding to the standard peripheral extension interface equipment, wherein t 1 Representing a first time, t, corresponding to the standard peripheral expansion interface device 2 Indicating a second time, t, corresponding to the standard peripheral expansion interface device e And the equipment time included in the time response information returned by the standard peripheral extension interface equipment is represented.
Specifically, the upper computer sends the first time t corresponding to the PCIE device 1 A second time t corresponding to the PCIE device 2 And the device time t included in the time response information returned by the PCIE device e Brought into the formula Δt=t 1 –t e + (t 2 - t 1 ) In/2, the synchronization time difference Δ t corresponding to the PCIE device may be obtained through calculation.
Fig. 3 is a schematic structural diagram of a time synchronization system of a standard peripheral expansion interface device according to a third embodiment of the present invention, and as shown in fig. 3, the time synchronization system of a standard peripheral expansion interface device according to the present invention adopts a time synchronization method of a standard peripheral expansion interface device according to any one of the above embodiments, and includes an upper computer 301 and a plurality of PCIE devices 302, where:
the upper computer 301 is connected with each PCIE device 302 through a standard peripheral extension interface;
the upper computer 301 comprises a time updating module 3011 and a first timing module 3012, and the time updating module 3011 is connected to the first timing module 3012; each PCIE device 302 includes a second timing module 3021;
the time update module 3011 is configured to synchronize the time of the first timing module 3012 to the second timing module 3021 of each PCIE device.
Specifically, the first timing module 3012 has an independent crystal clock source, and the first timing module 3012 is configured to time the upper computer 301. The second timing module 3021 of each PCIE device 302 has an independent crystal clock source for timing the PCIE device 302.
The time update module 3011 may be used as an execution entity to execute the time synchronization method of the standard peripheral expansion interface device provided in the embodiment of the present invention.
The time updating module 3011 obtains the current time from the first timing module 3012, and if the current time reaches the time synchronization time corresponding to the time synchronization period, sends a time obtaining request to each standard peripheral expansion interface device, and obtains, through the first timing module 3012, the time for sending the time obtaining request to each PCIE device 302, as the first time corresponding to each PCIE device 302.
After receiving the time obtaining request, the PCIE device 302 obtains the current time from the second timing module 3021 as the device time, and then sends the device time carried in the time response information to the upper computer 301.
The time updating module 3011 obtains, through the first timing module 3012, a time for receiving the time response information returned by each PCIE device 302, as a second time corresponding to each PCIE device 302.
For one PCIE device 302, the time update module 3011 calculates a time difference between a second time corresponding to the PCIE device 302 and a first time corresponding to the PCIE device 302, then compares the time difference with an effective communication time threshold, and if the time difference is smaller than the effective communication time threshold, the time update module 3011 obtains a synchronization time difference value corresponding to the PCIE device 302 according to the first time corresponding to the PCIE device 302, the second time corresponding to the PCIE device 302, and the device time included in the time response information returned by the PCIE device 302.
The time update module 3011 sends a time synchronization request to the PCIE device 302, where the time synchronization request includes a synchronization time difference value corresponding to the PCIE device 302. After the PCIE device 302 receives the time synchronization request, the second timing module 3021 calibrates the time according to the synchronization time difference, and after the calibration is completed, the second timing module 3021 continues to time under the driving of the independent clock source.
The time synchronization system of the standard peripheral extension interface equipment provided by the embodiment of the invention comprises an upper computer and a plurality of standard peripheral extension interface equipment, wherein the upper computer is connected with each standard peripheral extension interface equipment through a standard peripheral extension interface; the upper computer comprises a time updating module and a first timing module, and the time updating module is connected with the first timing module; each standard peripheral extension interface device comprises a second timing module; the time updating module is used for synchronizing the time of the first timing module to the second timing module of each standard peripheral expansion interface device, so that the time synchronization of each PCIE device is realized, and the time synchronization cost among the PCIE devices is reduced.
The embodiment of the time synchronization system of the standard peripheral equipment expansion interface device provided by the embodiment of the present invention may be specifically configured to execute the processing flows of the above method embodiments, and the functions of the embodiment are not described herein again, and refer to the detailed description of the above method embodiments.
Fig. 4 is a schematic structural diagram of a time synchronization system of a standard peripheral extension interface device according to a fourth embodiment of the present invention, and as shown in fig. 4, the time synchronization system of a standard peripheral extension interface device according to the present invention, which employs the time synchronization method of a standard peripheral extension interface device according to any one of the embodiments described above, includes a time synchronization device 400 and a plurality of upper computers 401, where each upper computer 401 corresponds to a plurality of PCIE devices 402, where:
the time synchronization device 400 is in communication connection with each upper computer 401; each upper computer 401 comprises a time updating module 4011 and a first timing module 4012, wherein the time updating module 4011 is connected with the first timing module 4012; each PCIE device 402 includes a second timing module 4021;
the time synchronization device 400 is configured to perform time calibration on the first timing module 4012 of each upper computer 401;
the time updating module 4011 of the upper computer 401 is configured to synchronize the time of the first timing module 4012 of the upper computer 401 to the corresponding second timing module 4021 of each PCIE device 402.
Specifically, the Time synchronization device 400 may perform Time calibration on the first timing module 4012 of each upper computer 401 through a Time synchronization Protocol, for example, a Precision Time Protocol (PTP), so as to synchronize the Time of the first timing module 4012 of each upper computer 401. The first timing module 4012 has an independent crystal clock source, and the first timing module 4012 is configured to time the upper computer 401. The second timing module 4021 of each PCIE device 402 has an independent crystal clock source for timing the PCIE device 402. The time synchronization apparatus 400 may employ a server, among others.
The time update module 4011 may be used as an execution subject to execute the time synchronization method of the standard peripheral expansion interface device provided in the embodiment of the present invention. The time updating module 4011 performs a similar specific process to the time updating module 3011 serving as an execution main body to perform the time synchronization method for the standard peripheral expansion interface device according to the embodiment of the present invention, and is not described herein again.
The time synchronization system of the standard peripheral expansion interface device provided by the embodiment of the invention is realized based on the PCIE interface, is simple to realize and low in cost, and the PCIE interface is easy to expand, deploy and implement.
The following describes a process for implementing the time synchronization method of the standard peripheral expansion interface device according to an embodiment of the present invention. In the embodiment of the invention, the upper computer adopts a network test instrument.
When the forwarding function of the network switch is tested, in order to test the delay of the switch, the time of the PCIE network card (hereinafter referred to as a first network card) at the transmitting end and the time of the PCIE network card (hereinafter referred to as a second network card) at the receiving end of the network test instrument need to be synchronized, otherwise, the accurate delay cannot be obtained. Therefore, when the time delay of the switch is tested, the time synchronization method of the standard peripheral expansion interface device provided by the embodiment of the invention can be adopted to periodically perform time synchronization on the first network card and the second network card.
The first network card and the second network card are respectively inserted into PCIE slots of a mainboard of the network test instrument, and the network test instrument can send or receive data through the first network card and the second network card. The network test instrument comprises a first timing module and a time updating module which are driven by independent clock sources, and the first network card and the second network card comprise a second timing module which is driven by independent clock sources. The time synchronization period, the effective communication time threshold and the time synchronization window threshold are preset.
The time updating module of the network test instrument acquires the current time from the first timing module, if the current time reaches the time synchronization time corresponding to the time synchronization period, the time updating module sends a time acquisition request to the first network card and the second network card through the PCIE interface, the time for sending the time acquisition request to the first network card is acquired through the first timing module and is used as the first time corresponding to the first network card and the time for sending the time acquisition request to the second network card through the first timing module and is used as the first time corresponding to the second network card.
After receiving the time acquisition request, the first network card acquires the current time from the second timing module of the first network card as the equipment time of the first network card, and then carries the equipment time of the first network card in the time response information to send to the time updating module of the network test instrument. Similarly, the second network card carries the device time of the second network card in the time response message and sends the time response message to the time updating module of the network test instrument.
And the time updating module acquires the time for receiving the time response information returned by the first network card as second time corresponding to the first network card through the first timing module, and acquires the time for receiving the time response information returned by the second network card as second time corresponding to the second network card.
And if the time difference is smaller than the effective communication time threshold, the time updating module obtains a synchronous time difference value corresponding to the first network card according to the first time corresponding to the first network card, the second time corresponding to the first network card and the equipment time of the first network card included in the time response information returned by the first network card. Similarly, the synchronization time difference corresponding to the second network card may be obtained.
And the time updating module sends a time synchronization request to the first network card, wherein the time synchronization request comprises a synchronization time difference value corresponding to the first network card. After the first network card receives the time synchronization request, the second timing module of the first network card calibrates the time according to the synchronization time difference, and continues to time under the driving of the independent clock source after the calibration is completed.
And the time updating module sends a time synchronization request to the second network card, wherein the time synchronization request comprises a synchronization time difference value corresponding to the second network card. After the second network card receives the time synchronization request, the second timing module of the second network card calibrates the time according to the synchronization time difference, and continues to time under the driving of the independent clock source after the calibration is completed.
After the time updating module of the network test instrument is respectively synchronized with the first network card and the second network card in time, the first network card and the second network card realize time synchronization.
Further, when the time updating module of the network test instrument sends the time synchronization request to the first network card, the time for sending the time synchronization request is obtained through the first timing module and is used as third time corresponding to the first network card. And when the time updating module of the network test instrument sends a time synchronization request to the second network card, the time for sending the time synchronization request is obtained through the first timing module and is used as third time corresponding to the second network card.
And the time updating module of the network test instrument compares the first time corresponding to the first network card with the first time corresponding to the second network card, and takes the earlier time as the synchronization starting time of the current time synchronization period. And the time updating module of the network test instrument compares the third time corresponding to the first network card with the third time corresponding to the second network card, and takes the later time as the synchronization ending time of the current time synchronization period.
And if the time difference is greater than the time synchronization window threshold, the network test instrument outputs time synchronization failure prompt information if the time synchronization of the first network card and the second network card is not completed in the time synchronization window.
And if the residual time of the current time synchronization period is greater than or equal to the time synchronization window threshold, the residual time of the current time synchronization period is enough to perform time synchronization again, and the time updating module of the network test instrument can perform time synchronization on the first network card and the second network card again. If the remaining time of the current time synchronization period is less than the time synchronization window threshold, it indicates that the remaining time of the current time synchronization period is not enough to perform time synchronization again, and the time updating module of the network test instrument performs time synchronization on the first network card and the second network card in the next time synchronization period.
Fig. 5 is a schematic structural diagram of a time synchronizer of a standard peripheral expansion interface device according to a fifth embodiment of the present invention, and as shown in fig. 5, the time synchronizer of the standard peripheral expansion interface device according to the embodiment of the present invention includes a sending unit 501, a receiving unit 502, a determining unit 503, and a time synchronizing unit 504, where:
the sending unit 501 is configured to send a time obtaining request to each standard peripheral expansion interface device periodically based on a time synchronization period, and record a first time corresponding to each standard peripheral expansion interface device; the first time is the time for sending the time acquisition request to the standard peripheral expansion interface equipment; the receiving unit 502 is configured to receive time response information returned by each standard peripheral expansion interface device, and record a second time corresponding to each standard peripheral expansion interface device; the second time is the time of receiving time response information returned by the standard peripheral extension interface equipment; the time response information comprises the device time; the determining unit 503 is configured to, after it is determined that a time difference between a second time corresponding to the standard peripheral expansion interface device and a first time corresponding to the standard peripheral expansion interface device is smaller than an effective communication time threshold, obtain a synchronization time difference value corresponding to the standard peripheral expansion interface device according to the first time corresponding to the standard peripheral expansion interface device, the second time corresponding to the standard peripheral expansion interface device, and device time included in time response information returned by the standard peripheral expansion interface device; the time synchronization unit 504 is configured to send a time synchronization request to each standard peripheral expansion interface device, so that each standard peripheral expansion interface device performs time synchronization according to a synchronization time difference corresponding to the standard peripheral expansion interface device; and the time synchronization request comprises a synchronization time difference value corresponding to the standard peripheral extension interface equipment.
Specifically, the sending unit 501 sends an acquisition time request to each PCIE device periodically according to the time synchronization period, where the acquisition time request is used to acquire the time of the PCIE device. The sending unit 501 records, as a first time corresponding to each PCIE device, a time for sending the time obtaining request while sending the time obtaining request to each PCIE device. The time synchronization period is preset and is set according to actual needs, and the embodiment of the invention is not limited.
For each PCIE device, after receiving the time obtaining request, the device time is obtained, and then the device time is carried in the time response information and returned to the receiving unit 502. The receiving unit 502 receives the time response information returned by each PCIE device, and records time of receiving the time response information as second time corresponding to each standard peripheral expansion interface device while receiving the time response information returned by each PCIE device. The device time can be acquired by a timing module of the PCIE device, and the timing module of the PCIE device has an independent clock source.
For each PCIE device, the determining unit 503 calculates a time difference between a second time corresponding to the PCIE device and a first time corresponding to the PCIE device, then compares the time difference with an effective communication time threshold, and if the time difference is smaller than the effective communication time threshold, the determining unit 503 may obtain a synchronization time difference value corresponding to the PCIE device according to the first time corresponding to the PCIE device, the second time corresponding to the PCIE device, and the device time included in the time response information returned by the PCIE device. The effective communication time threshold is the maximum time of one-time data interaction between the upper computer and the PCIE device, and may be calculated according to the PCIE speed and the size of the transmission message.
For each PCIE device, after obtaining the synchronization time difference value corresponding to the PCIE device, the time synchronization unit 504 may send a time synchronization request to the PCIE device, where the time synchronization request includes the synchronization time difference value corresponding to the PCIE device. After receiving the time synchronization request, the PCIE device updates the time of the PCIE device according to the synchronization time difference, and then the PCIE device continues to time under the drive of the clock source independent of the timing module.
The time synchronizer of the standard peripheral extension interface equipment provided by the embodiment of the invention regularly sends a time acquisition request to each standard peripheral extension interface equipment based on a time synchronization period, records the first time corresponding to each standard peripheral extension interface equipment, receives the time response information returned by each standard peripheral extension interface equipment, records the second time corresponding to each standard peripheral extension interface equipment, and obtains the synchronization time difference value corresponding to the standard peripheral extension interface equipment according to the first time corresponding to the standard peripheral extension interface equipment, the second time corresponding to the standard peripheral extension interface equipment and the equipment time included in the time response information returned by the standard peripheral extension interface equipment if the time difference between the second time corresponding to the standard peripheral extension interface equipment and the first time corresponding to the standard peripheral extension interface equipment is judged and known to be less than the effective communication time threshold value, and sending a time synchronization request to each standard peripheral expansion interface device, so that each standard peripheral expansion interface device performs time synchronization according to the synchronization time difference corresponding to the standard peripheral expansion interface device, thereby realizing the time synchronization of each PCIE device and reducing the time synchronization cost among the PCIE devices.
Fig. 6 is a schematic structural diagram of a time synchronization apparatus of a standard peripheral expansion interface device according to a sixth embodiment of the present invention, and as shown in fig. 6, on the basis of the foregoing embodiments, further, the time synchronization apparatus of the standard peripheral expansion interface device according to the embodiment of the present invention further includes a recording unit 505, an obtaining unit 506, and an output unit 507, where:
the recording unit 505 is configured to record a third time corresponding to each standard peripheral expansion interface device while sending a time synchronization request to each standard peripheral expansion interface device; wherein the third time is the time for sending the synchronous time synchronization request to the standard peripheral extension interface device; the obtaining unit 506 is configured to obtain a synchronization start time according to a first time corresponding to each standard peripheral expansion interface device, and obtain a synchronization end time according to a third time corresponding to each standard peripheral expansion interface device; the output unit 507 is configured to output time synchronization failure prompt information after judging that the time difference between the synchronization end time and the synchronization start time is greater than the time synchronization window threshold.
Fig. 7 is a schematic structural diagram of a time synchronization apparatus of a standard peripheral expansion interface device according to a seventh embodiment of the present invention, and as shown in fig. 7, on the basis of the foregoing embodiments, further, the time synchronization apparatus of the standard peripheral expansion interface device according to the embodiment of the present invention further includes a re-time synchronization unit 508, where:
the time resynchronization unit 508 is configured to perform time synchronization again on each standard peripheral expansion interface device if it is determined that the remaining time of the current time synchronization period is greater than or equal to the time synchronization window threshold.
On the basis of the foregoing embodiments, further, the determining unit 503 is specifically configured to:
according to the formula Δ t = t 1 –t e + (t 2 - t 1 ) And 2, calculating to obtain a synchronous time difference value delta t corresponding to the standard peripheral extension interface equipment, wherein t 1 Representing a first time, t, corresponding to the standard peripheral expansion interface device 2 Indicating a second time, t, corresponding to the standard peripheral expansion interface device e And the equipment time included in the time response information returned by the standard peripheral extension interface equipment is represented.
The embodiment of the apparatus provided in the embodiment of the present invention may be specifically configured to execute the processing flows of the above method embodiments, and the functions of the apparatus are not described herein again, and refer to the detailed description of the above method embodiments.
Fig. 8 is a schematic physical structure diagram of an electronic device according to an eighth embodiment of the present invention, and as shown in fig. 8, the electronic device may include: a processor (processor)801, a communication Interface (Communications Interface)802, a memory (memory)803 and a communication bus 804, wherein the processor 801, the communication Interface 802 and the memory 803 complete communication with each other through the communication bus 804. The processor 801 may call logic instructions in the memory 803 to perform the following method: periodically sending a time acquisition request to each standard peripheral expansion interface device based on a time synchronization period, and recording first time corresponding to each standard peripheral expansion interface device; the first time is the time for sending the time acquisition request to the standard peripheral expansion interface equipment; receiving time response information returned by each standard peripheral expansion interface device, and recording second time corresponding to each standard peripheral expansion interface device; the second time is the time of receiving time response information returned by the standard peripheral extension interface equipment; the time response information comprises the device time; if the time difference between the second time corresponding to the standard peripheral extension interface device and the first time corresponding to the standard peripheral extension interface device is judged and obtained to be smaller than the effective communication time threshold, obtaining a synchronous time difference value corresponding to the standard peripheral extension interface device according to the first time corresponding to the standard peripheral extension interface device, the second time corresponding to the standard peripheral extension interface device and the device time included in the time response information returned by the standard peripheral extension interface device; sending a time synchronization request to each standard peripheral expansion interface device so that each standard peripheral expansion interface device performs time synchronization according to a synchronization time difference value corresponding to the standard peripheral expansion interface device; and the time synchronization request comprises a synchronization time difference value corresponding to the standard peripheral extension interface equipment.
In addition, the logic instructions in the memory 803 may be implemented in the form of software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The present embodiment discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the method provided by the above-mentioned method embodiments, for example, comprising: periodically sending a time acquisition request to each standard peripheral expansion interface device based on a time synchronization period, and recording first time corresponding to each standard peripheral expansion interface device; the first time is the time for sending the time acquisition request to the standard peripheral expansion interface equipment; receiving time response information returned by each standard peripheral expansion interface device, and recording second time corresponding to each standard peripheral expansion interface device; the second time is the time of receiving time response information returned by the standard peripheral extension interface equipment; the time response information comprises the device time; if the time difference between the second time corresponding to the standard peripheral extension interface device and the first time corresponding to the standard peripheral extension interface device is judged and obtained to be smaller than the effective communication time threshold, obtaining a synchronous time difference value corresponding to the standard peripheral extension interface device according to the first time corresponding to the standard peripheral extension interface device, the second time corresponding to the standard peripheral extension interface device and the device time included in the time response information returned by the standard peripheral extension interface device; sending a time synchronization request to each standard peripheral expansion interface device so that each standard peripheral expansion interface device performs time synchronization according to a synchronization time difference value corresponding to the standard peripheral expansion interface device; and the time synchronization request comprises a synchronization time difference value corresponding to the standard peripheral extension interface equipment.
The present embodiment provides a computer-readable storage medium, which stores a computer program, where the computer program causes the computer to execute the method provided by the above method embodiments, for example, the method includes: periodically sending a time acquisition request to each standard peripheral expansion interface device based on a time synchronization period, and recording first time corresponding to each standard peripheral expansion interface device; the first time is the time for sending the time acquisition request to the standard peripheral expansion interface equipment; receiving time response information returned by each standard peripheral expansion interface device, and recording second time corresponding to each standard peripheral expansion interface device; the second time is the time of receiving time response information returned by the standard peripheral extension interface equipment; the time response information comprises the device time; if the time difference between the second time corresponding to the standard peripheral extension interface device and the first time corresponding to the standard peripheral extension interface device is judged and obtained to be smaller than the effective communication time threshold, obtaining a synchronous time difference value corresponding to the standard peripheral extension interface device according to the first time corresponding to the standard peripheral extension interface device, the second time corresponding to the standard peripheral extension interface device and the device time included in the time response information returned by the standard peripheral extension interface device; sending a time synchronization request to each standard peripheral expansion interface device so that each standard peripheral expansion interface device performs time synchronization according to a synchronization time difference value corresponding to the standard peripheral expansion interface device; and the time synchronization request comprises a synchronization time difference value corresponding to the standard peripheral extension interface equipment.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may 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, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In the description herein, reference to the description of the terms "one embodiment," "a particular embodiment," "some embodiments," "for example," "an example," "a particular example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A time synchronization method of standard peripheral extension interface equipment is characterized by comprising the following steps:
periodically sending a time acquisition request to each standard peripheral expansion interface device based on a time synchronization period, and recording first time corresponding to each standard peripheral expansion interface device; the first time is the time for sending the time acquisition request to the standard peripheral expansion interface equipment;
receiving time response information returned by each standard peripheral expansion interface device, and recording second time corresponding to each standard peripheral expansion interface device; the second time is the time of receiving time response information returned by the standard peripheral extension interface equipment; the time response information comprises the device time;
if the time difference between the second time corresponding to the standard peripheral extension interface device and the first time corresponding to the standard peripheral extension interface device is judged and obtained to be smaller than the effective communication time threshold, obtaining a synchronous time difference value corresponding to the standard peripheral extension interface device according to the first time corresponding to the standard peripheral extension interface device, the second time corresponding to the standard peripheral extension interface device and the device time included in the time response information returned by the standard peripheral extension interface device;
sending a time synchronization request to each standard peripheral expansion interface device so that each standard peripheral expansion interface device performs time synchronization according to a synchronization time difference value corresponding to the standard peripheral expansion interface device; and the time synchronization request comprises a synchronization time difference value corresponding to the standard peripheral extension interface equipment.
2. The method of claim 1, further comprising:
recording third time corresponding to each standard peripheral expansion interface device while sending a time synchronization request to each standard peripheral expansion interface device; wherein the third time is the time for sending the synchronous time synchronization request to the standard peripheral extension interface device;
obtaining a synchronization starting time according to a first time corresponding to each standard peripheral expansion interface device, and obtaining a synchronization ending time according to a third time corresponding to each standard peripheral expansion interface device;
and if the time difference between the synchronization ending time and the synchronization starting time is judged and obtained to be larger than the time synchronization window threshold, outputting time synchronization failure prompt information.
3. The method of claim 2, further comprising:
and if the residual time of the current time synchronization period is judged and obtained to be larger than or equal to the time synchronization window threshold, time synchronization is carried out on each standard peripheral expansion interface device again.
4. The method according to any one of claims 1 to 3, wherein the obtaining, according to the first time corresponding to the standard peripheral extension interface device, the second time corresponding to the standard peripheral extension interface device, and the device time included in the time response information returned by the standard peripheral extension interface device, the synchronization time difference value corresponding to the standard peripheral extension interface device includes:
according to the formula Δ t = t 1 –t e + (t 2 - t 1 ) And 2, calculating to obtain a synchronous time difference value delta t corresponding to the standard peripheral extension interface equipment, wherein t 1 Representing a first time, t, corresponding to the standard peripheral expansion interface device 2 Indicating the corresponding second of the standard peripheral extension interface deviceTwo times, t e And the time response information returned by the standard peripheral extension interface equipment comprises the equipment time.
5. A time synchronization system of a standard peripheral extension interface device using the time synchronization method of a standard peripheral extension interface device according to any one of claims 1 to 4, comprising an upper computer and a plurality of standard peripheral extension interface devices, wherein:
the upper computer is connected with each standard peripheral expansion interface device through a standard peripheral expansion interface;
the upper computer comprises a time updating module and a first timing module, and the time updating module is connected with the first timing module; each standard peripheral extension interface device comprises a second timing module;
the time updating module is used for synchronizing the time of the first timing module to the second timing module of each standard peripheral extension interface device.
6. A time synchronization system of a standard peripheral extension interface device using the time synchronization method of a standard peripheral extension interface device according to any one of claims 1 to 4, comprising a time synchronization device and a plurality of upper computers, each upper computer corresponding to a plurality of standard peripheral extension interface devices, wherein:
the time synchronization equipment is respectively in communication connection with each upper computer; each upper computer comprises a time updating module and a first timing module, and the time updating module is connected with the first timing module; each standard peripheral extension interface device comprises a second timing module;
the time synchronization equipment is used for carrying out time calibration on the first timing module of each upper computer;
and the time updating module of the upper computer is used for synchronizing the time of the first timing module of the upper computer to the second timing module of each corresponding standard peripheral expansion interface device.
7. A time synchronizer for a standard peripheral expansion interface device, comprising:
the sending unit is used for regularly sending a time acquisition request to each standard peripheral expansion interface device based on a time synchronization period and recording first time corresponding to each standard peripheral expansion interface device; the first time is the time for sending the time acquisition request to the standard peripheral equipment expansion interface equipment;
the receiving unit is used for receiving the time response information returned by each standard peripheral expansion interface device and recording the second time corresponding to each standard peripheral expansion interface device; the second time is the time of receiving time response information returned by the standard peripheral extension interface equipment; the time response information comprises the device time;
the judging unit is used for obtaining a synchronous time difference value corresponding to the standard peripheral extension interface device according to the first time corresponding to the standard peripheral extension interface device, the second time corresponding to the standard peripheral extension interface device and the device time included in the time response information returned by the standard peripheral extension interface device after judging that the time difference between the second time corresponding to the standard peripheral extension interface device and the first time corresponding to the standard peripheral extension interface device is smaller than an effective communication time threshold;
the time synchronization unit is used for sending a time synchronization request to each standard peripheral expansion interface device so that each standard peripheral expansion interface device carries out time synchronization according to a synchronization time difference value corresponding to the standard peripheral expansion interface device; and the time synchronization request comprises a synchronization time difference value corresponding to the standard peripheral extension interface equipment.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 1 to 4 when executing the computer program.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 1 to 4.
10. A computer program product, characterized in that the computer program product comprises a computer program which, when being executed by a processor, carries out the method of any one of claims 1 to 4.
CN202211003568.XA 2022-08-22 2022-08-22 Time synchronization method and system for standard peripheral extension interface equipment Active CN115080495B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211003568.XA CN115080495B (en) 2022-08-22 2022-08-22 Time synchronization method and system for standard peripheral extension interface equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211003568.XA CN115080495B (en) 2022-08-22 2022-08-22 Time synchronization method and system for standard peripheral extension interface equipment

Publications (2)

Publication Number Publication Date
CN115080495A true CN115080495A (en) 2022-09-20
CN115080495B CN115080495B (en) 2022-11-15

Family

ID=83245287

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211003568.XA Active CN115080495B (en) 2022-08-22 2022-08-22 Time synchronization method and system for standard peripheral extension interface equipment

Country Status (1)

Country Link
CN (1) CN115080495B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116131988A (en) * 2023-04-14 2023-05-16 深圳酷源数联科技有限公司 Standard time generation device, method, device, readable storage medium and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103210689A (en) * 2011-08-11 2013-07-17 华为技术有限公司 Method, device and system for performing time synchronization on PCIE device
CN109217939A (en) * 2018-06-20 2019-01-15 浙江大学 Expansible, low latency feedback regulation equipment for quantum bit
CN113917395A (en) * 2021-09-30 2022-01-11 清华大学 Sound source positioning method and device based on reflector extension and electronic equipment
WO2022168475A1 (en) * 2021-02-04 2022-08-11 オムロン株式会社 Control device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103210689A (en) * 2011-08-11 2013-07-17 华为技术有限公司 Method, device and system for performing time synchronization on PCIE device
CN109217939A (en) * 2018-06-20 2019-01-15 浙江大学 Expansible, low latency feedback regulation equipment for quantum bit
WO2022168475A1 (en) * 2021-02-04 2022-08-11 オムロン株式会社 Control device
CN113917395A (en) * 2021-09-30 2022-01-11 清华大学 Sound source positioning method and device based on reflector extension and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116131988A (en) * 2023-04-14 2023-05-16 深圳酷源数联科技有限公司 Standard time generation device, method, device, readable storage medium and system

Also Published As

Publication number Publication date
CN115080495B (en) 2022-11-15

Similar Documents

Publication Publication Date Title
EP1427121A1 (en) Radio access network, radio communication method, synchronous server and node
JP6192995B2 (en) COMMUNICATION DEVICE, COMMUNICATION SYSTEM, COMMUNICATION METHOD, AND COMPUTER PROGRAM
CN108023723B (en) Method for frequency synchronization and slave clock
CN115080495B (en) Time synchronization method and system for standard peripheral extension interface equipment
US20220248353A1 (en) Synchronization method and device
JP2011193457A (en) System and method for performing time synchronization
US20160065358A1 (en) Synchronization method, intermediate node, and slave node of communication network system
CN112838904B (en) TSN network delay jitter measuring device and method
CN107800529B (en) Clock frequency synchronization method of network node
US11689347B2 (en) Communication apparatus, communication system, communication method, and computer readable medium
CN112395231A (en) Method and device for calculating data delay time among multiple processors
Akpinar et al. Improved clock synchronization algorithms for the controller area network (CAN)
JP2014165582A (en) Time synchronization system, time synchronization method, slave node and computer program
US20170117980A1 (en) Time synchronization for network device
JP2015004649A (en) Slave device, master/slave system and time synchronization method
CN115694704A (en) Time synchronization method, device, equipment and storage medium
WO2022227318A1 (en) Time synchronization method and apparatus, and computer device and storage medium
JP6310758B2 (en) Time synchronization apparatus and method
CN112019288B (en) Time synchronization method, service single board and network equipment
CN111638749A (en) Simulation system synchronization method, simulation device and system
CN110687829A (en) Method, system, medium, and apparatus for implementing a simulation clock with a precision greater than a set threshold
CN115085851B (en) Vehicle-mounted ECU time synchronization method and device, vehicle-mounted ECU and storage medium
CN112311521B (en) Equipment group audio synchronization method and device, electronic equipment and storage medium
EP4047843A1 (en) Synchronization of clock domains on a data network
CN116455499A (en) Automatic driving domain control time synchronization method, system, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant