Clock frequency division circuit, system on chip and electronic equipment

By introducing a state control module and a clock generation module into the clock frequency division circuit, dynamically adjusting the frequency division coefficient and sampling node, the problem that the clock frequency division circuit in the prior art cannot adapt to the changing needs, and realize the arbitrary frequency division coefficient Support improves the working performance of the chip.

CN118487593BActive Publication Date: 2024-11-08THIS CORE TECH (WUXI) CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410917333.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2024-11-08
Estimated Expiration
2044-07-10

AI Technical Summary

Technical Problem

The existing clock frequency division circuits are difficult to adapt to different frequency division requirements flexibly and stably, which leads to being unable to meet the frequency division requirements when the frequency division requirements change, affecting the chip's working performance.

Method used

A clock frequency division circuit is designed, including a state control module and a clock generation module. By adjusting the frequency division coefficient, counting period and sampling node, configuration instructions are dynamically adjusted to realize the frequency division clock signal output of any frequency division coefficient.

Benefits of technology

It realizes flexible adaptation to any frequency division coefficient, ensures that the clock frequency division circuit operates stably under different requirements, and improves the working performance of the chip.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118487593B_ABST
    Figure CN118487593B_ABST
Patent Text Reader

Abstract

The present invention proposes a clock frequency division circuit, a system on chip and an electronic device, wherein a state control module is respectively connected to an enable end of a clock generation logic and an enable end of a first counter, an input end of the first counter is used to access a reference clock signal, and an output end of the first counter is connected to an input end of the clock generation logic; the state control module is used to send an enable signal to the clock generation logic and the first counter when performing a frequency division task of a first-class frequency division coefficient, the state control module is used to generate a first-class configuration instruction according to the first-class frequency division coefficient, and send the first-class configuration instruction to the first counter; the first counter is used to sample the reference clock signal at a first-class sampling node, and control the clock generation logic to output a frequency division clock signal corresponding to the first-class frequency division coefficient based on the sampling result. The frequency division coefficient is adjusted to control the clock generation logic to output a frequency division clock signal corresponding to any frequency division coefficient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of frequency division technology, and in particular to a clock frequency division circuit, a system on chip and an electronic device. Background Art

[0002] When the chip performs different tasks, the system clock frequency required may be different. In addition, the clock frequencies of different peripheral resources in the chip at the same time are also different. The main clock is usually divided into different frequencies by the frequency division circuit inside the chip to provide different tasks and peripherals. The quality of the clock generated by the frequency division circuit has a great impact on the working performance of the chip.

[0003] The clock frequency divider circuit is used to divide the input clock (also known as the reference clock) to obtain the required clock frequency. The flexible and stable clock frequency divider circuit can provide the required clock for the modules in the system on chip. The existing clock frequency divider circuit often meets a few fixed frequency division requirements. When the frequency division requirements change, they may not be able to meet them, resulting in the failure of the clock frequency divider circuit. Summary of the invention

[0004] The object of the present invention is to provide a clock frequency division circuit, a system on chip and an electronic device to at least partially improve the above-mentioned problem.

[0005] In order to achieve the above purpose, the technical solution adopted by the embodiment of the present invention is as follows:

[0006] In a first aspect, an embodiment of the present invention provides a clock frequency division circuit, the clock frequency division circuit comprising: a state control module and a clock generation module, the clock generation module comprising clock generation logic and a first counter;

[0007] The state control module is connected to the enable end of the clock generation logic and the enable end of the first counter respectively, the input end of the first counter is used to access the reference clock signal, and the output end of the first counter is connected to the input end of the clock generation logic;

[0008] The state control module is used to send an enable signal to the clock generation logic and the first counter when performing a frequency division task of the first type of frequency division coefficient;

[0009] Wherein, the first type of frequency division coefficient is an integer greater than 1;

[0010] The state control module is used to generate a first type of configuration instruction according to the first type of frequency division coefficient, and send the first type of configuration instruction to the first counter;

[0011] The first type of configuration instructions includes a first type of counting cycle and a first type of sampling node, the first type of sampling node represents a counting period for sampling the reference clock signal in the first type of counting cycle, when the first type of frequency division coefficient is an even number M, the first type of sampling nodes are the M / 2th counting period and the Mth counting period, when the first type of frequency division coefficient is an odd number K, the first type of sampling nodes are the (K+1) / 2th counting period and the Kth counting period, and the first type of counting cycle is equal to the first type of frequency division coefficient;

