CLOCK FILTER AND CLOCK PROCESSING METHOD
20190089339 ยท 2019-03-21
Inventors
Cpc classification
H03K3/027
ELECTRICITY
G01R29/02
PHYSICS
International classification
G01R29/02
PHYSICS
H03K3/027
ELECTRICITY
Abstract
A clock filter filtering a glitch of an input clock to generate an output clock is provided. A first delay circuit inverts the input clock to generate an inverted clock and delays the inverted clock to generate a first processing clock. A second delay circuit delays the input clock to generate a second processing clock. A first setting circuit generates a reset clock according to the inverted clock and the first processing clock. A second setting circuit generates a set clock according to the input clock and the second processing clock. When the set clock changes from a first level to a second level, a third setting circuit sets the output clock at the second level. When the reset clock changes from the first level to the second level, the third setting circuit sets the output clock to the first level.
Claims
1. A clock filter for filtering a glitch of an input clock to generate an output clock and comprising: a first delay circuit inverting the input clock to generate an inverted clock and delaying the inverted clock to generate a first processing clock; a second delay circuit delaying the input clock to generate a second processing clock; a first setting circuit generating a reset clock according to the inverted clock and the first processing clock; a second setting circuit generating a set clock according to the input clock and the second processing clock; and a third setting circuit generating the output clock according to the set clock and the reset clock, wherein in response to the set clock changing from a first level to a second level, the third setting circuit sets the output clock to the second level, and in response to the reset clock changing from the first level to the second level, the third setting circuit sets the output clock to the first level.
2. The clock filter as claimed in claim 1, wherein the first delay circuit has a first delay time, the second delay circuit has a second delay time, and the first delay time is equal to the second delay time.
3. The clock filter as claimed in claim 1, wherein the first delay circuit comprises: an inverter inverting the input clock to generate the inverted clock; and a first delayer delaying the inverted clock to generate the first processing clock.
4. The clock filter as claimed in claim 3, wherein the second delay circuit comprises: a buffer receiving the input clock to generate a buffered clock; and a second delayer delaying the buffered clock to generate the second processing clock.
5. The clock filter as claimed in claim 4, wherein the first delayer has a first delay time, the second delayer has a second delay time, and each of the first and second delay times is less than or equal to a half cycle of the input clock.
6. The clock filter as claimed in claim 3, wherein the second delay circuit comprises: a second delayer delaying the input clock to generate a delayed clock; and a buffer buffering the delayed clock to generate the second processing clock.
7. The clock filter as claimed in claim 1, wherein in response to the inverted or the first processing clock being at the first level, the first setting sets the reset clock at the first level, and in response to the inverted clock and the first processing clock being at the second level, the first setting circuit sets the reset clock at the second level.
8. The clock filter as claimed in claim 7, wherein in response to the input clock or the second processing clock being at the first level, the second setting circuit sets the set clock at the first level, and in response to the input clock and the second clock being at the second level, the second setting circuit sets the set clock at the second level.
9. The clock filter as claimed in claim 1, wherein the third setting circuit is a SR flip-flop.
10. The clock filter as claimed in claim 1, wherein the third setting circuit comprises: a first NOR gate generating a logic signal according to the set clock and the output clock; and a second NOR gate generating the output clock according to the logic signal and the reset clock.
11. A clock processing method to filter a glitch of an input clock and generate an output clock, comprising: inverting the input clock to generate an inverted signal; delaying the inverted clock to generate a first processing clock; delaying the input clock to generate a second processing clock; generating a reset clock according to a level of the inverted clock and a level of the first processing clock; generating a set clock according to a level of the input clock and a level of the second processing clock; and generating the output clock according to the set clock and the reset clock, wherein in response to the set clock changing from a first level to a second level, the output clock is at the second level, and wherein in response to the reset clock changing from the first level to the second level, the output clock is at the first level.
12. The clock processing method as claimed in claim 11, wherein the first processing clock lags the inverted clock and a time difference between the first processing clock and the inverted clock is equal to a first delay time, wherein the second processing clock lags the input clock and a time difference between the second processing clock and the input clock is equal to a second delay time, wherein the first delay time is equal to the second delay time.
13. The clock processing method as claimed in claim 11, wherein the step of delaying the input clock to generate a second processing clock comprises: buffering the input clock to generate a buffered clock; and delaying the buffered clock to generate the second processing clock.
14. The clock processing method as claimed in claim 13, wherein a time difference between the first processing clock and the inverted clock is equal to the first delay time, a time difference between the second processing clock and the buffered clock is equal to the second delay time, and the first and second delay times are less than or equal to a half cycle of the input clock.
15. The clock processing method as claimed in claim 11, wherein in response to the inverted clock or the first processing clock being at the first level, the reset clock is at the first level, and in response to the inverted clock and the first processing clock being at the second level, the reset clock is at the second level.
16. The clock processing method as claimed in claim 15, wherein in response to the input clock or the second processing clock being at the first level, the set clock is at the first level, and in response to the input clock and the second processing clock being at the second level, the set clock is at the second level.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The invention can be more fully understood by referring to the following detailed description and examples with references made to the accompanying drawings, wherein:
[0022]
[0023]
[0024]
[0025]
[0026]
[0027]
[0028]
[0029]
[0030]
DETAILED DESCRIPTION OF THE INVENTION
[0031] The present invention will be described with respect to particular embodiments and with reference to certain drawings, but the invention is not limited thereto and is only limited by the claims. The drawings described are only schematic and are non-limiting. In the drawings, the size of some of the elements may be exaggerated for illustrative purposes and not drawn to scale. The dimensions and the relative dimensions do not correspond to actual dimensions in the practice of the invention.
[0032]
[0033] The delay circuit 110 inverts the input clock CK.sub.IN to generate an inverted clock CK.sub.IV and delays the inverted clock CK.sub.IV to generate a processing clock T1. In this embodiment, the delay circuit 110 has a delay time D.sub.1. When the delay circuit 110 receives the input clock CK.sub.IN, the delay circuit 110 generates the processing clock T1 after the delay time D.sub.1. Therefore, the processing clock T1 lags the input clock CK.sub.IN, and the time difference between the processing clock T1 and the input clock CK.sub.IN is equal to the delay time D.sub.1. The internal circuit structure of the delay circuit 110 is not limited in the present disclosure. In one embodiment, the delay circuit 110 comprises an inverter 111 and a delayer 112.
[0034] The inverter 111 inverts the input clock CK.sub.IN to generate the inverted clock CK.sub.IV. In this embodiment, the inverter 111 has delay time D.sub.2. When the inverter 111 receives the input clock CK.sub.IN, the inverter 111 generate the inverted clock CK.sub.IV after the delay time D.sub.2. Therefore, the inverted clock CK.sub.IV lags the input clock CK.sub.IN, and the time difference between the inverted clock CK.sub.IV and the input clock CK.sub.IN is equal to the delay time D.sub.2.
[0035] The delayer 12 delays the inverted clock CK.sub.IV to generate the processing clock T1. In this embodiment, the delayer 112 has delay time D.sub.3. When the delayer 112 receives the inverted clock CK.sub.IV, the delayer 112 generates the processing clock T1 after the delay time D.sub.3. Therefore, the processing clock T1 lags the inverted clock CK.sub.IV, and the time difference between the processing clock T1 and the inverted clock CK.sub.IV is equal to the delay time D.sub.3. In one embodiment, the delay time D.sub.3 is less than or equal to a half cycle of the input clock CK.sub.IN. In other embodiments, the sum of the delay time D.sub.2 and D.sub.3 may be equal to the delay time D.sub.1. Furthermore, the circuit structure of the delayer 112 is not limited in the disclosure. Any circuit can serve as the delayer 112, as long as the circuit is capable delaying the inverted clock CK.sub.IV.
[0036] The delay circuit 120 delays the input clock CK.sub.IN to generate a processing clock T2. In this embodiment, the delay circuit 120 has delay time D.sub.4. When the delay circuit 120 receives the input clock CK.sub.IN, the delay circuit 120 generates the processing clock T2 after the delay time D.sub.4. Therefore, the processing clock T2 lags the input clock CK.sub.IN, and the time difference between the processing clock T2 and the input clock CK.sub.IN is equal to the delay time D.sub.4. The disclosure does not limit the circuit structure of the delay circuit 120. Any circuit can serve as the delay circuit 120, as long as the circuit is capable of delaying the input clock CK.sub.IN.
[0037] The setting circuit 130 generates a reset clock CK.sub.R according to the level of the inverted clock CK.sub.IV and the level of the processing clock T1. In one embodiment, when the inverted clock CK.sub.IV or the processing clock T1 is at a first level, the setting circuit 130 sets the reset clock CK.sub.R at a first level. When each of the inverted clock CK.sub.IV and the processing clock T1 are at a second level, the setting circuit 130 sets the reset clock CK.sub.R at the second level. In this embodiment, the first level is opposite to the second level. For example, the first level is a low level, and the second level is a high level. In another embodiment, the first level is a high level, and the second level is a low level. In this embodiment, the setting circuit 130 is a AND gate.
[0038] The setting circuit 140 generates a set clock CK.sub.S according to the level of the input clock CK.sub.IN and the level of the processing clock T2. In one embodiment, when the input clock CK.sub.IN or the processing clock T2 is at a first level, the setting circuit 140 sets the set clock CK.sub.S at the first level. When each of the input clock CK.sub.IN and the processing clock T2 is at a second level, the setting circuit 140 sets the set clock CK.sub.S at the second level. In one embodiment, the setting circuit 140 is a AND gate.
[0039] The setting circuit 150 generates the output clock CK.sub.OUT according to the set clock CK.sub.S and the reset clock CK.sub.R. when the set clock CK.sub.S is changed from a first level to a second level, the setting circuit 150 sets the output clock CK.sub.OUT from the first level to the second level and maintains the set clock CK.sub.S at the second level. When the reset clock CK.sub.R is changed from the first level to the second level, the setting circuit 150 resets the output clock CK.sub.OUT such that the output clock CK.sub.OUT is changed from the second level to the first level and maintained at the first level.
[0040] The circuit structure of the setting circuit 150 is not limited in the present disclosure. In one embodiment, the setting circuit 150 is a SR flip-flop. The set input of the SR flip-flop receives the set clock CK.sub.S. The reset input of the SR flip-flop receives the reset clock CK.sub.R. The output signal of the SR flip-flop is provided as the output clock CK.sub.OUT. In this case, the SR flip-flop sets the output clock CK.sub.OUT at a high level according to the rising edge of the set clock CK.sub.S and resets the output clock CK.sub.OUT to a low level according to the reset clock CK.sub.R.
[0041] In this embodiment, the setting circuit 150 comprises logic circuits 151 and 152. The logic circuit 151 generates a logic signal S.sub.L according to the set clock CK.sub.S and output clock CK.sub.OUT. When one of the set clock CK.sub.S and the output clock CK.sub.OUT is at a second level (e.g. a high level), the logic signal S.sub.L is at a first level (e.g. a low level). When each of the set clock CK.sub.S and the output clock CK.sub.OUT is at the first level (e.g. a low level), the logic signal S.sub.L is at the second level (e.g. a high level). In one embodiment, the logic circuit 151 is a NOR gate.
[0042] The logic circuit 152 generates the output clock CK.sub.OUT according to the logic signal S.sub.L and the reset clock CK.sub.R. For example, when the logic signal S.sub.L or the reset clock CK.sub.R is at a second level (e.g. a high level), the output clock CK.sub.OUT is at a first level (e.g. a low level). When each of the logic signal S.sub.L and the reset clock CK.sub.R is at the first level, the output clock CK.sub.OUT is at the second level. In one embodiment, the logic circuit 152 is a NOR gate.
[0043]
[0044] The delayer 220A delays the buffered clock CK.sub.BF to generate the processing clock T2. In this embodiment, the delayer 220A has delay time D.sub.6. When the delayer 220A receives the buffered clock CK.sub.BF, the delayer 220A generates the processing clock T2 after the delay time D.sub.6. Therefore, the processing clock T2 lags the buffered clock CK.sub.BF, and the time difference between the processing clock T2 and the buffered clock CK.sub.BF is equal to the delay time D.sub.6. In one embodiment, the delay time D.sub.6 is less than or equal to a half cycle of the input clock CK.sub.IN. In other embodiments, the delay time D.sub.6 may be equal to the delay time D.sub.3 of the delayer 112 shown in
[0045]
[0046] The buffer 210B buffers the delayed clock CK.sub.DL to generate the processing clock T2. In this embodiment, the buffer 210B has delay time D.sub.5. When the buffer 210B receives the delayed clock CK.sub.DL, the buffer 210 generates the processing clock T2 after the delay time D.sub.5. Therefore, the processing clock T2 lags the delayed clock CK.sub.DL, and the time difference between the processing clock T2 and the delayed clock CK.sub.DL is equal to the delay time D.sub.5. In other embodiments, the buffer 210B is capable of integrating into the delayer 220B.
[0047]
[0048] The delay unit 311 delays the inverted clock CK.sub.IV to generate a delayed clock DCK.sub.1. In this embodiment, the delay unit 311 has delay time DT.sub.1. When the delay unit 311 receives the inverted clock CK.sub.IV, the delay unit 311 generates the delayed clock DCK.sub.1 after the delay time DT.sub.1. Therefore, the time difference between the delayed clock DCK.sub.1 and the inverted clock CK.sub.IV is equal to the delay time DT.sub.1.
[0049] The delay unit 312 delays the delayed clock DCK.sub.1 to generate a delayed clock DCK.sub.2. In this embodiment, the delay unit 312 has delay time DT.sub.2. When the delay unit 312 receives the delayed clock DCK.sub.1, the delay unit 312 generates the delayed clock DCK.sub.2 after the delay time DT.sub.2. Therefore, the time difference between the delayed clock DCK.sub.1 and delayed clock DCK.sub.2 is equal to the delay time DT.sub.2.
[0050] The delay unit 313 delays the delayed clock DCK.sub.2 to generate a delayed clock DCK.sub.3. In this embodiment, the delay unit 313 has delay time DT.sub.3. When the delay unit 313 receives the delayed clock DCK.sub.2, the delay unit 313 generates the delayed clock DCK.sub.3 after the delay time DT.sub.3. Therefore, the time difference between the delayed clock DCK.sub.2 and delayed clock DCK.sub.3 is equal to the delay time DT.sub.3.
[0051] The delay unit 314 delays the delayed clock DCK.sub.3 to generate a delayed clock DCK.sub.4. In this embodiment, the delay unit 314 has delay time DT.sub.4. When the delay unit 314 receives the delayed clock DCK.sub.3, the delay unit 314 generates the delayed clock DCK.sub.4 after the delay time DT.sub.4. Therefore, the time difference between the delayed clock DCK.sub.3 and delayed clock DCK.sub.4 is equal to the delay time DT.sub.4. In one embodiment, the delay time DT.sub.1DT.sub.4 are equal to each other. In another embodiment, one of the delay time DT.sub.1DT.sub.4 is not equal to another of the delay time DT.sub.1DT.sub.4.
[0052] The selector 315 receives the delayed clocks DCK.sub.1DCK.sub.4 and selects and outputs one of the delayed clocks DCK.sub.1DCK.sub.4 according to a selection signal S.sub.SEL. In this embodiment, the output signal of the selector 315 is provided as the processing clock T1. The circuit structure of the selector 315 is not limited in the present disclosure. In one embodiment, the selector 315 is a multiplexer.
[0053] The controller 316 generates the selection signal S.sub.SL according to a predetermined value. In one embodiment, the controller 316 comprises a register (not shown) to store the predetermined value. In another embodiment, the predetermined value is stored in an external memory (not shown). In this case, the external memory is outside of the controller 316 or outside of the delayer 112. In other embodiments, the controller 316 may be disposed outside of the delayer 112.
[0054]
[0055] In this embodiment, the processing clock T1 lags the inverted clock CK.sub.IV, and the time difference between the processing clock T1 and the inverted clock CK.sub.IV is equal to the delay time D.sub.3. In this embodiment, the delay time D.sub.3 is less than or equal to a half cycle of the inverted clock CK.sub.IV, wherein the cycle of the inverted clock CK.sub.IV is equal to the cycle of the input clock CK.sub.IN. In another embodiment, the delay time D.sub.3 is approximately equal to a half cycle of the inverted clock CK.sub.IV. In other embodiments, the delay time D.sub.3 is approximately equal to a quarter cycle of the inverted clock CK.sub.IV.
[0056]
[0057] In this embodiment, the processing clock T2 lags the input clock CK.sub.IN, and the time difference between the processing clock T2 and the input clock CK.sub.IN is equal to the delay time D.sub.4. In this embodiment, the delay time D.sub.4 is less than or equal to a half cycle of the input clock CK.sub.IN. In another embodiment, the delay time D.sub.4 is approximately equal to a half cycle of the input clock CK.sub.IN.
[0058]
[0059]
[0060]
[0061] The input clock is delayed to generate a second processing clock (step S613). In one embodiment, step S613 first delays the input clock to generate a delayed clock and then buffers the delayed clock to generate the second processing clock. In this embodiment, the second processing clock lags the input clock, and the time difference between the second processing clock and the input clock is equal to a second delay time. In one embodiment, the second delay time is equal to the first delay time. In another embodiment, step S613 first buffers the input clock to generate a buffered clock and then delays the buffered clock to generate the second processing clock. In this case, the time difference between the second processing clock and the buffered clock is equal to a third delay time. In one embodiment, the third delay time is less than or equal to a half cycle of the input clock. In another embodiment, the third delay time is equal to the first delay time. In other embodiments, the third delay time is equal to a quarter cycle of the input clock.
[0062] A reset clock is generated according to the level of the inverted clock and the level of the first processing clock (step S614). In one embodiment, when the inverted clock or the first processing clock is at a first level (e.g. a low level), the reset clock is at the first level. However, when each of the inverted clock and the first processing clock is at a second level (e.g. a high level), the reset clock is at the second level.
[0063] A set clock is generated according to the level of the input clock and the level of the second processing clock (step S615). In one embodiment, when the input clock or the second processing clock is at a first level (e.g. a low level), the set clock is at the first level. When each of the input clock and the second processing clock is at a second level (e.g. a high level), the set clock is at the second level.
[0064] An output clock is generated according to the set clock and the reset clock (step S616). In one embodiment, when the set clock is changed from a first level (e.g. a low level) to a second level (e.g. a high level), the output clock is at the second level. When the reset clock is changed from the first level to the second level, the output clock is at the first level.
[0065] Clock filter methods, or certain aspects or portions thereof, may take the form of a program code (i.e., executable instructions) embodied in tangible media, such as floppy diskettes, CD-ROMS, hard drives, or any other machine-readable storage medium, wherein, when the program code is loaded into and executed by a machine such as a computer, the machine thereby becomes an apparatus for practicing the methods. The methods may also be embodied in the form of a program code transmitted over some transmission medium, such as electrical wiring or cabling, through fiber optics, or via any other form of transmission, wherein, when the program code is received and loaded into and executed by a machine such as a computer, the machine becomes an apparatus for practicing the disclosed methods. When implemented on a general-purpose processor, the program code combines with the processor to provide a unique apparatus that operates analogously to application-specific logic circuits.
[0066] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
[0067] While the invention has been described by way of example and in terms of the preferred embodiments, it is to be understood that the invention is not limited to the disclosed embodiments. On the contrary, it is intended to cover various modifications and similar arrangements (as would be apparent to those skilled in the art). For example, it should be understood that the system, device and method may be realized in software, hardware, firmware, or any combination thereof. Therefore, the scope of the appended claims should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.