Clock generation circuit, memory and clock duty cycle calibration method
By designing clock generation circuits, including oscillation circuits, comparison units and logic units, the problem of difficulty in providing high-frequency and accurate clock signals is solved by testing machines, realizing memory duty cycle calibration and monitoring, and improving test accuracy and self-testing ability.
Patent Information
- Application Number
- CN202011176592.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-28
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2040-10-28
AI Technical Summary
Existing test machines are difficult to provide high-frequency and accurate clock signals, resulting in the accuracy of memory test results, especially in the calibration and monitoring of duty cycles of high-speed memory.
A clock generation circuit is designed, including an oscillation circuit, a comparison unit and a logic unit. By generating a differential first oscillation signal and a second oscillation signal, the duty cycle is monitored and calibrated, so that it can be stable within a preset range. , has built-in self-test function and supports DCA and DCM functions.
It improves the accuracy of memory testing, reduces dependence on the test machine, realizes precise control and monitoring of duty cycles, and is suitable for self-testing and calibration of high-speed memory.
Smart Images

Figure CN114421891B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of semiconductor technology, and in particular to a clock generation circuit, a memory, and a clock duty cycle calibration method. Background Art
[0002] Semiconductor memories are used in many electronic systems to store retrievable data. As the demand for electronic systems to be faster, have greater data capacity, and consume less power continues to grow, semiconductor memories may need to be faster, store more data, and use less power to meet the changing needs.
[0003] Generally, semiconductor memory is controlled by providing commands, memory addresses and clocks to the memory, and various commands, memory addresses and clocks can be provided by a memory controller. These three types of signals can control the memory to perform various storage operations, such as a read operation of reading data from the memory and a write operation of storing data in the memory. Data is transferred between the memory and the memory controller based on a known timing associated with the "related command" received by the memory. Specifically, a system clock for timing commands and addresses can be provided to the memory, and further, a data clock can be provided to the memory, which is used as the timing of reading data and the timing of writing data. In addition, the memory can also provide a clock to the controller as the timing of transmitting data to the controller. The external clock provided to the memory is used to generate internal clocks, which control the timing of various internal circuits during the storage operation of the memory. The timing of the internal circuits during memory operations is critical, and deviations in the internal clocks may lead to erroneous operations. The deviations in the clocks include duty cycle distortion, ie, the duty cycle of the clock signal deviates from a preset duty cycle.
[0004] Therefore, the memory needs to have DCA function and DCM function, that is, the memory includes a duty cycle adjustment (DCA, DutyCycle Adjust) circuit and a duty cycle monitoring (DCM, Duty Cycle Monitor) circuit. The duty cycle adjustment circuit can be used to adjust the duty cycle of the internal clock generated by the external clock, and the duty cycle monitoring circuit can be used to monitor whether the duty cycle of the clock deviates from the preset duty cycle.
[0005] In addition, the memory needs to be tested before it leaves the factory, but the performance of the test machine has a great influence on the test results, affecting the accuracy of the test results. Analysis shows that the test machine is currently used to provide an input signal to the memory, and the input signal is a working signal required for the memory to complete the read and write operations. However, the current mainstream test machine can usually only work at a lower frequency (such as about 200MHz), which is far from the highest operating frequency of high-speed memory. High-speed memory includes DRAM, such as LPDDR4 or LPDDR5 or LPDDR6. Therefore, it is difficult to use the test machine to make a good judgment and screening of the characteristics of the high-speed input port of DRAM. The high-speed input port includes a data port / system clock port / data clock port (DQ / CK / WCK). In addition, some high-speed test machines can only set the frequency of the input signal, and it is difficult to ensure that the duty cycle is accurately and stably within the preset duty cycle, which will cause test deviations and affect the accuracy of the test results. Summary of the invention
[0006] The technical problem solved by the embodiments of the present invention is to provide a clock generating circuit, a memory and a clock duty cycle calibration method. The clock generating circuit can not only generate a first oscillation signal and a second oscillation signal that can be used for memory testing, but also can be used to realize the DCM function and DCA function of the memory.
[0007] To solve the above problems, an embodiment of the present invention provides a clock generating circuit, including: an oscillation circuit, used to generate a first oscillation signal and a second oscillation signal, the first oscillation signal and the second oscillation signal having the same frequency and opposite phase; a comparison unit, receiving the first oscillation signal and the second oscillation signal, and used to compare the duty cycle of the first oscillation signal and / or the duty cycle of the second oscillation signal; a logic unit, connecting the comparison unit and the oscillation circuit, and used to control the oscillation circuit according to the output result of the comparison unit so that the duty cycle reaches a preset range.
[0008] In addition, the comparison unit includes: an integration unit, which has a first input terminal and a second input terminal, the first input terminal receives one of the first oscillation signal or the second oscillation signal, and the second input terminal receives the second oscillation signal or the other of the first oscillation signal; a comparator, connected to the output terminal of the integration unit.
[0009] In addition, the integration unit is configured as follows: the first input end of the integration unit receives the first oscillation signal when a flip identification signal is at a low level, and receives the second oscillation signal when the flip identification signal is at a high level; the second input end of the integration unit receives the second oscillation signal when the flip identification signal is at a low level, and receives the first oscillation signal when the flip identification signal is at a high level.
[0010] In addition, the logic unit includes: a counter for adjusting the duty cycle of the first oscillation signal and / or the duty cycle of the second oscillation signal; a first register group for storing the first value of the counter according to the output of the comparator when the flip identification signal is at a low level; and a second register group for storing the second value of the counter according to the output of the comparator when the flip identification signal is at a high level.
[0011] In addition, the logic unit also includes: an operation component, connected to the first register group and the second register group, used to perform addition, subtraction, multiplication and division operations on the outputs of the first register group and the second register group; a third register group, connected to the operation component, used to store the output results of the operation component.
[0012] In addition, the comparison unit is driven by a sampling clock, and the frequency of the sampling clock is lower than the frequency of the first oscillation signal and / or the second oscillation signal.
[0013] In addition, the counter is driven by a counter clock, and the frequency of the counter clock is lower than the frequency of the first oscillation signal and / or the frequency of the second oscillation signal.
[0014] In addition, the frequency of the sampling clock is the same as the frequency of the calculator clock.
[0015] In addition, it also includes: a frequency divider, which receives an external clock signal and generates the sampling clock and the calculator clock.
[0016] In addition, it also includes: a fifth register group connected to the frequency divider and used to configure the frequencies of the sampling clock and the calculator clock.
[0017] In addition, the oscillation circuit includes: an oscillator, used to generate a first initial oscillation signal and a second initial oscillation signal, the first initial oscillation signal and the second initial oscillation signal have the same frequency and opposite phase; a path simulation circuit, located between the oscillator and the comparison unit, one end of which is connected to the output end of the oscillator and the other end is connected to the input end of the comparison unit, used to simulate the circuit characteristics of the first path, receive the first initial oscillation signal to generate the first oscillation signal, and receive the second initial oscillation signal to generate the second oscillation signal.
[0018] In addition, it also includes: a fourth register group, connected to the oscillator, and used to configure the frequency of the first oscillation signal and the frequency of the second oscillation signal.
[0019] In addition, it also includes: a sixth register group connected to the path simulation circuit and used to configure the electrical parameters of the path simulation circuit.
[0020] Correspondingly, an embodiment of the present invention further provides a memory, comprising the above-mentioned clock generating circuit.
[0021] Correspondingly, an embodiment of the present invention also provides a clock duty cycle calibration method, including: an oscillation circuit generates a first oscillation signal and a second oscillation signal, the first oscillation signal and the second oscillation signal have the same frequency and opposite phase, and the first oscillation signal has an initial duty cycle; a comparison unit receives the first oscillation signal and the second oscillation signal, and compares the duty cycle of the first oscillation signal and / or the duty cycle of the second oscillation signal; a logic unit controls the oscillation circuit according to the output result of the comparison unit, so that the duty cycle of the first oscillation signal generated by the oscillation circuit is changed from the initial duty cycle to a preset duty cycle.
[0022] In addition, the comparison unit receives the first oscillation signal and the second oscillation signal, including: when the flip identification signal is at a low level, the comparison unit compares the duty cycle of the first oscillation signal; when the flip identification signal is at a high level, the comparison unit compares the duty cycle of the second oscillation signal.
[0023] In addition, the logic unit controls the oscillation circuit according to the output result of the comparison unit, including: the logic unit includes a counter, a first register group, and a second register group; when the flip identification signal is at a low level, the counter counts from M to N, when the counter is M, the corresponding duty cycle of the first oscillation signal is P%, when the counter is N, the corresponding duty cycle of the first oscillation signal is Q%, when the output result of the comparison unit changes from a low level to a high level, the counter value corresponding to the counter at this time is stored in the first register group; when the flip identification signal is at a high level, the counter counts from M to N, when the counter is M, the corresponding duty cycle of the second oscillation signal is Q%, when the counter is N, the corresponding duty cycle of the second oscillation signal is P%, when the output result of the comparison unit changes from a high level to a low level, the counter value corresponding to the counter at this time is stored in the second register group; wherein, M and N are both integers, M is less than N, P and Q are both positive integers, P is less than 50, and Q is greater than 50.
[0024] In addition, the logic unit controls the oscillation circuit according to the output result of the comparison unit, which also includes: the logic unit also includes an operation component and a third register group; the operation component performs addition, subtraction, multiplication and division operations on the outputs of the first register group and the second register group, and stores the obtained value L in the third register group; wherein L is an integer, and the L is greater than or equal to the M and less than or equal to the N.
[0025] In addition, the duty cycle of the first oscillation signal corresponding to L is the preset duty cycle.
[0026] Compared with the prior art, the technical solution provided by the embodiment of the present invention has the following advantages:
[0027] The embodiment of the present invention provides a clock generation circuit with superior structural performance, including an oscillating circuit for generating a differential first oscillating signal and a second oscillating signal; a comparing unit for comparing the duty cycle of the first oscillating signal and / or the duty cycle of the second oscillating signal to monitor whether the duty cycle of the first oscillating signal and / or the duty cycle of the second oscillating signal reaches a preset range; and also includes a logic unit connecting the comparing unit and the oscillating circuit, the logic unit controls the oscillating circuit based on the output structure of the comparing unit so that the duty cycle reaches the preset range. Therefore, the clock generation circuit in the embodiment of the present invention can generate a first oscillating signal and a second oscillating signal whose duty cycle meets the preset range and is stable, and the first oscillating signal and the second oscillating signal can be used as input signals for testing a memory, so as to improve the test accuracy of the memory; in addition, the clock generation circuit also has a duty cycle calibration function and a duty cycle monitoring function, so the memory with the clock generation circuit not only has a built-in self-test function, but can also be used to implement a DCA function and a DCM function. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0029] Figure 1 A functional block diagram of a clock generation circuit provided by an embodiment of the present invention;
[0030] Figure 2 A schematic diagram of the structure of a clock generating circuit provided by an embodiment of the present invention;
[0031] Figure 3 for Figure 1 A schematic diagram of a circuit structure of an oscillator in an oscillation circuit;
[0032] Figure 4 A schematic diagram of a storage system;
[0033] Figure 5 A schematic flow chart of a clock duty cycle calibration method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those skilled in the art that in the embodiments of the present invention, many technical details are provided to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can be implemented.
[0035] Figure 1 A functional block diagram of a clock generation circuit provided in one embodiment of the present invention, Figure 2 A schematic diagram of the structure of a clock generation circuit provided in one embodiment of the present invention.
[0036] refer to Figure 1 and Figure 2 In this embodiment, the clock generating circuit includes: an oscillation circuit 101, which is used to generate a first oscillation signal OSC+ and a second oscillation signal OSC-, the first oscillation signal OSC+ and the second oscillation signal OSC- have the same frequency and opposite phases; a comparison unit 102, which receives the first oscillation signal OSC+ and the second oscillation signal OSC-, and is used to compare the duty cycle of the first oscillation signal OSC+ and / or the duty cycle of the second oscillation signal OSC-; a logic unit 103, which is connected to the comparison unit 102 and the oscillation circuit 101, and is used to control the oscillation circuit 101 according to the output result of the comparison unit 102, so that the duty cycle reaches a preset range.
[0037] The clock generation circuit is built into the memory and can be used as a key component of the built-in self-test system (BIST) of the memory. The oscillation circuit generates a differential high-speed oscillation signal, that is, a high-frequency first oscillation signal and a second oscillation signal, and can test the characteristics of the high-speed input circuit, thereby solving the problem of poor accuracy of the test result caused by the low frequency of the input signal provided by the tester, and greatly reducing the dependence on the automatic test equipment (ATE), thereby reducing the test cost. In addition, the clock generation circuit can also realize the duty cycle calibration function and the duty cycle monitoring function of the memory.
[0038] The clock generating circuit provided in this embodiment will be described in detail below with reference to the accompanying drawings.
[0039] The first oscillation signal OSC+ and the second oscillation signal OSC- are differential clock signals. In addition, in the present embodiment, the first oscillation signal OSC+ and the second oscillation signal OSC- have high frequency characteristics, that is, the frequency of the first oscillation signal OSC+ and the frequency of the second oscillation signal OSC- are equivalent to the frequency of the clock signal required for the memory to perform read and write operations. The equivalent here can mean that the frequency is the same or that the frequency difference is within the test allowable range. For example, the frequency of the first oscillation signal OSC+ and the second oscillation signal OSC- can reach 3.2 GHz, 4.8 GHz or even 6.4 GHz.
[0040] Specifically, the oscillation circuit 101 includes an oscillator 111 for generating a first initial oscillation signal osc+ and a second initial oscillation signal osc-, and the first initial oscillation signal osc+ and the second initial oscillation signal osc- have the same frequency and opposite phase, that is, the first initial oscillation signal osc+ and the second initial oscillation signal osc- are differential signals.
[0041] Figure 3 Schematic diagram of a circuit structure of the oscillator 111 provided in this embodiment. More specifically, Figure 3 As shown, the oscillator 111 includes a first ring topology structure and a second ring topology structure electrically connected to each other, the first ring topology structure is composed of a plurality of first inverters 11 connected end to end, and propagates the oscillation signal at a first transmission speed, and the second ring topology structure is composed of a plurality of second inverters 12 connected end to end, and propagates the oscillation signal at a second transmission speed, and the second propagation speed is less than the first propagation speed.
[0042] The number of the first inverters 11 is an integer greater than or equal to 4, and the number of the second inverters 12 is an integer greater than or equal to 2. In addition, the second propagation speed may be greater than or equal to 0.5 times the first propagation speed.
[0043] The oscillator 111 may further include: a third ring topology structure, which is composed of a plurality of third inverters 13 connected end to end, propagating the oscillation signal at a third propagation speed, and the first ring topology structure is electrically connected to the third ring topology structure, and the third propagation speed is less than the first propagation speed. Specifically, the number of the third inverters 13 is an integer greater than or equal to 2, and the third propagation speed may be the same as the second propagation speed.
[0044] Compared with propagating the oscillation signal only through the first ring topology structure, since the second transmission speed of the second ring topology structure is lower than the first transmission speed of the first ring topology structure, the setting of the second ring topology structure can make the oscillation signal flip more times per unit time, thereby obtaining a high-speed first initial oscillation signal osc+ and a second initial oscillation signal osc-, and further obtaining a high-speed first oscillation signal OSC+ and a second oscillation signal OSC-.
[0045] In this embodiment, the oscillation circuit 101 may further include: a path simulation circuit 121, which is located between the oscillator 111 and the comparison unit 102, one end of which is connected to the output end of the oscillator 111, and the other end is connected to the input end of the comparison unit 102, and is used to simulate the circuit characteristics of the first path, and receive the first initial oscillation signal osc+ to generate the first oscillation signal OSC+, and receive the second initial oscillation signal osc- to generate the second oscillation signal OSC-.
[0046] The circuit characteristics include: one or any combination of the device resistance, device capacitance, parasitic resistance, parasitic capacitance, input and output impedance, driving capability, and noise environment of the first path. Specifically, the first path refers to the signal path of the clock signal transmitted from the controller to the output end of the high-speed differential input circuit of the memory. For ease of understanding and explanation, the following will be combined with Figure 3 The first path is described as follows:
[0047] Figure 4 A schematic diagram of a storage system. Figure 4 The storage system includes a controller 10 and a plurality of memories 20, each memory 20 and the controller 10 are coupled to a command / address bus 21, a data bus 22 and a clock bus 23. For example, the memory 20 may be LPDDR4 or LPDDR5 or LPDDR6, the memory 20 receives a command / address signal provided by the controller 10 through the command / address bus 21, and indicates the command / address signal with CMD / ADD; transmits a data signal between the controller 10 and the memory 20 through the data bus 22, and indicates the data signal with DQ; transmits a plurality of clock signals between the controller 10 and the memory 20 through the clock bus 23, and the clock signal may include a system clock signal, a read / write data clock signal, a differential system clock signal indicated by CK_t and CK_c, and a differential read / write data clock signal indicated by WCK_t and WCK_c.
[0048] Specifically, the controller 10 is coupled to the high-speed differential input circuit of the memory 20. The high-speed differential input circuit 24 is used to receive an external clock signal and generate an internal clock signal, which can be used as a differential input signal for completing data read and write operations. More specifically, the high-speed differential input circuit 24 receives CK_t, CK_c, WCK_t and WCK_c to generate an internal clock signal. The high-speed differential input circuit 24 may include an input buffer (IB, Input Buffer).
[0049] The command / address bus 21, the data bus 22, and the clock bus 23 all have resistance and may also generate parasitic resistance or parasitic capacitance. In addition, the high-speed differential input circuit 24 itself also has circuit characteristics such as resistance or capacitance. The path simulation circuit 121 is provided in the oscillation circuit 101 to simulate these circuit characteristics. In this embodiment, by providing the path simulation circuit 121 in the oscillation circuit, the path simulation circuit 121 can not only amplify and output the first initial oscillation signal osc+ and the second initial oscillation signal osc-, but also simulate the circuit characteristics of the output end of the controller 10 to the high-speed differential input circuit 24, so that the first oscillation signal OSC+ and the second oscillation signal OSC- are more in line with the high-speed clock signals of the actual application scenario of the memory, thereby making the test results more accurate and effective.
[0050] like Figure 2 As shown, the path simulation circuit 121 may include an analog buffer 1 and an analog on-die termination resistor (ODT, OnDie Termination) 2 .
[0051] Generally, when a high-speed tester is used to provide an input signal, in order to ensure the stability of the input signal, the level of the input signal is usually a fixed value and cannot be changed at will, which is different from the actual application of the memory, so it will introduce test deviation and affect the accuracy of the test result. In this embodiment, the first oscillation signal OSC+ and the second oscillation signal OSC- are used as input signals, and the level of the first oscillation signal OSC+ and the level of the second oscillation signal OSC- can be adjusted through the path simulation circuit 121, so that the test result is more accurate.
[0052] It should be noted that, in other embodiments, the oscillation circuit may also only include an oscillator, that is, the oscillator directly generates the first oscillation signal OSC+ and the second oscillation signal OSC-.
[0053] In this embodiment, the oscillation circuit 101 may further include: a fourth register group 131, connected to the oscillator 111, and used to configure the frequencies of the first oscillation signal OSC+ and the second oscillation signal OSC-. Specifically, the fourth register group 131 configures the frequency of the first oscillation signal OSC+ by configuring the frequency of the first initial oscillation signal osc+, and configures the frequency of the second oscillation signal OSC- by configuring the frequency of the second initial oscillation signal osc-.
[0054] The fourth register group 131 may be a mode register (MR), which may be integrated into a mode register required by the memory to implement read and write operations, or may be a functional module independent of the mode register of the memory.
[0055] The oscillation circuit 101 may further include: a sixth register group 141 connected to the path simulation circuit 121, and configured to configure electrical parameters of the path simulation circuit 121. Specifically, the electrical parameters of the path simulation circuit 121 are adjusted through the sixth register group 141 to adjust the circuit characteristics of the first path simulated by the path simulation circuit 121.
[0056] The sixth register group 141 may be a mode register, which may be integrated into a mode register required by the memory to implement read and write operation functions, or may be a functional module independent of the mode register of the memory.
[0057] For example, the output state of the selection path analog circuit 121 is set through the sixth register group 141. Taking LPDDR4 as an example, VOH=(1 / 3)*VDDQ or VOH=(1 / 2.5)*VDDQ, PDDS=40ohm, ODT=40ohm, where VOH is the output drive voltage, PDDS (Pull Down Drive Strength) is the input pull-down drive strength, and ODT (on-die termination) is the on-chip termination resistance.
[0058] Since the first oscillation signal OSC+ and the second oscillation signal OSC- are differential signals, the sum of the duty cycle of the first oscillation signal OSC+ and the duty cycle of the second oscillation signal OSC- is 100%, and the duty cycle of the differential first oscillation signal OSC+ and the second oscillation signal OSC- is detected by setting the comparison unit 102. Specifically, the comparison unit 102 compares the duty cycle of the first oscillation signal OSC+ and / or the duty cycle of the second oscillation signal OSC-, including at least one of the following three situations:
[0059] The comparison unit 102 compares the duty cycle of the first oscillation signal OSC+. Specifically, the comparison unit 102 compares whether the duty cycle of the first oscillation signal OSC+ is within a preset range, for example, the preset range may be 48% to 52%. If the comparison unit 102 compares the duty cycle of the first oscillation signal OSC+ and finds that it is within the preset range, it indicates that the duty cycle of the second oscillation signal OSC- is also within the preset range; if the comparison unit 102 compares the duty cycle of the first oscillation signal OSC+ and finds that it is not within the preset range, it indicates that the duty cycle of the second oscillation signal OSC- is also not within the preset range.
[0060] The comparison unit 102 compares the duty cycle of the second oscillation signal OSC-. Specifically, the comparison unit 102 compares whether the duty cycle of the second oscillation signal OSC- is within a preset range, which can be 48% to 52%. If the comparison unit 102 compares the duty cycle of the second oscillation signal OSC- and finds that it is within the preset range, it means that the duty cycle of the first oscillation signal OSC+ is also within the preset range; if the comparison unit 102 compares the duty cycle of the second oscillation signal OSC- and finds that it is not within the preset range, it means that the duty cycle of the first oscillation signal OSC+ is also not within the preset range.
[0061] The comparison unit 102 compares the duty cycle of the first oscillation signal OSC+ with the duty cycle of the second oscillation signal OSC-. Specifically, the comparison unit 102 obtains whether the difference between the duty cycle of the first oscillation signal OSC+ and the duty cycle of the second oscillation signal OSC- is within a preset difference range, which can be -4% to 4%; if the comparison unit 102 compares the difference to be within the preset difference range, it means that the duty cycles of the first oscillation signal OSC+ and the second oscillation signal OSC- are within the preset range, otherwise, the duty cycles of the first oscillation signal OSC+ and the second oscillation signal OSC- do not reach the preset range.
[0062] It should be noted that the numerical ranges of the above-mentioned preset ranges and preset difference ranges are exemplary descriptions. This embodiment does not limit the preset ranges and preset difference ranges. The preset ranges and preset difference ranges can be reasonably set according to the actual performance requirements of the memory.
[0063] In this embodiment, the comparison unit 102 includes: an integration unit 112, which has a first input terminal 3 and a second input terminal 4, the first input terminal 3 receives one of the first oscillation signal OSC+ or the second oscillation signal OSC-, and the second input terminal 4 receives the other of the first oscillation signal OSC+ or the second oscillation signal OSC-; a comparator 122, connected to the output terminal of the integration unit 112.
[0064] Specifically, the integration unit 112 includes two integration circuits, and the first input terminal 3 is used as the input terminal of one integration circuit, and the second input terminal 4 is used as the input terminal of the other integration circuit. The comparator 122 is used to compare the outputs of the two integration circuits and output a high level or a low level.
[0065] More specifically, the comparison unit 102 uses two integration circuits to perform integration operations on the input first oscillation signal OSC+ and the second oscillation signal OSC−, and the integration results are input into the comparator 122, and the comparator 122 outputs the comparison result.
[0066] Taking the first oscillation signal OSC+ as the positive end (duty+) and the second oscillation signal OSC- as the negative end (duty-) as an example, in one example, the output of the comparator 122 is a high level, indicating that the duty cycle of the first oscillation signal OSC+ is greater than the duty cycle of the second oscillation signal OSC-; the output of the comparator 122 is a low level, indicating that the duty cycle of the first oscillation signal OSC+ is less than the duty cycle of the second oscillation signal OSC-.
[0067] It should be noted that the above-mentioned correspondence between the output result of the comparison unit 102 and the duty cycle of the first oscillation signal OSC+ and the duty cycle of the second oscillation signal OSC- is only an example. This embodiment does not limit the correspondence between the high level and the low level and the duty cycle of the first oscillation signal OSC+ and the duty cycle of the second oscillation signal OSC-, as long as different output results correspond to different correspondences between the duty cycle of the first oscillation signal OSC+ and the duty cycle of the second oscillation signal OSC-.
[0068] like Figure 2 As shown, the output result of the comparison unit 102 can be sampled and output by the sampling clock clk1. In this embodiment, the comparison unit 102 is driven by a sampling clock clk1, and the frequency of the sampling clock clk1 is lower than the frequency of the first oscillation signal OSC+ and / or the frequency of the second oscillation signal OSC-. The faster the frequency of the sampling clock clk1, the greater the sampling error; the slower the frequency of the sampling clock clk1, the smaller the sampling error, but the longer the test time. Therefore, the optimal frequency of the sampling clock clk1 can be comprehensively selected according to the sampling error and the test time.
[0069] In this embodiment, the clock generation circuit further includes: a frequency divider 104, which receives an external clock signal CLK and generates a sampling clock clk1. The external clock signal CLK can be provided by a tester or can be a main clock signal of a memory.
[0070] In addition, it can be seen from the above analysis that if the frequency of the sampling clock clk1 is adjustable, different frequencies of the sampling clock clk1 can be selected according to actual conditions. For this reason, in this embodiment, the clock generation circuit can also include: a fifth register group 105, connected to the frequency divider 104, for configuring the frequency of the sampling clock. The fifth register group 105 can be a mode register. For detailed description of the fifth register group 105, reference can be made to the above description of the fourth register group 131 and the sixth register group 141.
[0071] Since the inherent characteristics of the comparison unit 102 may cause input deviation, in order to eliminate the error caused by the free input deviation of the comparison unit 102 to the test result, in this embodiment, the comparison unit 102 can also be configured so that the first input terminal and the second input terminal are interchangeable. Specifically, the comparison unit 102 is configured as follows:
[0072] The first input end of the integration unit 112 receives the first oscillation signal OSC+ when the flip flag signal is at a low level, and receives the second oscillation signal OSC- when the flip flag signal is at a high level; the second input end of the integration unit 112 receives the second oscillation signal OSC- when the flip flag signal is at a low level, and receives the first oscillation signal OSC+ when the flip flag signal is at a high level. The memory has a mode register, and the flip flag signal can be provided by the mode register. For example, in LPDDR4 or LPDDR5 or LPDDR6, it can be DCM MR OP[1]. DCM MR OP[1]=0 indicates that the flip flag signal is at a low level, and DCM MR OP[1]=1 indicates that the flip flag signal is at a high level.
[0073] The logic unit 103 includes: a counter 113, which is used to adjust the duty cycle of the first oscillation signal OSC+ and / or the second oscillation signal OSC-; a first register group 123, which stores the first value of the counter 113 according to the output of the comparator 122 when the flip identification signal is at a low level; and a second register group 133, which stores the second value of the counter 113 according to the output of the comparator 122 when the flip identification signal is at a high level.
[0074] Specifically, the function of the counter 113 includes: adjusting the duty cycle of the first oscillation signal OSC+ and the duty cycle of the second oscillation signal OSC- output by the oscillation circuit 101, and the duty cycle of the first oscillation signal OSC+ and the duty cycle of the second oscillation signal OSC- change monotonically, for example, the duty cycle changes from the minimum to the maximum or from the maximum to the minimum in one counting cycle. In one counting cycle, the output result of the comparator 122 will have and only have one reversal point, and the value of the counter 113 corresponding to the reversal point is the setting of the duty cycle of the first oscillation signal OSC+ and the second oscillation signal OSC- output by the oscillation circuit 101 that is closest to the preset range, and this value is stored in the first register group 123 or the second register group 133 as the value of the counter.
[0075] More specifically, when the flip flag signal is at a low level, the first value of the counter 113 is stored according to the output of the comparator 122, and the first value is stored in the first register group 123; when the flip flag signal is at a high level, the second value of the counter 113 is stored according to the output of the comparator 122, and the second value is stored in the second register group 133. For ease of understanding, the working principle of the logic unit 103 will be described in detail below:
[0076] When the flip identification signal is at a low level, the first input terminal of the integration unit 112 receives the first oscillation signal OSC+, and the second input terminal receives the second oscillation signal OSC-; the counter 113 starts counting, for example, starting from 0 and counting to 31 in one counting cycle, and at the same time, the duty cycle of the first oscillation signal OSC+ and the second oscillation signal OSC- output by the oscillation circuit 101 also changes from the minimum to the maximum (for example, from 40% to 60%) or from the maximum to the minimum; in this way, within one counting cycle (for example, from 0 to 31), the comparator 122 will have and only have one reversal point, and the value of the counter 113 corresponding to the reversal point is the first value, and the first value is the duty cycle of the oscillation signal output by the oscillator 111 via the path simulation circuit 121. The setting is closest to the preset range, for example, it can be a setting with a duty cycle closest to 50%, and the first value is stored in the first register group 123.
[0077] When the flip identification signal is at a high level, the first input terminal of the integration unit 112 receives the second oscillation signal OSC-, and the second input terminal receives the first oscillation signal OSC+, that is, the input terminals of the comparison unit 102 are interchanged, and the counter 113 enters a new counting cycle, for example, starting from 0 and counting to 31. Similarly, the second value of the counter 113 corresponding to the output reversal point of the comparator 122 is stored in the second register group 133.
[0078] It should be noted that the above counting cycle from 0 to 31 is only an example. The counting method of the counter 113 is not limited in this embodiment. In addition to being an addition counter, the counter 113 can also be a subtraction counter. It can be either a sequential increasing or decreasing counting method or a step-by-step increasing or decreasing counting method, so as to ensure that the counter 113 changes monotonically within a single counting cycle.
[0079] The first input terminal and the second input terminal of the comparison unit 102 are interchanged, and the adverse effects caused by the input deviation of the comparison unit 102 itself can be eliminated by counting twice to further improve the accuracy of the test result.
[0080] In addition, the logic unit 103 may also include: an operation component 143, connected to the first register group 123 and the second register group 133, used to perform addition, subtraction, multiplication and division operations on the outputs of the first register group 123 and the second register group 133; a third register group 153, connected to the operation component 143, used to store the output results of the operation component 143.
[0081] Specifically, the output of the first register group 123 refers to the first value stored in the first register group 123, and the output of the second register group 133 refers to the second value stored in the second register group 133. In this embodiment, the operation component 143 adds the first value and the second value and divides them by 2 to obtain an average value, and the average value is used as the output result of the operation component 143, and the average value is stored in the third register group 153. Since the average value has eliminated the input deviation of the comparison unit 102 itself, the average value is the setting of the duty cycle of the first oscillation signal OSC+ and the second oscillation signal OSC- output by the oscillation circuit 101 closest to the preset range, for example, the duty cycle of the first oscillation signal OSC+ and the second oscillation signal OSC- is closest to 50%.
[0082] It can be understood that the average value can be an integer obtained by adding the first value and the second value and dividing it by 2 and rounding up, or can be an integer obtained by adding the first value and the second value and dividing it by 2 and rounding down.
[0083] It should be noted that, in this embodiment, the average of the first value and the second value is taken as an example. In other embodiments, other calculation methods may be used to calculate the first value and the second value.
[0084] The first register group 123 , the second register group 133 , and the third register group 153 may all be mode registers.
[0085] In this embodiment, the counter 113 is driven by a counter clock whose frequency is lower than the frequency of the first oscillation signal OSC+ and / or the frequency of the second oscillation signal OSC-. The frequency of the counter clock is adjustable and is reasonably selected according to the speed of the oscillation circuit 101.
[0086] In addition, the frequency of the sampling clock can be the same as the frequency of the calculator clock. The frequency divider can also be used to receive an external clock signal to generate the sampling clock and the calculator clock; similarly, the fifth register group can also be used to configure the frequency of the calculator clock.
[0087] The value stored in the third register group 153 corresponds to the setting of the oscillation circuit 101. At this time, the duty cycle selection of the oscillation circuit 101 is switched from the counter 113 to the third register group 153, so that the oscillation circuit 101 fixedly outputs the first oscillation signal OSC+ and the second oscillation signal OSC- with the optimal duty cycle. It can be understood that during the period when the oscillation circuit 101 fixedly outputs the first oscillation signal OSC+ and the second oscillation signal OSC- with the optimal duty cycle, the comparison unit 102 can continuously compare the duty cycle of the first oscillation signal OSC+ and / or the duty cycle of the second oscillation signal OSC-. If the duty cycle of the first oscillation signal OSC+ and the vacuum ratio of the second oscillation signal OSC- deviate from the preset range, this problem can be detected in time.
[0088] The clock generating circuit provided in this embodiment can generate a first oscillation signal and a second oscillation signal with high speed and adjustable duty cycle inside the memory through an oscillation circuit 101, a comparison unit 102 and a logic unit 103, and the first oscillation signal and the second oscillation signal are differential signals. The first oscillation signal and the second oscillation signal meet the requirements of high-frequency working signals of the memory, and can therefore be used as test input signals for testing the memory, so that the memory can realize a built-in self-test function without using an additional test machine to provide a test input signal, and at the same time solves the problem that it is difficult for the test machine to provide a high-frequency test input signal.
[0089] In addition, in this embodiment, the comparison unit 102 detects the output of the oscillation circuit 101, and the logic unit 103 controls the oscillation circuit 101 based on the output result of the comparison unit 102, so as to ensure that the duty cycle of the first oscillation signal and the second oscillation signal can be stabilized within a preset range, thereby avoiding the adverse effects of the duty cycle deviation on the test accuracy, and improving the test accuracy of the memory using the first oscillation signal and the second oscillation signal. For example, the duty cycle of the first oscillation signal and the duty cycle of the second oscillation signal can be accurately controlled at 50%.
[0090] In addition, since the oscillation circuit 101 also includes a path simulation circuit 121, the path simulation circuit 121 can not only amplify and output the high-speed oscillation signal, but also simulate the signal characteristics from the port controller to the output end of the high-speed differential input circuit, so that the first oscillation signal and the second oscillation signal are more in line with the actual application of the memory, thereby further improving the test accuracy of the first oscillation signal and the second oscillation signal.
[0091] At the same time, the clock generating circuit provided in this embodiment also has a duty cycle monitoring function and a duty cycle calibration function.
[0092] Correspondingly, an embodiment of the present invention further provides a memory, comprising the clock generating circuit provided in the above embodiment. Specifically, the memory can be a DRAM, SRAM, MRAM, FeRAM, PCRAM, NAND, NOR or other memory.
[0093] From the above analysis, it can be seen that the memory has a built-in self-test function, so it can generate a high-speed first oscillation signal and a second oscillation signal inside the memory that can be used for testing, and the duty cycle of the first oscillation signal and the second oscillation signal can be maintained within a preset range, so there is no need to use an additional test machine to provide a test signal, which is beneficial to improving the test accuracy of the memory.
[0094] Correspondingly, an embodiment of the present invention also provides a clock duty cycle calibration method. Figure 5 The flowchart of the clock duty cycle calibration method provided by an embodiment of the present invention is shown in FIG. The clock duty cycle calibration method in the embodiment of the present invention will be described in detail below in conjunction with the accompanying drawings. It should be noted that the clock duty cycle calibration method can be performed using the clock generation circuit provided by the above embodiment.
[0095] refer to Figure 5 In this embodiment, the clock duty cycle calibration method includes the following steps:
[0096] Step S1 : An oscillation circuit generates a first oscillation signal and a second oscillation signal. The first oscillation signal and the second oscillation signal have the same frequency and opposite phases. The first oscillation signal has an initial duty cycle.
[0097] Specifically, the initial duty cycle may be within a preset range, such as 48% to 52%; the initial duty cycle may also not reach the preset range, such as 45%. In addition, the sum of the duty cycle of the first oscillation signal and the duty cycle of the second oscillation signal is 100%.
[0098] Step S2: The comparison unit receives the first oscillation signal and the second oscillation signal, and compares the duty cycle of the first oscillation signal and / or the duty cycle of the second oscillation signal.
[0099] Specifically, when the flip flag signal is at a low level, the comparison unit compares the duty cycle of the first oscillation signal, for example, the comparison unit can determine whether the duty cycle of the first oscillation signal is equal to a preset duty cycle, if it is less than the preset duty cycle, the comparison unit outputs a low level, if it is greater than or equal to the preset duty cycle, the comparison unit outputs a high level; when the flip flag signal is at a high level, the comparison unit compares the duty cycle of the second oscillation signal, for example, the comparison unit can determine whether the duty cycle of the second oscillation signal is equal to the preset duty cycle, if it is less than the preset duty cycle, the comparison unit outputs a low level, if it is greater than or equal to the preset duty cycle, the comparison unit outputs a high level. The preset duty cycle can be, for example, 50%, and the output of the comparison unit does not limit the correspondence between the high level and the low level and the duty cycle of the first oscillation signal OSC+ and the duty cycle of the second oscillation signal OSC-, as long as different output results correspond to different correspondences between the duty cycles of the first oscillation signal OSC+ and the second oscillation signal OSC-.
[0100] The output result of the comparison unit can also represent the difference between the duty cycle of the first oscillation signal and the duty cycle of the second oscillation signal. For example, the output result of the comparison unit is a high level, indicating that the duty cycle of the first oscillation signal is greater than the duty cycle of the second oscillation signal; the output result of the comparison unit is a low level, indicating that the duty cycle of the first oscillation signal is less than the duty cycle of the second oscillation signal. The sum of the duty cycle of the first oscillation signal and the duty cycle of the second oscillation signal is 100%. For example, when the duty cycle of the first oscillation signal changes from 49% to 51%, the output result of the comparison unit changes from a low level to a high level.
[0101] The comparison unit includes: an integration unit having a first input terminal and a second input terminal, the first input terminal receiving one of the first oscillation signal or the second oscillation signal, and the second input terminal receiving the second oscillation signal or the other of the first oscillation signal; a comparator connected to the output terminal of the integration unit.
[0102] When the flip identification signal is at a low level, the first input terminal receives the first oscillation signal and the second input terminal receives the second oscillation signal, and the comparator compares the duty cycle of the first oscillation signal and has a corresponding output; the comparator compares the duty cycle of the first oscillation signal, which can be: comparing the duty cycle of the first oscillation signal with the duty cycle of the second oscillation signal, or comparing the duty cycle of the first oscillation signal with a preset duty cycle.
[0103] When the flip identification signal is at a high level, the first input terminal receives the second oscillation signal and the second input terminal receives the first oscillation signal, and the comparator compares the duty cycle of the second oscillation signal and has a corresponding output; the comparator compares the duty cycle of the second oscillation signal, which can be: comparing the duty cycle of the second oscillation signal with the duty cycle of the first oscillation signal, or comparing the duty cycle of the second oscillation signal with a preset duty cycle.
[0104] Step S3: The logic unit controls the oscillation circuit according to the output result of the comparison unit, so that the duty cycle of the first oscillation signal generated by the oscillation circuit changes from the initial duty cycle to the preset duty cycle.
[0105] Specifically, the logic unit includes a counter, a first register group, and a second register group. The counter controls the oscillation circuit to adjust the duty cycle of the first oscillation signal and the duty cycle of the second oscillation signal.
[0106] When the flip identification signal is at a low level, the counter counts from M to N. When the counter is M, the corresponding duty cycle of the first oscillation signal is P%, and when the counter is N, the corresponding duty cycle of the first oscillation signal is Q%. When the output result of the comparison unit changes from a low level to a high level, the counter value corresponding to the counter at this time is stored in the first register group. For example, M can be 0, N can be 31, P can be 45, Q can be 55, and the initial duty cycle can be 45%, or other values.
[0107] When the flip identification signal is at a high level, the counter counts from M to N. When the counter is M, the corresponding duty cycle of the second oscillation signal is Q%, and when the counter is N, the corresponding duty cycle of the second oscillation signal is P%. When the output result of the comparison unit changes from a high level to a low level, the counter value corresponding to the counter at this time is stored in the second register group. For example, M can be 0, N can be 31, P can be 45, Q can be 55, and the initial duty cycle can be 45%, or other values.
[0108] Wherein, M and N are both integers, M is less than N, P and Q are both positive integers, P is less than 50, and Q is greater than 50. The initial duty cycle can be, for example, any value between 1% and 99%, and the preset duty cycle can be, for example, any value between 48% and 52%, and even the preset duty cycle can be equal to 50%.
[0109] More specifically, when the flip flag signal is at a low level, the first input terminal receives the first oscillation signal and the second input terminal receives the second oscillation signal, and the counter counts from 0 to 31 in one counting cycle. When the output result of the comparison unit is at a low level, it indicates that the duty cycle of the first oscillation signal is less than the duty cycle of the second oscillation signal; when the output result of the comparison unit is at a high level, it indicates that the duty cycle of the first oscillation signal is greater than the duty cycle of the second oscillation signal. Therefore, the output result of the comparison unit jumps from a low level to a high level, corresponding to a reversal point, and the counter value of the counter corresponding to the reversal point is stored in the first register group as the first value.
[0110] When the flip identification signal is at a high level, the first input terminal receives the second oscillation signal and the second input terminal receives the first oscillation signal, and the counter counts from 0 to 31 in one counting cycle. When the output result of the comparison unit is at a high level, it means that the duty cycle of the first oscillation signal is less than the duty cycle of the second oscillation signal; when the output result of the comparison unit is at a low level, it means that the duty cycle of the first oscillation signal is greater than the duty cycle of the second oscillation signal. Therefore, the output result of the comparison unit jumps from a high level to a low level, corresponding to a reversal point, and the counter value of the counter corresponding to the reversal point is stored in the second register group as the second value.
[0111] It should be noted that when the flip identification signal is at a low level, the counter counts from 0 to 31, and the duty cycle of the first oscillation signal changes monotonically, for example, it can be a preset step-by-step increase, such as when the counter value of the counter increases by 1, the duty cycle of the first oscillation signal increases by ((55-45) / 32)%. Similarly, when the flip identification signal is at a high level, the counter counts from 0 to 31, and the duty cycle of the second oscillation signal changes monotonically, for example, it can be a preset step-by-step increase, such as when the counter value of the counter increases by 1, the duty cycle of the second oscillation signal increases by ((55-45) / 32)%.
[0112] The logic unit also includes an operation component and a third register group; the operation component performs addition, subtraction, multiplication and division operations on the outputs of the first register group and the second register group, and stores the obtained value L in the third register group; wherein L is a positive integer, L is greater than or equal to M and less than or equal to N.
[0113] In this embodiment, the value L is the sum of the first value and the second value divided by 2, that is, the value L is the average of the first value and the second value, and the value L is the setting for the first oscillation signal and the second oscillation signal output by the corresponding oscillation circuit to reach the preset range. In other words, the duty cycle of the first oscillation signal corresponding to the value L is the preset duty cycle, and the preset duty cycle can be 48% to 52%, for example, 50%.
[0114] After obtaining the value L, the oscillation circuit is no longer controlled by the counter, but the value L is used as the setting of the oscillation circuit so that the oscillation circuit outputs a first oscillation signal with a preset duty cycle, and the corresponding second oscillation signal is also an oscillation signal with a duty cycle that meets the requirements.
[0115] The technical solution of the clock duty cycle calibration method provided in this embodiment can obtain high-speed and high-quality first oscillation signal and second oscillation signal, and the duty cycle of the first oscillation signal and the duty cycle of the second oscillation signal can be stabilized at a preset duty cycle.
[0116] Those skilled in the art will appreciate that the above embodiments are specific examples of the present invention, and in practical applications, various changes may be made to the embodiments in form and detail without departing from the spirit and scope of the present invention. Any person skilled in the art may make changes and modifications without departing from the spirit and scope of the present invention, and therefore the scope of protection of the present invention shall be subject to the scope defined in the claims.
Claims
1. A clock generating circuit, It is characterized in that include: An oscillation circuit, configured to generate a first oscillation signal and a second oscillation signal, wherein the first oscillation signal and the second oscillation signal have the same frequency and opposite phases; a comparing unit, receiving the first oscillation signal and the second oscillation signal, and used for comparing a duty cycle of the first oscillation signal and / or a duty cycle of the second oscillation signal; a logic unit connected to the comparison unit and the oscillation circuit, and configured to control the oscillation circuit according to an output result of the comparison unit so that the duty cycle reaches a preset range; Wherein, the comparison unit comprises: an integrating unit having a first input terminal and a second input terminal, the first input terminal receiving one of the first oscillating signal or the second oscillating signal, the second input terminal receiving the other of the second oscillating signal or the first oscillating signal; A comparator connected to the output end of the integration unit; The integration unit is configured as follows: The first input end of the integration unit receives the first oscillation signal when a flip flag signal is at a low level, and receives the second oscillation signal when the flip flag signal is at a high level; The second input end of the integration unit receives the second oscillation signal when the flip flag signal is at a low level, and receives the first oscillation signal when the flip flag signal is at a high level; The logic unit comprises: a counter, used to adjust the duty cycle of the first oscillation signal and / or the duty cycle of the second oscillation signal; a first register group, storing a first value of the counter according to the output of the comparator when the flip identification signal is at a low level; The second register group stores the second value of the counter according to the output of the comparator when the flip identification signal is at a high level.
2. The clock generating circuit according to claim 1, It is characterized in that The logic unit also includes: an operation component, connected to the first register group and the second register group, and used for performing addition, subtraction, multiplication and division operations on outputs of the first register group and the second register group; The third register group is connected to the computing component and is used to store the output result of the computing component.
3. The clock generating circuit according to claim 2, It is characterized in that The comparison unit is driven by a sampling clock, and the frequency of the sampling clock is lower than the frequency of the first oscillation signal and / or the second oscillation signal.
4. The clock generating circuit according to claim 3, It is characterized in that The counter is driven by a counter clock, the frequency of which is lower than the frequency of the first oscillation signal and / or the frequency of the second oscillation signal.
5. The clock generating circuit according to claim 4, It is characterized in that The frequency of the sampling clock is the same as the frequency of the calculator clock.
6. The clock generating circuit according to claim 5, It is characterized in that Also includes: The frequency divider receives an external clock signal and generates the sampling clock and the calculator clock.
7. The clock generating circuit according to claim 6, It is characterized in that Also includes: A fifth register group is connected to the frequency divider and is used to configure the frequencies of the sampling clock and the calculator clock.
8. The clock generating circuit according to claim 1, It is characterized in that The oscillator circuit comprises: An oscillator, configured to generate a first initial oscillation signal and a second initial oscillation signal, wherein the first initial oscillation signal and the second initial oscillation signal have the same frequency and opposite phases; A path simulation circuit is located between the oscillator and the comparison unit, one end of which is connected to the output end of the oscillator and the other end of which is connected to the input end of the comparison unit, and is used to simulate the circuit characteristics of the first path, receive the first initial oscillation signal to generate the first oscillation signal, and receive the second initial oscillation signal to generate the second oscillation signal.
9. The clock generating circuit according to claim 8, It is characterized in that Also includes: A fourth register group is connected to the oscillator and is used to configure the frequency of the first oscillation signal and the frequency of the second oscillation signal.
10. The clock generating circuit according to claim 9, It is characterized in that Also includes: A sixth register group is connected to the path simulation circuit and is used to configure electrical parameters of the path simulation circuit.
11. A memory, It is characterized in that include: A clock generating circuit as claimed in any one of claims 1 to 10.
12. A clock duty cycle calibration method, It is characterized in that include: The oscillation circuit generates a first oscillation signal and a second oscillation signal, wherein the first oscillation signal has the same frequency and opposite phase to the second oscillation signal, and the first oscillation signal has an initial duty cycle; The comparison unit receives the first oscillation signal and the second oscillation signal, and compares the duty cycle of the first oscillation signal and / or the duty cycle of the second oscillation signal; The logic unit controls the oscillation circuit according to the output result of the comparison unit, so that the duty cycle of the first oscillation signal generated by the oscillation circuit changes from the initial duty cycle to a preset duty cycle; The comparing unit receiving the first oscillation signal and the second oscillation signal comprises: When the flip flag signal is at a low level, the comparison unit compares the duty cycle of the first oscillation signal; When the flip flag signal is at a high level, the comparison unit compares the duty cycle of the second oscillation signal; The logic unit controls the oscillation circuit according to the output result of the comparison unit, including: The logic unit includes a counter, a first register group, and a second register group; When the flip flag signal is at a low level, the counter counts from M to N, when the counter is M, the corresponding duty cycle of the first oscillation signal is P%, when the counter is N, the corresponding duty cycle of the first oscillation signal is Q%, and when the output result of the comparison unit changes from a low level to a high level, the counter value corresponding to the counter at this time is stored in the first register group; When the flip flag signal is at a high level, the counter counts from M to N, when the counter is M, the corresponding duty cycle of the second oscillation signal is Q%, when the counter is N, the corresponding duty cycle of the second oscillation signal is P%, and when the output result of the comparison unit changes from a high level to a low level, the counter value corresponding to the counter at this time is stored in the second register group; Among them, M and N are both integers, M is less than N, P and Q are both positive integers, P is less than 50, and Q is greater than 50.
13. The clock duty cycle calibration method according to claim 12, It is characterized in that The logic unit controls the oscillation circuit according to the output result of the comparison unit and further includes: The logic unit also includes an operation component and a third register group; The computing component performs addition, subtraction, multiplication and division operations on the outputs of the first register group and the second register group, and stores the obtained value L into the third register group; Wherein, L is an integer, and L is greater than or equal to M and less than or equal to N.
14. The clock duty cycle calibration method according to claim 13, It is characterized in that The duty cycle of the first oscillation signal corresponding to L is the preset duty cycle.
