Clock control circuit, clock control method, and clock control device

The clock control circuit addresses high power consumption in CPUs and GPUs by switching to a lower frequency during voltage droop, using a trained delay parameter to prevent overlapping pulses and reduce power usage.

WO2026026598A1PCT designated stage Publication Date: 2026-02-05SMARTER SILICON (SHANGHAI) TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/109750
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-07-31
Filing Date
2025-07-22
Publication Date
2026-02-05

AI Technical Summary

Technical Problem

High-performance processing modules like CPUs and GPUs are sensitive to power consumption, and voltage droop after clock gating or power gating leads to short current spikes, resulting in high system power consumption.

Method used

A clock control circuit with a delay control module and a switch signal generation module that switches the system clock from a high-frequency to a low-frequency state when voltage droop is detected, using a trained target delay parameter to ensure pulses of the clock signals do not overlap, thereby reducing power consumption.

Benefits of technology

The solution effectively reduces system power consumption by switching the system clock to a lower frequency during voltage droop, preventing excessive power consumption and extending transistor lifetime.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025109750_05022026_PF_FP_ABST
    Figure CN2025109750_05022026_PF_FP_ABST
Patent Text Reader

Abstract

A clock control circuit configured to control a system clock includes a delay control module and a switch signal generation module. The delay control module is configured to receive a clock control signal and perform delay processing on the clock control signal to obtain a first clock signal. The delay processing is performed on the clock control signal using a target delay parameter. The switch signal generation module is configured to generate a clock switch signal of a first state based on the clock control signal and the first clock signal. The clock switch signal of the first state is used to switch the system clock from a first clock to a second clock, and a frequency of the second clock is less than a frequency of the first clock.
Need to check novelty before this filing date? Find Prior Art

Description

CLOCK CONTROL CIRCUIT, CLOCK CONTROL METHOD, AND CLOCK CONTROL DEVICECROSS-REFERENCES TO RELATED APPLICATION

[0001] This application claims priority to Chinese Patent Application No. 202411047919.6 filed on July 31, 2024, the entire content of which is incorporated herein by reference.TECHNICAL FIELD

[0002] The present disclosure generally relates to the communication field and, more particularly, to a clock control circuit, a clock control method, and a clock control device.BACKGROUND

[0003] High-performance processing modules, such as central processing units (CPU) or graphics processing units (GPU) , are relatively sensitive to power consumption. The power consumption is usually saved with clock gating (clk gating) or power gating (power gating) .

[0004] However, after a signal passes through clock gating (clk gating) or power gating (power gating) , voltage droop is prone to occur. A short current spike is generated when the voltage droop occurs. The short spike leads to relatively high system power consumption.SUMMARY

[0005] Embodiments of the present disclosure provide a clock control circuit configured to control a system clock, including a delay control module and a switch signal generation module. The delay control module is configured to receive a clock control signal and perform delay processing on the clock control signal to obtain a first clock signal. The delay processing is performed on the clock control signal using a target delay parameter. The switch signal generation module is configured to generate a clock switch signal of a first state based on the clock control signal and the first clock signal. The clock switch signal of the first state is used to switch the system clock from a first clock to a second clock, and a frequency of the second clock is less than a frequency of the first clock.

[0006] Embodiments of the present disclosure provide a clock control method. The method includes obtaining a clock control signal, performing delay processing on the clock control signal using a target delay parameter to obtain a first clock signal, generating a clock switch signal of a first state based on the clock control signal and the first clock signal, generating a reset signal after detecting that the clock switch signal of the first state lasts for a preset time, controlling the clock switch signal to reset to a second state based on the reset signal, switching the system clock from the second clock to the first clock, and obtaining the target delay parameter through training. The clock switch signal of the first state is used to switch a system clock from a first clock to a second clock, and a frequency of the second clock is less than a frequency of the first clock. The training includes adjusting a delay parameter by using the clock switch signal as a feedback signal until the clock switch signal switches from the second state to the first state, and saving a previous delay parameter of a current delay parameter as the target delay parameter. Under the current delay parameter, a pulse of the clock control signal and a pulse of the first clock signal overlap in time, and under the target delay parameter, the pulse of the clock control signal and the pulse of the first clock signal do not overlap in time

[0007] Embodiments of the present disclosure provide a clock control device, including one or more processors and one or more memories. The one or more memories store a computer program that, when executed by the one or more processors, causes the one or more processors to obtain a clock control signal, perform delay processing on the clock control signal using a target delay parameter to obtain a first clock signal, and generate a clock switch signal of a first state based on the clock control signal and the first clock signal. The clock switch signal of the first state is used to switch a system clock to a target clock.BRIEF DESCRIPTION OF THE DRAWINGS

[0008] FIG. 1 illustrates a schematic structural diagram of a clock control circuit according to embodiments of the present disclosure.

[0009] FIG. 2 illustrates a schematic diagram of a relationship between a clock control signal and a first clock signal passing through a delay module at different times according to embodiments of the present disclosure.

[0010] FIG. 3 illustrates a schematic internal structural diagram of a delay module in a delay control module according to embodiments of the present disclosure.

[0011] FIG. 4 illustrates a schematic structural diagram of a delay control module according to embodiments of the present disclosure.

[0012] FIG. 5 illustrates a schematic structural diagram of a clock control circuit according to embodiments of the present disclosure.

[0013] FIG. 6 illustrates a schematic structural diagram of a pulse-to-level circuit according to embodiments of the present disclosure.

[0014] FIG. 7 illustrates a schematic structural diagram of a reset generation circuit according to embodiments of the present disclosure.

[0015] FIG. 8 illustrates a schematic complete circuit structural diagram of a clock control circuit according to embodiments of the present disclosure.

[0016] FIG. 9 illustrates a schematic time sequence diagram of a process of a configuration module adjusting a configuration value of a configuration register according to embodiments of the present disclosure.

[0017] FIG. 10 illustrates a schematic time sequence diagram of a process of adjusting and controlling based on a target delay parameter according to embodiments of the present disclosure.

[0018] FIG. 11 illustrates a schematic flowchart of a clock control method according to embodiments of the present disclosure.

[0019] FIG. 12 illustrates a schematic structural diagram of a clock control device according to embodiments of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0020] Embodiments of the present disclosure are described in connection with the accompanying drawings of embodiments of the present disclosure. The terms used in some embodiments of the present disclosure are used to explain specific embodiments of the present disclosure and are not intended to limit the present disclosure.

[0021] Embodiments of the present disclosure are described below in conjunction with the accompanying drawings. Those skilled in the art can understand that, with the development of technology and the appearance of new scenarios, the technical solutions of embodiments of the present disclosure are also applicable to similar technical problems.

