Chip, chip system, and timestamp synchronization method
By introducing a timestamp synchronization scheme into a multi-chip system and using signal generation, response and delay modules to synchronize the timestamps of two chips, the problem of timestamp data differences is solved and efficient timestamp synchronization is achieved.
Patent Information
- Application Number
- PCT/CN2024/086607
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-12
- Filing Date
- 2024-04-08
- Publication Date
- 2024-10-17
AI Technical Summary
In a multi-chip interconnection system, since the timestamp counter enable time of each chip is not synchronized and the input clock source is not from the same source, timestamp data differences occur and affect the time delay measurement accuracy.
By introducing a timestamp synchronization scheme between chips, the signal generation module is used to generate a synchronization request signal, and delay processing is performed between the signal response module and the delay module to ensure that the time when the two chips capture the synchronization request signal is close to the same, thereby synchronizing the timestamps .
It achieves simple logic, stable function, and efficient cross-chip timestamp synchronization, reduces the transmission delay calculation of handshake signals, and improves the accuracy and efficiency of timestamp synchronization.
Smart Images

Figure CN2024086607_17102024_PF_FP_ABST
Abstract
Description
Chip, chip system and timestamp synchronization method
[0001] This application claims priority to Chinese patent application No. 202310389475.3 filed on April 12, 2023, the entire text of which is incorporated by reference as a part of this application. Technical Field
[0002] Embodiments of the present disclosure relate to a chip, a chip system, and a timestamp synchronization method. Background Art
[0003] Electronic devices need to use timestamp data to represent time. Timestamp data can help system users perceive and measure time delays. In a multi-chip interconnected chip system, in order to improve the measurement accuracy of time delay, it is necessary to ensure that each chip maintains the same timestamp data. Each chip in the system has its own independent timestamp counter. Since the enable time of the timestamp counters on each chip is not synchronized during system initialization and / or the input clock sources of each chip may not be the same, this may cause differences in the timestamp data between each chip during system operation, affecting the accuracy of the system user's calculation of time delay. Therefore, a timestamp synchronization solution can be introduced in the multi-chip interconnected system to solve the problem of timestamp data differences between chips.
[0004] Summary of the Invention
[0005] At least one embodiment of the present disclosure provides a chip (a first chip), wherein the chip is configured to be communicatively connected with another chip (a second chip), and the chip includes: a signal generating module, a first signal response module, and a first delay module, wherein the signal generating module is configured to generate a synchronization request signal and send the synchronization request signal to the first signal response module and the other chip, so that the second signal response module of the other chip records the second timestamp of the other chip in response to receiving the synchronization request signal; the first delay module is configured to delay the synchronization request signal transmitted from the signal generating module to the first signal response module to obtain a delayed synchronization request signal; the first signal response module is configured to record the first timestamp of the chip in response to receiving the delayed synchronization request signal, and the first timestamp and the second timestamp are used to perform timestamp synchronization operation.
[0006] At least one embodiment of the present disclosure provides a chip (a second chip), wherein the chip is configured to be communicatively connected with another chip (a first chip), and the chip includes: a second signal response module and a second synchronization control module, wherein the second signal response module is configured to record a second timestamp of the chip in response to receiving a synchronization request signal from the other chip, and send the synchronization request signal to the second synchronization control module; the second synchronization control module is configured to obtain the second timestamp from the second signal response module in response to receiving the synchronization request signal, and obtain a first timestamp from the other chip, and perform a timestamp synchronization operation based on the first timestamp and the second timestamp; wherein the first timestamp is the timestamp of the other chip recorded by the first signal response module of the other chip in response to the delayed synchronization request signal.
[0007] At least one embodiment of the present disclosure provides a chip system, comprising: a first chip and a second chip, the first chip comprising a signal generation module, a first signal response module and a first delay module, the second chip being configured to be communicatively connected to the first chip, and comprising a second signal response module and a second synchronization control module; wherein the signal generation module is configured to generate a synchronization request signal and send the synchronization request signal to the first signal response module and the second chip; the first delay module is configured to delay the synchronization request signal transmitted from the signal generation module to the first signal response module to obtain a delayed synchronization request signal; the first signal response module is configured to record a first timestamp of the first chip in response to receiving the delayed synchronization request signal; and the second signal response module is configured to record a second timestamp of the second chip in response to receiving the synchronization request signal from the first chip, and send the synchronization request signal to the second synchronization control module; the second synchronization control module is configured to obtain the second timestamp from the second signal response module and the first timestamp from the first chip in response to receiving the synchronization request signal, and perform a timestamp synchronization operation based on the first timestamp and the second timestamp.
[0008] At least one embodiment of the present disclosure provides a timestamp synchronization method for a first chip, wherein the first chip is configured to be communicatively connected with a second chip, the method comprising: generating a synchronization request signal; sending the synchronization request signal to the second chip so that the second chip records a second timestamp of the second chip in response to the synchronization request signal; delaying the synchronization request signal to obtain a delayed synchronization request signal; and recording a first timestamp of the first chip in response to the delayed synchronization request signal, wherein the first timestamp and the second timestamp are used to perform a timestamp synchronization operation.
[0009] At least one embodiment of the present disclosure provides a timestamp synchronization method for a second chip, wherein the second chip is configured to be communicatively connected with a first chip, the method comprising: recording a second timestamp of the second chip in response to receiving a synchronization request signal from the first chip; obtaining a first timestamp from the first chip, wherein the first timestamp is a timestamp of the first chip recorded by the first chip in response to a delayed synchronization request signal; and performing a timestamp synchronization operation based on the first timestamp and the second timestamp. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings of the embodiments will be briefly introduced below. Obviously, the drawings in the following description only relate to some embodiments of the present disclosure, rather than limiting the present disclosure.
[0011] FIG1 shows a schematic diagram of a first chip provided by at least one embodiment of the present disclosure;
[0012] FIG2 is a schematic diagram showing a synchronization request signal delay provided by at least one embodiment of the present disclosure;
[0013] FIG3 shows a schematic diagram of a second chip provided by at least one embodiment of the present disclosure;
[0014] FIG4 is a schematic diagram showing that input clocks of a first chip and a second chip are of the same source according to at least one embodiment of the present disclosure;
[0015] FIG5 shows a schematic diagram of an initial pulse signal and a synchronization request signal provided by at least one embodiment of the present disclosure;
[0016] FIG6 shows a schematic diagram of generating and capturing a synchronization request signal according to at least one embodiment of the present disclosure;
[0017] FIG7 shows a schematic diagram of updating a second timestamp counter value provided by at least one embodiment of the present disclosure;
[0018] FIG8 shows a schematic diagram of stopping the second timestamp counter from counting according to at least one embodiment of the present disclosure;
[0019] FIG9 is a schematic diagram showing that input clocks of a first chip and a second chip are of different sources according to at least one embodiment of the present disclosure;
[0020] FIG10 shows a flowchart of a timestamp synchronization method for a first chip provided by at least one embodiment of the present disclosure; and
[0021] FIG11 shows a flowchart of a timestamp synchronization method for a second chip provided by at least one embodiment of the present disclosure. DETAILED DESCRIPTION
[0022] To make the purpose, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the described embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0023] Unless otherwise defined, the technical or scientific terms used in this disclosure should have the usual meanings understood by people with ordinary skills in the field to which this disclosure belongs. The words "first", "second" and similar words used in this disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "one", "an" or "the" do not indicate a quantity limitation, but rather indicate the existence of at least one. Words such as "include" or "comprise" mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Words such as "connect" or "connected" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the object being described changes, the relative positional relationship may also change accordingly.
[0024] Research has found that the cross-chip timestamp synchronization solution uses the SYNCREQ (Synchronization Request) / SYNCACK (Synchronization Acknowledge) four-phase handshake mechanism. For example, when two chips need to synchronize their timestamps, multiple handshakes are required between the two chips. The transmission delay of the SYNCREQ / SYNCACK handshake signals between the chips is calculated. Then, the synchronization data (current timestamp data + data transmission delay + synchronization request signal transmission delay) is sent. Finally, a synchronization request is sent to trigger the synchronization operation, ultimately achieving timestamp data alignment. This solution requires multiple handshakes during the synchronization process, resulting in a long communication process and complex functional control logic implementation, which is prone to design flaws.
[0025] At least one embodiment of the present disclosure provides a first chip, a second chip, a chip system, and a timestamp synchronization method. The first chip is configured to be communicatively connected with the second chip, and the first chip includes: a signal generation module, a first signal response module, and a first delay module. The signal generation module is configured to generate a synchronization request signal and send the synchronization request signal to the first signal response module and the second chip, so that the second signal response module of the second chip records the second timestamp of the second chip in response to receiving the synchronization request signal; the first delay module is configured to delay the synchronization request signal transmitted from the signal generation module to the first signal response module to obtain a delayed synchronization request signal; the first signal response module is configured to record the first timestamp of the first chip in response to receiving the delayed synchronization request signal, and the first timestamp and the second timestamp are used to perform timestamp synchronization operation.
[0026] According to the above-mentioned embodiments of the present disclosure, considering that there will be a delay for a period of time when the synchronization request signal is sent from the first chip to the second chip, the synchronization request signal is also delayed accordingly inside the first chip, so that the time when the two chips capture the synchronization request signal (or the delayed synchronization request signal) is close to the same, and the two chips respectively respond to the synchronization request signal (or the delayed synchronization request signal) to capture their respective timestamps, so that the time when the two chips capture the timestamps is also close to the same. In this way, the timestamp difference between the two chips can be determined according to the difference in the timestamps of the two chips, and the timestamp synchronization operation can be performed directly according to the timestamp difference, without the need for multiple handshakes to calculate the data transmission delay and the synchronization request signal transmission delay, thereby realizing a logically simple, functionally stable, and efficient cross-chip timestamp synchronization method.
[0027] For example, the first chip and the second chip in the embodiment of the present disclosure may be dies, which may also be called wafers, bare chips, etc. Multiple dies may be integrated into a package through Die-to-Die (D2D) internal interconnection technology to form a more powerful chip. In the embodiment of the present disclosure, the first chip is configured to be communicatively connected with the second chip, for example, the first chip and the second chip are communicatively connected through Die-to-Die (D2D) interconnection; and when one of the first chip and the second chip is described as a "chip", the other of the first chip and the second chip is described as "another chip".
[0028] For example, the first chip and the second chip may be processor dies, and multiple processor dies may be interconnected to form a more powerful processor chip. The first chip and the second chip may be used, for example, for computing and control, for processing image data, or for performing neural network calculations. The above description is merely illustrative and is not intended to limit the first chip and the second chip. In actual applications, the first chip and the second chip may also be other types of chips.
[0029] In some embodiments, the clocks of multiple interconnected dies can be generated by the same clock generator, meaning that multiple interconnected dies can share a single clock source. In other embodiments, multiple interconnected dies can also be clocked by multiple different clock generators. In this case, the input clocks of some dies may not originate from the same source. Timestamp data inconsistencies can occur between both dies with the same clock source and dies with different clock sources. Therefore, timestamp synchronization can be performed on both.
[0030] FIG1 shows a schematic diagram of a first chip provided by at least one embodiment of the present disclosure.
[0031] As shown in FIG. 1 , the first chip 100 includes a signal generating module 110 , a first delay module 120 and a first signal responding module 130 .
[0032] The signal generation module 110 is configured to generate a synchronization request signal and send the synchronization request signal to the first signal response module 130 and the second chip 200, so that the second signal response module 210 of the second chip 200 records the second timestamp of the second chip 200 in response to receiving the synchronization request signal.
[0033] The first delay module 120 is configured to delay the synchronization request signal transmitted from the signal generation module 110 to the first signal response module 130 to obtain a delayed synchronization request signal.
[0034] The first signal response module 130 is configured to record a first timestamp of the first chip 100 in response to receiving the delayed synchronization request signal, where the first timestamp and the second timestamp are used for performing a timestamp synchronization operation.
[0035] For example, after the signal generation module 110 generates a synchronization request signal, the synchronization request signal can be sent simultaneously to the first signal response module 130 inside the first chip and the second chip 200 outside. The second chip 200 includes a second signal response module 210. The first signal response module 130 and the second signal response module 210 can both immediately capture the current timestamp of their respective chips in response to the synchronization request signal (or delayed synchronization request signal). For example, the second signal response module 210 can immediately capture the current timestamp of the second chip as a second timestamp in response to receiving the synchronization request signal from the first chip, and can record the second timestamp in a register. The first signal response module 130 can also be configured to immediately capture the current timestamp of the first chip after receiving the synchronization request signal (or delayed synchronization request signal).
[0036] For example, since there is a certain delay in the signal transmission between the first chip 100 and the second chip 200, and this delay is greater than the delay in the signal transmission within the first chip 100, the time it takes for the synchronization request signal to reach the second signal response module 210 of the second chip 200 is longer than the time it takes to reach the first signal response module 130, resulting in a large time difference between the time when the first signal response module 130 and the second signal response module 210 capture the timestamps of their respective chips. In this case, the difference in the timestamps of the two captured chips cannot represent the actual time difference between the two chips, and there is a large error. Therefore, a first delay module 120 can be set between the signal generation module 110 and the first signal response module 130. The first delay module 120 can delay the synchronization request signal sent by the signal generation module 110 to the first signal response module 130. The length of the delay of the synchronization request signal can refer to the delay length of the synchronization request signal transmitted between the first chip and the second chip.
[0037] FIG2 is a schematic diagram showing a delay of a synchronization request signal provided by at least one embodiment of the present disclosure.
[0038] As shown in Figure 2, the synchronization request signal has a rising edge and a falling edge. The synchronization request signal can be delayed backward for a period of Δt, that is, the rising edge and the falling edge are both synchronously delayed backward for a period of Δt to obtain a delayed synchronization request signal. The Δt period can be determined, for example, by referring to the delay period of transmitting the synchronization request signal between the first chip and the second chip.
[0039] For example, the delayed synchronization request signal can be sent to the first signal response module 130, and the first signal response module 130 can immediately capture the current timestamp data of the first chip as the first timestamp in response to the delayed synchronization request signal, and can record the first timestamp in the register.
[0040] For example, the first delay module 120 is configured so that the time difference between the time when the delayed synchronization request signal is responded to by the first signal response module 130 and the time when the synchronization request signal sent to the second chip is responded to by the second signal response module 210 is less than a time difference threshold. Alternatively, the time difference between the time when the delayed synchronization request signal arrives at the first signal response module 130 and the time when the synchronization request signal sent to the second chip arrives at the second signal response module 210 is less than a time difference threshold. When the time difference between the time when the first chip and the second chip receive or respond to the synchronization request signal (or the delayed synchronization request signal) is less than the time difference threshold, it can be indicated that the time difference is very small and can be ignored. The time difference threshold can be determined according to actual conditions.
[0041] For example, the time difference between the time when the delayed synchronization request signal arrives at the first signal response module 130 and the time when the synchronization request signal sent to the second chip arrives at the second signal response module 210 is shortened or eliminated, and the first signal response module 130 and the second signal response module 210 receive and respond to the synchronization request signal (or delayed synchronization request signal) at almost the same time, thereby making the time when the first signal response module 130 and the second signal response module 210 capture the first timestamp and the second timestamp respectively close to the same or exactly the same. Therefore, the difference in the timestamps of the first chip and the second chip can be determined based on the first timestamp and the second timestamp. For example, the difference between the first timestamp and the second timestamp can be directly used as the actual time difference between the two chips. The error is small and can be ignored, and the timestamp synchronization operation can be performed directly based on the time difference.
[0042] For example, the timestamp synchronization operation may include changing the timestamp count of the second chip or changing the timestamp count of the first chip according to the difference between the first timestamp and the second timestamp, so that the timestamp counts of the first chip and the second chip are synchronized.
[0043] According to the embodiments of the present disclosure, considering that there will be a delay for a period of time when the synchronization request signal is sent from the first chip to the second chip, the synchronization request signal is also delayed accordingly inside the first chip, so that the time when the two chips capture the synchronization request signal (or the delayed synchronization request signal) is close to the same, and the two chips respectively respond to the synchronization request signal (or the delayed synchronization request signal) to capture their respective timestamps, so that the time when the two chips capture the timestamps is also close to the same. In this way, the timestamp difference between the two chips can be determined according to the difference in the timestamps of the two chips, and the timestamp synchronization operation can be performed directly according to the timestamp difference, without the need for multiple handshakes to calculate the data transmission delay and the synchronization request signal transmission delay, thereby realizing a logically simple, functionally stable, and efficient cross-chip timestamp synchronization method.
[0044] For example, in some embodiments, the timestamp synchronization operation may be performed by the second chip. After capturing the second timestamp, the second chip may send a timestamp acquisition request to the first chip. The first signal response module may be further configured to respond to the timestamp acquisition request of the second chip by sending the first timestamp to the second chip, so that the second chip performs the timestamp synchronization operation based on the first timestamp and the second timestamp.
[0045] For example, in some other embodiments, the timestamp synchronization operation may also be performed by the first chip. For example, after capturing the first timestamp, the first chip may send a timestamp acquisition request to the second chip to obtain the second timestamp, and then perform the timestamp synchronization operation based on the first timestamp and the second timestamp.
[0046] In some of the following embodiments, the second chip performing the timestamp synchronization operation is taken as an example for description.
[0047] FIG3 shows a schematic diagram of a second chip provided by at least one embodiment of the present disclosure.
[0048] As shown in FIG. 3 , the second chip 200 may include a second signal response module 210 and a second synchronization control module 220 .
[0049] The second signal response module 210 is configured to record the second timestamp of the second chip 200 in response to receiving the synchronization request signal from the first chip 100 , and send the synchronization request signal to the second synchronization control module 220 .
[0050] The second synchronization control module 220 is configured to, in response to receiving the synchronization request signal, obtain a second timestamp from the second signal response module 210 and a first timestamp from the first chip 100, and perform a timestamp synchronization operation based on the first timestamp and the second timestamp. The first timestamp is the timestamp of the first chip 100 recorded by the first signal response module 130 of the first chip in response to the delayed synchronization request signal.
[0051] FIG4 is a schematic diagram showing that the input clocks of the first chip and the second chip are of the same source, provided by at least one embodiment of the present disclosure.
[0052] As shown in FIG4 , the first chip 100 is, for example, the Master Die (Mst Die) shown in the figure, and the first chip 200 is, for example, the Slave Die (Slv Die) shown in the figure. The first chip 100 and the second chip 200 can, for example, share the same clock source 300. The clock signal generated by the clock source 300 is simultaneously sent to the first chip 100 and the second chip 200. That is, the input clocks of the first chip 100 and the second chip 200 are from the same source. The following embodiments are described with respect to the case where the input clocks of the first chip 100 and the second chip 200 are from the same source.
[0053] For example, the signal generating module 110 may include a synchronization signal triggering module 111 and a pulse extension module 112, wherein the synchronization signal triggering module 111 is configured to generate an initial pulse signal, and the pulse extension module 112 is configured to perform a widening operation on the initial pulse signal and use the widened initial pulse signal as a synchronization request signal.
[0054] For example, the synchronization signal trigger module 111 can be seen as synctrig 111 in Figure 4. Synctrig, short for synchronization trigger, is used to implement both one-time software and periodic hardware synchronization triggering. The pulse stretching module 112 can be seen as stretch pulse 112 in Figure 4. It stretches the pulse signal (i.e., the initial pulse signal) from synctrig 111 and uses the stretched signal as the synchronization request signal (see syncreq in Figure 4) to ensure that the synchronization request signal sent to the second chip is correctly sampled.
[0055] FIG5 shows a schematic diagram of an initial pulse signal and a synchronization request signal provided by at least one embodiment of the present disclosure.
[0056] As shown in Figure 5, the synchronization signal trigger module can generate an initial pulse signal on the rising edge of the clock signal and send the initial pulse signal to the pulse extension module. The pulse extension module can widen the initial pulse signal, for example, widening the pulse signal with a width of 1 reference clock cycle to 2 reference clock cycles. The widened signal serves as the synchronization request signal, which makes it easier for the second chip to capture the synchronization request signal.
[0057] For example, the first chip 100 may further include a first synchronization control module 140, configured to control the signal generation module to generate a synchronization request signal. The first synchronization control module 140 can be referred to as SCP 140 shown in FIG4 . SCP stands for System Control Processor, and SCP 140 may be a control system including a small processor. A firmware program runs on SCP 140 to configure relevant registers in the first chip and control the synchronization process of the first chip. SCP 140 can trigger a synchronization request by controlling synctrig 111 through software. For example, SCP 140 can write to a register of synctrig 111 via the first bus matrix 160, triggering synctrig 111 to generate an initial pulse signal.
[0058] For example, the first signal response module 130 of the first chip 100 may include a first signal capture module 131 and a first recording module 132. The first signal capture module 131 is configured to receive a delayed synchronization request signal and send a recording command to the first recording module in response to the delayed synchronization request signal. The first recording module is configured to record the current timestamp of the first chip 100 as the first timestamp in response to the recording command.
[0059] For example, the first signal capture module can be referenced as cap pos 131 in FIG4 . Cap pos is short for capture posedge, which is a rising-edge capture module for capturing the rising edge of a delayed synchronization request signal. Once this rising edge is captured, it notifies the first recording module 132 to capture the current timestamp. Furthermore, in other embodiments, the first signal capture module can also be referenced as snapshot 132 in FIG4 . Snapshot is a snapshot function register for implementing a snapshot function for timestamp data.
[0060] For example, the first chip may further include a first timestamp counter configured to continuously count at a fixed frequency, and the counted value may serve as the timestamp of the first chip. The first recording module may be configured to capture the value of the first timestamp counter to a register of the first recording module in a snapshot manner.
[0061] For example, the first timestamp counter can be seen as counter 150 in Figure 4. Counter 150 is a timestamp counter that continuously counts at a fixed frequency after the system is powered on and enabled, representing the passage of system time. Upon receiving a timestamp capture command from cap pos 131 or another module, snapshot 132 can capture the current timestamp data of counter 150 into a register.
[0062] For example, the second signal response module 210 of the second chip 200 may include a second signal capture module 211 and a second recording module 212. The second signal capture module 211 is configured to receive a synchronization request signal from the first chip, send a recording command to the second recording module 212 in response to the synchronization request signal, and send the synchronization request signal to the second synchronization control module 220. The second recording module 212 is configured to record the current timestamp of the second chip as the second timestamp in response to the recording command.
[0063] For example, the second signal capture module 211, as shown in FIG4 as cap pos 211, is configured to capture the rising edge of the synchronization request signal. Once the rising edge is captured, the second recording module is notified to capture the current timestamp. In other embodiments, the second signal capture module 211 may also be configured to capture the falling edge of the synchronization request signal. The second recording module 212, as shown in FIG4 as snapshot 212, is configured to implement a snapshot function for timestamp data.
[0064] For example, the second chip may further include a second timestamp counter 230, which is configured to continuously count at a fixed frequency, and the counted value serves as the timestamp of the second chip 200. The second recording module 212 is configured to capture the value of the second timestamp counter to a register of the second recording module in a snapshot manner.
[0065] For example, second timestamp counter 230 can be seen as counter 230 in FIG4 . Counter 230 is a timestamp counter that continuously counts at a fixed frequency after the system is powered on and enabled, thereby representing the passage of system time. Upon receiving a command to capture timestamp data from cap pos 211 or another module, snapshot 212 can capture the current timestamp data (second timestamp) of counter 230 into a register of snapshot 212.
[0066] According to an embodiment of the present disclosure, in a first chip, a first signal capture module is used to capture a delayed synchronization request signal, and after the capture, a first recording module is notified to implement a snapshot operation on the timestamp data of the first chip. In a second chip, a second signal capture module is used to capture a synchronization request signal, and after the capture, a second recording module is notified to implement a snapshot operation on the timestamp data of the second chip. Based on this approach, in the first chip and the second chip, the acquisition of the synchronization request signal (or the delayed synchronization request signal) and the capture of the timestamp data are effectively implemented through simple hardware modules.
[0067] For example, after capturing the synchronization request signal from the first chip, the second signal capture module 211 may also send the synchronization request signal to the second synchronization control module 220. The second synchronization control module 220 is denoted by SCP 220 in FIG. 4 . SCP stands for System Control Processor and may be a control system including a small processor. SCP 220 runs a firmware program to configure the relevant registers in the second chip and control the synchronization process of the second chip.
[0068] For example, the second chip may further include a second delay module 260 , which is connected between the second signal capture module 211 and the second synchronization control module 220 and is configured to delay the synchronization request signal sent by the second signal capture module 211 to the second synchronization control module 220 .
[0069] For example, the second delay module 260, as shown in FIG4 , is used to delay the synchronization request signal sent to the second synchronization control module 220, for example, by one reference clock cycle, to ensure that the second recording module 212 has already captured the current timestamp data of the second chip when the second synchronization control module 220 begins reading the register data of the second recording module 212. The second delay module 260 sends the delayed signal to the control core interrupt interface of the second synchronization control module 220, triggering the second synchronization control module 220 to initiate an interrupt response procedure (software-controlled). For example, after receiving the signal from the second delay module 260, the second synchronization control module 220 can access the register of the second recording module 212 via the second bus matrix 240 to obtain the second timestamp from the register. Furthermore, the second synchronization control module 220 can also send a timestamp acquisition request to the first chip via the second bus matrix 240 and the second interconnect bus 250 to obtain the first timestamp from the first chip.
[0070] For example, the first chip also includes a first synchronization interface module 171, which is connected to the signal generation module. The first synchronization interface module 171 is configured to send a synchronization request signal to the second synchronization interface module 261 of the second chip. The first synchronization interface module 171 is a dedicated transmission interface for the synchronization request signal. For example, the first synchronization interface module 171 is connected to the pulse expansion module 112. After receiving the synchronization request signal, the pulse expansion module 112 sends the synchronization request signal to the first synchronization interface module 171, which then uses the first synchronization interface module 171 to send the synchronization request signal to the second chip.
[0071] For example, the second chip includes a second synchronization interface module 261, which is connected to the second signal capture module 211 and configured to receive the synchronization request signal sent by the first chip 100 and send the synchronization request signal to the second signal capture module 211, wherein the second synchronization interface module 261 is an exclusive transmission interface for the synchronization request signal.
[0072] For example, the first synchronization interface module 171 and the second synchronization interface module 261 are communicatively connected. The first synchronization interface module 170 can be seen as the pad (chip port solder joint) 171 shown in Figure 4, and the second synchronization interface module 261 can be seen as the pad (chip port solder joint) 261 shown in Figure 4. The first synchronization interface module 171 and the second synchronization interface module 261 are used to provide a data path for the cross-chip transmission of the synchronization request signal. The first synchronization interface module 171 and the second synchronization interface module 261 are dedicated interfaces for the synchronization request signal, that is, they only transmit the synchronization request signal, realizing a dedicated transmission channel for the synchronization request signal. The synchronization request signal does not need to compete for bandwidth with other signals, thus the transmission speed is faster, and the transmission delay of the synchronization request signal from the first chip to the second chip can be relatively fixed each time, which facilitates the corresponding delay of the synchronization request signal transmitted within the first chip. For example, the synchronization request signal sent to the first signal response module can be delayed accordingly based on the transmission delay from the first synchronization interface module 171 to the second synchronization interface module 261, so that the time when the first signal response module and the second signal response module receive the synchronization request signal (or the delayed synchronization request signal) is closer.
[0073] For example, the first chip may further include a first data interface module 172 , which is connected to the first signal response module and configured to send the first timestamp to the second data interface module of the second chip.
[0074] For example, the first data interface module 172 can refer to the D2DBUS (Die-to-Die BUS) 172 shown in Figure 4. D2DBUS 172 is a bus module for transmitting data across chips, used to send and receive data streams across chips, thereby realizing cross-chip data transmission. Because the first data interface module 172 transmits a relatively large amount of data, and the first synchronization interface module is used to transmit synchronization request signals with a smaller amount of data, the bandwidth of the first data interface module 172 can be greater than the bandwidth of the first synchronization interface module 171.
[0075] For example, the first chip may further include a first interconnect bus 180 configured to connect the first signal response module and the first data interface module. The first chip may further include a first bus matrix 160, through which the first data interface module 172 is connected to the first recording module 132. The first interconnect bus 180 is used to provide system-level data access and perform bus protocol conversion. The first bus matrix 160 is used to provide access from modules such as the first synchronization control module 140 to modules such as the first recording module 132, the synchronization signal trigger module 111, and the periodic module, and to perform bus protocol conversion.
[0076] For example, the second chip may further include a second data interface module 262 , which is connected to the second synchronization control module 220 and configured to receive the first timestamp sent by the first chip 100 and send the first timestamp to the second synchronization control module 220 .
[0077] For example, the second data interface module 262 may refer to the D2DBUS262 shown in FIG. 4 , and the bandwidth of the second data interface module 262 may be greater than the bandwidth of the second synchronization interface module 261 .
[0078] For example, the second chip may further include a second interconnect bus 250 configured to connect the second synchronization control module 220 and the second data interface module 262. The second chip may further include a second bus matrix 240, through which the second data interface module 262 is connected to the second synchronization control module 220. The second interconnect bus 250 is used to provide system-level data access and perform bus protocol conversion. The second bus matrix 240 is used to provide access from modules such as the first synchronization control module 140 to modules such as the second recording module 212, the first synchronization module 271, and the second synchronization module 272, and to perform bus protocol conversion.
[0079] For example, after receiving the signal from the second delay module 260, the second synchronization control module 220 first accesses the register of the second recording module 212 through the second bus matrix 240 to obtain the second timestamp data, and then accesses the register of the first recording module 132 through the path of the second bus matrix 240-the second interconnection bus 250-the second data interface module 262-the first data interface module 172-the first interconnection bus 180-the first bus matrix 160 to obtain the first timestamp data.
[0080] For example, the second synchronization control module 220 can also be configured as follows: when the first timestamp is greater than the second timestamp, calculate the absolute difference between the first timestamp and the second timestamp, and update the value of the second timestamp counter based on the absolute difference; when the first timestamp is less than the second timestamp, calculate the absolute difference between the first timestamp and the second timestamp, and control the second timestamp counter to stop (pause) counting, and the duration of stopping counting is the duration corresponding to the absolute difference, that is, after the duration corresponding to the absolute difference has passed from the start of stopping counting, the second timestamp counter is controlled to continue counting.
[0081] For example, the second chip may further include a first synchronization module 271 and a second synchronization module 272. The first synchronization module 271 and the second synchronization module 272 are connected to the second synchronization control module 220 via the second bus matrix 240. The first synchronization module 271 can be referred to as preload 271 shown in FIG4 , and the second synchronization module 272 can be referred to as stop 272 shown in FIG4 . The first synchronization module 271 is applicable to scenarios where the first timestamp is greater than the second timestamp and can be used to cooperate with software to implement data updates for the second timestamp counter 230. The second synchronization module 272 is applicable to scenarios where the first timestamp is less than the second timestamp and can be used to cooperate with software to implement control of stopping counting of the second timestamp counter 230.
[0082] For example, if the first timestamp is greater than the second timestamp, after the second synchronization control module 220 calculates the absolute difference, it can write the absolute difference to the register of the first synchronization module 271. The first synchronization module 271 is configured to trigger a value update function in response to the absolute difference being written by the second synchronization control module, so as to update the value of the second timestamp counter based on the absolute difference. If the first timestamp is less than the second timestamp, after the second synchronization control module 220 calculates the absolute difference, it can write the absolute difference to the register of the second synchronization module 272. The second synchronization module 272 is configured to trigger a stop counting function in response to the absolute difference being written by the second synchronization control module, so that the second timestamp counter stops counting until the duration corresponding to the absolute difference is reached.
[0083] For example, after obtaining the first and second timestamps, the second synchronization control module 220 compares the values of the first and second timestamps and calculates the absolute difference between them. If the value of the first timestamp is greater than the value of the second timestamp, the second synchronization control module 220 may write the absolute difference to a register of the first synchronization module 271. Upon detecting that the absolute difference has been written to the first synchronization module 271, the second synchronization control module 220 triggers a data update of the second timestamp counter 230 on the rising edge of the reference clock through hardware control, updating the value of the second timestamp counter 230 to Tslave = Tcurr + 1'b1 + Tdiff, where Tslave represents the updated value, Tcurr represents the current value of the second timestamp counter 230, Tdiff represents the absolute difference between the first and second timestamps, and 1'b1 represents one clock cycle. Since there may be a one-clock cycle delay between capturing the current value Tcurr of the second timestamp counter 230 and updating the value of the second timestamp counter 230, 1'b1 can be used to compensate for this delay. If the value of the first timestamp is less than the value of the second timestamp, the second synchronization control module 220 can write the absolute difference to the register of the second synchronization module 272. When it is detected that the absolute difference is written to the second synchronization module 272, the second timestamp counter 230 is paused for Tdiff reference clock cycles and then starts counting again through hardware control.
[0084] FIG6 shows a schematic diagram of how a synchronization request signal is generated and captured according to at least one embodiment of the present disclosure.
[0085] As shown in Figure 6, C1 represents the value of the first timestamp counter 150, C2 represents the value of the second timestamp counter 230, S1 represents the delayed synchronization request signal captured by the first signal capture module 131, S2 represents the synchronization request signal captured by the second signal capture module 211, and S3 represents the signal sent to the first synchronization control module 220 after the second delay module 260 delays the signal.
[0086] For example, the values of the first timestamp counter and the second timestamp counter both change with the clock cycle. After each clock cycle, the first timestamp counter and the second timestamp counter increase by a predetermined value. For example, the value increases by 8 every clock cycle. The count is in hexadecimal. The value of the first timestamp counter and the value of the second timestamp counter shown in Figure 6 differ by 3 clock cycles.
[0087] For example, at time T1, the signal generation module generates a synchronization request signal. At time T2, the first signal capture module 131 and the second signal capture module 211 simultaneously capture the synchronization request signal (or delayed synchronization request signal), triggering the capture of timestamps for their respective chips. For example, the first recording module 132 captures a first timestamp of 748, and the second recording module 212 captures a second timestamp of 730, with a difference of three clock cycles between 748 and 730. At time T3, the second delay module 260 delays the synchronization request signal captured by the second signal capture module 211, resulting in a signal that needs to be sent to the first synchronization control module 220.
[0088] FIG7 shows a schematic diagram of updating a second timestamp counter value provided by at least one embodiment of the present disclosure.
[0089] As shown in Figure 7, C1 represents the value of the first timestamp counter 150, C2 represents the value of the second timestamp counter 230, C3 represents the value to which the second timestamp counter needs to be updated, and S4 represents the signal that triggers the second timestamp counter to update the value (i.e., the enable signal for the update operation).
[0090] For example, if the value of the first timestamp is greater than the value of the second timestamp, the value to which the second timestamp counter needs to be updated can be calculated based on the absolute difference between the first and second timestamps. For example, if the absolute difference between the first and second timestamps is three clock cycles and the current value of the second timestamp counter is 1368, then three clock cycles are added to 1368 to get 1380, and then one clock cycle is added to get 1388. At time T4, the value update operation is triggered, and the value of the second timestamp counter is updated to 1388. The updated value is consistent with the value of the first timestamp counter.
[0091] FIG8 shows a schematic diagram of stopping the second timestamp counter from counting according to at least one embodiment of the present disclosure.
[0092] As shown in FIG8 , C1 represents the value of the first time stamp counter 150 , C2 represents the value of the second time stamp counter 230 , and S5 represents a signal for controlling the temporary counting of the second time stamp counter.
[0093] For example, if the value of the first timestamp is less than the value of the second timestamp, the number of clock cycles that the second timestamp counter needs to pause counting can be determined. For example, if the absolute difference between the first and second timestamps is three clock cycles, the current value of the second timestamp counter is, for example, 1370, and the current value of the first timestamp counter is, for example, 1358. At time T5, with the arrival of the rising edge of the clock signal, both the first and second timestamp counters increment by 8 (one clock cycle), and the value of the second timestamp counter becomes 1378, while the value of the first timestamp counter becomes 1360. Because the S5 signal is triggered at time T5, the second timestamp counter stops counting and remains at 1378, while the first timestamp counter can continue counting. After three clock cycles, the S5 signal ends, and the first timestamp counter can resume counting. With the arrival of the next rising edge of the clock signal, the first timestamp counter increments by 8, reaching 1380. At this point, the value of the first timestamp counter also increases to 1380, and the values of the first and second timestamp counters become the same.
[0094] It should be noted that FIG6 to FIG8 show relatively ideal situations, and there may be certain deviations in actual applications.
[0095] FIG9 is a schematic diagram showing that the input clocks of the first chip and the second chip are of different sources according to at least one embodiment of the present disclosure.
[0096] As shown in FIG9 , the first chip and the second chip are respectively connected to different clock sources. For example, the first chip receives a clock signal from a first clock source 310 , and the second chip receives a clock signal from a second clock source 320 .
[0097] Because the difference in timestamp data between multiple chips with the same clock source is smaller than the difference in timestamp data between multiple chips with different clock sources, the user can trigger one or more synchronization requests (software control) through the first synchronization control module 140 as needed for the first chip and the second chip with the same clock source. However, for the first chip and the second chip with different clock sources, long-term data deviation between the first chip and the second chip is likely to occur. After executing a synchronization operation, a timestamp difference may appear again after a period of time. Therefore, the embodiment of the present disclosure also provides a periodic synchronization operation.
[0098] For example, in addition to the modules described in the above embodiments, the first chip may further include a period module 190 configured to record a synchronization period. The signal generation module may also be configured to generate a synchronization request signal once per synchronization period when the periodic synchronization function is enabled, thereby triggering a timestamp synchronization operation.
[0099] For example, the period module 190 can refer to psync window 190 shown in FIG4 . psync window is short for period synchronization window. Period module 190 is a time window register for periodic synchronization of timestamps. By configuring this register, periodic synchronization function within a specified time window can be implemented. Periodic synchronization can be enabled by software control or periodically triggered by hardware control. For example, writing a period value into the register of period module 190 indicates that the periodic synchronization function is enabled. The synchronization signal trigger module can set a timer counter. When the count time reaches the synchronization period, a synchronization request is triggered. For example, when the count time reaches the synchronization period, the synchronization signal trigger module can generate an initial pulse signal. The initial pulse signal is stretched to obtain a synchronization request signal. The synchronization request signal is sent to the second signal capture module in the second chip, and the synchronization request signal is delayed and sent to the first signal capture module in the first chip. The first signal capture module and the second signal capture module respectively notify the first recording module and the second recording module to record the current timestamp value of each chip. The timestamp synchronization operation is then performed based on the difference between the timestamp values of the two chips. For details, please refer to the relevant description above and will not be repeated here. The period value can be determined based on actual conditions; for example, it can be 1 millisecond. By configuring a time value, such as 1 millisecond, into this register (configurable via software), the system will initiate a timestamp synchronization operation every corresponding time interval (e.g., 1 millisecond). Periodic synchronization can resolve long-term data deviations between chips caused by non-identical clock sources.
[0100] For example, Figures 4 and 9 illustrate only the modules used by the first and second chips in the timestamp synchronization process of the above embodiment. However, the modules and functions included in the first and second chips may be the same. For example, the second chip may also include a signal trigger module, a first delay module, etc., and the first chip may also include a first synchronization module and a second synchronization module. The functions of the corresponding modules in the first and second chips may be the same. For example, the second synchronization control module may also have the aforementioned functions of the first synchronization control module, and the first synchronization control module may also have the aforementioned functions of the second synchronization control module.
[0101] For example, the roles of the first chip and the second chip can be interchanged. For example, the second chip can generate a synchronization request signal and then send the synchronization request signal to the first signal and its own internal second signal response module, and the first chip performs the timestamp synchronization operation.
[0102] For example, in addition to performing timestamp synchronization with the second chip, the first chip can also perform timestamp synchronization with other chips. Similarly, the second chip can also perform timestamp synchronization with other chips.
[0103] According to the embodiments of the present disclosure, a simple and effective timestamp synchronization circuit is implemented through the coordinated operation of various functional modules. It can respond to synchronization request signals, capture timestamp data, and perform synchronization operations, achieving rapid synchronization between the first and second chips using simple circuit logic.
[0104] According to the embodiments of the present disclosure, a control method in which software and hardware cooperate with each other is adopted, which reduces the complexity of hardware design and improves the flexibility of synchronization process control. For example, operations implemented through hardware control may include: widening the initial pulse signal, the operation of the first signal capture module and the second signal capture module capturing the synchronization request signal (or delayed synchronization request signal), the operation of the first recording module and the second recording module obtaining timestamps from corresponding timestamp counters, the operation of delaying the synchronization request signal, etc. Operations implemented through software control may include: the operation of the second synchronization control module accessing the second recording module to read the second timestamp, the operation of the second synchronization control module accessing the first recording module to read the first timestamp, etc.
[0105] According to the embodiments of the present disclosure, the first synchronization module and the second synchronization module cooperate with the software to implement the update and pause functions of the second timestamp counter, thereby enhancing the adaptability to different synchronization scenarios.
[0106] At least one embodiment of the present disclosure further provides a chip system, which includes a first chip and a second chip. The first chip and the second chip can refer to Figures 1 to 9 and the description of the corresponding contents in the above embodiments, and will not be repeated here.
[0107] For example, in addition to the first chip and the second chip, the chip system may further include other chips that need to perform timestamp synchronization operations with the first chip and / or the second chip.
[0108] At least one embodiment of the present disclosure further provides a timestamp synchronization method for a first chip.
[0109] FIG10 shows a flowchart of a timestamp synchronization method for a first chip provided by at least one embodiment of the present disclosure.
[0110] As shown in FIG. 10 , the method may include steps S110 to S140 .
[0111] Step S110: Generate a synchronization request signal.
[0112] Step S120: Sending a synchronization request signal to the second chip, so that the second chip records a second timestamp of the second chip in response to the synchronization request signal.
[0113] Step S130: delaying the synchronization request signal to obtain a delayed synchronization request signal.
[0114] Step S140: In response to the delayed synchronization request signal, record the first timestamp of the first chip, where the first timestamp and the second timestamp are used to perform a timestamp synchronization operation.
[0115] For example, in step S110, an initial pulse signal may be generated, and a stretching operation may be performed on the initial pulse signal, and the stretched initial pulse signal may be used as the synchronization request signal. For example, the initial pulse signal may be generated by a synchronization signal trigger module, and then a stretching operation may be performed on the initial pulse signal by a pulse stretching module, and the stretched initial pulse signal may be used as the synchronization request signal.
[0116] For example, the first chip includes a first synchronization interface module, which is a dedicated interface for a synchronization request signal. In step S120, the synchronization request signal can be sent to the second chip using the first synchronization interface module. In the second chip, the synchronization request signal can be responded to by a second signal response module of the second chip to record a second timestamp of the second chip.
[0117] For example, the first chip includes a first signal response module. In step S140, the first signal response module may capture the delayed synchronization request signal and record the first timestamp of the first chip in response to the delayed synchronization request signal.
[0118] For example, in step S130, the synchronization request signal is delayed so that the time difference between the time when the delayed synchronization request signal is responded to by the first signal response module and the time when the synchronization request signal sent to the second chip is responded to by the second signal response module is less than the time difference threshold.
[0119] For example, the timestamp synchronization method for the first chip may further include: in response to a timestamp acquisition request from the second chip, sending the first timestamp to the second chip, so that the second chip performs a timestamp synchronization operation based on the first timestamp and the second timestamp.
[0120] For example, the first chip may further include a first data interface module, and the first data interface module may send the first timestamp to the second data interface module of the second chip.
[0121] For example, the first signal response module includes a first signal capture module and a first recording module. In step S140, the first signal capture module can receive a delayed synchronization request signal and send a recording command to the first recording module in response to the delayed synchronization request signal. Then, the first recording module responds to the recording command and records the current timestamp of the first chip as the first timestamp.
[0122] For example, the first chip may further include a first timestamp counter that can continuously count at a fixed frequency, with the counted value serving as the timestamp of the first chip. In step S140, the first recording module may capture the value of the first timestamp counter to a register of the first recording module in a snapshot manner.
[0123] For example, the first chip may further include a first synchronization control module. In step S110 , the first synchronization control module may control the signal generation module to generate a synchronization request signal.
[0124] For example, the timestamp synchronization method for the first chip may further include: when the periodic synchronization function is enabled, generating a synchronization request signal every synchronization period to trigger a timestamp synchronization operation.
[0125] For example, the timestamp synchronization method for the first chip may be specifically described in the above embodiment regarding the first chip, and will not be described in detail here.
[0126] At least one embodiment of the present disclosure further provides a timestamp synchronization method for a second chip.
[0127] FIG11 shows a flowchart of a timestamp synchronization method for a second chip provided by at least one embodiment of the present disclosure.
[0128] As shown in FIG. 11 , the method may include steps S210 to S230 .
[0129] Step S210 : In response to receiving a synchronization request signal from the first chip, recording a second timestamp of the second chip.
[0130] Step S220: Acquire a first timestamp from the first chip, wherein the first timestamp is a timestamp recorded by the first chip in response to the delayed synchronization request signal.
[0131] Step S230: performing a timestamp synchronization operation based on the first timestamp and the second timestamp.
[0132] For example, the second chip includes a second signal response module. In step S210, the second signal response module can respond to receiving the synchronization request signal from the first chip, record the second timestamp of the second chip, and send the synchronization request signal to the second synchronization control module.
[0133] For example, the time difference between the time when the delayed synchronization request signal is responded to by the first signal response module in the first chip and the time when the synchronization request signal is responded to by the second signal response module is less than the time difference threshold.
[0134] For example, the second signal response module includes a second signal capture module and a second recording module. In step S210, the second signal capture module can receive a synchronization request signal from the first chip, send a recording command to the second recording module in response to the synchronization request signal, and send the synchronization request signal to the second synchronization control module. The second recording module responds to the recording command and records the current timestamp of the second chip as the second timestamp.
[0135] For example, the second chip includes a second timestamp counter that continuously counts at a fixed frequency, and the counted value serves as the timestamp of the second chip. In step S210, the second recording module can capture the value of the second timestamp counter to a register of the second recording module in a snapshot manner.
[0136] For example, the second chip includes a second synchronization control module. In step S220, the second synchronization control module obtains a second timestamp from the second signal response module in response to receiving the synchronization request signal. In step S230, the second synchronization control module obtains a first timestamp from the first chip and performs a timestamp synchronization operation based on the first timestamp and the second timestamp.
[0137] For example, the timestamp synchronization method for the second chip may further include: delaying the synchronization request signal sent by the second signal acquisition module to the second synchronization control module.
[0138] For example, in step S230, when the first timestamp is greater than the second timestamp, the absolute difference between the first timestamp and the second timestamp is calculated, and the value update of the second timestamp counter is controlled based on the absolute difference; when the first timestamp is less than the second timestamp, the absolute difference between the first timestamp and the second timestamp is calculated, and the second timestamp counter is controlled to stop counting, and the duration of stopping counting is the duration corresponding to the absolute difference.
[0139] For example, the second chip includes a second synchronization interface module, which is a dedicated interface for the synchronization request signal. In step S210, the second signal response module receives the synchronization request signal from the second synchronization interface module.
[0140] For example, the timestamp synchronization method for the second chip may be specifically described in the above embodiment regarding the second chip, which will not be described in detail here.
[0141] For example, the various modules and devices mentioned in the embodiments of the present disclosure can be implemented by hardware (such as circuits), software, or any combination of the two. It should be noted that the components and structures of the first chip and the second chip shown in Figures 4 and 9 are only exemplary and not restrictive. As needed, the first chip and the second chip may also have other components and structures.
[0142] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0143] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0144] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
[0145] Regarding this disclosure, the following points need to be explained:
[0146] (1) The drawings of the embodiments of the present disclosure only relate to the structures involved in the embodiments of the present disclosure. Other structures may refer to conventional designs.
[0147] (2) In the absence of conflict, the embodiments of the present disclosure and the features therein may be combined with each other to form new embodiments.
[0148] The above description is only a specific embodiment of the present disclosure, but the protection scope of the present disclosure is not limited thereto. The protection scope of the present disclosure shall be based on the protection scope of the claims.
Claims
1. A chip, wherein: The chip is configured to be connected to another chip for communication, and the chip includes: a signal generating module, a first signal response module and a first delay module, wherein: The signal generating module is configured to generate a synchronization request signal, and send the synchronization request signal to the first signal response module and the other chip, so that the second signal response module of the other chip records the second timestamp of the other chip in response to receiving the synchronization request signal; The first delay module is configured to delay the synchronization request signal transmitted from the signal generation module to the first signal response module to obtain a delayed synchronization request signal; The first signal response module is configured to record a first timestamp of the chip in response to receiving the delayed synchronization request signal, wherein the first timestamp and the second timestamp are used to perform a timestamp synchronization operation.
2. The chip according to claim 1, wherein: The first delay module is configured to make the time difference between the time when the delayed synchronization request signal is responded to by the first signal response module and the time when the synchronization request signal is responded to by the second signal response module smaller than a time difference threshold.
3. The chip according to claim 1 or 2, wherein: The first signal response module is further configured to send the first timestamp to the other chip in response to a timestamp acquisition request of the other chip, so that the other chip performs the timestamp synchronization operation based on the first timestamp and the second timestamp.
4. The chip according to any one of claims 1 to 3, wherein: The first signal response module includes: a first signal capture module and a first recording module, wherein: The first signal capture module is configured to receive the delayed synchronization request signal, and send a recording command to the first recording module in response to the delayed synchronization request signal; and The first recording module is configured to record the current timestamp of the chip as the first timestamp in response to the recording command.
5. The chip according to any one of claims 1 to 4, wherein: The signal generating module comprises: a synchronization signal trigger module, configured to generate an initial pulse signal; and The pulse extension module is configured to perform an extension operation on the initial pulse signal and use the extended initial pulse signal as the synchronization request signal.
6. The chip according to any one of claims 1 to 5, further comprising: The first synchronization interface module is connected to the signal generating module and is configured to send the synchronization request signal to the second synchronization interface module of the other chip, wherein the first synchronization interface module is a dedicated transmission interface for the synchronization request signal.
7. The chip according to any one of claims 3 to 6, further comprising: a first data interface module, connected to the first signal response module and configured to send the first timestamp to a second data interface module of the other chip; as well as The first interconnection bus is configured to connect the first signal response module and the first data interface module.
8. The chip according to any one of claims 4 to 7, further comprising: A first timestamp counter, configured to continuously count at a fixed frequency, and the counted value is used as the timestamp of the chip; The first recording module is configured to capture the value of the first timestamp counter into a register of the first recording module by means of a snapshot.
9. The chip according to any one of claims 1 to 8, further comprising: A first synchronization control module, configured to control the signal generation module to generate the synchronization request signal; A period module, configured to record synchronization periods; Wherein, the signal generating module is further configured to generate the synchronization request signal once every synchronization period when the periodic synchronization function is turned on, so as to trigger the timestamp synchronization operation once.
10. A chip, wherein: The chip is configured to communicate with another chip, and the chip includes: a second signal response module and a second synchronization control module, wherein: The second signal response module is configured to record a second timestamp of the chip in response to receiving a synchronization request signal from the other chip, and send the synchronization request signal to the second synchronization control module; The second synchronization control module is configured to, in response to receiving the synchronization request signal, obtain the second timestamp from the second signal response module and obtain the first timestamp from the other chip, and perform a timestamp synchronization operation based on the first timestamp and the second timestamp; The first timestamp is a timestamp of the other chip recorded by a first signal response module of the other chip in response to a delayed synchronization request signal.
11. The chip according to claim 10, wherein: A time difference between a time when the delayed synchronization request signal is responded to by the first signal response module and a time when the synchronization request signal is responded to by the second signal response module is less than a time difference threshold.
12. The chip according to claim 10 or 11, wherein: The second signal response module includes: a second signal capture module and a second recording module, wherein: The second signal acquisition module is configured to receive the synchronization request signal from the other chip, send a recording command to the second recording module in response to the synchronization request signal, and send the synchronization request signal to the second synchronization control module; and The second recording module is configured to record the current timestamp of the chip as the second timestamp in response to the recording command.
13. The chip according to claim 12, further comprising: The second delay module is connected between the second signal capture module and the second synchronization control module, and is configured to delay the synchronization request signal sent by the second signal capture module to the second synchronization control module.
14. The chip according to claim 12 or 13, further comprising: A second timestamp counter is configured to continuously count at a fixed frequency, and the counted value is used as the timestamp of the chip; The second recording module is configured to capture the value of the second timestamp counter into a register of the second recording module by means of a snapshot.
15. The chip according to claim 14, wherein: The second synchronization control module is configured as follows: When the first timestamp is greater than the second timestamp, calculating an absolute difference between the first timestamp and the second timestamp, and controlling the value update of the second timestamp counter based on the absolute difference; When the first timestamp is smaller than the second timestamp, the absolute difference between the first timestamp and the second timestamp is calculated, and the second timestamp counter is controlled to stop counting, and the duration of stopping counting is the duration corresponding to the absolute difference.
16. The chip according to claim 15, further comprising: a first synchronization module configured to trigger a value update function in response to the absolute difference being written by the second synchronization control module, so as to update the value of the second timestamp counter based on the absolute difference; The second synchronization module is configured to trigger a stop counting function in response to the absolute difference being written by the second synchronization control module, so that the second timestamp counter stops counting until a time length corresponding to the absolute difference is reached.
17. The chip according to any one of claims 12 to 16, further comprising: A second synchronization interface module, connected to the second signal capture module, configured to receive the synchronization request signal sent by the other chip, and send the synchronization request signal to the second signal capture module, wherein the second synchronization interface module is a dedicated transmission interface for the synchronization request signal; A second data interface module, connected to the second synchronization control module, configured to receive the first timestamp sent by the other chip, and send the first timestamp to the second synchronization control module; The second interconnection bus is configured to connect the second synchronization control module and the second data interface module.
18. A chip system comprising: A first chip, comprising a signal generating module, a first signal responding module and a first delay module; as well as A second chip is configured to be communicatively connected with the first chip, and includes a second signal response module and a second synchronization control module; Wherein, the signal generation module is configured to generate a synchronization request signal, and send the synchronization request signal to the first signal response module and the second chip; the first delay module is configured to delay the synchronization request signal transmitted from the signal generation module to the first signal response module to obtain a delayed synchronization request signal; the first signal response module is configured to record a first timestamp of the first chip in response to receiving the delayed synchronization request signal; as well as The second signal response module is configured to record the second timestamp of the second chip in response to receiving a synchronization request signal from the first chip, and send the synchronization request signal to the second synchronization control module; the second synchronization control module is configured to obtain the second timestamp from the second signal response module in response to receiving the synchronization request signal, and obtain the first timestamp from the first chip, and perform a timestamp synchronization operation based on the first timestamp and the second timestamp.
19. A timestamp synchronization method, for a first chip, wherein the first chip is configured to be communicatively connected with a second chip, the method comprising: generating a synchronization request signal; sending the synchronization request signal to the second chip, so that the second chip records a second timestamp of the second chip in response to the synchronization request signal; Delaying the synchronization request signal to obtain a delayed synchronization request signal; In response to the delayed synchronization request signal, a first timestamp of the first chip is recorded, and the first timestamp and the second timestamp are used to perform a timestamp synchronization operation.
20. A timestamp synchronization method, used for a second chip, the second chip being configured to be communicatively connected with a first chip, the method comprising: In response to receiving a synchronization request signal from the first chip, recording a second timestamp of the second chip; Acquire a first timestamp from the first chip, wherein the first timestamp is a timestamp of the first chip recorded by the first chip in response to a delayed synchronization request signal; A timestamp synchronization operation is performed based on the first timestamp and the second timestamp.
Citation Information
Patent Citations
Link delay processing method and device
CN104158646A
Aperiodic signal synchronization method and system based on optical fiber transmission delay real-time compensation
CN110290434A
Delay detection method and device, electronic equipment and storage medium
CN114115434A
Delay compensation circuit and compensation method thereof
CN115486798A
Delay synchronization circuit and imaging apparatus
JP2006295275A
Cited By
Chip time synchronization method, device and system of multi-link equipment and storage medium
CN119051794A
Self-correction time synchronization device and method of satellite-borne high-resolution imaging system
CN120935312A
