Oscillator frequency drift compensation

The semiconductor device uses two on-chip oscillators in normal and temperature-compensated modes to measure and correct frequency drift, addressing aging and environmental effects, ensuring long-term stability without external components.

US20260379429A1Pending Publication Date: 2026-11-26TEXAS INSTRUMENTS INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
US19/679035
Authority / Receiving Office
US · United States
Patent Type
Applications(United States)
Current Assignee / Owner
Priority Date
2025-05-21
Filing Date
2026-05-15
Publication Date
2026-11-26

AI Technical Summary

Technical Problem

Existing on-chip oscillators suffer from frequency drift due to aging and environmental factors, necessitating external references or additional calibration oscillators, which increase area overhead and complexity.

Method used

A semiconductor device employs two on-chip oscillators operating in normal and temperature and aging-compensated modes, with a compensation circuit to measure frequency drift by subtracting count values, using a TAC resistor to reduce electrical stress and maintain long-term accuracy without external components.

Benefits of technology

The solution provides accurate frequency compensation over the operational lifetime, reducing area overhead and eliminating the need for external references, while maintaining frequency stability across varying temperatures and ages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure US20260379429A1-D00000_ABST
    Figure US20260379429A1-D00000_ABST
Patent Text Reader

Abstract

A semiconductor device includes a first oscillator and a second oscillator. The semiconductor device includes a compensation circuit having a first input coupled to the first oscillator, a second input coupled to the second oscillator and an output. The semiconductor device further includes a comparator having a first input coupled to an output of the compensation circuit. The semiconductor device also includes a trim controller having an input coupled to an output of the comparator, a first output coupled to the first oscillator and a second output coupled to the second oscillator. Frequency drift is accumulated by the first oscillator and the second oscillator as a function of an age of the semiconductor device.
Need to check novelty before this filing date? Find Prior Art

Description

CROSS REFERENCE TO RELATED APPLICATION

[0001] This application claims the benefit of priority to Indian Provisional Application No. 202541048986, filed on 21 May 2025, which application is incorporated herein by reference in its entirety.TECHNICAL FIELD

[0002] The present disclosure relates to a semiconductor device with a circuit to compensate for the frequency drift of an oscillator.BACKGROUND

[0003] On-chip oscillators, such as resistive-capacitive (RC) oscillators are used in system-on-chip (SoC) devices to generate reference clock signals for embedded processors, analog-to-digital converters, communication interfaces and other digital and mixed-signal subsystems. An RC oscillator generates a periodic output by repeatedly charging a capacitor through a resistor with a reference current and comparing the capacitor voltage against a reference voltage to produce a switching waveform. The oscillation frequency is determined by the resistance and capacitance values of the timing components and is often expressed as a function of the product RC. Because RC oscillators can be fabricated from standard on-chip components without external resonators, a cost-effective and area-efficient solution for precision timing in embedded applications is provided. Production-time trimming of the resistive timing element is employed to calibrate the oscillation frequency to a target value, compensating for process variation across fabricated devices.

[0004] To ensure long-term frequency accuracy across operating conditions, various calibration and compensation techniques have been developed. External frequency references, such as crystal oscillators, are employable to provide a stable timing source against which an on-chip oscillator is measured and corrected. Component selection and material engineering have been applied to reduce the sensitivity of oscillation frequency to environmental and operational variables, such as temperature, mechanical stress and electrical aging.SUMMARY

[0005] A first example relates to a semiconductor device that includes a first oscillator and a second oscillator. The semiconductor device includes a compensation circuit having a first input coupled to the first oscillator, a second input coupled to the second oscillator and an output. The semiconductor device further includes a comparator having a first input coupled to an output of the compensation circuit. The semiconductor device also includes a trim controller having an input coupled to an output of the comparator, a first output coupled to the first oscillator and a second output coupled to the second oscillator. Frequency drift is accumulated by the first oscillator and the second oscillator as a function of an age of the semiconductor device.

[0006] A second example relates to a circuit that includes a voltage reference terminal and a first resistor having a first terminal coupled to the voltage reference terminal and a second terminal. The circuit also includes a first capacitor having a first terminal and a second terminal and a second capacitor having a first terminal and a second terminal. The circuit further includes a first plurality of switches coupling the first capacitor and the second capacitor to the second terminal of the first resistor and a comparator having a first input coupled to the first capacitor and the second capacitor and a second input coupled to the voltage reference terminal. The circuit also includes a second resistor having a first terminal and a second terminal, the second resistor being formed from metal or a high activation energy material and a second plurality of switches having a first terminal coupled to the first terminal of the second resistor and a second terminal coupled to the second terminal of the second resistor. The second plurality of switches couples the second resistor between the first capacitor and ground or between the second capacitor and ground.

[0007] A third example relates to a method that includes operating a first oscillator and a second oscillator in a normal mode. Frequency drift is accumulated by the first oscillator and the second oscillator as a function of age. The method also includes counting, by a first counter, cycles of the first oscillator during a first count window defined by a predetermined number of cycles of the second oscillator operating in the normal mode to generate a first count value and switching the second oscillator to operate in a temperature and aging compensated mode. The method further includes counting, by the first counter, cycles of the first oscillator during a second count window defined by the predetermined number of cycles of the second oscillator operating in the temperature and aging compensated mode to generate a second count value and computing a difference value by subtracting the second count value from the first count value. The method also includes comparing the difference value to an expected count value to generate a comparison result and generating a magnitude trim signal based on the comparison result and applying the magnitude trim signal to select a particular resistance in a resistor bank of the first oscillator to adjust a frequency of the first oscillator.BRIEF DESCRIPTION OF THE DRAWINGS

[0008] FIG. 1 illustrates a semiconductor device for frequency drift compensation of on-chip oscillators.

[0009] FIG. 2 illustrates a block diagram of a semiconductor device including details of a compensation circuit and a trim controller.

[0010] FIG. 3 illustrates a circuit diagram of a differential oscillator supporting normal mode and temperature and aging compensated (TAC) mode operation.

[0011] FIG. 4A illustrates the oscillator of FIG. 3 operating in a first half-cycle of normal mode.

[0012] FIG. 4B illustrates the oscillator of FIG. 3 operating in a second half-cycle of normal mode.

[0013] FIG. 4C illustrates the oscillator of FIG. 3 operating in a first half-cycle of TAC mode.

[0014] FIG. 4D illustrates the oscillator of FIG. 3 operating in a second half-cycle of TAC mode.

[0015] FIG. 5 illustrates a flowchart of a method for frequency drift compensation of an on-chip oscillator.

[0016] The same reference numbers or other reference designators are used in the drawings to designate the same or similar (either by function and / or structure) features.DETAILED DESCRIPTION

[0017] This description provides a semiconductor device for frequency drift compensation of on-chip oscillators that employs a built-in self-calibration architecture in which two on-chip oscillators are employed cooperatively to generate a frequency measurement that is independent of aging-induced drift in either oscillator. A compensation circuit directs a reference oscillator to operate successively in a normal mode and a temperature and aging compensated (TAC) mode, counting cycles of a device-under-test oscillator during each mode to produce two count values whose difference is proportional to the frequency of the device-under-test oscillator and is independent of the absolute period of the reference oscillator. Because aging-induced drift in the reference oscillator affects both count values equally, the drift is cancelled by the subtraction and does not introduce error into the frequency measurement.

[0018] A TAC resistor introduced into the reference oscillator charging path during TAC mode operation is biased to carry alternating current during TAC mode measurements to reduce electromigration-induced degradation and is held nonconducting during normal operation to limit electrical stress over the lifetime of the device. The TAC resistor is formed from a material resistant to thermal aging. Temperature invariance of the period decrement introduced in TAC mode is maintained through proportional-to-absolute-temperature biasing of the reference oscillator, with a slope trim code selected based on the active mode to compensate for the temperature coefficient of the TAC resistor across the operating temperature range. A trim controller compares the frequency measurement against an expected value stored in one-time programmable memory and generates a magnitude trim signal that adjusts the frequency of the device-under-test oscillator toward a target frequency, providing frequency correction at each power-on event or periodically (e.g., every 1000 hours of operation or longer) over the operational lifetime of the device.

[0019] The frequency drift compensation approach described herein maintains long-term oscillator frequency accuracy without the need for an external crystal oscillator, a precise external resistor or a dedicated power-gated calibration oscillator. This reduces the area overhead relative to prior approaches that employ a separately designed calibration oscillator. Additionally, because the two oscillators have a similar structure, the roles of the device-under-test oscillator and the reference oscillator are interchangeable across successive calibration operations, allowing each oscillator to be trimmed against the other and enabling both oscillators to be maintained at the target frequency over the operational lifetime of the device using a single shared oscillator design. Aging-induced drift is cancelled through the subtraction of normal mode and TAC mode count values. Temperature invariance of the TAC mode period decrement is maintained across the operating range, and electrical stress on the TAC resistor is curtailed over the lifetime of the device. Together, these properties provide a self-contained frequency calibration system suited for deployment in applications where long-term clock frequency stability is needed.

[0020] FIG. 1 illustrates a semiconductor device 100 for frequency drift compensation of on-chip oscillators, such as clock generators. A first oscillator 104 is operated as a device under test (DUT) and a second oscillator 108 is operated as a reference source against which cycles of the first oscillator 104 are measured. The first oscillator 104 and the second oscillator 108 accumulate frequency drift as a function of the age of the semiconductor device 100, as resistive components within each oscillator undergo degradation due to thermal stress over the operational lifetime of the semiconductor device 100. The first oscillator 104 and the second oscillator 108 are implemented as resistor-capacitor (RC) timing circuits, such as clock generators.

