Clock switching circuits and clock modules, chips, and computing devices that utilize them.

By designing a clock switching circuit, the problems of slow response during chip startup and high power consumption under low load were solved, enabling flexible switching between fast response and low power consumption and improving the performance of computing devices.

CN115756087BActive Publication Date: 2026-11-17HANGZHOU CANAAN INTELLIGENCE INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211365396.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-31
Publication Date
2026-11-17
Estimated Expiration
2042-10-31

AI Technical Summary

Technical Problem

In existing technologies, chips cannot respond quickly during startup and consume a lot of power when working under low load, which cannot meet the needs of different scenarios.

Method used

A clock switching circuit is provided, including a frequency adjustment unit, a status detection unit, a clock enable signal generation unit, and a clock switching unit. Through the cooperation of counting comparison and phase-locked loop, the initial clock and reference clock can be flexibly switched to adapt to different working requirements.

Benefits of technology

This enables the chip to respond quickly at startup and reduce power consumption during low-load operation, thereby improving the performance and flexibility of computing devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115756087B_ABST
    Figure CN115756087B_ABST
Patent Text Reader

Abstract

This invention provides a clock switching circuit and a clock module, chip, and computing device using the same. The clock switching circuit includes a frequency adjustment unit for receiving an initial clock signal and outputting a reference clock signal; a status detection unit for detecting the frequency adjustment unit and outputting a status indication signal; a clock enable signal generation unit for outputting a clock enable signal based on the status indication signal; and a clock switching unit for outputting a working clock signal based on the clock enable signal, the initial clock signal, and the reference clock signal; wherein, after the frequency adjustment unit stabilizes for a certain period of time, the status indication signal enables the clock enable signal generation unit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a clock switching circuit, and more particularly to a clock switching circuit that can adapt to different scenario requirements, as well as clock modules, chips, computing boards and computing devices using the same. Background Technology

[0002] With the development of chip technology, the requirements for low-power chip design are becoming increasingly stringent, necessitating extremely low power consumption during sleep and low-load operation. However, in some scenarios, chips also require rapid startup and fast response. Therefore, chip clock design schemes need to consider the needs of different scenarios.

[0003] In existing technologies, the operating clocks of various modules within a chip typically operate on the clock of a phase-locked loop (PLL) or a divided clock. For example, in a CPU, the CPU clock is only generated after the PLL frequency division stabilizes, at which point the CPU begins to operate. The chip's power-on stabilization time varies from tens of microseconds (µs) to tens of milliseconds (ms). During this time, the CPU cannot operate because there is no clock, which cannot meet the requirements of chips that need to start up quickly.

[0004] Therefore, how to provide a clock switching circuit that can operate on the crystal oscillator clock when the chip starts up, and can also switch to the crystal oscillator clock when the chip needs to operate under low load, so as to flexibly adapt to different needs, is a problem that needs to be solved. Summary of the Invention

[0005] To address the aforementioned issues, this invention provides a clock switching circuit and clock modules, chips, computing boards, and computing devices that utilize it. This circuit enables the chip to operate on a crystal oscillator clock during startup and can switch to the crystal oscillator clock when the chip requires low-load operation, flexibly adapting to different needs, improving the performance of the computing device, and reducing power consumption.

[0006] To achieve the above objectives, the present invention provides a clock switching circuit, comprising: a frequency adjustment unit for receiving an initial clock signal and outputting a reference clock signal; a state detection unit for detecting the frequency adjustment unit and outputting a state indication signal; a clock enable signal generation unit for outputting a clock enable signal according to the state indication signal; and a clock switching unit for outputting a working clock signal according to the clock enable signal, the initial clock signal, and the reference clock signal; wherein, after the frequency adjustment unit stabilizes for a certain period of time, the state indication signal enables the clock enable signal generation unit.

[0007] In the aforementioned clock switching circuit, the state detection unit includes a counting comparison unit, and the time length is determined by the counting comparison unit.

[0008] In the aforementioned clock switching circuit, the counting and comparison unit includes a counter and a comparator;

