A method, system and electronic device for realizing multi-clock synchronization

By configuring independent RTC modules and FPGA units in the server system, the clock information of each functional module is obtained and synchronized, the problem of inconvenient clock management before the host system is started is solved, and the clock uniformity and continuous timing functions of the functional module are realized.

CN114489236BActive Publication Date: 2024-11-26LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111563007.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-20
Publication Date
2024-11-26
Estimated Expiration
2041-12-20

Smart Images

  • Figure CN114489236B_ABST
    Figure CN114489236B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, system and electronic device for realizing multi-clock synchronization. Any functional module among multiple functional modules that need to run based on timestamp in the electronic device can obtain reference clock information from the first unit of the electronic device, and send module clock setting information to the first unit, so that the first unit configures the clock offset information of the functional module according to the module clock setting information. When the functional module obtains the reference clock information from the first unit of the electronic device next time, it can receive the module clock information for the functional module determined by the first unit based on the clock offset information. Among them, the first unit is configured with an independent RTC module and the first unit can be started before the host system of the electronic device is started. As a result, multiple functional modules can continue to perform timing functions under conditions such as powering on, powering off, starting up and shutting down the electronic device. In addition, the clock information of multiple functional modules can be uniformly managed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, system and electronic equipment for realizing multi-clock synchronization. Background Art

[0002] The current server system does not implement the RTC (Real-Time Clock) function from an overall and global perspective. Server systems are becoming more and more intelligent and complex, but the RTC design still continues the old way, supported and implemented by the host system. The management system and other functional module systems rely on the host system or maintain an RTC function themselves. When the AC (Alternating Current) is powered on but the host system has not yet started, although the RTC is working, the host system itself does not need the RTC function at this time, and the management module and other functional module systems that require the RTC function cannot obtain time information from the host system. As a result, the management module and other functional modules will use independent RTCs to implement the clock function, which requires providing RTC chips separately and configuring independent power supplies for the RTC. At the same time, the overall time of the server system is not unified, which will cause some problems for the operation of the system. Summary of the invention

[0003] The embodiments of the present invention provide a method, a system and an electronic device for implementing multi-clock synchronization.

[0004] According to a first aspect of the present invention, a method for realizing multi-clock synchronization is provided, which is applied to any functional module among a plurality of functional modules in an electronic device that need to run based on a timestamp, and the method comprises: obtaining reference clock information from a first unit of the electronic device, wherein an independent RTC module is configured in the first unit, and the first unit can be started before a host system of the electronic device is started; sending module clock setting information to the first unit so that the first unit configures the clock offset information of the functional module according to the module clock setting information; and receiving the module clock information for the functional module determined by the first unit based on the clock offset information when the reference clock information is obtained from the first unit of the electronic device next time.

[0005] According to an embodiment of the present invention, the first unit is an FPGA unit configured on a mainboard of the electronic device.

[0006] According to an embodiment of the present invention, the first unit is an FPGA unit configured on a whole-machine management module of the electronic device.

[0007] According to one embodiment of the present invention, module clock setting information is sent to the first unit so that the first unit configures the clock offset information of the functional module according to the module clock setting information, including: sending the module clock setting information to the first unit through an out-of-band interface; so that the RTC module of the first unit configures the clock offset information of the functional module according to the module clock setting information.

[0008] According to the second aspect of the present invention, a method for realizing multi-clock synchronization is also provided, which is applied to a first unit of an electronic device, an independent RTC module is configured in the first unit, and the first unit can be started before the host system of the electronic device is started, the method comprising: receiving a clock request sent by any functional module of a plurality of functional modules in the electronic device that require real-time clock information; sending reference clock information to the functional module; detecting module clock setting information sent by the module; configuring clock offset information of the functional module according to the module clock setting information; when the functional module obtains the reference clock information from the first unit of the electronic device next time, based on the clock offset information, determining the module clock information for the functional module, and sending the module clock information to the functional module.