[0022] The terms “first, ” “second, ” etc., used in the specification and claims of the present disclosure and in the above accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific sequence or order. Such terms can be used interchangeably when appropriate and are merely used to distinguish objects with the same attributes in the description of embodiments of the present disclosure. Furthermore, the terms “comprise, ” “include, ” as well as any variants thereof, are intended to cover non-exclusive inclusion, such that a process, method, system, product, or equipment that includes a series of elements is not limited to those elements, but may include other elements not explicitly listed or inherent to such a process, method, product, or equipment.

[0023] The present disclosure provides a clock control circuit configured to control a system clock. A schematic structural diagram of the clock control circuit is shown in FIG. 1 and includes a delay control module 11 and a switch signal generation module 12.

[0024] The delay control module 11 can be configured to receive a clock control signal and perform delay processing on the clock control signal to obtain a first clock signal. The delay processing can be performed on the clock control signal by using a target delay parameter.

[0025] The switch signal generation module 12 can be configured to generate a clock switch signal of a first state based on the clock control signal and the first clock signal. The clock switch signal of the first state can be used to switch the system clock from a first clock to a second clock. The frequency of the second clock can be smaller than the frequency of the first clock.

[0026] High-performance processing modules, such as central processing units (CPUs) or graphics processing units (GPUs) , are relatively sensitive to power consumption. The power consumption is usually saved with clock gating (clk gating) or power gating (power gating) .

[0027] However, after a signal passes through clock gating (clk gating) or power gating (power gating) , voltage droop is prone to occur. A short current spike is generated when the voltage droop occurs. The short spike leads to relatively high system power consumption.

[0028] In the clock control circuit of embodiments of the present disclosure, through the delay control module and the switch signal generation module, the system clock can be switched when the volage droop is detected to avoid the problem that the system clock is always at a high frequency to cause the high system power consumption when the voltage droop happens. Then, the lifetime problem of the transistor caused by the voltage droop can be avoided.

[0029] The clock control circuit can include the delay control module and the switch signal generation module.

[0030] The delay control module can receive a clock control signal. The clock control signal can be a high-frequency clock signal with a specific duty cycle. The clock control signal can be directly used as a reference signal for the to-be-detected clock signal. The supply voltage of the clock control signal can be consistent with the supply voltage of the to-be-detected clock signal.

[0031] The to-be-detected clock signal can be a first clock signal obtained by performing delay processing on the clock control signal. The first clock signal after the delay processing and the clock control signal without the delay processing can have the same duty cycle. The difference can include that the first clock signal after the delay processing does not overlap with the high level of the clock control signal.

[0032] The delay processing can be performed on the clock control signal by using the target delay parameter. That is, the delay processing can be performed on the clock control signal according to the parameter value of the target delay parameter. The target delay parameter can represent the voltage fluctuation of the system. That is, the clock control signal can first be delayed to a corresponding position according to the voltage fluctuation of the system. Then, the clock switch signal can be generated based on the first clock signal after the delay processing and the clock control signal without the delay processing.

[0033] The target delay parameter can be related to the current operation condition. The operation condition can include circuit structure, circuit process, operating voltage, current, frequency, etc. For different circuit structures and circuits with different processes, the target delay parameter may need to be trained before use, so that the delay processing can be performed on the clock control signal using the trained target delay parameter. In addition, even in the circuits having the same structures and in the same circuits with the same process, due to the changes in the operating voltage, current, and frequency during use, the target delay parameter can change. Thus, the target delay parameter can be trained again during use to eliminate the impact of the voltage droop when the voltage droop happens.

[0034] If the clock switch signal of the first state is able to be generated based on the clock control signal and the first clock signal obtained by performing the delay processing on the clock control signal according to the target delay parameter, the voltage droop can be indicated to be currently generated. The system clock may need to be switched. The system clock can be switched from the first clock to the second clock. The first clock can be a high-frequency clock, and the second clock can be a low-frequency clock. The voltage can be adjusted under the low-frequency clock to reduce the system power consumption. Thus, when the voltage droop occurs, the problem of the high system power consumption due to the system clock being still the first clock can be avoided.

[0035] The clock control circuit of embodiments of the present disclosure can be configured to control the system clock and include a delay control module and a switch signal generation module. The delay control module can receive a clock control signal. The delay processing can be performed on the clock control signal using the target delay parameter to obtain the first clock signal. The switch signal generation module can be configured to generate the clock switch signal of the first state based on the clock control signal and the first clock signal to switch the system clock from the first clock to the second clock. The frequency of the second clock can be smaller than the frequency of the first clock to switch the system clock. Moreover, when the clock switch signal is determined to be in the first state, the system clock can be switched to the first clock with a low frequency to achieve the purpose of switching the system clock based on the clock control signal. Thus, the impact on the system power consumption when the voltage droop happens can be avoided through the target delay parameter and the switch of the system clock.

[0036] Embodiments of the present disclosure provide a clock control circuit configured to control the system clock. FIG. 1 illustrates the schematic structure diagram of the clock control circuit, including a delay control module 11 and a switch signal generation module 12.

[0037] In addition to the same structure as the previous embodiment, the delay control module in the clock control circuit of embodiments of the present disclosure can include a delay module and a configuration module.

[0038] The delay module can be configured to perform delay processing on the clock control signal.

[0039] The configuration module can be configured to obtain the target delay parameter through training. The training can include adjusting the delay parameter by using the clock switch signal as a feedback signal until the clock switch signal is switched from the second state to the first state. The previous delay parameter of the current delay parameter can be saved as the target delay parameter. Under the current delay parameter, the pulses of the clock control signal and the first clock signal can overlap in time. Under the target delay parameter, the pulses of the clock control signal and the first clock signal may not overlap in time.

[0040] The delay control module can include the delay module and the configuration module. The configuration module can be configured to determine the target delay parameter of the delay module through training, and configure the delay parameter of the delay module as the target delay parameter after the target delay parameter is determined. Then, the delay module can be configured to perform the delay processing on the clock control signal according to the target delay parameter.

[0041] The configuration module can determine the target delay parameter through training. The process can include adjusting the delay parameter by using the clock switch signal as a feedback signal. That is, the configuration module can first set an initial delay parameter value to configure the delay parameter of the delay configuration module with the initial delay parameter value. Based on the current delay module, the delay processing can be formed on the clock control signal using the initial delay parameter value. The clock switch signal can be generated based on the clock signal obtained after delay and the clock control signal, and the clock switch signal can be fed back to the configuration module. Thus, the configuration module can adjust the delay parameter based on the clock switch signal to adjust the initial delay parameter value to a next delay parameter value. During the adjustment of the delay parameter, with the change in the delay parameter value, the pulse of the delayed clock signal can change, but the clock control signal may not change. Then, when the change in the pulse of the delayed clock signal reaches a certain value, the clock switch signal generated based on the delayed clock signal and the clock control signal can also change.

