Clock generation unit with frequency calibration function and related electronic system
By combining the voltage-controlled oscillator and frequency multiplication module in the clock generation unit, a high-frequency synchronous clock with high stability and high accuracy in a simple architecture is achieved, and the problems of clock stability and accuracy in the prior art are solved. And reduce the EMI frequency to ensure the accuracy of the clock in different modes.
Patent Information
- Application Number
- CN202011180591.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-29
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2040-10-29
AI Technical Summary
The prior art is difficult to generate high-frequency synchronization clocks with high stability and high accuracy on a simple architecture, especially in power-down or calibration modes, and it is difficult to avoid EMI frequency, resulting in electromagnetic interference.
Design a clock generation unit with frequency calibration function, including a voltage-controlled oscillator and a frequency multiplication module, compare it with the host clock through the calibration module, adjust the voltage-controlled oscillator clock, and generate a synchronous clock with a multiple of the target value through the frequency multiplication module. , fine adjustments are made in combination with pulse counter and frequency control logic to ensure the stability and accuracy of the clock.
It realizes high-frequency synchronous clocks with high stability and high accuracy in a simple architecture, reduces EMI frequency, ensures that the clock can provide accurate clock signals in different modes, and reduces electromagnetic interference.
Smart Images

Figure CN114430272B_ABST
Abstract
Description
[Technical field]
[0001] The present invention belongs to the technical field of electronic devices, and in particular relates to a clock generating unit with a frequency calibration function and an electronic system using the clock generating unit. [Background technology]
[0002] In various electronic systems, in order to control the operation of various electronic devices such as microprocessors, calculators, memories, etc. and to enable them to communicate with each other, an accurate synchronous clock signal must be generated as a time reference. However, as electronic devices become more and more complex and the operating frequency range becomes wider and wider, it is becoming increasingly difficult to provide accurate synchronous clocks to all circuits. Therefore, it is necessary to generate a high-frequency synchronous clock with high stability and high accuracy on a simple architecture to solve the above technical problems in the prior art. [Summary of the invention]
[0003] In view of the above-mentioned shortcomings of the prior art, an object of the present invention is to provide a clock generating unit with a frequency calibration function and an electronic system using the clock generating unit, so as to solve the problem in the prior art that it is difficult to provide how to generate a high-frequency synchronous clock with high stability and high accuracy on a simple architecture.
[0004] Secondly, another object of the present invention is to provide a clock generating unit with a frequency calibration function and an electronic system using the clock generating unit, which can provide a high-frequency synchronous clock with high stability and high accuracy at any time, even in a power down mode or a calibration mode.
[0005] Furthermore, another object of the present invention is to provide a clock generating unit with a frequency calibration function and an electronic system using the clock generating unit, which can finely adjust the frequency of a high-frequency synchronous clock, thereby avoiding specific EMI frequencies and reducing EMI (Electromagnetic Interference) phenomena.
[0006] To achieve the above-mentioned purpose and other related purposes, the present invention provides a clock generating unit with a frequency calibration function, which is arranged in a slave device, and the slave device is subordinate to a host, and is characterized in that it includes a voltage controlled oscillator and a frequency multiplication module. The frequency multiplication module receives the voltage controlled oscillator clock generated by the voltage controlled oscillator, and includes: a digital control oscillator generates a synchronous clock whose frequency is a multiple of a target value of the frequency of the voltage controlled oscillator clock. The slave device transmits data with the host according to the synchronous clock.
[0007] As an optional solution of the present invention, the frequency multiplication module further includes: a pulse counter, counting the number of pulses of the synchronous clock in a counting period of the voltage-controlled oscillator clock; and a frequency control logic, comparing the number of pulses with the target value to generate a comparison result, and adjusting the digitally controlled oscillator according to the comparison result to generate a new synchronous clock.
[0008] As an optional solution of the present invention, the frequency control logic adjusts the digitally controlled oscillator to generate a new synchronous clock with a higher frequency when the number of pulses is less than the target value, and adjusts the digitally controlled oscillator to generate a new synchronous clock with a lower frequency when the number of pulses is more than the target value.
[0009] As an optional solution of the present invention, the clock generating unit further includes: a calibration module, comparing a host clock from the host with the voltage-controlled oscillator clock generated by the voltage-controlled oscillator to generate a calibration signal for adjusting the voltage-controlled oscillator to generate a new voltage-controlled oscillator clock.
[0010] As an optional solution of the present invention, the calibration module includes: a first divider, which divides the host clock to provide a divided host clock; a second divider, which divides the voltage-controlled oscillator clock to provide a pulse counter enable signal; a pulse counter, which receives the divided host clock and the pulse counter enable signal, and counts the number of pulses of the divided host clock in a counting period equivalent to the pulse counter enable signal; a calculator, which calculates an error ratio based on the number of pulses and a predicted value; and a digital-to-analog converter, which adjusts the voltage-controlled oscillator based on the error ratio so that it generates a new voltage-controlled oscillator clock.
[0011] As an optional solution of the present invention, the calculator calculates the error ratio according to the following formula: Error ratio = M / E-1; E = (N×tVCK) / (P×tCK); tVCK represents the period of the voltage-controlled oscillator clock; and tCK represents the period of the host clock.
[0012] As an optional solution of the present invention, the clock generation unit except the digitally controlled oscillator is integrated into a control logic circuit.
[0013] As an optional solution of the present invention, the control logic circuit further includes: a register, providing a storage space to store the target value.
[0014] As an optional solution of the present invention, the slave device further includes: a memory array, including multiple memory cells; and an address signal processing unit, processing the address signal from the host to generate an address corresponding to at least one memory cell in the memory array; wherein the slave device reads or writes data from / to the at least one memory cell according to a command of the host based on the synchronous clock.
[0015] The present invention also provides an electronic system using a clock generating unit with a frequency calibration function, characterized in that it includes: a host; and a slave device. The slave device is subordinate to the host, and includes: a digitally controlled oscillator; and a control logic circuit. The control logic circuit is coupled to the digitally controlled oscillator, and includes: a calibration module; and a voltage controlled oscillator. The voltage controlled oscillator is coupled to the calibration module to generate a voltage controlled oscillator clock; wherein the control logic circuit is further configured with a frequency multiplication module together with the digitally controlled oscillator, and is coupled to the voltage controlled oscillator. wherein the calibration module compares a host clock from the host with the voltage controlled oscillator clock generated by the voltage controlled oscillator to generate a calibration signal for adjusting the voltage controlled oscillator to generate a new voltage controlled oscillator clock. wherein the frequency multiplication module receives the voltage controlled oscillator clock and generates a synchronous clock whose frequency is a multiple of a target value of the frequency of the voltage controlled oscillator clock, so that the slave device transmits data with the host according to the synchronous clock.
[0016] As described above, the clock generating unit with frequency calibration function of the present invention and the electronic system using the clock generating unit can provide a high-accuracy voltage-controlled oscillator clock through a voltage-controlled oscillator, and a simple architecture of generating a high-frequency synchronous clock with a frequency multiplication module, thereby solving the problem in the prior art that it is difficult to provide how to generate a high-stability and high-accuracy high-frequency synchronous clock on a simple architecture.
Brief Description of the Drawings
[0017] Figure 1 A functional block diagram of an electronic system according to an example of the present invention is shown.
[0018] Figure 2 A clock diagram of a slave device according to an example of the present invention is shown.
[0019] Figure 3 A functional block diagram of a calibration module of a slave device according to an example of the present invention is shown.
[0020] Figure 4 A functional block diagram of a frequency multiplication module of a slave device according to an example of the present invention is shown.
[0021] Figure 5 An operation flow chart showing a slave device generating a synchronous clock according to an example of the present invention is shown.
[0022] Figure 6 A clock diagram showing a slave device generating a synchronous clock according to an example of the present invention is shown.
[0023] Figure 7 An operation flow chart showing clock calibration of a slave device according to an example of the present invention is shown.
[0024] Figure 8 A clock diagram showing clock calibration of a slave device according to an example of the present invention is shown.
[0025] Fig. 9 A functional block diagram of an electronic system according to another example of the present invention is shown.
[0026] Fig.10 FIG. 4 is a functional block diagram of a voltage controlled oscillator and a frequency multiplication module according to another embodiment of the present invention.
[0027] Fig.11 A clock diagram showing a slave device generating a synchronous clock according to another example of the present invention.
[0028] Fig.12 An operation flow chart showing a slave device generating a synchronous clock according to an example of the present invention is shown.
[0029] Fig.13 A clock diagram showing clock calibration of a slave device according to an example of the present invention is shown.
[0030] Fig.14 Another clock schematic diagram showing clock calibration of a slave device according to an example of the present invention.
[0031] Fig.15 An operation flow chart showing clock calibration of a slave device according to an example of the present invention is shown.
[0032] Fig.16 Another operational flow chart of a slave device performing clock calibration according to an example of the present invention is shown. [Specific implementation method]
[0033] The power consumption management method and storage module proposed by the present invention are further described in detail below in conjunction with the accompanying drawings and specific embodiments. The advantages and features of the present invention will become clearer according to the following description and claims. It should be noted that the accompanying drawings are all in a very simplified form and are not in precise proportions, and are only used to conveniently and clearly assist in explaining the purpose of the embodiments of the present invention.
[0034] See also Figure 1, which is a functional block diagram of an electronic system according to an example of the present invention. Figure 1 As shown, an electronic system 1 includes a host 11 and a slave device 12. The host 11 and the slave device 12 can be electronic devices, preferably integrated circuits, such as microprocessors, calculators, memories, etc. The slave device 12 is subordinate to the host 11, and performs data transmission with the host 11 according to an interface protocol, and receives or transmits instructions and / or data. The type of interface protocol is not limited here, and can be UART (Universal Asynchronous Receiver / Transmitter), I2C (Inter-Integrated Circuit), I2S (Inter-IC Sound Bus), SPI (Serial Peripheral Interface), GPIO (General-Purpose Input / Output), SDIO (Secure Digital Input / Output interface), etc. The slave device 12 includes a clock generating unit 13 that receives the host clock and other parameter settings from the host 11 to generate a synchronous clock, so that the data transmission between the slave device 12 and the host 11 can be based on the synchronous clock.
[0035] The clock generating unit 13 includes a calibration module 14, a voltage controlled oscillator (VCO) 15 coupled to the calibration module 14, and a frequency multiplication module 16 coupled to the VCO 15. The clock generating unit 13 can provide a calibration mode. When the VCO 15 enters the calibration mode, the calibration module 14 can compare the host clock from the host 11 with the VCO clock generated by the VCO 15 to generate a calibration signal for adjusting the VCO 15 to generate a new and more accurate VCO clock. The following paragraphs will further explain in detail how the VCO 15 enters the calibration mode and how the calibration module 14 performs calibration. The VCO 15 is a circuit that can output a high-precision fixed frequency signal, and the oscillation frequency of the output signal can be changed by inputting different DC voltages. Here, the VCO 15 is controlled by the calibration module 14 to generate a high-precision and fixed frequency VCO clock as a reference clock output to the frequency multiplication module 16. After receiving the VCO clock, the frequency multiplication module 16 can generate a synchronous clock with a frequency several times higher according to the frequency of the VCO clock. Figure 2 , which is a clock schematic diagram of a slave device of an example of the present invention. Figure 2As shown, the frequency multiplication module 16 can generate a high frequency synchronous clock corresponding to a preset target value according to the frequency of the VCO clock. For example, when the target value is 6, the frequency of the synchronous clock generated by the frequency multiplication module 16 is approximately 7 times the VCO clock frequency.
[0036] For details on generating synchronous clocks, see also Figures 4 to 6 . Figure 4 A functional block diagram of a frequency multiplication module of a slave device according to an example of the present invention is shown; Figure 5 An operation flow chart showing a slave device generating a synchronous clock according to an example of the present invention; Figure 6 A clock schematic diagram showing a slave device adjusting a synchronous clock according to an example of the present invention. Figure 4 As shown, the frequency multiplication module 16 includes a pulse counter 161, a frequency control logic 162 and a digital controlled oscillator (hereinafter referred to as DCO) 163. The pulse counter 161 receives the VCO clock from the VCO 15 and the feedback signal from the DCO 163, that is, the synchronous clock generated by the DCO 163. In one embodiment, the slave device 12 can receive the command from the host 11 and write the mode register according to the pulse counter 161. Figure 5 The operation flow chart of generates a synchronous clock. First, in step S51, the frequency control logic 162 receives and sets a target value, which can be stored in a register. Then, in step S52, the clock generating unit 13 can be initialized, such as: initializing the pulse counter 161 of the frequency multiplication module 16. Then in step S53, the slave device 12 receives the host clock, the VCO 15 generates a VCO clock, and the pulse counter 161 counts the number of pulses of the synchronous clock in a counting period of the VCO clock. The counting period can be pre-set or set by the host 11 or the user. For example, the counting period can be a period corresponding to a specific voltage (such as a high level) within a cycle of the VCO clock. Then in step S54, the frequency control logic 162 can compare the aforementioned number of pulses with the target value to generate a comparison result, and adjust the DCO 163 according to the comparison result so that it generates a new synchronous clock. For example, if Figure 6 Taking the middle synchronous clock as an example, the pulse counter 161 counts 5 pulses in the counting period. The frequency control logic 162 compares the pulse number (5) with the target value (6) and finds that the pulse number is not greater than the target value, that is, the pulse number is less than the target value. Therefore, the frequency control logic 162 outputs an adjustment signal to adjust the DCO 163 to generate a new synchronous clock with a higher frequency. As shown in step S56, the DCO 163 is accelerated to generate a new synchronous clock with a higher frequency. Figure 6Taking the synchronous clock below as an example, the pulse counter 161 counts 7 pulses during the counting period, and the frequency control logic 162 compares the pulse number (7) with the target value (6), and obtains that the pulse number is greater than the target value, that is, the pulse number is more than the target value. Therefore, the frequency control logic 162 outputs an adjustment signal to adjust the DCO 163 to generate a new synchronous clock with a lower frequency. As shown in step S55, the DCO 163 is slowed down to generate a new synchronous clock with a lower frequency. In this way, by adjusting the DCO 163, a synchronous clock with a frequency corresponding to the number of pulses that meets the target value can be generated.
[0037] Due to process variation, temperature change, etc., it may be necessary to calibrate VCO 15. For details on performing clock calibration, please refer to Figure 3 and Figures 7 and 8 . Figure 3 A functional block diagram of a calibration module of a slave device according to an example of the present invention is shown. Figure 7 An operation flow chart showing clock calibration of a slave device according to an example of the present invention is shown. Figure 8 A clock schematic diagram showing a slave device performing clock calibration according to an example of the present invention is shown. Figure 3 The calibration module 14 in this example includes a P frequency divider 141, an N frequency divider 142, a pulse counter 143, a calculator 144 and a digital-to-analog converter 145. In one embodiment, the slave device 12 can receive a command from the host 11 and write a mode register according to the instruction. Figure 7 First, in step S71, the host 11 or the user can set calibration parameters, including P value, N value, etc. The P value and N value are preferably integers, which can be stored in a control register, or either can be set to be the same as the aforementioned target value. More preferably, the P value can correspond to a positioning element setting, such as corresponding to 8 bits. In this way, the divisor of the P divider 141 and the N divider 142 can be set. The P divider 141 receives the host clock and the P value, and the divided host clock generated after pre-dividing the host clock is as follows: Figure 8 As shown below. The N divider 142 receives the VCO clock and the N value, and generates a pulse counter enable signal after the frequency division as shown below. Figure 8As shown above, it includes a calibration count period that is equivalent to N times the cycle of the VCO clock. The calibration count period can be preset or set according to the host 11 or the user. For example, the calibration count period can be a period corresponding to a specific voltage (such as a high level) within a cycle of the pulse counter enable signal. Then in step S72, the clock generation unit 13 can be initialized, such as: initializing the pulse counter 143 of the calibration module 14. Then in step S73, the pulse counter 143 counts the number of pulses of the divided host clock in the calibration count period of the pulse counter enable signal, that is, the M value, and provides it to the calculator 144. Then in step S74, the calculator 144 can receive an E value and calculate an error ratio according to the following formula:
[0038] Error ratio = M / E-1;
[0039] E = (N × tVCK) / (P × tCK);
[0040] P represents the divisor of the first frequency divider; N represents the divisor of the second frequency divider; tVCK represents the period of the VCO clock; and tCK represents the period of the host clock.
[0041] Here, it can be set that when the clock generating unit 13 writes the E value to the mode register, the VCO 15 enters the calibration mode. For example, assuming that the error ratio calculated by the calculator 144 according to the above process is 3%, in step S75, the digital-to-analog converter 145 adjusts the VCO 15 according to the error ratio so that it generates a new VCO clock. In detail, the error ratio can be transmitted to the VCO 15, and the digital-to-analog converter 145 converts the error ratio to adjust the analog frequency of the VCO 15. Then in step S76, it is determined whether the calibration needs to be repeated to accumulate the calibration results. If yes, it returns to step S72. If not, the calibration ends (step S77).
[0042] See also Fig. 9 , which is a functional block diagram of an electronic system according to another example of the present invention. Fig. 9 The electronic system 2 is shown as a host 21 and a slave device 22 in this example. The slave device 22 is a memory such as PSRAM. The host 21 and the slave device 22 use a DDR DRAM interface protocol to transfer data. Figure 1The difference from the example shown is that the slave device 22 of this example integrates the calibration module and the voltage controlled oscillator in the clock generation unit 23 into a control logic circuit 25 in terms of hardware architecture. The control logic circuit 25 is configured with a frequency multiplication module together with a digitally controlled oscillator 24. The control logic circuit 25 further includes a register 26, and the slave device 22 further includes an address signal processing unit 27 and a memory array 28. The memory array 28 includes a plurality of memory cells. The address signal processing unit 27 can process the address signal from the host 21 to generate an address corresponding to at least one memory cell of the memory array 28, so that the slave device 22 can read or write data from / to the aforementioned at least one memory cell according to a command of the host 21 according to the synchronous clock.
[0043] Please also read Figures 10 to 12 . Fig.10 A functional block diagram of a voltage controlled oscillator and a frequency multiplication module according to another embodiment of the present invention is shown; Fig.11 A clock schematic diagram showing another example of a slave device generating a synchronous clock according to the present invention; Fig.12 An operation flow chart of generating a synchronous clock by a slave device according to an example of the present invention is shown. Fig.10 As shown, VCO251 is coupled to the calibration module and the frequency multiplication module 29 respectively. The pulse timer 252 and the frequency control logic 253 in the control logic circuit 25 of this example configure the frequency multiplication module 29 together with the digital control oscillator 24. The functional block diagram of the calibration module in the control logic circuit 25 of this example can be compared with Figure 3 Similar, please refer to Figure 3 .like Fig.10 As shown, the pulse counter 253 receives the VCO clock from the VCO 251 and the feedback signal from the DCO 24, that is, the synchronous clock generated by the DCO 24. In this example, the VCO clock keeps the pulse timer 252 in the enabled state and keeps the pulse timer 252 in the enabled state when the target value is input. Fig.12The operation flow chart of the present invention is to generate a synchronous clock. Since the VCO 251 is a built-in high-precision analog oscillator, it is suitable as a source of continuous reference frequency of the DCO 24. First, in step S120, the DCO 24 is enabled by the CE# signal of the host 21. Then, in step S121, the host 21 or the user determines whether a target value needs to be set. If the step S121 determines yes, in step S122, the host 21 or the user sets a new target value, which can be stored in the register 26. If the step S121 determines no or after the step S122 is performed, in step S123, the pulse counter 252 of the slave device 22 determines whether the VCO clock is at a high level. If the VCO clock is at a high level, step S125 is performed, and the pulse counter 252 counts the number of pulses of the synchronous clock in a counting period of the VCO clock. On the contrary, if the VCO clock is at a low level, the process proceeds to step S124, and the slave device 22 can initialize the clock generation unit 23, such as initializing the pulse counter 252 of the frequency multiplication module 29. Following step S124, in step S126, it is determined whether the CE# signal is at a high level. If it is not, the process returns to step S121. If it is, the process proceeds to step S127. In step S127, the frequency control logic 253 can compare the aforementioned pulse number with the target value to generate a comparison result, and adjust the DCO 24 according to the comparison result so that it generates a new synchronous clock. For example, if Fig.11 Taking the middle synchronous clock as an example, the pulse counter 252 counts 5 pulses in the counting period. The frequency control logic 253 compares the pulse number (5) with the target value (6) and finds that the pulse number is not greater than the target value, that is, the pulse number is less than the target value. Therefore, the frequency control logic 253 outputs an adjustment signal to adjust the DCO 24 to generate a new synchronous clock with a higher frequency. As shown in step S129, the DCO 24 is accelerated to generate a new synchronous clock with a higher frequency. Fig.11 Taking the synchronous clock below as an example, the pulse counter 252 counts 7 pulses during the counting period, and the frequency control logic 253 compares this pulse number (7) with the target value (6), and obtains that the pulse number is greater than the target value, that is, the pulse number is more than the target value. Therefore, the frequency control logic 253 outputs an adjustment signal to adjust the DCO 24 to generate a new synchronous clock with a lower frequency. As shown in step S128, the DCO 24 is slowed down to generate a new synchronous clock with a lower frequency. In this way, by adjusting the DCO 24, a synchronous clock with a frequency corresponding to the number of pulses that meets the target value can be generated. Therefore, from the above, it can be seen that when the CE# signal is at a high level, the DCO 24 will continue to adjust its frequency, such as: adjusting the synchronous clock in each cycle. The setting is updated when the VCO clock is at a low level, and then a new synchronous clock is fixedly generated when the CE# signal is at a low level. At this time, the operation of reading the memory array 28 is enabled, so that the new synchronous clock can provide a stable clock to read the data of the memory array 28.
[0044] On the other hand, in order to make PSRAM adjust the DQS command signal of the DDR DRAM interface protocol communication, in this example, the E value can be written into the mode register of register 26 to make VCO 251 enter the calibration mode. Figures 13 to 16 . Fig.13 A schematic diagram showing a clock calibration of a slave device according to an example of the present invention; Fig.14 Another clock schematic diagram showing clock calibration of a slave device according to an example of the present invention; Fig.15 An operation flow chart showing clock calibration of a slave device according to an example of the present invention; Fig.16 Another operation flow chart of clock calibration of a slave device according to an example of the present invention is shown. Fig.15 The operation flow chart of FIG. 15 shows, first, in step S151, the user confirms the E value and the P value. Then, in step S152, the calibration parameters are set, including the P value. The P value is preferably an integer, which can be stored in a control register. More preferably, the P value can correspond to a fixed number setting, such as corresponding to 8 bits. This can set the divisor of the P divider. The control register can be set in register 26. The P divider receives the DQS and CE# signals from the host and divides the DQS from the host. Fig.13 The P divider generates the divided host clocks when the P value (i.e., the divisor) is 2, 3, and 4. The N divider receives the VCO clock and the N value, and generates a pulse counter enable signal after the division. Fig.14 As shown, it includes a calibration count period equivalent to N times the period of the VCO clock. Assuming that the period of the VCO clock is 1 μs, N is 8, and the calibration count period is 8×1 μs. Then, in step S153, the host 11 needs to wait for tCKEN time, tCKEN is the clock generation unit enable time. Then, in step S154, write the E value to the mode register, which can be set in register 26. Then, in step S155, the host 11 needs to wait for tCKTRN+tCKEN time, tCKTRN is the clock training time.
[0045] Fig.16 The operation flow of clock calibration of the slave device is further described. First, before writing the E value to the mode register to make the VCO 251 enter the calibration mode, the P value is set in step S160. The detailed flow is as follows: Fig.15 The operation flow chart is shown. Then, in step S161, the slave device 22 receives the host clock sent by the host 21 via the DQS channel. Then, in step S162, when the CE# signal is at a low level, the waveforms of the DQS and CE# signals are shown in FIG. Fig.13. Then, in step S163, the host 11 or the user writes the E value to the mode register to enable the calibration mode. Then, in step S164, the slave device 22 initializes the clock generating unit 23, such as initializing the pulse counter of the calibration module. Then, in step S165, the slave device 22 determines whether the pulse counter enable signal is a high level. If not, it returns to the process before step S165. If yes, it proceeds to step S166. In step S166, the pulse counter of the calibration module counts the number of pulses of the divided host clock in the calibration counting period of the pulse counter enable signal, that is, the M value, and provides it to the calculator. Then, in step S167, the slave device 22 determines whether the pulse counter enable signal is a low level. If not, it returns to step S166. If yes, it proceeds to step S168. In step S168, the calculator calculates an error ratio according to the following formula:
[0046] Error ratio = M / E-1;
[0047] E = (N × tVCK) / (P × tCK);
[0048] P represents the divisor of the first frequency divider; N represents the divisor of the second frequency divider; tVCK represents the period of the VCO clock; and tCK represents the period of the host clock.
[0049] Next, in step S169, the digital-to-analog converter adjusts the VCO 251 according to the error ratio so that it generates a new VCO clock. Specifically, the error ratio can be transmitted to the VCO 251, and the digital-to-analog converter converts the error ratio to adjust the analog frequency of the VCO 251. Next, in step S170, the slave device 22 determines whether CE# is at a high level. If so, the calibration is terminated (step S172). If not, the slave device 22 determines whether to repeat the calibration in step S171. If the judgment in step S171 is yes, the process returns to step S164. If the judgment is not, the calibration is terminated.
[0050] As described above, the clock generating unit and electronic system of the slave device of the present invention can provide a high-accuracy voltage-controlled oscillator clock through a voltage-controlled oscillator, and a simple architecture of generating a high-frequency synchronous clock with a frequency multiplication module, thereby solving the problem in the prior art that it is difficult to provide how to generate a high-stability and high-accuracy high-frequency synchronous clock on a simple architecture.
[0051] The above description is based on a number of different embodiments of the present invention, wherein each feature may be implemented singly or in different combinations. Therefore, the disclosure of the embodiments of the present invention is intended to illustrate specific embodiments of the principles of the present invention, and the present invention should not be limited to the disclosed embodiments. Furthermore, the above description and the accompanying drawings are only for the purpose of illustrating the present invention and are not intended to be limiting. Other variations or combinations of components are possible without violating the spirit and scope of the present invention.
[0052]
Main component symbol description
[0053] 1,2 Electronic system 11,21 Host
[0054] 12,22 Slave device 13,23 Clock generation unit
[0055] 14 Calibration Module 15,251 Voltage Controlled Oscillator
[0056] 16,29 Frequency multiplication module 24,163 Digitally controlled oscillator
[0057] 25 Control logic circuit 26 Register
[0058] 27 Address signal processing unit 28 Memory array
[0059] 141 P divider 142 N divider
[0060] 143,252 Pulse Counter 144 Calculator
[0061] 145 Digital to Analog Converter 161 Pulse Counter
[0062] 162,253 Frequency Control Logic
[0063] S51,S52,S53,S54,S55,S56,
[0064] S71,S72,S73,S74,S75,S76,
[0065] S77,S120,S121,S122,S123,
[0066] S124,S125,S126,S127,S128,
[0067] S151,S152,S153,S154,S155,
[0068] S160,S161,S162,S163,S164,
[0069] S165,S166,S167,S168,S169,
[0070] Steps S170, S171, S172.
Claims
1. A clock generating unit with a frequency calibration function, arranged in a slave device, the slave device being subordinate to a host, characterized in that: include: a voltage controlled oscillator; and a frequency multiplication module, receiving a voltage controlled oscillator clock generated by the voltage controlled oscillator, the frequency multiplication module comprising: a frequency control logic configured to receive a target value; a digitally controlled oscillator, arranged to be adjusted by the frequency control logic and to generate a synchronous clock having a frequency that is a multiple of the target value of the frequency of the voltage controlled oscillator clock; a calibration module, comparing a host clock from the host with the voltage controlled oscillator clock generated by the voltage controlled oscillator to generate a calibration signal for adjusting the voltage controlled oscillator to generate a new voltage controlled oscillator clock, The slave device transmits data with the host according to the synchronous clock.
2. The clock generating unit with frequency calibration function as claimed in claim 1, characterized in that: The frequency multiplication module further comprises: a pulse counter for counting the number of pulses of the synchronization clock in a counting period of the voltage controlled oscillator clock, The frequency control logic compares the pulse number with the target value to generate a comparison result, and adjusts the digital control oscillator according to the comparison result to generate a new synchronous clock.
3. The clock generating unit with frequency calibration function as claimed in claim 2, characterized in that: The frequency control logic adjusts the digital controlled oscillator to generate a new synchronous clock with a higher frequency when the number of pulses is less than the target value, and adjusts the digital controlled oscillator to generate a new synchronous clock with a lower frequency when the number of pulses is more than the target value.
4. The clock generating unit with frequency calibration function as claimed in claim 1, characterized in that: The calibration module comprises: a first frequency divider, for dividing the host clock to provide a divided host clock; a second frequency divider for dividing the voltage controlled oscillator clock frequency to provide a pulse counter enable signal; a pulse counter receiving the divided host clock and the pulse counter enable signal, and counting the number of pulses of the divided host clock in a counting period corresponding to the pulse counter enable signal; a calculator for calculating an error ratio according to the pulse number and a predicted value; and A digital-to-analog converter adjusts the voltage-controlled oscillator according to the error ratio to generate a new voltage-controlled oscillator clock.
5. The clock generating unit with frequency calibration function as claimed in claim 4, characterized in that: The calculator calculates the error ratio according to the following formula: Error ratio = M / E-1; E = (N × tVCK) / (P × tCK); M represents the number of pulses of the divided host clock in the counting period; P represents the divisor of the first frequency divider; N represents the divisor of the second frequency divider; tVCK represents the period of the voltage controlled oscillator clock; and tCK represents the period of the host clock.
6. The clock generating unit with frequency calibration function as claimed in claim 1, characterized in that: The clock generation unit, except the digitally controlled oscillator, is integrated into a control logic circuit.
7. The clock generating unit with frequency calibration function as claimed in claim 6, characterized in that: The control logic circuit further comprises: A register stores the target value.
8. The clock generating unit with frequency calibration function as claimed in claim 1, characterized in that: The slave device further comprises: a memory array comprising a plurality of memory cells; and an address signal processing unit, processing an address signal from the host to generate an address corresponding to at least one memory cell of the memory array; The slave device reads or writes data from / to the at least one storage cell according to a command of the host according to the synchronous clock.
9. An electronic system using a clock generating unit with a frequency calibration function, characterized in that: include: A host; and A slave device, subordinate to the host, comprising: a digitally controlled oscillator; and A control logic circuit, coupled to the digital controlled oscillator, comprises: a calibration module; and a voltage controlled oscillator, coupled to the calibration module, to generate a voltage controlled oscillator clock; The control logic circuit is further configured with a frequency multiplication module together with the digital control oscillator, and is coupled to the voltage controlled oscillator; The calibration module compares a host clock from the host with the voltage-controlled oscillator clock generated by the voltage-controlled oscillator to generate a calibration signal for adjusting the voltage-controlled oscillator to generate a new voltage-controlled oscillator clock; and The frequency multiplication module receives the voltage controlled oscillator clock and generates a synchronous clock whose frequency is a multiple of a target value of the voltage controlled oscillator clock, so that the slave device transmits data with the host according to the synchronous clock.
Citation Information
Patent Citations
Phase locked loop with adaptive filter for DCO synchronization
CN101483430A
Communication systems, clock generation circuits thereof, and method for generating clock signal
CN101599755A
Clock generator and a method of generating a clock signal
CN103138754A
Reference clock-less CMOS image sensor
CN107864346A
Clock synchronizer and clock and data recovery apparatus and method
CN1684405A
