Automatic trimming device and method for an oscillator
By calculating the difference and index value using an automatic trimming device, the problem of waveform distortion in high-frequency oscillators is solved, enabling more accurate frequency measurement and a faster trimming process.
Patent Information
- Application Number
- CN202011078276.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-12-27
- Filing Date
- 2020-10-10
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2041-06-02
AI Technical Summary
When measuring high-frequency oscillators, parasitic RC components cause waveform distortion, affecting the accuracy of frequency measurement, and existing frequency divider methods increase measurement time.
An automatic trimming device is employed, comprising an oscillator, a subtractor, an index value selector, an index value register, and an embedded memory. By calculating the difference and the index value, the target index value is detected and output, thereby achieving automatic trimming of the oscillator.
This improves the accuracy of oscillator frequency measurement while reducing the time required for automatic trimming.
Smart Images

Figure CN113055002B_ABST
Abstract
Description
[0001] Cross-references to related applications
[0002] This application claims priority to Korean Patent Application No. 10-2019-0176474, filed on December 27, 2019, with the Korean Intellectual Property Office, the entire disclosure of which is incorporated herein by reference for all purposes. Technical Field
[0003] The disclosure of this application generally relates to an automatic trimming apparatus and method for oscillators. Background Technology
[0004] like Figure 1 As shown in section (a), a related technique uses a method of outputting the oscillator frequency to the OUT_PAD and directly measuring the oscillator frequency using a test device. However, when measuring such a high-frequency oscillator, a parasitic RC component may exist between the OUT_PAD and the probes of the test device, such as... Figure 1 The waveform shown in (b) distorts the high-frequency output, making the frequency measurement inaccurate or impossible due to limitations on the measurable frequency of the test equipment.
[0005] To improve the waveform distortion problem in related technologies, such as Figure 1 As shown in section (c), a frequency divider has been added. Figure 1 As shown in section (d), this frequency divider divides the frequency of the oscillator clock OSC_CLK to reduce distortion of the output waveform. Therefore, accuracy is improved, but measurement time is increased. Summary of the Invention
[0006] The present invention provides a simplified overview of the selection of concepts, which are further described in the detailed embodiments below. This summary is not intended to identify key or essential features of the claimed subject matter, nor is it intended to help determine the scope of the claimed subject matter.
[0007] In one general aspect, the automatic trimming device includes: an oscillator configured to generate an oscillator clock signal; a subtractor configured to receive a desired value for a target frequency and the oscillator clock signal, and configured to output the difference between the desired value and the oscillator clock signal; an index value selector configured to use the difference to calculate a unit index value, and configured to detect and output a target index value based on the unit index value; an index value register configured to output oscillator trimming code corresponding to the target index value to the oscillator; and an embedded memory configured to store the oscillator trimming code as target oscillator trimming code for a target frequency.
[0008] The subtracter can be configured to receive a reference time signal, the expected value can be a clock number of the target frequency during a section in which the reference time signal is high, and the difference value can be a value obtained by subtracting a clock number of the oscillator clock signal during the section in which the reference time signal is high from the expected value.
[0009] The index value selector can include a divider configured to calculate a unit index value from the difference value, a binary search selector configured to search for a target index value from the difference value to output a search result, and an index value calculator configured to calculate the target index value using the unit index value or the search result.
[0010] The index value selector can include a current index value register configured to maintain the target index value output from the index value selector until a next target index value is output.
[0011] The index value calculator can be configured to calculate the target index value using the unit index value only at an initial calculation.
[0012] The index value calculator can be configured to calculate the target index value using a search result of the binary search selector a predetermined number of times after outputting the target index value using the unit index value.
[0013] The automatic trimming apparatus can further include a comparator configured to receive an output of the subtracter.
[0014] The automatic trimming apparatus can further include a minimum value register configured to provide a target difference value compared with the output of the subtracter in the comparator.
[0015] The embedded memory can be configured to store the oscillator trimming code as the target oscillator trimming code in response to the difference value being within a predetermined range, or configured to store the oscillator trimming code corresponding to a case in which the difference value is the smallest among the target index values as the target oscillator trimming code in response to the index value register receiving the target index value a predetermined number of times.
[0016] The automatic trimming apparatus can further include an average value calculator configured to receive the difference value a plurality of times and calculate and output an average difference value from the plurality of difference values, wherein the index value selector can be configured to detect the target index value using the average difference value.
[0017] In another general aspect, an automatic trimming apparatus includes an oscillator configured to generate an oscillator clock signal; a subtractor configured to receive a desired value for a target frequency and the oscillator clock signal to output a difference between the desired value and the oscillator clock signal; an index value selector configured to calculate a unit index value using the difference and configured to detect a target index value from the unit index value to provide to the oscillator; an index value register configured to receive and store the target index value; and an embedded memory configured to store the target index value for the target frequency.
[0018] The embedded memory can be configured to store the target index value in response to the difference being within a predetermined range, or store the target index value corresponding to a case where the difference is smallest in response to the index value register receiving the target index value a predetermined number of times.
[0019] In another general aspect, a method for automatic trimming includes calculating a difference value by outputting, using a subtractor, a difference between a desired value for a target frequency and a clock number of an oscillator signal during a section where a reference time signal is high; calculating a target index value by using an index value selector to calculate a unit index value using the difference value and to detect and output the target index value from the unit index value; transmitting the target index value by using an index value register to output an oscillator trimming code corresponding to the target index value to an oscillator; and storing the target index value by using an embedded memory to store the oscillator trimming code as a target oscillator trimming code.
[0020] Calculating the target index value can include performing a unit calculation by using a divider to calculate a unit index value from the difference value and using an index value calculator to calculate and output the target index value from the unit index value, and performing a fine calculation by using a binary search calculator to search for the target index value from the difference value and output a search result, and using the index value calculator to calculate and output the target index value from the search result.
[0021] Calculating the target index value can include initially performing the unit calculation and then performing the fine calculation.
[0022] Transmitting the target index value can include determining a minimum value, in which a comparator receives the difference value, and outputting a smaller value from the minimum value previously stored in a minimum value register and the difference value as a target difference value.
[0023] Storing the target index value can include storing, by the embedded memory, the oscillator trimming code as the target oscillator trimming code in response to the difference being within a predetermined range, or storing the oscillator trimming code corresponding to a case where the difference is smallest as the target oscillator trimming code in response to the index value register receiving the target index value a predetermined number of times.
[0024] The storing of the target index value can include outputting the target oscillator trim code stored in the embedded memory from the minimum value register in response to the difference value being within a predetermined range.
[0025] The storing of the target index value can include outputting the target oscillator trim code stored in the embedded memory from the index value register or the minimum value register in response to the target index value being received by the index value register a predetermined number of times.
[0026] The calculating of the difference value can include performing a first calculation in which the subtracter calculates and outputs the difference value, and performing a second calculation in which the average value calculator calculates and outputs an average difference value from a plurality of difference values after receiving the difference value a plurality of times, wherein the calculating of the target index value includes detecting the target index value using the average difference value using the index value selector.
[0027] In another general aspect, a method for automatic trimming includes calculating a difference value by outputting, using a subtracter, a difference between a desired value of a target frequency and a clock number of an oscillator signal during a section in which a reference time signal is high as the difference value, calculating a target index value by calculating a unit index value using the difference value using an index value selector, and detecting and outputting the target index value from the unit index value, the calculating including a unit calculation and a fine calculation, and transmitting the target index value by outputting, using an index value register, an oscillator trim code corresponding to the target index value to an oscillator to be stored as a target oscillator trim code.
[0028] The unit calculation can include calculating the unit index value from the difference value using a divider, and calculating and outputting the target index value from the unit index value using an index value calculator.
[0029] The fine calculation can include searching for the target index value from the difference value using a bisection searcher and outputting a search result, and calculating and outputting the target index value from the search result using an index value calculator.
[0030] The target oscillator trim code can be stored in an embedded memory.
[0031] Other features and aspects will be apparent from the following detailed description, the drawings, and the claims. BRIEF DESCRIPTION OF DRAWINGS
[0032] Figure 1 A trimming method of an oscillator according to one or more examples is illustrated.
[0033] Figure 2 A configuration of an automatic trimming apparatus of an oscillator according to one or more examples of the disclosure is illustrated.
[0034] Figure 3 Another configuration of an automatic trim device for an oscillator is shown in accordance with one or more examples of the disclosure.
[0035] Figure 4 is a timing diagram illustrating the operation of a subtractor in accordance with one or more examples of the disclosure.
[0036] Figure 5 A process of outputting a target index value by an index value selector is shown in accordance with one or more examples of the disclosure.
[0037] Figure 6 is a flow diagram illustrating the operation of an index value selector in accordance with one or more examples of the disclosure.
[0038] Figure 7 is a timing diagram illustrating a target index value calculation section in accordance with one or more examples of the disclosure.
[0039] Figure 8 is a flow diagram illustrating the operation of a comparator in accordance with one or more examples of the disclosure.
[0040] Figure 9 A configuration of an automatic trim device for an oscillator is shown in accordance with one or more examples of the disclosure.
[0041] Figure 10 Another configuration of an automatic trim device for an oscillator is shown in accordance with one or more examples of the disclosure.
[0042] Figure 11 is a flow diagram illustrating a method of automatic trimming of an oscillator in accordance with one or more examples of the disclosure.
[0043] Throughout the drawings and specific embodiments, identical reference labels can refer to identical elements. The drawings can not be to scale and the dimensions, proportions and depiction of the figures can be exaggerated for clarity, illustration and convenience, in that regard, the relative dimensions, proportions and depiction of the figures can be varied among the figures for the purpose of explanation. DETAILED DESCRIPTION
[0044] The following detailed description is provided to help the reader understand the methods, apparatus and / or systems described herein. However, various changes, modifications and equivalents can be apparent to the reader, in light of the disclosure provided herein, for example, the order of operations can be changed where necessary, the sequence of described operations can be changed, and other sequences can be provided, without departing from the disclosure. Moreover, the described operations can be omitted, in whole or in part, or additional operations can be provided, without departing from the disclosure. Additionally, features described as being part of one aspect or embodiment can be part of another aspect or embodiment, and vice versa.
[0045] The features described herein can be embodied in various forms, and should not be construed as being limited to the examples described herein. Rather, these examples are provided so that this disclosure will be thorough and complete, and fully convey the scope of the methods, apparatuses, and / or systems described herein to be understood as defined in the disclosure.
[0046] Reference will now be made in detail to implementations, examples of which are illustrated in the accompanying drawings. In this regard, the present implementations can have different forms and should not be construed as being limited to the descriptions set forth herein. Accordingly, the implementations are described below, by referring to the drawings, only to explain numerous aspects as follows. As used herein, the term “and / or” includes any and all combinations of one or more of the associated listed items. Expressions such as “at least one of,” when preceding a list of elements, modify the entire list of elements and do not modify the individual elements of the list.
[0047] Throughout the specification, when an element such as a layer, region, or substrate is referred to as being “on”, “connected to”, or “coupled to” another element, it can be directly on, directly connected to, or directly coupled to the other element, or one or more other elements can be interposed therebetween. In contrast, when an element is referred to as being “directly on”, “directly connected to”, or “directly coupled to” another element, there are no other elements interposed therebetween.
[0048] As used herein, the term “and / or” includes any one of the associated listed items, and any combination of any two or more of the associated listed items.
[0049] Although terms such as “first”, “second”, and “third” can be used herein to describe various components, members, regions, layers, or segments, the components, members, regions, layers, or segments are not limited by the terms. Rather, the terms are used only to distinguish one element, member, region, layer, or segment from another element, member, region, layer, or segment. Therefore, the first element, member, region, layer, or segment mentioned in the examples described herein can also be referred to as a second element, member, region, layer, or segment, without departing from the teachings of the examples.
[0050] For ease of description, spatially relative terms, such as "above", "up", "below", and "down", can be used herein for the purpose of illustrating one element's relationship to another element in the figures. Such spatially relative terms are intended to encompass different orientations of the device in use or operation in addition to the orientation depicted in the figures. For example, if a device in the figures is turned over, elements described as "above" or "up" relative to other elements would then be oriented "below" or "down" relative to the other elements. Accordingly, the term "above" encompasses both an up orientation and a down orientation. The device can also be oriented in other ways (e.g., rotated 90 degrees or at other orientations) and the spatially relative terms used herein are to be interpreted accordingly.
[0051] The terminology used herein is for the purpose of describing various examples only and is not intended to be limiting of the disclosure. As used herein, the articles "a", "an" and "the" are intended to include one or more items, unless the context clearly indicates otherwise. The terms "comprises", "comprising", "includes", "including" and "has" are intended to be inclusive and allow for other items to be present, but not to exclude the presence of items or addition of items.
[0052] Variations in the shapes of the elements illustrated in the drawings can occur. Accordingly, examples described herein are not limited to the particular shapes of elements illustrated in the drawings, but include variations in the shapes of the elements that occur during manufacturing.
[0053] As will be apparent from the disclosure of the present application, features of examples described herein can be combined in a variety of ways. Further, although examples described herein have a variety of configurations, other configurations are also possible in light of the disclosure of the present application.
[0054] Unless defined otherwise, all terms used herein including technical terms and scientific terms have the same meaning as those generally understood by one of ordinary skill in the art in the field of the disclosure based on the understanding of the disclosure of the present application. Terms such as those defined in a generally used dictionary should be interpreted as having a meaning consistent with the meaning in the context of the relevant technology and the disclosure of the present application, and should not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
[0055] The terms such as "include" or "has" used in the embodiments should not be interpreted as necessarily including all of the components or all of the operations described in the specification, but should be interpreted as possibly excluding some of the components or some of the operations, or as possibly further including additional components or operations.
[0056] The use of the term “may” with respect to an example or embodiment herein (e.g., with respect to what an example or embodiment can include or implement) means that at least one example or embodiment includes or implements that feature, and that not all examples are limited to this.
[0057] An automatic trimming apparatus and method for an oscillator according to examples are described in more detail with reference to the accompanying drawings.
[0058] The following description also relates to an automatic trimming apparatus for an oscillator that performs automatic trimming by detecting a target index value, and a corresponding automatic trimming method.
[0059] The following description describes a way to provide an automatic trimming apparatus for an oscillator that has improved accuracy while also reducing the time required for automatic trimming, and a corresponding automatic trimming method.
[0060] Figure 2 A configuration of an automatic trimming apparatus for an oscillator according to one or more examples of the present disclosure is shown.
[0061] Referring to Figure 2 According to non-limiting examples of the present disclosure, an automatic trimming apparatus 100 for an oscillator can include a reference time receiver 110, a desired value register 120, a subtracter 130, an oscillator 140, an index value selector 150, a comparator 160, an index value register 170, a minimum value register 180, and an embedded memory 190.
[0062] The reference time receiver 110 can receive a reference time signal REF_SIG for calculating a target frequency of the oscillator 140 from the outside of the automatic trimming apparatus 100.
[0063] Next, the desired value register 120 can output a desired value. Specifically, the desired value register 120 can output a desired value for a target frequency to the subtracter 130. For example, the desired value can be a clock number of the target frequency during a section in which the reference time signal REF_SIG is high.
[0064] The oscillator 140 can generate and output an oscillator clock signal. More specifically, the oscillator 140 can generate and output an oscillator clock signal according to a corresponding oscillator trimming code.
[0065] The subtracter 130 can output a difference DIFF between the desired value and the oscillator clock signal. More specifically, during a section in which the reference time signal REF_SIG is high, the subtracter 130 can count the clock number of the oscillator clock signal. The subtracter 130 can output a value obtained by subtracting the counting result from the desired value as the difference DIFF.
[0066] The index value selector 150 can detect and output a target index value obtained using the difference value DIFF. More specifically, the index value selector 150 can calculate a unit index value from the difference value DIFF, and can detect and output the target index value using the unit index value.
[0067] The index value refers to a bit value indicating a specific frequency, and the target index value denotes an index value corresponding to a target frequency.
[0068] The unit index value can be a unit referred to as UNIT_STEP, which includes a plurality of index values and an index value used to detect a target index value.
[0069] Specifically, in the case where the unit UNIT_STEP has a value of 100, for example, increasing the unit index value by 1 can correspond to increasing the index value by 100. The unit index value can be a head value of an array including 100 index values. In such an example, if the total index value exists up to a value of 1000, the index value numbers 1, 101, 201, …, 901, etc. can correspond to the unit index value. The unit index values can be distinguished as corresponding to the unit index values 1, 2, …, etc., respectively. However, the disclosure is not limited to these enumerated non-limiting examples, and the value of the unit UNIT_STEP can be set to another value in consideration of optimization and / or management aspects of the operational efficiency of the index value selector 150.
[0070] The index value selector 150 detects a unit index value corresponding to a target frequency using the unit index value in a wide range, and then operates in a fine range based on the corresponding unit index value used to detect an index value corresponding to the target frequency, using the index value as a basis for outputting a target index value. Details of the calculation of the index value selector 150 will be described later with reference to FIG. 2. Figure 4 The details of the calculation of the index value selector 150 will be described in more detail.
[0071] The comparator 160 can receive the difference values and output such difference values as a target difference value. The minimum value register 180 can store the target difference value output by the comparator 160.
[0072] Specifically, the comparator 160 can output a smaller value from among the received difference value and the minimum value previously stored in the minimum value register 180 as the target difference value. The minimum value stored in the minimum value register 180 for the first time can be set to an appropriate maximum value. In such an example, because the initial difference value is smaller than the minimum value stored for the first time, the comparator 160 can output the initial difference value as the target difference value.
[0073] The index value register 170 can output the oscillator trimming code corresponding to the target index value. Specifically, when the target index value and the oscillator trimming code are different, the index value register 170 can receive the target index value from the index value selector 150 and can output the corresponding oscillator trimming code to the oscillator 140 and can store the outputted oscillator trimming code accordingly.
[0074] The embedded memory 190 can be a merged flash and logic (MFL) device in which a flash memory and a logic element are merged together. Since such an architecture can implement a separate memory and a logic together in one chip, such an approach can have the advantages of miniaturization, low power, high speed, and low electromagnetic interference (EMI) noise implementation.
[0075] The embedded memory 190 can include a control region and a storage region. Such a control region can store various program codes and / or machine instructions required to drive the automatic trimming device 100 and transmit a control signal to each component, as appropriate.
[0076] The storage region can store the oscillator trimming code corresponding to the desired value for each frequency and can also store the target index value.
[0077] When the difference value DIFF satisfies a predetermined condition, the control region can function to control so as to terminate the automatic trimming operation of the automatic trimming device 100.
[0078] According to an example, the predetermined condition can be a case where the difference value is within a predetermined range. More specifically, the predetermined range can be a non-limiting example in which the target difference value stored in the minimum value register 180 is within a range greater than -1 and less than 1. When the target difference value satisfies such a predetermined range, the minimum value register 180 can receive the oscillator trimming code corresponding to the target difference value from the index value register 170 and can output the oscillator trimming code into the embedded memory 190 so as to terminate the automatic trimming operation of the automatic trimming device 100. However, the present disclosure is not limited to these non-limiting examples of values, and can be set to another value in consideration of the frequency difference between the index values.
[0079] According to an example, the predetermined condition can be an example in which the index value register 170 receives the target index value more than a predetermined number of times. More specifically, the predetermined number of times can be the number of bits of the index value -1. Thus, for example, when the index value corresponding to the frequency is 9-bit information, the predetermined number of times can be 8 times, which is 1 less than the index value. However, the present disclosure is not limited to such a non-limiting example, and the predetermined number of times can be set to a smaller value or a larger value in consideration of optimizing and / or managing the efficiency of the automatic trimming operation.
[0080] As described above, the automatic trimming apparatus 100 for an oscillator according to an example can detect a target index value by dividing a large range according to a unit index value and dividing a small range according to an index value, and thus can improve the speed and / or accuracy of an automatic trimming process.
[0081] Figure 3 Another configuration of an automatic trimming apparatus for an oscillator according to one or more examples of the disclosure is illustrated.
[0082] Referring to Figure 3 When the target index value and the oscillator trimming code are the same, the index value selector 150 can output the target index value to the oscillator 140 and can store the target index value to the index value register 170 accordingly. The operations of the remaining components are the same as described in Figure 2 for brevity.
[0083] Figure 4 is a timing diagram illustrating the operation of a subtracter according to one or more examples of the disclosure.
[0084] The subtracter 130 can output a value obtained by subtracting the number of clocks of the oscillator clock signal in a section in which the reference time signal REF_SIG can be high or 1 from the desired value, as a difference value DIFF. More specifically, referring to Figure 4 , the subtracter 130 can count the number of clocks of the oscillator clock signal during the P1 section and can finally output "desired value - (N-1)" as the value of the difference value DIFF.
[0085] Accordingly, the output DIFF of the subtracter can be expressed as Equation 1 below.
[0086] Equation 1:
[0087] Difference value DIFF = desired value - number of clocks of the oscillator during a section in which the reference time signal REF_SIG is 1
[0088] The oscillator frequency being trimmed, i.e., the current oscillator frequency, can be calculated as Equation 2 below.
[0089] Equation 2:
[0090] Current oscillator frequency = ((desired value - difference value DIFF) * target frequency) / desired value
[0091] As a result of Equation 2, when the difference value DIFF is 0, i.e., when the desired value and the number of clocks of the oscillator are the same, the current oscillator frequency can become equal to the target frequency.
[0092] Figure 5A process of outputting a target index value by an index value selector according to one or more examples of the present disclosure is shown.
[0093] The index value selector 150 can detect and output the target index value in a large range and a small range by using the difference value DIFF as an output of the subtracter.
[0094] In detail, referring to Figure 5 , as a non-limiting example, the index value selector 150 can include a divider 151, a binary search 152, a selector 153, an index value calculator 154, and a current index value register 155.
[0095] The divider 151 can calculate a unit index value according to the difference value DIFF. More specifically, the divider 151 can calculate the unit index value using a change value per unit step of the index value. The change value per unit step of the index value can be a frequency change value * unit (UNIT_STEP) between adjacent index values, which is calculated as a product of the following.
[0096] According to an example, when the unit (UNIT_STEP) is 100 and the frequency change value is 10, the change value per unit step of the index value is 1000 or a product of the unit and the frequency change value. When the difference value DIFF output by the subtracter 130 is +1000, the divider 151 can set +1 (+1000 / 1000) as the unit index change value OFFSET1, and assuming that the initialized unit index value is 1, the divider 151 can add the unit index change value OFFSET1 to the initialized unit index value, and can output 2 as the unit index value.
[0097] The binary search 152 can search for a target index value according to the difference value DIFF in order to output a search result. More specifically, the binary search 152 can perform a binary search based on an index value as a reference, and output a search result. Here, the binary search refers to a search method of reducing a search range by 1 / 2 by comparing a reference value with a target value.
[0098] If the sign of the difference value DIFF received by the binary search 152 is positive, the current oscillator frequency will be increased since it is lower than the target frequency, and if the sign of the difference value DIFF received by the binary search 152 is negative, the current oscillator frequency will be decreased since it is higher than the target frequency. Accordingly, as shown in Equation 3 below, the binary search 152 can output a search result according to the sign of the difference value DIFF.
[0099] Equation 3:
[0100] Search result = ±2 M-N
[0101] In Equation 3, M is the number of bits of the index value, and N indicates the number of times of the binary search. The sign of the search result can be taken as the same as the sign of the difference value DIFF. In an example in which the binary search is performed for the first time, in a case in which the number of bits of the index value is 9 and the sign of the difference value DIFF is positive, the binary search 152 can output +2 9-1 , that is, +256 as the search result.
[0102] The selector 153 can selectively transmit the output value of the divider 151 or the output value of the binary search 152 to the index value calculator 154. More specifically, the selector 153 can transmit the output value of the divider 151 at the time of initial calculation, and can transmit the output value of the binary search 152 from the next calculation.
[0103] The index value calculator 154 can calculate the target index value using the output value of the divider 151 or the output value of the binary search 152.
[0104] More specifically, the index value calculator 154 can calculate the target index value using the value transmitted by the selector 153.
[0105] The selector 153 can transmit the output value of the divider 151 at the time of initial calculation. The output value of the divider 151 can be a unit index value, and the index value calculator 154 can calculate the target index value corresponding to the unit index value. More specifically, for example, when the unit (UNIT_STEP) is 100 and the unit index value output by the divider 151 is 2, the corresponding target index value can be 101. Accordingly, the index value calculator 154 can output 101 as the target index value.
[0106] After the time of the second calculation, the selector 153 can then transmit the output value of the binary search 152. The output value of the binary search 152 can be the search result of the binary search, and can be added to the first target index value, for example, 101, of the index value calculator 154 in order to calculate the second target index value. If the search result is +256, the second target index value can be 357.
[0107] The current index value register 155 can be used to maintain the output of the current target index value before a new target index value is output by the current target index value.
[0108] Figure 6 is a flowchart illustrating the operation of an index value selector according to one or more examples of the present disclosure.
[0109] For convenience of explanation, it is assumed that the information of the index value is 9 bits, the initialized unit index value or index value is 1, and the frequency corresponding to the index value 1 is 10000 Hz, the frequency difference between the index values is 10 Hz, and the unit (UNIT_STEP) is 100. However, these are non-limiting examples for helping understanding, and other examples use other values than these examples.
[0110] Referring to Figure 6 In operation S200, the index value selector 150 can initialize the unit index value or index value. The initialized unit index value can be 1, and the corresponding index value can be 000000001.
[0111] In operation S210, the index value selector 150 can initialize a fine bisection index detection value corresponding to the number of repetitions M for detecting the index value in a small range. In such an example, K is the number of bits of the index value. Further, in such an example, the number of repetitions M is 8.
[0112] In operation S220, the index value selector 150 can receive the output value DIFF of the subtracter 130.
[0113] Because the output value DIFF corresponds to the difference between the expected value corresponding to the target frequency during the section in which the reference time signal is high and the number of clocks of the oscillator, the frequencies are not necessarily the same, but in the present non-limiting example, it is assumed that the frequencies are the same for convenience of understanding. For example, when the target frequency is 12530 Hz, the subtracter 130 can output 12530-10000=+2530 as the output value DIFF.
[0114] In operation S230, in an example in which the output value DIFF is the first measurement value, the divider 151 can perform operation S240 through the selector 153. More specifically, the divider 151 can calculate and output the unit index value. Because the change value per unit step of the index value can be 10*100=1000, the divider 151 can be 2530 / 1000=2.5, that is, the divider 151 adds the integer 2 as the unit index change value OFFSET1 to the initialized unit index value 1. Accordingly, in such an example, the divider 151 outputs 3 as the unit index value.
[0115] In operation S241, the index value calculator 154 can output the index value corresponding to the unit index value as the target index value. Because the size of the unit (UNIT_STEP) can be 100, in an example in which the unit index value is 1, the corresponding index value can be 1, in an example in which the unit index value is 2, the corresponding index value can be 101, and in an example in which the unit index value is 3, the corresponding index value can be 201. The index value calculator 154 can output 201 as the target index value.
[0116] In operation S230, in an example in which the output value DIFF is not identical to the first measured value, the bisection search 152 can perform operation S250 through the selector 153. If the sign of the subtraction result DIFF is negative, -2 M is output as a search result, and if the sign of the subtraction result DIFF is positive, +2 M is output as a search result.
[0117] Specifically, the frequency corresponding to the target index value 201 of the first round can be 12000 Hz. Accordingly, the subtracter 130 can output 12530-12000 = +530 as the difference value DIFF. Because the sign of the difference value DIFF is positive, the bisection search 152 can output +2 9-1 = +256 as a search result.
[0118] In operation S260, the index value selector 150 subtracts 1 from the search number M.
[0119] In operation S270, in an example in which the search number M is less than 0, the index value selector 150 can terminate the index value selection. If the search number M is greater than or equal to 0, the process can return to S241, and the index value calculator 154 can calculate the target index value using the search result. Specifically, the index value calculator 154 can output 457 as the target index value, 457 being a value obtained by adding the search result +256 to the first target index value 201.
[0120] A summary of the calculation of the target index value according to the repeated bisection search is shown in Table 1 below:
[0121] Table 1
[0122] M Difference DIFF Search result Target index value Frequency (Hz) 8 12530-12000=+530 +2 8 = +256 =201+256(=457)->111001001 14560 Hz 7 12530-14560=-2030 -2 7 = -128 =457-128(=329)->101001001 13280 Hz 6 12530-13280=-750 -2 6 = -64 =329-64(=265)->100001001 12640 Hz 5 12530-12640=-110 -2 5 = -32 =265-32(=233)->011101001 12320 Hz 4 12530-12320=+210 +2 4 = +16 =233+16(=249)->011111001 12480 Hz 3 12530-12480=+50 +2 3 = +8 =249+8(=257)->100000001 12560 Hz 2 12530-12560=-30 -2 2 = -4 =257-4(=253)->011111101 12520 Hz 1 12530-12520=+10 +2 1 = +2 =253+2(=255)->011111111 12540 Hz
[0123] As described above, the automatic trimming apparatus 100 for an oscillator according to one or more examples detects the target index value by dividing a large range using a unit index value and dividing a small range using an index value, thereby performing the automatic trimming more quickly. Figure 7is a timing diagram illustrating a section for calculating a target index value according to one or more examples of the present disclosure.
[0124] Referring to Figure 7 , P2 is Figure 7 a section for detecting a target index value for the first time. At P2, the selector 153 can transmit the output value of the divider 151 to the index value calculator 154. Then, the selector 153 can transmit the output value of the bisection searcher 152 to the index value calculator 154 in the next section P3. The detailed calculation method can be the same as described with reference to Figure 5 and Figure 6 .
[0125] Figure 8 is a flowchart illustrating an operation of the comparator according to one or more examples of the present disclosure.
[0126] Referring to Figure 8 , when the subtracter 130 outputs the difference value DIFF in operation S300, the comparator 160 can receive the difference value DIFF.
[0127] In operation S310, the comparator 160 can refer to the current target difference value in the minimum value register 180.
[0128] In operation S320, when the difference value DIFF is less than the current target difference value, the comparator 160 can output the corresponding difference value DIFF to the minimum value register 180. In operation S330, the minimum value register 180 can store the received difference value DIFF as the current target difference value, and can receive and store the corresponding oscillator trim code from the index value register 170.
[0129] In operation S320, when the difference value DIFF is greater than the current target difference value, the comparator 160 can maintain the current target difference value stored in the minimum value register 180. Accordingly, in operation S340, the oscillator trim code and the target difference value stored in the minimum value register 180 can be maintained as the same as before.
[0130] Figure 9 A configuration of an automatic trim device according to one or more examples of the present disclosure is illustrated.
[0131] Referring to Figure 9 , the automatic trim device 100 according to one or more examples can further include an average value calculator 200.
[0132] After receiving the difference value DIFF output by the subtracter 130 a plurality of times, the average value calculator 200 can calculate and output an average difference value AVG_DIFF from the plurality of difference values.
[0133] The average value calculator 200 can compensate for an operation error due to a clock of the subtracter 130 by calculating and outputting an average difference value AVG_DIFF.
[0134] Specifically, after receiving a value output by the subtracter 130 a predetermined number of times, the average value calculator 200 can calculate and output an average difference value AVG_DIFF by using a plurality of difference values previously received.
[0135] The predetermined number of times can be set to various values in consideration of efficiency of automatic trimming. In a non-limiting example in which the predetermined number of times is 3, the average value calculator 200 can calculate an average difference value AVG_DIFF by adding all of the plurality of difference values DIFF1, DIFF2, and DIFF3 and dividing the added value by 3.
[0136] Figure 10 Another configuration of an automatic trimming apparatus of an oscillator according to one or more examples of the disclosure is illustrated.
[0137] Referring to Figure 10 When the target index value and the oscillator trimming code are the same value, the index value selector 150 can output the target index value to the oscillator 140 and store the target index value in the index value register 170. Descriptions of operations of the remaining components are the same as those in Figure 9 described in
[0138] Figure 11 is a flowchart illustrating an automatic trimming method of an oscillator according to one or more examples of the disclosure.
[0139] Referring to Figure 11 , the automatic trimming method of an oscillator according to an example can include a step of calculating a difference value in operation S400, a step of calculating a target index value in operation S500, a step of transmitting the target index value in operation S600, and a step of storing the target index value in operation S700.
[0140] In the step of calculating a difference value in operation S400, a difference between a desired value of a target frequency and a number of clocks of an oscillator signal during a section in which a value of a reference time signal of the subtracter 130 is high can be output as a difference value.
[0141] The step of calculating a difference value in operation S400 can include a first calculation step in which the subtracter 130 calculates and outputs a difference value, and a second calculation step in which the average value calculator 200 calculates and outputs an average difference value from a plurality of difference values after receiving the difference values a plurality of times.
[0142] In the step of calculating the target index value in operation S500, the index value selector 150 can calculate a unit index value using the difference value, and can detect and output the target index value according to the unit index value. More specifically, the step of calculating the target index value in operation S500 can include a unit calculation step and a fine calculation step.
[0143] In the unit calculation step, the divider 151 can calculate a unit index value according to the difference value, and the index value calculator 154 can calculate and output the target index value according to the unit index value.
[0144] In the fine calculation step, the dichotomy searcher 152 can search for the target index value according to the difference value to output a search result, and the index value calculator 154 can calculate and output the target index value according to the search result.
[0145] According to an example, the unit calculation step can be initially performed in the step of calculating the target index value in operation S500, and then the fine calculation step can be repeated only thereafter.
[0146] According to an example, the index value selector 150 can detect the target index value using the average difference value output by the average value calculator 200 instead of the difference value.
[0147] In the step of transmitting the target index value in operation S600, the index value register 170 can output an oscillator trimming code corresponding to the target index value to the oscillator 140. More specifically, the step of transmitting the target index value in operation S600 can include a minimum value determination step.
[0148] In the minimum value determination step, the comparator 160 can receive the difference value, and can output a smaller value from among the previously stored minimum value and the difference value as a target difference value.
[0149] In the step of storing the target index value in operation S700, the oscillator trimming code is stored in the embedded memory 190 as a target oscillator trimming code. More specifically, the embedded memory 190 can compare a difference value of an example in which the bisection search 152 present in the index value selector 150 has completed a search a predetermined number of times with a target difference value stored in the minimum value register, and when the difference value is less than the target difference value, can output the oscillator trimming code stored in the index value register 170 and store in the embedded memory 190, or the minimum value register 180 can receive the oscillator trimming code stored in the index value register 170, and can output the oscillator trimming code to the embedded memory 190. Further, the embedded memory 190 can store the oscillator trimming code. If the difference value is greater than the target difference value stored in the minimum value register 180, the oscillator trimming code stored in the minimum value register 180 can thus be output and stored to the embedded memory 190. In another example, when the difference value is within a predetermined range, the minimum value register 180 can receive the oscillator trimming code corresponding to the difference value from the index value register 170, and can subsequently output and store the oscillator trimming code to the embedded memory 190.
[0150] As described above, the oscillator automatic trimming method according to one or more examples can detect a target index value by dividing into a large range and a small range, in order to thereby improve the speed and accuracy of the automatic trimming process.
[0151] Examples have been described above, with the intent to explain the execution of the methods indicating certain functions and their relationships. The boundaries and order of these functional components and methods have been arbitrarily defined, and the examples used herein are intended to facilitate the description.
[0152] Alternative boundaries and orderings can be defined as long as the same important function is appropriately performed. Accordingly, any such alternative boundaries and orderings are within the scope and spirit of the claimed disclosure.
[0153] Further, the boundaries of these functional components have been arbitrarily defined for the convenience of description. Alternative boundaries can be defined as long as any important function is appropriately performed. Likewise, the flowchart blocks can also be arbitrarily defined herein to represent any important function.
[0154] For expanded usage, the flowchart block boundaries and orderings have been defined and some important functions can still be performed. Accordingly, alternative definitions of the functional components, both flowchart blocks and sequences, are within the scope and spirit of the claimed disclosure.
[0155] The disclosure can also be described, at least in part, according to one or more examples. Examples of the disclosure are used herein to illustrate the disclosure, aspects, features, concepts and / or examples thereof. Physical examples of apparatuses, articles of manufacture, machines and / or processes that implement examples can include one or more aspects, features, concepts, examples and / or the like described with reference to one or more examples described herein.
[0156] Furthermore, in all of the drawings, examples can incorporate identical or similar nomenclature and / or components, which can be understood the same or differently, and as such, these components, steps, modules, etc. can be the same or similar components, steps, modules, etc. or other components, steps, modules.
[0157] While the disclosure includes specific examples, it will be apparent after an understanding of the present disclosure that various changes in form and details can be made without departing from the spirit and scope of the claims and their equivalents. The examples described herein are to be considered in a descriptive sense only and not for purposes of limitation. Descriptions of features or aspects in each example should be considered as being applicable to similar features or aspects in other examples. Suitable results can be achieved if the described techniques are performed in a different order, and / or if the components of the described systems, architectures, devices, or circuits are combined in a different manner, and / or if the components are supplied by a different number or type of manufacturers, or if other components are used. Therefore, the scope of the disclosure is defined not by the specific embodiments discussed, but by the appended claims and their equivalents.
Claims
1. An automatic trimming apparatus comprising: an oscillator configured to generate an oscillator clock signal; a subtracter configured to receive a desired value for a target frequency and the oscillator clock signal, and configured to output a difference between the desired value and the oscillator clock signal; a comparator configured to receive the difference of the subtracter; an index value selector configured to calculate a unit index value using the difference, and configured to detect and output a target index value from the unit index value; an index value register configured to output an oscillator trimming code corresponding to the target index value to the oscillator; and an embedded memory configured to store the oscillator trimming code as a target oscillator trimming code for the target frequency.
2. The automatic trimming apparatus according to claim 1, the subtracter is configured to receive a reference time signal, wherein wherein the desired value is a clock number of the target frequency during a section in which the reference time signal is high, and wherein the difference is a value obtained by subtracting a clock number of the oscillator clock signal during a section in which the reference time signal is high from the desired value.
3. The automatic trimming apparatus according to claim 1, the index value selector includes: wherein a divider configured to calculate a unit index value from the difference; a binary search selector configured to search a target index value from the difference to output a search result; and an index value calculator configured to calculate the target index value using the unit index value or the search result.
4. The automatic trimming apparatus according to claim 3, the index value selector includes a current index value register configured to hold a target index value output from the index value selector until a next target index value is output. wherein 5. The automatic trimming apparatus according to claim 3, the index value calculator is configured to calculate the target index value using the unit index value only at an initial calculation. wherein 6. The automatic trimming apparatus according to claim 5, the index value calculator is configured to calculate the target index value using a search result of the binary search selector a predetermined number of times after outputting the target index value using the unit index value. wherein 7. The automatic trimming apparatus according to claim 1, further comprising: a minimum value register configured to provide a target difference value compared with a subtracter output in the comparator.
8. The automatic trimming apparatus according to claim 1, the embedded memory is configured to store the oscillator trimming code as the target oscillator trimming code in response to the difference being within a predetermined range, or configured to store the oscillator trimming code corresponding to a case where the difference is the smallest as the target oscillator trimming code in response to the index value register receiving the target index value a predetermined number of times. wherein, 9. The automatic trimming apparatus according to claim 1, further comprising: an average calculator configured to receive the difference values multiple times and calculate and output an average difference value from the multiple difference values, wherein the index value selector is configured to detect the target index value using the average difference value.
10. An automatic trimming apparatus comprising: an oscillator configured to generate an oscillator clock signal; a subtracter configured to receive a desired value for a target frequency and the oscillator clock signal to output a difference value between the desired value and the oscillator clock signal; a comparator configured to receive the difference value of the subtracter; an index value selector configured to calculate a unit index value using the difference value and configured to detect a target index value from the unit index value to provide to the oscillator; an index value register configured to receive and store the target index value; and an embedded memory configured to store the target index value for the target frequency.
11. The automatic trimming apparatus of claim 10, the embedded memory is configured to store a target index value in response to the difference value being within a predetermined range or store a target index value corresponding to a case where the difference value is smallest in response to the index value register receiving the target index value a predetermined number of times. wherein 12. A method for automatic trimming comprising: calculating a difference value by using a subtracter to output a difference between a desired value for a target frequency and a clock number of an oscillator signal during a section where a reference time signal is high; calculating a target index value by using an index value selector to calculate a unit index value using the difference value and to detect and output a target index value from the unit index value; sending the target index value by using an index value register to output an oscillator trimming code corresponding to the target index value to an oscillator; outputting a target difference value from a received difference value and a minimum value previously stored in a minimum value register by using a comparator to receive the difference value from the subtracter and output a smaller value from the received difference value and the minimum value; and storing the target index value by using an embedded memory to store the oscillator trimming code as a target oscillator trimming code.
13. The method for automatic trimming of claim 12, the calculating the target index value comprises: wherein performing a unit calculation by using a divider to calculate a unit index value from the difference value and using an index value calculator to calculate and output the target index value from the unit index value; and performing a fine calculation by using a binary search calculator to search for a target index value from the difference value and output a search result and using the index value calculator to calculate and output the target index value from the search result.
14. The method for automatic trimming of claim 13, the calculating the target index value comprises: wherein, initially performing the unit calculation and then performing the fine calculation.
15. The method for automatic trimming of claim 12, the storing the target index value comprises: wherein, storing the oscillator trim code as the target oscillator trim code by the embedded memory in response to the difference being within a predetermined range, or storing the oscillator trim code corresponding to a case where the difference is smallest as the target oscillator trim code by the embedded memory in response to the index value register receiving the target index value a predetermined number of times.
16. The method for automatic trimming according to claim 15, wherein, the storing the target index value includes: outputting the target oscillator trim code stored in the embedded memory from a minimum value register in response to the difference being within a predetermined range.
17. The method for automatic trimming according to claim 15, wherein, the storing the target index value includes: outputting the target oscillator trim code stored in the embedded memory from the index value register or a minimum value register in response to the target index value being received by the index value register a predetermined number of times.
18. The method for automatic trimming according to claim 12, wherein the calculating difference includes: performing a first calculation, wherein the subtracter calculates and outputs the difference; and performing a second calculation, wherein an average value calculator calculates and outputs an average difference from a plurality of differences after receiving the difference a plurality of times, wherein the calculating the target index value includes: detecting the target index value using the average difference using the index value selector.
19. A method for automatic trimming, comprising: calculating a difference by using a subtracter to output a difference between a desired value of a target frequency and a clock number of an oscillator signal during a segment where a reference time signal is high as a difference; calculating a target index value by using an index value selector to calculate a unit index value using the difference, and detecting and outputting the target index value from the unit index value, the calculating including a unit calculation and a fine calculation; and sending the target index value by using an index value register to output an oscillator trim code corresponding to the target index value to an oscillator to be stored as a target oscillator trim code, wherein the fine calculation includes using a bisection searcher to search for a target index value from the difference and output a search result, and using an index value calculator to calculate and output the target index value from the search result.
20. The method for automatic trimming according to claim 19, wherein the unit calculation includes using a divider to calculate a unit index value from the difference, and using an index value calculator to calculate and output the target index value from the unit index value.
21. The method for automatic trimming according to claim 19, wherein, the target oscillator trim code is stored in an embedded memory.
Citation Information
Patent Citations
High-accuracy oscillator and self-calibration method thereof
CN102201801A
Oscillator auto-trimming method and semiconductor device using the method
CN103219038A