[0021] A compensation circuit 112 is coupled to the first oscillator 104 at a first input of the compensation circuit 112 and is coupled to the second oscillator 108 at a second input of the compensation circuit 112. To measure the frequency of the first oscillator 104, the compensation circuit 112 directs the second oscillator 108 to operate successively in two modes, a normal mode and a temperature and aging compensated (TAC) mode, and during each mode counts the number of cycles completed by the first oscillator 104 while the second oscillator 108 completes a fixed, predetermined number of cycles. This predetermined number of second-oscillator cycles defines the count window for each measurement, so the duration of each window is governed by the second oscillator 108. Assertion of each count window signal causes the compensation circuit 112 to begin counting cycles of the first oscillator 104 and de-assertion of each count window causes the compensation circuit 112 to cease counting cycles of the first oscillator 104. The resulting tally of first-oscillator cycles accumulated within a window is the count value for that mode. A difference value 128 is generated at an output of the compensation circuit 112. The difference value 128 is derived by subtracting the second count value (D2OSC), obtained during the TAC mode, from the first count value (D1OSC), obtained during the normal mode.

[0022] In the examples described the first oscillator 104 and the second oscillator 108 are implemented as differential oscillators that output differential output signals (e.g., clock signals), and an output of the first oscillator 104 outputs a first differential output signal denoted as OUT1+ (positive output) and OUT1− (negative output). Similarly, the second oscillator 108 outputs a second differential output signal OUT2+ and OUT2−. The output of the first differential output signal OUT1+ and OUT1− or the output of the second output signal OUT2+ and OUT2− can be referred to as a single signal or as a set of signals (e.g., a pair of complementary signals). In other examples, the first oscillator 104 or the second oscillator 108 can include an internal double-ended to single-ended converter such that the output of the first oscillator 104 or the second oscillator 108 is a single-ended output.

[0023] The two count values differ because the TAC mode introduces a temperature-stable change to the period of the second oscillator 108, which shifts the duration of the TAC-mode count window by a corresponding fixed amount relative to the normal-mode count window. As a result, the difference value 128 is proportional to the frequency of the first oscillator 104 and is independent of the absolute frequency of the second oscillator 108. Stated differently, the difference value 128 is independent of a period of the second oscillator 108, and a change in the period of the second oscillator 108 that is common to the normal mode and TAC mode is canceled through the computation of the difference value. Accordingly, aging-induced drift present in the second oscillator 108 impacts both count values equally and is eliminated by the subtraction. In this way, the compensation circuit 112 produces a reliable frequency measurement of the first oscillator 104 even though both oscillators accumulate aging drift over the lifetime of the semiconductor device 100, without needing an external reference signal.

[0024] A comparator 116 is coupled to the output of the compensation circuit 112 at a first input of the comparator 116 to receive the difference value 128 and is coupled to a one-time programmable (OTP) memory 120 at a second input of the comparator 116. An expected count value D-EXPECTED is stored in the OTP memory 120 and represents a predetermined reference established during production testing of the semiconductor device 100. A comparison result is generated at an output of the comparator 116 based on a comparison of the difference value 128 to the expected count value D-EXPECTED; the comparison result indicates whether the frequency of the first oscillator 104 has drifted from a target frequency.

[0025] A trim controller 124 is coupled to the output of the comparator 116 at an input of the trim controller 124 to receive the comparison result. A first output of the trim controller 124 is coupled to the first oscillator 104, a second output of the trim controller 124 is coupled to the second oscillator 108 and a third output of the trim controller 124 is also coupled to the second oscillator 108.

[0026] A TAC enable signal TAC ENABLE is generated at the second output of the trim controller 124 and is transmitted to the second oscillator 108 to direct the second oscillator 108 to operate in either the normal mode or the TAC mode during each successive measurement interval. Responsive to assertion of the TAC ENABLE signal, switches within the second oscillator 108 are configured to redirect a capacitor charging current of the second oscillator 108 through a TAC resistor, namely RTAC 126 in the charging path, which decreases the oscillation period of the second oscillator 108 by a fixed decrement TTAC relative to the normal mode oscillation period. Conversely, if the TAC ENABLE signal is de-asserted, the RTAC 126 is removed from the capacitor charging path and the second oscillator 108 resumes normal mode operation at the unmodified oscillation period.

[0027] The RTAC 126 is switchably coupled within the second oscillator 108 such that current is conducted through the RTAC 126 only during a temperature and aging compensated mode of the second oscillator 108. The RTAC 126 is configured to remain nonconducting throughout normal mode operation and to conduct only during TAC mode measurements, limiting electrical stress on the RTAC 126 to brief, periodic intervals over the operational lifetime of the semiconductor device 100. The RTAC 126 is further connected such that current is directed in alternating directions through the RTAC 126 during the positive and negative half cycles of oscillation in TAC mode, such that electromigration and hot-carrier injection-induced degradation of the RTAC 126 is curtailed and aging of the RTAC 126 is rendered insignificant over the operational lifetime of the semiconductor device 100.

[0028] A slope trim signal SLOPE TRIM is generated at the third output of the trim controller 124 and is transmitted to the second oscillator 108 in coordination with the TAC ENABLE signal. Temperature stability of the oscillation period of the second oscillator 108 is maintained through proportional-to-absolute-temperature (PTAT) biasing of a feedback amplifier within the second oscillator 108 that stabilizes the capacitor charging current. A slope trim code carried by the SLOPE TRIM signal is selected based on the active state of the TAC ENABLE signal such that a slope trim code appropriate for the active mode of the second oscillator 108 is applied to the PTAT biasing. If the TAC ENABLE signal is de-asserted, a first slope trim code is applied to the PTAT biasing of the second oscillator 108 to maintain a temperature-stable oscillation period across the operating temperature range of the semiconductor device 100. Responsive to assertion of the TAC ENABLE signal, a second slope trim code is applied to the PTAT biasing of the second oscillator 108 to compensate for the temperature coefficient of the RTAC 126 such that the period decrement TTAC is maintained at a temperature-invariant value across the operating temperature range of the semiconductor device 100. Accurate reflection of the frequency drift of the first oscillator 104 in the difference value 128 is thereby ensured, and is independent of the ambient temperature at which a measurement is executed.

[0029] A magnitude trim signal MAGNITUDE TRIM is generated at the first output of the trim controller 124 based on the comparison result received from the comparator 116 and is transmitted to the first oscillator 104 to adjust the frequency of the first oscillator 104 toward the target frequency by selecting an appropriate resistance within a resistor bank of the first oscillator 104. A trim offset is determined from a lookup table within the trim controller 124 based on the comparison result, and the trim offset is added to an original magnitude trim setting established during production testing of the semiconductor device 100 to yield the updated MAGNITUDE TRIM value applied to the first oscillator 104.

[0030] The semiconductor device 100 provides improved lifetime frequency precision for the first oscillator 104 without the need for a dedicated temperature and aging-compensated oscillator, an external crystal oscillator or a precise external resistor. Because the TAC mode is implemented by adding the RTAC 126 and associated switches to the second oscillator 108, the area overhead of the semiconductor device 100 is substantially reduced relative to prior approaches that employ a separate power-gated calibration oscillator. The cancellation of aging-induced drift in the second oscillator 108 through the subtraction of count values obtained in the normal mode and the TAC mode allows frequency measurements of the first oscillator 104 to remain accurate over the operational lifetime of the semiconductor device 100 even as both oscillators accumulate resistive degradation due to thermal stress. The temperature invariance of TTAC, maintained by the SLOPE TRIM signal across the operating temperature range, allows calibration measurements to be executed at arbitrary ambient temperatures without introducing temperature-dependent measurement error. Moreover, the calibration is executed at a power-on event or periodically (e.g., every 1000 hours or more of operation), such that electrical stress on the RTAC 126 is curtailed by limiting conduction of the RTAC 126 to the power-on or periodic TAC mode measurements and by configuring the second oscillator 108 such that the RTAC 126 carries alternating current during those measurements. Accordingly aging of the RTAC 126 is rendered insignificant over the operational lifetime of the semiconductor device 100. The semiconductor device 100 is therefore suited for deployment in applications where long-term oscillator frequency stability is needed, including safety applications, such as radar in automobiles.

[0031] FIG. 2 illustrates a block diagram of a semiconductor device 200 that is employable to implement the semiconductor device 100 of FIG. 1. FIG. 2 includes additional details for the compensation circuit 112 and the trim controller 124 introduced in connection with FIG. 1. In particular, the compensation circuit 112 and the trim controller 124 show the internal block structure through which the difference value 128 is generated from successive normal mode and TAC mode measurements of the first oscillator 104 and through which the TAC ENABLE signal, the SLOPE TRIM signal and the MAGNITUDE TRIM signal are generated. The compensation circuit 112 includes an AND gate 204, a first counter 208, a second counter 212, a thresholder 214 and a subtraction circuit 216. The trim controller 124 has a slope trim selector 220 and a trim lookup table (LUT) 224. The comparator 116 and the OTP memory 120 of FIG. 1 are also shown in FIG. 2 in connection with the operation of the compensation circuit 112 and the trim controller 124.