[0042] That is, when the delay parameter is the initial delay parameter value, the generated clock switch signal can be in the second state. As the delay parameter changes, if the clock switch signal that is generated based on the delayed clock signal and the clock control signal switches from the second state to the first state, the pulse change of the delayed clock signal obtained under the current delay parameter can be determined to reach a certain value. Then, the pulse of the delayed clock signal can overlap with the pulse of the clock control signal in time. That is, the high level of the delayed clock signal can overlap partially with the high level of the clock control signal. Then, the previous delay parameter of the current delay parameter can be taken as the target delay parameter. Under the target delay parameter, the pulse of the delayed clock signal may not overlap with the pulse of the first clock signal in time. That is, the high level of the delayed clock signal may not overlap with the high level of the clock control signal. Then, the next delay parameter would cause the pulse of the delayed clock signal and the pulse of the clock control signal to overlap in time. Therefore, the target delay parameter can be a critical delay parameter. The delay parameter of the delay module can be directly set as the target delay parameter, and the clock control signal can then be delayed accordingly. Then, when voltage droop occurs, the pulse of the first clock signal that is obtained based on delaying with the target delay parameter and the pulse of the clock control signal can quickly switch from no overlap to overlap in time to enable timely switching of the system clock, and avoid excessive system power consumption.

[0043] A plurality of delay parameter values can be preset, and the delay parameter of the delay module can be adjusted according to the sequence of the plurality of preset delay parameter values. Thus, when the pulse of the delay clock signal obtained under the current delay parameter and the pulse of the clock control signal are determined to overlap in time, the previous delay parameter of the current delay parameter can be determined directly according to the sequence of the plurality of preset delay parameter values.

[0044] Two neighboring delay parameter values of the plurality of preset delay parameter values can have a certain difference. When the difference between the two neighboring delay parameter values is smaller, the accuracy of the determined target delay parameter can be higher. When the difference between the two neighboring delay parameter values is larger, the accuracy of the determined target delay parameter can be lower, but the time length for determining the target delay parameter can be shorter to improve the efficiency of determining the target delay parameter.

[0045] Further, the configuration module can specifically include a configuration register. The configuration register can be configured to configure a configuration value during training.

[0046] The delay module can include a signal delay chain, and the delay parameter in the delay chain can be adjusted based on the configuration value of the register. After the clock control signal is delayed by the delay amount corresponding to the delay parameter, the first clock signal can be outputted.

[0047] The configuration module can include the configuration register for setting the configuration value. A plurality of configuration registers can be provided. For example, the configuration registers can include two sets of registers S [i] and T [i] . By setting different configuration values to the two sets of registers, the delay module can have different delay parameters. Thus, the clock control signal can be delayed to different degrees after passing through the delay module. The training process can be the process of adjusting the configuration values of the configuration registers.

[0048] The encoding format of the registers included in the configuration register can be limited. For example, the configuration register can include the two sets of registers S [i] and T [i] . S[i] and T [i] can be registers having multiple bits. For S [i] , all bits of S [i] are initially 1. For T [i] , initially, only the lowest bit is zero, and the rest bits are 1.

[0049] The clock switch signal can be used as the feedback signal of the configuration register to adjust the configuration values in the configuration register. The configuration register can perform bit shifting according to the feedback clock switch signal. If the clock switch signal is in the second state, the configuration register can perform bit shifting according to the clock switch signal of the second state. For S [i] , 0 is added to the lowest bit. Since all the bits in S [i] are initially 1, after the first shifting during the training process, only the lowest bit in S [i] is 0, and other bits are 1. For T [i] , 1 is added to the lowest bit. Since only the lowest bit in T [i] is initially 0, and other bits are 1, after the first shifting, only the second bit from the left in T [i] , i.e., a second lowest bit, is 0, and the other bits are 1. The delay parameter of the delay module can be adjusted using the configuration value in the current configuration register, and the clock control signal can be delayed using the adjusted delay module to obtain the first clock signal. Based on the first clock signal and the clock control signal, the clock switch signal of the second time can be obtained. If the clock switch signal is still in the second state, the configuration register can continue to perform shifting according to the above manner according to the clock switch signal of the second state. That is, for S [i] , 0 can continue to be added to the lowest bit. For T [i] , 1 can continue to be added to the lowest bit, until the received feedback clock switch signal is in the first state. Then, the current configuration value may not be directly used as the configuration value in the configuration register. The previous configuration value of the current configuration value can be determined, and the delay parameter corresponding to the previous configuration value can be determined as the target delay parameter. The configuration value of the configuration register can be controlled to be set to the previous configuration value, which can no longer be changed. The delay parameter of the delay module can be controlled to be the target delay parameter, which can no longer be changed. Then, the training can be determined to be complete. That is, the configuration of the configuration register is complete.

[0050] As the configuration value of the configuration register changes, the delay parameter in the signal delay chain of the delay module can change accordingly. When the delay parameter changes, the clock control signal can pass through the delay module, and the pulse of the clock control signal can also change accordingly. FIG. 2 illustrates a schematic diagram of a relationship between a clock control signal and a first clock signal passing through a delay module at different times according to embodiments of the present disclosure. S1, S2, S3, and S4 are included. S1 is a schematic diagram of a pulse of the clock control signal. S2 is a schematic diagram of a pulse of the first clock signal obtained after the clock control signal passes through the delay module set with the delay parameter when the configuration register has the initial configuration value. S3 is a schematic diagram of a pulse of the first clock signal obtained after the clock control signal passes through the delay module set with the delay parameter based on the configuration value after adjusting the configuration register. S4 is a schematic diagram of a pulse of the first clock signal obtained after the clock control signal passes through the delay module set with the delay parameter based on the configuration value when the configuration register is configured again. As shown in FIG. 2, when the configuration value of the configuration register is the initial configuration value, the initial delay parameter can be configured based on the initial configuration value. For example, the initial delay parameter can be 0. Then, after the clock control signal passes through the delay module, the pulse of the obtained first clock signal S2 is not changed relative to the clock control signal. The high level of the pulse still overlaps with the high level of the clock control signal. Then, the obtained clock switch signal can be in the second state. The configuration value of the configuration register can be adjusted based on he clock switch signal of the second state to obtain the adjusted configuration value. The delay parameter can be adjusted based on the configuration value. When the pulse of the first clock signal S3 is obtained after the clock control signal passes through the adjusted delay module, the high level of the pulse of the first clock signal S3 can have a delay with the high level of the clock control signal. Then, the obtained clock switch signal can still be in the second state. Then, the configuration value of the configuration register can continue to be adjusted based on the clock switch signal in the second state, and the first clock signal S4 can be obtained. The pulse of the first clock signal S3 can be delayed. The high level of the pulse of the first clock signal S3 can have a delay with the high level of the clock control signal. However, the obtained clock switch signal may still not reach the first state. Only when the clock switch signal reaches the first state, that is, when the first clock signal S5 is obtained, the high level of the first clock signal S5 can overlap with the high level of the clock control signal. Then, the clock switch signal can be determined to be in the first state, and the current configuration value of the configuration register under the first clock signal S5 and the current delay parameter of the delay module can be determined. The previous configuration value of the configuration register can be determined based on the current configuration value. The configuration value of the configuration register can be set to the previous configuration value and saved. The delay parameter of the delay module can be set to the previous delay parameter of the current delay parameter and saved. Thus, the high level of the first clock signal that is delayed based on the target delay parameter and the high level of the clock control signal may not overlap.