[0012] The first counter is used to sample the reference clock signal at the first type of sampling node, and control the clock generation logic to output the divided clock signal corresponding to the first type of frequency division coefficient based on the sampling result.

[0013] In a second aspect, an embodiment of the present invention provides a system on chip, which includes the above-mentioned clock frequency division circuit.

[0014] In a third aspect, an embodiment of the present invention provides an electronic device, wherein the electronic device includes the above-mentioned system on chip.

[0015] Compared with the prior art, the clock frequency division circuit, system on chip and electronic device provided in the embodiment of the present invention include: a state control module and a clock generation module, the clock generation module includes a clock generation logic and a first counter; the state control module is respectively connected to the enable end of the clock generation logic and the enable end of the first counter, the input end of the first counter is used to access the reference clock signal, and the output end of the first counter is connected to the input end of the clock generation logic. When the first type of frequency division coefficient changes, the state control module can adjust the first type of counting cycle and the first type of sampling node accordingly, and adaptively change the first type of configuration instructions. The clock generation module can realize dynamic frequency division according to the changed first type of counting cycle and the first type of sampling node, and output a frequency division clock signal corresponding to any frequency division coefficient.

[0016] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1This is one of the structural schematic diagrams of the clock frequency division circuit provided in the embodiment of the present invention.

[0019] Figure 2 A timing diagram of a 4-frequency division provided in an embodiment of the present invention.

[0020] Figure 3 A timing diagram of a 3-frequency division provided in an embodiment of the present invention.

[0021] Figure 4 The second structural schematic diagram of the clock frequency division circuit provided in the embodiment of the present invention.

[0022] Figure 5 A timing diagram of 2.3 frequency division provided in an embodiment of the present invention.

[0023] Figure 6 The third structural schematic diagram of the clock frequency division circuit provided in the embodiment of the present invention.

[0024] Figure 7 A timing diagram of a 1-frequency division provided in an embodiment of the present invention.

[0025] Figure 8 This is a timing diagram of 1.1 frequency division provided by an embodiment of the present invention.

[0026] In the figure: 10 - state control module; 20 - clock generation module; 21 - first counter; 22 - second counter; 23 - clock generation logic; 24 - channel unit; 25 - OR gate. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0028] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0029] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. At the same time, in the description of the present invention, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0030] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0031] In the description of the present invention, it should be noted that the terms "upper", "lower", "inside", "outside", etc. indicate directions or positional relationships based on the directions or positional relationships shown in the accompanying drawings, or are directions or positional relationships in which the product of the invention is usually placed when in use. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore should not be understood as a limitation on the present invention.

[0032] In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "disposed" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0033] Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0034] The present invention provides a clock frequency division circuit, which can flexibly and stably realize the frequency division of any coefficient. Figure 1 , Figure 1 This is one of the structural schematic diagrams of the clock frequency division circuit provided in the embodiment of the present invention.

[0035] The clock frequency division circuit includes a state control module 10 and a clock generation module 20 . The clock generation module 20 includes a clock generation logic 23 and a first counter 21 .

[0036] The state control module 10 is connected to the enable end of the clock generation logic 23 and the enable end of the first counter 21 respectively. The input end of the first counter 21 is used to access the reference clock signal, and the output end of the first counter 21 is connected to the input end of the clock generation logic 23.

[0037] The state control module 10 is used to send an enable signal to the clock generation logic 23 and the first counter 21 when executing the frequency division task of the first type of frequency division coefficient.

[0038] The first type of frequency division coefficient is an integer greater than 1.

[0039] The state control module 10 is used to generate a first type of configuration instruction according to the first type of frequency division coefficient, and send the first type of configuration instruction to the first counter 21 .

[0040] The first type of configuration instructions includes a first type of counting cycle and a first type of sampling node, and the first type of sampling node represents a counting period for sampling the reference clock signal in the first type of counting cycle. When the first type of frequency division coefficient is an even number M, the first type of sampling node is the M / 2th counting period and the Mth counting period, and when the first type of frequency division coefficient is an odd number K, the first type of sampling node is the (K+1) / 2th counting period and the Kth counting period, and the first type of counting cycle is equal to the first type of frequency division coefficient.

[0041] The first counter 21 is used to sample the reference clock signal at the first type of sampling node, and control the clock generation logic 23 to output the frequency-divided clock signal corresponding to the first type of frequency-dividing coefficient based on the sampling result.