[0032] As noted, in the examples provided, the first oscillator 104 and the second oscillator 108 are implemented as differential oscillators. The first oscillator 104 outputs a first differential signal OUT1+ and OUT1−. Similarly, the second oscillator 108 outputs a second differential output signal OUT2+ and OUT2−. The first differential signal OUT1+ and OUT1− is output to a first double-ended to single-ended converter 221 and the second differential output signal OUT2+ and OUT2− is output to a second double-ended to single-ended converter 223. The first double-ended to single-ended converter 221 converts the first differential signal OUT1+ and OUT1− into a first single-ended output signal OUT1 (e.g., a clock signal) and the second double-ended to single-ended converter 223 converts the second differential signal OUT2+ and OUT2− into a second single-ended signal OUT2 (e.g., a clock signal).

[0033] An input of the second counter 212 is coupled to the output of the second double-ended to single-ended converter 223 and is configured to accumulate a count of cycles produced by the second oscillator 108 during each measurement interval. The second counter 212 outputs a count signal to the thresholder 214. A count window signal (e.g., a count enable signal) is generated at an output of the thresholder 214 and is asserted while the count accumulated by the second counter 212 is less than a window count DTCK, which could be provided from the OTP memory 120. The count window signal is de-asserted when the count accumulated by the second counter 212 reaches DTCK, at which point the current measurement interval is terminated. The AND gate 204 is coupled at a first input to the output of the first doubled-ended to single-ended converter 221 to receive the output signal OUT1 corresponding to the differential output signal OUT1+ and OUT1− produced by the first oscillator 104 and is coupled at a second input to the count-enable output of the thresholder 214. A gated signal is produced at the output of the AND gate 204 and is applied to the input of the first counter 208, such that cycles of the first oscillator 104 are passed to the first counter 208 only while the count window signal is asserted. In this manner, assertion of the count window signal causes the first counter 208 to begin counting cycles of the first oscillator 104 and de-assertion of the count window signal causes the first counter 208 to cease counting cycles of the first oscillator 104. The first counter 208 thereby accumulates a count of cycles of the first oscillator 104 only during an active measurement window defined by the second counter 212 and the thresholder 214, and the count accumulated by the first counter 208 is latched at the end of each measurement window when the count window signal is de-asserted. The duration of each measurement window is equal to the product of the window count DTCK and the period of the test signal TTCK output by the second oscillator 108 active during that interval, such that the count value captured from the first counter 208 reflects the number of cycles of the first oscillator 104 that fit within the corresponding window. Accordingly, the duration of a first measurement window W1 and a duration of a second measurement window W2 are given by Equations 1 and 2, respectively.W1=DTCK×TTCK  Equation 1W2=DTCK×(TTCK−TTAC)  Equation 2wherein:W1 is the duration of the normal mode measurement window;

[0036] W2 is the duration of the TAC mode measurement window;

[0037] DTCK is the predetermined window count, representing the fixed number of cycles of the second oscillator that define the measurement window;

[0038] TTCK is the period of the second oscillator in normal mode, subject to aging-induced drift over the operational lifetime of the semiconductor device; and

[0039] TTAC is the period decrement introduced in the second oscillator if the TAC mode is enabled by assertion of the TAC ENABLE signal, which is maintained at a temperature-invariant and aging-invariant value by the TAC resistor RTAC and the SLOPE TRIM signal.

[0040] A first count value D1OSC is captured from the first counter 208 during a first measurement interval in which the TAC ENABLE signal is de-asserted and the second oscillator 108 is operated in the normal mode at period TTCK. The duration of the normal mode measurement window is therefore equal to the product of DTCK and the normal mode period TTCK. A second count value D2OSC is captured from the first counter 208 during a second measurement interval in which the TAC ENABLE signal is asserted and the second oscillator 108 is operated in the TAC mode at the reduced period TTCK minus TTAC, where TTAC is the period decrement introduced by the TAC mode of the second oscillator 108 as described in connection with FIG. 1. D1OSC and D2OSC are expressed in Equations 3 and 4, respectively.D1OSC=fosc×DTCK×TTCK  Equation 3D2OSC=fosc×DTCK×(TTCK−TTAC)  Equation 4wherein:D1OSC=the count of first oscillator cycles accumulated during the normal mode measurement window;

[0043] D2OSC=the count of first oscillator cycles accumulated during the TAC mode measurement window; and

[0044] fosc=the frequency of the first oscillator.

[0045] As indicated in Equations 1 and 2, the duration of the TAC mode measurement window W2 is therefore equal to the product of DTCK and the reduced period TTCK minus TTAC, which is shorter than the duration of the normal mode measurement window W1 by the fixed interval TTAC multiplied by DTCK. Because the TAC mode measurement window is shorter, fewer cycles of the first oscillator 104 are accumulated during the second measurement interval, and the second count value D2OSC is therefore less than the first count value D1OSC. The subtraction circuit 216 is coupled to the first counter 208 to receive the first count value D1OSC and the second count value D2OSC, and the difference value 128 is generated at the output of the subtraction circuit 216. In other examples, the subtraction circuit 216 is integrated with the first counter 208. To derive the difference value 128, the subtraction circuit 216 determines the arithmetic difference of D1OSC minus D2OSC, which is expressed in Equation 5.D1OSC−D2OSC  Equation 5

[0046] The relationship between the frequency fosc of the first oscillator 104 and the count values captured during each measurement interval is expressed through a set of equations that establish the independence of the difference value 128 from the period TTCK of the second oscillator 108. During the normal mode measurement interval, the count accumulated by the first counter 208 equals the frequency fosc of the first oscillator 104 multiplied by the total duration of the normal mode measurement window, which is equal to the first count value D1OSC divided by DTCK, as expressed in Equation 6. Further, during the TAC mode measurement interval, the period of the second oscillator 108 is reduced to TTCK minus TTAC, which is equal to the second count value D2OSC divided by DTCK, and the corresponding relationship is expressed as Equation 7.fosc×TTCK=D1OSC / DTCK  Equation 6fosc(TTCK−TTAC)=D2OSC / DTCK  Equation 7The independence of the difference value 128 (D1OSC-D2OSC) is demonstrated (among possible ways) by solving Equation 6 for D1OSC and Equation 7 for D2OSC, and then subtracting the resultant expressions, as demonstrated by Equation 8. Further, the difference value 128 (D1OSC-D2OSC), as demonstrated in Equation 8 can be solved for the frequency of the first oscillator 104 fosc, as demonstrated in Equation 9.D1OSC−D2OSC=fosc×DTCK×(TTCK−TTCK+TTAC)  Equation 8fosc=(D1OSC-D2OSC) / (DTCK×TTAC)  Equation 9The period TTCK of the second oscillator 108 does not appear in Equation 9, confirming that the frequency of the first oscillator 104 is determinable from the difference value 128 and the known constants TTAC and DTCK without reliance on the period of the second oscillator 108. The practical consequence of the cancellation of TTCK through Equations 8 and 9 is that aging-induced drift in the period of the second oscillator 108 does not introduce error into the frequency measurement of the first oscillator 104. Over the operational lifetime of the semiconductor device 200, the timing resistor within the second oscillator 108 is subject to thermal stress-induced degradation that causes TTCK to increase from the value established during production testing. Because TTCK appears in both Equations 6 and 7, an increase in TTCK due to aging causes both the first count value D1OSC and the second count value D2OSC to increase by an equal proportional amount, and the difference D1OSC minus D2OSC is left unchanged by that common-mode shift. The quantity TTAC in the denominator of Equation 9 is maintained at a temperature-invariant and aging-invariant value by the configuration of the RTAC 126 (e.g., a TAC resistor) and the SLOPE TRIM signal as described in connection with FIG. 1, such that the product TTAC multiplied by DTCK remains a stable reference over the operational lifetime of the semiconductor device 200. A frequency estimate of the first oscillator 104 is thereby rendered independent of the aging drift of the second oscillator 108, which avoids the need for a dedicated temperature and aging compensated oscillator or an external reference clock.The difference value 128 is transmitted from the subtraction circuit 216 to the first input of the comparator 116. An expected count value D-EXPECTED is retrieved from the OTP memory 120 and is applied to a second input of the comparator 116, where D-EXPECTED represents the difference value established during production testing of the semiconductor device 200 at the target frequency of the first oscillator 104. A comparison result is generated at the output of the comparator 116 based on a comparison of the difference value 128 to the expected count value D-EXPECTED, and the comparison result is transmitted to the trim controller 124 to initiate a trim correction when a deviation between the difference value 128 and the expected count value D-EXPECTED is detected.

[0050] The slope trim selector 220 within the trim controller 124 is coupled at a first input to the OTP memory 120 to receive a first slope trim code STnormal and at a second input to the OTP memory 120 to receive a second slope trim code STTAC. A select input of the slope trim selector 220 is driven by the TAC ENABLE output of the trim controller 124 such that the slope trim code routed to the SLOPE TRIM output is switched in coordination with the state of the TAC ENABLE signal. If the TAC ENABLE signal is de-asserted, the first slope trim code STnormal is routed by the slope trim selector 220 to the SLOPE TRIM output to configure the temperature compensation of the second oscillator 108 for normal mode operation. If the TAC ENABLE signal is asserted, the second slope trim code STTAC is routed by the slope trim selector 220 to the SLOPE TRIM output to configure the temperature compensation of the second oscillator 108 for TAC mode operation, thereby maintaining the temperature invariance of TTAC across the operating temperature range of the semiconductor device 200. The first slope trim code STnormal and the second slope trim code STTAC are determined during production testing of the semiconductor device 200 and stored in the OTP memory 120 for retrieval by the slope trim selector 220 during field operation.