[0009] The counter is used to receive the initial clock signal and count to obtain a count value, and the comparator is used to compare the count value with a predetermined value and output a first lock indication signal.

[0010] In the aforementioned clock switching circuit, the state detection unit further includes a synchronization unit, which synchronizes a lock signal received from the frequency adjustment unit with the initial clock signal and outputs a second lock indication signal.

[0011] In the aforementioned clock switching circuit, the status detection unit further includes a gating unit, which is used to receive the first lock indication signal and the second lock indication signal and output the status indication signal.

[0012] In the aforementioned clock switching circuit, the gating unit is further configured to receive a lock selection signal, and the gating unit transmits either the first lock indication signal or the second lock indication signal according to the lock selection signal.

[0013] The clock switching circuit described above further includes a frequency divider for receiving the reference clock signal. The frequency divider includes a first frequency divider and a second frequency divider. The first frequency divider is used to output a first frequency-divided clock signal, and the second frequency divider is used to output a second frequency-divided clock signal.

[0014] The clock switching circuit described above includes a first clock enable signal generation unit and a second clock enable signal generation unit.

[0015] The first clock enable signal generation unit is used to receive the status indication signal and a first clock selection signal, and output a first clock enable signal;

[0016] The second clock enable signal generation unit is used to receive the status indication signal and a second clock selection signal, and output a second clock enable signal.

[0017] In the aforementioned clock switching circuit, the first clock enable signal generation unit or the second clock enable signal generation unit includes an AND gate.

[0018] The clock switching circuit described above includes a first clock switching unit and a second clock switching unit.

[0019] The first clock switching unit is used to output the initial clock signal or a first working clock signal according to the first clock enable signal;

[0020] The second clock switching unit is used to output the initial clock signal or a second working clock signal according to the second clock enable signal.

[0021] In the aforementioned clock switching circuit, the frequency adjustment unit includes a phase-locked loop.

[0022] In the aforementioned clock switching circuit, the synchronization unit includes at least one flip-flop.

[0023] To better achieve the above objectives, the present invention also provides a clock module, wherein it includes at least one clock switching circuit as described above.

[0024] To better achieve the above objectives, the present invention also provides a chip, wherein it includes at least one clock module as described above.

[0025] To better achieve the above objectives, the present invention also provides a computing device, wherein at least one of the chips described above is included.

[0026] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments, but this is not intended to limit the present invention. Attached Figure Description

[0027] Figure 1 This is a schematic diagram of the circuit structure of a clock switching circuit according to an embodiment of the present invention.

[0028] Figure 2 This is a schematic diagram of the circuit structure of a state detection unit according to an embodiment of the present invention.

[0029] Figure 3 This is a schematic diagram of the circuit structure of a clock enable signal generation unit according to an embodiment of the present invention.

[0030] In the attached figures, the following labels are used:

[0031] 100: Clock switching circuit

[0032] 101: Frequency Adjustment Unit

[0033] 102: Status Detection Unit

[0034] 1021: Counting Comparison Unit 1021

[0035] 1022: Synchronization Unit

[0036] 1023: Gating Unit

[0037] 103: Clock enable signal generation unit 103

[0038] 104: Frequency divider

[0039] 1041: First frequency divider

[0040] 1042: Second frequency divider

[0041] 105: Clock switching unit

[0042] 1051: First Clock Switching Unit

[0043] 1052: Second clock switching unit Detailed Implementation

[0044] The structural and working principles of the present invention will be described in detail below with reference to the accompanying drawings:

[0045] Certain terms are used in the specification and subsequent claims to refer to specific components. It will be understood by those skilled in the art that manufacturers may use different names to refer to the same component. This specification and subsequent claims do not distinguish components by differences in name, but rather by differences in function.

[0046] Throughout this specification and in the following claims, the terms "comprising" and "including" are open-ended and should be interpreted as "comprising but not limited to". Furthermore, the term "connection" here includes any direct and indirect electrical connection means. Indirect electrical connection means include connections made through other means.