[0042] The staff can configure the first type of frequency division coefficient in the state control module 10 through the host computer. When the first type of frequency division coefficient changes, the state control module 10 adjusts the first type of configuration instructions accordingly, thereby controlling the clock generation logic 23 to output a frequency division clock signal corresponding to any frequency division coefficient.

[0043] It should be emphasized that the host computer can adjust the division coefficient in the state control module, which is not limited to the first type of division coefficient (an integer greater than 1), but can also be a decimal greater than 1, such as the second type of division coefficient, the fifth type of division coefficient and the division coefficient 1 mentioned below.

[0044] In an optional implementation, the first type of frequency division coefficient is an even number M, and the first type of sampling nodes are the M / 2th counting period and the Mth counting period.

[0045] After the first counter 21 starts counting, when detecting and sampling the rising edge of the reference clock signal in the first counting period of the first first counting cycle, it transmits the first type of control signal to the clock generation logic 23, so that the clock generation logic 23 outputs a high level signal.

[0046] After the first counter 21 starts counting, when detecting and sampling the rising edge of the reference clock signal in the M / 2th counting period of the first first counting cycle, it transmits the second type of control signal to the clock generation logic 23 to make the clock generation logic 23 output a low level signal.

[0047] The first counter 21 is used to transmit a first type control signal to the clock generation logic 23 when sampling a rising edge of the reference clock signal in the Mth counting period of the (i-1)th first type counting cycle, so that the clock generation logic 23 outputs a high level signal, 2≤i.

[0048] The first counter 21 is used to transmit the second type control signal to the clock generation logic 23 when sampling the rising edge of the reference clock signal in the M / 2th counting period of the i-th first type counting cycle, so that the clock generation logic 23 outputs a low level signal.

[0049] Please refer to Figure 2 , Figure 2 A timing diagram of a 4-frequency division provided in an embodiment of the present invention. Figure 2 Where clk_in represents the reference clock signal, counter0 represents the count value of the first counter, and clk_div4 represents the divided clock signal with a division factor of 4.

[0050] like Figure 2 As shown, the first type of frequency division coefficient is an even number M=4, and the first type of sampling nodes are the second counting period and the fourth counting period. In the first counting period, the count value of the first counter 21 is 0, in the second counting period, the count value of the first counter 21 is 1, in the third counting period, the count value of the first counter 21 is 2, and in the fourth counting period, the count value of the first counter 21 is 3.

[0051] In an optional implementation, when the first type of frequency division coefficient is an odd number K, the first type of sampling nodes are the (K+1) / 2th counting period and the Kth counting period.

[0052] After the first counter 21 starts counting, when detecting and sampling the rising edge of the reference clock signal in the first counting period of the first first counting cycle, it transmits the first type of control signal to the clock generation logic 23, so that the clock generation logic 23 outputs a high level signal.

[0053] After the first counter 21 starts counting, when detecting and sampling the falling edge of the reference clock signal in the (K+1) / 2th counting period of the first first counting cycle, it transmits the second type of control signal to the clock generation logic 23, so that the clock generation logic 23 outputs a low level signal.

[0054] The first counter 21 is used to transmit a first type control signal to the clock generation logic 23 when sampling a rising edge of the reference clock signal in the Kth counting period of the i-1th first type counting cycle, so that the clock generation logic 23 outputs a high level signal, 2≤i.

[0055] The first counter 21 is used to transmit the second type control signal to the clock generation logic 23 when sampling the falling edge of the reference clock signal in the (K+1) / 2th counting period of the i-th first type counting cycle, so that the clock generation logic 23 outputs a low level signal.

[0056] Please refer to Figure 3 , Figure 3 A timing diagram of a 3-frequency division provided in an embodiment of the present invention. Figure 3 Where clk_in represents the reference clock signal, counter0 represents the count value of the first counter, and clk_div3 represents the divided clock signal with a division factor of 3.

[0057] like Figure 3 As shown, the first type of frequency division coefficient is an odd number K=3, and the first type of sampling nodes are the second counting period and the third counting period. In the first counting period, the count value of the first counter 21 is 0, in the second counting period, the count value of the first counter 21 is 1, and in the third counting period, the count value of the first counter 21 is 2.

[0058] Please refer to Figure 4 , Figure 4 The second structural diagram of the clock frequency division circuit provided by the embodiment of the present invention. In an optional implementation, the clock generation module 20 also includes a second counter 22, the state control module 10 is connected to the enable terminal of the second counter 22, the input terminal of the second counter 22 is used to access the reference clock signal, the output terminal of the second counter 22 is connected to the input terminal of the clock generation logic 23, and the second counter 22 is also connected to the first counter 21.