[0051] The trim LUT 224 of the trim controller 124 is coupled at an input to the output of the comparator 116 to receive the comparison result. A trim offset is generated at an output of the trim LUT 224 based on a mapping of the comparison result to a corresponding frequency correction, where the mapping is established during production testing of the semiconductor device 200 and stored within the trim LUT 224. An original magnitude trim code (e.g., a trim code selected after fabrication) is retrieved from the OTP memory 120 and represents the magnitude trim setting applied to the first oscillator 104 at the time of production testing. The MAGNITUDE TRIM signal generated at the output of the trim controller 124 is formed by adding the trim offset produced by the trim LUT 224 to the original magnitude trim code, and is transmitted to the first oscillator 104 to adjust the frequency of the first oscillator 104 toward the target frequency by an amount determined by the magnitude of the drift indicated by the comparison result.

[0052] FIG. 3 illustrates a circuit diagram of an oscillator 300. The oscillator 300 is a resistor-capacitor (RC) timing circuit. In some examples, the oscillator 300 is a clock generator. The oscillator 300 is a differential oscillator (alternatively referred to as a differential relaxation oscillator) that is employable for the first oscillator 104 and the second oscillator 108 of FIGS. 1-2. The oscillator 300 is operable in the normal mode described in connection with FIGS. 1 and 2, in which an oscillation period T is produced that is determined by a timing resistor R (alternatively referred to as a trim resistor) and a pair of timing capacitors within the oscillator 300, as further described below. The timing resistor R is representative of a resistor bank 302 (bank of resistors) that provide a selectable resistance through a trim operation.

[0053] A first terminal of the timing resistor R is coupled to an inverting input of an op-amp 304 (operational amplifier) and to a source of a first transistor M1. The first transistor M1 is configured as an n-channel field-effect transistor (NFET). A second terminal of the timing resistor R is coupled to a reference potential (e.g., ground). The op-amp 304 receives a reference voltage VREF at a non-inverting input, and an output of the op-amp 304 is coupled to a gate of the first NFET M1.

[0054] A current source is coupled at a supply input and provides a voltage VDD to a source of a second transistor M2 and a third transistor M3. The second transistor M2 and the third transistor M3 are configured as p-channel field-effect transistors (PFETs). The second transistor M2 and the third transistor M3 are arranged in a current mirror configuration, such that a gate of the second transistor M2 is coupled to a gate of the third transistor M3. Moreover, the gate of the second transistor M2 is coupled to a drain of the second transistor M2, and coupled to a drain of the first transistor M1. In this configuration, a current at a drain of the third transistor M3 matches a current at the drain of the second transistor M2, and a current at the source of the first transistor M1.

[0055] The drain of the third transistor M3 is coupled to an input of a switch network 306. The switch network 306 includes switches (e.g., transistors, such as FETs) that are controllable by a set of control signals output by control logic 307. The control logic 307 can be gate logic or a microcontroller. The control signals include a first control signal φ and a second control signal φ′. The second control signal φ′ is a complement of the first control signal φ.

[0056] In particular, the drain of the third transistor M3 is coupled to a first terminal of a first phase switch 308 and a first terminal of a second phase switch 312. A second terminal of the first phase switch 308 is coupled to a first terminal of a first timing capacitor C1, and a second terminal of the second phase switch 312 is coupled to a first terminal of a second timing capacitor C2. The first timing capacitor C1 and the second timing capacitor C2 have an equal, or nearly equal capacitance C. The first terminal of the first timing capacitor C1 is also coupled to a third phase switch 316, and the first terminal of the second timing capacitor C2 is coupled with a fourth phase switch 320. The first phase switch 308 and the fourth phase switch 320 are controlled by the first control signal φ output by the control logic 307. The second phase switch 312 and the third phase switch 316 are controlled by the second control signal φ′.

[0057] The switch network 306 includes a TAC resistor RTAC. RTAC is a temperature-invariant resistor formed from metal or a high activation energy material, such as polysilicon, silicon chromium (SiCr) or tantalum nitride (TaN). RTAC of the oscillator 300 is employable to implement the RTAC 126 of FIGS. 1 and 2. RTAC is switchably coupled within the oscillator 300 such that current is conducted through the resistor RTAC only during a temperature and aging-compensated mode of the oscillator 300. The resistor RTAC has a first terminal 324 and a second terminal 328. RTAC has a resistance less than the resistance R selected at the resistor bank 302. The first terminal 324 of the resistor RTAC is coupled to the second terminal of the first timing capacitor C1, and to a first RTAC switch 332 and a second RTAC switch 336. The second terminal 328 of the resistor RTAC is coupled to the second terminal of the second timing capacitor C2, and to a third RTAC switch 340 and a fourth RTAC switch 344. The first RTAC switch 332, the second RTAC switch 336, the third RTAC switch 340 and the fourth RTAC switch 344 are also coupled to a reference potential (e.g., ground).

[0058] The first RTAC switch 332, the second RTAC switch 336, the third RTAC switch 340 and the fourth RTAC switch 344 operate in concert to control a flow of current through the resistor RTAC. The first RTAC switch 332 is controlled by the second control signal φ′, and the third RTAC switch 340 is controlled by the first control signal φ. Additionally, the second RTAC switch 336 and the fourth RTAC switch 344 are controlled by either the first control signal φ or the second control signal φ′ depending on the mode of operation. More specifically, in the normal mode of operation, the second RTAC switch 336 is controlled by the first control signal φ and the fourth RTAC switch 344 is controlled by the second control signal φ′. In the TAC mode of operation, the second RTAC switch 336 is controlled by the second control signal φ′ and the fourth RTAC switch 344 is controlled by the first control signal φ.

[0059] The first phase switch 308 is also coupled to a fifth phase switch 348. The fifth phase switch 348 is coupled to an inverting input of a differential op-amp 352. The inverting input of the differential op-amp is also coupled with a sixth phase switch 356 that is also coupled to the reference voltage VREF. The fifth phase switch 348 is controlled by the first control signal φ and the sixth phase switch 356 is controlled by the second control signal φ′. The second phase switch 312 is connected in a similar manner to a seventh phase switch 360. The seventh phase switch 360 is coupled to a non-inverting input of the differential op-amp 352. The non-inverting input is also coupled to an eighth phase switch 364 that is also coupled to the reference voltage VREF. The seventh phase switch 360 is controlled by the second control signal φ′ and the eighth phase switch 364 is controlled by the first control signal φ. The differential op-amp 352 outputs a differential output signal OUT+ and OUT−. The differential output signal OUT+ and OUT− is provided as feedback to the control logic 307 to indicate an output state of the oscillator 300.

[0060] The OUT+ and OUT− of the differential op-amp 352 serve as the output of the oscillator 300 (e.g., a clock signal). If the oscillator 300 is employed as the first oscillator 104, the OUT+ and OUT− outputs are applied to the first double-ended to single-ended converter 221 of FIG. 2, as one example. Conversely, if the oscillator 300 is employed as the second oscillator 108, the OUT+ and OUT− outputs are applied to the second double-ended to single-ended converter 223 of FIG. 2. A TAC ENABLE input of the control logic 307 is coupled to receive the TAC ENABLE signal from the trim controller 124 of FIG. 1, such that the control logic 307 is responsive to the state of the TAC ENABLE signal in selecting between the normal mode and TAC mode switching configurations of the switch network 306.

[0061] A PTAT bias circuit 368 is coupled to the op-amp 304 and is configured to generate a proportional-to-absolute-temperature bias signal applied to the op-amp 304 to stabilize the reference current I against temperature-induced variation across the operating temperature range of the semiconductor device 100. A slope trim input of the PTAT bias circuit 368 is coupled to receive the SLOPE TRIM signal from the trim controller 124 of FIG. 1 when the oscillator 300 is employed as the second oscillator 108, such that the temperature coefficient of the bias signal generated by the PTAT bias circuit 368 is set by the slope trim code carried by the SLOPE TRIM signal as described in connection with FIGS. 1 and 2. In the oscillator 300, the PTAT bias circuit 368 is implemented with a multiplexer that receives two SLOPE TRIM signals, NORMAL SLOPE TRIM and a TAC SLOPE TRIM, and the PTAT bias circuit 368 is controlled by the TAC ENABLE signal. In this manner, the PTAT bias circuit 368 receives both the NORMAL SLOPE TRIM and the TAC SLOPE TRIM from the trim controller, and selects the NORMAL SLOPE TRIM or the TAC SLOPE TRIM as the SLOPE TRIM signal for controlling the proportional-to-absolute-temperature bias signal applied to the op-amp 304.

[0062] As noted, the timing resistor R is implemented as the resistor bank 302 that includes a plurality of selectable resistive elements whose combined net resistance determines the resistance R presented in the oscillation period T=2RC, where C is the capacitance of the first timing capacitor C1 or the second timing capacitor C2. A magnitude trim input of the resistor bank 302 is coupled to receive the MAGNITUDE TRIM signal from the trim controller 124 of FIG. 1 when the oscillator 300 is employed as the first oscillator 104, such that the net resistance R presented by the resistor bank 302 is adjustable in response to a trim correction generated by the trim controller 124 as described in connection with FIGS. 1 and 2.

[0063] FIGS. 4A-4D illustrate operations of the oscillator 300 of FIG. 3. In particular, FIG. 4A illustrates the oscillator 300 operating in a first half-cycle of a normal mode. FIG. 4B illustrates the oscillator 300 operating in a second half-cycle of the normal mode. FIG. 4C illustrates the oscillator 300 operating in a first half-cycle of a TAC mode. FIG. 4D illustrates the oscillator 300 operating in a second half-cycle of the TAC mode.