[0051] FIG. 3 illustrates a schematic internal structural diagram of a delay module in a delay control module according to embodiments of the present disclosure. The dashed block in FIG. 3 is a delay element (DE) . The logic gate labeled D in the FIG. 3 is a NAND dummy circuit, which is configured to balance the circuit and eliminate glitches during input switching. Two sets of control bits can be used to control the delay of the circuit. That is, the delay parameter can be adjusted through two sets of configuration registers S [i] and T [i] . S [i] is a thermometric code (Si = 0 (i < c) ; Si = 1 (i ≥ c) ) . Ti is a one-cold code (Tc+1 = 0; Ti = 1 (i ≠ c+1) ) , α2i+1=β2i+1=~in, and α2i=β2i=in.

[0052] Table 1 is a relationship table between the configuration values of the configuration register and the delay time of the clock control signal after passing through the delay module. where t denotes a cell delay of the logic NAND gate circuit, which is related to a specific  process, and the maximum value of C is the number of DEs minus 1.

[0053] As shown in Table 1, Delay time = 2 (c+1) t.

[0054] The number of required logic gates and the configuration values of configuration registers S [i] and T [i] can be related to the process condition of the circuit, and also related to the parameters such as circuit structures, voltages, current, and frequency. Thus, the number of required logic gates may be determined through training.

[0055] FIG. 4 illustrates a schematic structural diagram of a delay control module according to embodiments of the present disclosure. The delay control module includes a configuration module 41 and a delay module 42. The configuration module 41 obtains the clock switch signal Clk_sel. The configuration values of the configuration registers S [i] and T [i] can be adjusted based on the clock switch signal Clk_sel. The delay parameter of the delay module 42 can be adjusted based on the configuration values of the configuration registers S [i] and T [i] . That is, the number of DEs required by the delay module 42 can be adjusted. After the clock control signal is input from the in terminal to the delay module 42, the clock control signal can be delayed by the required DEs, and the first clock signal can be output from the out terminal.

[0056] The clock control circuit of embodiments of the present disclosure can be applied to the control system clock and can include the delay control module and the switch signal generation module. The delay control module can include a delay module and a configuration module. The delay module can be configured to perform the delay processing on the clock control signal. The configuration module can be configured to obtain the target delay parameter through training. The training can include adjusting the delay parameter by using the clock switch signal as the feedback signal, until the clock switch signal is switched from the first state to the second state. The previous delay parameter of the current delay parameter can be used and saved as the target delay parameter. Under the current delay parameter, the pulse of the clock control signal and the pulse of the first clock signal may overlap in time. Under the target delay parameter, the pulse of the clock control signal and the pulse of the first clock signal may not overlap. That is, the target delay parameter can be determined to be the critical delay value by training. Thus, when the target delay parameter is the critical value, the pulse of the clock control signal and the pulse of the first clock signal can be ensured to overlap in time as long as the voltage droop appears, Then, the clock switch signal in the first state can be directly generated to switch the system clock. The situation, in which after the voltage droop appears for a certain time length, the delay parameter can be controlled to allow the pulse of the clock control signal to overlap with the pulse of the first clock signal in time to cause increased system power consumption, can be avoided.

[0057] Further, the delay control module in the clock control circuit of embodiments of the present disclosure can include a first gating unit and a second gating unit.

[0058] The first gating unit can be configured to obtain the clock control signal and perform first gating processing on the clock control signal to obtain a second clock signal, such that the second clock signal can be delayed to obtain the first clock signal.

[0059] The second gating unit can be configured to obtain the clock control signal and perform second gating processing on the clock control signal to obtain a third clock signal and output the third clock signal to the switch signal generation module, such that the switch signal generation module can generate the clock switch signal in the first state based on the third clock signal and the first clock signal.

[0060] That is, after the clock control signal enters the delay control module, the delay module can directly perform the delay processing on a path of the clock control signal to obtain the first clock signal. Another path of the clock control signal may not be directly processed and can be used to generate the clock switch signal with the first clock signal together. In some other embodiments, after the clock control signal enters the delay control module, the clock control signal can be divided into two paths. Each path can first pass through the gating unit for the gating processing. Then, one path can undergo the delay processing of the delay module to obtain the first clock signal. The other path may not be processed and can generate the clock switch signal with the first clock signal together.

[0061] By performing the gating processing on the clock control signal through the first gating unit and the second gating unit simultaneously, the duty cycle of the input clock control signal can be adjusted. For example, the duty cycle of the input clock control signal can be 1: 1, i.e., 1 low level and 1 high level. After the clock control signal undergoes the gating processing of the gating unit, the clock control signal can be a clock signal with the duty cycle of 2: 1, i.e., 2 low levels and 1 high level. With this method, after the clock signal that is adjusted by the gating unit is input to the delay module, the delay processing can be performed on the clock signal without a high delay parameter. Thus, the circuit area of the delay module can be reduced.

[0062] FIG. 5 illustrates a schematic structural diagram of a clock control circuit according to embodiments of the present disclosure. The clock control circuit includes a delay control module 51 and a switch signal generation module 52. The delay control module 51 includes a delay module 511, a configuration module 512, a first gating unit 513, and a second gating unit 514.

[0063] The configuration module 512 can be configured to obtain the clock switch signal generated from the switch signal, adjust the configuration value of the configuration module based on the clock switch signal, and adjust the delay parameter of the delay module 511 based on the configuration value of the configuration module. The first gating unit 513 can obtain the input clock control signal and perform the gating processing on the input clock control signal. Then, the clock control signal after the gating processing can pass through the delay module 511 to obtain the first clock signal. The first clock signal can be input to the switch signal generation module 52. The second gating unit 514 can obtain the input clock control signal and perform the gating processing on the input clock control signal. Then, the input clock control signal after the gating processing can be directly input to the switch signal generation module 52, such that the switch signal generation module 52 can generate the clock switch signal based on the two received signals.