[0059] The state control module 10 is used to send an enable signal to the clock generation logic 23, the first counter 21 and the second counter 22 when executing the frequency division task of the second type of frequency division coefficient.

[0060] The second type of frequency division coefficient is a decimal greater than 2.

[0061] The state control module 10 is used to generate second, third and fourth configuration instructions according to the second frequency division coefficient, and send the second configuration instructions to the first counter 21 and send the third and fourth configuration instructions to the second counter 22.

[0062] Among them, the second type of configuration instructions include the second type of counting cycle, the third type of configuration instructions include the third type of counting cycle and the third type of sampling node, the third type of sampling node represents the counting period for sampling the reference clock signal in the third type of counting cycle, and the fourth type of configuration instructions include the fourth type of counting cycle and the fourth type of sampling node, the fourth type of sampling node represents the counting period for sampling the reference clock signal in the fourth type of counting cycle.

[0063] Optionally, the third type of configuration instruction further includes the length of the first interval, and the fourth type of configuration instruction further includes the length of the second interval. The second counter 22 can also obtain the current count value of the first counter 21 .

[0064] The second counter 22 is used to sample the reference clock signal at the third type of sampling node when the current count value of the first counter 21 is in the first interval, and control the clock generation logic 23 to output the divided clock signal corresponding to the third type of configuration instruction based on the sampling result; when the current count value of the first counter 21 is in the second interval, sample the reference clock signal at the fourth type of sampling node, and control the clock generation logic 23 to output the divided clock signal corresponding to the fourth type of configuration instruction based on the sampling result.

[0065] The clock signal of the second type of counting cycle combined together is the divided clock signal corresponding to the second type of frequency division coefficient. The second type of counting cycle is ten times the second type of frequency division coefficient, the third type of counting cycle is the adjacent integer less than the second type of frequency division coefficient, and the fourth type of counting cycle is the adjacent integer greater than the second type of frequency division coefficient.

[0066] Optionally, the length of the first interval and the length of the second interval are calculated as follows:

[0067] X+Y=10;

[0068] X×T3+ Y×T4=T2;

[0069] L1 = X × T3;

[0070] L2= Y×T4;

[0071] Among them, T2 represents the second type of counting cycle, T3 represents the third type of counting cycle, T4 represents the fourth type of counting cycle, L1 represents the length of the first interval, and L2 represents the length of the second interval.

[0072] Taking the second type of frequency division coefficient as 2.3 as an example, the second type of counting period T2 = 23, the third type of counting period T3 = 2, and the fourth type of counting period T4 = 3. Therefore, it can be determined that X = 7, Y = 3, L1 = 14, and L2 = 9.

[0073] It can be understood that the 23 original reference clock cycles are divided into 10 output clock cycles, of which the number of cycles for the 2-division is X=7, and the number of cycles for the 3-division is Y=3. That is, the 2-division accounts for 14 original reference clock cycles, and the 3-division accounts for 9 original reference clock cycles. When the second-category frequency division coefficient is 2.3, the third-category frequency division coefficient corresponding to the third-category configuration instruction is 2, and the fourth-category frequency division coefficient corresponding to the fourth-category configuration instruction is 3. When the second-category frequency division coefficient is 4.7, the third-category frequency division coefficient corresponding to the third-category configuration instruction (equal to the third-category counting cycle) is 7, and the fourth-category frequency division coefficient corresponding to the fourth-category configuration instruction (equal to the fourth-category counting cycle) is 5.

[0074] Optionally, when the third type of frequency division coefficient corresponding to the third type of configuration instruction is an even number M, the third type of sampling nodes are the M / 2th counting period and the Mth counting period.

[0075] The second counter 22 is used to transmit the first type of control signal to the clock generation logic 23 when sampling the rising edge of the reference clock signal in the first counting period of the first third type counting cycle, so that the clock generation logic 23 outputs a high level signal.

[0076] The second counter 22 is used to transmit the second type of control signal to the clock generation logic 23 when sampling the rising edge of the reference clock signal in the M / 2th counting period of the first third type counting cycle, so that the clock generation logic 23 outputs a low level signal.

[0077] The second counter 22 is used to transmit the first type of control signal to the clock generation logic 23 when sampling the rising edge of the reference clock signal in the Mth counting period of the (i-1)th third type counting cycle, so that the clock generation logic 23 outputs a high level signal, 2≤i.

