Time synchronization information processing method and architecture
By adopting a method of adopting a wake-up mechanism to obtain and calculate time synchronization information and then sleep during the time synchronization process, the problem of excessive power consumption in the prior art is solved, and power consumption is reduced and the communication process is simplified.
Patent Information
- Application Number
- CN202211608120.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-14
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2042-12-14
AI Technical Summary
Existing time synchronization solutions consume too much power.
The wake-up mechanism is used to obtain time synchronization information. The operation layer enters the sleep state after calculating the time synchronization results, reducing unnecessary monitoring.
Effectively reduce power consumption, simplify communication processes, and improve the response speed of the operation layer to the protocol layer.
Smart Images

Figure CN116126094B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a time synchronization information processing method and architecture. Background Art
[0002] Time synchronization is the process of providing a unified time scale for independent modules in a data transmission link. In distributed systems, or scenarios where data transmission is based on distributed protocols, time synchronization is used to clarify the sequence of events occurring in different modules and avoid confusion in the data processing flow. In the data transmission field, for example, in a USB4 system that supports video data transmission, in the distributed protocol-based time synchronization process, the slave router needs to calculate the master router's time, time offset, and frequency offset information according to the time synchronization protocol to achieve time synchronization.
[0003] However, existing time synchronization solutions consume too much power. Summary of the Invention
[0004] In view of this, an embodiment of the present invention provides a time synchronization information processing method and architecture, which can greatly reduce power consumption.
[0005] To solve the above problems, the embodiments of the present invention provide the following technical solutions:
[0006] In a first aspect, an embodiment of the present invention provides a time synchronization information processing method, applied to a protocol layer, comprising:
[0007] Get time synchronization information;
[0008] Transmitting the acquired time synchronization information to a synchronous storage device;
[0009] Sending a calculation request, where the calculation request is used to wake up the calculation layer, so that the calculation layer obtains time synchronization information from the synchronous storage device, calculates a time synchronization calculation result based on the time synchronization information, and transmits the time synchronization calculation result to the synchronous storage device;
[0010] Obtaining the time synchronization calculation result from the synchronous storage device;
[0011] The operation layer enters a dormant state after calculating the result of the calculation time synchronization.
[0012] Optionally, in the step of transmitting the acquired time synchronization information to the synchronous storage device, the time synchronization information is acquired based on a handshake mechanism.
[0013] Optionally, the protocol layer is a protocol layer of an uplink port, the protocol layer includes a data interface layer and a time synchronization interface layer, and the acquiring of time synchronization information based on a handshake mechanism includes:
[0014] The data interface layer issues a first notification request, and the time synchronization interface layer records first time information corresponding to the moment when the first notification request is issued;
[0015] The data interface layer receives the second notification request, and the time synchronization interface layer records fourth time information corresponding to the moment of receiving the second notification request;
[0016] Receive a time data packet from a downstream port, and obtain the second time information and the third time information recorded by the downstream port;
[0017] Time synchronization information is determined, where the time synchronization information includes the first time information, the second time information, the third time information, and the fourth time information.
[0018] Optionally, the data interface layer issues a first notification request, and the time synchronization interface layer records first time information corresponding to the moment when the first notification request is issued, including:
[0019] The time synchronization interface layer initiates a first notification request, and notifies the data interface layer to send the first notification request;
[0020] The data interface layer issues the first notification request and notifies the time synchronization interface layer that the first notification request has been issued;
[0021] When the time synchronization interface layer learns that the first notification request has been sent, it records the first time information corresponding to the current moment.
[0022] Optionally, the data interface layer receives the second notification request, and the time synchronization interface layer records fourth time information corresponding to the moment of receiving the second notification request, including:
[0023] The data interface layer receives the second notification request, and notifies the time synchronization interface layer that the second notification request has been received;
[0024] When the time synchronization interface layer learns that the second notification request has been received, it records the fourth time information corresponding to the current moment.
[0025] Optionally, the determining of the time synchronization information is specifically, based on protocol provisions, performing delay compensation on the obtained first time information, second time information, third time information and fourth time information to obtain the time synchronization information.
[0026] Optionally, in the step of acquiring time synchronization information based on the handshake mechanism, the number of handshake steps is also recorded;
[0027] In the step of sending the operation request, the operation request is sent when the number of handshake steps is a preset value.
[0028] Optionally, the time synchronization information is further configured with a corresponding time information validity identifier, and the time information validity identifier is used to mark the validity of the time synchronization information;
[0029] In the step of transmitting the acquired time synchronization information to the synchronous storage device, when the time information validity identifier indicates that the time synchronization information is valid, the acquired time synchronization information is transmitted to the synchronous storage device.
[0030] Optionally, in the step of acquiring the time synchronization information based on the handshake mechanism, at the end of the handshake, the time information validity identifier of the acquired time synchronization information is marked as valid.
[0031] Optionally, the time synchronization information includes a timestamp and time offset information corresponding to the timestamp, and the time offset information includes one or more of the time offset of the intra-domain host router, the frequency offset of the intra-domain host router, the inter-domain timestamp, the time offset of the time source host router, and the frequency offset of the time source host router.
[0032] Optionally, the synchronous storage device includes a synchronization information register and a calculation result register, the synchronization information register is used to synchronize time synchronization information, and the calculation result register is used to synchronize time synchronization calculation results.
[0033] Optionally, sending the operation request includes: pulling up the operation request signal, so that the operation layer executes a wake-up process and pulls down the operation request signal when the operation request signal is pulled high.
[0034] In a second aspect, an embodiment of the present invention provides a time synchronization information processing method, which is applied to a computing layer and includes:
[0035] Obtaining a computation request of the protocol layer;
[0036] Executing a wake-up process based on the operation request of the protocol layer;
[0037] After executing the wake-up process, the time synchronization information is obtained from the synchronous storage device;
[0038] Calculating a time synchronization calculation result based on the time synchronization information;
[0039] Transmitting the time synchronization calculation result to a synchronous storage device;
[0040] After transmitting the time synchronization calculation result to the synchronous storage device, the system enters a dormant state.
[0041] Optionally, calculating a time synchronization calculation result based on the time synchronization information includes:
[0042] Call judgment jump instructions and calculation instructions;
[0043] Based on the judgment jump instruction, determining whether the last time synchronization information stored in the current data cache is valid data;
[0044] If not, the time synchronization information obtained this time is stored in the data cache, and the end operation instruction is executed;
[0045] If so, calculation is performed based on the calculation instruction, the previous time synchronization information in the data cache, and the time synchronization information obtained this time to obtain a time synchronization calculation result.
[0046] Optionally, the determining whether the last time synchronization information stored in the current data cache is valid data is specifically:
[0047] Determine whether the last time synchronization information recorded in the data cache is valid data based on the data of the time synchronization information; wherein, when the last time synchronization information is non-zero, the time synchronization information is considered to be valid data; when the last time synchronization information is zero, the time synchronization information is considered to be invalid data;
[0048] After the step of calculating the time synchronization calculation result based on the time synchronization information, the method further includes: clearing the time information of the time synchronization information stored in the data cache.
[0049] Optionally, the determining whether the last time synchronization information stored in the current data cache is valid data is specifically:
[0050] Determine whether the last time synchronization information recorded in the data cache is valid data based on the time information valid identifier; wherein, when the time information valid identifier indicates that the last time synchronization information stored is valid, the time synchronization information is valid data; when the time information valid identifier indicates that the last time synchronization information stored is invalid, the time synchronization information is invalid data;
[0051] After the step of calculating the time synchronization calculation result based on the time synchronization information, the method further includes: marking the time information validity flag of the time synchronization information stored in the data cache as invalid.
[0052] Optionally, the execution end operation instruction is specifically: pulling down the operation request signal and entering a sleep state.
[0053] Optionally, after the step of calculating the time synchronization calculation result based on the time synchronization information, the step further includes:
[0054] The signal of the time synchronization calculation result is filtered.
[0055] Optionally, the obtaining of the operation request of the protocol layer is specifically detecting a high operation request signal.
[0056] Optionally, before obtaining the operation request of the protocol layer and executing the wake-up process, the process further includes:
[0057] The operation layer is configured to load instructions into the operation layer, where the instructions at least include jump instructions and operation instructions.
[0058] Optionally, configuring the computing layer includes:
[0059] Loading instructions into the instruction cache, the instructions at least including jump instructions and operation instructions;
[0060] Dynamic clock management is performed based on the operation request; wherein, the dynamic clock management is used to turn on the main clock when the operation request is received, so that the operation layer enters the operation process, and turn off the main clock after the operation process ends, so that the operation layer enters the sleep state.
[0061] Optionally, transmitting the time synchronization calculation result to a synchronous storage device is specifically transmitting the time synchronization calculation result to a calculation result register of the synchronous storage device;
[0062] In a third aspect, an embodiment of the present invention provides a time synchronization information processing architecture, including a protocol layer and an operation layer:
[0063] The protocol layer includes: a time synchronization interface layer, a transport layer and a data interface layer; the operation layer includes: a state machine, a data cache, an instruction cache and an operation unit;
[0064] The protocol layer is used to execute the time synchronization information processing method applied to the protocol layer provided by the embodiment of the present invention;
[0065] The operation layer is used to execute the time synchronization information processing method applied to the operation layer provided by the embodiment of the present invention.
[0066] An embodiment of the present invention provides a time synchronization information processing method and architecture, wherein the time synchronization information processing method includes obtaining time synchronization information; transmitting the obtained time synchronization information to a synchronous storage device; sending a calculation request, wherein the calculation request is used to wake up the calculation layer so that the calculation layer obtains time synchronization information from the synchronous storage device, and calculates a time synchronization calculation result based on the time synchronization information, and transmits the time synchronization calculation result to the synchronous storage device; obtains the time synchronization calculation result from the synchronous storage device; wherein the calculation layer enters a sleep state after calculating the time synchronization calculation result.
[0067] It can be seen that the embodiment of the present invention processes time synchronization information based on the wake-up mechanism. When there is time synchronization information (that is, when there is a time synchronization requirement), the operation layer is awakened, so that the operation layer can be awakened at any time based on the time synchronization requirement without the need to monitor at all times, and enters a sleep state after calculating the time synchronization calculation result. Therefore, after completing the corresponding computing task, that is, after calculating the time synchronization calculation result, the operation layer enters a sleep state, thereby greatly reducing power consumption. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.
[0069] Figure 1 A schematic diagram of a USB4 data transmission architecture;
[0070] Figure 2 A schematic diagram of the interaction between the protocol layer and the operation layer;
[0071] Figure 3 An optional schematic diagram of a time synchronization information processing architecture provided by an embodiment of the present invention;
[0072] Figure 4 An optional flow chart of a time synchronization information processing method provided by an embodiment of the present invention;
[0073] Figure 5 A schematic diagram of an optional structure of a synchronous storage device provided by an embodiment of the present invention;
[0074] Figure 6 This is a handshake flow chart of the upstream port and the downstream port according to an embodiment of the present invention;
[0075] Figure 7 This is a flow chart of the configuration of the computing layer provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0076] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0077] As described in the background art, existing time synchronization solutions consume too much power.
[0078] Taking the USB4 data transmission protocol based on distributed protocol for time synchronization as an example, refer to Figure 1 The USB4 data transmission architecture diagram shown in the figure shows that data is transmitted between the downstream port (Downstream Facing Part, DFP) and the upstream port (UPstream Facing Part, UFP). Among them, DFP can be understood as a host, and its notable feature is that it is used as a source (power source) to power VBUS (a type of power supply pin) and vcon (a type of power supply pin); UFP can be understood as a device, and its notable feature is that it is used as a powered port, draws power from VBUS, and can provide data. Typical UFP devices include USB flash drives and mobile hard drives. In some transmission links, the upstream port can also be understood as a downstream port serving as an IDTI (InterDomain Time Initiator, time synchronization initiator).
[0079] The UFP may be provided with a routing module (also called a slave router) for data transmission and a time synchronization unit (TMU) for processing the time synchronization protocol. The slave router may implement data processing at the protocol layer, and the time synchronization unit is used to implement data processing at the operation layer. In some optional examples, the time synchronization unit may be a microcontroller unit (MCU), or the MCU of the DFP system-on-chip may be reused as the time synchronization unit.
[0080] The time synchronization process in UFP is usually based on the interrupt mechanism to achieve the interaction between the protocol layer and the operation layer. Figure 2 The diagram shows the interaction between the protocol layer and the computing layer. After the protocol layer obtains the corresponding time synchronization information, it needs to issue an interrupt message. Based on the interrupt message, the computing layer determines the interrupt type, further obtains the time synchronization information, and performs the corresponding parameter calculations. However, this interrupt-based interaction requires the computing layer's devices to monitor interrupts in real time, which consumes excessive power.
[0081] In view of this, an embodiment of the present invention provides a time synchronization information processing method and architecture, wherein the time synchronization information processing method includes obtaining time synchronization information; transmitting the obtained time synchronization information to a synchronous storage device; sending an operation request, wherein the operation request is used to wake up the operation layer so that the operation layer obtains time synchronization information from the synchronous storage device and calculates the time synchronization calculation result based on the time synchronization information; wherein the operation layer enters a sleep state after calculating the time synchronization calculation result.
[0082] It can be seen that the embodiment of the present invention processes time synchronization information based on the wake-up mechanism. When there is time synchronization information (that is, when there is a time synchronization requirement), the operation layer is awakened, so that the operation layer can be awakened at any time based on the time synchronization requirement without the need to monitor at all times, and enters a sleep state after calculating the time synchronization calculation result. Therefore, after completing the corresponding computing task, that is, after calculating the time synchronization calculation result, the operation layer enters a sleep state, thereby greatly reducing power consumption.
[0083] As an optional implementation of the disclosure of the embodiments of the present invention, Figure 3 An optional schematic diagram of a time synchronization information processing architecture provided by an embodiment of the present invention is shown. The architecture may include a protocol layer and an operation layer.
[0084] Among them, the protocol layer may include: a time synchronization interface layer 11, a transport layer 12 and a data interface layer 13, wherein the time synchronization interface layer 11 is used to record and transmit time synchronization information, the transport layer 12 is used to package or unpack data packets, and the data interface layer 13 is used for data transmission.
[0085] The operation layer may include: a state machine 21, a data cache 22, an instruction cache 23, and an operation unit 24. Among them, the state machine 21 is used to control the time synchronization calculation process, the data cache 22 is used to cache corresponding time information, such as time synchronization information, time synchronization calculation results, etc., the instruction cache 23 is used to cache the instructions required in the time synchronization calculation process, and the operation unit 24 is used to calculate the time synchronization information based on the corresponding instructions, thereby obtaining the time synchronization calculation results.
[0086] Figure 4 The optional process of a time synchronization information processing method provided by an embodiment of the present invention is shown. The scheme can be the interaction between the protocol layer and the operation layer. Figure 3 The program may include:
[0087] Step S100: The protocol layer obtains time synchronization information;
[0088] The time synchronization information is information used to calculate the time synchronization calculation result. The time synchronization information may include a timestamp and time offset information corresponding to the timestamp, wherein the time offset information may include one or more of the following information: the time offset of the intra-domain host router, the frequency offset of the intra-domain host router, the inter-domain timestamp, the time offset of the time source host router, the frequency offset of the time source host router, etc. The time offset information corresponding to the intra-domain may be referred to as intra-domain time information, such as the time offset of the intra-domain host router, the frequency offset of the intra-domain host router, etc., and the time offset information corresponding to the inter-domain may be referred to as inter-domain time information, such as the inter-domain timestamp, the time offset of the time source host router, etc.
[0089] Among them, the timestamp is used to indicate the time corresponding to a specific object at a specific time. For example, the timestamp can indicate the moment when the UFP inserts the clock synchronization notification sequence (TSNOS, Time Sync Notification Ordered Set) in the time synchronization process, and records it with the time of the UFP at that moment as t1 as an example, or the moment when the UFP obtains the TSNOS request returned by the DFP, and records it with the time of the UFP at that moment as t4 as an example; for another example, the timestamp can indicate the moment when the DFP obtains the TSNOS request sent by the UFP in the time synchronization process, and records it with the time of the DFP at that moment as t2 as an example, or the moment when the DFP returns the TSNOS request, and records it with the time of the DFP at that moment as t3 as an example.
[0090] The time offset of the intra-domain host router (which can be recorded as TimeOffsetFromHR) can be understood as the corresponding time offset compared with the intra-domain host router; the frequency offset of the intra-domain host router (which can be recorded as FreqOffsetFromHR) can be understood as the corresponding frequency offset compared with the intra-domain host router; the inter-domain timestamp (which can be recorded as IDTimeStamp) can be understood as the timestamp between different time domains; the time offset of the time source host router (which can be recorded as TimeOffsetFromInterDomain) can be understood as the corresponding time offset compared with the time source host router; the frequency offset of the time source host router (which can be recorded as FreqOffsetFromInterDomain) can be understood as the corresponding frequency offset compared with the time source host router.
[0091] In an optional example, the protocol layer may obtain corresponding time synchronization information based on a handshake mechanism, thereby calculating time synchronization calculation results based on the time synchronization information, and further achieving time synchronization based on the time synchronization calculation results.
[0092] Step S110: The protocol layer transmits the acquired time synchronization information to the synchronous storage device;
[0093] The synchronous storage device is used to realize data transmission between the protocol layer and the operation layer; wherein the protocol layer can use the synchronous storage device to transmit time synchronization information to the operation layer, and the operation layer can use the synchronous storage device to transmit the calculated time synchronization calculation results to the protocol layer. In a specific example, reference Figure 5 An optional structural diagram of a synchronous storage device is shown, wherein the synchronous storage device may include a synchronization information register TIME_INFO and a calculation result register CAL_RESULT, wherein the synchronization information register TIME_INFO is used to synchronize time synchronization information, and the calculation result register is used to synchronize time synchronization calculation results; wherein the synchronization information register may also be referred to as a TIME_INFO register, and accordingly, the protocol layer may store time synchronization information such as timestamps (t1, t2, t3, and t4, etc.), intra-domain / inter-domain time information, etc. in the synchronization information register TIME_INFO.
[0094] in, Figure 5 The time parameter TIME_PARAM in the calculation process is used to provide parameters. Among them, TxTimeToWire is used for time compensation of the transmitted timestamp t1, and RxTimeToWire is used for time compensation of the received timestamp t4. FreqAvgConst: The IIR filter coefficient of the time frequency deviation; DelayAvgConst: The IIR filter coefficient of the time delay deviation; OffsetAvgConst: The IIR filter coefficient of the time displacement deviation; ErrorAvgConst: The IIR filter coefficient of the time error deviation. These are used for filtering calculations of the low-pass filter and are not described in detail in this invention.
[0095] In an optional example, the time synchronization information is further configured with a corresponding time information valid identifier, which is used to mark the validity of the time synchronization information; the time information valid identifier can be recorded as TIME_INFO_VAL, refer to Figure 5 The time information validity flag can be recorded in the TIME_VALID register of the synchronous storage device. Accordingly, when the time information validity flag indicates that the time synchronization information is valid, the protocol layer transmits the acquired time synchronization information to the synchronous storage device. In a specific example, when the time information validity flag TIME_INFO_VAL is 1, the time synchronization information is considered valid.
[0096] The time information validity flag may be stored in a synchronous storage device at the same time, for example, in a synchronization information register, so that the operation layer can determine whether the time synchronization information is valid based on the time information validity flag.
[0097] Continue to refer Figure 4 , step S120: the protocol layer sends a calculation request;
[0098] The operation request is used to wake up the operation layer so that the operation layer executes a corresponding wake-up process.
[0099] In an optional example, the operation request can be implemented based on the operation request signal CAL_REQ. Specifically, when sending the operation request, the operation request signal CAL_REQ can be pulled high, so that the operation layer can execute the wake-up process based on the operation request signal when the operation request signal is pulled high. Figure 5 , the operation request signal can be recorded in the CAL_REQ register of the synchronous memory device.
[0100] Continue to refer Figure 4 , step S130: the operation layer executes the wake-up process based on the operation request of the protocol layer;
[0101] Correspondingly, after the protocol layer sends the operation request, the operation layer may obtain the operation request of the operation layer and execute the wake-up process based on the operation request.
[0102] It should be noted that the operation layer executes the wake-up process based on the operation request, so that the operation layer can be woken up at any time based on the time synchronization requirement without the need for constant monitoring, thereby greatly reducing power consumption.
[0103] In addition, unlike the cumbersome communication process of the interrupt mechanism, the operation layer executes the corresponding process based on the wake-up mechanism, which can also simplify the communication process and further reduce power consumption.
[0104] In a specific example, when the operation request can be implemented based on the operation request signal CAL_REQ, the operation layer can execute the wake-up process and pull the operation request signal CAL_REQ low when the operation request signal CAL_REQ is pulled high.
[0105] Continue to refer Figure 4 , step S140: the computing layer obtains time synchronization information from the synchronous storage device;
[0106] After executing the wake-up process, the computing layer may obtain time synchronization information from the synchronous storage device, and thus may perform corresponding calculations based on the time synchronization information.
[0107] Specifically, when the synchronous storage device includes a TIME_INFO register and the time synchronization information is stored in the TIME_INFO register, the operation layer may obtain the time synchronization information from the TIME_INFO register.
[0108] It is understandable that when the operation layer obtains the time synchronization information, it may first confirm whether the time synchronization information is valid based on the time information validity identifier, and obtain the time synchronization information if the time synchronization information is valid.
[0109] Continue to refer Figure 4 , step S150: the computing layer calculates the time synchronization calculation result based on the time synchronization information;
[0110] Among them, the time synchronization calculation result may include time offset information used to correct time information, for example, it may include one or more of the time offset TimeOffsetFromHR of the intra-domain host router, the frequency offset FreqOffsetFromHR of the intra-domain host router, the inter-domain timestamp IDTimeStamp, the time offset TimeOffsetFromInterDomain of the time source host router, and the frequency offset FreqOffsetFromInterDomain of the time source host router.
[0111] The operation layer can call calculation instructions to calculate the time synchronization information, thereby obtaining the corresponding time synchronization calculation results. The calculation instructions can be stored in a preset storage device, such as an instruction cache SRAM, and the operation layer can obtain the corresponding instructions through the instruction cache.
[0112] It can be understood that based on the different time offsets corresponding to different ports, the time synchronization calculation results can be obtained based on multiple time synchronization information. In some specific examples, the time synchronization information used to calculate the time synchronization calculation results can be 2, one can be the time synchronization information of the previous transmission, and the other can be the time synchronization information of the next transmission. In the specific data transmission process, the time synchronization information can be stored indiscriminately in the synchronous storage device, and the corresponding operation request can be sent, and the operation layer performs the corresponding calculation based on the pre-configured calculation mechanism.
[0113] In the process of transmitting time synchronization information twice, the operation layer determines whether to perform the calculation of the time synchronization information based on the records in the data cache. Specifically, it determines whether the previous time synchronization information recorded in the data cache is valid data. If it is determined that the previous time synchronization information recorded in the data cache is invalid data, the time synchronization information obtained this time is saved in the data cache. If the previous time synchronization information recorded in the data cache is valid data, the time synchronization calculation result is calculated based on the previous time synchronization information in the data cache (i.e., the time synchronization information transmitted for the first time) and the time synchronization information obtained this time (i.e., the time synchronization information transmitted for the second time).
[0114] In some optional examples, whether the time synchronization information is valid data can be determined based on the data in the time synchronization information. Specifically, after the time synchronization calculation result is calculated, the time synchronization information stored in the data cache can be cleared. Accordingly, in the specific process, when the last stored time synchronization information is non-zero, the time synchronization information is considered valid data; when the last stored time synchronization information is zero, the time synchronization information is considered invalid data.
[0115] Alternatively, whether the time synchronization information is valid data can be determined based on a time information validity flag. Specifically, after the calculation of the time synchronization calculation result is performed, the time information validity flag of the time synchronization information stored in the data cache can be marked as "invalid" (for example, "0"). Accordingly, in a specific process, when the time information validity flag indicates that the last stored time synchronization information is valid, the time synchronization information is considered to be valid data; when the time information validity flag indicates that the last stored time synchronization information is invalid, the time synchronization information is considered to be invalid data.
[0116] In a specific example, the operation layer can call a judgment jump instruction and a calculation instruction from the instruction cache, wherein the judgment jump instruction is used to determine whether the previous time synchronization information stored in the current data cache is valid data. If not, the time synchronization information obtained this time can be stored in the data cache, and at the same time, the operation module jumps to the end operation address and executes the end operation instruction. If so, the calculation module of the operation layer can perform calculations based on the calculation instruction, the previous time synchronization information in the data cache, and the currently obtained time synchronization information to obtain the time synchronization calculation result.
[0117] It can be understood that after the time synchronization calculation results are calculated at the operation layer, the time synchronization information stored in the data cache can be configured as invalid data, for example, the time information validity identifier of the time synchronization information stored in the data cache can be marked as "invalid", or the time synchronization information stored in the data cache can be cleared to avoid the time synchronization information stored in the data cache from entering the next round of calculation.
[0118] It can be understood that the above-mentioned calculation process of time synchronization information simplifies the execution process of the program while meeting the protocol requirements in the embodiment of the present invention.
[0119] In an optional example, during the calculation process of the operation layer, each step of the calculation can be filtered to filter out abnormal calculation structures and obtain more accurate time synchronization calculation results, thereby improving the signal accuracy of the time synchronization calculation results. The corresponding filter coefficients can be referred to Figure 5 The time parameters stored in the synchronization storage device are shown.
[0120] Continue to refer Figure 4 , step S160: the computing layer transmits the time synchronization calculation result to the synchronous storage device;
[0121] After the time synchronization calculation result is obtained by calculation, the time synchronization calculation result is transmitted to a synchronous storage device to synchronize the time synchronization calculation result to the protocol layer.
[0122] Specifically, the operation layer may transmit the time synchronization calculation result to the calculation result register CAL_RESULT of the synchronous storage device, so that the protocol layer obtains the corresponding time synchronization calculation result from the synchronous storage device.
[0123] In a specific example, refer to Figure 5 After the time synchronization calculation result is transmitted to the calculation result register of the synchronous storage device, the calculation result valid identifier CAL_VALID can be marked as valid, for example, CAL_VALID can be set to 1, thereby indicating that the time synchronization calculation result here is valid. Among them, the calculation result valid identifier CAL_VALID can be recorded in the synchronous storage device. It should be noted that when the operation layer obtains the operation request of the protocol layer, the calculation result valid identifier can be marked as invalid, so that the operation layer performs a new round of calculation. Specifically, when the operation request is obtained, that is, when the operation request identifier CAL_REQ is pulled high, the calculation result valid identifier CAL_VALID can be pulled low to indicate that the result at this time is invalid.
[0124] Continue to refer Figure 4 , step S170: the computing layer enters a dormant state;
[0125] After transmitting the time synchronization calculation result to the synchronous storage device, the operation layer can enter a dormant state and wait for the next process. In a specific example, the operation layer can first pull down the operation request signal CAL_REQ and then enter a dormant state until the next operation request signal CAL_REQ is pulled up again.
[0126] Step S180: The protocol layer obtains the time synchronization calculation result from the synchronous storage device;
[0127] Specifically, when the calculation result is marked as valid, the protocol layer may obtain the time synchronization calculation result from the synchronous storage device.
[0128] After obtaining the time synchronization calculation result, time synchronization of the uplink port can be performed based on the time synchronization calculation result. In a further optional example, the time synchronization information processing method can perform multiple calculations based on time synchronization information at different times. When the calculation result tends to be stable, the calculation result is considered to be the final result, and time synchronization can be performed based on the final result, i.e., time synchronization is successful. When the time synchronization result is successful, the time synchronization information processing solution of the embodiment of the present invention can still be executed, thereby performing real-time synchronization and calculation according to the configured synchronization frequency.
[0129] It is understandable that by processing time synchronization information based on a wake-up mechanism, the computing layer is awakened when time synchronization information is available (that is, when time synchronization is required), allowing the computing layer to wake up at any time based on time synchronization requirements without the need for constant monitoring. After calculating the time synchronization results, the computing layer enters a dormant state, allowing it to enter a dormant state upon completion of the corresponding computing task, thereby significantly reducing power consumption. Furthermore, the time synchronization information processing method described in the embodiment of the present invention is simple and effective, and compared to the interrupt method, it enhances the response speed of the computing layer to the protocol layer.
[0130] At the same time, the calculation method of the operation layer provided in the embodiment of the present invention is simple and practical, and the corresponding hardware used to implement the processing flow of the operation layer can be an MCU or an accelerator, thereby reducing the requirements on the hardware.
[0131] In an optional example, the protocol layer can obtain the corresponding time synchronization information based on the handshake mechanism. For details, refer to Figure 6 The handshake flow chart of the upstream port and the downstream port according to an embodiment of the present invention is shown. The handshake flow may include:
[0132] Step S200: The data interface layer in the protocol layer of the uplink port issues a first notification request (for example, a TSNOS request), and the time synchronization interface layer records first time information corresponding to the moment when the first notification request is issued;
[0133] The first notification request may be a TSNOS request, which may be understood as one of many TSNOS requests. In this embodiment, the first notification request, the second notification request, etc. are used to distinguish TSNOS requests corresponding to different moments.
[0134] When starting the handshake process, the upstream port can issue a TSNOS request and raise a handshake initiation request signal (handshake int). At this time, the upstream port records the corresponding handshake steps. Specifically, a handshake counter can be configured in the upstream port. Each time a handshake initiation request signal is raised, the corresponding handshake counter is increased by 1, thereby recording the handshake steps between the upstream port and the downstream port.
[0135] Specifically, step S200 may include the following process: the time synchronization interface layer initiates a first notification request and notifies the data interface layer to issue a first notification request; the data interface layer issues the first notification request and notifies the time synchronization interface layer that the first notification request has been issued; when the time synchronization interface layer learns that the first notification request has been issued, it records the first time information corresponding to the current moment.
[0136] Among them, compared with some existing solutions for sampling time information through the data interface layer, the embodiment of the present invention separates the sampling of time information such as timestamps from the data interface layer, records the first time information through the time synchronization interface layer, and samples the corresponding time information, so that the sampling and recording of time information used for time synchronization can be completed in one module, which can reduce the transmission of time information between modules and reduce the frequency of information interaction between modules.
[0137] In an optional example, the protocol layer of the uplink port can perform corresponding process control based on the flag signal. Specifically, when the time synchronization interface layer initiates a first notification request and notifies the data interface layer to issue the first notification request, the initiation request flag signal TSNOS_SEND can be pulled up to notify the data interface layer in the protocol layer to issue the TSNOS request; when the data interface layer determines that TSNOS_SEND is pulled up, it can issue the first notification request. The specific process can be, for example, that the data interface layer inserts TSNOS after the current data packet is transmitted and issues a TSNOS request (the TSNOS request at this time is the first notification request); accordingly, the data interface layer notifies the time synchronization interface layer that the first notification request has been issued, and can pull up the initiation request feedback flag signal TSNOS_SEND_ACK to notify the time synchronization interface layer that the TSNOS request has been issued; when the time synchronization interface layer determines that TSNOS_SEND_ACK is pulled up, it believes that the first notification request has been issued, and at this time, records the first time information corresponding to the current moment.
[0138] The first time information can be understood as the time synchronization information corresponding to the time synchronization information at that moment, such as the timestamp and the time offset information corresponding to the timestamp. It should be noted that the corresponding timestamp at this moment is t1, and the corresponding time offset information is the time offset information corresponding to timestamp t1 on the uplink port. At this moment, because the first handshake has not yet been completed, the protocol layer of the uplink port marks the time information validity flag as "invalid."
[0139] Step S210: The downlink port receives the first notification request and records second time information corresponding to the moment of receiving the first notification request;
[0140] The downlink port may be a host, and accordingly, the host may record the second time information based on a routing module therein. In an optional example, the downlink port includes a protocol layer having the same structure as the uplink port provided in an embodiment of the present invention, and the corresponding second time information may be recorded using a time synchronization interface layer in the protocol layer.
[0141] Specifically, step S210 may include the following process: the data interface layer receives the first notification request and notifies the time synchronization interface layer that the first notification request has been received; when the time synchronization interface layer learns that the first notification request has been received, it records the second time information corresponding to the current moment.
[0142] In an optional example, the protocol layer of the downstream port can perform corresponding process control based on the flag signal. Specifically, when the data interface layer in the protocol layer of the downstream port receives the TSNOS request (the TSNOS request at this time is the first notification request) issued by the upstream port and notifies the time synchronization interface layer that the TSNOS request (the TSNOS request at this time is the first notification request) is received, the receiving request identification signal TSNOS_RECV can be pulled up to notify the time synchronization interface layer that the TSNOS request (the TSNOS request at this time is the first notification request) is received; when the time synchronization interface layer determines that TSNOS_RECV is pulled up, it believes that the first notification request has been received, and at this time, the second time information corresponding to the current moment is recorded.
[0143] The second time information can be understood as the time synchronization information corresponding to the time synchronization information at that moment, such as a timestamp and a time offset information corresponding to the timestamp. It should be noted that the corresponding timestamp at this moment is t2, and the corresponding time offset information is the time offset information corresponding to timestamp t2 on the uplink port.
[0144] Step S220: The downlink port feeds back a second notification request and records third time information corresponding to the moment when the second notification request is issued;
[0145] After receiving the TSNOS request from the upstream port, the downstream port will also feedback handshake information to the upstream port. If the downstream port includes a protocol layer with the same structure as the upstream port provided in the embodiment of the present invention, the data interface layer in the protocol layer of the downstream port will feedback a second notification request after receiving the first notification request from the upstream port, and the time synchronization interface layer will record third time information corresponding to the moment when the second notification request was issued.
[0146] The second notification request is a TSNOS request, which can be understood as one of many TSNOS requests. In this embodiment, the first notification request, the second notification request, etc. are used to distinguish TSNOS requests corresponding to different time periods.
[0147] Specifically, step S220 may include the following process: the time synchronization interface layer initiates a second notification request and notifies the data interface layer to issue a second notification request; the data interface layer issues the second notification request and notifies the time synchronization interface layer that the second notification request has been issued; when the time synchronization interface layer learns that the second notification request has been issued, it records the third time information corresponding to the current moment.
[0148] In an optional example, the protocol layer of the downstream port can perform corresponding process control based on the flag signal. Specifically, when the time synchronization interface layer initiates a second notification request and notifies the data interface layer to issue the second notification request, the initiation request flag signal TSNOS_SEND can be pulled up to notify the data interface layer in the protocol layer to issue the TSNOS request; when the data interface layer determines that TSNOS_SEND is pulled up, it can issue the second notification request. The specific process can be, for example, that the data interface layer inserts TSNOS after the current data packet is transmitted and issues a TSNOS request (the TSNOS request at this time is the second notification request); accordingly, the data interface layer notifies the time synchronization interface layer that the second notification request has been issued, and can pull up the initiation request feedback flag signal TSNOS_SEND_ACK to notify the time synchronization interface layer that the TSNOS request has been issued; when the time synchronization interface layer determines that TSNOS_SEND_ACK is pulled up, it believes that the second notification request has been issued, and at this time, records the third time information corresponding to the current moment.
[0149] The third time information may be understood as the time synchronization information corresponding to the time synchronization information at that moment, such as a timestamp and a time offset information corresponding to the timestamp. It should be noted that the corresponding timestamp at this moment is t3, and the corresponding time offset information is the time offset information corresponding to timestamp t3 on the uplink port.
[0150] Step S230: The data interface layer in the protocol layer of the uplink port receives the second notification request, and the time synchronization interface layer records fourth time information corresponding to the moment of receiving the second notification request;
[0151] It is understandable that, after the downlink port feeds back the handshake information to the uplink port, the uplink port may receive the second notification request and record fourth time information corresponding to the moment of receiving the second notification request.
[0152] In an optional example, step S230 may include the following process: the data interface layer receives the second notification request and notifies the time synchronization interface layer that the second notification request has been received; when the time synchronization interface layer learns that the second notification request has been received, it records the fourth time information corresponding to the current moment.
[0153] In an optional example, the protocol layer of the uplink port can perform corresponding process control based on the flag signal. Specifically, when the data interface layer in the protocol layer of the uplink port receives the TSNOS request (the TSNOS request at this time is the second notification request) issued by the uplink port and notifies the time synchronization interface layer that the TSNOS request (the TSNOS request at this time is the second notification request) has been received, the receiving request identification signal TSNOS_RECV can be pulled up to notify the time synchronization interface layer that the TSNOS request (the TSNOS request at this time is the second notification request) has been received; when the time synchronization interface layer determines that TSNOS_RECV is pulled up, it believes that the second notification request has been received, and at this time, the fourth time information corresponding to the current moment is recorded.
[0154] The fourth time information may be understood as the time synchronization information corresponding to the time synchronization information at that moment, such as a timestamp and a time offset information corresponding to the timestamp. It should be noted that the corresponding timestamp at this moment is t4, and the corresponding time offset information is the time offset information corresponding to timestamp t4 on the uplink port.
[0155] Step S240: The downlink port sends a time data packet, where the time data packet includes the second time information and the third time information recorded by the downlink port;
[0156] After the corresponding time information is recorded, the downstream port can also send its recorded second time information and third time information to the upstream port through a time data packet, so that the upstream port can determine the complete time synchronization information in combination with its own recorded first time information and fourth time information.
[0157] Correspondingly, the upstream port may receive the time data packet from the downstream port, and obtain the second time information and the third time information recorded by the downstream port.
[0158] Step S250: The uplink port determines time synchronization information, where the time synchronization information includes the first time information, the second time information, the third time information, and the fourth time information.
[0159] After receiving the time data packet, the uplink port may determine the time synchronization information by combining the second time information and the third time information in the time data packet and the first time information and the fourth time information recorded by the uplink port itself.
[0160] It should be noted that, in this embodiment, after receiving the time data packet from the downlink port, the time synchronization information can also be determined. Specifically, the protocol layer can also include delay compensation registers (TxTimeToWire and RxTimeToWire). The delay compensation registers can be used to determine the time synchronization information. Based on the protocol provisions, the delay compensation registers can be used to compensate for the delay of the obtained first time information, second time information, third time information, and fourth time information, thereby compensating for the delay in time sampling. It can be understood that, in the embodiment of the present invention, the time synchronization interface layer is used to record the time synchronization information, so that the delay from the time point of receiving the TSNOS request and sending the TSNOS request to the time point of sampling the TSNOS request in the protocol layer is fixed, so that delay compensation can be performed based on the protocol provisions to accurately obtain the corresponding time synchronization information.
[0161] It is understood that after the handshake is completed, the downstream port can mark the time information validity flag of the acquired time synchronization information as valid. Specifically, the downstream port can raise the handshake end signal handshake_end to indicate the end of the handshake. At the same time, based on the handshake end signal, the protocol layer of the downstream port can also mark the time information validity flag as "valid" (for example, set to "1"). Timestamp and time offset information, such as intra-domain time information and inter-domain time information, are all saved in the TIME_INFO register.
[0162] It should be noted that in some specific examples, the calculation module needs to perform time and frequency deviation calculations with a certain step size. Accordingly, the sending of calculation requests can be controlled based on the record of the handshake step number. Specifically, the calculation request can be sent when the handshake step number recorded by the handshake counter reaches a preset value. In an optional example, taking the step size as w, the preset values can be set to 1 and w+1. Therefore, when the handshake counter is 1, the calculation request is sent when the time synchronization information of the corresponding first handshake is synchronized to the synchronous storage device. At this time, the previous time synchronization information stored in the data cache of the calculation layer is invalid data. Therefore, the calculation layer saves the time synchronization information of the corresponding first handshake to the data cache and marks the time synchronization information as valid data. When the handshake counter counts to w+1 and the handshake interval reaches w times, the protocol layer can send a calculation request, causing the calculation layer to perform the corresponding calculation based on the time synchronization information. Based on the fact that the valid data of the previous time synchronization information has been stored in the aforementioned process, the calculation layer can calculate the time synchronization calculation result based on the current time synchronization information and the previous time synchronization information.
[0163] It should be noted that before executing the corresponding handshake process, the transmission link can be started and configured based on preset parameters. Specifically, a connection management (ConnectionManager) module can be further configured in the uplink port and / or downlink port, and a capability register (capability register) can be further configured in the operation layer corresponding to the uplink port and / or downlink port. The connection management module can configure the capability register of the operation layer according to different application scenarios, so that the time synchronization interface layer can select different handshake methods according to different modes and update the corresponding parameters. Among them, after the configuration of the connection management module is completed, the corresponding handshake process can be started.
[0164] It can be understood that in the embodiment of the present invention, the sampling of time information such as timestamps is separated from the data interface layer, and the corresponding time information is recorded and sampled through the time synchronization interface layer, so that the sampling and recording of time information used for time synchronization can be completed in one module, which can reduce the transmission of time information between modules and reduce the frequency of information interaction between modules.
[0165] At the same time, in an embodiment of the present invention, the time synchronization interface layer is used to record time synchronization information, so that the delay from the time point of receiving the TSNOS request and sending the TSNOS request in the protocol layer to the time point of sampling the TSNOS request remains fixed, so that delay compensation can be performed based on the protocol regulations to accurately obtain the corresponding time synchronization information.
[0166] In an optional example, a configuration process of the operation layer is also provided, wherein the configuration process is used to configure the operation layer when the operation layer is started, so as to load instructions into the operation layer. For details, refer to Figure 7 The configuration flow chart of the computing layer provided by an embodiment of the present invention is shown. The configuration flow chart may include:
[0167] Step S300: The computing layer loads instructions into the instruction cache;
[0168] Among them, the instructions may include the aforementioned jump instructions and operation instructions. In the initial state, the instructions are stored in the read-only memory ROM. During the startup phase of the operation layer, the reset signal is pulled low, and the corresponding instructions can be loaded from the read-only memory to the instruction cache.
[0169] During the instruction loading process, the read flag signal rom_read of the read-only memory can be set to 1, and the address rom_addr of the read-only memory is addressed in the form of a base address and an address offset, thereby determining the storage location of the instruction, and then reading the instruction based on the address.
[0170] The instruction data read back can be rom_read_data. After the instruction is read, it can be stored in the instruction cache (which can be understood as an SRAM). The instruction cache write flag signal sram_write can be set to 1, the instruction cache address sram_addr can be an address offset starting from 0, and the write data sram_write_data written to the instruction cache is the data read from the read-only memory. After the instruction cache is successfully loaded, the instruction load completion signal sram_load_done is set to 1, indicating that the instruction has been loaded.
[0171] Step S300: The computing layer performs dynamic clock management based on the computing request;
[0172] Among them, after the instruction loading completion signal Sram_load_done is set to 1, the operation layer can start dynamic clock management. At the same time, the operation layer can obtain the instruction sram_read_data through the address sram_addr of the instruction in the instruction cache and the read flag signal sram_read in the instruction cache.
[0173] In an optional example, the operation layer performs state control of the operation layer based on dynamic clock management as follows: when an operation request is received (i.e., CAL_REQ=1), the main clock of the operation layer is turned on to enable the operation layer to enter the operation process, that is, the specific operation process is determined according to the called instruction, and after the operation process is completed, the configuration operation request (i.e., pulling down the operation request signal CAL_REQ=0) is invalid, then the main clock of the operation layer is turned off, and the operation layer is then in a sleep state.
[0174] In a specific example, the operation layer can obtain instructions through the instruction cache and make corresponding instruction calls. The instruction sram_read_data is obtained through the instruction cache SRAM address sram_addr and the instruction cache SRAM read flag signal sram_read. The first instruction obtained from the instruction cache SRAM is a judgment jump instruction to determine whether the previous time synchronization information recorded in the current data cache is valid data. If not, the state machine stores TIME_INFO in the data cache, jumps to the end operation address, and runs the end operation instruction. The state machine is cleared and the operation request signal CAL_REQ is set to 0. If yes, the state machine continues to call the next operation instruction until the operation is completed. After that, the end operation instruction is run. The operation request signal CAL_REQ is set to 0, CAL_VALID is set to 1, and the calculation result is written back to CAL_RESULT to end the operation.
[0175] It can be seen that the operation layer in the embodiment of the present invention is an instruction-based algorithm accelerator, which can provide more friendly software and hardware collaboration and facilitate algorithm updating and maintenance.
[0176] It is understandable that as interfaces in the field of consumer electronics tend to be unified, various applications and devices have supported interfaces, and the introduction of the USB4 protocol has further solved the problem of interface unification. Among them, the USB4 system uses the host router as the top-level reference time to determine the real-time clock of the entire time domain. Clock synchronization is achieved through the exchange of ordered sets (TSNOS) and time information synchronization packets (i.e., time data packets), in which the downstream device uses the local timestamp and the time information in the time information synchronization packet to adjust the clock to the time of the host router. In the USB4 system, the slave router needs to calculate the time, time offset and frequency offset of the host router according to the time synchronization protocol. It is understandable that since the USB4 protocol supports the video output protocol (DisplayPort protocol), the requirements for time synchronization accuracy are further improved, and the original mechanism used for precise time measurement (PTM) can no longer meet the requirements. The embodiment of the present invention provides a time synchronization information processing solution that can reduce power consumption while meeting the time synchronization accuracy.
[0177] The above describes multiple embodiment schemes provided by the embodiments of the present invention. The various optional methods introduced in each embodiment scheme can be combined and cross-referenced with each other without conflict, thereby extending a variety of possible embodiment schemes, which can all be considered as embodiment schemes disclosed and open in the embodiments of the present invention.
[0178] Although the embodiments of the present invention are disclosed above, the present invention is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention should be based on the scope defined by the claims.
Claims
1. A time synchronization information processing method, characterized in that: Applied to the protocol layer, including: Acquire time synchronization information, where the time synchronization information indicates that there is a time synchronization requirement and includes a timestamp and time offset information corresponding to the timestamp; The acquired time synchronization information is transmitted to a synchronous storage device, wherein the synchronous storage device is used to realize data transmission between the protocol layer and the operation layer; Sending a calculation request, where the calculation request is used to wake up the calculation layer, so that the calculation layer obtains time synchronization information from the synchronous storage device, calculates a time synchronization calculation result based on the time synchronization information, and transmits the time synchronization calculation result to the synchronous storage device; Obtaining the time synchronization calculation result from the synchronous storage device; The operation layer enters a dormant state after calculating the result of the calculation time synchronization.
2. The time synchronization information processing method according to claim 1, characterized in that: In the step of obtaining time synchronization information, the time synchronization information is obtained based on a handshake mechanism.
3. The time synchronization information processing method according to claim 2, characterized in that: The protocol layer is a protocol layer of an uplink port, and the protocol layer includes a data interface layer and a time synchronization interface layer. The acquiring of time synchronization information based on a handshake mechanism includes: The data interface layer issues a first notification request, and the time synchronization interface layer records first time information corresponding to the moment when the first notification request is issued; The data interface layer receives the second notification request, and the time synchronization interface layer records fourth time information corresponding to the moment of receiving the second notification request; Receive a time data packet from a downstream port, and obtain the second time information and the third time information recorded by the downstream port; Time synchronization information is determined, where the time synchronization information includes the first time information, the second time information, the third time information, and the fourth time information.
4. The time synchronization information processing method according to claim 3, characterized in that: The data interface layer issues a first notification request, and the time synchronization interface layer records first time information corresponding to the moment when the first notification request is issued, including: The time synchronization interface layer initiates a first notification request, notifying the data interface layer to issue the first notification request; The data interface layer issues the first notification request and notifies the time synchronization interface layer that the first notification request has been issued; When the time synchronization interface layer learns that the first notification request has been issued, the time synchronization interface layer records the first time information corresponding to the current moment.
5. The time synchronization information processing method according to claim 3, characterized in that: The data interface layer receives the second notification request, and the time synchronization interface layer records fourth time information corresponding to the moment of receiving the second notification request, including: The data interface layer receives the second notification request, and notifies the time synchronization interface layer that the second notification request has been received; When the time synchronization interface layer learns that the second notification request has been received, the time synchronization interface layer records fourth time information corresponding to the current moment.
6. The time synchronization information processing method according to claim 3, characterized in that: The determining of the time synchronization information specifically involves performing delay compensation on the obtained first time information, second time information, third time information, and fourth time information based on protocol provisions to obtain the time synchronization information.
7. The time synchronization information processing method according to claim 2, characterized in that: In the step of obtaining time synchronization information based on the handshake mechanism, the number of handshake steps is also recorded; In the step of sending the operation request, the operation request is sent when the number of handshake steps is a preset value.
8. The time synchronization information processing method according to claim 1, characterized in that: The time synchronization information is further configured with a corresponding time information valid identifier, and the time information valid identifier is used to mark the validity of the time synchronization information; In the step of transmitting the acquired time synchronization information to the synchronous storage device, when the time information validity identifier indicates that the time synchronization information is valid, the acquired time synchronization information is transmitted to the synchronous storage device.
9. The time synchronization information processing method according to claim 2, characterized in that: In the step of acquiring the time synchronization information based on the handshake mechanism, at the end of the handshake, the time information validity identifier of the acquired time synchronization information is marked as valid.
10. The time synchronization information processing method according to claim 1, characterized in that: The time synchronization information includes a timestamp and time offset information corresponding to the timestamp, and the time offset information includes one or more of the time offset of the intra-domain host router, the frequency offset of the intra-domain host router, the inter-domain timestamp, the time offset of the time source host router, and the frequency offset of the time source host router.
11. The time synchronization information processing method according to claim 1, wherein: The synchronous storage device includes a synchronization information register and a calculation result register, the synchronization information register is used to synchronize time synchronization information, and the calculation result register is used to synchronize time synchronization calculation results.
12. The time synchronization information processing method according to claim 1, wherein: The sending of the operation request includes: pulling up the operation request signal, so that the operation layer executes the wake-up process and pulls down the operation request signal when the operation request signal is pulled up.
13. A time synchronization information processing method, characterized in that: Applied to the computing layer, including: Get the operation request of the protocol layer; Executing a wake-up process based on the operation request of the protocol layer; After executing the wake-up process, obtaining time synchronization information from the synchronous storage device; wherein the time synchronization information indicates that there is a time synchronization requirement and includes a timestamp and time offset information corresponding to the timestamp, and the synchronous storage device is used to implement data transmission between the protocol layer and the operation layer; Calculating a time synchronization calculation result based on the time synchronization information; Transmitting the time synchronization calculation result to a synchronous storage device; After transmitting the time synchronization calculation result to the synchronous storage device, the system enters a dormant state.
14. The time synchronization information processing method according to claim 13, characterized in that: The calculating a time synchronization calculation result based on the time synchronization information includes: Call judgment jump instructions and calculation instructions; Based on the judgment jump instruction, determining whether the last time synchronization information stored in the current data cache is valid data; If not, the time synchronization information obtained this time is stored in the data cache, and the end operation instruction is executed; If so, calculation is performed based on the calculation instruction, the previous time synchronization information in the data cache, and the time synchronization information obtained this time to obtain a time synchronization calculation result.
15. The time synchronization information processing method according to claim 14, characterized in that: The determination of whether the last time synchronization information stored in the current data cache is valid data is specifically as follows: Determine whether the last time synchronization information recorded in the data cache is valid data based on the data of the time synchronization information; wherein, when the last time synchronization information is non-zero, the time synchronization information is considered to be valid data; when the last time synchronization information is zero, the time synchronization information is considered to be invalid data; After the step of calculating the time synchronization calculation result based on the time synchronization information, the method further includes: clearing the time information of the time synchronization information stored in the data cache.
16. The time synchronization information processing method according to claim 14, characterized in that: The determination of whether the last time synchronization information stored in the current data cache is valid data is specifically as follows: Determine whether the last time synchronization information recorded in the data cache is valid data based on the time information valid identifier; wherein, when the time information valid identifier indicates that the last time synchronization information stored is valid, the time synchronization information is valid data; when the time information valid identifier indicates that the last time synchronization information stored is invalid, the time synchronization information is invalid data; After the step of calculating the time synchronization calculation result based on the time synchronization information, the method further includes: marking the time information validity flag of the time synchronization information stored in the data cache as invalid.
17. The time synchronization information processing method according to claim 14, characterized in that: The execution end operation instruction is specifically: pulling down the operation request signal and entering the sleep state.
18. The time synchronization information processing method according to claim 13, characterized in that: After the step of calculating the time synchronization calculation result based on the time synchronization information, the method further includes: The signal of the time synchronization calculation result is filtered.
19. The time synchronization information processing method according to claim 13, characterized in that: The obtaining of the operation request of the protocol layer is specifically detecting a high operation request signal.
20. The time synchronization information processing method according to claim 13, characterized in that: Before obtaining the operation request of the protocol layer and executing the wake-up process, the method further includes: The operation layer is configured to load instructions into the operation layer, where the instructions at least include jump instructions and operation instructions.
21. The time synchronization information processing method according to claim 20, characterized in that: The configuring the computing layer includes: Loading instructions into the instruction cache, the instructions at least including jump instructions and operation instructions; Dynamic clock management is performed based on the operation request; wherein, the dynamic clock management is used to turn on the main clock when the operation request is received, so that the operation layer enters the operation process, and turn off the main clock after the operation process ends, so that the operation layer enters the sleep state.
22. The time synchronization information processing method according to claim 13, characterized in that: The transmitting the time synchronization calculation result to the synchronous storage device is specifically transmitting the time synchronization calculation result to a calculation result register of the synchronous storage device.
23. A time synchronization information processing architecture, characterized in that: Includes protocol layer and operation layer; The protocol layer includes: a time synchronization interface layer, a transport layer and a data interface layer; the operation layer includes: a state machine, a data cache, an instruction cache and an operation unit; The protocol layer is used to execute the time synchronization information processing method according to any one of claims 1 to 12; The operation layer is used to execute the time synchronization information processing method according to any one of claims 13 to 22.
Citation Information
Patent Citations
Microprocessor and method of synchronously processing core in same
CN104216861A
Synchronous method and device for dormancy awakening
CN105451311A