[0047] Figure 1 This is a schematic diagram of the circuit structure of a clock switching circuit according to an embodiment of the present invention. Figure 1As shown, the clock switching circuit 100 of the present invention includes a frequency adjustment unit 101 for receiving an initial clock signal OSC and outputting a reference clock signal pll_oclk; a status detection unit 102 for detecting the frequency adjustment unit 101 and outputting a status indication signal pll_lock; and a clock enable signal generation unit 103 for outputting a clock enable signal according to the status indication signal pll_lock. In one embodiment, this may include a first clock enable signal clk0_sel and a second clock enable signal clk1_sel. In another embodiment, it may also include a frequency divider 104 for receiving... The reference clock signal pll_oclk is output as a divided clock signal, which may include a first divided clock signal div_clk0 and a second divided clock signal div_clk1; the clock switching unit 105 is used to output a working clock signal according to the clock enable signal, the initial clock signal OSC and the reference clock signal pll_oclk; as an embodiment, the clock switching unit 105 is used to output a first working clock signal CLKOUT0 and a second working clock signal CLKOUT1 according to the first clock enable signal clk0_sel and the second clock enable signal clk0_sel.

[0048] In the clock switching circuit 100 of the present invention, after the frequency adjustment unit 101 stabilizes for a certain period of time, the state detection unit 102 outputs a state indication signal pll_lock. The state indication signal pll_lock enables the clock enable signal generation unit 103 to generate a clock enable signal. As an embodiment, it may include a first clock enable signal clk0_sel and a second clock enable signal clk0_sel. The clock enable signal causes the clock switching unit 105 to switch from the initial clock signal OSC to the reference clock signal pll_oclk after the frequency adjustment unit 101 stabilizes, or to switch from the reference clock signal pll_oclk to the initial clock signal OSC after the chip has finished normal operation.

[0049] Figure 2 This is a schematic diagram of the circuit structure of a state detection unit according to an embodiment of the present invention. Figures 1-2 As shown, in the clock switching circuit 100 of the present invention, the state detection unit 102 includes a counting comparison unit 1021, a synchronization unit 1022 and a gating unit 1023, and the duration of the stable state of the frequency adjustment unit 101 is determined by the counting comparison unit 1021.

[0050] like Figure 2As shown, the counting and comparison unit 1021 includes a counter CNT and a comparator COMP connected in series. The counter CNT is used to receive the initial clock signal OSC and count to obtain the count value cnt. The comparator COMP is used to compare the count value cnt with the predetermined value TIM and output the first lock indication signal tim_lock according to the comparison result.

[0051] In other words, the counting comparison unit 1021 of the present invention is used to count the initial clock signal OSC. When the count reaches a predetermined value TIM, it enables the first lock indication signal tim_lock, making the first lock indication signal valid, for example, "1".

[0052] In this invention, a high level "1" indicates validity and a low level "0" indicates invalidity. Alternatively, a low level "0" can represent validity and a high level "1" can represent invalidity; this invention is not limited to these limitations. Of course, the counting and comparison unit can also have other implementations, as long as it can count according to the initial clock signal and generate a valid lock indication signal when the counting result reaches a predetermined value; this invention is not limited to these limitations.

[0053] The status detection unit 102 also includes a synchronization unit 1022, which synchronizes the received lock signal LOCK from the frequency adjustment unit 101 with the initial clock signal OSC and outputs a second lock indication signal LOCK_lock.

[0054] In this invention, the synchronization unit 1022 is described using a series of two flip-flops as an example. Of course, the synchronization unit may also include only one flip-flop or a series of multiple flip-flops, as long as the lock signal LOCK can be synchronized with the initial clock signal OSC. This invention is not limited to this.

[0055] The status detection unit 102 further includes a gating unit 1023, which receives a first lock indication signal tim_lock and a second lock indication signal LOCK_lock and outputs a status indication signal pll_lock. The status indication signal pll_lock output by the gating unit 1023 indicates the operating status of the frequency adjustment unit 101. The gating unit 1023 receives a lock selection signal Lock_sel and selects to transmit either the first lock indication signal tim_lock or the second lock indication signal LOCK_lock as the status indication signal pll_lock based on the lock selection signal Lock_sel.