[0078] The second counter 22 is used to transmit the second type control signal to the clock generation logic 23 when sampling the rising edge of the reference clock signal in the M / 2th counting period of the i-th third type counting cycle, so that the clock generation logic 23 outputs a low level signal.

[0079] When the third type of frequency division coefficient corresponding to the third type of configuration instruction is an odd number K, the third type of sampling nodes are the (K+1) / 2th counting period and the Kth counting period.

[0080] The second counter 22 is used to transmit the first type of control signal to the clock generation logic 23 when sampling the rising edge of the reference clock signal in the first counting period of the first third type counting cycle, so that the clock generation logic 23 outputs a high level signal.

[0081] The second counter 22 is used to transmit the second type of control signal to the clock generation logic 23 when sampling the rising edge of the reference clock signal in the (K+1) / 2th counting period of the first third type counting cycle, so that the clock generation logic 23 outputs a low level signal.

[0082] The second counter 22 is used to transmit the first type of control signal to the clock generation logic 23 when sampling the rising edge of the reference clock signal in the Kth counting period of the (i-1)th third type counting cycle, so that the clock generation logic 23 outputs a high level signal.

[0083] The second counter 22 is used to transmit the second type control signal to the clock generation logic 23 when sampling the falling edge of the reference clock signal in the (K+1) / 2th counting period of the i-th third type counting cycle, so that the clock generation logic 23 outputs a low level signal.

[0084] Optionally, when the fourth type of frequency division coefficient corresponding to the fourth type of configuration instruction is an even number M, the fourth type of sampling nodes are the M / 2th counting period and the Mth counting period.

[0085] The second counter 22 is used to transmit the second type of control signal to the clock generation logic 23 when sampling the rising edge of the reference clock signal in the M / 2th counting period of the first fourth type counting cycle, so that the clock generation logic 23 outputs a low level signal.

[0086] The second counter 22 is used to transmit the first type of control signal to the clock generation logic 23 when sampling the rising edge of the reference clock signal in the Mth counting period of the (i-1)th fourth type counting cycle, so that the clock generation logic 23 outputs a high level signal, 2≤i.

[0087] The second counter 22 is used to transmit the second type of control signal to the clock generation logic 23 when sampling the rising edge of the reference clock signal in the M / 2th counting period of the i-th fourth type counting cycle, so that the clock generation logic 23 outputs a low level signal.

[0088] When the fourth type of frequency division coefficient corresponding to the fourth type of configuration instruction is an odd number K, the fourth type of sampling nodes are the (K+1) / 2th counting period and the Kth counting period.

[0089] The second counter 22 is used to transmit the second type of control signal to the clock generation logic 23 when sampling the rising edge of the reference clock signal in the (K+1) / 2th counting period of the first fourth type counting cycle, so that the clock generation logic 23 outputs a low level signal.

[0090] The second counter 22 is used to transmit the first type of control signal to the clock generation logic 23 when sampling the rising edge of the reference clock signal in the Kth counting period of the (i-1)th fourth type counting cycle, so that the clock generation logic 23 outputs a high level signal.

[0091] The second counter 22 is used to transmit the second type control signal to the clock generation logic 23 when sampling the falling edge of the reference clock signal in the (K+1) / 2th counting period of the i-th fourth type counting cycle, so that the clock generation logic 23 outputs a low level signal.

[0092] Please refer to Figure 5 , Figure 5 A timing diagram of 2.3 frequency division provided in an embodiment of the present invention. Figure 5 Where clk_in represents the reference clock signal, counter0 represents the count value of the first counter, counter1 represents the count value of the second counter, and clk_div2p3 represents the divided clock signal with a division coefficient of 2.3.

[0093] In an optional implementation, the third type of counting period is an adjacent integer greater than the second type of frequency division coefficient, and the fourth type of counting period is an adjacent integer less than the second type of frequency division coefficient. The specific implementation method is the same as above and will not be repeated here.

[0094] Please refer to Figure 6 , Figure 6 The third structural diagram of the clock frequency division circuit provided by the embodiment of the present invention. The clock generation module 20 also includes a channel unit 24 and an OR gate 25, the state control module 10 is connected to the enable end of the channel unit 24, the input end of the channel unit 24 is used to access the reference clock signal, the output end of the channel unit 24 is connected to the first input end of the OR gate 25, the output end of the clock generation logic 23 is connected to the second input end of the OR gate 25, and the output end of the OR gate 25 is used as the output end of the clock frequency division circuit.

