Clock circuit, computing device and system on chip
By using clock gating technology in the clock circuit, the clock frequency is gradually increased, and the problem of power supply voltage fluctuations caused by sudden clock frequency changes is solved, thus achieving system stability and power consumption reduction.
Patent Information
- Application Number
- CN202110029800.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-10-30
- Filing Date
- 2021-01-11
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2041-01-11
AI Technical Summary
In the prior art, the sudden span of the clock frequency is too large, resulting in a sudden increase in load power consumption, which in turn causes the power supply voltage to be pulled down, resulting in system errors.
Design a clock circuit, through clock gating technology, gradually increase the clock frequency in multiple fixed periods, avoid sudden frequency changes and ensure the stability of the supply voltage. The clock circuit includes a clock generation circuit and a clock gating unit. The clock signal is gated only when the upscaling indication signal indicates upscaling, so that the average clock frequency of the gated clock signal gradually increases in multiple fixed periods until Reach the target clock frequency.
It effectively avoids the problem of lowering the supply voltage caused by sudden clock frequency changes, ensures stable operation of the system, reduces power consumption, and simplifies circuit design and implementation.
Smart Images

Figure CN114448399B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of chips, and in particular, to a clock circuit, a computing device, a system on chip, and a method for frequency increasing a clock signal. Background Art
[0002] The trend of miniaturization of integrated circuits has made processor manufacturers enthusiastic about how to reduce power consumption. There are two main ways to reduce power consumption of processors: dynamic voltage and frequency scaling (DVFS) and adaptive voltage and frequency scaling (AVFS). DVFS dynamically adjusts the system's clock frequency and supply voltage according to the different computing power requirements of the applications running on the processor, thereby achieving the purpose of energy saving. AVFS determines the system's supply voltage by measuring detection data in real time through sensors.
[0003] In DVFS and AVFS systems, adjusting the clock frequency and supply voltage can be divided into frequency increase operation and frequency reduction operation. In frequency increase operation, the supply voltage must be increased first, and then the clock frequency must be increased. In frequency reduction operation, the clock frequency must be reduced first and then the supply voltage must be reduced. However, in frequency increase operation, if the clock frequency mutation span is too large, it will cause a sudden increase in load power consumption, thereby causing the supply voltage to be pulled down. If the supply voltage is pulled down too much, it will cause system errors. Summary of the invention
[0004] In view of this, an object of the present disclosure is to provide a clock circuit, a system on chip, a computing device and a method for gating a clock signal to solve the problems existing in the prior art.
[0005] In a first aspect, an embodiment of the present disclosure provides a clock circuit, including:
[0006] A clock generating circuit, used for generating a clock signal;
[0007] A clock gating unit, coupled to the clock generating circuit, for receiving a frequency increase indication signal and the clock signal, and gating the clock signal only when the frequency increase indication signal indicates frequency increase, and then outputting the gated clock signal;
[0008] The clock frequency of the gated clock signal gradually increases during a plurality of fixed time periods, and is eventually up-converted to a target clock frequency.
[0009] Optionally, the clock generating circuit includes:
[0010] The clock source circuit has two output terminals that respectively output a first clock signal and a second clock signal, wherein the second clock signal is a clock signal after the first clock signal is upconverted.
[0011] The selector has two input ends receiving the first clock signal and the second clock signal respectively, and a control end receiving the frequency increase indication signal. When the frequency increase indication signal indicates frequency increase, the second clock signal is output, otherwise, the first clock signal is output.
[0012] Optionally, the clock gating unit includes:
[0013] A gating logic generator, configured to generate a gating logic signal when the frequency increase indication signal indicates frequency increase;
[0014] The gating unit is used to gate the clock signal using the gating logic signal when receiving the gating logic signal, and output the gated clock signal.
[0015] Optionally, the gating logic generator further receives a frequency increase ratio, and generates the gating logic signal according to the frequency increase ratio and the second clock signal, wherein the frequency increase ratio is a ratio of the target clock frequency to the clock frequency before the frequency increase.
[0016] Optionally, an average clock frequency of the gated clock signal in the plurality of fixed time periods increases at a uniform rate.
[0017] Optionally, the gating logic generator includes:
[0018] A first selector, configured to output a first excitation signal from the N excitation signals of the N input terminals according to a first selection control signal;
[0019] A second selector, configured to output one of the first excitation signal and the signal after the shift operation output by the right cyclic shifter according to a second selection control signal as an output signal;
[0020] A first register, coupled to the gate control unit, for buffering the output signal;
[0021] a right circular shifter, used for performing a right shift operation on the output signal,
[0022] Among them, from the first to the Nth excitation signal, the high level or low level used to indicate the gating gradually decreases within the multiple fixed time periods, and N is a positive integer greater than 1.
[0023] Optionally, the gate logic generator further includes an excitation controller and a slope controller, wherein the excitation controller calculates the first selection control signal based on the frequency modulation signal and the frequency up-conversion ratio, and the slope controller determines the second selection control signal based on the frequency modulation signal.
[0024] Optionally, the gating unit is ICG or integrates ICG.
[0025] Optionally, the second selection control signal represents the number of cycles of each excitation signal, and the growth slope of the clock frequency can be controlled by configuring the second selection control signal.
[0026] In a second aspect, an embodiment of the present disclosure provides a computing device, including:
[0027] A clock generating circuit, used for generating a clock signal;
[0028] A clock gating unit, coupled to the clock generating circuit, for receiving a frequency increase indication signal and the clock signal, and only when the frequency increase indication signal indicates frequency increase, gating the clock signal, and outputting a gated clock signal, wherein the clock frequency of the gated clock signal gradually increases in a plurality of fixed time periods, and finally frequency increases to a target clock frequency;
[0029] The execution unit is coupled to the clock gating unit and is used for executing a logic function with the gated clock signal.
[0030] Optionally, the clock generating circuit includes:
[0031] The clock source circuit has two output terminals that respectively output a first clock signal and a second clock signal, wherein the second clock signal is a clock signal after the first clock signal is upconverted.
[0032] The selector has two input ends receiving the first clock signal and the second clock signal respectively, and a control end receiving the frequency increase indication signal. When the frequency increase indication signal indicates frequency increase, the second clock signal is output, otherwise, the first clock signal is output.
[0033] Optionally, the clock gating unit includes:
[0034] A gating logic generator, configured to generate a gating logic signal when the frequency increase indication signal indicates frequency increase;
[0035] The gating unit is used to gate the clock signal using the gating logic signal when receiving the gating logic signal, and output the gated clock signal.
[0036] Optionally, the gating logic generator further receives a frequency increase ratio, and generates the gating logic signal according to the frequency increase ratio and the second clock signal, wherein the frequency increase ratio is a ratio of the target clock frequency to the clock frequency before the frequency increase.
[0037] Optionally, an average clock frequency of the gated clock signal in the plurality of fixed time periods increases at a uniform rate.
[0038] Optionally, the gating logic generator includes:
[0039] A first selector, configured to output a first excitation signal from the N excitation signals of the N input terminals according to a first selection control signal;
[0040] A second selector, configured to output one of the first excitation signal and the signal after the shift operation output by the right cyclic shifter according to a second selection control signal as an output signal;
[0041] A first register, coupled to the gate control unit, for buffering the output signal;
[0042] a right circular shifter, used for performing a right shift operation on the output signal,
[0043] Among them, from the first to the Nth excitation signal, the high level or low level used to indicate the gating gradually decreases within the multiple fixed time periods, and N is a positive integer greater than 1.
[0044] Optionally, the gate logic generator further includes an excitation controller and a slope controller, wherein the excitation controller calculates the first selection control signal based on the frequency modulation signal and the frequency up-conversion ratio, and the slope controller determines the second selection control signal based on the frequency modulation signal.
[0045] Optionally, the gating unit is ICG or integrates ICG.
[0046] In a third aspect, an embodiment of the present disclosure provides a system on chip, including:
[0047] Frequency modulation and voltage regulation controller, used for transmitting frequency modulation signals;
[0048] A clock circuit, coupled to the frequency modulation and voltage regulation controller, for generating a clock signal according to the frequency modulation signal, performing gating on the clock signal, and outputting the gated clock signal;
[0049] a processing unit for executing computer instructions based on the gated clock signal;
[0050] An on-chip bus, coupling the processing unit and the frequency and voltage regulation controller,
[0051] Wherein, the clock circuit is the clock circuit described in any one of the above items.
[0052] Optionally, the frequency and voltage regulation controller is a DVFS controller or an AVFS controller.
[0053] In a fourth aspect, an embodiment of the present disclosure provides a computing device, including:
[0054] The system on chip described in any one of the above items is used as a processor;
[0055] Off-chip bus;
[0056] a storage device coupled to the system on chip via the off-chip bus;
[0057] A power management circuit is coupled to the frequency and voltage regulation controller in the system on chip.
[0058] In a fifth aspect, an embodiment of the present disclosure provides a method for increasing the frequency of a clock signal, including:
[0059] generating a clock signal after frequency increase;
[0060] gating the up-converted clock signal and providing the gated clock signal to an execution unit, wherein the execution unit performs a logic function based on the gated clock signal,
[0061] The clock frequency of the gated clock signal gradually increases during a plurality of fixed time periods, and is eventually up-converted to a target clock frequency.
[0062] In a sixth aspect, an embodiment of the present disclosure provides a frequency control device, including:
[0063] A gating unit, used to gate an input signal based on a gating logic signal and output a gated output signal;
[0064] A stimulus generator, configured to receive the stimulus data from a stimulus configurator and store the stimulus data as gate control data, and generate the gate control logic signal according to the gate control data;
[0065] The stimulus configurator is used to output the stimulus data corresponding to the start sequence number to the end sequence number for the preset multiple stimulus data in the order of the stimulus sequence number from small to large, wherein the gate identifier contained in each stimulus data gradually decreases in the order of the stimulus sequence number from small to large;
[0066] A control unit is used to provide the start sequence number and the end sequence number to the stimulus configurator.
[0067] Optionally, the gating unit is ICG or integrates ICG.
[0068] Optionally, the excitation generator comprises:
[0069] A register, used to store the gating data;
[0070] The cyclic shifter is used for cyclically shifting each bit in the gated data in the same direction.
[0071] Optionally, the stimulus configurator includes: a selector, configured to output each stimulus data corresponding to a start sequence number to an end sequence number in ascending order of stimulus sequence numbers.
[0072] Optionally, the control unit calculates the start sequence number and the end sequence number according to the target frequency.
[0073] Optionally, the control unit provides a cycle number to the excitation generator, and the excitation generator repeatedly outputs a gating logic signal corresponding to the same gating data according to the cycle number.
[0074] Based on the above embodiments, it can be seen that the disclosed embodiments first generate a clock signal with a target frequency, and then gate the clock signal in time periods, so that the average clock frequency of the gated signal in multiple fixed time periods gradually increases until the target frequency is reached. This scheme of using clock gating technology to achieve frequency increase is relatively simple to implement, with low circuit design and complexity, and can solve the problems existing in the prior art with only limited cost increase. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] The above and other objects, features and advantages of the present disclosure will become more apparent through the description of the embodiments of the present disclosure with reference to the following drawings, in which:
[0076] Figure 1a is a block diagram of a gated clock (ICG) 10;
[0077] Figure 1b yes Figure 1a Corresponding signal timing diagram;
[0078] Figure 1c is a block diagram of a gated clock (ICG) 20;
[0079] Figure 1d yes Figure 1c The structure diagram of the corresponding signal timing diagram;
[0080] Figure 2 is a schematic diagram of the structure of a system on a chip provided by an embodiment of the present disclosure;
[0081] Figure 3a is a schematic diagram of an exemplary AVFS controller;
[0082] Figure 3b is a schematic diagram of an exemplary DVFS controller;
[0083] Figure 4 is a schematic diagram of the structure of a clock circuit provided by an embodiment of the present disclosure;
[0084] Figure 5 yes Figure 4 Timing diagram of the signals used;
[0085] Figure 6 is a structural diagram of another clock circuit provided by an embodiment of the present disclosure;
[0086] Figure 7a is a circuit structure diagram of a gated logic generator provided by an embodiment of the present disclosure;
[0087] Figure 7b yes Figure 7a A schematic diagram of the excitation signal used by the gated logic generator shown;
[0088] Figure 8 is a schematic diagram of the structure of a computing device provided by an embodiment of the present disclosure;
[0089] Fig. 9 is a flow chart of a method for frequency increasing a clock signal provided by an embodiment of the present disclosure;
[0090] Fig.10 is a schematic diagram of the structure of a general computer system used in an embodiment of the present disclosure;
[0091] Fig.11 is a schematic diagram of the structure of an embedded system used in an embodiment of the present disclosure;
[0092] Fig.12 is a structural schematic diagram of a frequency control device provided by an embodiment of the present disclosure;
[0093] Fig.13 for Fig.12 Timing diagram of the signals used. DETAILED DESCRIPTION
[0094] The present disclosure is described below based on embodiments, but the present disclosure is not limited to these embodiments. In the detailed description of the present disclosure below, some specific details are described in detail. It is possible for a person skilled in the art to fully understand the present disclosure without the description of these details. In order to avoid confusing the essence of the present disclosure, well-known methods, processes, and procedures are not described in detail. In addition, the drawings are not necessarily drawn to scale.
[0095] Before introducing various embodiments of the present disclosure, some terms or concepts used in the present disclosure are explained and clarified.
[0096] Clock frequency (also translated as: clock frequency speed, English: clock rate) refers to the basic frequency of the clock in the synchronous circuit. It is measured in "a number of cycles per second" and the unit of measurement is Hertz (Hz). For a clock signal, each cycle consists of two adjacent high and low levels.
[0097] The clock signal in digital electronic circuit design is used to synchronously control the digital state transition. The power consumption of digital circuit systems with higher clock frequencies increases accordingly. Clock gating technology achieves the purpose of reducing power consumption by gating the clock signal (that is, partially disabling the enabled part of the clock signal). Based on clock gating technology, when the enabled part of the clock signal is disabled, the corresponding devices enabled by the clock signal will not produce digital state transitions, which saves the power consumption of the digital state transition, thereby reducing the power consumption of the entire system. Clock gating technology has developed to the present day, and there are many mature and widely used circuit forms, which are called gated clocks (ICG). The following is a Figure 1a-1d Take the clock gating circuit as an example to introduce the structure and working principle of the clock gating circuit.
[0098] Figure 1a is a structural diagram of the gated clock (ICG) 10. Figure 1b yes Figure 1a Corresponding signal timing diagram. The gated clock 10 is used to gate the clock signal source_clk to obtain the gated clock signal gated_clock. As shown in the figure, the gated clock 10 includes a logic AND. The logic AND includes two input terminals and an output terminal. The two input terminals input the initial clock signal source_clk and the enable signal clk_en respectively. Source_clk and clk_en are operated by logic AND to obtain the gated clock signal gated_clock. Figure 1b yes Figure 1a As shown in the figure, when source_clk and clk_en are both high, the gate_clock is high, and when one of source_clk and clk_en is not high, the gate_clock is low.
[0099] Figure 1c is a structural diagram of the gated clock (ICG) 20. Figure 1d yes Figure 1c Corresponding signal timing diagram. The gated clock 20 includes a latch LACTH and a logic AND. The data terminal D of the latch LACTH inputs the signal EN, the control terminal CPN inputs the clock signal CP, and the output terminal Q outputs the signal QOUT. The input terminals of the logic AND respectively input Qout and the clock signal CP, and the output terminal outputs CLK_OUT.
[0100] The latch LACTH is a low-level latch, that is, when CP is low, QOUT is equal to EN, and when CP is high, LATCH performs a latch operation. Figure 1d , therefore, before t3, QOUT and EN are both low. Between t3 and t4, CP is high, and LACTH performs a latching operation to latch EN. Therefore, although EN becomes high between t3 and t4, QOUT is still low during this period. Between t4 and t5, CP is low, LATCH does not perform latching, QOUT and EN are both high, and then between t5 and t6, CP is high to latch EN, and QOUT remains high, and so on. Between t9 and t10, CP is high and latches EN, so QOUT remains high between t9 and t10.
[0101] The AND logic performs a logical AND operation on CP and QOUT to output CLK_OUT. As shown in the figure, between t5-t6, t7-t8 and t9-t10, CP and QOUT are both high level, so the output CLK_OUT is high level.
[0102] It should be noted that the gated clocks (ICG) 10 and 20 are only for illustration, and therefore adopt a relatively simple circuit structure. However, with the development of integrated circuit technology, gated clocks of various complex structures have been produced and widely used, such as multi-layer clock gating circuits, hierarchical clock gating circuits, and the like.
[0103] System on Chip
[0104] Figure 2 Schematic diagram of the structure of the system on chip 100 used in the embodiment of the present disclosure.
[0105] As shown in the reference figure, the high-speed memory 104 and the processing unit 101 and the frequency modulation and voltage regulation controller 103 are coupled together via the on-chip bus 102. The processing unit 101 is responsible for reading various instructions from the high-speed memory 104, and decoding and executing the instructions. The on-chip bus 102 is a high-performance, high-bandwidth, low-latency on-chip bus, such as an AXI bus. The AXI bus is the most important part of the AMBA (Advanced Microcontroller Bus Architecture) 3.0 and above protocols proposed by ARM. It is an on-chip bus oriented to high performance, high bandwidth, and low latency. The AIX bus separates the address / control and data phases, supports unaligned data transmission, and supports burst transmission and out-of-order transmission at the same time, thus meeting the requirements of ultra-high performance and complex on-chip system design.
[0106] The on-chip bus 102 may also be coupled to an interface circuit not shown, and coupled to an external device outside the chip through the interface circuit. The external device may be, for example, an input / output device for text, audio, and video and various other memories. The processing unit 101 may access the external device outside the chip through the interface circuit. Different from the high-speed memory 104 provided in the system on chip, the memory outside the chip may have a larger capacity but a slower speed and a lower cost. In some implementations, the high-speed memory 104 may be a static random access memory (SRAM), while the memory outside the chip may be a DRAM (dynamic random access memory) and a flash memory.
[0107] As shown in the figure, the system on chip 100 is also embedded with basic software (such as embedded control system 121) and application programs (such as application program AN). Other application programs can be stored in a memory outside the system on chip 100, and these application programs can be copied to the high-speed memory 104 in the system on chip 100 through the interface circuit, or access resources on the system on chip 100 through the interface circuit.
[0108] The processing unit 101 executes executable code from the embedded control system 121, the application AN or other applications. The executable code includes instructions related to the adjustment of the clock frequency and the power supply voltage. When the processing unit 101 executes these instructions, it sends instructions related to frequency and voltage regulation to the frequency and voltage regulation controller 103 to drive the frequency and voltage regulation controller 103 to perform frequency and voltage regulation related operations.
[0109] As shown in the figure, the frequency modulation and voltage regulation controller 103 is coupled to the clock circuit 105 and the power management circuit 211 located outside the chip, respectively, and is used to adjust the clock frequency and power supply voltage of the system according to the received instructions. For example, the processing unit 101 can send a target frequency to the frequency modulation and voltage regulation controller 103. When the frequency modulation and voltage regulation controller 103 determines that the target frequency is a legal value, it outputs a frequency modulation signal REGF to the clock circuit 105 according to the target frequency. The clock circuit 105 generates a clock signal FCPU provided to the processing unit 101 accordingly. Similarly, the frequency modulation and voltage regulation controller 103 can receive a target voltage, or generate a target voltage according to the target frequency, and then output a voltage regulation signal REGV to the power management circuit 211 according to the target voltage. The power management circuit 211 generates a power supply voltage signal VCPU provided to the processing unit 101 or other components accordingly, thereby completing the adjustment of the clock frequency and power supply voltage of the system. In addition, the frequency modulation and voltage regulation controller 103 can also send an alarm signal ALARM, for example, when it is determined that one of the target frequency and the target voltage is not a legal value, it sends an alarm signal ALARM to the processing unit 101.
[0110] The frequency and voltage modulation controller 103 may be an AVFS controller or a DVFS controller.
[0111] Figure 3a The AVFS controller is a schematic diagram of an exemplary AVFS controller. The AVFS controller measures the detection data in real time through sensors to determine the supply voltage of the system.
[0112] As shown in the figure, the AVFS controller 103 includes a register group for storing a configuration table 1031 , a voltage determination unit 202 , a frequency conversion control unit 206 , and a plurality of different sensor components for measuring detection data.
[0113] The configuration table 1031 includes multiple frequencies, which define the allowable value range of the clock frequency. After the AVFS controller 103 is powered on, the multiple frequencies are read from the one-time programmable storage unit and stored in the register group.
[0114] The voltage determination unit 202 calculates the value of the supply voltage according to the detection data measured in real time by the sensor component and the target frequency, and generates a voltage regulation signal REGV according to the supply voltage.
[0115] As shown in the figure, the multiple sensor components include a temperature sensor component, a process sensor component and a voltage sensor component. The temperature sensor component includes a temperature sensor controller 203 and a temperature sensor 206. The process sensor component includes a process sensor controller 204 and a process sensor 207. The voltage sensor component includes a voltage sensor controller 205 and a voltage sensor 208. The temperature sensor 206, the process sensor 207 and the voltage sensor 208 respectively collect analog signals of the real-time temperature, process deviation and real-time voltage of the system on chip 100, and convert the analog signals into digital signals. The temperature sensor controller 203, the process sensor controller 204 and the voltage sensor controller 205 respectively control the temperature sensor 206, the process sensor 207 and the voltage sensor 208, for example, to control the start and stop of the sensor to collect detection data. Among them, the process sensor component is used to calculate the process deviation, which will have an impact when determining the power supply voltage.
[0116] The voltage determination unit 202 can calculate the supply voltage based on the target frequency and the real-time temperature of the system 100 and the process deviation according to the predefined voltage calculation rules, or first calculate the supply voltage based on the target frequency and the real-time temperature of the system 100 according to the predefined voltage calculation rules, and then bias the supply voltage according to the process deviation. The voltage determination unit 202 can also receive the real-time voltage obtained by the voltage sensor 208, and compare the real-time voltage with the supply voltage to determine whether the previous voltage adjustment operation is successful. If it is unsuccessful, for example, the voltage value difference between the real-time voltage and the supply voltage is too large, the voltage calculation rules can be adjusted accordingly in the subsequent voltage calculation.
[0117] The frequency conversion control unit 206 generates a frequency modulation signal REGF according to the target frequency, and the frequency modulation signal REGF is transmitted to the clock circuit 105 to generate a clock signal FCPU.
[0118] In addition, before calculating the value of the supply voltage, the voltage determination unit 202 can also determine whether the target frequency is included in the multiple frequencies in the configuration table 1031. If so, the target frequency is determined to be a legal value. Only when the target frequency is a legal value, the voltage determination unit 202 calculates the value of the supply voltage according to the target frequency. Similarly, the frequency conversion control unit 206 generates the frequency modulation signal REGF according to the target frequency only when the target frequency is a legal value.
[0119] Figure 3b is a schematic diagram of an exemplary DVFS controller. The DVFS controller compares the target frequency with each frequency-voltage pair in at least one pre-stored frequency-voltage pair. When the frequency in a frequency-voltage pair matches the target frequency, the corresponding voltage value is taken as the target voltage, and then the clock frequency and the supply voltage of the system are adjusted according to the target frequency and the target voltage. It should be noted that the pre-stored frequency-voltage pair is a frequency-voltage pair that has been verified to enable the system on chip 100 to work normally.
[0120] As shown in the reference figure, register F is used to store the target frequency. Register group FV is used to store multiple frequency voltage pairs. Multiple comparators 303 are used to compare the target frequency in register F with the frequency voltage in register group FV. If they match, the voltage generation unit 302 generates a voltage regulation signal REGV, and the frequency conversion generation unit 301 generates a frequency modulation signal FCPU. If the error detection unit 304 detects that the target frequency does not match the frequency in any frequency voltage pair, the interrupt generation unit 305, the reset generation unit 306 or the bus response unit 307 generates an interrupt signal SINT, a reset signal RESET or a bus error signal SBUS. The interrupt signal SINT is processed by an interrupt controller (not shown in the figure). The interrupt controller can be set in the processing unit 101. The interrupt controller defines various processing routines for various interrupt signals. When the corresponding interrupt signal occurs, the corresponding processing routine is started to perform corresponding processing. The reset signal RESET will be sent to the reset circuit (not shown), and the reset circuit will reset the system on chip and restart. The bus error signal SBUS will be sent to the bus 102 for processing.
[0121] Clock circuit and clock gating circuit of the disclosed embodiment
[0122] In the above-mentioned system on chip, the clock circuit 105 generates a clock signal according to the frequency modulation signal. However, as described in the background, during the frequency increase operation of the clock circuit 105, if the clock frequency mutation span is too large, it will cause a sudden increase in load power consumption, thereby causing the supply voltage to be pulled down.
[0123] In order to solve this problem, the inventor first thought of controlling the clock frequency in the system to increase gradually. For example, if the clock frequency is increased from 500MHz to 2GHz, the clock frequency is first changed from 500M to 900M and then changed to 1200M after stabilizing for a period of time, and so on, and the frequency is gradually adjusted to 2GHz. However, experiments have shown that this method requires multiple steps to complete the frequency increase operation, and the control is complex and time-consuming. The inventor also thought of designing a dedicated clock circuit that supports a steady and slow increase in frequency, that is, the frequency will not suddenly increase from 500M to 2G, but will gradually and slowly increase to 2GHz inside the clock generation circuit. However, this method requires a specially designed clock circuit, which has high design difficulty and complexity. On this basis, the inventor thought of using the following method: Figure 4 The clock circuit 400 shown replaces the clock circuit 105 .
[0124] As shown in the figure, the clock circuit 400 includes a clock generating circuit 401 and a clock gating circuit 420. The clock generating circuit 401 is used to generate a clock signal Clock3, combined with Figure 2The clock generating circuit 401 receives the frequency modulation signal REGF from the frequency modulation and voltage regulation controller 103 and generates a clock signal Clock3.
[0125] The clock gating circuit 420 is used to receive the frequency increase indication signal IS. When IS indicates frequency increase, the input Clock3 is gated and the gated clock signal Clock4 is output. The clock gating circuit 420 can receive the frequency increase indication signal IS from the frequency modulation and voltage regulation controller 103. In some cases, the frequency increase indication signal IS and the frequency modulation signal REGF can be combined, that is, the same signal is used to notify the clock generation circuit 401 and the clock gating circuit 420 whether to increase the frequency. In some cases, the frequency modulation and voltage regulation controller 103 can also provide the clock gating circuit 420 with the change between the increased clock frequency and the current clock frequency, such as the frequency increase ratio or phase difference between the current clock frequency and the increased clock frequency. The clock gating circuit 420 determines whether to gate and the gating logic according to the change and the frequency increase indication signal IS.
[0126] The processing unit 101 executes computer instructions according to the gated clock signal Clock4.
[0127] According to an embodiment of the present disclosure, the gated signal Clock4 should have the following characteristics: the signal Clock4 includes multiple fixed time periods, within which the average clock frequency of each fixed time period is greater than or equal to or the same as the average clock frequency of the previous time period until the clock frequency of Clock2 is reached.
[0128] Figure 5 yes Figure 4 The signal timing diagram used by the clock gating unit in FIG. Based on the signal timing diagram, the embodiment of the present disclosure is further explained below. As can be seen from the figure, the clock frequency of Clock2 is greater than the clock frequency of Clock1. In this example, when IS is at a low level, it indicates a frequency increase. It is assumed here that the gating is implemented by the "logical AND" of the gating logic signal and the clock signal Clock3.
[0129] As shown in the reference figure, when IS is high, the output signal Clock4 is consistent with the clock signal Clock1. When IS is low (indicating frequency increase), the gated logic signal performs "logical AND" with Clock3. Therefore, the clock frequency of the output signal Clock4 can be controlled by controlling the gated logic signal. Finally, as shown in the figure, the average clock frequency of the signal Clock4 in the T1, T2 and T3 periods gradually increases. In the T3 period, the clock frequency of Clock4 is the same as that of Clock2, and then the clock frequency is maintained. The average clock frequency is equal to the number of cycles contained in 1 second, and the cycle consists of adjacent high and low levels. For example, in the figure, there are 3 cycles in the T1 period, 4 cycles in the T2 period, and 5 cycles in the T3 period. In the T3 period, the clock frequency of Clock4 is the same as that of Clock2.
[0130] exist Figure 5 In the example, the average clock frequency of the gated signal Clock4 in the fixed period T1-T3 increases at a uniform rate, that is, each of the three periods T1-T3 contains one more cycle than the previous period. However, this increase can also be non-uniform, refer to Figure 5 Assume that the first time period T includes 3 cycles, the second time period T also includes 3 cycles, and the third time period T includes 5 cycles. It should be noted that the three time periods T1-T3 are time-continuous time periods, but based on the embodiments of the present disclosure, in theory, time-discontinuous time periods can also be used.
[0131] According to the above embodiment, the clock circuit provided in the embodiment of the present disclosure gates the up-converted clock signal. Through gating, the gated clock signal gradually reaches the target frequency of the up-converted clock signal. This can avoid the problem that the clock frequency mutation span of the gated clock signal is too large, causing a sudden increase in load power consumption, thereby causing the supply voltage to be pulled down.
[0132] Continue to refer Figure 4 According to an embodiment of the present disclosure, the clock generating circuit 401 includes a clock source circuit 410 and a selector 430. The clock source circuit 410 generates a first clock signal Clock1 and a first clock signal Clock2 according to the frequency modulation signal REGF. The second clock frequency Clock2 is greater than the first clock frequency Clock1.
[0133] The clock source circuit 410 includes two output terminals, which are respectively coupled to the two input terminals of the selector 430. The clock source circuit 410 can be designed to generate only one clock signal at a time, that is, to generate the clock signals Clock1 and Clock2 in a time-sharing manner. The selector 430 indicates whether the output Clock3 is equal to the signal Clock1 or the signal Clock2 through the frequency increase indication signal IS. Specifically, when the frequency increase indication signal IS indicates frequency increase, the output Clock3 is equal to the clock signal Clock2, and when the frequency increase indication signal IS does not indicate frequency increase, the output Clock3 is equal to the clock signal Clock1. The clock source circuit 410 can also be designed to generate two clock signals at the same time. In this case, similarly, when the frequency increase indication signal IS indicates frequency increase, the output Clock3 of the selector 430 is equal to the clock signal Clock2, and when the frequency increase indication signal IS does not indicate frequency increase, the output Clock3 is equal to the clock signal Clock1.
[0134] The clock gating unit 420 may be an integrated circuit with an integrated gated clock (ICG), such as Figure 1a and Figure 1c However, the present disclosure is not limited thereto.
[0135] based on Figure 4 The circuit structure shown, the working process of the clock circuit 400 can be described as follows. First, the clock source circuit 410 generates the first clock signal Clock1. The first clock signal Clock1 is transmitted to the selector 430 via the first output terminal of the clock source circuit 410. At this time, the frequency increase indication signal IS received by the selector 430 does not indicate frequency increase, then the selector 430 outputs the first clock signal Clock1 to the clock gating circuit 420. When the received frequency increase indication signal IS does not indicate frequency increase, the clock gating circuit 420 transmits the first clock signal Clock1 to the processing unit 101, and the processing unit 101 executes computer instructions based on the first clock signal Clock1. After the first clock signal Clock1 is maintained for a period of time, the system indicates that the clock frequency is increased, and the clock signal 410 generates the second clock signal Clock2. The second clock signal Clock2 is transmitted to the selector 430 via the second output terminal of the clock source circuit 410. At this time, the frequency increase indication signal IS received by the selector 430 indicates frequency increase, and the selector 430 outputs the second clock signal Clock2 to the clock gating circuit 420. When the received frequency increase indication signal IS indicates frequency increase, the clock gating circuit 420 gates the second clock signal Clock2 and transmits the gated clock signal to the processing unit 101. The processing unit 101 executes computer instructions based on the gated clock signal.
[0136] According to an embodiment of the present disclosure, the clock gating unit 420 includes a logic device and a gating unit, wherein the logic device is used to generate a gating logic signal, and the gating unit is used to perform gating on an input clock signal.
[0137] refer to Figure 6 As shown, the clock gating unit 420 includes a gating unit 421 and a gating logic generator 422. The gating logic generator 422 is used to generate a gating logic signal and provide it to the gating unit 421. The gating unit 421 is used to gate the input clock signal Clock3 according to the gating logic signal and output the gated clock signal Clock4. The gating unit 421 is used for gating and can be an integrated circuit with a gated clock (ICG). The gated clock is, for example, Figure 1a and Figure 1c However, the present disclosure is not limited thereto.
[0138] In one embodiment, the gating logic generator 422 may include an input terminal, an enable terminal, and an output terminal. The enable terminal receives the frequency increase indication signal IS. When the frequency increase indication signal IS indicates frequency increase, the gating logic generator 422 is started. The input terminal receives the clock signal Clock3. After starting, the gating logic generator 422 generates a gating logic signal for the clock signal Clock3. The output terminal outputs the gating logic signal.
[0139] In another embodiment, the gating logic generator 422 includes two input terminals, an enable terminal and an output terminal. The enable terminal receives a frequency increase indication signal IS, and when the frequency increase indication signal IS indicates a frequency increase, the gating logic generator 422 is started. The two input terminals receive the clock signal Clock3 and the frequency increase ratio Counter during the frequency increase, respectively. After being started, the gating logic generator 422 generates a gating logic signal based on the clock signal Clock3 and the frequency increase ratio Counter. The output terminal outputs the gating logic signal. Preferably, in order to prevent the clock frequency input to the processing unit 101 from being less than the clock frequency of Clock1, the gating logic generator 422 will generate a gating logic signal with reference to the clock frequency of Clock1, so that the clock frequency of the gated clock signal in the first time period within multiple fixed time periods must be greater than or equal to the clock frequency of Clock1. Reference Figure 5,Assume that the clock frequency of Clock1 is 5Hz, the clock frequency of Clock2 should be 10Hz, and the frequency increase ratio Counter during frequency increase is 2, then the clock frequency of the gated signal Clock4 must be at least greater than 5, for example, it is increased from 6Hz to 8Hz, and finally increased to 10Hz. In other words, by using the clock frequency of Clock1 as a reference value to select a suitable gating logic signal, the clock frequency of the gated signal will never be less than the clock frequency of Clock1. The advantage of this is that in the frequency increase operation, by avoiding reducing the clock frequency of the processing unit 101 below the clock frequency of Clock1, the processing performance of the processing unit 101 is avoided from being reduced to below the current performance.
[0140] Based on the above embodiments, the present disclosure is compared with the solution previously thought of by the inventor. Although both of them realize the frequency increase operation of the clock signal, the concepts based on each are different. The frequency increase operation of the previous solution is to first generate a clock signal with a low clock frequency, and then gradually increase the clock frequency until the target frequency is reached. The frequency increase operation of the present disclosure is to first generate a clock signal with a target frequency (i.e., the frequency increased clock signal), and then gate the clock signal in time periods, so that the average clock frequency of the gated clock signal in multiple fixed time periods gradually increases until the gated clock signal reaches the target frequency.
[0141] Clock gating technology is already a very mature technology, so it is relatively simple to achieve frequency increase operation through clock gating circuit, and the circuit design and complexity are relatively low. In particular, for the target frequency to be achieved by frequency increase, the length of time or the number of steps can be set in advance, and a suitable gating logic signal can be generated to achieve more precise control of the operation time or operation steps of the frequency increase operation.
[0142] Figure 7a 4 is a circuit structure diagram of a gated logic generator provided in an embodiment of the present disclosure. Figure 7b yes Figure 7a Schematic diagram of the stimulus signals used by the gated logic generator shown.
[0143] The gate control logic generator 422 is used to output a gate control logic signal GS to the gate control unit 421. Figure 7a As shown, the gating logic generator 422 includes an excitation selector 701 , a slope controller 702 , a selector 703 , a selector 704 , a register group 705 , and a right circular shifter 706 .
[0144] The selector 703 outputs the selected excitation number from the N input excitation signals according to the selection control signal ctr1, where N is a positive integer greater than 1, and the gating times indicated by the first to the Nth excitation signals gradually decrease until the Nth excitation signal indicates that the clock signal is no longer gated. The selection control signal ctrl is determined according to the frequency modulation signal and the up-conversion ratio.
[0145] The selector 704 outputs one of the input excitation signal and the binary value input from the right cyclic shifter 706 according to the selection control signal ctr2. The selection control signal ctr2 is determined according to the frequency modulation signal.
[0146] The register 705 is used to store the output signal of the selector 704 .
[0147] The control signal Ctr2 indicates the number of cycles of each excitation signal. The number of cycles will affect the growth slope of the clock frequency. When the number of cycles is large, the system needs to spend a long time to reach the clock frequency after the frequency increase, so the growth slope of the clock frequency is relatively slow, thereby further avoiding the sudden change of the clock frequency. Further, the growth slope of the clock frequency can be controlled by configuring the control signal Ctr2, for example, different Ctr2s are configured for different systems, for example, for the above-mentioned system on chip, if the system on chip has a low tolerance for clock sudden changes, a higher value of Ctr2 can be set, so that although the frequency increase speed is slow, the probability of system errors can be reduced.
[0148] According to one embodiment of the present disclosure, the control end of the selector 703 is coupled to the output end of the excitation controller 701. The excitation controller 701 calculates the selection control signal Ctr1 according to the frequency modulation signal REGF and the frequency increase ratio Counter, and the control signal Ctr1 indicates one of the multiple excitation signals as the output of the selector 703. The control end of the selector 704 is coupled to the output end of the slope controller 702. The slope controller 702 outputs the selection control signal Ctr2 according to the frequency modulation signal REGF.
[0149] The following uses an example to illustrate the working process of the gate logic generator. The excitation signal 0-15 can be as follows Figure 7bAs shown. In the reference figure, the excitation signal 0 is equivalent to the 16-bit binary value '1000000000000000' (i.e., 16 cycles, only one high level), the excitation signal 1 is equivalent to the 16-bit binary value '100000001000000' (i.e., 16 cycles, two high levels), the excitation signal 2 is equivalent to the 16-bit binary value '1000010000010000' (i.e., 16 cycles have three high levels), the excitation signal 3 is equivalent to the 16-bit binary value '1000100010001000' (i.e., 16 cycles have four high levels), and so on. Among them, 0 means that the clock signal is gated, and 1 means that the clock signal is not gated. It can be seen that the number of gates contained in the excitation signals 0-15 gradually decreases. In this example, a cycle corresponds to a high level or a low level.
[0150] When the gate control logic generator 422 is working, first, the selector 703 outputs, for example, the excitation signal 2 according to ctr1. Then, the selector 704 outputs the excitation signal 2. The excitation signal 2 is cached in the register 705, and the register 705 outputs the binary value '1000010000010000' bit by bit to the gate control unit 421. The gate control unit 421 gates the clock signal in the remaining time periods except for the time periods numbered 0, 5 and 11 within 16 cycles according to the binary value. If the number of cycles indicated by ctr2 is greater than 1, for example, 2, the following operation based on the excitation signal 2 will be performed again: the selector 704 outputs the excitation signal 2. The excitation signal 2 is buffered in the register 705, which outputs the binary value '1000010000010000' bit by bit to the gating unit 421. The gating unit 421 gates the clock signal in the remaining time periods except 0, 5 and 11 within 16 cycles according to the binary value.
[0151] Then, the selector 703 outputs the excitation signal 3. At this time, the selector 704 will output the excitation signal 3. The excitation signal 3 is cached in the register 705, and then the register 705 outputs the binary value '1000100010001000' bit by bit to the gating unit 421, and the gating unit 421 gates the clock signal in the remaining cycles except for the cycles numbered 0, 4, 8 and 12 in 16 cycles according to the binary value. Similarly, if the number of cycles indicated by ctr2 is greater than 1, for example, 2, the above operation based on the excitation signal 3 will also be repeated 2 times. And so on.
[0152] When the excitation signal 15 is executed, since the 16-bit binary values corresponding to the excitation signal 15 are all 1, the gating unit 421 does not perform gating in all cycles, so that the clock frequency of the gated clock signal reaches the target frequency.
[0153] Based on this example, it can be seen that when the relevant operations for each stimulus signal are performed multiple times, it will take more time than performing it only once, so that more time is required to reach the target clock frequency, and thus the growth slope of the clock frequency is relatively slower.
[0154] The computing device provided by the embodiment of the present disclosure
[0155] refer to Figure 8 As shown, the computing device 800 provided in the embodiment of the present disclosure includes a clock generation circuit 801, a clock gating circuit 802 and an execution unit 803. The clock generation circuit 801 is used to generate a clock signal. The clock gating circuit 802 is used to gate the clock signal and output the gated clock signal to the execution unit 803. The execution unit 803 performs a logical function according to the gated clock signal. Among them, the clock frequency of the gated clock signal gradually increases in multiple fixed time periods, and finally increases to the target clock frequency.
[0156] The clock generating circuit 801 and the clock gating circuit 802 can refer to the above description of the clock generating circuit 401 and the clock gating circuit 420, which will not be described here.
[0157] The execution unit 803 is any integrated circuit that needs to use a clock signal to execute a logic function. The execution unit 703 can be various processing units, such as a central processing unit, an acceleration unit, a memory chip, a microprocessor, etc., or other logic units built for a specific purpose.
[0158] The computing device may be a part of an integrated circuit or may be a stand-alone device.
[0159] Method for increasing the frequency of clock signal
[0160] According to an embodiment of the present disclosure, a method for increasing the frequency of a clock signal is also provided. Fig. 9 The method includes steps S901 and S902.
[0161] Step S901 is used to generate a clock signal after the frequency is increased.
[0162] Step S902 is used to gate the up-converted clock signal and output the gated clock signal, wherein the clock frequency of the gated clock signal gradually increases in a plurality of fixed time periods and is eventually up-converted to a target clock frequency.
[0163] The implementation details of this method have been described in the above embodiments and will not be repeated here.
[0164] The frequency control device provided in this embodiment
[0165] The embodiment of the present disclosure also provides a frequency control device. Fig.12 1 shows a schematic diagram of the structure of the frequency control device 120. As shown in the figure, the frequency control device 120 includes a gate control unit 121, an excitation generator 122, an excitation configurator 123 and a control unit 124.
[0166] The gating unit 121 includes an input terminal, an output terminal and an enable terminal. The input terminal receives an input signal, and the enable terminal receives a gating logic signal. The gating unit 121 performs a logical operation on the input signal and the gating logic signal to implement a gating operation on the input signal, and outputs the signal after the gating operation from the output terminal.
[0167] The excitation generator 122 is used to output a gated logic signal according to the gated data. At the same time, the excitation data is continuously received from the excitation configurator 123 and stored as the gated data, that is, the gated data is continuously updated with the newly received excitation data. The excitation generator 122 includes an excitation table 1221 and a circular shifter 1223. The excitation table 1221 stores the gated data, and the gated data includes a plurality of gated identifiers, each of which indicates that the high level in the corresponding clock cycle is turned off. The gated identifier can be '0' or '1', depending on the logic operation in the gated unit 121. For example, if the logic operation of the gated unit is "logical AND", since the "logical AND" of the bit value '0' and the high level is a low level, the bit value '0' will gate out the high level of the corresponding clock cycle. However, the actual logic operation of the gated unit is very complex, so it is necessary to determine the gated identifier based on the actual circuit structure. In this example, the gated data represents 10 clock cycles, and '0' represents the gated identifier. The circular shifter 1223 is used to excite the data to continuously perform circular left shift (right shift).
[0168] The excitation configurator 123 is used to provide excitation data to the excitation generator 122, and includes a selector 1231. The n input terminals of the selector 1231 respectively input the first to n-th excitation data, and from the first to the n-th excitation data, the number of gating identifiers in the excitation data gradually decreases to the n-th excitation data, which may not include the gating identifier. According to the example of the gating identifier being '0', the n-th excitation data is all '1'.
[0169] The selection control end of the selector 1231 receives a selection signal from the control unit 124, and the selection signal includes a start sequence number and an end sequence number. The excitation configurator 123 outputs each excitation data corresponding to the start sequence number to the end sequence number. For example, if the start sequence number is 4 and the end sequence number is 8, the excitation configurator 123 will output the 4th to 8th excitation data to the excitation generator 122 in a chronological order. If the end sequence number is not provided, n can be defaulted to the end sequence number.
[0170] The control unit 124 can calculate the start sequence number and the end sequence number according to the frequency of the input signal and the target frequency, and provide them to the selector 1231. The control unit 124 can also receive a frequency conversion request from the outside, and determine whether the frequency control device 120 performs gating according to the frequency conversion request. The control unit 124 can also provide the number of cycles to the excitation generator 122, and the excitation generator 122 repeatedly outputs the gating logic signal corresponding to the same gating data according to the number of cycles.
[0171] Fig.13 An example of frequency conversion from 200MHz to 500MHz is shown. As can be seen from the figure, the frequency of the input signal is 1G, and the initial 200M frequency output signal is generated by gating out 8 high levels in every ten clock cycles of the gating unit 121, and the 300M frequency output signal is generated by gating out 7 high levels in every ten clock cycles of the gating unit 121. The output signals of 400M and 500M frequencies are also obtained in the same way. In other words, for an input signal with a frequency of 1G, multiple output signals from 200M->200M->300M-400M-500M are obtained through the gating unit, thus avoiding a direct frequency change from 200M to 500M.
[0172] In summary, the frequency control device provided in this embodiment obtains an output signal with a gradually increasing frequency by controlling the number of clocks gated out in each time period in order to avoid frequency mutation, until the output signal reaches the target frequency. Moreover, during the gating process, the frequency mutation of the output signal can be further mitigated by maintaining the clock signal of the same frequency for multiple time periods.
[0173] Specific Applications of System-on-Chip
[0174] Fig.10 The general computer architecture used in the embodiments of the present disclosure is shown. As shown in the figure, the computer system 900 may include one or more processors 12 and a memory 14. The system on chip provided in the above embodiments may be used as the processor 12.
[0175] The memory 14 in the computer system 900 may be a main memory (hereinafter referred to as main memory or internal memory), which is used to store instruction information and / or data information represented by data signals, such as storing data (such as calculation results) provided by the processor 12, and may also be used to implement data exchange between the processor 12 and an external storage device 16 (also referred to as auxiliary memory or external memory).
[0176] In some cases, the processor 12 may need to access the memory 14 to obtain data in the memory 14 or modify the data in the memory 14. Since the access speed of the memory 14 is slow, in order to alleviate the speed gap between the processor 12 and the memory 14, the computer system 900 also includes a cache memory 18 coupled to the bus 11, and the cache memory 18 is used to cache some program data or message data in the memory 14 that may be repeatedly called. The cache memory 18 is implemented by a storage device of the type of static random access memory (SRAM) for example. The cache memory 18 can be a multi-level structure, such as a three-level cache structure with a first-level cache (L1Cache), a second-level cache (L2Cache) and a third-level cache (L3Cache), or a cache structure of more than three levels or other types of cache structures. In some embodiments, a portion of the cache memory 18 (such as a first-level cache, or a first-level cache and a second-level cache) can be integrated inside the processor 12 or integrated with the processor 12 in the same system on a chip.
[0177] Based on this, the processor 12 may include an instruction execution unit 121, a memory management unit 122, and other parts. The instruction execution unit 121 initiates a write access request when executing some instructions that need to modify the memory. The write access request specifies the write data and the corresponding physical address that need to be written into the memory; the memory management unit 122 is used to translate the virtual addresses specified by these instructions into the physical addresses mapped by the virtual addresses. The physical address specified by the write access request may be consistent with the physical address specified by the corresponding instruction.
[0178] The information exchange between the memory 14 and the cache memory 18 is usually organized in blocks. In some embodiments, the cache memory 18 and the memory 14 can be divided into data blocks according to the same spatial size, and the data block can be used as the minimum unit of data exchange between the cache memory 18 and the memory 14 (including one or more data of a preset length). For the sake of simplicity and clarity, the data blocks in the cache memory 18 are referred to as cache blocks (which can be called cache lines or cache lines), and different cache blocks have different cache block addresses; the data blocks in the memory 14 are referred to as memory blocks, and different memory blocks have different memory block addresses. The cache block address includes, for example, a physical address tag for locating the data block.
[0179] Due to space and resource limitations, the cache memory 18 cannot cache all the contents in the memory 14, that is, the storage capacity of the cache memory 18 is usually smaller than that of the memory 14, and the cache block addresses provided by the cache memory 18 cannot correspond to all the memory block addresses provided by the memory 14. When the processor 12 needs to access the memory, it first accesses the cache memory 18 via the bus 11 to determine whether the content to be accessed has been stored in the cache memory 18. If so, the cache memory 18 hits, and the processor 12 directly calls the content to be accessed from the cache memory 18; if the content that the processor 12 needs to access is not in the cache memory 18, the cache memory 18, the processor 12 needs to access the memory 14 via the bus 11 to find the corresponding information in the memory 14. Because the access rate of the cache memory 18 is very fast, when the cache memory 18 hits, the efficiency of the processor 12 can be significantly improved, thereby improving the performance and efficiency of the entire computer system 900.
[0180] In addition, the computer system 900 may also include input / output devices such as a storage device 16, a display device 13, an audio device 19, and a mouse / keyboard 15. The storage device 16 is, for example, a hard disk, an optical disk, a flash memory, and other devices for information access coupled to the bus 11 through a corresponding interface. The display device 13 is, for example, coupled to the bus 11 through a corresponding graphics card, and is used to display according to a display signal provided by the bus 11.
[0181] The computer system 900 also typically includes a communication device 17, so that it can communicate with a network or other devices in various ways. The communication device 17 may include, for example, one or more communication modules. As an example, the communication device 17 may include a wireless communication module suitable for a specific wireless communication protocol. For example, the communication device 17 may include a WLAN module for implementing Wi-FiTM communication that complies with the 902.11 standard established by the Institute of Electrical and Electronics Engineers (IEEE); the communication device 17 may also include a WWAN module for implementing wireless wide area communication that complies with cellular or other wireless wide area protocols; the communication device 17 may also include a communication module that uses other protocols, such as a Bluetooth module, or other custom types of communication modules; the communication device 17 may also be a port for serial transmission of data.
[0182] Of course, the structure of different computer systems may vary according to the motherboard, operating system and instruction set architecture. For example, many computer systems are currently provided with an input / output control center connected between the bus 11 and various input / output devices, and the input / output control center can be integrated into the processor 12 or independent of the processor 12.
[0183] Fig.11 951 is a structural diagram of an embedded system used in the embodiments of the present disclosure. The system on chip provided in the above embodiments can be used as the processor 951.
[0184] Although embedded systems are highly similar to computer systems in hardware structure, the characteristics of embedded system applications make them quite different from general computer systems in hardware composition and implementation.
[0185] First, in order to meet the requirements of the embedded system 950 in terms of speed, volume and power consumption, the operating system, application software, special data and other data that need to be stored for a long time usually do not use storage media such as disks with large capacity and slow speed, but mostly use random access memory 952 or flash memory (Flash Memory) 953.
[0186] In addition, in the embedded system 950, an A / D (analog / digital conversion) interface 955 and a serial interface 956 are required for the needs of measurement and control, which are rarely used in general-purpose computers. The A / D interface 955 mainly completes the conversion of analog signals to digital signals and the conversion of digital signals to analog signals required in the test. The embedded system 950 often needs to be tested when applied to industrial production. Since the single-chip microcomputer generates digital signals, it needs to be converted into analog signals for testing during testing. Therefore, unlike general-purpose computers, an A / D (analog / digital conversion) interface 955 is required to complete the relevant conversion. In addition, multiple embedded systems are often required to be connected in series in industry to complete relevant functions, so a serial interface 956 is required for connecting multiple embedded systems in series, which is mostly not required in general-purpose computers.
[0187] In addition, as a basic processing unit, the embedded system 950 often needs to connect multiple embedded systems 950 into a network in industrial design, so a network interface 957 is needed to connect the embedded system 950 to the network. This is also not needed in most general-purpose computers. In addition, according to the actual application and scale, some embedded systems 950 need to use external buses 954. With the rapid expansion of the application field of embedded systems 950, embedded systems 950 are becoming more and more personalized, and the types of buses used according to their own characteristics are also increasing. In addition, in order to test the internal circuits of the embedded processor 951, the processor chip generally adopts boundary scan test technology. In order to adapt to this test, a debugging interface 958 is used.
[0188] With the rapid development of very large scale integration (VLSI) and semiconductor technology, part or all of the above embedded systems can be implemented on a silicon chip, namely, an embedded system on chip (SoC).
[0189] The commercial value of the disclosed embodiments
[0190] The clock circuit provided in the embodiment of the present disclosure can be applied to a system on chip based on AVFS or DVFS. The clock circuit can solve the problem of the power supply voltage being pulled down due to the voltage mutation during the frequency increase in the frequency modulation and voltage regulation operation, and ensure the success of the frequency modulation and voltage regulation operation. The system on chip thus obtained can be used to form a computing device used in a variety of scenarios, such as a large number of cloud servers in a data center. In this scenario, the power consumption of each cloud server is reduced by reducing the power consumption of the processor, thereby reducing the operating cost of each cloud server and the entire data center; for example, electronic devices used in daily life, including terminal devices such as notebooks and mobile phones, and certain consumer electronic products, can improve the system battery life of electronic devices by reducing power consumption, thereby improving user experience. It can be seen that the clock circuit, system on chip, and computing device constructed by the system on chip of the embodiment of the present disclosure have commercial value and economic value on the basis of practical value.
[0191] Those skilled in the art will appreciate that the present disclosure may be implemented as systems, methods, and computer program products. Therefore, the present disclosure may be specifically implemented in the following forms, namely complete hardware, complete software (including firmware, resident software, microcode), and may also be implemented in the form of a combination of software and hardware. In addition, in some embodiments, the present disclosure may also be implemented in the form of a computer program product in one or more computer-readable media, which contains computer-readable program code.
[0192] Any combination of one or more computer-readable media may be used. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example but not limited to, an electrical, magnetic, optical, electromagnetic, infrared or semiconductor system, device or device, or any combination thereof. More specific examples of computer-readable storage media include: an electrical connection of one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this article, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by a processing unit, a device or a device, or used in combination with the program.
[0193] Computer readable signal media may include data signals propagated in baseband or as part of a chopped wave, which carry computer readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any other suitable combination. Computer readable signal media may also be any computer readable medium other than a computer readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction system, apparatus, or device.
[0194] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., and any suitable combination of the foregoing.
[0195] The computer program code for executing the disclosed embodiments may be written in one or more programming languages or combinations. The programming languages include object-oriented programming languages, such as JAVA, C++, and may also include conventional procedural programming languages, such as C. The program code may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet).
[0196] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A clock circuit, comprising: A clock generating circuit, used for generating a clock signal; A clock gating unit, coupled to the clock generating circuit, for receiving a frequency increase indication signal and the clock signal, and gating the clock signal only when the frequency increase indication signal indicates frequency increase, and then outputting the gated clock signal; The gated clock signal gradually increases its clock frequency in multiple fixed time periods and eventually reaches the target clock frequency. Wherein, the clock gating unit comprises: A gating logic generator, configured to generate a gating logic signal when the frequency increase indication signal indicates frequency increase; a gating unit, configured to, upon receiving the gating logic signal, gate the clock signal using the gating logic signal and output the gated clock signal, The gate control logic generator comprises: A first selector, configured to output a first excitation signal from the N excitation signals of the N input terminals according to a first selection control signal; A second selector, configured to output one of the first excitation signal and the signal after the shift operation output by the right cyclic shifter according to a second selection control signal as an output signal; A first register, coupled to the gate control unit, for buffering the output signal; a right circular shifter, used for performing a right shift operation on the output signal, Among them, from the first to the Nth excitation signal, the high level or low level used to indicate the gating gradually decreases within the fixed time period, and N is a positive integer greater than 1.
2. The clock circuit according to claim 1, wherein: The clock generating circuit comprises: A clock source circuit, wherein two output terminals respectively output a first clock signal and a second clock signal, wherein the second clock signal is a clock signal obtained by frequency conversion based on the first clock signal; The selector has two input ends receiving the first clock signal and the second clock signal respectively, and a control end receiving the frequency increase indication signal. When the frequency increase indication signal indicates frequency increase, the second clock signal is output, otherwise, the first clock signal is output.
3. The clock circuit according to claim 2, wherein: The gating logic generator further receives a frequency increase ratio, and generates the gating logic signal according to the frequency increase ratio and the second clock signal, wherein the frequency increase ratio is a ratio of the target clock frequency to the clock frequency before the frequency increase.
4. The clock circuit according to claim 1, wherein: The average clock frequency of the gated clock signal in the plurality of fixed time periods increases at a uniform rate.
5. The clock circuit according to claim 1, wherein: The gate logic generator further includes an excitation controller and a slope controller. The excitation controller calculates the first selection control signal based on a frequency modulation signal and a frequency up-ratio. The slope controller determines the second selection control signal based on the frequency modulation signal.
6. The clock circuit according to claim 1, wherein: The gating unit is an ICG or is integrated with an ICG.
7. The clock circuit according to claim 1, wherein: The second selection control signal represents the number of cycles of each excitation signal, and the growth slope of the clock frequency is controlled by configuring the second selection control signal.
8. A computing device, comprising: A clock generating circuit, used for generating a clock signal; A clock gating unit, coupled to the clock generating circuit, for receiving a frequency increase indication signal and the clock signal, and only when the frequency increase indication signal indicates frequency increase, gating the clock signal, and outputting a gated clock signal, wherein the clock frequency of the gated clock signal gradually increases in a plurality of fixed time periods, and finally frequency increases to a target clock frequency; an execution unit, coupled to the clock gating unit, for executing a logic function with the gated clock signal, Wherein, the clock gating unit comprises: A gating logic generator, configured to generate a gating logic signal when the frequency increase indication signal indicates frequency increase; a gating unit, configured to, upon receiving the gating logic signal, gate the clock signal using the gating logic signal and output the gated clock signal, The gate control logic generator comprises: A first selector, configured to output a first excitation signal from the N excitation signals of the N input terminals according to a first selection control signal; A second selector, configured to output one of the first excitation signal and the signal after the shift operation output by the right cyclic shifter according to a second selection control signal as an output signal; A first register, coupled to the gate control unit, for buffering the output signal; a right circular shifter, used for performing a right shift operation on the output signal, Among them, from the first to the Nth excitation signal, the high level or low level used to indicate the gating gradually decreases within the fixed time period, and N is a positive integer greater than 1.
9. The computing device according to claim 8, wherein: The clock generating circuit comprises: A clock source circuit, wherein two output terminals respectively output a first clock signal and a second clock signal, wherein the second clock signal is a clock signal obtained by frequency conversion based on the first clock signal; The selector has two input ends receiving the first clock signal and the second clock signal respectively, and a control end receiving the frequency increase indication signal. When the frequency increase indication signal indicates frequency increase, the second clock signal is output, otherwise, the first clock signal is output.
10. The computing device according to claim 9, wherein: The gating logic generator further receives a frequency increase ratio, and generates the gating logic signal according to the frequency increase ratio and the second clock signal, wherein the frequency increase ratio is a ratio of the target clock frequency to the clock frequency before the frequency increase.
11. The computing device according to claim 8, wherein: The average clock frequency of the gated clock signal in the plurality of fixed time periods increases at a uniform rate.
12. The computing device according to claim 8, wherein: The gate logic generator further includes an excitation controller and a slope controller. The excitation controller calculates the first selection control signal based on a frequency modulation signal and a frequency up-ratio. The slope controller determines the second selection control signal based on the frequency modulation signal.
13. The computing device of claim 8, wherein: The gating unit is an ICG or is integrated with an ICG.
14. A system on chip, comprising: Frequency modulation and voltage regulation controller, used for transmitting frequency modulation signals; A clock circuit, coupled to the frequency modulation and voltage regulation controller, for generating a clock signal according to the frequency modulation signal, performing gating on the clock signal, and outputting the gated clock signal; a processing unit for executing computer instructions based on the gated clock signal; An on-chip bus, coupling the processing unit and the frequency and voltage regulation controller, Wherein, the clock circuit is the clock circuit described in any one of claims 1 to 7.
15. The system on chip according to claim 14, wherein: The frequency and voltage regulation controller is a DVFS controller or an AVFS controller.
16. A computing device comprising: The system on chip as claimed in claim 14 or 15 as a processor; Off-chip bus; a storage device coupled to the system on chip via the off-chip bus; A power management circuit is coupled to the frequency and voltage regulation controller in the system on chip.
17. A method for increasing the frequency of a clock signal, comprising: generating a clock signal after frequency increase; gating the up-converted clock signal based on N excitation signals, and providing the gated clock signal to an execution unit, wherein the execution unit performs a logic function based on the gated clock signal, Among them, from the first to the Nth excitation signal, the high level or low level used to indicate the gating gradually decreases in each fixed time period, and N is a positive integer greater than 1, so that the clock frequency of the gated clock signal gradually increases in multiple fixed time periods and is finally up-converted to the target clock frequency.
18. A frequency control device, comprising: A gating unit, used to gate an input signal based on a gating logic signal and output a gated output signal; The stimulus generator is used to receive stimulus data from the stimulus configurator and store the stimulus data as gate control data, and generate the gate control logic signal according to the gate control data; The stimulus configurator is used to output the stimulus data corresponding to the start sequence number to the end sequence number for the preset multiple stimulus data in the order of the stimulus sequence number from small to large, wherein the gate identifier contained in each stimulus data gradually decreases in the order of the stimulus sequence number from small to large; A control unit is used to provide the start sequence number and the end sequence number to the stimulus configurator.
19. The frequency control device according to claim 18, wherein: The gating unit is an ICG or is integrated with an ICG.
20. The frequency control device according to claim 18, wherein: The excitation generator comprises: A register, used to store the gating data; The cyclic shifter is used for cyclically shifting each bit in the gated data in the same direction.
21. The frequency control device according to claim 18, wherein: The stimulus configurator comprises: a selector for outputting the stimulus data corresponding to the starting sequence number to the ending sequence number in the order of the stimulus sequence number from small to large.
22. The frequency control device according to claim 18, wherein: The control unit calculates the start sequence number and the end sequence number according to the target frequency and the frequency of the input signal.
23. The frequency control device according to claim 18, wherein: The control unit provides the excitation generator with a cycle number, and the excitation generator repeatedly outputs a gating logic signal corresponding to the same gating data according to the cycle number.
