This application is based upon and claims the benefit of priority from Japanese Patent Application No. 2021-154522, filed Sep. 22, 2021, the entire contents of which are incorporated herein by reference.
Embodiments described herein relate generally to a semiconductor integrated circuit, an electronic device, and a frequency detecting method performed by a semiconductor integrated circuit or an electronic device.
An electronic device uses internal clock signals to operate internal circuits. The internal clock signal is generated by reference to a reference clock signal. When an electronic device is connected to a known host device, the electronic device receives a reference clock signal having a known frequency from the host device. The electronic device that has received such a reference clock signal can generate an internal clock signal based on the received reference clock signal. However, when the electronic device is connected to an unknown host device, the frequency of the reference clock signal may be unknown. This may disrupt the generation of the internal clock signal by the electronic device.
Embodiments provide a semiconductor integrated circuit, an electronic device, and a frequency detecting method. In the embodiments, a frequency of a clock signal can be detected without increasing the required circuit size.
In general, according to one embodiment, a semiconductor integrated circuit includes a calibration control circuit configured to generate a setting value for a frequency of a first clock signal, based on a frequency of a second clock signal from an external device and a frequency of a third clock signal that is obtained by dividing the first clock signal by a first frequency division ratio. The semiconductor integrated circuit further includes a phase-locked loop configured to generate a control voltage signal based on a difference in phase between the second and third clock signals, and generate the first clock signal based on the generated control voltage and the setting value. The semiconductor integrated circuit further includes a determination control circuit configured to determine whether the first and second clock signals are in a locked state, and update the first frequency division ratio based on whether the first and second clock signals are in the locked state.
(Electronic Device)
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. As illustrated in
The clock generator 100 can be a semiconductor integrated circuit that supplies a clock signal to each circuit component (e.g., the interface circuit 500) in the electronic device D. The clock generator 100 receives a clock signal from outside of the electronic device D, such as the host device H or the like. The clock generator 100 generates a clock signal or clock signals to be used by each circuit component provided in the electronic device D, based on the received clock signal. Generated clock signals may be a single frequency or different frequencies for different circuit components.
The memory 200 is, for example, a storage device capable of storing information in a nonvolatile manner. The memory 200 is implemented as, for example, a NAND type flash memory. The memory 200 stores, for example, user data transmitted from the host device H, management information of the electronic device D, system data, and log data of the host device H and the electronic device D.
The CPU 400 is an arithmetic circuit that performs various controls by executing programs or firmware read from a storage device such as the memory 200 or a ROM.
The interface circuit 500 transmits and receives signals to and from the host device H. Based on a clock signal generated by the clock generator 100, the interface circuit 500 processes the transfer of signals between the electronic device D and the host device H.
The clock generator 100 generates a clock signal synchronized with the clock signal used by the host device H. Thus, the clock generator 100 may receive a reference clock signal from the host device H for the purposes of synchronization or the like. However, when the electronic device D is initially connected to an unknown host device H, the frequency of the reference clock signal received from the host device H may be unknown. Thus, the clock generator 100 has a function of detecting the frequency of the reference clock signal being received from the host device H.
(Configuration of Clock Generator)
The configuration of the clock generator 100 according to an embodiment will be described with reference to
The phase-locked loop PLL is an oscillation circuit block that generates the oscillation clock signal VCO CLK based on the reference clock signal REF CLK. The phase-locked loop PLL receives the reference clock signal REF CLK, and then generates the oscillation clock signal VCO CLK and a frequency-divided clock signal DIV CLK based on the reference clock signal REF CLK. The phase-locked loop PLL includes a voltage-controlled oscillator (VCO) 10, a programmable frequency divider 20 that functions as a feedback frequency divider, a phase frequency detector (PFD) 30, a charge pump 40, and a loop filter 50.
The voltage-controlled oscillator 10 is an oscillator for which an oscillation frequency can be controlled based on a provided control voltage Vc. The voltage-controlled oscillator 10 generates the oscillation clock signal VCO CLK, which has an oscillation frequency that is controlled/adjusted according to at least in part by the control voltage Vc. The voltage-controlled oscillator 10 can also receive a calibration code (“CAL CODE”) and change the base oscillation frequency of the VCO 10, so as to change the relationship between the control voltage Vc and the oscillation frequency “f” (of oscillation clock signal VCO CLK). That is, the voltage-controlled oscillator 10 may generate the oscillation clock signal VCO CLK based on both value/level of the control voltage Vc and the received calibration code (“CAL CODE”). The voltage-controlled oscillator 10 may be, for example, an oscillation system using the LC (inductance-capacitance) resonance.
The programmable frequency divider 20 is a circuit that feeds back a frequency-divided clock signal DIV CLK to the phase frequency detector 30. The frequency-divided clock signal DIV CLK is obtained by dividing the oscillation clock signal VCO CLK output by the voltage-controlled oscillator 10. The programmable frequency divider 20 receives the oscillation clock signal VCO CLK from the voltage-controlled oscillator 10. The programmable frequency divider 20 also receives a signal (division signal) related to a frequency division ratio N of the oscillation clock signal VCO CLK from the determination control circuit DET. Based on the division signal, the programmable frequency divider 20 generates the frequency-divided clock signal DIV CLK obtained by frequency dividing the oscillation clock signal VCO CLK. The programmable frequency divider 20 outputs the frequency-divided clock signal DIV CLK. That is, in the phase-locked loop PLL of the present embodiment, the frequency division ratio (N) of the feedback frequency divider 20 is controllable.
The phase frequency detector 30 is a circuit that compares the phases of the reference clock signal REF CLK and the frequency-divided clock signal DIV CLK. The phase frequency detector 30 detects the difference in phase between the reference clock signal REF CLK and the frequency-divided clock signal DIV CLK, and outputs the detection result as a pulsed signal.
The charge pump 40 converts the pulsed signal output by the phase frequency detector 30 into a voltage level, and outputs the conversion result.
The loop filter 50 is a low-pass filter that functions as a feedback loop filter of the phase-locked loop PLL. The loop filter 50 outputs the control voltage Vc, which is obtained by filtering the output of the charge pump 40. The output voltage Vc from the loop filter 50 is input to the voltage-controlled oscillator 10.
In this way, the phase-locked loop PLL forms a phase control loop in which the phase of the frequency-divided clock signal DIV CLK (obtained by frequency dividing the oscillation clock signal VCO CLK generated by the voltage-controlled oscillator 10) is compared with the phase of the reference clock signal REF CLK. The comparison result is fed back to the phase-locked loop PLL.
The calibration control circuit CAL is a circuit block that adjusts the base oscillation frequency for the oscillation clock signal VCO CLK as generated by the voltage-controlled oscillator 10. The calibration control circuit CAL receives the reference clock signal REF CLK and the frequency-divided clock signal DIV CLK, and generates a calibration code (“CAL CODE”). The calibration control circuit CAL includes a calibration circuit 60 and a code generator 70.
The calibration circuit 60 receives the reference clock signal REF CLK and the frequency-divided clock signal DIV CLK. The calibration circuit 60 compares the frequency of the reference clock signal REF CLK and the frequency of the frequency-divided clock signal DIV CLK to each other. The calibration circuit 60 outputs a signal indicating the comparison result.
The code generator 70 receives the comparison result output by the calibration circuit 60. The code generator 70 generates the calibration code (“CAL CODE”). based on the comparison result. The code generator 70 outputs the generated calibration code.
The voltage-controlled oscillator 10 generates the oscillation clock signal VCO CLK having the base frequency corresponding to the calibration code generated by the code generator 70. The adjustment of the oscillation frequency in accordance with the calibration code is performed, for example, when the oscillation frequency of the oscillation clock signal VCO CLK exceeds a frequency range which is controllable by the voltage-controlled oscillator 10 in accordance with the control voltage Vc.
An example of the configuration of the calibration circuit 60 of the calibration control circuit CAL will be described with reference to
Based on the count value counted by the counter 62, the code generator 70 generates the calibration code (“CAL CODE”) for controlling the base oscillation frequency of the voltage-controlled oscillator 10. The count value of the counter 62 is the comparison result of the calibration circuit 60. For example, when the count value received from the counter 62 is smaller than a threshold value, the code generator 70 adds one (1) to the calibration code, and when the count value received from the counter 62 is larger than the threshold value, the code generator 70 subtracts one (1) from the calibration code. The voltage-controlled oscillator 10 changes the base oscillation frequency in accordance with the received calibration code (“CAL CODE”).
In this way, a frequency control loop is formed in which the base frequency of the voltage-controlled oscillator 10 is roughly adjusted in accordance with the calibration code. That is, the control loop by the calibration control circuit CAL is the frequency control loop.
As illustrated in
The determination control circuit DET includes a lock detection circuit 80, a determination circuit 82, a frequency division ratio setting circuit 84, and a code comparison circuit 86. The lock detection circuit 80 is a circuit block that compares the phase of the reference clock signal REF CLK and the phase of the frequency-divided clock signal DIV CLK, and detects whether the operation of the phase-locked loop PLL is locked. The determination control circuit DET outputs a signal indicating the detection result.
The determination circuit 82 is a circuit block that determines whether the operation of the phase-locked loop PLL is locked, based on the output signal of the lock detection circuit 80, and controls the frequency division ratio N to be given to the programmable frequency divider 20 according to the determination result. When it is determined that the operation of the phase-locked loop PLL is not locked based on the output signal of the lock detection circuit 80, the determination circuit 82 changes the frequency division ratio N to be given to the programmable frequency divider 20 in the frequency division ratio setting circuit 84. When it is determined that the operation of the phase-locked loop PLL is locked based on the output signal of the lock detection circuit 80, the determination circuit 82 fixes the frequency division ratio N to be given to the programmable frequency divider 20 in the frequency division ratio setting circuit 84. The determination circuit 82 outputs a setting signal for setting the frequency division ratio N to be given to the programmable frequency divider 20, to the frequency division ratio setting circuit 84. The determination circuit 82 also has a function of checking whether the calibration code (“CAL CODE”) generated by the code generator 70 is in a specified range after it is determined that the operation of the phase-locked loop PLL is locked. When the calibration code is outside the specified range, the determination circuit 82 changes the frequency division ratio N again.
The frequency division ratio setting circuit 84 is a circuit block that sets the frequency division ratio N of the programmable frequency divider 20 based on the setting signal for setting the frequency division ratio N from the determination circuit 82. The frequency division ratio setting circuit 84 can store multiple frequency division ratio values that correspond to particular frequencies of the reference clock signal REF CLK and give a frequency division ratio N among the stored multiple frequency division ratio values to the programmable frequency divider 20.
The code comparison circuit 86 is a circuit block that compares the calibration code (“CAL CODE”) generated by the calibration control circuit CAL with a threshold value code. The code comparison circuit 86 determines whether the calibration code (“CAL CODE”) generated by the calibration control circuit CAL is a value within a specified range.
In this way, the determination control circuit DET controls the frequency division ratio N of the programmable frequency divider 20 based on the locked state of the operation of the phase-locked loop PLL. Further, the determination control circuit DET controls the frequency division ratio N of the programmable frequency divider 20 based on the propriety of the calibration code generated by the code generator 70.
(Calibration Operation of Clock Generator 100)
As described above, the clock generator 100 includes the calibration control circuit CAL, the phase-locked loop PLL, and the determination control circuit DET. The calibration control circuit CAL roughly adjusts the base frequency of the oscillation clock signal VCO CLK generated by the clock generator 100. The phase-locked loop PLL synchronizes the frequency of the oscillation clock signal VCO CLK with the frequency of the reference clock signal REF CLK based on the base frequency adjusted by the operation of the calibration control circuit CAL. When the operation of the phase-locked loop PLL is not locked, the determination control circuit DET controls the frequency division ratio N of the programmable frequency divider 20 so that the phase-locked loop PLL can be brought into the locked state. Hereinafter, the calibration operation of the clock generator 100 will be described with reference to
The calibration control circuit CAL operates when a reference clock signal REF CLK having a new or unknown frequency is supplied, for example, when the electronic device D is connected to an unknown host device H. When such a reference clock signal REF CLK is supplied, the counting period generator 61 of the calibration circuit 60 generates a timing signal for specifying a counting period, based on the frequency of the reference clock signal REF CLK. Based on the timing signal generated by the counting period generator 61, the counter 62 counts the number of pulses of the frequency-divided clock signal DIV CLK obtained by dividing a clock signal generated by the voltage-controlled oscillator 10.
If the count value counted by the counter 62 during the counting period is less than a threshold value, the code generator 70 generates a calibration code (“CAL CODE”) by adding a certain number (e.g., “1”) to a preset initial calibration code CAL CODE. When the count value is smaller than the threshold value, this indicates that the frequency of the frequency-divided clock signal DIV CLK is lower than the frequency of the reference clock signal REF CLK.
On the other hand, if the count value of the counter 62 is larger than the threshold value, the code generator 70 generates a calibration code (“CAL CODE”) by subtracting a certain number (e.g., “1”) from the initial calibration code. When the count value is larger than the threshold value, this indicates that the frequency of the frequency-divided clock signal DIV CLK is higher than the frequency of the reference clock signal REF CLK.
In
If the initial calibration code is “0011”, and the count value of the counter 62 is larger than the threshold value (that is, the frequency of the frequency-divided clock signal DIV CLK is higher than the frequency of the reference clock signal REF CLK), the code generator 70 subtracts “1” from the initial calibration code to obtain “0010” as a new calibration code. As a result, the oscillation characteristic of the voltage-controlled oscillator 10 changes from “a” to “c” in
In an embodiment, the possible frequencies of the reference clock signal REF CLK can be standardized as, for example, 19.2 MHz, 26 MHz, 38.4 MHz, 52 MHz, 76.8 MHz, or 104 MHz. The voltage-controlled oscillator 10 of the electronic device D may set the frequency division ratio N in accordance with a corresponding frequency, thereby generating the oscillation clock signal VCO CLK of the same frequency. Furthermore, in the correspondence table illustrated in
(Frequency Detecting Operation of Clock Generator 100)
The frequency detecting operation of the clock generator 100 according to an embodiment will be described with reference to
When an unknown reference clock signal REF CLK is input to the node CLK IN, the calibration control circuit CAL executes the calibration operation (S610). Here, the calibration circuit 60 compares the unknown reference clock signal REF CLK and the frequency-divided clock signal DIV CLK (obtained by dividing the oscillation clock signal VCO CLK generated by the voltage-controlled oscillator 10), and the code generator 70 increases or decreases the calibration code based on the comparison result of the calibration circuit 60.
The calibration control circuit CAL has a function of discretely adjusting the base oscillation frequency of the voltage-controlled oscillator 10, in other words, the oscillation characteristic (Vc-f), as illustrated in
The calibration control circuit CAL continues to increase or decrease the calibration code until the calibration code is locked/determined (S610; No in S620). When the calibration code is locked/determined (Yes in S620), the code generator 70 gives this finally locked calibration code (“CCAL”) to the voltage-controlled oscillator 10. The voltage-controlled oscillator 10 generates the oscillation clock signal VCO CLK based on this calibration code. The phase-locked loop PLL controls the frequency-divided clock signal DIV CLK to be synchronized with the reference clock signal REF CLK (S630). That is, the phase-locked loop PLL performs a PLL operation.
The operation of the phase-locked loop PLL is to synchronize the frequency-divided clock signal DIV CLK with the reference clock signal REF CLK. The oscillation clock signal VCO CLK generated by the voltage-controlled oscillator 10 is input to the programmable frequency divider 20. The programmable frequency divider 20 sends the frequency-divided clock signal DIV CLK (obtained by dividing the oscillation clock signal VCO CLK using the frequency division ratio N given from the frequency division ratio setting circuit 84) to the phase frequency detector 30. The phase frequency detector 30 compares the phase of the reference clock signal REF CLK and the phase of the frequency-divided clock signal DIV CLK, and sends a pulsed signal corresponding to the phase difference to the charge pump 40. The charge pump 40 converts the received signal into a voltage level. The conversion result is sent to the voltage-controlled oscillator 10 as an output voltage Vc via the loop filter 50. The voltage-controlled oscillator 10 generates the oscillation clock signal VCO CLK of which frequency is controlled by using the output voltage Vc of the loop filter 50 as a control voltage. Through the phase-locked loop, the voltage-controlled oscillator 10 can generate the stable oscillation clock signal VCO CLK in synchronization with the reference clock signal REF CLK.
The lock detection circuit 80 monitors both the reference clock signal REF CLK (input to the phase frequency detector 30) and the frequency-divided clock signal DIV CLK (output by the programmable frequency divider 20). Based on the monitoring result of the lock detection circuit 80, the determination circuit 82 determines whether the operation of the phase-locked loop PLL is locked (S640).
If the operation of the phase-locked loop PLL is not yet locked (No of S640), the frequency division ratio setting circuit 84 changes the frequency division ratio N of the programmable frequency divider 20 from the initial value (S650). When the frequency division ratio N is changed, the frequency of the frequency-divided clock signal DIV CLK also changes. Accordingly, the calibration control circuit CAL starts the calibration operation (S610) again, and once the calibration code is determined (Yes in S620), the phase-locked loop PLL performs the PLL operation (S630). The subsequent operations are performed in the same manner as described above.
When the operation of the phase-locked loop PLL is locked (Yes in S640), the code comparison circuit 86 compares the value of the calibration code (“CCAL”) at the locked time with a specified range having a minimum threshold value A and a maximum threshold value B (S660).
In the determination circuit 82, when the calibration code (“CCAL”) value is less than or equal to the minimum threshold value A or greater than or equal to the maximum threshold value B (No in S660), the frequency division ratio setting circuit 84 changes the frequency division ratio N of the programmable frequency divider 20 again, and sets the now-changed frequency division ratio N in the programmable frequency divider 20 (S670). After the frequency division ratio N is changed, the calibration control circuit CAL starts the calibration operation again (S610), and when the calibration code is determined (Yes in S620), the phase-locked loop PLL performs the PLL operation again (S630). The subsequent operations are performed in the same manner as described above.
In the determination circuit 82, when the calibration code (“CCAL”) exceeds the minimum threshold value A but is less than the maximum threshold value B (Yes in S660), the frequency division ratio setting circuit 84 fixes (sets) the frequency division ratio N to be given to the programmable frequency divider 20. As a result, the frequency of the oscillation clock signal VCO CLK generated by the voltage controlled oscillator 10 is stabilized. Since the frequency division ratio N at this time corresponds to the frequency of the oscillation clock signal VCO CLK generated by the voltage-controlled oscillator 10, the frequency of the reference clock signal REF CLK can be detected based on the value of the frequency division ratio N set by the frequency division ratio setting circuit 84.
(Principle of Frequency Detection by Clock Generator)
If the electronic device D is connected to a host device H that supplies an unknown reference clock signal REF CLK, the frequency of the reference clock signal REF CLK will be unknown at the time the electronic device D is first connected to the host device H. When a signal having an unknown frequency is supplied from a host device H, the clock generator 100 also operates as a frequency detector that detects the unknown frequency. The principle of the frequency detection of the clock generator 100 will be described with reference to
In some examples, the frequency of the reference clock signal REF CLK matches one of certain possible values for an internal clock signal of the electronic device D. For example, the standard frequencies may be 19.2 MHz, 26 MHz, 38.4 MHz, 52 MHz, 76.8 MHz, and 104 MHz. Considering these examples, the difference between the assumed lowest and highest frequencies is large, and thus, the clock generator 100 controls the base frequency of the voltage-controlled oscillator 10 through the control loop by the calibration control circuit CAL to cover all of the possible standard frequencies.
The frequency candidates for the reference clock signal REF CLK are, in this example, a set of frequencies having a certain frequency interval. Thus, the clock generator 100 can discretely change the oscillation frequency of the voltage-controlled oscillator 10 in accordance with the candidate frequencies of the reference clock signal REF CLK. For example, as illustrated in
As the method of discretely changing the oscillation frequency of the voltage-controlled oscillator 10, the clock generator 100 changes the frequency division ratio N of the programmable frequency divider 20 (which is a frequency division circuit in the loop of the phase-locked loop PLL).
For example,
As illustrated in
Next, with reference to
In consideration of the stability of the system, it is desirable to oscillate the voltage-controlled oscillator 10 in a region where the system operates as stably as possible. Thus, in the clock generator 100, it is checked whether the calibration code is in the range of the expected stable operation after the operation of the phase-locked loop PLL has been locked, and when the calibration code is outside the appropriate range, the frequency division ratio N is changed again, and the calibration operation and the PLL operation are performed. Then, the operation of the phase-locked loop PLL is locked by the frequency division ratio N in which the calibration code falls within the specified range.
For example, when six standard reference clock signals REF CLK possibilities are assumed, as illustrated in
In the clock generator 100, it is checked whether the calibration code is in the specified range (that is, between A and B in
In the clock generator 100, the frequency of the reference clock signal REF CLK can be detected without increasing the circuit scale. Further, in the clock generator 100, the locking can be determined by sweeping the frequency division ratio of the feedback frequency divider in the phase-locked loop PLL, so that the high accuracy can be achieved without requiring a preliminary test in the initial mounting of the system/device. In the clock generator 100, the frequency division ratio N can be controlled in the two stages of success/failure in the locking of the operation of the phase-locked loop PLL and success/failure in the locking of the calibration control circuit CAL. However, the present disclosure is not limited thereto. The frequency of an unknown reference clock signal REF CLK may be acquired based on the success/failure in the locking of the operation of the phase-locked loop PLL and the frequency division ratio N at that time.
While certain embodiments have been described, these embodiments have been presented by way of example only, and are not intended to limit the scope of the disclosure. Indeed, the novel embodiments described herein may be embodied in a variety of other forms; furthermore, various omissions, substitutions and changes in the form of the embodiments described herein may be made without departing from the spirit of the disclosure. The accompanying claims and their equivalents are intended to cover such forms or modifications as would fall within the scope and spirit of the disclosure.
Number | Date | Country | Kind |
---|---|---|---|
2021-154522 | Sep 2021 | JP | national |