[0064] As noted, FIG. 4A illustrates the oscillator 300 operating in a first half-cycle of normal mode (alternatively referred to as the normal mode of operation). The oscillator 300 of FIG. 3 is employable as the first oscillator 104 or the second oscillator 108 of FIGS. 1 and 2. In FIG. 4A, the TAC ENABLE signal received by the control logic 307 is de-asserted, placing the oscillator 300 in the normal mode. A first control signal φ is asserted and a second control signal φ′ is de-asserted by the control logic 307, configuring the switch network 306 for the first half-cycle as described as follows.

[0065] A reference current IREF (alternatively referred to as a first current) is established through the resistor R selected at the resistor bank 302. The current mirror formed by the second transistor M2 and the third transistor M3 as described in connection with FIG. 3 outputs a second current I2 that has a same magnitude as the reference current IREF, such that the drain of the third transistor M3 sources the reference current IREF. With the first control signal φ asserted, the first phase switch 308 is closed and the second current I2 flows from the drain of the third transistor M3 through the first phase switch 308 to the first terminal of the first timing capacitor C1, charging the first timing capacitor C1 at a rate equal to the second current I2 divided by the capacitance of the first timing capacitor C1. Additionally, because the capacitance of the first and second timing capacitors C1 and C2 are equal (C), and the magnitude of the second current I2 is about equal to the current of the reference current IREF, the charging rate of the first timing capacitor C1 is equal (or nearly equal) to IREF / C.

[0066] With the second control signal φ′ de-asserted, the second phase switch 312 is open, such that no charging current is directed to the first terminal of the second timing capacitor C2 during the first half-cycle. With the first control signal φ asserted, the fourth phase switch 320 is closed, providing a discharge path with a third current I3 for the second timing capacitor C2 such that the second timing capacitor C2 is reset during the first half-cycle. With the second control signal φ′ de-asserted, the third phase switch 316 is open, such that the first timing capacitor C1 is not discharged during the first half-cycle.

[0067] With the TAC ENABLE signal de-asserted and the oscillator 300 in normal mode, the resistor RTAC switch configuration of the switch network 306 places the TAC resistor RTAC outside the charging current path of the first timing capacitor C1. The first RTAC switch 332, controlled by the second control signal φ′, is open. The fourth RTAC switch 344, controlled by the second control signal φ′, is also open. The second RTAC switch 336 and the third RTAC switch 340, controlled by the first control signal p in normal mode, are closed, providing a bypass path that allows the second terminal of the first timing capacitor C1 and the second terminal of the second timing capacitor C2 to reach a reference potential (e.g., ground) without routing current through the TAC resistor RTAC. The TAC resistor RTAC therefore carries no current (or nearly zero current) during the first half-cycle of normal mode operation, and the oscillation period of the oscillator 300 is determined solely by the resistance R of the resistor bank 302 and the capacitance C of the first timing capacitor C1 and the second timing capacitor C2, expressed as T=2RC.

[0068] With the first control signal φ asserted, the fifth phase switch 348 is closed, coupling the first terminal of the first timing capacitor C1 to the inverting input of the differential op-amp 352. With the first control signal φ asserted, the eighth phase switch 364 is closed, coupling the reference voltage VREF to the non-inverting input of the differential op-amp 352. With the second control signal φ′ de-asserted, the sixth phase switch 356 is open and the seventh phase switch 360 is open, such that the reference voltage VREF is not connected to the inverting input and the first terminal of the second timing capacitor C2 is not connected to the non-inverting input of the differential op-amp 352 during the first half-cycle. The differential op-amp 352 thereby compares the rising voltage at the first terminal of the first timing capacitor C1 against the reference voltage VREF throughout the first half-cycle, and the OUT+ and OUT− outputs of the differential op-amp 352 transition when the voltage at the first terminal of the first timing capacitor C1 reaches the reference voltage VREF, initiating the second half-cycle as described in connection with FIG. 4B.

[0069] FIG. 4B illustrates the oscillator 300 operating in the second half-cycle of normal mode, continuing from the state described in connection with FIG. 4A. The second half-cycle is initiated responsive to the differential op-amp 352 detecting that the voltage at the first terminal of the first timing capacitor C1 has reached the reference voltage VREF and toggles the OUT+ and OUT− outputs, causing the control logic 307 to de-assert the first control signal φ and assert the second control signal φ′. The TAC ENABLE signal remains de-asserted throughout the second half-cycle, and the oscillator 300 remains in normal mode.

[0070] With the second control signal φ′ asserted and the first control signal φ de-asserted, the second phase switch 312 is closed and a fourth current I4 flows from the drain of the third transistor M3 through the second phase switch 312 to the first terminal of the second timing capacitor C2. The fourth current I4 has the same magnitude as the reference current IREF, such that the second timing capacitor C2 (with a capacitance of C) is charged at a rate equal to the reference current IREF divided by the capacitance C (IREF / C). With the first control signal φ de-asserted, the first phase switch 308 is open, such that no charging current is directed to the first terminal of the first timing capacitor C1 during the second half-cycle. With the second control signal φ′ asserted, the third phase switch 316 is closed, providing a discharge path for a fifth current I5 for the first timing capacitor C1 such that the first timing capacitor C1 is reset during the second half-cycle. With the first control signal φ de-asserted, the fourth phase switch 320 is open, such that the second timing capacitor C2 is not discharged during the second half-cycle.

[0071] With the TAC ENABLE signal de-asserted and the oscillator 300 in normal mode, the resistor RTAC switch configuration of the switch network 306 places the TAC resistor RTAC outside the charging current path of the second timing capacitor C2 during the second half-cycle. The second RTAC switch 336, controlled by the first control signal φ in normal mode, is open. The third RTAC switch 340, controlled by the first control signal φ in normal mode, is open. The first RTAC switch 332 and the fourth RTAC switch 344, each controlled by the second control signal φ′ in normal mode, are closed, providing a bypass path that allows the charging current to reach the second timing capacitor C2 without routing through the TAC resistor RTAC. The TAC resistor RTAC therefore carries no current during the second half-cycle of normal mode operation, and the oscillation period of the oscillator 300 remains determined by the resistance R of the resistor bank 302 and the capacitance C of the first timing capacitor C1 and the second timing capacitor C2, expressed as T=2RC.

[0072] With the second control signal φ′ asserted, the seventh phase switch 360 is closed, coupling the first terminal of the second timing capacitor C2 to the non-inverting input of the differential op-amp 352. With the second control signal φ′ asserted, the sixth phase switch 356 is closed and the first control signal φ is de-asserted, coupling the reference voltage VREF to the inverting input of the differential op-amp 352. With the first control signal φ de-asserted, the eighth phase switch 364 is also open, such that the reference voltage VREF is not connected to the non-inverting input and the first terminal of the first timing capacitor C1 is not connected to the inverting input of the differential op-amp 352 during the second half-cycle. The differential op-amp 352 thereby compares the rising voltage at the first terminal of the second timing capacitor C2 against the reference voltage VREF throughout the second half-cycle. When the voltage at the first terminal of the second timing capacitor C2 reaches the reference voltage VREF, the OUT+ and OUT− outputs of the differential op-amp 352 toggle, causing the control logic 307 to reassert the first control signal φ and de-assert the second control signal φ′, and the oscillator 300 returns to the first half-cycle state described in connection with FIG. 4A. The full oscillation period T=2RC is thereby completed across the two half-cycles of FIGS. 4A and 4B, with each half-cycle contributing a duration of RC to the total period.

[0073] FIG. 4C illustrates the oscillator 300 operating in the first half-cycle of TAC mode. The oscillator 300 corresponds to the second oscillator 108 of FIGS. 1 and 2 when the semiconductor device 100 performs a TAC mode measurement. As described in connection with FIG. 1, TAC mode is initiated by the assertion of the TAC ENABLE signal generated by the trim controller 124. With the TAC ENABLE signal asserted, the control logic 307 reconfigures the resistor RTAC switch configuration of the switch network 306 to place the TAC resistor RTAC in series with the capacitor charging current path, as further described below. In FIG. 4C, the first control signal p is asserted and the second control signal φ′ is de-asserted by the control logic 307, establishing the first half-cycle of TAC mode.

[0074] The phase switch configuration during the first half-cycle of TAC mode corresponds to the configuration described in connection with the first half-cycle of normal mode in FIG. 4A. With the first control signal φ asserted, the first phase switch 308 is closed and a sixth current I6 (a charging current equal to the reference current IREF) flows from the drain of the third transistor M3 through the first phase switch 308 to the first terminal of the first timing capacitor C1. The second phase switch 312, controlled by the second control signal φ′, is open, such that no charging current is directed to the first terminal of the second timing capacitor C2 during the first half-cycle of TAC mode. The fourth phase switch 320, controlled by the first control signal φ, is closed, providing a discharge path for a seventh current I7 (a discharge current) for the second timing capacitor C2 such that the second timing capacitor C2 is reset. The third phase switch 316, controlled by the second control signal φ′, is open, such that the first timing capacitor C1 is not discharged.