[0009] According to an embodiment of the present invention, the first unit is an FPGA module configured on the main board of the electronic device.

[0010] According to an embodiment of the present invention, the first unit is an FPGA configured on a whole-machine management module of the electronic device.

[0011] According to an embodiment of the present invention, detecting the module clock setting information sent by the functional module includes: detecting the module clock setting information sent by the functional module through an out-of-band interface.

[0012] According to a third aspect of an embodiment of the present invention, a system for implementing multi-clock synchronization is also provided, the system comprising: a plurality of functional modules in an electronic device that need to run based on a timestamp, the functional modules being able to obtain reference clock information from a first unit of the electronic device, and sending module clock setting information to the first unit, so that the first unit configures the clock offset information of the functional module according to the module clock setting information, and receives the module clock information for the functional module determined by the first unit based on the clock offset information when the reference clock information is obtained from the first unit next time; a first unit of the electronic device, wherein an independent RTC module is configured in the first unit, and the first unit can be started before the host system of the electronic device is started, the first unit being used to receive a clock request sent by any functional module of the plurality of functional modules that need real-time clock information in the electronic device, and send the reference clock information to the functional module, and detect the module clock setting information sent by the functional module, configure the clock offset information of the functional module according to the module clock setting information, and determine the module clock information for the functional module based on the clock offset information when the functional module obtains the reference clock information from the first unit of the electronic device next time, and send the module clock information to the functional module.

[0013] According to a fourth aspect of an embodiment of the present invention, an electronic device is further provided, wherein the electronic device includes the above-mentioned system for implementing multi-clock synchronization.

[0014] According to the method, system and electronic device for realizing multi-clock synchronization provided by the embodiment of the present invention, any of the multiple functional modules in the electronic device that need to run based on the timestamp can obtain the reference clock information from the first unit of the electronic device, and send the module clock setting information to the first unit, so that the first unit configures the clock offset information of the functional module according to the module clock setting information. The functional module can receive the module clock information for the functional module determined by the first unit based on the clock offset information when the reference clock information is obtained from the first unit of the electronic device next time. Among them, the first unit is configured with an independent RTC module and the first unit can be started before the host system of the electronic device is started. As a result, the multiple functional modules in the electronic device that need to run based on the timestamp can continue to perform the timing function under the conditions of powering on, powering off, starting up and shutting down the electronic device. In addition, the clock information of multiple functional modules of the electronic device can be uniformly managed.

[0015] It should be understood that the teachings of the present invention are not required to achieve all of the beneficial effects described above, but specific technical solutions can achieve specific technical effects, and other embodiments of the present invention can also achieve beneficial effects not mentioned above. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, in which:

[0017] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.

[0018] Figure 1 A schematic diagram of an implementation flow of a method for implementing multi-clock synchronization provided by an embodiment of the present invention is shown;

[0019] Figure 2 A schematic diagram of the mainboard architecture of a rack server according to an embodiment of the present invention is shown;

[0020] Figure 3 A schematic diagram of the system architecture of a blade server according to an embodiment of the present invention is shown;

[0021] Figure 4 A schematic diagram of an implementation flow of a method for implementing multi-clock synchronization provided by another embodiment of the present invention is shown;

[0022] Figure 5 A schematic diagram of the structure of a system for implementing multi-clock synchronization provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0023] The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way. On the contrary, these embodiments are provided to make the present invention more thorough and complete, and to fully convey the scope of the present invention to those skilled in the art.

[0024] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0025] Figure 1 A schematic diagram of the implementation flow of a method for implementing multi-clock synchronization provided by an embodiment of the present invention is shown.

[0026] refer to Figure 1The method for implementing multi-clock synchronization in an embodiment of the present invention is applied to any functional module of multiple functional modules that need to run based on timestamps in an electronic device, and at least includes the following operation process: operation 101, obtaining reference clock information from a first unit of the electronic device, an independent RTC module is configured in the first unit, and the first unit can be started before the host system of the electronic device is started; operation 102, sending module clock setting information to the first unit, so that the first unit configures the clock offset information of the functional module according to the module clock setting information; operation 103, when the reference clock information is obtained from the first unit of the electronic device next time, receiving the module clock information for the functional module determined by the first unit based on the clock offset information.

