Digital control oscillator, phase-locked loop, chip, device and adjustment method
By introducing digital control oscillator and voltage drop detection control circuit into the SOC chip, the power supply voltage is detected and the clock signal frequency is reduced, the timing violation caused by sudden drop in the power supply is solved, and frequency overshoot is prevented when the power supply is restored, ensuring that the chip is guaranteed. Stable function.
Patent Information
- Application Number
- CN202411090993.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2024-12-03
AI Technical Summary
In SOC chips, dynamic load changes lead to sudden drop in power supply voltage, which may cause timing violations, which in turn lead to abnormal chip function.
Design a digital controlled oscillator, including an oscillation circuit and a voltage drop detection control circuit, by detecting whether the power supply voltage is lower than the reference voltage, and if it is lower, the frequency of the clock signal will be reduced to avoid timing violations, and when the power supply voltage is restored, Adjust the frequency division ratio of the frequency divider according to the frequency change of the clock signal to prevent frequency overshoot.
It effectively avoids timing violations caused by sudden drop in the power supply voltage, and prevents frequency overshoot when the power supply voltage is restored to ensure stable chip function.
Smart Images

Figure CN119070811A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of electronic circuits, and specifically relates to a digitally controlled oscillator, a phase-locked loop, a SOC chip, an electronic device, and a method for adjusting a chip clock signal. Background Art
[0002] In SOC (System on Chip) chips, dynamic load adjustment often occurs. Load changes can cause sudden changes in the power supply voltage. For example, a sudden increase in load can cause a sudden drop in voltage. When this sudden drop in voltage occurs, if the chip operating frequency is not reduced, timing violations may occur, causing abnormal chip functions. Figure 1 As shown, Vdd is the real-time voltage of the chip during operation, and Vmin is the minimum voltage of the chip at a certain frequency. Below this voltage, the timing of the chip digital circuit may be violated, which may cause abnormal operation of the chip. Figure 1 At time t1, the chip load signal suddenly increases, causing the chip voltage to suddenly drop below Vmin. If the chip frequency remains unchanged at this time, the chip will work abnormally until the chip voltage recovers to above Vmin at time t2. Summary of the invention
[0003] In view of this, the purpose of the present application is to provide a digital controlled oscillator, a phase-locked loop, a SOC chip, an electronic device and a method for adjusting a chip clock signal to improve the timing violation problem caused by a sudden drop in the power supply voltage of the circuit.
[0004] The embodiment of the present application is implemented as follows:
[0005] In a first aspect, an embodiment of the present application provides a digitally controlled oscillator, comprising: an oscillation circuit and a voltage drop detection control circuit; the oscillation circuit is configured to convert a digital signal input to itself into an analog signal and generate a clock signal whose frequency is positively correlated with the analog signal; a voltage drop detection control circuit is connected to the oscillation circuit, and the voltage drop detection control circuit is configured to control the oscillation circuit to reduce the frequency of the clock signal when it detects that the power supply voltage input to itself is less than a reference voltage.
[0006] In the above embodiment, a voltage drop detection control circuit connected to the oscillation circuit is added to the digital controlled oscillator so that when it is detected that the input power voltage is lower than the reference voltage, the oscillation circuit is controlled to reduce the frequency of the clock signal, thereby improving the timing violation problem caused by the sudden drop of the power supply voltage of the circuit, such as when it is lower than the reference voltage.
[0007] In combination with a possible implementation manner of the first aspect, the voltage drop detection control circuit includes: a voltage drop detection circuit and a control circuit; the voltage drop detection circuit is configured to compare the power supply voltage with the reference voltage to obtain a comparison result, and output a digital control signal according to the comparison result; a control circuit is connected to the voltage drop detection circuit and the oscillation circuit, and the control circuit is configured to adjust the frequency of the clock signal in response to the digital control signal, wherein the frequency of the clock signal is reduced when the power supply voltage is less than the reference voltage.
[0008] In the above embodiment, the voltage drop detection circuit is used to output a digital control signal according to the comparison result, and the control circuit is used to adjust the frequency of the clock signal in response to the digital control signal. While achieving the expected purpose, the difficulty of circuit design can be reduced.
[0009] In combination with a possible implementation manner of the embodiment of the first aspect, the digital control signal includes an M-bit binary signal, where M is an integer greater than or equal to 1; the control circuit includes: M switch circuits in parallel, each switch circuit is connected to the voltage drop detection circuit and the oscillation circuit; each switch circuit has a closed or open state, and is controlled by a binary signal in the M-bit binary signal; wherein the frequency of the clock signal is related to the number of the switch circuits in the on state, and when the switch circuit is closed, the input signal of the oscillator in the oscillation circuit is reduced, thereby reducing the frequency of the clock signal output by the oscillation circuit.
[0010] In the above embodiment, M parallel switch circuits are used to change the state of the switch circuits (closed or open) to adjust the input signal of the oscillator in the input oscillation circuit, thereby controlling the frequency of the clock signal output by the oscillation circuit. While achieving its purpose, it is possible to reduce the circuit cost and make the frequency change of the clock signal quantifiable during the period when the power supply voltage is less than the reference voltage.
[0011] In combination with a possible implementation manner of the first aspect embodiment, the oscillation circuit includes: a reference power supply, a digital-to-analog converter, and an oscillator; the reference power supply is configured to generate a reference current; a digital-to-analog converter connected to the reference power supply, the digital-to-analog converter is configured to convert its own input digital signal into an analog current based on the reference current; an oscillator is connected to the output end of the digital-to-analog converter, the oscillator is configured to output the clock signal whose frequency is positively correlated with the analog current, wherein when the power supply voltage is less than the reference voltage, the voltage drop detection control circuit reduces the analog current.
[0012] In the above embodiment, by setting a reference power supply, the converted analog current is correlated with the reference current and the input digital signal, so as to facilitate the control of the frequency of the clock signal output by the oscillation circuit.
[0013] In the second aspect, the embodiments of the present application further provide a phase-locked loop, comprising: a digitally controlled oscillator, a time-to-digital converter, a digital filter and a frequency divider as provided in the above-mentioned first aspect embodiment and / or any possible implementation method in combination with the first aspect embodiment; the time-to-digital converter is configured to receive an input clock and a reference clock, and detect a phase difference between the input clock and the reference clock; a digital filter is connected to the digitally controlled oscillator and the time-to-digital converter, and the digital filter is configured to filter the digital signal output by the time-to-digital converter, and output the filtered digital signal to the digitally controlled oscillator; a frequency divider is connected to the digitally controlled oscillator and the time-to-digital converter, and the frequency divider is configured to divide the clock signal output by the digitally controlled oscillator to generate the reference clock.
[0014] In the above embodiment, a voltage drop detection control circuit is introduced into the digitally controlled oscillator so that when it is detected that the power supply voltage of the input itself is less than the reference voltage, the oscillation circuit is controlled to reduce the frequency of the clock signal, thereby improving the timing violation problem caused by the sudden drop of the power supply voltage of the circuit, such as when it is lower than the reference voltage. In addition, by setting a time-to-digital converter, a digital filter and a frequency divider, the output frequency of the phase-locked loop can be locked at the frequency of fbclk*H, where H is the frequency division ratio of the frequency divider, so as to improve the stability of the clock signal.
[0015] In combination with a possible implementation manner of the second aspect, the frequency divider and the digitally controlled oscillator are also used to connect to a clock controller; the digitally controlled oscillator is also configured to send a target parameter to the clock controller, wherein the target parameter is related to the frequency change of the clock signal during the period when the power supply voltage is less than the reference voltage; the frequency divider is also configured to adjust its own frequency division ratio in response to the control of the clock controller; wherein the clock controller adjusts the frequency division ratio of the frequency divider according to the target parameter, the frequency of the input clock and the frequency change of the unit parameter, so as to prevent the frequency of the clock signal from being greater than the target frequency when the power supply voltage is greater than or equal to the reference voltage.
[0016] In the above embodiment, the clock controller is used to adjust the division ratio of the divider according to the target parameter, the frequency of the input clock and the frequency change of the unit parameter to prevent the frequency of the clock signal from being greater than the target frequency (such as Fref*H, Fref is the frequency of the input clock, and H is the division ratio of the divider when the phase-locked loop is locked) when the power supply voltage is greater than or equal to the reference voltage, thereby preventing timing problems from occurring.
[0017] In combination with a possible implementation manner of the second aspect, the phase-locked loop also includes: a switching circuit, comprising a control end, an output end and two input ends; the digital filter is connected to the digital controlled oscillator through one of the input ends of the switching circuit, and the other input end of the switching circuit is used to connect a third-party device to measure the frequency change of the unit parameter through the third-party device.
[0018] In the above embodiment, by adding a switching circuit, the frequency change of the unit parameter can be measured by a third-party device (including but not limited to a frequency lock controller), which provides a guarantee for adjusting the division ratio of the divider when the power supply voltage is restored, so as to prevent the frequency of the clock signal from being greater than the target frequency when the power supply voltage is greater than or equal to the reference voltage.
[0019] In the third aspect, an embodiment of the present application also provides a SOC chip, comprising: a phase-locked loop as provided in the above-mentioned second aspect embodiment and / or any possible implementation method in combination with the second aspect embodiment, and a clock controller; the clock controller is respectively connected to the divider and the digital controlled oscillator in the phase-locked loop, and the clock controller is configured to receive the target parameters sent by the digital controlled oscillator, and adjust the division ratio of the divider according to the target parameters, the frequency of the input clock and the frequency change of the unit parameter, so as to prevent the frequency of the clock signal from being greater than the target frequency when the power supply voltage is greater than or equal to the reference voltage, wherein the target parameter is related to the frequency change of the clock signal during the period when the power supply voltage is less than the reference voltage.
[0020] In combination with a possible implementation manner of the third aspect embodiment, the phase-locked loop includes a switching circuit located between the digital filter and the digitally controlled oscillator; the SOC chip also includes: a frequency locking controller, which is respectively connected to the control end, another input end, and the digitally controlled oscillator of the switching circuit; the frequency locking controller is configured to control the other input end of the switching circuit to be connected to its output end, sequentially increase the number of specified values in the digital signal input to the digitally controlled oscillator, and determine the first cycle number of the clock signal output by the digitally controlled oscillator within the cycle of the input clock; when the first cycle number reaches the specified value, continue to increase the number of specified values in the digital signal; determine the second cycle number of the clock signal output by the digitally controlled oscillator within the cycle of the input clock, and determine the frequency change of the unit parameter according to the first cycle number, the second cycle number, the frequency of the input clock and the increase in the specified value in the digital signal.
[0021] In the above embodiment, the frequency variation of the unit parameter can be accurately measured by the above method, such as the frequency variation of the unit parameter = (second cycle number - first cycle number) * frequency of the input clock / increase in the specified value in the digital signal.
[0022] In a fourth aspect, an embodiment of the present application further provides an electronic device, comprising: a SOC chip provided in the above-mentioned second aspect embodiment or in combination with a possible implementation of the second aspect embodiment.
[0023] In the fifth aspect, an embodiment of the present application also provides a method for adjusting a chip clock signal, comprising: reducing the frequency of the clock signal when it is detected that the power supply voltage of the chip is less than a reference voltage; obtaining the frequency change of the clock signal when the power supply voltage is less than the reference voltage, and when the power supply voltage is restored, reducing the frequency of the clock signal according to the frequency change of the clock signal and the frequency of the input clock, so as to prevent the frequency of the clock signal from being greater than the target frequency when the power supply voltage is restored.
[0024] In the above embodiment, when it is detected that the power supply voltage of the chip is lower than the reference voltage, the frequency of the clock signal is reduced to avoid chip timing violations. At the same time, the frequency change of the clock signal when the power supply voltage is lower than the reference voltage is obtained, and when the power supply voltage is restored, the frequency of the clock signal is reduced according to the frequency change of the clock signal and the frequency of the input clock to avoid frequency overshoot when the power supply voltage is restored, that is, the frequency of the clock signal is greater than the target frequency, which causes chip timing violations and leads to abnormal chip operation.
[0025] Other features and advantages of the present application will be described in the following description. The purpose and other advantages of the present application can be realized and obtained through the structures specifically pointed out in the written description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. The above and other purposes, features and advantages of the present application will be more clear as shown in the drawings.
[0027] Figure 1 A waveform diagram showing the variation of power supply voltage with load current is shown.
[0028] Figure 2 A schematic structural diagram of a digitally controlled oscillator provided in an embodiment of the present application is shown.
[0029] Figure 3 A circuit diagram of an oscillation circuit provided in an embodiment of the present application is shown.
[0030] Figure 4 A circuit diagram of a digital-to-analog converter provided in an embodiment of the present application is shown.
[0031] Figure 5 A schematic structural diagram of another digital controlled oscillator provided in an embodiment of the present application is shown.
[0032] Figure 6 A circuit diagram of a voltage drop detection circuit provided in an embodiment of the present application is shown.
[0033] Figure 7 A circuit diagram of a control circuit provided in an embodiment of the present application is shown.
[0034] Figure 8 A circuit diagram of a digitally controlled oscillator provided in an embodiment of the present application is shown.
[0035] Fig. 9 A circuit diagram of another digital controlled oscillator provided in an embodiment of the present application is shown.
[0036] Fig.10 A schematic structural diagram of a phase-locked loop and a clock controller provided in an embodiment of the present application is shown.
[0037] Fig.11a A waveform diagram showing a clock frequency that varies with power supply voltage and does not consider frequency overshoot when voltage is restored, provided in an embodiment of the present application.
[0038] Fig.11b A waveform diagram showing a clock frequency that varies with power supply voltage and avoids frequency overshoot when voltage is restored, provided in an embodiment of the present application.
[0039] Fig.11c A waveform diagram showing another clock frequency that varies with the power supply voltage and avoids frequency overshoot when the voltage is restored, provided in an embodiment of the present application.
[0040] Fig.12 A structural schematic diagram showing a phase-locked loop provided in an embodiment of the present application connected to a clock controller and a frequency lock controller respectively.
[0041] Fig.13 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0042] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The following embodiments can be used as examples to more clearly illustrate the technical solutions of the present application, and cannot be used to limit the scope of protection of the present application. It will be appreciated by those skilled in the art that, in the absence of conflict, the features in the following embodiments and embodiments can be combined with each other.
[0043] It should be noted that similar numbers and letters represent similar items in the following figures, so once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. At the same time, in the description of this application, relational terms such as "first", "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 "comprise", "include" 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.
[0044] Furthermore, the term "and / or" in this application is merely a term used to describe the association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist at the same time, and B exists alone.
[0045] In the description of the embodiments of the present application, unless otherwise clearly specified or limited, the technical term "connection" may refer to a direct connection or an indirect connection through an intermediate medium.
[0046] In order to improve the timing violation problem caused by a sudden drop in the power supply voltage of a circuit, such as when it is lower than a reference voltage (also called a threshold voltage), the present application provides a digitally controlled oscillator, a phase-locked loop, a SOC chip, an electronic device and a method for adjusting the chip clock signal.
[0047] Combine the following Figure 2 The digital controlled oscillator provided in the embodiment of the present application is described. The digital controlled oscillator comprises an oscillation circuit and a voltage drop detection control circuit, wherein the voltage drop detection control circuit is connected to the oscillation circuit.
[0048] The oscillation circuit is configured to convert the digital signal (binary signal) inputted to itself into an analog signal, and generate a clock signal whose frequency is positively correlated with the analog signal. The voltage drop detection control circuit is configured to control the oscillation circuit to reduce the frequency of the clock signal when it detects that the power supply voltage inputted to itself is less than the reference voltage. The present application improves the existing digital controlled oscillator by adding a voltage drop detection control circuit connected to the oscillation circuit, so that when it detects that the power supply voltage inputted to itself is less than the reference voltage, the oscillation circuit is controlled to reduce the frequency of the clock signal, thereby improving the timing violation problem caused by the sudden drop of the power supply voltage of the circuit, such as when it is lower than the reference voltage.
[0049] The oscillator circuit includes a reference power supply, a digital analog converter (DAC), an oscillator (OSC), and a Figure 3 As shown. The reference power supply is configured to generate a reference current (such as represented by Iunit). The digital-to-analog converter is connected to the reference power supply, and the digital-to-analog converter is configured to convert the digital signal input to itself (such as represented by Idac_ctl, which is a binary signal) into an analog current (such as represented by Idco) based on the reference current, wherein Idco is related to the Idac_ctl digital signal. The oscillator is connected to the output end of the digital-to-analog converter, and the oscillator is configured to output a clock signal whose frequency is positively correlated with the analog current Idco. Among them, the clock signal output by the oscillator, that is, the clock signal output by the oscillation circuit, is also the clock signal output by the digital control oscillator, which is positively correlated with Idco. The larger the Idco, the greater the frequency of the clock signal output by the oscillator. Among them, when the power supply voltage is less than the reference voltage, the voltage drop detection control circuit reduces the analog current, thereby reducing the frequency of the clock signal output by the oscillation circuit.
[0050] In one implementation, the structure of the digital-to-analog converter is as follows: Figure 4 As shown, it includes N switch units in parallel, and the Idac_ctl digital signal input to the oscillation circuit includes an N-bit binary signal, where N is an integer greater than or equal to 1. Each switch unit has a closed or open state, which is controlled by a binary signal in the N-bit binary signal. Each switch unit includes 3 PMOS (Postive Metal Oxide Semiconductor, P-type metal oxide semiconductor) tubes, an inverter and a pull-down resistor. Among them, the sel signal and the sel_x signal are inverted signals to each other. If the sel signal = 1, then the sel_x signal = 0, Figure 4The sel signal is the inverted signal of one binary signal in the N-bit binary signal. Similarly, Iout and Iout_x are also inverted signals. It can be understood that the inverter can also be located at the gate of the P2 tube. In this case, the sel signal is the inverted signal of one binary signal in the N-bit binary signal.
[0051] Among them, the gate of P0 is connected to the reference power supply, and the Iout terminal of P1 is connected to the input terminal of the oscillator. The sizes of P0, P1, and P2 are the same as those of the PMOS tube in the reference power supply, so that Iout or Iout_x is related to the reference current Iunit. The output current of the digital-to-analog converter is proportional to the number of 1s in the Idac_ctl digital signal.
[0052] In one possible implementation, the voltage drop detection control circuit can be specifically configured to compare the power supply voltage (such as represented by vdd) with a reference voltage (such as represented by vref) to obtain a comparison result; generate a digital control signal (such as represented by Istretch_ctl) according to the comparison result, and adjust the frequency of the clock signal according to the digital control signal, wherein the frequency of the clock signal is reduced when the power supply voltage is less than the reference voltage.
[0053] In one implementation, the voltage drop detection control circuit includes: a voltage drop detection circuit (Droop Monitor) and a control circuit, wherein the control circuit is connected to the voltage drop detection circuit and the oscillation circuit. Figure 5 As shown. The voltage drop detection circuit is configured to compare the power supply voltage with the reference voltage, obtain a comparison result, and output a digital control signal according to the comparison result. The control circuit is configured to adjust the frequency of the clock signal in response to the digital control signal, wherein the frequency of the clock signal is reduced when the power supply voltage is less than the reference voltage.
[0054] The digital control signal output by the voltage drop detection circuit is positively correlated with the comparison result, and the digital control signal includes an M-bit binary signal, where M is an integer greater than or equal to 1. For example, if the power supply voltage is smaller than the reference voltage, the value of the digital control signal is larger, and accordingly, the frequency of the clock signal decreases more. In one implementation, M and N may be equal.
[0055] Among them, the voltage drop detection circuit can adopt the voltage drop detection circuit used for detecting voltage drop in the related art; in a possible implementation, the voltage drop detection circuit can be implemented based on Flash ADC, and Flash ADC compares the power supply voltage (such as represented by vdd) and the reference voltage (such as represented by vref), and outputs a digital control signal (such as represented by Istretch_ctl), as shown in the schematic diagram Figure 6 shown.
[0056] In one possible implementation, the control circuit can adjust its own circuit state according to the digital control signal to affect the input signal of the oscillator in the oscillation circuit, thereby affecting the frequency of the clock signal output by the oscillator. In this implementation, the control circuit may include: M switch circuits in parallel, each of which is connected to the voltage drop detection circuit and the oscillation circuit, and each of which has a closed or open state and is controlled by a binary signal in the M-bit binary signal. Among them, the frequency of the clock signal is related to the number of switch circuits in the on state, and when the switch circuit is closed, the input signal of the oscillator in the oscillation circuit is reduced, thereby reducing the frequency of the clock signal output by the oscillation circuit. The more switch circuits in the on state, the more signal flow is drawn away, and the less signal flow enters the oscillator.
[0057] The above-mentioned switch circuit may include an NMOS (Negative Metal Oxide Semiconductor) tube, the gate of the NMOS tube is controlled by a binary signal in an M-bit binary signal, the drain of the NMOS tube is connected to the input end of the oscillator, and the source of the NMOS tube is grounded. When the binary signal is 1, the switch circuit is in a closed state, thereby removing part of the input signal originally input to the oscillator; when the binary signal is 0, the switch circuit is in an open state.
[0058] In some possible implementations, the structure of the control circuit is as follows: Figure 7 As shown. Each switch circuit includes two NMOS tubes, the N1 tube is connected to the reference power supply, and the sml signal at the gate end of the N0 tube is a binary signal of one bit in the M-bit binary signal. Among them, the size of the N1 tube is the same as the size of the NMOS tube in the reference power supply, so that the current flowing through the N1 tube and the N0 tube is related to Iunit.
[0059] In this embodiment, the circuit diagram of the digital controlled oscillator can be as follows: Figure 8 As shown. The voltage drop detection circuit compares the input power supply voltage with the reference voltage and outputs a set of control words Istretch_ctl. The greater the voltage drop, the more 1s in the Istretch_ctl digital signal, and the more current Ipd is drawn by the Istretch module, resulting in a smaller current flowing into the oscillator OSC, making the frequency of the clock signal output by the oscillator lower. When the power supply voltage is restored, that is, the power supply voltage is greater than or equal to the reference voltage, the Istretch_ctl digital signal is all 0, and the switch circuits in the Istretch module (i.e., the control circuit) are all in the off state, and the current flowing into the oscillator OSC is not drawn.
[0060] exist Figure 8In the illustrated embodiment, the number of 1s in the Istretch_ctl digital signal output by the voltage drop detection circuit represents the magnitude of the Ipd current, and Ipd=the number of 1s in the Istretch_ctl digital signal*Iunit, wherein the number of 1s in the Istretch_ctl digital signal is related to the frequency change of the clock signal during the period when the power supply voltage is less than the reference voltage, and can represent the frequency change of the clock signal during the period when the power supply voltage is less than the reference voltage. If Kdco is used to represent the frequency change of the oscillator caused by a change of one control word in the Idac_ctl or Istretch_ctl digital signal, that is, an increase or decrease of one in the number of 0s (or 1s) in the Idac_ctl or Istretch_ctl digital signal, since Kdco is related to Iunit, if Kdco is known, it can be calculated how much the oscillator frequency will be reduced due to the Ipd current drawn out, that is, the frequency change of the oscillator caused by the current drawn out by the Istretch module is: the number of 1s in the Istretch_ctl digital signal * Kdco, that is, the frequency change of the clock signal during the period when the power supply voltage is less than the reference voltage = the number of 1s in the Istretch_ctl digital signal * Kdco.
[0061] In one possible implementation, the control circuit can adjust the input signal Idac_ctl of the oscillation circuit according to the digital control signal Istretch_ctl to affect the input signal Idco of the oscillator in the oscillation circuit, thereby affecting the frequency of the clock signal output by the oscillator. For example, according to the digital control signal Istretch_ctl, the number of 1s in the digital signal Idac_ctl of the input signal of the oscillation circuit is reduced, and the number of reductions is related to the number of 1s in the digital signal Istretch_ctl, thereby reducing the frequency of the clock signal output by the oscillation circuit. In this implementation, the circuit diagram of the digitally controlled oscillator can be as follows Fig. 9 As shown, the control circuit outputs an Idac_ctl′ digital signal according to the Istretch_ctl digital signal and the Idac_ctl digital signal, wherein the number of 1s in the Idac_ctl′ digital signal is less than the number of 1s in the Idac_ctl digital signal.
[0062] exist Fig. 9In the illustrated embodiment, the control circuit may be specifically implemented in a variety of ways, as long as the above-mentioned function (i.e., adjusting the Idac_ctl digital signal according to the digital control signal Istretch_ctl, such as reducing the number of 1s in the Idac_ctl digital signal, and the reduced number is related to the number of 1s in the Istretch_ctl digital signal) can be implemented. For example, the control circuit may include a shift register, and the number of shifts is related to the number of 1s in the Istretch_ctl digital signal; or, the control circuit includes a subtractor or an adder, and the number of 1s in the Idac_ctl digital signal may be reduced by adding or subtracting the Istretch_ctl digital signal from the Idac_ctl digital signal; or, the control circuit includes a logic device (such as an AND gate or an OR gate), and the number of 1s in the Idac_ctl digital signal may be reduced by performing a phase AND or phase OR operation on the Istretch_ctl digital signal and the Idac_ctl digital signal; or, the control circuit includes a controller, and the above-mentioned function is implemented by a program inside the controller.
[0063] The embodiment of the present application also provides a phase-locked loop (PLL), including a time to digital converter (TDC), a digital filter, a frequency divider and the above-mentioned digital control oscillator (DCO), and its schematic diagram is as follows: Fig.10 shown.
[0064] The time-to-digital converter is configured to receive an input clock (such as represented by rfclk) and a reference clock (such as represented by fbclk), detect a phase difference between the input clock and the reference clock, and output a digital signal (such as represented by Phase_error), where Phase_error is a set of control words.
[0065] The digital filter is connected to the digital controlled oscillator and the time-to-digital converter. The digital filter is configured to filter the digital signal output by the time-to-digital converter and output the filtered digital signal (such as represented by Idc_ctrl) to the digital controlled oscillator.
[0066] The frequency divider is connected to the digital control oscillator and the time-to-digital converter, and is configured to divide the clock signal (such as ck_dco) output by the digital control oscillator to generate a reference clock fbclk. If the frequency divider ratio is H, the frequency of ck_dco = the frequency of fbclk*H.
[0067] In some possible implementations, the frequency divider and the digital controlled oscillator are also used to connect to the clock controller. The digital controlled oscillator is also configured to convert the target parameters (such as Fig.10 The target parameter is related to the frequency change of the clock signal during the period when the power supply voltage is less than the reference voltage. The frequency divider is also configured to adjust its own frequency division ratio in response to the control of the clock controller.
[0068] The clock controller adjusts the frequency division ratio of the frequency divider (such as expressed by fbdiv) according to the target parameter (Istretch_ctl digital signal), the frequency of the input clock rfclk and the frequency change of the unit parameter (such as expressed by Kdco) to prevent the frequency of the clock signal from being greater than the target frequency (Fref*H) when the voltage is greater than or equal to the reference voltage, that is, to prevent the frequency of the clock signal ck_dco output by the phase-locked loop from overshooting when the power supply voltage is restored, and being greater than the frequency of Fref*H. That is, it is necessary to subtract the frequency division ratio corresponding to the frequency change of the clock signal during the period when the power supply voltage is less than the reference voltage from the frequency division ratio of the frequency divider when the phase-locked loop is locked. If the frequency division ratio of the frequency divider when the phase-locked loop is locked before adjustment is fbdiv, and the adjusted frequency division ratio is fbdiv', then fbdiv'=fbdiv-the number of 1s in the Istretch_ctl digital signal*Kdco / Fref.
[0069] Wherein, Fref is the frequency of the input clock rfclk, and the frequency change of the unit parameter represents the frequency change of the oscillator caused by an increase (or decrease) of 1 in the number of 1s in the Istretch_ctl digital signal, which is equal to the frequency change of the oscillator caused by an increase (or decrease) of 1 in the number of 1s in the Idc_ctrl digital signal. Then, during the period when the power supply voltage is less than the reference voltage, the frequency change of the clock signal = the number of 1s in the Istretch_ctl digital signal * Kdco. Kdco can be pre-stored in the clock controller.
[0070] By adjusting the frequency divider ratio, the purpose is to prevent the frequency of the clock signal from being greater than the target frequency when the power supply voltage is greater than or equal to the reference voltage, that is, to prevent the frequency of the clock signal ck_dco output by the phase-locked loop from overshooting and exceeding the frequency of Fref*H when the power supply voltage is restored. Figure 11a-Figure 11b Provide explanation.
[0071] Fig.11aThe figure shows the change of PLL output frequency when the voltage drops below the threshold voltage Vmin. At t1, the voltage drop detection circuit detects that Vdd is lower than the threshold voltage for normal operation of the chip, and controls the Istretch module to quickly draw off a part of the current Ipd. The clock frequency of the oscillator output drops rapidly to avoid chip timing violations. From t1 to t2, the vdd voltage has been lower than the threshold voltage, and the Istretch module continues to draw off a part of the current Ipd. Because the oscillator frequency is reduced, the phase-locked loop loop detects that the fbclk frequency is lower than the rfclk frequency. The phase-locked loop loop will increase the Idco current, causing the oscillator frequency to increase. Therefore, from t1 to t2, the phase-locked loop output frequency has been increasing. At t2, the vdd voltage returns to above the threshold voltage, and the Istretch module no longer draws off a part of the current. In addition, the Idco current also increases from t1 to t2, resulting in the oscillator clock frequency at t2 being greater than the target frequency, resulting in frequency overshoot. In this case, the chip may violate the frequency and needs to be avoided.
[0072] Since the frequency change of the clock signal during the period when the power supply voltage is less than the reference voltage is: the number of 1s in the Istretch_ctl digital signal * Kdco, in order to prevent the frequency overshoot of the clock signal ck_dco output by the phase-locked loop when the power supply voltage is restored, it is necessary to subtract the division ratio corresponding to the frequency change of the clock signal during the period when the power supply voltage is less than the reference voltage from the division ratio of the divider when the phase-locked loop is locked. The clock controller will recalculate the division ratio fbdiv' = fbdiv-the number of 1s in the Istretch_ctl digital signal * Kdco / Fref. After the clock controller changes the division ratio of the divider to fbdiv', the frequency of the oscillator controlled by the phase-locked loop is Fbdiv'*Fref in the interval t1 to t2. When vdd recovers to above the threshold voltage at t2, the division ratio of the divider is restored to fbdiv. The clock frequency change of the phase-locked loop is as follows: Fig.11b As shown, there will be no frequency overshoot, which avoids abnormal chip function when the voltage returns to normal.
[0073] In one implementation, when a voltage drop occurs, a larger frequency reduction can be used. Based on the fbdiv' mentioned above, a portion of the frequency division ratio can be subtracted, that is, fbdiv' = fbdiv-the number of 1s in the Istretch_ctl digital signal * Kdco / Fref-Fbdiv_margin; wherein Fbdiv_margin is the subtracted frequency division ratio, and a register can be used to store Fbdiv_margin. When the voltage recovers, the frequency division ratio of the divider is restored to fbdiv. In this case, when a voltage drop occurs, the frequency response of the phase-locked loop is as follows: Fig.11c As shown, the frequency reduction ratio during t1 to t2 is Fig.11bBigger, safer chip work, among them, Fig.11c The blue dashed line in corresponds to the clock frequency in 11b.
[0074] In a possible implementation, the phase-locked loop also includes a switching circuit including a control terminal, an output terminal and two input terminals. The digital filter is connected to the digital control oscillator through one of the input terminals of the switching circuit, and the other input terminal of the switching circuit is used to connect a third-party device (including but not limited to a frequency lock controller) to measure the frequency change of the unit parameter through the third-party device.
[0075] In some embodiments, the switching circuit may include a double-pole switch (may also be replaced by two single-pole switches), and the connection between different input terminals and their output terminals is achieved by controlling the switching of the switch.
[0076] In some possible implementations, the switching circuit may include a selector, and the line switching is implemented by the selector. In this implementation, the structure of the phase-locked loop is as follows: Fig.12 The frequency-locked controller controls the selector to switch the line through the Open_loop_en signal. When Open_loop_en=1, the input terminal 1 of the selector is connected to its output terminal, and vice versa when Open_loop_en=0, the input terminal 0 of the selector is connected to its output terminal.
[0077] The frequency lock controller is connected to the control end, another input end, and the digital control oscillator of the switching circuit respectively. The frequency lock controller is configured to control the other input end of the switching circuit to be connected to its output end, increase (or decrease) the number of specified values (such as 1) in the digital signal input to the digital control oscillator in sequence, and determine the first cycle number (such as represented by H1) of the clock signal output by the digital control oscillator within the cycle of the input clock; when the first cycle number reaches the specified value (such as H), continue to increase (or decrease) the number of specified values (such as 1) in the digital signal; determine the second cycle number (such as represented by H2) of the clock signal output by the digital control oscillator within the cycle of the input clock, and determine the frequency change of the unit parameter according to the first cycle number, the second cycle number, the frequency of the input clock, and the increase (or decrease) of the specified value (such as 1) in the digital signal. Then the frequency change of the unit parameter = (H2-H1)*Fref / increase, if the increase is 1, then the frequency change of the unit parameter = (H2-H1)*Fref, Fref is the frequency of the input clock rfclk.
[0078] The following is an explanation of the process of using the frequency lock controller to measure the frequency change of a unit parameter. If the frequency divider ratio is H, then the output frequency of the DCO after the phase-locked loop is locked is Fref*H. When the phase-locked loop is just powered on, Fig.12Set Open_loop_en in 1, the PLL switches to the open loop state, that is, the DCO is not controlled by the PLL, and the frequency lock controller directly controls the control word (Idco_ctl) of the DCO to adjust the ck_dco clock frequency. At the beginning, the Idac_ctl control word output by the frequency lock controller can be set to 0, and the ck_dco frequency is the minimum (it is understandable that if Figure 4 The inverter in is located on the gate side of the P2 tube, that is, sel_x is the output signal of the inverter, then when the Idac_ctl control word is set to 0, the ck_dco frequency is the largest), the frequency lock controller determines how many ck_dco cycles are counted in one Fref cycle (it can also determine the average of how many ck_dco cycles are counted in multiple Fref cycles). If the counted number of cycles is less than H, it means that the frequency of ck_dco is less than the target value H. Continue to increase the number of 1s in the Idac_ctl control word until the counted number of cycles is greater than or equal to H. At this time, the DCO frequency reaches the target value H, and the number of cycles counted by the frequency lock controller is recorded as H1 (H1>=H). After that, continue to increase the number of 1s in the Idac_ctl control word, such as increasing by 1; determine the number of ck_dco cycles counted in one Fref cycle H2, then it can be determined that the frequency change caused by increasing the number of 1s in the Idac_ctl control word by one is: (H2-H1)*Fref. After completing the frequency variation measurement of the unit parameter, Fig.12 Open_loop_en in is set to 0, the loop switches to conventional PLL loop control, and ck_dco is controlled by TDC to achieve frequency and phase lock, that is, the frequency of ck_dco is equal to Fref*H, and rfclk and fbclk are phase-aligned.
[0079] The embodiment of the present application also provides a SOC chip, which includes the above-mentioned phase-locked loop and clock controller, and the clock controller is respectively connected to the frequency divider and the digital control oscillator in the phase-locked loop, and its schematic diagram is as shown above Fig.10 shown.
[0080] The clock controller is configured to receive target parameters sent by the digital controlled oscillator, and adjust the division ratio of the divider according to the target parameters, the frequency of the input clock and the frequency change of the unit parameter to prevent the frequency of the clock signal from being greater than the target frequency when the power supply voltage is greater than or equal to the reference voltage, wherein the target parameter is related to the frequency change of the clock signal during the period when the power supply voltage is less than the reference voltage.
[0081] In some possible implementations, when the phase-locked loop includes a switching circuit between a digital filter and a digitally controlled oscillator, the SOC chip further includes: a frequency locking controller, which is respectively connected to a control end of the switching circuit, another input end, and a digitally controlled oscillator, and its schematic diagram is as shown above. Fig.12 shown.
[0082] The frequency locking controller is configured to control another input end of the switching circuit to be connected to its output end, sequentially increase the number of specified values in the digital signal input to the digital controlled oscillator, and determine the first number of cycles of the clock signal output by the digital controlled oscillator within the cycle of the input clock; when the first number of cycles reaches the specified value, continue to increase the number of specified values in the digital signal; determine the second number of cycles of the clock signal output by the digital controlled oscillator within the cycle of the input clock, and determine the frequency change of the unit parameter according to the first number of cycles, the second number of cycles, the frequency of the input clock and the increase of the specified value in the digital signal. And the frequency locking controller also sends the frequency change of the unit parameter to the clock controller.
[0083] The SOC chip provided in the embodiment of the present application may be various chips including a phase-locked loop, a clock controller, and a frequency-locked controller. For example, the SOC chip may be a processor or an artificial intelligence (AI) chip.
[0084] The SOC chip provided in the embodiment of the present application has the same implementation principle and technical effects as those of the aforementioned phase-locked loop embodiment. For the sake of brief description, for matters not mentioned in the chip embodiment, reference may be made to the corresponding contents in the aforementioned phase-locked loop embodiment.
[0085] The present application also provides an electronic device, which includes the above-mentioned SOC chip. For example, in one implementation, the electronic device includes: a transceiver, a memory, a communication bus, and a processor. Fig.13 The processor may be the above-mentioned SOC chip.
[0086] The transceiver, the memory, and the processor are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these elements can be electrically connected to each other through one or more communication buses or signal lines. Among them, the transceiver is used to send and receive data. The memory is used to store computer programs or other data, and the computer program includes at least one software function module that can be stored in the memory in the form of software or firmware or solidified in the operating system (OS) of the electronic device. The processor is used to execute the computer program or other data stored in the memory.
[0087] Among them, the memory can be, but is not limited to, random access memory (Random Access Memory, RAM), read only memory (Read Only Memory, ROM), programmable read-only memory (Programmable Read-Only Memory, PROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, EPROM), electrically erasable read-only memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc.
[0088] The processor may be an integrated circuit chip with signal processing capabilities. The above-mentioned processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), a microprocessor, etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. Or the processor may also be any conventional processor, etc.
[0089] Among them, the above-mentioned electronic devices include but are not limited to mobile phones, tablets, computers, etc.
[0090] The embodiment of the present application also provides a method for adjusting a chip clock signal, the method comprising:
[0091] S1: When it is detected that the power supply voltage of the chip is less than the reference voltage, the frequency of the clock signal is reduced.
[0092] In some possible implementations, the voltage drop detection control circuit built into the phase-locked loop in the chip can be used to detect whether the power supply voltage of the chip is less than the reference voltage, and when it is detected that the power supply voltage of the chip is less than the reference voltage, the frequency of the clock signal output by the phase-locked loop is reduced.
[0093] S2: Obtain the frequency change of the clock signal when the power supply voltage is less than the reference voltage, and when the power supply voltage is restored, reduce the frequency of the clock signal according to the frequency change of the clock signal and the frequency of the input clock to prevent the frequency of the clock signal from being greater than the target frequency when the power supply voltage is restored.
[0094] This can be achieved by obtaining the frequency change of the clock signal when the power supply voltage is less than the reference voltage (which can be the number of 1s in the above-mentioned Istretch_ctl digital signal * Kdco), and when the power supply voltage is restored, by reducing the division ratio of the divider in the phase-locked loop in the chip, so as to reduce the frequency of the clock signal output by the phase-locked loop, so as to prevent the frequency of the clock signal from being greater than the target frequency when the power supply voltage is restored, such as the target frequency being the above-mentioned Fref*H.
[0095] When reducing the frequency division ratio of the frequency divider, it can be reduced according to the frequency variation of the clock signal and the frequency of the input clock, such as setting the frequency division ratio of the frequency divider to fbdiv'=fbdiv-the number of 1s in the Istretch_ctl digital signal*Kdco / Fref.
[0096] It is understandable that the above method may not rely on the above SOC chip, and all technical solutions that can realize the functions shown in the method are applicable.
[0097] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0098] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0099] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A digitally controlled oscillator, characterized in that: include: An oscillator circuit is configured to convert a digital signal input to the oscillator circuit into an analog signal and generate a clock signal whose frequency is positively correlated with the analog signal; The voltage drop detection control circuit is connected to the oscillation circuit. The voltage drop detection control circuit is configured to control the oscillation circuit to reduce the frequency of the clock signal when it is detected that the power supply voltage input to the oscillation circuit is less than the reference voltage.
2. The digital controlled oscillator according to claim 1, characterized in that: The voltage drop detection control circuit comprises: a voltage drop detection circuit, configured to compare the power supply voltage with the reference voltage to obtain a comparison result, and output a digital control signal according to the comparison result; A control circuit is connected to the voltage drop detection circuit and the oscillation circuit, and is configured to adjust the frequency of the clock signal in response to the digital control signal, wherein the frequency of the clock signal is reduced when the power supply voltage is less than the reference voltage.
3. The digital controlled oscillator according to claim 2, characterized in that: The digital control signal comprises an M-bit binary signal, where M is an integer greater than or equal to 1; the control circuit comprises: M switch circuits connected in parallel, each switch circuit being connected to the voltage drop detection circuit and the oscillation circuit; each switch circuit having a closed or open state, and being controlled by a binary signal in the M-bit binary signal; The frequency of the clock signal is related to the number of the switch circuits in the on state. When the switch circuit is closed, the input signal of the oscillator in the oscillation circuit is reduced, thereby reducing the frequency of the clock signal output by the oscillation circuit.
4. The digital controlled oscillator according to any one of claims 1 to 3, characterized in that: The oscillator circuit comprises: a reference power supply configured to generate a reference current; A digital-to-analog converter connected to the reference power supply, the digital-to-analog converter being configured to convert a digital signal inputted into the digital-to-analog converter into an analog current based on the reference current; An oscillator is connected to the output end of the digital-to-analog converter, and the oscillator is configured to output the clock signal whose frequency is positively correlated with the analog current, wherein when the power supply voltage is less than the reference voltage, the voltage drop detection control circuit reduces the analog current.
5. A phase-locked loop, characterized in that: include: A digitally controlled oscillator as claimed in any one of claims 1 to 4; a time-to-digital converter configured to receive an input clock and a reference clock, and detect a phase difference between the input clock and the reference clock; a digital filter connected to the digitally controlled oscillator and the time-to-digital converter, wherein the digital filter is configured to filter the digital signal output by the time-to-digital converter and output the filtered digital signal to the digitally controlled oscillator; A frequency divider is connected to the digitally controlled oscillator and the time-to-digital converter, and is configured to divide the frequency of the clock signal output by the digitally controlled oscillator to generate the reference clock.
6. The phase-locked loop according to claim 5, characterized in that: The frequency divider and the digital controlled oscillator are also used to connect to a clock controller; The digital controlled oscillator is further configured to send a target parameter to the clock controller, wherein the target parameter is related to the frequency change of the clock signal during a period when the power supply voltage is less than the reference voltage; The frequency divider is further configured to adjust its own frequency division ratio in response to the control of the clock controller; The clock controller adjusts the division ratio of the frequency divider according to the target parameter, the frequency of the input clock and the frequency change of the unit parameter to prevent the frequency of the clock signal from being greater than the target frequency when the power supply voltage is greater than or equal to the reference voltage.
7. The phase-locked loop according to claim 6, characterized in that: The phase-locked loop also includes: A switching circuit comprises a control end, an output end and two input ends; the digital filter is connected to the digital controlled oscillator through one of the input ends of the switching circuit, and the other input end of the switching circuit is used to connect a third-party device to measure the frequency change of the unit parameter through the third-party device.
8. A SOC chip, characterized in that: include: A phase-locked loop as claimed in any one of claims 5 to 7; A clock controller, wherein the clock controller is respectively connected to a frequency divider and a digitally controlled oscillator in the phase-locked loop, and the clock controller is configured to receive a target parameter sent by the digitally controlled oscillator, and adjust a frequency division ratio of the frequency divider according to the target parameter, the frequency of the input clock, and the frequency change of a unit parameter, so as to prevent the frequency of the clock signal from being greater than a target frequency when the power supply voltage is greater than or equal to the reference voltage, wherein the target parameter is related to the frequency change of the clock signal during a period when the power supply voltage is less than the reference voltage.
9. The SOC chip according to claim 8, characterized in that: The phase-locked loop includes a switching circuit between the digital filter and the digitally controlled oscillator; the SOC chip also includes: A frequency locking controller, connected to the control end of the switching circuit, another input end, and the digitally controlled oscillator respectively; The frequency-locked controller is configured to control the other input end of the switching circuit to be connected to its output end, sequentially increase the number of specified values in the digital signal input to the digitally controlled oscillator, and determine the first number of cycles of the clock signal output by the digitally controlled oscillator within the cycle of the input clock; when the first number of cycles reaches the specified value, continue to increase the number of specified values in the digital signal; determine the second number of cycles of the clock signal output by the digitally controlled oscillator within the cycle of the input clock, and determine the frequency change of the unit parameter according to the first number of cycles, the second number of cycles, the frequency of the input clock and the increase in the specified value in the digital signal.
10. An electronic device, characterized in that: include: The SOC chip as claimed in claim 8 or 9.
11. A method for adjusting a chip clock signal, characterized in that: include: When it is detected that the power supply voltage of the chip is less than the reference voltage, the frequency of the clock signal is reduced; Obtain the frequency change of the clock signal when the power supply voltage is less than the reference voltage, and when the power supply voltage is restored, reduce the frequency of the clock signal according to the frequency change of the clock signal and the frequency of the input clock to prevent the frequency of the clock signal from being greater than the target frequency when the power supply voltage is restored.