[0075] The RTAC switch configuration of the switch network 306 in TAC mode differs from the normal mode configuration of FIG. 4A. As described in connection with FIG. 3, the second RTAC switch 336, which is controlled by the first control signal φ in normal mode, is controlled by the second control signal φ′ in TAC mode. With the second control signal φ′ de-asserted, the second RTAC switch 336 is open. The first RTAC switch 332, controlled by the second control signal φ′, is also open. With both the first RTAC switch 332 and the second RTAC switch 336 open, the first terminal 324 of the TAC resistor RTAC has no direct path to a reference potential. Additionally, the fourth RTAC switch 344, which is controlled by the second control signal φ′ in normal mode, is controlled by the first control signal φ in TAC mode. With the first control signal φ asserted, the fourth RTAC switch 344 is closed. The third RTAC switch 340, controlled by the first control signal φ in the TAC mode, is also closed. With both the third RTAC switch 340 and the fourth RTAC switch 344 closed, the second terminal 328 of the TAC resistor RTAC is connected to a reference potential.

[0076] With the first terminal 324 of the TAC resistor RTAC isolated from a reference potential and the second terminal 328 connected to a reference potential through the third RTAC switch 340 and the fourth RTAC switch 344, the sixth current I6 flows from the drain of the third transistor M3 through the first timing capacitor C1, exits the second terminal of the first timing capacitor C1 at the first terminal 324 of the TAC resistor RTAC, and is directed through the TAC resistor RTAC in a first direction from the first terminal 324 to the second terminal 328, continuing to the reference potential through the third RTAC switch 340 and the fourth RTAC switch 344. The voltage drop I6×RTAC developed across the TAC resistor RTAC reduces the effective charging voltage available to the first timing capacitor C1, shortening the duration of the first half-cycle of TAC mode relative to the first half-cycle of normal mode described in connection with FIG. 4A. The full TAC mode oscillation period is accordingly expressed with Equations 10 and 11.T−TTAC=2RC−2×RTAC×C  Equation 10TTAC=2×RTAC×C  Equation 11wherein:RTAC is the resistance of the TAC resistor;

[0079] R is the selected resistance of the resistor bank;

[0080] C is the capacitance of the first timing capacitor C1 and the capacitance of the second timing capacitor C2;

[0081] TTAC is the period decrement introduced by assertion of the TAC ENABLE signal; and

[0082] T is the oscillation period of the oscillator in normal mode, equal to 2RC.

[0083] The differential op-amp 352 comparator configuration during the first half-cycle of TAC mode corresponds to the configuration described in connection with FIG. 4A. The fifth phase switch 348, controlled by the first control signal φ, is closed, coupling the first terminal of the first timing capacitor C1 to the inverting input of the differential op-amp 352. The eighth phase switch 364, controlled by the first control signal φ, is closed, coupling the reference voltage VREF to the non-inverting input of the differential op-amp 352. The sixth phase switch 356 and the seventh phase switch 360, each controlled by the second control signal φ′, are open, such that the reference voltage VREF is not connected to the inverting input and the first terminal of the second timing capacitor C2 is not connected to the non-inverting input of the differential op-amp 352 during the first half-cycle of TAC mode. The differential op-amp 352 thereby compares the rising voltage at the first terminal of the first timing capacitor C1 against the reference voltage VREF throughout the first half-cycle of TAC mode, and the OUT+ and OUT− outputs of the differential op-amp 352 transition in response to the voltage at the first terminal of the first timing capacitor C1 reaching the reference voltage VREF, initiating the second half-cycle of TAC mode as described in connection with FIG. 4D.

[0084] With the TAC ENABLE signal asserted, the PTAT bias circuit 368 selects the TAC SLOPE TRIM code rather than the NORMAL SLOPE TRIM code for application to the op-amp 304, as described in connection with FIG. 3. The TAC SLOPE TRIM code compensates for the temperature coefficient of the TAC resistor RTAC, maintaining the period decrement TTAC at a temperature-invariant value across the operating temperature range of the semiconductor device 100. The temperature invariance of TTAC ensures that the difference between the first count value D1OSC accumulated during the normal mode measurement window W1 and the second count value D2OSC accumulated during the TAC mode measurement window W2 accurately reflects the frequency of the first oscillator 104 independent of the ambient temperature at which the measurement is performed, as described in connection with FIGS. 1 and 2.

[0085] FIG. 4D illustrates the oscillator 300 operating in the second half-cycle of TAC mode, continuing from the state described in connection with FIG. 4C. The second half-cycle of TAC mode is initiated when the differential op-amp 352 detects that the voltage at the first terminal of the first timing capacitor C1 has reached the reference voltage VREF and toggles the OUT+ and OUT− outputs, causing the control logic 307 to de-assert the first control signal φ and assert the second control signal φ′. The TAC ENABLE signal received by the control logic 307 remains asserted throughout the second half-cycle, and the oscillator 300 remains in TAC mode.

[0086] The phase switch configuration during the second half-cycle of TAC mode corresponds to the configuration described in connection with the second half-cycle of normal mode in FIG. 4B. With the second control signal φ′ asserted and the first control signal φ de-asserted, the second phase switch 312 is closed and an eighth charging current I8 (a charging current, equal to the reference current IREF) flows from the drain of the third transistor M3 through the second phase switch 312 toward the first terminal of the second timing capacitor C2. The first phase switch 308, controlled by the first control signal φ, is open, such that no charging current is directed to the first terminal of the first timing capacitor C1 during the second half-cycle of TAC mode. The third phase switch 316, controlled by the second control signal φ′, is closed, providing a discharge path for a ninth current I9 (a discharge current) for the first timing capacitor C1 such that the first timing capacitor C1 is reset. The fourth phase switch 320, controlled by the first control signal φ, is open, such that the second timing capacitor C2 is not discharged during the second half-cycle of TAC mode.

[0087] As with the first half-cycle of TAC mode described in connection with FIG. 4C, the RTAC switch configuration of the switch network 306 in the second half-cycle of TAC mode places the TAC resistor RTAC in series with the charging current path of the second timing capacitor C2. With the second control signal φ′ asserted, the first RTAC switch 332 and the second RTAC switch 336 (in the TAC mode) are closed. With the first control signal φ de-asserted, the third RTAC switch 340 and the fourth RTAC switch 344 are open. With the first RTAC switch 332 and second RTAC switch 336 closed and the third RTAC switch 340 and the fourth RTAC switch 344 open (in the TAC mode), the second terminal 328 of the TAC resistor RTAC has no direct path to a reference potential.

[0088] With the second terminal 328 of the TAC resistor RTAC isolated from a reference potential and the first terminal 324 connected to the reference potential through the second RTAC switch 336, the eighth current I8 flowing from the drain of the third transistor M3 through the second phase switch 312 toward the second timing capacitor C2 exits the second terminal of the second timing capacitor C2 at the second terminal 328 of the TAC resistor RTAC, and is directed through the TAC resistor RTAC in a second direction from the second terminal 328 to the first terminal 324, continuing to the reference potential through the second RTAC switch 336. The second direction of current flow through the TAC resistor RTAC in FIG. 4D is opposite to the first direction of current flow through the TAC resistor RTAC described in connection with FIG. 4C, such that the current through the TAC resistor RTAC alternates direction with each half-cycle of TAC mode operation. The alternating current through the TAC resistor RTAC reduces electromigration and hot-carrier injection-induced degradation of the TAC resistor RTAC over the operational lifetime of the semiconductor device 100, as described in connection with FIG. 1. As in the first half-cycle of TAC mode, the voltage drop I8×RTAC developed across the TAC resistor RTAC reduces the effective charging voltage available to the second timing capacitor C2, shortening the duration of the second half-cycle of TAC mode by RTAC×C relative to the second half-cycle of normal mode described in connection with FIG. 4B, and contributing to the full period decrement TTAC=2×RTAC×C (as demonstrated in Equations 10-11) across both half-cycles.

[0089] The differential op-amp 352 comparator configuration during the second half-cycle of TAC mode corresponds to the configuration described in connection with FIG. 4B. The seventh phase switch 360, controlled by the second control signal φ′, is closed, coupling the first terminal of the second timing capacitor C2 to the non-inverting input of the differential op-amp 352. The sixth phase switch 356, controlled by the second control signal φ′, is closed, coupling the reference voltage VREF to the inverting input of the differential op-amp 352. The fifth phase switch 348 and the eighth phase switch 364, each controlled by the first control signal φ, are open, such that the reference voltage VREF is not connected to the non-inverting input and the first terminal of the first timing capacitor C1 is not connected to the inverting input of the differential op-amp 352 during the second half-cycle of TAC mode. The differential op-amp 352 thereby compares the rising voltage at the first terminal of the second timing capacitor C2 against the reference voltage VREF throughout the second half-cycle of TAC mode.

[0090] In response to the voltage at the first terminal of the second timing capacitor C2 reaching the reference voltage VREF, the OUT+ and OUT− outputs of the differential op-amp 352 toggle, causing the control logic 307 to reassert the first control signal φ and de-assert the second control signal φ′, and the oscillator 300 returns to the first half-cycle state of TAC mode described in connection with FIG. 4C. The full TAC mode oscillation period T−TTAC=2RC−2×RTAC×C (characterized in Equation 10) is thereby completed across the two half-cycles of FIGS. 4C and 4D, with each half-cycle contributing a duration of RC−RTAC×C (as characterized in Equation 11) to the total TAC mode period.