[0056] The clock enable signal generation unit 103 includes a first clock enable signal generation unit 1031 and a second clock enable signal generation unit 1032. The first clock enable signal generation unit 1031 receives the status indication signal pll_lock and the first clock selection signal para_clk0_sel, and outputs the first clock enable signal clk0_sel; the second clock enable signal generation unit 1032 receives the status indication signal pll_lock and the second clock selection signal para_clk1_sel, and outputs the second clock enable signal clk1_sel.

[0057] When the status indicator signal pll_lock is valid (e.g., "1"), and the first clock selection signal para_clk0_sel is also valid (e.g., "1"), the first clock enable signal clk0_sel is valid (e.g., "1"). When the status indicator signal pll_lock is invalid (e.g., "0"), or the first clock selection signal para_clk0_sel is invalid (e.g., "0"), the first clock enable signal clk0_sel is invalid (e.g., "0"). Similarly, when the status indicator signal pll_lock is valid (e.g., "1"), and the second clock selection signal para_clk1_sel is also valid (e.g., "1"), the second clock enable signal clk1_sel is valid (e.g., "1"). When the status indicator signal pll_lock is invalid (e.g., "0"), or the second clock selection signal para_clk1_sel is invalid (e.g., "0"), the second clock enable signal clk1_sel is invalid (e.g., "0").

[0058] In this invention, a high level "1" indicates validity and a low level "0" indicates invalidity. Alternatively, a low level "0" can be used to indicate validity and a high level "1" to indicate invalidity. This invention is not limited to these two methods.

[0059] In this invention, the first clock enable signal generation unit 1031 or the second clock enable signal generation unit 1032 can be an AND gate or other circuit structures that generate AND logic, and this invention is not limited thereto.

[0060] Frequency divider 104 includes a first frequency divider 1041 and a second frequency divider 1042. The first frequency divider 1041 is used to output a first divided clock signal div_clk0, and the second frequency divider 1042 is used to output a second divided clock signal div_clk1. In this invention, the first frequency divider 1041 and the second frequency divider 1042 can be the same frequency divider or different frequency dividers, and this invention is not limited thereto.

[0061] The clock switching unit 105 includes a first clock switching unit 1051 and a second clock switching unit 1052. The first clock switching unit 1051 is used to output an initial clock signal OSC or a first working clock signal CLKOUT0 according to a first clock enable signal clk0_sel; the second clock switching unit 1052 is used to output an initial clock signal OSC or a second working clock signal CLKOUT1 according to a second clock enable signal clk1_sel.

[0062] When the first clock enable signal clk0_sel is valid, for example, "1", the first working clock CLKOUT0 of the first clock switching unit 1051 outputs the first divided clock signal div_clk0, which can be applied to the chip when it is working normally after the chip startup frequency adjustment unit 101 has stabilized; when the first clock enable signal clk0_sel is invalid, for example, "0", the first working clock CLKOUT0 of the first clock switching unit 1051 outputs the initial clock signal OSC, which can be applied when the chip is just started or when low-load operation is required.

[0063] When the second clock enable signal clk1_sel is valid, for example, "1", the second working clock CLKOUT1 of the second clock switching unit 1052 outputs the second divided clock signal div_clk1, which can be applied to the chip when it is working normally after the chip startup frequency adjustment unit 101 has stabilized; when the second clock enable signal clk1_sel is invalid, for example, "0", the second working clock CLKOUT1 of the second clock switching unit 1052 outputs the initial clock signal OSC, which can be applied when the chip is just started or when low-load operation is required.

[0064] In this invention, the first clock switching unit 1051 or the second clock switching unit 1052 can be any switching circuit that can output one of the input clock signals under the action of an enable signal, and will not be described in detail here.