[0095] When the frequency division coefficient is 1, the state control module 10 sends an enable signal to the channel unit 24, and stops sending the enable signal to the clock generation logic 23, the first counter 21 and the second counter 22, and the clock generation logic 23 keeps outputting a low level signal. The channel unit 24 remains turned on, and can directly pass the reference clock signal to the OR gate 25, that is, directly pass the reference clock signal to the output end of the clock frequency division circuit, so that it outputs a frequency division clock signal with a frequency division coefficient of 1.

[0096] When it is necessary to stop outputting the divided clock signal with the frequency division factor of 1, the enabling signal is stopped from being sent to the channel unit 24, and the channel unit 24 is turned off.

[0097] Please refer to Figure 7 , Figure 7A timing diagram of a 1-frequency division provided in an embodiment of the present invention. Figure 7 clk_in represents the reference clock signal, cfg_eb represents the enable signal corresponding to the channel unit, and clk_div1 represents the divided clock signal with a division coefficient of 1.

[0098] exist Figure 6 On the basis of this, regarding how to implement the frequency division of the fifth type of frequency division coefficient, where the fifth type of frequency division coefficient is a decimal greater than 1 and less than 2, the embodiment of the present invention also provides an optional implementation method, please refer to the following.

[0099] When executing the frequency division tasks corresponding to the five types of frequency division coefficients, the state control module 10 is used to send an enable signal to the first counter 21 , the second counter 22 and the clock generation logic 23 .

[0100] The state control module 10 is used to generate the fifth type of configuration instructions and the sixth type of configuration instructions, send the fifth type of configuration instructions to the first counter 21 , and send the sixth type of configuration instructions to the second counter 22 .

[0101] Among them, the fifth type of configuration instructions include the fifth type of counting cycle (that is, ten times the fifth type of frequency division coefficient), the sixth type of configuration instructions include the sixth type of counting cycle and the sixth type of sampling nodes, the sixth type of counting cycle is 2, and the sixth type of sampling nodes are the first counting period (count value is 0) and the second counting period (count value is 1).

[0102] In an optional implementation, the sixth type of configuration instruction also includes the length of the frequency division interval of 1 and the length of the frequency division interval of 2. The second counter 22 can obtain the current count value of the first counter 21, and then determine the interval in which it is located.

[0103] When the current count value of the first counter 21 is within the interval of the length of the 1-division interval, the second counter 22 suspends counting and sampling, and controls the clock generation logic 23 to continuously output a low level.

[0104] The state control module 10 is used to obtain the count value of the first counter 21, and when the current count value of the first counter 21 is in the 1-division interval, an enable signal is sent to the channel unit 24, and the channel unit 24 remains turned on.

[0105] When the current count value of the first counter 21 is within the length of the 2-frequency division interval, the state control module 10 stops sending the enable signal to the channel unit 24, and the channel unit 24 switches off. The second counter 22 is used to transmit the second type of control signal to the clock generation logic 23 when the rising edge of the reference clock signal is sampled in the first counting period, so that the clock generation logic 23 outputs a low-level signal, and transmit the first type of control signal to the clock generation logic 23 when the rising edge of the reference clock signal is sampled in the second counting period, so that the clock generation logic 23 outputs a high-level signal.

[0106] Optionally, the length of the 1-frequency division interval and the length of the 2-frequency division interval are calculated as follows:

[0107] X+Y=10;

[0108] X+ Y×2=T5;

[0109] L3 = X;

[0110] L4= Y×2;

[0111] Among them, T5 represents the fifth type of counting cycle (that is, ten times the fifth type of frequency division coefficient), L3 represents the length of the 1-frequency division interval, and L4 represents the length of the 2-frequency division interval.

[0112] Please refer to Figure 8 , Figure 8 This is a timing diagram of 1.1 frequency division provided by an embodiment of the present invention. Figure 8 clk_in represents the reference clock signal, counter0 represents the count value of the first counter, counter1 represents the count value of the second counter, and clk_div1p1 represents the divided clock signal with a division coefficient of 1.1.

[0113] In an optional embodiment, when the frequency division coefficient is not 1, if the state control module 10 receives an instruction to turn off the frequency division or an instruction to modify the frequency division coefficient, in order to ensure the integrity of the frequency division signal, it is necessary to execute the instruction to turn off the frequency division or the instruction to modify the frequency division coefficient after the frequency division signal is completely output. For details, please refer to the following.

