A clock frequency switching circuit
By using the switching signal synchronization circuit and the narrow pulse generation circuit in the clock frequency switching circuit, the clock source is ensured to be low level during switching, which solves the glitch problem in the prior art when switching the clock frequency, simplifies the circuit structure and improves efficiency. switching efficiency.
Patent Information
- Application Number
- CN201910631644.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-07-12
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2039-07-12
AI Technical Summary
The existing technology easily generates glitch signals when switching clock frequencies, resulting in circuit complexity and large volume.
Design a clock frequency switching circuit, including a switching signal synchronization circuit, a narrow pulse generation circuit and a switching tube. The falling edge synchronizes the frequency switching signal and turns on the switching tube during the narrow pulse period to discharge the energy storage element of the clock source oscillator. Make sure the clock is low to avoid glitches.
It achieves glitch-free frequency switching when switching clock frequencies, simplifies the circuit structure, and does not require a separate glitch elimination circuit or frequency switching enable signal and corresponding enable signal timing circuit.
Smart Images

Figure CN110212894B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of clock sources, and in particular to a clock frequency switching circuit. Background Art
[0002] Various electronic devices, such as communication devices in wireless communication systems, usually need to use a clock source as an internal time reference. Under different application conditions, communication devices may need to use different clock frequencies, which requires switching the clock frequency.
[0003] Currently, one way to switch clock frequencies is to generate clock signals of different frequencies through different clock sources, and then implement clock switching through a clock switching circuit. This method requires as many clock sources as there are different frequencies, and has a complex structure and large size. Another way to switch clock frequencies is to switch the frequency of the clock source through a frequency switching circuit in the same clock source. For details, see Figure 1 and Figure 2 ,in, Figure 1 The structure of the clock frequency switching circuit is shown in FIG. Figure 2 This is the corresponding logic diagram. In this way, when the switching signal comes, the internal circuit of the clock is switched, and the clock frequency is changed by changing the parameters of the oscillator. The clock output is shielded before the switching signal comes, and then the enable signal is restored through timing. Multiple clock sources are no longer required, but this method is prone to glitch signals during the switching frequency. Summary of the invention
[0004] The present application provides a clock frequency switching circuit to solve the problem in the prior art that glitches are prone to occur when switching clock frequencies.
[0005] In one embodiment, a clock frequency switching circuit is provided, including a switching signal synchronization circuit, a narrow pulse generating circuit, a clock source oscillator and a switch tube;
[0006] The switching signal synchronization circuit includes a first input terminal and a second input terminal, wherein the first input terminal and the second input terminal are used to collect a frequency switching signal and a current clock source signal respectively, and the switching signal synchronization circuit is used to synchronize the falling edge of the frequency switching signal with the current clock source signal to obtain a synchronized frequency switching signal and output it;
[0007] The switch tube comprises a control end, a first end and a second end, wherein the first end and the second end are respectively connected to two ends of an energy storage element of a clock source oscillator;
[0008] The input end of the narrow pulse generating circuit is connected to the output end of the switching signal synchronization circuit, and is used to generate a narrow pulse signal according to the synchronized frequency switching signal, and input the narrow pulse signal to the control end of the switch tube to control the switch tube to conduct during the narrow pulse period;
[0009] The input end of the clock source oscillator is connected to the output end of the switching signal synchronization circuit, and is used to switch the clock frequency under the control of the synchronized frequency switching signal.
[0010] According to the clock frequency switching circuit of the above embodiment, the switching signal synchronization circuit synchronizes the frequency switching signal with the current clock source signal at the falling edge, that is, collects the frequency switching signal through the falling edge, and then inputs the synchronized frequency switching signal into the clock source oscillator to control the clock source oscillator to switch the clock frequency; at the same time, the narrow pulse generating circuit generates a narrow pulse signal according to the synchronized frequency switching signal and inputs it to the switch tube, controls the switch tube to be turned on during the narrow pulse, so that the energy storage element of the clock source oscillator is discharged, so that it can be ensured that the clock is at a low level when the clock source switches the frequency within the narrow pulse time, so that no glitches will occur in the switching action. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 It is a structural schematic diagram of a clock frequency switching circuit in the prior art;
[0012] Figure 2 It is a logic diagram of a clock frequency switching circuit in the prior art;
[0013] Figure 3 A schematic diagram of the structure of a clock frequency switching circuit according to an embodiment of the present invention;
[0014] Figure 4 A schematic diagram of the structure of a clock frequency switching circuit according to a specific embodiment of the present invention;
[0015] Figure 5 A schematic diagram of the structure of the switching signal synchronization circuit of the present invention;
[0016] Figure 6 A schematic diagram of the structure of a narrow pulse generating circuit of the present invention;
[0017] Figure 7 A logic diagram corresponding to a clock frequency switching circuit according to a specific embodiment of the present invention. DETAILED DESCRIPTION
[0018] The present invention is further described in detail below through specific embodiments in conjunction with the accompanying drawings. Similar components in different embodiments are labeled with related similar component numbers. The serial numbers assigned to the components herein, such as "first", "second", etc., are only used to distinguish the objects described and do not have any order or technical meaning.
[0019] In an embodiment of the present invention, when a frequency switching signal arrives, the switching signal synchronization circuit synchronizes the frequency switching signal with the falling edge of the current clock source signal, and at the same time generates a narrow pulse signal through a narrow pulse generating circuit to control the switch tube to conduct during the narrow pulse period so that the energy storage element of the clock source oscillator discharges, thereby ensuring that the clock is at a low level when the clock source oscillator switches the clock frequency.
[0020] Embodiment 1:
[0021] Please refer to Figure 3 , is a schematic diagram of the structure of a clock frequency switching circuit provided in an embodiment of the present invention, wherein the clock frequency switching circuit includes a switching signal synchronization circuit 01, a narrow pulse generating circuit 02, a clock source oscillator 03 and a switch tube 04. Among them, the switching signal synchronization circuit 01 includes a first input terminal a1 and a second input terminal b1, the first input terminal a1 and the second input terminal b1 are respectively used to collect the frequency switching signal and the current clock source signal, and the switching signal synchronization circuit 01 is used to synchronize the frequency switching signal with the current clock source signal at the falling edge to obtain the synchronized frequency switching signal and output it; the switch tube 04 includes a control terminal c2, a first terminal a2 and a second terminal b2, the first terminal a2 and the second terminal b2 are respectively connected to the two ends of the energy storage element of the clock source oscillator 03; the input terminal d of the narrow pulse generating circuit 02 is connected to the output terminal c1 of the switching signal synchronization circuit 01, and is used to generate a narrow pulse signal according to the synchronized frequency switching signal output by the switching signal synchronization circuit 01, and input the narrow pulse signal to the control terminal c2 of the switch tube 04, and control the switch tube 04 to turn on during the narrow pulse period, so as to discharge the energy storage element of the clock source oscillator 03; the input terminal of the clock source oscillator 03 is connected to the output terminal c1 of the switching signal synchronization circuit 01, and is used to switch the clock frequency under the control of the synchronized frequency switching signal output by the switching signal synchronization circuit 01.
[0022] In practical applications, the energy storage element of the clock source oscillator 03 is generally a capacitor. The switch tube 04 can be a MOS (Metal Oxide Semiconductor) tube, in which case the control terminal c2 of the switch tube 04 is the gate of the MOS tube. The switch tube 04 can also be a switch triode, in which case the control terminal c2 of the switch tube 04 is the base of the switch triode.
[0023] The clock frequency switching circuit provided in this embodiment includes a switching signal synchronization circuit, a narrow pulse generating circuit, a clock source oscillator and a switch tube. When the frequency switching signal comes, the switching signal synchronization circuit synchronizes the frequency switching signal with the current clock source signal at the falling edge, that is, collects the frequency switching signal through the falling edge, and then inputs the synchronized frequency switching signal into the clock source oscillator to control the clock source oscillator to switch the clock frequency; at the same time, the narrow pulse generating circuit generates a narrow pulse signal according to the synchronized frequency switching signal and inputs it to the switch tube, controls the switch tube to conduct during the narrow pulse, so that the energy storage element of the clock source oscillator is discharged, so that the clock source can be ensured to be at a low level when the frequency is switched within the narrow pulse time, so that no glitches will occur when the clock source frequency is switched. Compared with the prior art, the clock frequency switching circuit does not require a separate glitch elimination circuit, does not require a special frequency switching enable signal, and does not require a corresponding enable signal timing circuit, and the circuit structure is simple.
[0024] Embodiment 2:
[0025] Based on the first embodiment, this embodiment provides a specific clock frequency switching circuit, please refer to Figure 4 , Figure 4 05 is a schematic diagram of the structure of the clock frequency switching circuit. Different from the first embodiment, the clock frequency switching circuit of this embodiment further includes an output buffer 05, which is connected to the output end of the clock source oscillator 03 and is used to buffer and output the output signal of the clock source oscillator 03 ( Figure 4 OUT terminal output in the clock source oscillator 03) to increase the output driving capability of the clock frequency switching circuit. In practical applications, the output buffer 05 can be composed of two stages of inverters. In this embodiment, the energy storage element of the clock source oscillator 03 is a capacitor C1, and the switch tube 04 is a MOS tube Q1.
[0026] Specifically, Figure 5 A structural schematic diagram of a switching signal synchronization circuit 01 is shown, and the switching signal synchronization circuit includes a falling edge trigger 11 and a logic extraction circuit 12. The falling edge trigger 11 includes a first terminal D and a second terminal CLK, and the first terminal D and the second terminal CLK serve as a first input terminal a1 and a second input terminal b1 of the switching signal synchronization circuit 01 respectively. The falling edge trigger 11 is used to synchronize the falling edge of the frequency switching signal collected by its first terminal D and the current clock source signal collected by its second terminal CLK, and output two signals to the logic extraction circuit 12 through its first output terminal Q and the second output terminal Qn; the logic extraction circuit 12 is used to extract the synchronized frequency switching signal from the two signals output by the falling edge trigger 11. In an embodiment of the present invention, the logic extraction circuit 12 may be a signal extracted from the Q terminal as the synchronized frequency switching signal. The falling edge trigger 11 may be a D trigger.
[0027] Figure 6 A structural schematic diagram of a narrow pulse generating circuit 02 is shown. The narrow pulse generating circuit 02 may include an input buffer 21, a delay capacitor C2, a first inverter 22, a NAND gate 23 and a second inverter 24, wherein the NAND gate 23 and the second inverter 24 constitute an AND gate circuit. Among them, the input end of the input buffer 21 is connected to the output end c1 of the switching signal synchronization circuit 01, and is used to buffer and output the synchronized frequency switching signal; the first end of the delay capacitor C2 is grounded, and the second end is connected to the output end of the input buffer 21, and is used to delay the output signal of the input buffer 21; the first inverter 22 includes an input end and an output end, and its input end is connected to the second end of the delay capacitor C2, and is used to reverse the delayed signal; the first input end e1 of the NAND gate 23 is connected to the second end of the delay capacitor C2, and the second input end e2 of the NAND gate 23 is connected to the output end of the first inverter 22, and the NAND gate 23 is used to AND and reverse the delayed signal and the signal output by the first inverter 22; the second inverter 24 is connected to the output end of the NAND gate 23, and is used to reverse the signal output by the NAND gate 23. Through the narrow pulse generating circuit 02, a narrow pulse signal with a fixed pulse width can be generated when the signal at the c1 end (i.e., the synchronized frequency switching signal) jumps to rise, and the size of the narrow pulse depends on the time required for the switching frequency of the clock source.
[0028] According to the clock frequency switching circuit of this embodiment, combined with Figure 7As shown in the circuit logic diagram, when it is working, the switching signal synchronization circuit 01 ensures that the falling edge of the current clock source is used to beat the beat through the falling edge trigger 11. The frequency switching signal is synchronized with the current clock source signal through the falling edge trigger 11, and then the synchronized frequency switching signal is output after the logic extraction of the logic extraction circuit 12; the synchronized frequency switching signal is transmitted to the narrow pulse generating circuit 02, and the narrow pulse generating circuit 02 delays the synchronized frequency switching signal through the delay capacitor C2, and then reverses it through the first inverter 22 and ANDs it with the original synchronized frequency switching signal. When the signal at the c1 end jumps to the rising edge, a narrow pulse signal with a fixed pulse width is generated. The size of the narrow pulse depends on the time required for the switching frequency of the clock frequency switching circuit. The narrow pulse signal generated by the narrow pulse generating circuit 02 is input to the switch tube Q1 of the energy storage capacitor C1 of the clock source oscillator 03. During the time of the narrow pulse signal, Q1 is turned on to discharge the charge on the energy storage capacitor C1, and the clock outputs a low level at this time. Since the frequency switching signal is synchronized by the falling edge of the clock source, the narrow pulse signal is generated when the clock source output is a low level. In the clock frequency switching circuit, when discharging capacitor C1, it is necessary to ensure that the clock logic used to synchronize with the frequency switching signal is a low level. Then, in the switching, when the frequency switching signal comes, the clock source is synchronized with the frequency switching signal with the falling edge, and the energy storage capacitor C1 is discharged by the narrow pulse signal to ensure that the clock is a low level. During this time, the synchronized frequency switching signal input into the clock source oscillator 03 will change the internal configuration of the clock source oscillator 03, so that the output clock frequency of the clock source oscillator 03 changes, that is, the clock source implements the frequency switching action; after the narrow pulse signal, Q1 is disconnected, and the clock source oscillator 03 starts to oscillate normally. Since the previous narrow pulse signal discharges C1, the clock output is pulled to a low level, then the energy storage capacitor C1 starts to be charged from 0 at this time until the capacitor C1 is fully flipped, and the frequency at this time is the frequency required after the switch. In the switching action, the low level time of the clock is the narrow pulse time plus the low level time of the new frequency. When it flips to the high level again, the clock is the frequency clock after switching.
[0029] The clock frequency switching circuit provided in this embodiment is composed of a switching signal synchronization circuit, a narrow pulse generating circuit, a switch tube Q1, a clock source oscillator and an output buffer. After the switching signal synchronization circuit synchronizes the frequency switching signal with the clock source on the falling edge, it is transmitted to the narrow pulse generating circuit to generate a narrow pulse signal, and then the narrow pulse signal is transmitted to the switch tube of the energy storage capacitor C1 of the clock source oscillator, and the charge on the energy storage capacitor C1 is discharged within the time of the narrow pulse signal. Since the frequency switching signal is synchronized by the falling edge of the clock source, the narrow pulse signal is generated when the clock source outputs a low level. When the frequency switching signal comes, the clock source is synchronized with the falling edge of the signal, and the energy storage capacitor C1 is discharged by the narrow pulse signal to ensure that the clock is at a low level. During this time, the clock source realizes the frequency switching action. Compared with the prior art, the clock frequency switching circuit provided in this embodiment will not have burrs when switching the clock frequency, does not require a special burr elimination circuit, does not require a special clock switching frequency enable signal and a derived logic circuit, and has a simple circuit structure.
[0030] The clock frequency switching circuit of the above embodiment is a glitch-free clock frequency switching circuit, which can be applied to a clock source integrated circuit with a switchable frequency.
[0031] The above specific examples are used to illustrate the present invention, which is only used to help understand the present invention and is not intended to limit the present invention. For those skilled in the art, according to the concept of the present invention, some simple deductions, modifications or substitutions can be made.
Claims
1. A clock frequency switching circuit, characterized in that: It includes a switching signal synchronization circuit, a narrow pulse generating circuit, a clock source oscillator and a switch tube; The switching signal synchronization circuit includes a first input terminal and a second input terminal, wherein the first input terminal and the second input terminal are used to collect a frequency switching signal and a current clock source signal respectively, and the switching signal synchronization circuit is used to synchronize the falling edge of the frequency switching signal with the current clock source signal to obtain a synchronized frequency switching signal and output it; The switch tube comprises a control end, a first end and a second end, wherein the first end and the second end are respectively connected to two ends of an energy storage element of a clock source oscillator; The input end of the narrow pulse generating circuit is connected to the output end of the switching signal synchronization circuit, and is used to generate a narrow pulse signal according to the synchronized frequency switching signal, and input the narrow pulse signal to the control end of the switch tube, and control the switch tube to be turned on during the narrow pulse period, so as to discharge the energy storage element; The input end of the clock source oscillator is connected to the output end of the switching signal synchronization circuit, and is used to switch the clock frequency under the control of the synchronized frequency switching signal; The narrow pulse generating circuit comprises: An input buffer, whose input end is connected to the output end of the switching signal synchronization circuit, and is used to buffer and output the synchronized frequency switching signal; A delay capacitor, a first end of which is grounded and a second end of which is connected to the output end of the input buffer, and is used to delay the output signal of the input buffer; A first inverter, comprising an input end and an output end, wherein the input end is connected to the second end of the delay capacitor and is used to reverse the delayed signal; A NAND gate, whose first input end is connected to the second end of the delay capacitor, and whose second input end is connected to the output end of the first inverter, for performing AND operation on the delayed signal and the signal output by the first inverter and performing inversion operation; A second inverter is connected to the output end of the NAND gate and is used to invert the signal output by the NAND gate; The switching signal synchronization circuit includes a falling edge trigger and a logic extraction circuit; The falling edge trigger comprises a first end and a second end, the first end and the second end respectively serving as a first input end and a second input end of a switching signal synchronization circuit, the falling edge trigger being used to synchronize the falling edge of the frequency switching signal with the current clock source signal, and output two signals to a logic extraction circuit; The logic extraction circuit is used to extract the synchronized frequency switching signal from the two signals output by the falling edge trigger.
2. The clock frequency switching circuit according to claim 1, characterized in that: The falling edge trigger is a D trigger.
3. The clock frequency switching circuit according to claim 1, characterized in that: It also includes an output buffer, which is connected to the output end of the clock source oscillator and is used to buffer and output the output signal of the clock source oscillator.
4. The clock frequency switching circuit according to claim 3, characterized in that: The output buffer is composed of two stages of inverters.
5. The clock frequency switching circuit according to claim 1, characterized in that: The energy storage element is a capacitor.
6. The clock frequency switching circuit according to claim 1, characterized in that: The switch tube is a MOS tube; the control end of the switch tube is the gate of the MOS tube.
7. The clock frequency switching circuit according to claim 1, characterized in that: The switch tube is a switch triode; the control end of the switch tube is the base of the switch triode.