[0027] In this embodiment of the present invention, multiple functional modules in the electronic device that need to run based on timestamps may include: computing modules such as CPU (Central Processing Unit) and GPU (Graphics Processing Unit); BMC (management module); smart network card communication module with BIOS (Basic Input Output System) or OS (Operating System); and intelligent modules such as FPGA (Field Programmable Gate Array) and proprietary AI (Artificial Intelligence) chips.

[0028] It should be noted that this is only an example of multiple functional modules that need to be run based on timestamps, and does not constitute a limitation on the technical solution of the present invention. In actual application, it can also be applied to other functional modules of electronic devices that need to be run based on timestamps.

[0029] In operation 101, reference clock information is acquired from a first unit of an electronic device, wherein an independent RTC module is configured in the first unit and the first unit can be started before a host system of the electronic device is started.

[0030] In this embodiment of the present invention, the first unit may be an FPGA unit configured on a mainboard of the electronic device.

[0031] In this embodiment of the present invention, the electronic device may be a rack server. Figure 2The mainboard architecture diagram of the rack server shown in the figure has an FPGA unit configured on the mainboard, and the FPGA unit includes an FPGA chip and an RTC chip. The FPGA chip can be started before the host system is started. The electronic equipment management module BMC configured can communicate with the FPGA chip and obtain the reference clock information from the RTC connected to the FPGA chip. CPU0 and CPU1 can communicate with the FPGA chip through the BMC and obtain the reference clock information from the RTC connected to the FPGA chip. CPU0 and CPU1 can also communicate directly with the FPGA chip and obtain the reference clock information from the RTC connected to the FPGA chip. Similarly, other functional modules in the electronic device that need to run based on timestamps can also communicate with the FPGA chip through the BMC and obtain the reference clock information from the RTC connected to the FPGA chip, or directly communicate with the FPGA chip and obtain the reference clock information from the RTC connected to the FPGA chip.

[0032] In this way, multiple functional modules in the electronic device that need to run based on timestamps no longer rely on PCH to obtain clock information. This effectively avoids the situation where time information cannot be obtained through PCH during the period when the electronic device has been powered on but the system has not been started, thereby effectively avoiding the situation where the functional module during this period needs to record logs based on timestamps.

[0033] In this embodiment of the present invention, the first unit is an FPGA unit configured on a whole-machine management module of the electronic device.

[0034] In this embodiment of the present invention, the electronic device may be a blade server. Figure 3 The schematic diagram of the device architecture of the blade server shown in FIG. The blade server includes a master whole machine management module, a slave whole machine management module and n motherboards.

[0035] For blade servers, you can use Figure 2 In the method shown, an FPGA unit is added to each mainboard, and an independent RTC chip is configured in the FPGA unit. However, this will increase the equipment cost to a certain extent.

[0036] In this regard, in this embodiment of the present invention, FPGA units are added to the master machine management module and the slave machine management module respectively, and each mainboard can communicate with the FPGA unit in the machine management module to obtain reference clock information.

[0037] In operation 102, module clock setting information is sent to the first unit, so that the first unit configures clock offset information of the functional module according to the module clock setting information.

[0038] In this embodiment of the present invention, the module clock setting information is sent to the first unit so that the first unit configures the clock offset information of the functional module according to the module clock setting information. This can be achieved by the following operations: the module clock setting information is sent to the first unit through the out-of-band interface so that the RTC module of the first unit configures the clock offset information of the functional module according to the module clock setting information.

[0039] For example, each functional module can obtain and set clock information through the out-of-band commands provided by the management module BMC. Out-of-band network management can manage the network through a dedicated network management channel, separate network management data from business data, and establish an independent channel for network management data. In this channel, only management data, statistical information, billing information, etc. are transmitted. The separation of network management data and business data can improve the efficiency and reliability of network management, and is also conducive to improving the security of network management data.