[0114] The state control module 10 is also used to determine whether the current frequency division task is completed based on the current count value of the first counter 21 when receiving the frequency division off instruction or the frequency division coefficient modification instruction. If the frequency division task is completed, the frequency division off instruction or the frequency division coefficient modification instruction is executed.

[0115] Optionally, when executing the frequency division task corresponding to the first type of frequency division coefficient, if a frequency division closing instruction or a frequency division coefficient modification instruction is received, it is determined whether the current count value of the first counter 21 is the last count value in the first type of counting cycle. If so, it is determined that the frequency division task is completed.

[0116] Optionally, when executing the frequency division task corresponding to the second type of frequency division coefficient, if a frequency division closing instruction or a frequency division coefficient modification instruction is received, it is determined whether the current count value of the first counter 21 is the last count value in the second type of counting cycle. If so, it is determined that the frequency division task is completed.

[0117] Optionally, when executing the frequency division task corresponding to the fifth type of frequency division coefficient, if a frequency division closing instruction or a frequency division coefficient modification instruction is received, it is determined whether the current count value of the first counter 21 is the last count value in the fifth type of counting cycle. If so, it is determined that the frequency division task is completed.

[0118] It should be noted that the module device will not work if it does not receive an enable signal.

[0119] An embodiment of the present invention further provides a system on chip, which includes the above-mentioned clock frequency division circuit.

[0120] The embodiment of the present invention further provides an electronic device, including the above-mentioned system on chip. The electronic device can be, but is not limited to, a mobile phone, a computer, a server, and the like.

[0121] In summary, an embodiment of the present invention provides a clock frequency division circuit, a system on chip and an electronic device, wherein the clock frequency division circuit includes: a state control module and a clock generation module, the clock generation module includes a clock generation logic and a first counter; the state control module is respectively connected to the enable end of the clock generation logic and the enable end of the first counter, the input end of the first counter is used to access the reference clock signal, and the output end of the first counter is connected to the input end of the clock generation logic; the state control module is used to send an enable signal to the clock generation logic and the first counter when executing the frequency division task of the first type of frequency division coefficient; wherein the first type of frequency division coefficient is an integer greater than 1; the state control module is used to generate a first type of configuration instruction according to the first type of frequency division coefficient, and send the first type of configuration instruction to the first counter; wherein the first type of configuration instruction includes a first type of counting cycle and a first type of sampling node, the first type of sampling node represents the counting period for sampling the reference clock signal in the first type of counting cycle; the first counter is used to sample the reference clock signal at the first type of sampling node, and control the clock generation logic to output the divided clock signal corresponding to the first type of frequency division coefficient based on the sampling result. By adjusting the frequency division coefficient, the clock generation logic is controlled to output a frequency division clock signal corresponding to any frequency division coefficient.

[0122] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

[0123] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.

Claims

1. A clock frequency division circuit, characterized in that: The clock frequency division circuit comprises: a state control module and a clock generation module, wherein the clock generation module comprises a clock generation logic and a first counter; The state control module is connected to the enable end of the clock generation logic and the enable end of the first counter respectively, the input end of the first counter is used to access the reference clock signal, and the output end of the first counter is connected to the input end of the clock generation logic; The state control module is used to send an enable signal to the clock generation logic and the first counter when performing a frequency division task of the first type of frequency division coefficient; Wherein, the first type of frequency division coefficient is an integer greater than 1; The state control module is used to generate a first type of configuration instruction according to the first type of frequency division coefficient, and send the first type of configuration instruction to the first counter; The first type of configuration instructions includes a first type of counting cycle and a first type of sampling node, the first type of sampling node represents a counting period for sampling the reference clock signal in the first type of counting cycle, when the first type of frequency division coefficient is an even number M, the first type of sampling nodes are the M / 2th counting period and the Mth counting period, when the first type of frequency division coefficient is an odd number K, the first type of sampling nodes are the (K+1) / 2th counting period and the Kth counting period, and the first type of counting cycle is equal to the first type of frequency division coefficient; The first counter is used to sample the reference clock signal at the first type of sampling node, and control the clock generation logic to output the divided clock signal corresponding to the first type of frequency division coefficient based on the sampling result.

2. The clock frequency division circuit according to claim 1, characterized in that: The first counter is used to transmit a first-type control signal to the clock generation logic when sampling a rising edge of the reference clock signal in the Mth counting period of the (i-1)th first-type counting cycle, so that the clock generation logic outputs a high-level signal; The first counter is used to transmit a second type of control signal to the clock generation logic when sampling the rising edge of the reference clock signal in the M / 2th counting period of the i-th first type counting cycle, so that the clock generation logic outputs a low level signal.