[0064] The signal obtained after the first gating unit performs the gating processing on the clock control signal, and the signal obtained after the second gating unit performs the gating processing on the clock control signal can be clock signals with the same duty cycle. For example, the duty cycle can be 2: 1, i.e., 2 low levels and 1 high level. However, the pulses of the two signals may not overlap in time. That is, the high levels of the two signals may not overlap. For example, the high levels of the two signals can differ by T / 2.

[0065] The first gating unit and the second gating unit can cause a certain delay between the two paths of the clock control signal. By setting a delay module on one of the paths, the delay between the two paths of the clock signal can be caused to be at a critical state by the delay module, so that as long as a voltage droop occurs, the critical state can change. Then, the voltage droop can be discovered in time, and processing can be performed by switching the system clock to avoid excessive power consumption of the system.

[0066] A clock control circuit of embodiments of the present disclosure can be configured to control the system clock. The schematic structural diagram of the clock control circuit is shown in FIG. 1. The clock control circuit includes a delay control module 11 and a switch signal generation module 12.

[0067] Differences from the above embodiments can include that the switch signal generation module 12 of the clock control circuit of embodiments of the present disclosure includes a pulse-to-level circuit.

[0068] The pulse-to-level circuit can be configured to perform an AND operation on the clock control signal and the first clock signal to generate a pulse signal, and perform level conversion on the pulse signal to obtain the converted level. The converted level can be synchronized under the current system clock to obtain the clock switch signal in the first state.

[0069] The pulse-to-level circuit can include an AND circuit. The first reception terminal of the AND circuit can receive the clock control signal. The second input terminal of the AND circuit can receive the first clock signal. The first clock signal can be a frequency-divided signal of the clock control signal. The AND circuit can perform the AND processing on the received clock control signal and the first clock signal to generate a pulse signal, i.e., a short pulse signal. Since the short pulse signal cannot serve as a chip-select signal for a clock (because the clock chip-select signal is a frequency-changing signal) , the level conversion can be first performed on the pulse signal output from the AND circuit to obtain the converted level. Then, the converted level can be a frequency-changing signal. However, to maintain a low voltage steady state and reduce the sub-steady state, the converted level can be synchronized in time. That is, the converted level can be synchronized under the current system clock to obtain the clock switch signal.

[0070] FIG. 6 illustrates a schematic structural diagram of a pulse-to-level circuit according to embodiments of the present disclosure. The pulse-to-level circuit includes an AND circuit, a first register DFF1, and a register set 61. The register set 61 includes a second register DFF2 and a third register DFF3. Sys_clk can be a first clock. The first clock can be a default system clock, and rst_n is a reset signal.

[0071] The AND circuit can obtain the clock control signal input and the first clock signal out. After the processing is performed, the pulse signal can be obtained. The level conversion can be performed on the pulse signal through the first register DFF1 to output the converted level clk_gen. Then, the pulse signal can be used as the trigger signal to control the first register DFF1 to lock and save the high level “1” of the input terminal and then output continuous high levels, which are used as the converted level clk_gen. Then, the converted level can be input to the register set 61. Since the register set consisting of the second register DFF2 and the third DFF3 is equivalent to a synchronizer, which beats under a high-frequency clock sys-clk, the clock switch signal clk_sel output by the register set can be a stable frequency-changing signal.

[0072] In some embodiments, the switch signal generation module of the clock control circuit of embodiments of the present disclosure can further include a reset generation circuit in addition to the pulse-to-level circuit.

[0073] The reset generation circuit can be configured to generate a reset signal when detecting that the clock switch signal of the first state lasts for a preset time, and control the pulse-to-level circuit and the delay control module to reset based on the reset signal to switch the clock switch signal to reset to the second state and switch the system clock into the default system clock.

[0074] The reset generation circuit can generate a reset signal. The reset signal can be low active and can be used to reset all the registers in the pulse-to-level circuit and reset all the registers in the delay control module. By resetting all the registers in the pulse-to-level circuit and the delay control module, the clock switch signal can be switched from the second state to the first state to allow the circuit to enter the state for performing the next operation. That is, the target delay parameter can be trained again.

[0075] Since the reset signal is affected by the power-on reset signal and the reset threshold of the chip, the reset generation circuit can generate a reset signal when the clock control circuit is detected to be powered on to control all the registers of the pulse-to-level circuit and the delay control module to reset. In some other embodiments, when the reset threshold is determined to be reached, the reset signal can be generated to control all the registers of the pulse-to-level circuit and the delay control module to reset.

[0076] Determining whether the reset threshold is reached can include starting timing when the clock switch signal of the first state is detected, and generating the reset signal when the timing reaches a preset time, i.e., the reset threshold is determined to be reached.

[0077] The reset generation circuit can include a timer and a reset circuit.

[0078] The timer can be configured to start timing when the clock switch signal is detected to be in the first state, until the preset time is reached. The reset circuit can be configured to generate a reset signal rst_n when the timers detects that the clock switch signal is in the first state for he preset time, and send the reset signal to the pulse-to-level circuit and the delay control module to control all the registers of the pulse-to-level circuit and the delay control module to reset.

[0079] When the clock switch signal clk_sel is detected to be in the first status, starting the timing can include starting the timing when the rising edge of the converted level is detected, until the timing reaches he preset time. Then, the timer may need to be connected to an output end of the first register in the pulse-to-level circuit and can be configured to detect the converted level.

[0080] The preset time can be obtained through training. The training process can include, based on the clock switch signal, recording time until the clock switch signal switches from the first state to the second state. The time required to switch the clock switch signal from the first state to the second state can be used as the preset time. The preset time can be the duration of the voltage droop, i.e., the gating time.

[0081] During the training process of the preset time, the training can be performed by using the clock switch signal as the feedback signal, and the time can be determined based on the clock switch signal. The initial time can be 0, and if the clock switch signal is in the first state, the time can be cumulated until the clock switch signal is in the second state. The time accumulation can be stopped. The current time can be determined as the preset time. During the adjustment of the circuit, if the clock switch circuit of the first state can be detected. Then, when the timing starts, the timing can stop when the preset time is reached, and the reset signal can be reset to control all the registers of the pulse-to-level circuit and the delay control module to reset.

[0082] When the timing reaches the preset time, the clock switch signal can be switched to the second state. That is, the preset time can be the same as the time required for the clock switch signal to switch from the first state to the second state.

[0083] Additionally, the reset generation circuit can include a counter and a reset circuit.

[0084] The counter can be configured to start counting when the clock switch signal is determined to be in the first state, until the counter reaches the preset threshold. The reset circuit can be configured to generate the reset signal when the counting reaches the preset threshold.

[0085] The counter can start counting when detecting that the clock switch signal clk_sel is in the first state. That is, when the rising edge of the converted level is detected, the counter can start counting until the counting reaches the preset threshold.