[0091] FIGS. 4A-4D together illustrate the complete operation of the oscillator 300 across all four half-cycles defined by the normal mode and TAC mode of operation. FIGS. 4A and 4B establish that in normal mode, with the TAC ENABLE signal de-asserted, the TAC resistor RTAC is bypassed during both the first and second half-cycles and carries no current, such that the oscillation period T=2RC is determined solely by the resistance R of the resistor bank 302 and the capacitance C of the first timing capacitor C1 and the second timing capacitor C2. FIGS. 4C and 4D establish that in TAC mode, with the TAC ENABLE signal asserted, the RTAC switch configuration of the switch network 306 is reconfigured in each half-cycle to place the TAC resistor RTAC in series with the capacitor charging current path, introducing the period decrement TTAC=2×RTAC×C and reducing the oscillation period to T−TTAC=2RC−2×RTAC×C. As illustrated across FIGS. 4C and 4D, the direction of current through the TAC resistor RTAC reverses between the first and second half-cycles of TAC mode, such that the TAC resistor RTAC carries alternating current during TAC mode operation, curtailing electromigration and hot-carrier injection-induced degradation as described in connection with FIG. 1.

[0092] The oscillator 300 is employable in either role of the semiconductor device 100 of FIG. 1. When the oscillator 300 is employed as the first oscillator 104, the MAGNITUDE TRIM signal generated by the trim controller 124 is applied to the resistor bank 302 to select a net resistance R that adjusts the oscillation period T=2RC toward the target frequency, correcting for aging-induced drift in the resistance R of the resistor bank 302 over the operational lifetime of the semiconductor device 100, as described in connection with FIGS. 1-2. In this role, the TAC ENABLE input of the control logic 307 is held de-asserted and the oscillator 300 operates exclusively in normal mode, with the TAC resistor RTAC remaining nonconducting throughout the operational lifetime. Conversely, when the oscillator 300 is employed as the second oscillator 108, the MAGNITUDE TRIM signal is not applied to the resistor bank 302, and instead the TAC ENABLE signal and the SLOPE TRIM signal from the trim controller 124 are applied to the control logic 307 and the PTAT bias circuit 368 respectively, enabling the oscillator 300 to alternate between normal mode and TAC mode as needed to generate the measurement windows W1 and W2 of FIGS. 1 and 2. In this role, the RTAC switch configurations illustrated in FIGS. 4C and 4D are exercised at a power-on event or periodically (e.g., once per 1000 hours of operation or more) during each TAC mode measurement, while the configurations of FIGS. 4A and 4B govern normal mode operation between measurements.

[0093] Because the oscillator 300 is structurally the same in both roles, two instances of the oscillator 300 may be deployed within the semiconductor device 100 such that a first instance serves as the first oscillator 104 and a second instance serves as the second oscillator 108 during a first calibration operation. In a subsequent second calibration operation, the roles of the two instances may be exchanged, such that the first instance serves as the second oscillator 108 and the second instance serves as the first oscillator 104, enabling each oscillator to be calibrated against the other. This interchangeability avoids the need for a dedicated, separately-designed calibration oscillator and allows both oscillators to be trimmed toward the target frequency over the operational lifetime of the semiconductor device 100 using a single shared oscillator design. Combined with the cancellation of aging-induced drift in the second oscillator 108 through the subtraction of normal mode and TAC mode count values as described in connection with FIGS. 1 and 2, and with the minimization of electrical stress on the TAC resistor RTAC through alternating current conduction as illustrated in FIGS. 4C and 4D, the interchangeable dual-instance configuration provides a compact, robust and self-contained frequency calibration system that maintains long-term clock frequency stability without reliance on any external reference.

[0094] Table 1 illustrates example parameters demonstrating the operation and accuracy of the semiconductor device 100 of FIGS. 1-2 as implemented using the oscillator 300 of FIGS. 3 and 4A-4D, showing values at time zero immediately following production trim and after deployment in the field following aging-induced drift.TABLE 1ParameterTime Zero (post trim)After DeploymentTDUT = TOSC 100 ns  100.5 nsTTCK = TOSCB 100 ns   102 nsTTAC  10 ns    10 nsDTCK60006000TTAC* DTCK60000 ns  60000 nsD1OSC60006089D2OSC54005492D1OSC-D2OSC600597MEASURED TOSC 100 ns100.502 ns

[0095] At time zero, both the first oscillator 104 (DUT) and the second oscillator 108 have been trimmed to a target period of 100 nanoseconds (ns), such that TDUT=TTCK=100 ns. The TAC mode period decrement TTAC is 10 ns, established by the resistance RTAC of the TAC resistor RTAC 126 of FIG. 1 and the capacitance C of the timing capacitors of the second oscillator 108 as described in connection with FIGS. 4C and 4D. The measurement window length DTCK is 6000 clock cycles of the second oscillator 108, such that the product TTAC×DTCK=60000 ns remains constant across time zero and after deployment, reflecting the stability of the TAC resistor RTAC 126 against aging-induced drift as described in connection with FIG. 1. At time zero, the first count value D1OSC accumulated by the first counter 208 during the normal mode measurement window W1 is 6000, and the second count value D2OSC accumulated during the TAC mode measurement window W2 is 5400, yielding a difference D1OSC-D2OSC of 600. From Equation 9 of FIG. 2, the frequency fosc of the first oscillator 104 is obtained as (D1OSC-D2OSC) / (TTAC×DTCK), and the corresponding measured period TOSC=1 / fosc is therefore TTAC×DTCK / (D1OSC-D2OSC)=60000 ns / 600=100 ns, which matches the target period.

[0096] After deployment, both the first oscillator 104 and the second oscillator 108 have experienced aging-induced drift in the timing resistor R (which could be an n-well resistor) of each oscillator 300, causing TDUT to increase from 100 ns to 100.5 ns and TTCK to increase from 100 ns to 102 ns. However, TTAC remains unchanged at 10 ns, confirming that the TAC resistor RTAC 126, implemented as a metal or a high activation energy material (e.g., polysilicon, SiCr or TaN) that is resistant to thermal aging degradation as described in connection with FIG. 1, does not contribute to the aging-induced drift in the period decrement. The product TTAC×DTCK accordingly remains fixed at 60000 ns.

[0097] As demonstrated, after deployment, the first count value D1OSC has increased to 6089, reflecting the slower clock rate of the second oscillator 108 during the normal mode measurement window W1, and the second count value D2OSC has increased to 5492, reflecting the same slower clock rate of the second oscillator 108 offset by the TAC mode period decrement TTAC during the TAC mode measurement window W2. The difference D1OSC-D2OSC is 597, and from Equation 9 the measured period is obtained as 1 / fosc=TOSC=60000 ns / 597=100.502 ns, accurately resolving the 0.5 ns drift in the period of the first oscillator 104 despite the 2 ns concurrent aging drift in the period of the second oscillator 108. Table 1 thereby demonstrates that the semiconductor device 100 accurately measures the frequency drift of the first oscillator 104 independently of aging-induced drift in the second oscillator 108, confirming the drift-cancellation property of the D1OSC-D2OSC measurement described in connection with FIGS. 1 and 2. Accordingly, the trim controller 124 can select an appropriate MAGNITUDE TRIM signal to accurately compensate for the frequency drift of the first oscillator 104 in the manner described.

[0098] FIG. 5 illustrates a flowchart of a method 500 for frequency drift compensation of an on-chip clock generator, as executed by a semiconductor device (e.g., the semiconductor device 100 of FIG. 1 and the semiconductor device 200 of FIG. 2).

[0099] At block 505, a first oscillator (e.g., the first oscillator 104) and a second oscillator (e.g., the second oscillator 108 of FIG. 1) are operated in normal mode. In normal mode, the TAC ENABLE signal generated by the trim controller 124 of FIG. 1 is de-asserted, such that the switch network 306 of the oscillator 300 of FIG. 3 is configured as illustrated in FIGS. 4A and 4B, placing the TAC resistor RTAC 126 outside the capacitor charging current path and establishing the oscillation period of the second oscillator 108 as T=2RC.

[0100] At block 510, cycles of the first oscillator are counted during a first count window defined by the second oscillator operating in normal mode. As described in connection with FIG. 2, the second counter accumulates cycles of the second oscillator and a thresholder (e.g., the thresholder 214 of FIG. 2) asserts the count window signal, and the accumulated count remains below the window count DTCK, gating cycles of the first oscillator through an AND gate to the first counter. Responsive to the second counter 212 reaching DTCK, the first count window closes, and the first count value D1OSC is latched from the first counter, as demonstrated by the time-zero and after-deployment values of Table 1.

[0101] At block 515, the second oscillator is switched to temperature and aging compensated (TAC) mode. The trim controller asserts the TAC ENABLE signal and a slope trim selector (e.g., the slope trim selector 220) of FIG. 2 switches the SLOPE TRIM signal from the first slope trim code STnormal to the second slope trim code STTAC. It is noted that in some examples, as demonstrated in FIG. 3, the first slope trim code STnormal and the second slope trim code STTAC are both output by the trim controller, and the TAC ENABLE signal is used to select one of the trim codes. Responsive to assertion of the TAC ENABLE signal, control logic (e.g., control logic 307 of FIG. 3) of the oscillator reconfigures a switch network (e.g., a switch network 306 as illustrated in FIGS. 4C and 4D), placing the TAC resistor RTAC in series with the capacitor charging current path and reducing the oscillation period of the second oscillator 108 to T−TTAC=2RC−2×RTAC×C.

