WO2022262570A1 - Clock management circuit, chip and electronic device - Google Patents
Clock management circuit, chip and electronic device Download PDFInfo
- Publication number
- WO2022262570A1 WO2022262570A1 PCT/CN2022/096152 CN2022096152W WO2022262570A1 WO 2022262570 A1 WO2022262570 A1 WO 2022262570A1 CN 2022096152 W CN2022096152 W CN 2022096152W WO 2022262570 A1 WO2022262570 A1 WO 2022262570A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- clock
- circuit
- signal
- logic
- management
- Prior art date
Links
- 230000001419 dependent effect Effects 0.000 claims abstract description 38
- 101100350613 Arabidopsis thaliana PLL1 gene Proteins 0.000 description 17
- 238000010586 diagram Methods 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 3
- 241000422846 Sequoiadendron giganteum Species 0.000 description 2
- 239000013078 crystal Substances 0.000 description 2
- 235000015097 nutrients Nutrition 0.000 description 2
- 238000000034 method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002194 synthesizing effect Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/04—Generating or distributing clock signals or signals derived directly therefrom
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F15/00—Digital computers in general; Data processing equipment in general
- G06F15/76—Architectures of general purpose stored program computers
- G06F15/78—Architectures of general purpose stored program computers comprising a single central processing unit
- G06F15/7807—System on chip, i.e. computer system on a single chip; System in package, i.e. computer system on one or more chips in a single package
Definitions
- the invention relates to the technical field of electronic circuits, in particular to a clock management circuit, a chip and electronic equipment.
- SoC chips are called system-on-chips, also known as system-on-chips.
- the clock signal provided by the clock source after being divided by different frequency dividers, reaches each circuit module in the system that needs to be driven by the clock.
- the transmission path of this clock "energy” is like the nutrients of a big tree flowing from the trunk to each branch, so it is called a clock tree.
- the problem to be solved by the invention is: how to manage the clock more timely and accurately.
- an embodiment of the present invention provides a clock management circuit, the clock management circuit includes a first logic circuit, a clock source management circuit and a clock demand feedback circuit; wherein:
- the first logic circuit is connected to a plurality of first circuit modules that need to be driven by a first clock signal, and is adapted to receive clock-dependent signals output by the plurality of first circuit modules, and generate a first logic circuit based on the clock-dependent signals. result signal;
- the clock source management circuit connected to the first logic circuit, is adapted to receive the first logic result signal, and generate a corresponding clock source control signal based on the first logic result signal, and the clock source control signal output to a corresponding clock source, so as to control the first clock source to be turned on or off;
- the clock demand feedback circuit is connected to a plurality of second circuit modules that need to be driven by a second clock signal and a clock signal selection terminal, and is adapted to receive the clock demand signals output by the plurality of second circuit modules, generate a clock demand feedback signal, and Outputting the clock demand feedback signal to the first logic circuit selected by the clock signal selection end.
- An embodiment of the present invention also provides a chip, and the chip includes the above-mentioned clock management circuit.
- An embodiment of the present invention also provides an electronic device, which includes the above-mentioned chip.
- the clock of the chip is managed through the clock management circuit composed of the first logic circuit, the clock source management circuit and the clock demand feedback circuit.
- the solution of the present invention is to manage the clock by hardware way to control the clock.
- the hardware logic is used to arbitrate and feed back the demand for the clock, so that the clock source can be turned off in time, and the control logic is clear, which can effectively reduce the probability of control errors, and the clock management is more accurate.
- FIG. 1 is a schematic structural diagram of a clock management circuit in an embodiment of the present invention
- Fig. 2 is the specific circuit structure diagram of a kind of clock management circuit in the embodiment of the present invention.
- FIG. 3 is a schematic diagram of a specific circuit structure of another clock management circuit in an embodiment of the present invention.
- the clock signal provided by the clock source after being divided by different frequency dividers, reaches each circuit module in the system that needs to be driven by the clock.
- the transmission path of this clock "energy” is like the nutrients of a big tree flowing from the trunk to each branch, so it is called a clock tree.
- the clock tree includes multiple clock domains, and each clock domain corresponds to a clock source, that is, the clock "energy” transfer path of a clock source constitutes a clock domain.
- each device used to transfer clock "energy”, including frequency dividers, clock sources, and various circuit modules, is provided with a gated clock.
- the so-called gated clock refers to a clock with an input clock signal and another non-clock signal as a logic output, so as to control the time when the input clock signal works.
- the non-clock signal input by each gated clock is triggered by the register, and the software logic used to trigger the register to perform the corresponding operation is very complicated. For example, if a circuit module needs to turn on the clock source, the clock source of the circuit module Each register of the path needs to be checked step by step whether it is turned on, and finally the purpose of turning on the clock source can be achieved.
- an embodiment of the present invention provides a clock management circuit, which controls the clock through hardware.
- the hardware logic is used to arbitrate and feed back the demand for the clock, and each hardware is connected to each other.
- the clock source can be managed through the connection relationship between the hardware, and there is no need to design complex software logic.
- the clock source can be turned off in time, and the control logic is clear, which can effectively reduce the probability of control errors, and the clock management is more accurate.
- an embodiment of the present invention provides a clock management circuit, which may include: a first logic circuit 11 , a clock source management circuit 12 and a clock demand feedback circuit 13 . in:
- the first logic circuit 11 is connected to a plurality of first circuit modules that need to be driven by a first clock signal, and is adapted to receive clock-dependent signals output by the plurality of first circuit modules, and generate a first Logical result signal.
- the clock source management circuit 12 is connected to the first logic circuit, adapted to receive the first logic result signal, and generate a corresponding clock source control signal based on the first logic result signal, and the clock source control The signal is output to a corresponding clock source to control the first clock source to be turned on or off.
- the clock demand feedback circuit 13 is connected to a plurality of second circuit modules driven by a second clock signal and a clock signal selection terminal, and is adapted to receive clock demand signals output by the plurality of second circuit modules to generate a clock demand feedback signal, and output the clock demand feedback signal to the first logic circuit selected by the clock signal selection end.
- n clock sources which are respectively clock source PLL1 to clock source PLLn.
- the transmission path of the clock signal generated from the clock source PLL1 to the clock source PLLn constitutes the clock tree of the chip.
- the first frequency division circuit in the clock domain where the clock source PLL1 is located, the first frequency division circuit only includes a first-level first frequency divider Clock1 Divider.
- the first frequency division circuit In the clock domain where the clock source PLLn is located, the first frequency division circuit only includes a first-level frequency divider Clockn Divider.
- the second frequency division circuit only includes a second frequency divider Clocks Divider.
- the clock signal generated by the clock source PLL1 is divided by the first frequency divider Clock1 Divider to obtain the first clock signal and input to the first circuit module Mod1-1 to the first circuit module Mod1-m.
- the clock signal generated by the clock source PLLn is divided by the first frequency divider Clockn Divider to obtain the first clock signal and input to the first circuit module Modn-1 to the first circuit module Modn-k.
- the clock signal generated by the clock source PLL1 ⁇ clock source PLLn after being selected by the clock selector Clock Selector, is input to the second frequency divider Clocks Divider for frequency division, and then input to the second circuit module ModS-1 to the second circuit module ModS -j.
- the number of the first logic circuits is not limited, and may be one, or two, or more than two.
- there are two first logic circuits which are respectively the first logic circuits 111 and 112 .
- the first logic circuit 111 is connected to the first circuit module Mod1-1 to the first circuit module Mod1-m
- the first logic circuit 112 is connected to the first circuit module Modn-1 to the first circuit module Modn-k.
- the first circuit modules directly connected to the same first logic circuit share the same frequency clock signal on the SoC chip.
- the first circuit module Mod1-1 to the first circuit module Mod1-m share the first clock signal with frequency f1
- the first circuit module Modn-1 to the first circuit module Modn-k A first clock signal with frequency f2 is shared.
- circuit modules that share a clock signal of the same frequency are usually generated by the same frequency division circuit.
- the first clock signal shared by the first circuit module Mod1-1 to the first circuit module Mod1-m is generated by the first frequency divider Clockn Divider
- the first circuit module Modn-1 to the second is generated by the first frequency divider Clockn Divider.
- the clock dependent signal is generally used to indicate whether the first circuit module needs the first clock signal, that is, whether to turn on or turn off the clock source.
- it may be represented by a logic value. For example, when the logic value of the clock-dependent signal is "1", it means that the clock source is turned on, and when the logic value is "0", it means that the clock source is turned off.
- the logic value of the clock dependent signal is "0”, it means that the clock source is turned on, and when the logic value is "1", it means that the clock source is turned off.
- the first logic circuit 11 may include: a first logic subcircuit and a second logic subcircuit; wherein:
- the first logic sub-circuit is connected to a plurality of first circuit modules driven by a first clock signal, and is adapted to receive clock-dependent signals output by the plurality of first circuit modules, and output clock-dependent signals based on the clock-dependent signals. a result signal, the clock-dependent result signal being input to the second logic sub-circuit and a first divider circuit that generates the first clock signal;
- the second logic subcircuit is connected to the first clock management enable signal output end and the clock demand feedback circuit, and is adapted to be based on the first clock management enable signal output from the first clock management enable signal output end , a clock dependent result signal and a clock demand feedback signal output by the clock demand feedback circuit to generate the first logic result signal.
- each second logic subcircuit can be set to correspond to a first clock management enabling signal output terminal, and the first clock management enabling signal output terminal controls the second logic subcircuit to enter the clock management mode .
- multiple second logic subcircuits can also be set to correspond to a first clock management enabling signal output terminal, and the multiple second logic subcircuits are simultaneously controlled by the first clock management enabling signal output terminal to enter clock management. model.
- the output end of the first clock management enabling signal may be implemented by a register. This register can be read and written under the control of the register controller.
- the first logic circuit 111 may include a first logic sub-circuit 111 a and a second logic sub-circuit 111 b.
- the first logic sub-circuit 111a is connected with the first circuit module Mod1-1 to the first circuit module Mod1-m.
- the second logic subcircuit 111b is connected to the first clock management enable signal output end of the first logic subcircuit 111a.
- the first logic circuit 112 may include a first logic sub-circuit 112a and a second logic sub-circuit 112b. Wherein, the first logic sub-circuit 112a is connected to the first circuit module Modn-1 to the first circuit module Modn-k. The second logic subcircuit 112b is connected to the first clock management enable signal output terminal of the first logic subcircuit 112a.
- the first logic subcircuit performs a logic operation on the logic value of the clock-dependent signal received as input to obtain a clock-dependent result signal.
- the clock-dependent result signal on the one hand, is input to the first frequency division circuit to trigger the first frequency division circuit to perform frequency division work, and on the other hand, is input to the second logic sub-circuit.
- the second logic sub-circuit performs logic operations on the first clock management enable signal, the clock dependence result signal and the clock demand feedback signal output by the clock demand feedback circuit to generate the first logic result signal.
- the output end of the first clock management enabling signal corresponding to the second logic subcircuit 111 b is a register Force1Reg.
- the output end of the first clock management enabling signal corresponding to the second logic sub-circuit 112b is the register Forcen Reg.
- the register Forcen Reg can be controlled to output logic signals.
- the level value of the logic signal output is the same as the logic value of the clock-dependent signal indicating that the clock source is turned on.
- the number of the clock source management circuit 12 may be one or multiple, which is not specifically limited.
- the clock source management circuit 12 can not only be used to turn on or turn off the corresponding clock source, but also can manage the frequency of the clock signal generated by the clock source.
- Each clock source management circuit 12 may only manage one clock source, or may manage multiple clock sources.
- the clock source of the SoC chip may be located inside the chip or outside the chip, which is not specifically limited.
- the clock source can be realized by devices such as digital phase-locked loop (DPLL), analog phase-locked loop (APLL), RC oscillator (RC-oscillator, RCO) or crystal oscillator (Crystal oscillator).
- the clock source PLL1 to the clock source PLLn are implemented by a phase-locked loop.
- Each clock source uniquely corresponds to a clock source management circuit.
- the clock source PLL1 is controlled by the clock source management circuit 121
- the clock source PLLn is controlled by the clock source management circuit 12n.
- the clock demand feedback circuit 13 may include: a third logic subcircuit 131 and a clock demand feedback subcircuit 132; wherein:
- the third logic sub-circuit 131 is connected to several second circuit modules that need to be driven by a second clock signal, and is adapted to receive clock demand signals output by the several second circuit modules, and generate a clock demand based on the clock demand signals Feedback signal, the clock demand feedback signal is output to the second frequency division circuit corresponding to the clock demand signal and the clock demand feedback sub-circuit;
- the clock demand feedback sub-circuit 132 is connected to the third logic sub-circuit and the clock signal selection terminal, and is adapted to output the clock demand feedback signal to the first logic circuit selected by the clock signal selection terminal;
- the clock signal selection terminal is also connected to a clock selector to control the clock selector to select a clock signal output by a clock source corresponding to the clock selection signal to the second circuit module.
- the third logic sub-circuit 131 is connected to the second circuit module ModS-1 to the second circuit module ModS-j, and receives the clock demand signal generated by the second circuit module ModS-1 to the second circuit module ModS-j, And performing a logic operation on the logic value of the clock demand signal to obtain a clock demand feedback signal.
- the clock signal selection end may be implemented by a second register.
- the clock signal selection terminal can be realized by the second register SelReg.
- the second register Sel Reg is read and written under the control of the second register controller.
- the second register controller can control the second register SelReg to output the clock selection signal Sel.
- the clock selection signal Sel may carry indication information of the selected clock source, and is used to indicate the clock sources required by the second circuit module ModS-1 to the second circuit module ModS-j.
- the clock selection signal Sel is input to the clock demand feedback sub-circuit 132 on the one hand, and input to the Clock Selector on the other hand.
- the clock demand feedback subcircuit 132 can output the clock demand feedback signal to the first clock source selected by the clock selection signal Sel.
- the second logic sub-circuit 111b thereby enabling the second logic sub-circuit 111b to generate a clock source control signal for controlling the clock source PLL1 to be turned on, thereby turning on the clock source PLL1.
- the clock signal generated by the clock source PLL1 is input to the clock selector Clock Selector, and under the control of the clock selection signal Sel, the clock signal generated by the clock source PLL1 is output to the second frequency division circuit corresponding to the clock selection signal Sel Clocks Divider performs frequency division, and then input to the second circuit module ModS-1 to the second circuit module ModS-j.
- the first circuit module is usually provided with a clock signal by a fixed clock source.
- the second circuit module is usually provided with a clock signal by a variable clock source. That is to say, the clock signal required by the first circuit module in practical application is fixed, while the clock signal required by the second circuit module is variable.
- the clock requirement feedback sub-circuit 132 in order to meet the clock switching requirement of the second circuit module, provides the second circuit module with a clock signal generated by a corresponding clock source according to the clock requirement of the second circuit module.
- the second circuit module ModS-1 to the second circuit module ModS-j have the same clock requirements, that is, all required clock signals are the same frequency.
- the second circuit module ModS-1 to the second circuit module ModS-j may also have different clock requirements.
- Second circuit modules with the same clock requirements are connected to the same second frequency dividing circuit.
- the clock demand feedback sub-circuit 132 can be connected to a plurality of second logic sub-circuits at the same time, so as to feed back clock signals for the second circuit modules with different clock demands at the same time, so that the second circuit modules with different clock demands can receive clock signals at the same time. Signal.
- the second frequency divider Clocks Divider is composed of a plurality of second frequency dividers.
- the clock selection signal Sel output by the second register Sel Reg in addition to carrying the indication information of the selected clock source, it can also be Carry the indication information of the second circuit module or the second frequency divider corresponding to the selected different clock sources, thereby enabling the clock selector Clock Selector to provide accurate clock signals for the second circuit modules with different clock requirements.
- the clock selection signal Sel determines which second logic subcircuit the clock demand feedback subcircuit 132 feeds back the clock demand feedback signal to, and the second logic subcircuit that has not received the clock demand feedback signal indicates that the second circuit module A clock signal generated by a corresponding clock source is not required.
- the first logic circuit may output the first logic result signal sought, so that the corresponding clock source can be controlled to be turned on or off.
- the meanings expressed by the clock-dependent signals at different logical values may be related.
- the specific circuit structure of the third logic sub-circuit 131 may be related to the meanings represented by the clock demand signal under different logic values.
- the first logic sub-circuit and the second logic sub-circuit may both be composed of an OR gate circuit. At this time, as long as any first circuit module connected to the first logic circuit needs to turn on the clock source, the logic value of the clock dependent result signal is logic "1".
- the clock-dependent signal output by the first circuit module Mod1-1 to the first circuit module Mod1-m is at a high level, and indicates that the clock source is turned on, then the clock-dependent result signal output by the first logic sub-circuit 111a is also Correspondingly, the output end of the first clock management enable signal can also output a logic high level signal.
- the second logic result signal output by the second logic sub-circuit 111b is at a high level, so that the clock source management circuit 121 recognizes the second logic result signal After that, the clock source PLL1 can be controlled to turn on.
- the first logic sub-circuit and the second logic sub-circuit may both be composed of an AND gate circuit. At this time, as long as any first circuit module connected to the first logic circuit needs to turn on the clock source, the logic value of the clock dependent result signal is logic "1".
- the clock-dependent signal output by the first circuit module Mod1-1 to the first circuit module Mod1-m is low level, and indicates that the clock source is turned on, then the clock-dependent result signal that the first logic sub-circuit 111a can output is also is low level.
- the output terminal of the first clock management enable signal outputs a logic low level signal
- the second logic result signal output by the second logic sub-circuit 111b can be low regardless of whether the clock demand feedback sub-circuit 132 outputs the clock demand feedback signal. In this way, after the clock source management circuit 121 recognizes the second logic result signal, it controls the clock source PLL1 to turn on.
- the third logic sub-circuit when the logic "1" of the clock demand signal indicates that a clock signal is required, the third logic sub-circuit is composed of an OR gate circuit.
- the second logic sub-circuit is also composed of an OR gate circuit.
- the clock demand feedback signal is a high-level signal, which is input to the corresponding second logic sub-circuit after passing through the clock demand feedback sub-circuit 132, and the second logic sub-circuit outputs a high-level signal, so that the corresponding clock source is turned on .
- the third logic sub-circuit when the logic "0" of the clock demand signal indicates that a clock signal is required, the third logic sub-circuit is composed of an AND gate circuit.
- the second logic subcircuit is also composed of an AND gate circuit.
- the clock demand feedback signal is a low-level signal, which is input to the corresponding second logic sub-circuit after passing through the clock demand feedback sub-circuit 132, and the second logic sub-circuit outputs a low-level signal, so that the corresponding clock source is turned on .
- the specific circuit structure of the first logic subcircuit, the second logic subcircuit and the third logic subcircuit is not limited to the description in the above embodiment, as long as the output of the circuit module can be used to manage the clock source It is enough for the circuit to output the correct signal representing the demand of the circuit module.
- the first frequency division circuit only comprises the first frequency divider of one stage, i.e. the first frequency divider Clock1 Divider and the first frequency divider Clockn Divider, and the second frequency division circuit also only comprises One-stage second frequency divider Clocks Divider.
- the first frequency division circuit may include more than two first frequency dividers connected in cascade
- the second frequency division circuit may also include more than two second frequency dividers connected in cascade.
- the first circuit module Modj-1 to the first circuit module Modj-k are connected to the clock source PLL1 through a two-stage first frequency divider.
- Described secondary first frequency divider comprises: first frequency divider Clock1 Divider and first frequency divider Clockj Divider.
- the first frequency divider Clockj Divider and the first frequency divider Clock1 Divider are cascaded with each other.
- the frequency of the clock signal generated by the clock source is 128MHZ, and the frequency of the clock signal becomes 64MHZ through the first frequency divider Clockl Divider. After passing through the first frequency divider Clockj Divider, the first clock signal is obtained. At this time, the frequency of the first clock signal is 32MHZ.
- the first frequency dividing circuit includes more than two cascaded first frequency dividers
- the first logic sub-circuit includes more than two cascaded first gate circuits
- the first gate circuit and the first The dividers are connected in one-to-one correspondence.
- the first logic sub-circuit when the first frequency division circuit includes two first frequency dividers, the first logic sub-circuit includes two first gate circuits, which are first gate circuit M1 and first gate circuit M1 respectively. Circuit M2.
- the clock-dependent signals generated by the first circuit module Modj-1 to the first circuit module Modj-k are input to the first gate circuit M2 after logic operation is performed by the first gate circuit M1.
- the second gate circuit M2 performs logic operations on the output signal of the first gate circuit M1 and the clock-dependent signal output by the first circuit module directly connected to it (such as the first circuit module Mod1-m) to obtain a clock-dependent result signal.
- the clock source management circuit can respond quickly and in time.
- the second frequency division circuit may also include more than two second frequency dividers cascaded.
- the third logic sub-circuit may include more than two cascaded second gate circuits, and the second gate circuits are connected to the second frequency divider in a one-to-one correspondence. Specifically, it can be set with reference to the connection relationship when the first frequency division circuit and the first logic sub-circuit are both in two stages in FIG. 3 , and details will not be described here.
- FIG. 2 and FIG. 3 are only a simplified schematic diagram of the chip.
- the hierarchical structure of the clock tree and the dependencies of each clock domain are much more complicated.
- the solution of the present invention can be used to manage clocks.
- clock management is realized by automatically transmitting system clock requirements through a clock tree reversed by hardware.
- This hardware clock control scheme only requires each circuit module to manage whether it needs to work. If you don't need it, you can turn off the clock requirement of this module.
- the clock can be controlled accurately and in time, the logic is clear (no error), and the dynamic power consumption of the system can be better reduced.
- the complexity is reduced, thereby simplifying the structure of the entire chip.
- An embodiment of the present invention also provides a chip, and the chip includes the above-mentioned clock management circuit.
- An embodiment of the present invention also provides an electronic device, and the electronic device may include the above-mentioned chip.
- each module/unit contained therein may be realized by means of hardware such as circuits, or at least some modules/units may be realized by means of software programs, and the software programs run on the chip.
- the remaining (if any) modules/units can be implemented by means of hardware such as circuits; for each device or product applied to or integrated in a chip module, each module/unit contained in it can be implemented using a circuit
- the different modules/units can be located in the same component (such as chips, circuit modules, etc.) or different components of the chip module, or at least some modules/units can be implemented in the form of software programs.
- the remaining (if any) modules/units can be realized by hardware such as circuits; They are all realized by means of hardware such as circuits, and different modules/units can be located in the same component (such as a chip, circuit module, etc.) or in different components in the terminal, or at least some modules/units can be implemented by means of software programs.
- the software program runs on the processor integrated in the terminal, and the remaining (if any) modules/units can be realized by means of hardware such as circuits.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Microelectronics & Electronic Packaging (AREA)
- Manipulation Of Pulses (AREA)
Abstract
A clock management circuit, a chip and an electronic device. The clock management circuit comprises: a first logic circuit (11), a clock source management circuit (12) and a clock demand feedback circuit (13); the first logic circuit (11) is connected to several first circuit modules that need to be driven by a first clock signal, and is adapted to receive clock-dependent signals outputted by the several first circuit modules and generate a first logic result signal on the basis of the clock-dependent signals; the clock source management circuit (12) is connected to the first logic circuit, and is adapted to receive the first logic result signal and generate a corresponding clock source control signal on the basis of the first logic result signal, wherein the clock source control signal is outputted to a corresponding clock source as so to control the clock source to turn on or off; and the clock demand feedback circuit (13) is connected to several second circuit modules that need to be driven by a second clock signal and a clock signal selection terminal, is adapted to receive clock demand signals outputted by the several second circuit modules to generate a clock demand feedback signal, and outputs the clock demand feedback signal to the first logic circuit selected by the clock signal selection terminal.
Description
本申请要求于2021年6月15日提交中国专利局、申请号为202110661902.X、发明名称为“时钟管理电路、芯片及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to a Chinese patent application with application number 202110661902.X and titled "Clock Management Circuit, Chip, and Electronic Device" filed with the China Patent Office on June 15, 2021, the entire contents of which are hereby incorporated by reference In this application.
本发明涉及电子电路技术领域,具体涉及一种时钟管理电路、芯片及电子设备。The invention relates to the technical field of electronic circuits, in particular to a clock management circuit, a chip and electronic equipment.
SoC芯片称为系统级芯片,也称片上系统。在SoC芯片中,时钟源提供的时钟信号,经不同的分频器分频后,到达系统的各个需要时钟驱动的电路模块。这种时钟“能量”的传递路径,犹如大树的养分由主干流向个分支,因此称为时钟树。SoC chips are called system-on-chips, also known as system-on-chips. In the SoC chip, the clock signal provided by the clock source, after being divided by different frequency dividers, reaches each circuit module in the system that needs to be driven by the clock. The transmission path of this clock "energy" is like the nutrients of a big tree flowing from the trunk to each branch, so it is called a clock tree.
为了保证SoC芯片的正常工作,需要对系统中各模块的时钟的进行管理。In order to ensure the normal operation of the SoC chip, it is necessary to manage the clocks of each module in the system.
现有对时钟的管理往往通过寄存器由软件来发起执行。随着SoC芯片规模的增大和多电源域的出现,时钟源越来越多,时钟树及时钟域也越来越复杂。通过软件的方式,很难及时、准确地对时钟进行管理。Existing clock management is often initiated by software through registers. With the increase of SoC chip scale and the emergence of multiple power domains, there are more and more clock sources, and the clock tree and clock domains are becoming more and more complex. It is difficult to manage the clock in a timely and accurate manner by means of software.
发明内容Contents of the invention
本发明要解决的问题是:如何更加及时、准确地对时钟进行管理。The problem to be solved by the invention is: how to manage the clock more timely and accurately.
为解决上述问题,本发明实施例提供了一种时钟管理电路,所述时钟管理电路包括第一逻辑电路、时钟源管理电路及时钟需求反馈电 路;其中:In order to solve the above problems, an embodiment of the present invention provides a clock management circuit, the clock management circuit includes a first logic circuit, a clock source management circuit and a clock demand feedback circuit; wherein:
所述第一逻辑电路,与需要第一时钟信号驱动的若干第一电路模块连接,适于接收所述若干第一电路模块输出的时钟依赖信号,并基于所述时钟依赖信号,产生第一逻辑结果信号;The first logic circuit is connected to a plurality of first circuit modules that need to be driven by a first clock signal, and is adapted to receive clock-dependent signals output by the plurality of first circuit modules, and generate a first logic circuit based on the clock-dependent signals. result signal;
所述时钟源管理电路,与所述第一逻辑电路连接,适于接收所述第一逻辑结果信号,并基于所述第一逻辑结果信号产生对应的时钟源控制信号,所述时钟源控制信号输出至对应的时钟源,以控制所述第一时钟源打开或关闭;The clock source management circuit, connected to the first logic circuit, is adapted to receive the first logic result signal, and generate a corresponding clock source control signal based on the first logic result signal, and the clock source control signal output to a corresponding clock source, so as to control the first clock source to be turned on or off;
所述时钟需求反馈电路,与需要第二时钟信号驱动的若干第二电路模块及时钟信号选择端连接,适于接收所述若干第二电路模块输出的时钟需求信号,产生时钟需求反馈信号,并将所述时钟需求反馈信号输出至所述时钟信号选择端所选择的第一逻辑电路。The clock demand feedback circuit is connected to a plurality of second circuit modules that need to be driven by a second clock signal and a clock signal selection terminal, and is adapted to receive the clock demand signals output by the plurality of second circuit modules, generate a clock demand feedback signal, and Outputting the clock demand feedback signal to the first logic circuit selected by the clock signal selection end.
本发明实施例还提供了一种芯片,所述芯片包括上述的时钟管理电路。An embodiment of the present invention also provides a chip, and the chip includes the above-mentioned clock management circuit.
本发明实施例还提供了一种电子设备,所述电子设备包括上述的芯片。An embodiment of the present invention also provides an electronic device, which includes the above-mentioned chip.
与现有技术相比,本发明实施例的技术方案具有以下优点:Compared with the prior art, the technical solutions of the embodiments of the present invention have the following advantages:
应用本发明的方案,通过第一逻辑电路、时钟源管理电路及时钟需求反馈电路构成的时钟管理电路,对芯片的时钟进行管理,相对于采用软件的方式管理时钟,本发明的方案是通过硬件的方式对时钟进行控制。由硬件逻辑来仲裁、反馈对时钟的需求,可以做到及时地关闭时钟源,并且控制逻辑清晰,可以有效减少控制出错的概率,时钟管理也就更加准确。Applying the solution of the present invention, the clock of the chip is managed through the clock management circuit composed of the first logic circuit, the clock source management circuit and the clock demand feedback circuit. Compared with managing the clock by software, the solution of the present invention is to manage the clock by hardware way to control the clock. The hardware logic is used to arbitrate and feed back the demand for the clock, so that the clock source can be turned off in time, and the control logic is clear, which can effectively reduce the probability of control errors, and the clock management is more accurate.
图1是本发明实施例中一种时钟管理电路的结构示意图;FIG. 1 is a schematic structural diagram of a clock management circuit in an embodiment of the present invention;
图2是本发明实施例中一种时钟管理电路的具体电路结构示意 图;Fig. 2 is the specific circuit structure diagram of a kind of clock management circuit in the embodiment of the present invention;
图3是本发明实施例中另一种时钟管理电路的具体电路结构示意图。FIG. 3 is a schematic diagram of a specific circuit structure of another clock management circuit in an embodiment of the present invention.
在SoC芯片中,时钟源提供的时钟信号,经不同的分频器分频后,到达系统的各个需要时钟驱动的电路模块。这种时钟“能量”的传递路径,犹如大树的养分由主干流向个分支,因此称之为时钟树。时钟树包括多个时钟域,每个时钟域对应一个时钟源,也就是说,一个时钟源的时钟“能量”传递路径,构成一个时钟域。In the SoC chip, the clock signal provided by the clock source, after being divided by different frequency dividers, reaches each circuit module in the system that needs to be driven by the clock. The transmission path of this clock "energy" is like the nutrients of a big tree flowing from the trunk to each branch, so it is called a clock tree. The clock tree includes multiple clock domains, and each clock domain corresponds to a clock source, that is, the clock "energy" transfer path of a clock source constitutes a clock domain.
为了保证SoC芯片的正常工作,需要对系统中各电路模块的时钟的进行管理。但是系统中各个电路模块对时钟的要求不同,而各个电路模块之间的时钟又有着直接或间接的制约关系。因此,时钟管理是SoC芯片能否正常工作的保障。In order to ensure the normal operation of the SoC chip, it is necessary to manage the clocks of each circuit module in the system. However, each circuit module in the system has different requirements on the clock, and the clocks between each circuit module have direct or indirect constraints. Therefore, clock management is the guarantee that the SoC chip can work normally.
现有对时钟的管理往往通过寄存器由软件来发起执行。具体地,用于传递时钟“能量”的每个器件,包括分频器、时钟源及各个电路模块,均设置有门控时钟。所谓门控时钟,是指一个输入时钟信号与另外一个非时钟信号作逻辑输出的时钟,以此控制输入时钟信号起作用的时间。Existing clock management is often initiated by software through registers. Specifically, each device used to transfer clock "energy", including frequency dividers, clock sources, and various circuit modules, is provided with a gated clock. The so-called gated clock refers to a clock with an input clock signal and another non-clock signal as a logic output, so as to control the time when the input clock signal works.
目前,每个门控时钟输入的非时钟信号,都是通过寄存器触发执行,并且用于触发寄存器执行相应操作的软件逻辑非常复杂,比如,一个电路模块若需要开启时钟源,该电路模块所在时钟路径的各个寄存器,需要逐级检测是否开启,最终才能达到开启时钟源的目的。At present, the non-clock signal input by each gated clock is triggered by the register, and the software logic used to trigger the register to perform the corresponding operation is very complicated. For example, if a circuit module needs to turn on the clock source, the clock source of the circuit module Each register of the path needs to be checked step by step whether it is turned on, and finally the purpose of turning on the clock source can be achieved.
随着SoC芯片规模的增大和多电源域的出现,时钟源越来越多,时钟树及时钟域也越来越复杂。用于触发寄存器执行相应操作的软件逻辑也就更加复杂,通过软件逻辑逐级触发相应器件开始工作,不仅 容易出错,且耗时较长。从而导致很难及时、准确地控制时钟和关闭时钟源,SoC芯片的使用功耗也就难以降低。With the increase of SoC chip scale and the emergence of multiple power domains, there are more and more clock sources, and the clock tree and clock domains are becoming more and more complex. The software logic used to trigger the registers to perform corresponding operations is also more complicated. Triggering the corresponding devices to start working step by step through software logic is not only error-prone, but also time-consuming. As a result, it is difficult to control the clock and turn off the clock source in a timely and accurate manner, and it is also difficult to reduce the power consumption of the SoC chip.
针对上述问题,本发明实施例提供了一种时钟管理电路,通过硬件对时钟进行控制。由硬件逻辑来仲裁、反馈对时钟的需求,各个硬件之间相互连接,只要一个电路模块需要时钟,即可通过硬件之间的连接关系,对时钟源进行相应管理,无需设计复杂的软件逻辑,可以做到及时地关闭时钟源,并且控制逻辑清晰,可以有效减少控制出错的概率,时钟管理也就更加准确。In view of the above problems, an embodiment of the present invention provides a clock management circuit, which controls the clock through hardware. The hardware logic is used to arbitrate and feed back the demand for the clock, and each hardware is connected to each other. As long as a circuit module needs a clock, the clock source can be managed through the connection relationship between the hardware, and there is no need to design complex software logic. The clock source can be turned off in time, and the control logic is clear, which can effectively reduce the probability of control errors, and the clock management is more accurate.
为使本发明的上述目的、特征和优点能够更为明显易懂,下面结合附图对本发明的具体实施例作详细地说明。In order to make the above objects, features and advantages of the present invention more comprehensible, specific embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings.
参照图1,本发明实施例提供了一种时钟管理电路,所述时钟管理电路可以包括:第一逻辑电路11、时钟源管理电路12及时钟需求反馈电路13。其中:Referring to FIG. 1 , an embodiment of the present invention provides a clock management circuit, which may include: a first logic circuit 11 , a clock source management circuit 12 and a clock demand feedback circuit 13 . in:
所述第一逻辑电路11,与需要第一时钟信号驱动的若干第一电路模块连接,适于接收所述若干第一电路模块输出的时钟依赖信号,并基于所述时钟依赖信号,产生第一逻辑结果信号。The first logic circuit 11 is connected to a plurality of first circuit modules that need to be driven by a first clock signal, and is adapted to receive clock-dependent signals output by the plurality of first circuit modules, and generate a first Logical result signal.
所述时钟源管理电路12,与所述第一逻辑电路连接,适于接收所述第一逻辑结果信号,并基于所述第一逻辑结果信号产生对应的时钟源控制信号,所述时钟源控制信号输出至对应的时钟源,以控制所述第一时钟源打开或关闭。The clock source management circuit 12 is connected to the first logic circuit, adapted to receive the first logic result signal, and generate a corresponding clock source control signal based on the first logic result signal, and the clock source control The signal is output to a corresponding clock source to control the first clock source to be turned on or off.
所述时钟需求反馈电路13,与需要第二时钟信号驱动的若干第二电路模块及时钟信号选择端连接,适于接收所述若干第二电路模块输出的时钟需求信号,产生时钟需求反馈信号,并将所述时钟需求反馈信号输出至所述时钟信号选择端所选择的第一逻辑电路。The clock demand feedback circuit 13 is connected to a plurality of second circuit modules driven by a second clock signal and a clock signal selection terminal, and is adapted to receive clock demand signals output by the plurality of second circuit modules to generate a clock demand feedback signal, and output the clock demand feedback signal to the first logic circuit selected by the clock signal selection end.
比如,在图2示出的芯片结构中,包括n个时钟源,分别为时钟源PLL1至时钟源PLLn。n>1,且n为整数。时钟源PLL1至钟源PLLn产生的时钟信号的传递路径,构成该芯片的时钟树。其中,在 时钟源PLL1所在时钟域中,第一分频电路只包括一级第一分频器Clockl Divider。在时钟源PLLn所在时钟域中,第一分频电路只包括一级第一分频器Clockn Divider。经第二分频电路也只包括一级第二分频器Clocks Divider。For example, in the chip structure shown in FIG. 2 , there are n clock sources, which are respectively clock source PLL1 to clock source PLLn. n>1, and n is an integer. The transmission path of the clock signal generated from the clock source PLL1 to the clock source PLLn constitutes the clock tree of the chip. Wherein, in the clock domain where the clock source PLL1 is located, the first frequency division circuit only includes a first-level first frequency divider Clock1 Divider. In the clock domain where the clock source PLLn is located, the first frequency division circuit only includes a first-level frequency divider Clockn Divider. The second frequency division circuit only includes a second frequency divider Clocks Divider.
时钟源PLL1产生的时钟信号经第一分频器Clockl Divider分频后,得到第一时钟信号并输入至第一电路模块Mod1-1至第一电路模块Mod1-m。m>1,且m为整数。The clock signal generated by the clock source PLL1 is divided by the first frequency divider Clock1 Divider to obtain the first clock signal and input to the first circuit module Mod1-1 to the first circuit module Mod1-m. m>1, and m is an integer.
时钟源PLLn产生的时钟信号经第一分频器Clockn Divider分频后,得到第一时钟信号并输入至第一电路模块Modn-1至第一电路模块Modn-k。n>k>1,且k均为整数。The clock signal generated by the clock source PLLn is divided by the first frequency divider Clockn Divider to obtain the first clock signal and input to the first circuit module Modn-1 to the first circuit module Modn-k. n>k>1, and all k are integers.
时钟源PLL1~时钟源PLLn产生的时钟信号,经时钟选择器Clock Selector的选择后,输入至第二分频器Clocks Divider分频,再输入至第二电路模块ModS-1至第二电路模块ModS-j。n>S>j,且S及j均为整数。The clock signal generated by the clock source PLL1 ~ clock source PLLn, after being selected by the clock selector Clock Selector, is input to the second frequency divider Clocks Divider for frequency division, and then input to the second circuit module ModS-1 to the second circuit module ModS -j. n>S>j, and both S and j are integers.
在具体实施中,所述第一逻辑电路的数量不作限制,可以为一个,也可以为两个,或者两个以上。在图2示出的芯片中,第一逻辑电路数量为2个,分别为如第一逻辑电路111及112。其中,第一逻辑电路111与第一电路模块Mod1-1至第一电路模块Mod1-m连接,第一逻辑电路112与第一电路模块Modn-1至第一电路模块Modn-k连接。In a specific implementation, the number of the first logic circuits is not limited, and may be one, or two, or more than two. In the chip shown in FIG. 2 , there are two first logic circuits, which are respectively the first logic circuits 111 and 112 . Wherein, the first logic circuit 111 is connected to the first circuit module Mod1-1 to the first circuit module Mod1-m, and the first logic circuit 112 is connected to the first circuit module Modn-1 to the first circuit module Modn-k.
需要说明的是,同一第一逻辑电路所直接连接的第一电路模块,是SoC芯片上共用同一频率时钟信号。比如,在图2中,第一电路模块Mod1-1至第一电路模块Mod1-m,共用频率为f1的第一时钟信号,而第一电路模块Modn-1至第一电路模块Modn-k,共用频率为f2的第一时钟信号。It should be noted that the first circuit modules directly connected to the same first logic circuit share the same frequency clock signal on the SoC chip. For example, in FIG. 2, the first circuit module Mod1-1 to the first circuit module Mod1-m share the first clock signal with frequency f1, and the first circuit module Modn-1 to the first circuit module Modn-k, A first clock signal with frequency f2 is shared.
在SoC芯片中,共用同一频率时钟信号的电路模块,通常由同一分频电路产生。比如,在图2中,第一电路模块Mod1-1至第一电路模块Mod1-m所共用的第一时钟信号,由第一分频器Clockn Divider 产生,而第一电路模块Modn-1至第一电路模块Modn-k所共用的第一时钟信号,由第一分频器Clockn Divider产生。In an SoC chip, circuit modules that share a clock signal of the same frequency are usually generated by the same frequency division circuit. For example, in FIG. 2, the first clock signal shared by the first circuit module Mod1-1 to the first circuit module Mod1-m is generated by the first frequency divider Clockn Divider, and the first circuit module Modn-1 to the second The first clock signal shared by the circuit module Modn-k is generated by the first frequency divider Clockn Divider.
在具体实施中,所述时钟依赖信号通常用于表示第一电路模块是否需要第一时钟信号,也就是开启还是关闭时钟源。具体可以通过逻辑值进行表示,比如,当所述时钟依赖信号在逻辑值为“1”时,表示开启时钟源,而在逻辑值为“0”时,表示关闭时钟源。或者,当所述时钟依赖信号在逻辑值为“0”时,表示开启时钟源,而在逻辑值为“1”时,表示关闭时钟源。In a specific implementation, the clock dependent signal is generally used to indicate whether the first circuit module needs the first clock signal, that is, whether to turn on or turn off the clock source. Specifically, it may be represented by a logic value. For example, when the logic value of the clock-dependent signal is "1", it means that the clock source is turned on, and when the logic value is "0", it means that the clock source is turned off. Alternatively, when the logic value of the clock dependent signal is "0", it means that the clock source is turned on, and when the logic value is "1", it means that the clock source is turned off.
在本发明的一实施例中,参照图1,所述第一逻辑电路11可以包括:第一逻辑子电路及第二逻辑子电路;其中:In an embodiment of the present invention, referring to FIG. 1, the first logic circuit 11 may include: a first logic subcircuit and a second logic subcircuit; wherein:
所述第一逻辑子电路,与需要第一时钟信号驱动的若干第一电路模块连接,适于接收所述若干第一电路模块输出的时钟依赖信号,并基于所述时钟依赖信号,输出时钟依赖结果信号,所述时钟依赖结果信号输入至所述第二逻辑子电路以及产生所述第一时钟信号的第一分频电路;The first logic sub-circuit is connected to a plurality of first circuit modules driven by a first clock signal, and is adapted to receive clock-dependent signals output by the plurality of first circuit modules, and output clock-dependent signals based on the clock-dependent signals. a result signal, the clock-dependent result signal being input to the second logic sub-circuit and a first divider circuit that generates the first clock signal;
所述第二逻辑子电路,与第一时钟管理使能信号输出端及所述时钟需求反馈电路连接,适于基于所述第一时钟管理使能信号输出端输出的第一时钟管理使能信号、时钟依赖结果信号及所述时钟需求反馈电路输出的时钟需求反馈信号,产生所述第一逻辑结果信号。The second logic subcircuit is connected to the first clock management enable signal output end and the clock demand feedback circuit, and is adapted to be based on the first clock management enable signal output from the first clock management enable signal output end , a clock dependent result signal and a clock demand feedback signal output by the clock demand feedback circuit to generate the first logic result signal.
在具体实施中,可以设置每个第二逻辑子电路对应一个第一时钟管理使能信号输出端,由所述第一时钟管理使能信号输出端控制所述第二逻辑子电路进入时钟管理模式。当然也可以设置多个第二逻辑子电路对应一个第一时钟管理使能信号输出端,由所述第一时钟管理使能信号输出端同时控制该多个所述第二逻辑子电路进入时钟管理模式。In a specific implementation, each second logic subcircuit can be set to correspond to a first clock management enabling signal output terminal, and the first clock management enabling signal output terminal controls the second logic subcircuit to enter the clock management mode . Of course, multiple second logic subcircuits can also be set to correspond to a first clock management enabling signal output terminal, and the multiple second logic subcircuits are simultaneously controlled by the first clock management enabling signal output terminal to enter clock management. model.
在具体实施中,所述第一时钟管理使能信号输出端可以由寄存器实现。该寄存器可以在寄存器控制器的控制下进行读写。In a specific implementation, the output end of the first clock management enabling signal may be implemented by a register. This register can be read and written under the control of the register controller.
结合图2,第一逻辑电路111可以包括第一逻辑子电路111a及第二逻辑子电路111b。其中,第一逻辑子电路111a与第一电路模块Mod1-1至第一电路模块Mod1-m连接。第二逻辑子电路111b与第一逻辑子电路111a第一时钟管理使能信号输出端连接。Referring to FIG. 2 , the first logic circuit 111 may include a first logic sub-circuit 111 a and a second logic sub-circuit 111 b. Wherein, the first logic sub-circuit 111a is connected with the first circuit module Mod1-1 to the first circuit module Mod1-m. The second logic subcircuit 111b is connected to the first clock management enable signal output end of the first logic subcircuit 111a.
第一逻辑电路112可以包括第一逻辑子电路112a及第二逻辑子电路112b。其中,第一逻辑子电路112a与第一电路模块Modn-1至第一电路模块Modn-k连接。第二逻辑子电路112b与第一逻辑子电路112a第一时钟管理使能信号输出端连接。The first logic circuit 112 may include a first logic sub-circuit 112a and a second logic sub-circuit 112b. Wherein, the first logic sub-circuit 112a is connected to the first circuit module Modn-1 to the first circuit module Modn-k. The second logic subcircuit 112b is connected to the first clock management enable signal output terminal of the first logic subcircuit 112a.
第一逻辑子电路对输入接收的时钟依赖信号的逻辑值进行逻辑运算,得到时钟依赖结果信号。所述时钟依赖结果信号,一方面,输入至第一分频电路,以触发第一分频电路执行分频工作,另一方面输入至第二逻辑子电路。第二逻辑子电路再对第一时钟管理使能信号、时钟依赖结果信号及所述时钟需求反馈电路输出的时钟需求反馈信号进行逻辑运算,产生所述第一逻辑结果信号。The first logic subcircuit performs a logic operation on the logic value of the clock-dependent signal received as input to obtain a clock-dependent result signal. The clock-dependent result signal, on the one hand, is input to the first frequency division circuit to trigger the first frequency division circuit to perform frequency division work, and on the other hand, is input to the second logic sub-circuit. The second logic sub-circuit performs logic operations on the first clock management enable signal, the clock dependence result signal and the clock demand feedback signal output by the clock demand feedback circuit to generate the first logic result signal.
参照图2,第二逻辑子电路111b对应的第一时钟管理使能信号输出端,为寄存器Force1Reg。第二逻辑子电路112b对应的第一时钟管理使能信号输出端,为寄存器Forcen Reg。在需要对第一电路模块Mod1-1至第一电路模块Mod1-m的时钟进行管理时,可以控制寄存器Force1Reg输出逻辑信号。Referring to FIG. 2 , the output end of the first clock management enabling signal corresponding to the second logic subcircuit 111 b is a register Force1Reg. The output end of the first clock management enabling signal corresponding to the second logic sub-circuit 112b is the register Forcen Reg. When the clocks of the first circuit module Mod1-1 to the first circuit module Mod1-m need to be managed, the register Force1Reg can be controlled to output a logic signal.
同样地,在需要对第一电路模块Modn-1至第一电路模块Modn-k的时钟进行管理时,可以控制寄存器Forcen Reg输出逻辑信号。Similarly, when the clocks of the first circuit modules Modn-1 to Modn-k need to be managed, the register Forcen Reg can be controlled to output logic signals.
寄存器Force1Reg及寄存器Forcen Reg在需要进行时钟管理时,所输出的逻辑信号的电平值,与表示开启时钟源的时钟依赖信号的逻辑值相同。When the register Force1Reg and the register Forcen Reg need to perform clock management, the level value of the logic signal output is the same as the logic value of the clock-dependent signal indicating that the clock source is turned on.
在具体实施中,参照图1,所述时钟源管理电路12的数量可以为一个,也可以为多个,具体不作限制。所述时钟源管理电路12不仅可以用于开启或关闭相应的时钟源,也可以对时钟源所产生时钟信 号的频率进行管理。诶个时钟源管理电路12可以仅管理一个时钟源,也可以管理多个时钟源。In a specific implementation, referring to FIG. 1 , the number of the clock source management circuit 12 may be one or multiple, which is not specifically limited. The clock source management circuit 12 can not only be used to turn on or turn off the corresponding clock source, but also can manage the frequency of the clock signal generated by the clock source. Each clock source management circuit 12 may only manage one clock source, or may manage multiple clock sources.
在具体实施中,SoC芯片的时钟源可以位于芯片内,也可以位于芯片外,具体不作限制。时钟源可以由数字锁相环(DPLL)、模拟锁相环(APLL)、RC振荡器(RC-oscillator,RCO)或晶体振荡器(Crystal oscillator)等器件实现。In a specific implementation, the clock source of the SoC chip may be located inside the chip or outside the chip, which is not specifically limited. The clock source can be realized by devices such as digital phase-locked loop (DPLL), analog phase-locked loop (APLL), RC oscillator (RC-oscillator, RCO) or crystal oscillator (Crystal oscillator).
例如,在图2中,时钟源PLL1至时钟源PLLn由锁相环实现。每个时钟源唯一对应一个时钟源管理电路。具体地,时钟源PLL1由时钟源管理电路121进行控制,时钟源PLLn由时钟源管理电路12n进行控制。For example, in FIG. 2, the clock source PLL1 to the clock source PLLn are implemented by a phase-locked loop. Each clock source uniquely corresponds to a clock source management circuit. Specifically, the clock source PLL1 is controlled by the clock source management circuit 121, and the clock source PLLn is controlled by the clock source management circuit 12n.
在具体实施中,参照图1,所述时钟需求反馈电路13可以包括:第三逻辑子电路131及时钟需求反馈子电路132;其中:In specific implementation, referring to FIG. 1 , the clock demand feedback circuit 13 may include: a third logic subcircuit 131 and a clock demand feedback subcircuit 132; wherein:
所述第三逻辑子电路131,与需要第二时钟信号驱动的若干第二电路模块连接,适于接收所述若干第二电路模块输出的时钟需求信号,并基于所述时钟需求信号产生时钟需求反馈信号,所述时钟需求反馈信号信号输出至所述时钟需求信号对应的第二分频电路及所述时钟需求反馈子电路;The third logic sub-circuit 131 is connected to several second circuit modules that need to be driven by a second clock signal, and is adapted to receive clock demand signals output by the several second circuit modules, and generate a clock demand based on the clock demand signals Feedback signal, the clock demand feedback signal is output to the second frequency division circuit corresponding to the clock demand signal and the clock demand feedback sub-circuit;
所述时钟需求反馈子电路132,与所述第三逻辑子电路及时钟信号选择端连接,适于将所述时钟需求反馈信号输出至所述时钟信号选择端所选择的第一逻辑电路;The clock demand feedback sub-circuit 132 is connected to the third logic sub-circuit and the clock signal selection terminal, and is adapted to output the clock demand feedback signal to the first logic circuit selected by the clock signal selection terminal;
所述时钟信号选择端还与时钟选择器连接,以控制所述时钟选择器选择与所述时钟选择信号对应时钟源输出的时钟信号至所述第二电路模块。The clock signal selection terminal is also connected to a clock selector to control the clock selector to select a clock signal output by a clock source corresponding to the clock selection signal to the second circuit module.
结合图2,第三逻辑子电路131与第二电路模块ModS-1至第二电路模块ModS-j连接,接收第二电路模块ModS-1至第二电路模块ModS-j产生的时钟需求信号,并对所述时钟需求信号的逻辑值进行逻辑运算,得到时钟需求反馈信号。2, the third logic sub-circuit 131 is connected to the second circuit module ModS-1 to the second circuit module ModS-j, and receives the clock demand signal generated by the second circuit module ModS-1 to the second circuit module ModS-j, And performing a logic operation on the logic value of the clock demand signal to obtain a clock demand feedback signal.
在具体实施中,时钟信号选择端可以由第二寄存器实现。比如,在图2中,时钟信号选择端可以由第二寄存器Sel Reg实现。第二寄存器Sel Reg在第二寄存器控制器的控制下进行读写。具体地,第二寄存器控制器可以控制第二寄存器Sel Reg输出时钟选择信号Sel。In a specific implementation, the clock signal selection end may be implemented by a second register. For example, in FIG. 2, the clock signal selection terminal can be realized by the second register SelReg. The second register Sel Reg is read and written under the control of the second register controller. Specifically, the second register controller can control the second register SelReg to output the clock selection signal Sel.
所述时钟选择信号Sel可以携带所选择的时钟源的指示信息,用于指示第二电路模块ModS-1至第二电路模块ModS-j所需要的时钟源。所述时钟选择信号Sel一方面输入至时钟需求反馈子电路132,一方面输入至时钟选择器Clock Selector。The clock selection signal Sel may carry indication information of the selected clock source, and is used to indicate the clock sources required by the second circuit module ModS-1 to the second circuit module ModS-j. The clock selection signal Sel is input to the clock demand feedback sub-circuit 132 on the one hand, and input to the Clock Selector on the other hand.
假设所述时钟选择信号Sel所选择的时钟源为时钟源PLL1,时钟需求反馈子电路132在接收到时钟选择信号Sel后,可以将时钟需求反馈信号输出至所述时钟选择信号Sel所选择的第二逻辑子电路111b,由此使得第二逻辑子电路111b能够产生控制时钟源PLL1开启的时钟源控制信号,从而开启时钟源PLL1。时钟源PLL1开启后所产生的时钟信号输入至时钟选择器Clock Selector后,在时钟选择信号Sel的控制下,时钟源PLL1所产生的时钟信号输出至与时钟选择信号Sel对应的第二分频电路Clocks Divider进行分频,然后输入至第二电路模块ModS-1至第二电路模块ModS-j。Assuming that the clock source selected by the clock selection signal Sel is the clock source PLL1, after receiving the clock selection signal Sel, the clock demand feedback subcircuit 132 can output the clock demand feedback signal to the first clock source selected by the clock selection signal Sel. The second logic sub-circuit 111b, thereby enabling the second logic sub-circuit 111b to generate a clock source control signal for controlling the clock source PLL1 to be turned on, thereby turning on the clock source PLL1. After the clock source PLL1 is turned on, the clock signal generated by the clock source PLL1 is input to the clock selector Clock Selector, and under the control of the clock selection signal Sel, the clock signal generated by the clock source PLL1 is output to the second frequency division circuit corresponding to the clock selection signal Sel Clocks Divider performs frequency division, and then input to the second circuit module ModS-1 to the second circuit module ModS-j.
在具体实施中,第一电路模块通常由固定时钟源提供时钟信号。而第二电路模块通常由可变时钟源提供时钟信号。也就是说,第一电路模块在实际应用中所需要的时钟信号是固定的,而第二电路模块所需要的时钟信号时变化的。In a specific implementation, the first circuit module is usually provided with a clock signal by a fixed clock source. The second circuit module is usually provided with a clock signal by a variable clock source. That is to say, the clock signal required by the first circuit module in practical application is fixed, while the clock signal required by the second circuit module is variable.
在本发明的实施例中,为了能够满足第二电路模块的时钟切换需求,由时钟需求反馈子电路132根据第二电路模块的时钟需求,为第二电路模块提供相应时钟源产生的时钟信号。In the embodiment of the present invention, in order to meet the clock switching requirement of the second circuit module, the clock requirement feedback sub-circuit 132 provides the second circuit module with a clock signal generated by a corresponding clock source according to the clock requirement of the second circuit module.
在图2中,第二电路模块ModS-1至第二电路模块ModS-j具有相同的时钟需求,即所需要的均为同一频率的时钟信号。In FIG. 2 , the second circuit module ModS-1 to the second circuit module ModS-j have the same clock requirements, that is, all required clock signals are the same frequency.
可以理解的是,在实际应用中,第二电路模块ModS-1至第二电 路模块ModS-j也可以具有不同的时钟需求。具有相同时钟需求的第二电路模块与同一第二分频电路连接。此时,时钟需求反馈子电路132可以同时与多个第二逻辑子电路连接,从而同时为不同时钟需求的第二电路模块反馈时钟信号,使得不同时钟需求的第二电路模块可以同时接收到时钟信号。It can be understood that, in practical applications, the second circuit module ModS-1 to the second circuit module ModS-j may also have different clock requirements. Second circuit modules with the same clock requirements are connected to the same second frequency dividing circuit. At this time, the clock demand feedback sub-circuit 132 can be connected to a plurality of second logic sub-circuits at the same time, so as to feed back clock signals for the second circuit modules with different clock demands at the same time, so that the second circuit modules with different clock demands can receive clock signals at the same time. Signal.
相应地,第二分频器Clocks Divider由多个第二分频器构成。当第二电路模块ModS-1至第二电路模块ModS-j具有不同的时钟需求时,第二寄存器Sel Reg输出的时钟选择信号Sel中,除携带所选择的时钟源的指示信息外,还可以携带所选择的不同时钟源对应的第二电路模块或第二分频器的指示信息,由此使得时钟选择器Clock Selector能够为不同时钟需求的第二电路模块,提供准确的时钟信号。Correspondingly, the second frequency divider Clocks Divider is composed of a plurality of second frequency dividers. When the second circuit module ModS-1 to the second circuit module ModS-j have different clock requirements, in the clock selection signal Sel output by the second register Sel Reg, in addition to carrying the indication information of the selected clock source, it can also be Carry the indication information of the second circuit module or the second frequency divider corresponding to the selected different clock sources, thereby enabling the clock selector Clock Selector to provide accurate clock signals for the second circuit modules with different clock requirements.
需要说明的是,时钟选择信号Sel决定了时钟需求反馈子电路132将时钟需求反馈信号反馈至哪个第二逻辑子电路,未接收到时钟需求反馈信号的第二逻辑子电路,表明第二电路模块不需要对应时钟源产生的时钟信号。It should be noted that the clock selection signal Sel determines which second logic subcircuit the clock demand feedback subcircuit 132 feeds back the clock demand feedback signal to, and the second logic subcircuit that has not received the clock demand feedback signal indicates that the second circuit module A clock signal generated by a corresponding clock source is not required.
在具体实施中,参照图1,所述第一逻辑子电路及第二逻辑子电路的具体电路结构可以存在多种,只要所管理的第一电路模块中任意第一电路模块需要开启或关闭时钟源,第一逻辑电路能够输出争取的第一逻辑结果信号即可,从而可以争取地控制对应时钟源开启或关闭。In specific implementation, referring to FIG. 1, there may be various specific circuit structures of the first logic sub-circuit and the second logic sub-circuit, as long as any first circuit module in the managed first circuit modules needs to turn on or turn off the clock source, it is enough that the first logic circuit can output the first logic result signal sought, so that the corresponding clock source can be controlled to be turned on or off.
在具体实施中可以根据时钟依赖信号在不同逻辑值下表示的含义相关。所述第三逻辑子电路131的具体电路结构,可以根据时钟需求信号在不同逻辑值下表示的含义相关。In a specific implementation, the meanings expressed by the clock-dependent signals at different logical values may be related. The specific circuit structure of the third logic sub-circuit 131 may be related to the meanings represented by the clock demand signal under different logic values.
在本发明的一实施例中,当所述时钟依赖信号在逻辑“1”表示开启时钟源时,所述第一逻辑子电路及第二逻辑子电路可以均由或门电路组成。此时,只要第一逻辑电路所连接的任意第一电路模块需要开启时钟源,时钟依赖结果信号的逻辑值都为逻辑“1”。In an embodiment of the present invention, when the clock dependent signal indicates that the clock source is turned on at a logic "1", the first logic sub-circuit and the second logic sub-circuit may both be composed of an OR gate circuit. At this time, as long as any first circuit module connected to the first logic circuit needs to turn on the clock source, the logic value of the clock dependent result signal is logic "1".
结合图2,第一电路模块Mod1-1至第一电路模块Mod1-m输出的时钟依赖信号为高电平,且表示开启时钟源,则第一逻辑子电路111a输出的时钟依赖结果信号也为高电平,相应地,第一时钟管理使能信号输出端也可以输出逻辑高电平信号。此时,无论时钟需求反馈子电路132是否输出的时钟需求反馈信号,第二逻辑子电路111b输出的第二逻辑结果信号均为高电平,这样,时钟源管理电路121识别第二逻辑结果信号后,可以控制时钟源PLL1开启。Referring to FIG. 2 , the clock-dependent signal output by the first circuit module Mod1-1 to the first circuit module Mod1-m is at a high level, and indicates that the clock source is turned on, then the clock-dependent result signal output by the first logic sub-circuit 111a is also Correspondingly, the output end of the first clock management enable signal can also output a logic high level signal. At this time, regardless of whether the clock demand feedback sub-circuit 132 outputs the clock demand feedback signal, the second logic result signal output by the second logic sub-circuit 111b is at a high level, so that the clock source management circuit 121 recognizes the second logic result signal After that, the clock source PLL1 can be controlled to turn on.
在本发明的另一实施例中,当所述时钟依赖信号在逻辑“1”表示关闭时钟源时,所述第一逻辑子电路及第二逻辑子电路可以均由与门电路组成。此时,只要第一逻辑电路所连接的任意第一电路模块需要开启时钟源,时钟依赖结果信号的逻辑值都为逻辑“1”。In another embodiment of the present invention, when the clock dependent signal is at a logic "1" indicating that the clock source is turned off, the first logic sub-circuit and the second logic sub-circuit may both be composed of an AND gate circuit. At this time, as long as any first circuit module connected to the first logic circuit needs to turn on the clock source, the logic value of the clock dependent result signal is logic "1".
结合图2,第一电路模块Mod1-1至第一电路模块Mod1-m输出的时钟依赖信号为低电平,且表示开启时钟源,则第一逻辑子电路111a可以输出的时钟依赖结果信号也为低电平。当第一时钟管理使能信号输出端输出逻辑低电平信号时,无论时钟需求反馈子电路132是否输出的时钟需求反馈信号,第二逻辑子电路111b输出的第二逻辑结果信号均可以为低电平,这样,时钟源管理电路121识别第二逻辑结果信号后,控制时钟源PLL1开启。Referring to FIG. 2 , the clock-dependent signal output by the first circuit module Mod1-1 to the first circuit module Mod1-m is low level, and indicates that the clock source is turned on, then the clock-dependent result signal that the first logic sub-circuit 111a can output is also is low level. When the output terminal of the first clock management enable signal outputs a logic low level signal, the second logic result signal output by the second logic sub-circuit 111b can be low regardless of whether the clock demand feedback sub-circuit 132 outputs the clock demand feedback signal. In this way, after the clock source management circuit 121 recognizes the second logic result signal, it controls the clock source PLL1 to turn on.
在本发明的一实施例中,当所述时钟需求信号在逻辑“1”表示需要时钟信号时,所述第三逻辑子电路由或门电路组成。相应地,第二逻辑子电路也由或门电路组成。此时,时钟需求反馈信号为高电平信号,经时钟需求反馈子电路132后,输入至相应的第二逻辑子电路中,该第二逻辑子电路输出高电平信号,使得相应时钟源开启。In an embodiment of the present invention, when the logic "1" of the clock demand signal indicates that a clock signal is required, the third logic sub-circuit is composed of an OR gate circuit. Correspondingly, the second logic sub-circuit is also composed of an OR gate circuit. At this time, the clock demand feedback signal is a high-level signal, which is input to the corresponding second logic sub-circuit after passing through the clock demand feedback sub-circuit 132, and the second logic sub-circuit outputs a high-level signal, so that the corresponding clock source is turned on .
在本发明的另一实施例中,当所述时钟需求信号在逻辑“0”表示需要时钟信号时,所述第三逻辑子电路由与门电路组成。相应地,第二逻辑子电路也由与门电路组成。此时,时钟需求反馈信号为低电平信号,经时钟需求反馈子电路132后,输入至相应的第二逻辑子电路中,该第二逻辑子电路输出低电平信号,使得相应时钟源开启。In another embodiment of the present invention, when the logic "0" of the clock demand signal indicates that a clock signal is required, the third logic sub-circuit is composed of an AND gate circuit. Correspondingly, the second logic subcircuit is also composed of an AND gate circuit. At this time, the clock demand feedback signal is a low-level signal, which is input to the corresponding second logic sub-circuit after passing through the clock demand feedback sub-circuit 132, and the second logic sub-circuit outputs a low-level signal, so that the corresponding clock source is turned on .
需要说明的是,所述第一逻辑子电路、第二逻辑子电路及第三逻辑子电路,具体电路结构并不限于上述实施例中的描述,只要能够基于电路模块的输出,向时钟源管理电路输出表征电路模块需求的正确信号即可。It should be noted that, the specific circuit structure of the first logic subcircuit, the second logic subcircuit and the third logic subcircuit is not limited to the description in the above embodiment, as long as the output of the circuit module can be used to manage the clock source It is enough for the circuit to output the correct signal representing the demand of the circuit module.
在图2示出的实施例中,第一分频电路只包括一级第一分频器,即第一分频器Clockl Divider及第一分频器Clockn Divider,第二分频电路也只包括一级第二分频器Clocks Divider。In the embodiment shown in Fig. 2, the first frequency division circuit only comprises the first frequency divider of one stage, i.e. the first frequency divider Clock1 Divider and the first frequency divider Clockn Divider, and the second frequency division circuit also only comprises One-stage second frequency divider Clocks Divider.
然而实际应用中,第一分频电路可以包括两个以上级联的第一分频器,第二分频电路也可以包括两个以上级联的第二分频器。However, in practical applications, the first frequency division circuit may include more than two first frequency dividers connected in cascade, and the second frequency division circuit may also include more than two second frequency dividers connected in cascade.
例如,参照图3,时钟源PLL1所在的时钟域中,第一电路模块Modj-1至第一电路模块Modj-k通过二级第一分频器与时钟源PLL1连接。所述二级第一分频器包括:第一分频器Clockl Divider及第一分频器Clockj Divider。第一分频器Clockj Divider与第一分频器Clockl Divider相互级联。For example, referring to FIG. 3 , in the clock domain where the clock source PLL1 is located, the first circuit module Modj-1 to the first circuit module Modj-k are connected to the clock source PLL1 through a two-stage first frequency divider. Described secondary first frequency divider comprises: first frequency divider Clock1 Divider and first frequency divider Clockj Divider. The first frequency divider Clockj Divider and the first frequency divider Clock1 Divider are cascaded with each other.
比如,时钟源产生的时钟信号频率为128MHZ,经第一分频器Clockl Divider,时钟信号的频率变为64MHZ。再经第一分频器Clockj Divider后,得到第一时钟信号。此时第一时钟信号的频率为32MHZ。For example, the frequency of the clock signal generated by the clock source is 128MHZ, and the frequency of the clock signal becomes 64MHZ through the first frequency divider Clockl Divider. After passing through the first frequency divider Clockj Divider, the first clock signal is obtained. At this time, the frequency of the first clock signal is 32MHZ.
当第一分频电路包括两个以上级联的第一分频器时,所述第一逻辑子电路包括两个以上级联的第一门电路,所述第一门电路与所述第一分频器一一对应连接。When the first frequency dividing circuit includes more than two cascaded first frequency dividers, the first logic sub-circuit includes more than two cascaded first gate circuits, and the first gate circuit and the first The dividers are connected in one-to-one correspondence.
例如,参照图3,当所述第一分频电路包括两级第一分频器时,所述第一逻辑子电路包括两级第一门电路,分别为第一门电路M1及第一门电路M2。第一电路模块Modj-1至第一电路模块Modj-k产生的时钟依赖信号,通过第一门电路M1进行逻辑运算后,再输入至第一门电路M2中。第二门电路M2,对第一门电路M1的输出信号及与其直接连接的第一电路模块(如第一电路模块Mod1-m)输出的时钟依赖信号,进行逻辑运算,得到时钟依赖结果信号。For example, referring to FIG. 3, when the first frequency division circuit includes two first frequency dividers, the first logic sub-circuit includes two first gate circuits, which are first gate circuit M1 and first gate circuit M1 respectively. Circuit M2. The clock-dependent signals generated by the first circuit module Modj-1 to the first circuit module Modj-k are input to the first gate circuit M2 after logic operation is performed by the first gate circuit M1. The second gate circuit M2 performs logic operations on the output signal of the first gate circuit M1 and the clock-dependent signal output by the first circuit module directly connected to it (such as the first circuit module Mod1-m) to obtain a clock-dependent result signal.
可以理解的是,在第一分频电路连接的任意第一电路模块需要开启或关闭时钟源时,时钟源管理电路均能够迅速、及时地响应。It can be understood that when any first circuit module connected to the first frequency division circuit needs to turn on or off the clock source, the clock source management circuit can respond quickly and in time.
在具体实施中,所述第二分频电路也可以包括两个以上级联的第二分频器。相应地,所述第三逻辑子电路可以包括两个以上级联的第二门电路,所述第二门电路与所述第二分频器一一对应连接。具体可以参照图3中关于第一分频电路及第一逻辑子电路均为两级时的连接关系进行设置,此处不再赘述。In a specific implementation, the second frequency division circuit may also include more than two second frequency dividers cascaded. Correspondingly, the third logic sub-circuit may include more than two cascaded second gate circuits, and the second gate circuits are connected to the second frequency divider in a one-to-one correspondence. Specifically, it can be set with reference to the connection relationship when the first frequency division circuit and the first logic sub-circuit are both in two stages in FIG. 3 , and details will not be described here.
需要说明的是,无论是图2还是图3,均只是芯片的一种简化示意图。实际中时钟树的层次结构及各时钟域的依赖关系要复杂的多。但可以理解的是,无论时钟树的层次结构及各时钟域的依赖关系如何,均可以采用本发明的方案,对时钟进行管理。It should be noted that both FIG. 2 and FIG. 3 are only a simplified schematic diagram of the chip. In practice, the hierarchical structure of the clock tree and the dependencies of each clock domain are much more complicated. However, it can be understood that regardless of the hierarchical structure of the clock tree and the dependencies of each clock domain, the solution of the present invention can be used to manage clocks.
本发明的方案,通过硬件自动逆时钟树传导系统时钟需求,来实现时钟管理。这种硬件时钟控制方案,只需要各个电路模块管理自己是否还需工作。如果不需,可关闭本模块对时钟的需求。通过逆着时钟树逐级综合、传导对上一级时钟的需求,直到时钟的源头,可以做到准确、及时控制时钟,逻辑清晰(不会出错),可以更好的降低系统动态功耗和时钟源自身的功耗。且相对于完全采用软件的方式进行时钟管理,复杂度降低,从而简化整个芯片的结构。In the solution of the present invention, clock management is realized by automatically transmitting system clock requirements through a clock tree reversed by hardware. This hardware clock control scheme only requires each circuit module to manage whether it needs to work. If you don't need it, you can turn off the clock requirement of this module. By going against the clock tree and synthesizing and transmitting the demand for the upper-level clock until the source of the clock, the clock can be controlled accurately and in time, the logic is clear (no error), and the dynamic power consumption of the system can be better reduced. The power consumption of the clock source itself. Moreover, compared with completely using software to manage the clock, the complexity is reduced, thereby simplifying the structure of the entire chip.
本发明实施例还提供了一种芯片,所述芯片包括上述的时钟管理电路。An embodiment of the present invention also provides a chip, and the chip includes the above-mentioned clock management circuit.
本发明的实施例还提供了一种电子设备,所述电子设备可以包括上述的芯片。An embodiment of the present invention also provides an electronic device, and the electronic device may include the above-mentioned chip.
关于上述实施例中描述的芯片及电子设备,其包含的各个模块/单元可以都采用电路等硬件的方式实现,或者,至少部分模块/单元可以采用软件程序的方式实现,该软件程序运行于芯片内部集成的处理器,剩余的(如果有)部分模块/单元可以采用电路等硬件方式实现;对于应用于或集成于芯片模组的各个装置、产品,其包含的各个 模块/单元可以都采用电路等硬件的方式实现,不同的模块/单元可以位于芯片模组的同一组件(例如芯片、电路模块等)或者不同组件中,或者,至少部分模块/单元可以采用软件程序的方式实现,该软件程序运行于芯片模组内部集成的处理器,剩余的(如果有)部分模块/单元可以采用电路等硬件方式实现;对于应用于或集成于终端的各个装置、产品,其包含的各个模块/单元可以都采用电路等硬件的方式实现,不同的模块/单元可以位于终端内同一组件(例如,芯片、电路模块等)或者不同组件中,或者,至少部分模块/单元可以采用软件程序的方式实现,该软件程序运行于终端内部集成的处理器,剩余的(如果有)部分模块/单元可以采用电路等硬件方式实现。With regard to the chips and electronic devices described in the above-mentioned embodiments, each module/unit contained therein may be realized by means of hardware such as circuits, or at least some modules/units may be realized by means of software programs, and the software programs run on the chip. For the internally integrated processor, the remaining (if any) modules/units can be implemented by means of hardware such as circuits; for each device or product applied to or integrated in a chip module, each module/unit contained in it can be implemented using a circuit The different modules/units can be located in the same component (such as chips, circuit modules, etc.) or different components of the chip module, or at least some modules/units can be implemented in the form of software programs. Running on the processor integrated in the chip module, the remaining (if any) modules/units can be realized by hardware such as circuits; They are all realized by means of hardware such as circuits, and different modules/units can be located in the same component (such as a chip, circuit module, etc.) or in different components in the terminal, or at least some modules/units can be implemented by means of software programs. The software program runs on the processor integrated in the terminal, and the remaining (if any) modules/units can be realized by means of hardware such as circuits.
虽然本发明披露如上,但本发明并非限定于此。任何本领域技术人员,在不脱离本发明的精神和范围内,均可作各种更动与修改,因此本发明的保护范围应当以权利要求所限定的范围为准。Although the present invention is disclosed above, the present invention is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, so the protection scope of the present invention should be based on the scope defined in the claims.
Claims (11)
- 一种时钟管理电路,其特征在于,包括:第一逻辑电路、时钟源管理电路及时钟需求反馈电路;其中:A clock management circuit, characterized by comprising: a first logic circuit, a clock source management circuit, and a clock demand feedback circuit; wherein:所述第一逻辑电路,与需要第一时钟信号驱动的若干第一电路模块连接,适于接收所述若干第一电路模块输出的时钟依赖信号,并基于所述时钟依赖信号,产生第一逻辑结果信号;The first logic circuit is connected to a plurality of first circuit modules that need to be driven by a first clock signal, and is adapted to receive clock-dependent signals output by the plurality of first circuit modules, and generate a first logic circuit based on the clock-dependent signals. result signal;所述时钟源管理电路,与所述第一逻辑电路连接,适于接收所述第一逻辑结果信号,并基于所述第一逻辑结果信号产生对应的时钟源控制信号,所述时钟源控制信号输出至对应的时钟源,以控制所述第一时钟源打开或关闭;The clock source management circuit, connected to the first logic circuit, is adapted to receive the first logic result signal, and generate a corresponding clock source control signal based on the first logic result signal, and the clock source control signal output to a corresponding clock source, so as to control the first clock source to be turned on or off;所述时钟需求反馈电路,与需要第二时钟信号驱动的若干第二电路模块及时钟信号选择端连接,适于接收所述若干第二电路模块输出的时钟需求信号,产生时钟需求反馈信号,并将所述时钟需求反馈信号输出至所述时钟信号选择端所选择的第一逻辑电路。The clock demand feedback circuit is connected to a plurality of second circuit modules that need to be driven by a second clock signal and a clock signal selection terminal, and is adapted to receive the clock demand signals output by the plurality of second circuit modules, generate a clock demand feedback signal, and Outputting the clock demand feedback signal to the first logic circuit selected by the clock signal selection end.
- 如权利要求1所述的时钟管理电路,其特征在于,所述第一逻辑电路包括:第一逻辑子电路及第二逻辑子电路;其中:The clock management circuit according to claim 1, wherein the first logic circuit comprises: a first logic subcircuit and a second logic subcircuit; wherein:所述第一逻辑子电路,与需要第一时钟信号驱动的若干第一电路模块连接,适于接收所述若干第一电路模块输出的时钟依赖信号,并基于所述时钟依赖信号,输出时钟依赖结果信号,所述时钟依赖结果信号输入至所述第二逻辑子电路以及产生所述第一时钟信号的第一分频电路;The first logic sub-circuit is connected to several first circuit modules that need to be driven by a first clock signal, and is adapted to receive clock-dependent signals output by the several first circuit modules, and output clock-dependent signals based on the clock-dependent signals. a result signal, the clock-dependent result signal being input to the second logic sub-circuit and a first divider circuit that generates the first clock signal;所述第二逻辑子电路,与第一时钟管理使能信号输出端及所述时钟需求反馈电路连接,适于基于所述第一时钟管理使能信号输出端输出的第一时钟管理使能信号、时钟依赖结果信号及所述时钟需求反馈电路输出的时钟需求反馈信号,产生所述第一逻辑结果信号。The second logic subcircuit is connected to the first clock management enable signal output end and the clock demand feedback circuit, and is adapted to be based on the first clock management enable signal output from the first clock management enable signal output end , a clock dependent result signal and a clock demand feedback signal output by the clock demand feedback circuit to generate the first logic result signal.
- 如权利要求2所述的时钟管理电路,其特征在于,当所述时钟依赖信号在逻辑“1”表示开启时钟源时,所述第一逻辑子电路及第二 逻辑子电路均由或门电路组成;当所述时钟依赖信号在逻辑“1”表示关闭时钟源时,所述第一逻辑子电路及第二逻辑子电路均由与门电路组成。The clock management circuit according to claim 2, wherein when the clock dependent signal is logic “1” indicating that the clock source is turned on, the first logic sub-circuit and the second logic sub-circuit are both composed of an OR gate circuit Composition; when the clock dependent signal is at a logic “1” indicating that the clock source is turned off, the first logic sub-circuit and the second logic sub-circuit are both composed of an AND gate circuit.
- 如权利要求2所述的时钟管理电路,其特征在于,所述第一分频电路包括两个以上级联的第一分频器,所述第一逻辑子电路包括两个以上级联的第一门电路,所述第一门电路与所述第一分频器一一对应连接。The clock management circuit according to claim 2, wherein the first frequency dividing circuit comprises more than two cascaded first frequency dividers, and the first logic sub-circuit comprises more than two cascaded first frequency dividers. A gate circuit, the first gate circuit is connected to the first frequency divider in a one-to-one correspondence.
- 如权利要求1所述的时钟管理电路,其特征在于,所述第一时钟管理使能信号输出端为第一寄存器。The clock management circuit according to claim 1, wherein the output terminal of the first clock management enabling signal is a first register.
- 如权利要求1所述的时钟管理电路,其特征在于,所述时钟需求反馈电路包括:第三逻辑子电路及时钟需求反馈子电路;其中:The clock management circuit according to claim 1, wherein the clock demand feedback circuit comprises: a third logic subcircuit and a clock demand feedback subcircuit; wherein:所述第三逻辑子电路,与需要第二时钟信号驱动的若干第二电路模块连接,适于接收所述若干第二电路模块输出的时钟需求信号,并基于所述时钟需求信号产生时钟需求反馈信号,所述时钟需求反馈信号信号输出至所述时钟需求信号对应的第二分频电路及所述时钟需求反馈子电路;The third logic sub-circuit is connected to a plurality of second circuit modules that need to be driven by a second clock signal, and is adapted to receive clock demand signals output by the plurality of second circuit modules, and generate clock demand feedback based on the clock demand signals signal, the clock demand feedback signal is output to the second frequency division circuit corresponding to the clock demand signal and the clock demand feedback subcircuit;所述时钟需求反馈子电路,与所述第三逻辑子电路及时钟信号选择端连接,适于将所述时钟需求反馈信号输出至所述时钟信号选择端所选择的第一逻辑电路;The clock demand feedback subcircuit is connected to the third logic subcircuit and a clock signal selection terminal, and is adapted to output the clock demand feedback signal to the first logic circuit selected by the clock signal selection terminal;所述时钟信号选择端还与时钟选择器连接,以控制所述时钟选择器选择与所述时钟信号选择端一致的时钟信号至所述第二电路模块。The clock signal selection end is also connected to a clock selector to control the clock selector to select a clock signal consistent with the clock signal selection end to the second circuit module.
- 如权利要求6所述的时钟管理电路,其特征在于,当所述时钟需求信号在逻辑“1”表示需要时钟信号时,所述第三逻辑子电路由或门电路组成;当所述时钟需求信号在逻辑“0”表示需要时钟信号时,所述第三逻辑子电路由与门电路组成。The clock management circuit according to claim 6, characterized in that, when the clock demand signal indicates that a clock signal is needed at a logic "1", the third logic sub-circuit is composed of an OR gate circuit; when the clock demand signal When the signal logic "0" indicates that a clock signal is needed, the third logic sub-circuit is composed of an AND gate circuit.
- 如权利要求6所述的时钟管理电路,其特征在于,所述第二分频电路包括两个以上级联的第二分频器,所述第三逻辑子电路包括两个 以上级联的第二门电路,所述第二门电路与所述第二分频器一一对应连接。The clock management circuit according to claim 6, wherein the second frequency dividing circuit comprises more than two second frequency dividers cascaded, and the third logic sub-circuit comprises more than two cascaded first frequency dividers. Two gate circuits, the second gate circuit is connected to the second frequency divider in a one-to-one correspondence.
- 如权利要求1所述的时钟管理电路,其特征在于,所述时钟信号选择端为第二寄存器。The clock management circuit according to claim 1, wherein the clock signal selection terminal is a second register.
- 一种芯片,包括权利要求1至9任一项所述的时钟管理电路。A chip comprising the clock management circuit according to any one of claims 1-9.
- 一种电子设备,包括权利要求10所述的芯片。An electronic device, comprising the chip described in claim 10.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110661902.X | 2021-06-15 | ||
CN202110661902.XA CN113325918B (en) | 2021-06-15 | 2021-06-15 | Clock management circuit, chip and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022262570A1 true WO2022262570A1 (en) | 2022-12-22 |
Family
ID=77420801
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/096152 WO2022262570A1 (en) | 2021-06-15 | 2022-05-31 | Clock management circuit, chip and electronic device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113325918B (en) |
WO (1) | WO2022262570A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113325918B (en) * | 2021-06-15 | 2022-09-27 | 展讯通信(上海)有限公司 | Clock management circuit, chip and electronic equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090108874A1 (en) * | 2007-10-24 | 2009-04-30 | International Business Machines Corporation | Limited Switch Dynamic Logic Cell Based Register |
CN106992770A (en) * | 2016-01-21 | 2017-07-28 | 华为技术有限公司 | Clock circuit and its method for transmitting clock signal |
CN107315448A (en) * | 2017-06-26 | 2017-11-03 | 北方电子研究院安徽有限公司 | A kind of Clock management architecture design method of low-Power Multicore SoC |
CN107340800A (en) * | 2015-01-23 | 2017-11-10 | 西安智多晶微电子有限公司 | CPLD with Delay Feedback loop |
CN113325918A (en) * | 2021-06-15 | 2021-08-31 | 展讯通信(上海)有限公司 | Clock management circuit, chip and electronic equipment |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015161890A1 (en) * | 2014-04-25 | 2015-10-29 | Universitat Politècnica De Catalunya | Adaptive clocking configurations and calibration methods thereof |
CN105337496B (en) * | 2014-05-29 | 2019-06-25 | 展讯通信(上海)有限公司 | Pulse frequency modulation circuit based on voltage controlled oscillator |
CN111294043B (en) * | 2020-03-11 | 2023-04-11 | 京微齐力(北京)科技有限公司 | System for automatically recovering external clock based on PLL |
-
2021
- 2021-06-15 CN CN202110661902.XA patent/CN113325918B/en active Active
-
2022
- 2022-05-31 WO PCT/CN2022/096152 patent/WO2022262570A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090108874A1 (en) * | 2007-10-24 | 2009-04-30 | International Business Machines Corporation | Limited Switch Dynamic Logic Cell Based Register |
CN107340800A (en) * | 2015-01-23 | 2017-11-10 | 西安智多晶微电子有限公司 | CPLD with Delay Feedback loop |
CN106992770A (en) * | 2016-01-21 | 2017-07-28 | 华为技术有限公司 | Clock circuit and its method for transmitting clock signal |
CN107315448A (en) * | 2017-06-26 | 2017-11-03 | 北方电子研究院安徽有限公司 | A kind of Clock management architecture design method of low-Power Multicore SoC |
CN113325918A (en) * | 2021-06-15 | 2021-08-31 | 展讯通信(上海)有限公司 | Clock management circuit, chip and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN113325918A (en) | 2021-08-31 |
CN113325918B (en) | 2022-09-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7782125B2 (en) | Semiconductor integrated circuit | |
US10853304B2 (en) | System on chip including clock management unit and method of operating the system on chip | |
US5317601A (en) | Clock distribution system for an integrated circuit device | |
US7792154B2 (en) | Controlling asynchronous clock domains to perform synchronous operations | |
US7284143B2 (en) | System and method for reducing clock skew | |
CN107315448A (en) | A kind of Clock management architecture design method of low-Power Multicore SoC | |
US6078202A (en) | Semiconductor device having portions that operate at different frequencies, and method of designing the device | |
JPH01161912A (en) | Semiconductor integrated circuit | |
US8493108B2 (en) | Synchronizer with high reliability | |
US20150089108A1 (en) | Clock signals for dynamic reconfiguration of communication link bundles | |
WO2022262570A1 (en) | Clock management circuit, chip and electronic device | |
US20160117429A1 (en) | System for reducing power consumption of integrated circuit | |
CN115714597A (en) | Universal PLL clock control circuit and SOC chip | |
CN218181513U (en) | I2S master-slave mode control circuit | |
US7003683B2 (en) | Glitchless clock selection circuit | |
CN115242224A (en) | Multi-clock glitch-free switching circuit and switching method | |
US11275708B2 (en) | System on chip including clock management unit and method of operating the system on chip | |
US20110158005A1 (en) | Data Access Apparatus and Associated Method for Accessing Data Using Internally Generated Clocks | |
US11693461B1 (en) | Module reset circuit, reset unit and SoC reset architecture | |
US6853929B2 (en) | Pipeline control for power management | |
US6963990B2 (en) | Clock generation for multiple secondary buses of a PCI bridge | |
US20110316616A1 (en) | Semiconductor integrated circuit for controlling power supply | |
WO2024041291A1 (en) | Method and system for emulating ic design with fpga, and storage medium | |
US20240192745A1 (en) | Architecture for managing asynchronous resets in a system-on-a-chip | |
US12072731B2 (en) | Technique for clock alignment supporting reset isolation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22824050 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 22824050 Country of ref document: EP Kind code of ref document: A1 |