[0086] The preset threshold can be obtained through training. The training process can include counting the threshold based on the clock switch signal until the clock switch signal switches from the first state to the second state, and using the counting value required for the clock switch signal to switch from the first state to the second state as the preset threshold.

[0087] For example, the reset generation circuit can include the counter, and the schematic structural diagram of the reset generation circuit is shown in FIG. 7. The reset generation circuit includes a counter drop_cnt and a reset circuit 71.

[0088] The counter drop_cnt can receive the clock switch signal clk_sel, receive the converted level clk_gen output from a first register DFF1 in the pulse-to-level circuit, or simultaneously receive both the clock switch signal clk_sel and the converted level clk_gen. If the clock switch signal clk_sel is in the first state, the counter drop_cnt can start counting, or  when the rising edge of the converted level clk_gen is detected, the counter drop_cnt can start counting. When the counting of the counter drop_cnt reaches the preset threshold, the counter can stop counting, and the reset circuit can be controlled to generate the reset signal rst_n. Rth is the preset threshold, sys_clk is the first clock, i.e., system default clock, and por_rst is a power-on reset signal.

[0089] The clock control circuit of embodiments of the present disclosure can be configured to control the system clock and include the delay control module and the switch signal generation module. The switch signal generation module can include the pulse-to-level circuit. The pulse-to-level circuit can be configured to perform an AND operation on the clock control signal and the first clock signal to generate the pulse signal and perform level conversion on the pulse signal to obtain the converted level. The converted level can be synchronized under the current system clock to obtain the clock switch signal in the first state. The pulse-to-level circuit of the present disclosure can perform the AND operation after obtaining the clock control signal and the first clock signal to generate the pulse signal. Since the pulse signal cannot be used for chip selection of the clock signal, the pulse signal may need to be converted into a converted level. To maintain a low-voltage steady state and reduce the metastability, the converted level can further be synchronized with the system clock. Then, the system clock can be switched based on the synchronized clock switch signal.

[0090] Further, the clock control circuit of embodiments of the present disclosure can also include a switch module.

[0091] The switch module can be configured to output the second clock when receiving the clock switch signal of the first state, and output the first clock when receiving the clock switch signal of the second state.

[0092] The switch module can receive the clock switch signal clk_sel. When the clock switch signal clk_sel is in the first state, the system clock can be switched to the second clock div_clk. When the clock switch signal clk_sel is in the second state, the system clock can be switched to the first clock sys_clk.

[0093] The first clock sys_clk can be a high-frequency clock during normal system operation, and the second clock div_clk can be a low-frequency clock after frequency division. When the clock switch signal clk_sel is high, i.e., the circuit is in the gating state, the system clock can be switched to the second clock div_clk. When the clock gating is turned off, and the clock switch signal clk_sel is low, the system clock can be switched to the first clock sys_clk.

[0094] FIG. 8 illustrates a schematic complete circuit structural diagram of a clock control circuit according to embodiments of the present disclosure. The clock control circuit includes a delay control module 81, a switch signal generation module 82, and a switch module 83.

[0095] The delay control module 81 includes a delay module 811, a configuration module 812, a first gating unit 813, and a second gating unit 814. The switch signal generation module 82 includes a pulse-to-level circuit 821 and a reset generation circuit 822. The pulse-to-level circuit 821 includes an AND gate, a first register DFF1, a second register DFF2, and a third register DFF3.

[0096] The delay control module 81 can input a clock control signal with a specific duty cycle, which passes through the first gating unit 813 and the second gating unit 814, respectively. The signal passing through the second gating unit 814 can reach the AND circuit in the switch signal generation module 82. The signal passing through the first gating unit 813 can pass through the delay module 811 to obtain the first clock signal, which then reaches the AND circuit in the switch signal generation module 82.

[0097] The AND circuit can perform an AND operation on the two input signals to obtain a pulse signal pulse. The level conversion can be performed on the pulse signal pulse by the first register DFF1 to obtain the converted level. Then, after the converted level passes the second register DFF2 and the third register DFF3, the clock switch signal clk_sel can be obtained. The clock switch signal clk_sel can be input to the switch module 83. The switch module 83 can determine whether to switch the system clock.

[0098] In addition, when the clock switch signal clk_sel is detected to be in the first state, e.g., 1, the reset generation circuit 822 can start timing or counting. When the timing reaches the preset duration or the counting reaches the preset threshold, the reset signal can be generated. The reset signal can be used to control each register in the pulse-to-level circuit 821 to return to the initial value, and also to control each configuration register in the configuration module 812 to return to the initial value.

[0099] The configuration module 812 can include the configuration registers. The counting of the configuration register can be adjusted based on the clock switch signal clk_sel, until the clock switch signal clk_sel switches from the second state to the first state, e.g., the clock switch signal clk_sel changes from 0 to 1. Then, the previous delay parameter of the current delay parameter can be saved as the target delay parameter. Under the current delay parameter, the pulses of the clock control signal and the first clock signal can overlap in time. Under the target delay parameter, the pulses of the clock control signal and the first clock signal may not overlap in time.

[0100] FIG. 9 illustrates a schematic time sequence diagram of a process of a configuration module adjusting a configuration value of a configuration register according to embodiments of the present disclosure. Wherein, clk_in is the input clock control signal with a fixed duty cycle, nand_in1 is the clock signal after passing through the second gating unit, and nand_in2 is the clock signal after passing through the first gating unit. The clock signal after passing through the second gating unit and the clock signal after passing through the first gating unit can have the same duty cycle, but have a delay of T / 2. T is the period of the clock signal after passing through the gating unit. Of course, the clock signal after passing through the second gating unit can have a delay of T / 2 or other values of delay.

[0101] Then, the clock signal nand_in2, after passing through the first gating unit, can continue to be delayed through the delay module to obtain nand_out1 and nand_out2. After nand_out1 is obtained, nand_out1 and nand_in1 do not overlap. The pulse signal pulse0 obtained after performing the AND operation on nand_out1 and nand_in1 can be 0. Thus, the corresponding clock switch signal clk_sel can be in the second state, e.g., 0. The configuration value can continue to be adjusted on the current basis to obtain nand_out2, which overlaps with nand_in1. The pulse signal pulse1 obtained after performing the AND operation on nand_out2 and nand_in1 can be 1. Then, the previous configuration value can be determined based on the configuration value of the configuration register when nand_out2 is obtained. The previous configuration value can be saved as the configuration value of the configuration register, and the configuration value of the configuration register may no longer be adjusted. The delay parameter of the delay module obtained based on the configuration value can be the target delay parameter.