[0040] When the host of the electronic device receives the clock setting information sent by each functional module, it can set the clock setting information to the host RTC. And the host sends the clock setting information to the management module through the in-band interface, and the management module forwards it to the FPGA unit, or directly sends it to the FPGA. For blade servers, the host can directly send the clock setting information to the management module through the in-band interface.

[0041] In this embodiment of the present invention, the first unit configures the clock offset information of the functional module according to the module clock setting information.

[0042] For example, the timing time of the RTC in the FPGA unit is used as the reference time information for the operation of the electronic device. When the clock setting information sent by the functional module is received, the offset value of the timing time of the functional module relative to the RTC in the FPGA unit is calculated only according to the clock setting information of the user for a certain functional module. Therefore, the timing time of the RTC in the FPGA unit will not change with the clock setting information of the user for a certain functional module.

[0043] The free space in the RTC in the FPGA unit is configured to store the offset information of each functional module relative to the RTC timing time in the FPGA unit. Therefore, the RTC in the FPGA unit can support the use of independent clock information for multiple functional modules, and the clock information of each functional module can be managed in a unified manner.

[0044] In summary, this embodiment of the present invention can configure corresponding clock offset information for each functional module and keep the reference clock information of the RTC of the first unit unchanged. While avoiding the use of a single time source by multiple modules of the server and effectively ensuring that each functional module can set the clock information according to the actual situation, the server system can uniformly manage the time of multiple functional modules, and can quickly and accurately process the time information in scenarios involving multiple module interactions and collaborative processing.

[0045] In operation 103, when the reference clock information is acquired from the first unit of the electronic device next time, the module clock information for the functional module determined by the first unit based on the clock offset information is received.

[0046] In this embodiment of the present invention, after the electronic device is powered off, the first unit RTC module continues to be powered on and continues to operate. When the electronic device is powered on next time, each functional module can obtain the reference clock information from the first unit, and at this time, a module clock information for the functional module can be determined based on the clock offset information determined in operation 102. And the module clock information is sent to the functional module.

[0047] Figure 4 A schematic diagram of an implementation flow of a method for implementing multi-clock synchronization provided by another embodiment of the present invention is shown.

[0048] refer to Figure 4 The method for implementing multi-clock synchronization in an embodiment of the present invention is applied to a first unit of an electronic device, wherein an independent RTC module is configured in the first unit, and the first unit can be started before the host system of the electronic device is started. The method for implementing multi-clock synchronization includes at least the following operation flow:

[0049] Operation 401: receiving a clock request sent by any functional module among a plurality of functional modules requiring real-time clock information in an electronic device.

[0050] Operation 402: sending reference clock information to a functional module.

[0051] Operation 403: Detect module clock setting information sent by the module.

[0052] Operation 404 : configuring clock offset information of the functional module according to the module clock setting information.

[0053] Operation 405 : when the functional module obtains reference clock information from the first unit of the electronic device next time, module clock information for the functional module is determined based on the clock offset information, and the module clock information is sent to the functional module.

[0054] The specific implementation process of operations 401 to 405 is as follows: Figure 1 The specific implementation process of operations 101 to 103 in the illustrated embodiment is similar and will not be described again here.

[0055] In this embodiment of the present invention, the module clock setting information sent by the detection function module includes: the module clock setting information sent by the detection function module through the out-of-band interface.

[0056] The method, system and electronic device for realizing multi-clock synchronization provided by the embodiment of the present invention, any functional module of the multiple functional modules that need to run based on the timestamp in the electronic device can obtain the reference clock information from the first unit of the electronic device, and send the module clock setting information to the first unit, so that the first unit configures the clock offset information of the functional module according to the module clock setting information. The functional module can receive the module clock information for the functional module determined by the first unit based on the clock offset information when the reference clock information is obtained from the first unit of the electronic device next time. Among them, the first unit is configured with an independent RTC module and the first unit can be started before the host system of the electronic device is started. As a result, the multiple functional modules that need to run based on the timestamp in the electronic device can continue to perform the timing function under the conditions of powering on, powering off, starting and shutting down the electronic device. In addition, the clock information of multiple functional modules of the electronic device can be uniformly managed.