[0065] Furthermore, in this invention, the first clock switching unit 1051 or the second clock switching unit 1052 can switch the working clock simultaneously or separately, and this invention is not limited thereto.

[0066] When the frequency of the working clock signal is a reference clock signal, the reference clock signal pll_oclk can be directly electrically connected to the first clock switching unit 1051 or the second clock switching unit 1052, so that the first working clock signal CLKOUT0 output by the first clock switching unit 1051 is the reference clock signal pll_oclk, or the second working clock signal CLKOUT1 output by the second clock switching unit 1052 is the reference clock signal pll_oclk.

[0067] Of course, the first clock switching unit 1051 or the second clock switching unit 1052 can output the reference clock signal pll_oclk simultaneously, or only one of them can output the reference clock signal pll_oclk. This invention is not limited to this.

[0068] Furthermore, this invention only uses two frequency dividers and two clock switching units as examples for illustration. Similarly, there can be multiple frequency dividers and clock switching units, which can be the same or different, and this invention is not limited thereto. For example, a clock switching unit can be a single unit, but a single clock switching unit can simultaneously access the signals from multiple frequency dividers and the initial clock signal OSC; the clock enable signal generation unit can be multiple or a single unit, used to access the status indication signal pll_lock and the clock selection signal output by the status detection unit 102, thereby outputting a clock enable signal to the clock switching unit, so that the clock switching unit operates at the crystal oscillator clock OSC when the chip starts up, and can switch to the crystal oscillator clock OSC when the chip needs to operate under low load, or switch to the clock signal output by a certain frequency divider when the chip is operating normally.

[0069] In this invention, the frequency adjustment unit 101 may be a phase-locked loop (PLL) or other circuit structures that can adjust the initial clock signal OSC. This invention is not limited to these.

[0070] Working principle:

[0071] Combination Figure 1 As shown, the initial clock signal OSC of the present invention can be provided by a crystal oscillator. The first working clock CLKOUT0 is the working clock of a certain module in the chip, and the second working clock CLKOUT1 is the working clock of a certain module in the chip, or the working clock of another module.

[0072] When the chip powers on, the phase-locked loop (PLL), i.e., the frequency adjustment unit 101, is not yet stable. At this time, the module defaults to operating at the initial clock signal OSC. After power-on, the counter starts counting. When the count reaches a predetermined value TIM, the PLL is considered to be in a stable state, and a first lock indication signal tim_lock is generated. The predetermined value TIM can be a value set by software within the chip, and the predetermined value TIM must be greater than the stabilization time of the PLL. The lock signal LOCK output by the PLL is synchronized and, together with the first lock indication signal tim_lock, passes through the gating unit 1023 to generate a valid status indication signal pll_lock. The lock selection signal Lock_sel of the gating unit 1023 is configured by software within the chip.

[0073] The first clock selection signal para_clk0_sel and the second clock selection signal para_clk0_sel are used to select the output clock. They can be configured by the chip via software. "0" indicates that the initial clock signal OSC is selected, and "1" indicates that the first divided clock signal div_clk0 or the second divided clock signal div_clk1 is selected. When both pll_lock and para_clk0_sel0 are 1, the first working clock CLKOUT0 outputs the first divided clock signal div_clk0. When both pll_lock and para_clk1_sel are 1, the second working clock CLKOUT1 outputs the second divided clock signal div_clk1.

[0074] When the chip needs to operate with low power but cannot turn off the clock and power down, the clock can be switched to the initial clock signal OSC by configuring para_clk0_sel and para_clk1_sel to "0". This invention is not limited to this.

[0075] To better achieve the above objectives, the present invention also provides a clock module, wherein at least one frequency divider circuit as described above is included.

[0076] To better achieve the above objectives, the present invention also provides a chip, wherein it includes at least one clock module as described above.

[0077] To better achieve the above objectives, the present invention also provides a computing board for a computing device, wherein it includes at least one of the chips described above.