[0102] FIG. 10 illustrates a schematic time sequence diagram of a process of adjusting and controlling based on a target delay parameter according to embodiments of the present disclosure. The first row in FIG. 10 is the clock signal input that is input to the AND circuit as a reference. When the clock signal input is not subjected to gating processing through the gating unit, the clock signal input is the clock control signal. When the clock signal input is subjected to gating processing through the gating unit, the clock signal input is the clock signal after the second gating unit. The second row in FIG. 10 is the first clock signal out after delay processing based on the target delay parameter. After the clock signals of the first row and the second row are input to the AND circuit, the pulse signal pulse of the third row can be obtained. The position where the high level of the pulse signal of the third row is can be the overlap part of the two clock signals input to the AND circuit. The level conversion can be performed on the pulse signal to obtain the converted level clk_gen. Then, the clock switch signal clk_sel can be obtained. When the clock switch signal clk_sel is in the first state, e.g., 1, the system clock d_clk can be switched to the second clock div_clk. As shown in the arrow of FIG. 10, after the slock switch signal of the first state is detected to last for the preset time Rth, the reset signal rst_n is generated. The reset signal rst_n can be used to restore the configuration values of the registers of the pulse-to-level circuit. Then, the clock switch signal clk_sel can be in the second state, e.g., 0.The system clock d_clk can be restored to the first clock sys_clk. That is, when the down-frequency reaches a certain threshold, the system clock can be restored to the high frequency.

[0103] FIG. 11 illustrates a schematic flowchart of a clock control method according to embodiments of the present disclosure. The clock control method includes obtaining the clock control signal (S111) , performing the delay processing on the clock control signal using the target delay parameter to obtain the first clock signal (S112) , and generating the clock switch signal of the first state based on the clock control signal and the first clock signal, the clock switch signal of the first state being used to switch the system clock from the first clock to the second clock, and the frequency of the second clock being smaller than the first clock (S113) .

[0104] The clock control method of embodiments of the present disclosure can further include generating the reset signal after detecting that the clock switch signal of the first state lasts for a preset time, and controlling the clock switch signal to reset to the second state based on the reset signal to switch the system clock from the second clock to the first clock.

[0105] The clock control method of embodiments of the present disclosure can further include obtaining the target delay parameter through training. The training can include adjusting the delay parameter by using the clock switch signal as a feedback signal until the clock switch signal switches from the second state to the first state, and saving the previous delay parameter of the current delay parameter as the target delay parameter. Under the current delay parameter, the pulses of the clock control signal and the first clock signal can overlap in time. Under the target delay parameter, the pulses of the clock control signal and the first clock signal may not overlap in time.

[0106] The clock control method of embodiments of the present disclosure can further include obtaining the preset time through training. The training can include counting time based on the clock switch signal until the clock switch signal switches from the first state to the second state, and using the time required for the clock switch signal to switch from the first state to the second state as the preset time.

[0107] The clock control method of embodiments of the present disclosure can be implemented based on the clock control circuit of embodiments of the present disclosure, which is not repeated here.

[0108] The clock control method of embodiments of the present disclosure can be used to control the system clock. The clock control signal can be received. The delay processing can be performed on the clock control signal using the target delay parameter to obtain the first clock signal. Based on the clock control signal and the first clock signal, the clock switch signal of the first state can be generated to switch the system clock from the first clock to the second clock. The frequency of the second clock can be smaller than the frequency of the first clock. The system clock can be switched. When the clock switch signal is determined to be in the first state, the system clock can be switched to the second clock. Thus, the system clock can be switched based on the clock control signal. In addition, through the target delay parameter and the switching of the system clock, the impact on the system power consumption can be avoided when the voltage droop occurs in the system.

[0109] FIG. 12 illustrates a schematic structural diagram of a clock control device according to embodiments of the present disclosure. The clock control device includes an acquisition unit 121, a delay unit 122, and a signal generation unit 123.

[0110] The acquisition unit 121 can be configured to obtain the clock control signal.

[0111] The delay unit 122 can be configured to perform the delay processing on the clock control signal using the target delay parameter to obtain the first clock signal.

[0112] The signal generation unit 123 can be configured to generate the clock switch signal of the first state based on the clock control signal and the first clock signal. The clock switch signal of the first state can be used to switch the system clock from the first clock to the second clock. The frequency of the second clock can be lower than the frequency of the first clock.

[0113] The clock control method of embodiments of the present disclosure can be implemented based on the clock control circuit of embodiments of the present disclosure, which is not repeated here.

[0114] The clock control device of embodiments of the present disclosure can be configured to control the system clock. The clock control device can receive the clock control signal. The clock control device can perform the delay processing on the clock control signal using the target delay parameter to obtain the first clock signal. Based on the clock control signal and the first clock signal, the clock control device can generate the clock switch signal of the first state to switch the system clock from the first clock to the second clock. The frequency of the second clock can be smaller than the frequency of the first clock. The system clock can be switched. When the clock switch signal is determined to be in the first state, the system clock can be switched to the second clock. Thus, the system clock can be switched based on the clock control signal. In addition, through the target delay parameter and the switching of the system clock, the impact on the system power consumption can be avoided when the voltage droop occurs in the system.

[0115] The above-described device embodiments are merely illustrative. The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, i.e., the components may be located in one place or distributed across a plurality of network units. A part or all of the modules can be selected according to actual needs to achieve the objectives of the solution of embodiments of the present disclosure. In addition, in the accompanying drawings of the device embodiments of the present disclosure, the connection relationships between the modules can indicate communication connections therebetween, which can be implemented as one or more communication buses or signal lines.

[0116] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software combined with necessary general-purpose hardware, or, of course, through dedicated hardware including dedicated integrated circuits, dedicated CPUs, dedicated memories, dedicated components, etc. In general, any function completed by a computer program can be easily implemented using corresponding hardware, and specific hardware structures configured to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for the present application, software implementation is more often the preferred implementation. Based on this understanding, the technical solutions of the present disclosure can essentially be or the part of the technical solutions contributing to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard drive, ROM, RAM, magnetic disk, or optical disk, etc., and include several instructions to allow a computer device (e.g., a personal computer, training device, or network device) to execute the methods described in various embodiments of the present disclosure.

[0117] In the above embodiments, the present disclosure can be implemented entirely or partially through software, hardware, firmware, or any combination thereof. When the present disclosure is implemented using software, the present disclosure can be implemented entirely or partially in the form of a computer program product.

[0118] The computer program product can include one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions of embodiments of the present disclosure are generated entirely or partially. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or another programmable device. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transferred from a website, computer, training device, or data center to another website, computer, training device, or data center via a wired manner (such as coaxial cable, optical fiber, digital subscriber line (DSL) ) or wireless manner (such as infrared, radio, microwave, etc. ) . The computer-readable storage medium can be any available medium of the computer for storage or a data storage device, such as a training device integrated by one or more available media and a data center. The available medium can include a magnetic medium (e.g., floppy disk, hard disks, magnetic tape) , an optical medium (e.g., DVD) , or a semiconductor medium (e.g., solid-state disk (SSD) ) , etc.