[0102] At block 520, cycles of the first oscillator are counted during a second count window defined by the second oscillator operating in TAC mode. As in block 510, the second counter accumulates cycles of the second oscillator and the thresholder gates cycles of the first oscillator through the AND gate to the first counter. Because the TAC mode period of the second oscillator is shorter than its normal mode period by TTAC, the second count window is shorter than the first count window by the fixed interval TTAC×DTCK, independent of the aging state of the second oscillator. The second count value D2OSC is latched from the first counter 208 when the second counter reaches DTCK, and the difference between D1OSC and D2OSC is accordingly fixed at a value that reflects only the period of the first oscillator, as established by Equations 8 and 9 of FIG. 2 and confirmed by the example values of Table 1.

[0103] At block 525, a difference value (D1OSC-D2OSC) is computed from the first count value D1OSC and the second count value D2OSC by a subtraction circuit (e.g., the subtraction circuit 216 of FIG. 2) that generates the difference value. Because aging-induced drift accumulated in a resistor bank (e.g., the resistor bank 302 of FIG. 3) of the second oscillator impacts D1OSC and D2OSC equally, the subtraction cancels that drift, and the difference value is proportional to the period of the first oscillator. At block 530, a comparator (e.g., the comparator 116 of FIG. 1) receives the difference value and the expected count value D-EXPECTED retrieved from OTP memory (e.g., OTP memory 120 of FIG. 1) and compares the difference value with the expected value.

[0104] At block 535, a determination is made by the comparator (e.g., the comparator 116 of FIG. 1). If the difference value does not deviate from the expected count value D-EXPECTED by an amount warranting a trim correction, the determination is negative (e.g., NO), and, the method 500 proceeds to block 540 and the method 500 ends. If a trim correction is warranted, the determination at block 535 is positive (e.g., YES), and the method proceeds to block 545.

[0105] At block 545, a magnitude trim signal is generated by the trim controller and applied to the first oscillator. The magnitude trim signal is applied to the resistor bank of the first oscillator as described in connection with FIG. 3 to select a net resistance R that shifts the oscillation period T=2RC of the first oscillator 104 toward the target frequency. The method 500 thereby compensates for aging-induced frequency drift in the first oscillator at each field power-on event over the operational lifetime of the semiconductor device, maintaining long-term clock frequency accuracy without reliance on any external reference. The method 500 proceeds to block 540 and the method 500 ends.

[0106] In this description, unless otherwise stated, “about”, “approximately” or “nearly” preceding a parameter means being within + / −10 percent of that parameter. Further, in this description, the term “couple”, “coupled” or “couples” means either an indirect or direct connection. Modifications are possible in the described embodiments, and other embodiments are possible, within the scope of the claims.

Claims

1. A semiconductor device comprising:a first oscillator;a second oscillator;a compensation circuit having a first input coupled to the first oscillator, a second input coupled to the second oscillator and an output;a comparator having a first input coupled to an output of the compensation circuit; anda trim controller having an input coupled to an output of the comparator, a first output coupled to the first oscillator and a second output coupled to the second oscillator, wherein the first oscillator and the second oscillator accumulate frequency drift as a function of an age of the semiconductor device.

2. The semiconductor device of claim 1, wherein the compensation circuit comprises:an AND gate with a first input coupled to the first oscillator;a first counter having an input coupled to an output of the AND gate;a second counter having an input coupled to the second oscillator; anda thresholder having an input coupled to an output of the second counter and an output coupled to a second input of the AND gate.

3. The semiconductor device of claim 2, wherein the second oscillator comprises a resistor-capacitor timing circuit and a temperature and aging compensated resistance coupled to the resistor-capacitor timing circuit, the temperature and aging compensated resistance being formed from metal or a high activation energy material.

4. The semiconductor device of claim 3, wherein the temperature and aging compensated resistance is switchably coupled within the second oscillator such that current is conducted through the temperature and aging compensated resistance only during a temperature and aging compensated mode of the second oscillator.

5. The semiconductor device of claim 4, wherein the current is conducted through the temperature and aging compensated resistance in alternating directions while operating in the temperature and aging compensated mode.

6. The semiconductor device of claim 2, wherein the second counter is configured such that a count window signal is generated responsive to a defined number of cycles of the second oscillator being counted by the second counter, the count window signal being transmitted to the first counter to define a counting period of the first counter.

7. The semiconductor device of claim 6, wherein the first counter is configured such that a first count value is generated during a normal mode of the second oscillator and a second count value is generated during a temperature and aging compensated mode of the second oscillator, and a difference value is derived from the first count value and the second count value and received at the first input of the comparator.

8. The semiconductor device of claim 7, wherein the comparator is configured such that the difference value is compared to an expected count and a comparison result is generated at the output of the comparator and transmitted to the trim controller.

9. The semiconductor device of claim 8, wherein the difference value is independent of a period of the second oscillator, and a change in the period of the second oscillator that is common to the normal mode and the temperature and aging compensated mode is canceled responsive to computation of the difference value.

10. The semiconductor device of claim 8, wherein the trim controller is configured such that a magnitude trim signal is generated at the first output of the trim controller and transmitted to the first oscillator based on the comparison result received at the input of the trim controller.

11. The semiconductor device of claim 10, wherein the first oscillator selects a resistor in a resistor bank based on the magnitude trim signal.

12. The semiconductor device of claim 1, wherein the trim controller is configured to:output a temperature and aging compensated enable signal at the second output of the trim controller that is transmitted to the second oscillator to switch the second oscillator between a normal mode and a temperature and aging compensated mode; andoutput a slope trim signal at a third output of the trim controller that is transmitted to the second oscillator.

13. A circuit comprising:a voltage reference terminal;a first resistor having a first terminal coupled to the voltage reference terminal and a second terminal;a first capacitor having a first terminal and a second terminal;a second capacitor having a first terminal and a second terminal;a first plurality of switches coupling the first capacitor and the second capacitor to the second terminal of the first resistor;a comparator having a first input coupled to the first capacitor and the second capacitor and a second input coupled to the voltage reference terminal;a second resistor having a first terminal and a second terminal, the second resistor formed from metal or a high activation energy material; anda second plurality of switches having a first terminal coupled to the first terminal of the second resistor and a second terminal coupled to the second terminal of the second resistor, the second plurality of switches coupling the second resistor between the first capacitor and ground or between the second capacitor and ground or with the first terminal and the second terminal of the second resistor coupled to ground.

14. The circuit of claim 13, wherein the second plurality of switches is arranged such that current is conducted through the second resistor in a first direction during a charging phase of the first capacitor and in a second direction opposite the first direction during a charging phase of the second capacitor.

15. The circuit of claim 13, further comprising a temperature current control circuit having an output coupled to the first resistor, a first input and a second input, the first input receiving a normal mode slope trim value and the second input receiving a temperature and aging compensated mode slope trim value.

16. The circuit of claim 15, wherein the temperature current control circuit comprises a third input receiving a temperature and aging compensated enable signal, the temperature and aging compensated enable signal controlling the temperature current control circuit such that the normal mode slope trim value is selected during a normal mode and the temperature and aging compensated mode slope trim value is selected during a temperature and aging compensated mode.

17. The circuit of claim 13, wherein a resistance value of the second resistor is less than a resistance value of the first resistor.

18. A method comprising:operating a first oscillator and a second oscillator in a normal mode, wherein the first oscillator and the second oscillator accumulate frequency drift as a function of age;counting, by a first counter, cycles of the first oscillator during a first count window defined by a predetermined number of cycles of the second oscillator operating in the normal mode to generate a first count value;switching the second oscillator to operate in a temperature and aging compensated mode;counting, by the first counter, cycles of the first oscillator during a second count window defined by the predetermined number of cycles of the second oscillator operating in the temperature and aging compensated mode to generate a second count value;computing a difference value by subtracting the second count value from the first count value;comparing the difference value to an expected count value to generate a comparison result; andgenerating a magnitude trim signal based on the comparison result and applying the magnitude trim signal to select a particular resistance in a resistor bank of the first oscillator to adjust a frequency of the first oscillator.

19. The method of claim 18, wherein the difference value is independent of a period of the second oscillator, and a change in the period of the second oscillator that is common to the normal mode and the temperature and aging compensated mode is canceled by computation of the difference value.

20. The method of claim 18, wherein:the first count window is defined by counting, by a second counter, the predetermined number of cycles of the second oscillator operating in the normal mode and generating a first count window signal transmitted to the first counter; andthe second count window is defined by counting, by the second counter, the predetermined number of cycles of the second oscillator operating in the temperature and aging compensated mode and generating a second count window signal transmitted to the first counter, wherein asserting each of the first count window signal and the second count window signal causes the first counter to begin counting cycles of the first oscillator and de-asserting each of the first count window signal and the second count window signal causes the first counter to cease counting of the cycles of the first oscillator.

21. The method of claim 18, wherein operating the second oscillator in the temperature and aging compensated mode comprises asserting a temperature and aging compensated enable signal at a control logic block, the control logic block configuring a plurality of switches to direct a charging current through a temperature and aging compensated resistance in a charging path of the second oscillator during the second count window.

22. The method of claim 21, wherein directing the charging current through the temperature and aging compensated resistance comprises directing the charging current through the temperature and aging compensated resistance in a first direction during a first half-cycle of the second oscillator and in a second direction opposite the first direction during a second half-cycle of the second oscillator.

23. The method of claim 18, further comprising switching a slope trim input of a temperature control circuit of the second oscillator from a normal mode slope trim value to a temperature and aging compensated mode slope trim value in response to operating the second oscillator in the temperature and aging compensated mode, such that the second count window reflects cycles of the second oscillator generated under the temperature and aging compensated mode slope trim value.