[0078] To better achieve the above objectives, the present invention also provides a computing device, including a power board, a control board, a connection board, a heat sink, and a plurality of computing boards. The control board is connected to the computing boards through the connection board. The heat sink is disposed around the computing boards. The power board is used to provide power to the connection board, the control board, the heat sink, and the computing boards. The computing boards are as described above.

[0079] It should be noted that in the description of this invention, the terms "lateral", "longitudinal", "up", "down", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", and "outer" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.

[0080] In other words, the present invention may have many other embodiments. Without departing from the spirit and essence of the present invention, those skilled in the art can make various corresponding changes and modifications according to the present invention, but these corresponding changes and modifications should all fall within the protection scope of the appended claims.

Claims

1. A clock switching circuit, characterized by, include: A frequency adjustment unit is used to receive an initial clock signal and output a reference clock signal; A status detection unit is used to detect the frequency adjustment unit and output a status indication signal; A clock enable signal generation unit is used to output a clock enable signal according to the status indication signal; A clock switching unit is used to output a working clock signal based on the clock enable signal, the initial clock signal, and the reference clock signal; wherein The state detection unit includes a counting and comparison unit, which counts the initial clock signal. When the count value reaches a predetermined value, it is determined that the frequency adjustment unit has reached a stable state. The state indication signal enables the clock enable signal generation unit, wherein the predetermined value is greater than the stabilization time of the frequency adjustment unit.

2. The clock switching circuit as described in claim 1, characterized in that: The counting comparison unit includes a counter and a comparator; The counter is used to receive the initial clock signal and count to obtain the count value, and the comparator is used to compare the count value with the predetermined value and output a first lock indication signal.

3. The clock switching circuit as described in claim 2, characterized in that: The state detection unit further includes a synchronization unit, which synchronizes a lock signal received from the frequency adjustment unit with the initial clock signal and outputs a second lock indication signal.

4. The clock switching circuit as described in claim 3, characterized in that: The status detection unit further includes a gating unit, which is used to receive the first lock indication signal and the second lock indication signal and output the status indication signal.

5. The clock switching circuit as described in claim 4, characterized in that: The gating unit is also configured to receive a lock selection signal, and the gating unit transmits the first lock indication signal or the second lock indication signal according to the lock selection signal.

6. The clock switching circuit as described in claim 1, characterized in that: It also includes a frequency divider for receiving the reference clock signal, the frequency divider including a first frequency divider and a second frequency divider, the first frequency divider being used to output a first frequency-divided clock signal, and the second frequency divider being used to output a second frequency-divided clock signal.

7. The clock switching circuit as described in claim 1, characterized in that: The clock enable signal generation unit includes a first clock enable signal generation unit and a second clock enable signal generation unit. The first clock enable signal generation unit is used to receive the status indication signal and a first clock selection signal, and output a first clock enable signal; The second clock enable signal generation unit is used to receive the status indication signal and a second clock selection signal, and output a second clock enable signal.

8. The clock switching circuit as described in claim 7, characterized in that: The first clock enable signal generating unit or the second clock enable signal generating unit includes an AND gate.

9. The clock switching circuit as described in claim 7, characterized in that: The clock switching unit includes a first clock switching unit and a second clock switching unit; The first clock switching unit is used to output the initial clock signal or a first working clock signal according to the first clock enable signal; The second clock switching unit is used to output the initial clock signal or a second working clock signal according to the second clock enable signal.

10. The clock switching circuit as described in claim 1, characterized in that: The frequency adjustment unit includes a phase-locked loop.

11. The clock switching circuit as described in claim 3, characterized in that: The synchronization unit includes at least one trigger.

12. A clock module, characterized in that, It includes at least one clock switching circuit as described in claims 1-11.

13. A chip, characterized in that, It includes at least one clock module as described in claim 12.

14. A computing device, characterized in that, It includes at least one chip as described in claim 13.

Citation Information

Patent Citations

  • Dual-mode self switching radiation hardening clock generation circuit based on phase-locked loops

    CN105610430A

  • Method and system using common reset and slower reset clock

    CN1489723A