[0057] Similarly, based on the above method for implementing multi-clock synchronization, an embodiment of the present invention also provides a computer-readable storage medium, which stores a program. When the program is executed by a processor, the processor performs at least the following operation steps: operation 101, obtaining reference clock information from a first unit of an electronic device, an independent RTC module is configured in the first unit, and the first unit can be started before the host system of the electronic device is started; operation 102, sending module clock setting information to the first unit, so that the first unit configures the clock offset information of the functional module according to the module clock setting information; operation 103, when the reference clock information is obtained from the first unit of the electronic device next time, receiving the module clock information for the functional module determined by the first unit based on the clock offset information.

[0058] Further, based on the above method for implementing multi-clock synchronization, an embodiment of the present invention also provides a device for implementing multi-clock synchronization, which is applied to any functional module of multiple functional modules in an electronic device that need to run based on timestamps, and the device includes: an acquisition module, used to acquire reference clock information from a first unit of the electronic device, an independent RTC module is configured in the first unit, and the first unit can be started before the host system of the electronic device is started; a sending module, used to send module clock setting information to the first unit, so that the first unit configures the clock offset information of the functional module according to the module clock setting information; a receiving module, used to receive the module clock information for the functional module determined by the first unit based on the clock offset information when the reference clock information is acquired from the first unit of the electronic device next time.

[0059] In one embodiment of the present invention, the first unit is an FPGA unit configured on a mainboard of the electronic device.

[0060] In one embodiment of the present invention, the first unit is an FPGA unit configured on a whole-machine management module of the electronic device.

[0061] In one embodiment of the present invention, the sending module includes: an out-of-band sending submodule, used to send module clock setting information to the first unit through an out-of-band interface; so that the RTC module of the first unit configures the clock offset information of the functional module according to the module clock setting information.

[0062] Further, based on the above method for implementing multi-clock synchronization, an embodiment of the present invention also provides a device for implementing multi-clock synchronization, which is applied to a first unit of an electronic device, an independent RTC module is configured in the first unit, and the first unit can be started before the host system of the electronic device is started, and the device includes: a request receiving module, used to receive a clock request sent by any functional module of multiple functional modules in the electronic device that require real-time clock information; a reference clock sending module, used to send reference clock information to the functional module; a setting detection module, used to detect the module clock setting information sent by the module; an offset configuration module, used to configure the clock offset information of the functional module according to the module clock setting information; a clock information sending module, used to determine the module clock information for the functional module based on the clock offset information when the functional module obtains the reference clock information from the first unit of the electronic device next time, and send the module clock information to the functional module.

[0063] In one embodiment of the present invention, the setting detection module includes: a detection submodule, which is used to detect the module clock setting information sent by the functional module through the out-of-band interface.

[0064] Further, based on the method for implementing multi-clock synchronization as described above, an embodiment of the present invention also provides a system for implementing multi-clock synchronization, such as Figure 5 As shown, the system 50 includes: multiple functional modules 501 in the electronic device that need to run based on the timestamp, the functional module can obtain the reference clock information from the first unit of the electronic device, and send the module clock setting information to the first unit, so that the first unit configures the clock offset information of the functional module according to the module clock setting information, and receives the module clock information for the functional module determined by the first unit based on the clock offset information when the reference clock information is obtained from the first unit next time. The first unit 502 of the electronic device, an independent RTC module is configured in the first unit, and the first unit can be started before the host system of the electronic device is started, the first unit is used to receive a clock request sent by any functional module of the multiple functional modules that need real-time clock information in the electronic device, and send the reference clock information to the functional module, and detect the module clock setting information sent by the functional module, configure the clock offset information of the functional module according to the module clock setting information, and determine the module clock information for the functional module based on the clock offset information when the functional module obtains the reference clock information from the first unit of the electronic device next time, and send the module clock information to the functional module.