3. The clock frequency division circuit according to claim 1, characterized in that: The first counter is used to transmit a first-type control signal to the clock generation logic when sampling a rising edge of the reference clock signal in the Kth counting period of the (i-1)th first-type counting cycle, so that the clock generation logic outputs a high-level signal; The first counter is used to transmit a second type of control signal to the clock generation logic when sampling the falling edge of the reference clock signal in the (K+1) / 2th counting period of the i-th first type counting cycle, so that the clock generation logic outputs a low level signal.

4. The clock frequency division circuit according to claim 1, characterized in that: The clock generation module further includes a second counter, the state control module is connected to an enable terminal of the second counter, an input terminal of the second counter is used to access a reference clock signal, an output terminal of the second counter is connected to an input terminal of the clock generation logic, and the second counter is also connected to the first counter; The state control module is used to send an enable signal to the clock generation logic, the first counter and the second counter when performing the frequency division task of the second type of frequency division coefficient; Among them, the second type of frequency division coefficient is a decimal greater than 2; The state control module is used to generate a second type of configuration instruction, a third type of configuration instruction and a fourth type of configuration instruction according to the second type of frequency division coefficient, and send the second type of configuration instruction to the first counter, and send the third type of configuration instruction and the fourth type of configuration instruction to the second counter; The second type of configuration instruction includes a second type of counting cycle, the third type of configuration instruction includes a third type of counting cycle and a third type of sampling node, the third type of sampling node indicates a counting period for sampling the reference clock signal in the third type of counting cycle, and the fourth type of configuration instruction includes a fourth type of counting cycle and a fourth type of sampling node, the fourth type of sampling node indicates a counting period for sampling the reference clock signal in the fourth type of counting cycle; The second counter is used to sample the reference clock signal at the third type of sampling node when the current count value of the first counter is in the first interval, and control the clock generation logic to output the divided clock signal corresponding to the third type of configuration instruction based on the sampling result; when the current count value of the first counter is in the second interval, sample the reference clock signal at the fourth type of sampling node, and control the clock generation logic to output the divided clock signal corresponding to the fourth type of configuration instruction based on the sampling result.

5. The clock frequency division circuit according to claim 4, characterized in that: The length of the first interval and the length of the second interval are calculated as follows: X+Y=10; X×T3+ Y×T4=T2; L1 = X × T3; L2 = Y × T4; Among them, T2 represents the second type of counting cycle, T3 represents the third type of counting cycle, T4 represents the fourth type of counting cycle, L1 represents the length of the first interval, and L2 represents the length of the second interval.

6. The clock frequency division circuit according to claim 4, characterized in that: When the third type of frequency division coefficient corresponding to the third type of configuration instruction is an even number M, the third type of sampling nodes are the M / 2th counting period and the Mth counting period; The second counter is used to transmit the first type of control signal to the clock generation logic when sampling the rising edge of the reference clock signal in the Mth counting period of the (i-1)th third type counting cycle, so that the clock generation logic outputs a high level signal; The second counter is used to transmit a second type of control signal to the clock generation logic when sampling the rising edge of the reference clock signal in the M / 2th counting period of the i-th third type counting cycle, so that the clock generation logic outputs a low level signal.

7. The clock frequency division circuit according to claim 4, characterized in that: When the third type of frequency division coefficient corresponding to the third type of configuration instruction is an odd number K, the third type of sampling nodes are the (K+1) / 2th counting period and the Kth counting period; The second counter is used to transmit the first type of control signal to the clock generation logic when sampling the rising edge of the reference clock signal in the Kth counting period of the (i-1)th third type counting cycle, so that the clock generation logic outputs a high level signal; The second counter is used to transmit a second type of control signal to the clock generation logic when sampling the falling edge of the reference clock signal in the (K+1) / 2th counting period of the i-th third type counting cycle, so that the clock generation logic outputs a low level signal.

8. The clock frequency dividing circuit according to any one of claims 1 to 7, characterized in that: The state control module is further configured to determine whether the first counter has completed the current frequency division task when receiving a frequency division shutdown instruction or a frequency division coefficient modification instruction, and if so, execute the frequency division shutdown instruction or the frequency division coefficient modification instruction.

9. A system on chip, characterized in that: The system on chip comprises the clock frequency division circuit according to any one of claims 1 to 8.

10. An electronic device, characterized in that: include: The system on chip as claimed in claim 9.