Claims

1.A clock control circuit configured to control a system clock comprising:a delay control module configured to receive a clock control signal and perform delay processing on the clock control signal to obtain a first clock signal, the delay processing being performed on the clock control signal using a target delay parameter; anda switch signal generation module configured to generate a clock switch signal of a first state based on the clock control signal and the first clock signal, the clock switch signal of the first state being used to switch the system clock from a first clock to a second clock, a frequency of the second clock being less than a frequency of the first clock.2.The clock control circuit according to claim 1, wherein the delay control module includes:a delay module configured to perform the delay processing on the clock control signal; anda configuration module configured to obtain the target delay parameter through training, the training including adjusting a delay parameter by using the clock switch signal as a feedback signal until the clock switch signal switches from a second state to the first state, saving a previous delay parameter of a current delay parameter as the target delay parameter, under the current delay parameter, a pulse of the clock control signal and a pulse of the first clock signal overlapping in time, and under the target delay parameter, the pulse of the clock control signal and the pulse of the first clock signal not overlapping in time.3.The clock control circuit according to claim 2, wherein:the configuration module includes a configuration register configured to set a configuration value during the training; andthe delay module includes a signal delay chain, the delay parameter of the signal delay chain is adjusted based on the configuration value of the register, and the first clock signal is output after the clock control signal is delayed by a delay amount corresponding to the delay parameter.4.The clock control circuit according to claim 1, wherein the switch signal generation module includes:a pulse-to-level circuit configured to perform an AND operation on the clock control signal and the first clock signal to generate a pulse signal, convert the pulse signal to a converted level, and synchronize the converted level under a current system clock to obtain the clock switch signal of the first state.5.The clock control circuit according to claim 4, wherein the switch signal generation module further includes:a reset generation circuit configured to generate a reset signal after detecting that the clock switch signal of the first state lasts for a preset time, and control the pulse-to-level circuit and the delay control module to reset based on the reset signal to switch the clock switch signal to the second state to switch the system clock from the second clock to the first clock.6.The clock control circuit according to claim 5, wherein:the preset time is obtained through the training; andthe training includes counting time based on the clock switch signal until the clock switch signal switches from the first state to the second state, and using time required for the clock switch signal to switch from the first state to the second state as the preset time.7.The clock control circuit according to claim 2, wherein the delay control module further includes:a first gating unit configured to obtain the clock control signal and perform first gating processing on the clock control signal to obtain a second clock signal to perform delay processing on the second clock signal to obtain the first clock signal; anda second gating unit configured to obtain the clock control signal and perform second gating processing on the clock control signal to obtain a third clock signal, and output the third clock signal to the switch signal generation module, so that the switch signal generation module generates the clock switch signal of the first state based on the third clock signal and the first clock signal.8.A clock control method comprising:obtaining a clock control signal;performing delay processing on the clock control signal using a target delay parameter to obtain a first clock signal;generating a clock switch signal of a first state based on the clock control signal and the first clock signal, the clock switch signal of the first state being used to switch a system clock from a first clock to a second clock, and a frequency of the second clock being less than a frequency of the first clock;generating a reset signal after detecting that the clock switch signal of the first state lasts for a preset time;controlling the clock switch signal to reset to a second state based on the reset signal, and switching the system clock from the second clock to the first clock;obtaining the target delay parameter through training, the training including adjusting a delay parameter by using the clock switch signal as a feedback signal until the clock switch signal switches from the second state to the first state, and saving a previous delay parameter of a current delay parameter as the target delay parameter, wherein under the current delay parameter, a pulse of the clock control signal and a pulse of the first clock signal overlap in time, and under the target delay parameter, the pulse of the clock control signal and the pulse of the first clock signal do not overlap in time.9.The clock control method according to claim 8, further comprising:obtaining the preset time through the training, the training including counting time based on the clock switch signal until the clock switch signal switches from the first state to the second state, and using time required for the clock switch signal to switch from the first state to the second state as the preset time.10.A clock control device comprising:one or more processors; andone or more memories storing a computer program that, when executed by the one or more processors, causes the one or more processors to:obtain a clock control signal;perform delay processing on the clock control signal using a target delay parameter to obtain a first clock signal; andgenerate a clock switch signal of a first state based on the clock control signal and the first clock signal, the clock switch signal of the first state being used to switch a system clock to a target clock.11.The clock control device according to claim 10, wherein the one or more processors are further configured to:perform the delay processing on the clock control signal; andobtain the target delay parameter through training, the training including adjusting a delay parameter by using the clock switch signal as a feedback signal until the clock switch signal switches from a second state to the first state, saving a previous delay parameter of a current delay parameter as the target delay parameter, under the current delay parameter, a pulse of the clock control signal and a pulse of the first clock signal overlapping in time, and under the target delay parameter, the pulse of the clock control signal and the pulse of the first clock signal not overlapping in time.12.The clock control device according to claim 11, wherein the one or more processors are further configured to:set a configuration value during the training; andadjust the delay parameter of a signal delay chain based on the configuration value of the register, and output the first clock signal after the clock control signal is delayed by a delay amount corresponding to the delay parameter.13.The clock control device according to claim 10, wherein the one or more processors are further configured to:perform an AND operation on the clock control signal and the first clock signal to generate a pulse signal, convert the pulse signal to a converted level, and synchronize the converted level under a current system clock to obtain the clock switch signal of the first state.14.The clock control device according to claim 13, wherein the one or more processors are further configured to:generate a reset signal after detecting that the clock switch signal of the first state lasts for a preset time, and control the pulse-to-level circuit and the delay control module to reset based on the reset signal to switch the clock switch signal to the second state to switch the system clock from the second clock to the first clock.15.The clock control device according to claim 14, wherein:the preset time is obtained through the training; andthe training includes counting time based on the clock switch signal until the clock switch signal switches from the first state to the second state, and using time required for the clock switch signal to switch from the first state to the second state as the preset time.16.The clock control device according to claim 11, wherein the one or more processors are further configured to:obtain the clock control signal and perform first gating processing on the clock control signal to obtain a second clock signal to perform delay processing on the second clock signal to obtain the first clock signal; andobtain the clock control signal and perform second gating processing on the clock control signal to obtain a third clock signal, and output the third clock signal to the switch signal generation module, so that the switch signal generation module generates the clock switch signal of the first state based on the third clock signal and the first clock signal.

Citation Information

Patent Citations

  • Method and apparatus for switched adaptive clocking

    US10707877B1

  • Apparatus and methods for reducing clock-ungating induced voltage droop

    US20180348809A1

  • Anti-aging clock source multiplexing

    US20230396253A1