[0065] Furthermore, based on the method for implementing multi-clock synchronization as described above, an embodiment of the present invention further provides an electronic device, and the electronic device includes the system for implementing multi-clock synchronization as described above.

[0066] It should be noted that the above description of the system and electronic device embodiments for implementing multi-clock synchronization is consistent with the above Figures 1 to 4 The description of the method embodiment shown is similar, with the same Figures 1 to 4 For technical details not disclosed in the embodiments of the system and electronic device for realizing multi-clock synchronization of the present invention, please refer to the aforementioned embodiments of the present invention. Figures 1 to 4 The description of the method embodiment shown in the figure can be understood, and in order to save space, it will not be repeated.

[0067] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0068] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0069] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0070] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0071] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.

[0072] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods of each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0073] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A method for realizing multi-clock synchronization, applied to any functional module among multiple functional modules that need to be operated based on timestamps in an electronic device, the method comprising: Acquire reference clock information from a first unit of the electronic device, wherein an independent RTC module is configured in the first unit, and the first unit can be started before the host system of the electronic device is started; wherein the first unit is an FPGA unit configured on a mainboard or a whole machine management module of the electronic device; Sending module clock setting information to the first unit, so that the first unit configures the clock offset information of the functional module according to the module clock setting information; When the reference clock information is acquired from the first unit of the electronic device next time, the module clock information for the functional module determined by the first unit based on the clock offset information is received.

2. The method according to claim 1, sending module clock setting information to the first unit so that the first unit configures the clock offset information of the functional module according to the module clock setting information, comprising: sending the module clock setting information to the first unit via an out-of-band interface; So that the RTC module of the first unit configures the clock offset information of the functional module according to the module clock setting information.

3. A method for implementing multi-clock synchronization, applied to a first unit of an electronic device, wherein an independent RTC module is configured in the first unit, and the first unit can be started before a host system of the electronic device is started, the method comprising: Receiving a clock request sent by any functional module among a plurality of functional modules in the electronic device that require real-time clock information; Sending reference clock information to the functional module; Detecting module clock setting information sent by the functional module; According to the module clock setting information, configure the clock offset information of the functional module; When the functional module obtains the reference clock information from the first unit of the electronic device next time, the module clock information for the functional module is determined based on the clock offset information, and the module clock information is sent to the functional module; wherein the first unit is an FPGA unit configured on the mainboard or the whole machine management module of the electronic device.

4. The method according to claim 3, detecting the module clock setting information sent by the functional module, comprises: Detect module clock setting information sent by the functional module through the out-of-band interface.

5. A system for implementing multi-clock synchronization, the system comprising: A plurality of functional modules in an electronic device that need to run based on a timestamp, the functional modules can obtain reference clock information from a first unit of the electronic device, and send module clock setting information to the first unit, so that the first unit configures the clock offset information of the functional module according to the module clock setting information, and receives the module clock information for the functional module determined by the first unit based on the clock offset information when the reference clock information is obtained from the first unit next time; A first unit of an electronic device, wherein an independent RTC module is configured in the first unit, and the first unit can be started before the host system of the electronic device is started, the first unit is used to receive a clock request sent by any functional module of multiple functional modules in the electronic device that require real-time clock information, and send reference clock information to the functional module, and detect the module clock setting information sent by the functional module, configure the clock offset information of the functional module according to the module clock setting information, and when the functional module obtains the reference clock information from the first unit of the electronic device next time, determine the module clock information for the functional module based on the clock offset information, and send the module clock information to the functional module; wherein the first unit is an FPGA unit configured on the mainboard or the whole machine management module of the electronic device.

6. An electronic device, comprising the system for realizing multi-clock synchronization according to claim 5.