This invention relates to clock signals in digital systems and, in particular, to a semiconductor circuit for monitoring the frequencies of such clock signals.
Digital systems and modules are ubiquitous, serving for a variety of purposes, including data processing, communication and control. In the context of the present specification, a digital system or module may be any of a wide range of sizes and packages, from a single semiconductor chip, through a multiple chip board or module to an assembly of boards or modules. Any of these may form a part of a more general system, such as an electronic system, an electrical power system, an appliance, a vehicle, etc.
Typically a clock signal is provided within the digital system to which various other signals are synchronized or from which they are derived. A clock signal typically consists of a train of pulses at a constant frequency. In the following description a clock signal will be simply referred to as a clock. Often there are provided within a system one or more additional clocks, generated independently of the first clock, although in many cases they are related to, derived from, or synchronized with, the first clock. Any of the clocks may be generated, by respective clock generators, within the system under consideration or outside it.
Usually the first clock has a highly stable frequency and is therefore often called a reference clock, while the other clocks, referred to as ancillary clocks, are generated in a manner that causes their respective frequencies to be inherently less stable. Often, the frequency of an ancillary clock is much higher than that of the reference clock. Typically, a high frequency ancillary clock is generated under some relation to the reference clock. Two well known means for such generation are the Phase Locked Loop (PLL) and the Frequency Multiplier (Fmul).
Due to various causes, the frequency of an ancillary clock may not always be stable, even if the clock is generated in synchrony with the reference clock. This is particularly true for frequencies much higher than that of the reference clock. Two particular effects are often noticeable in synchronous types of clock generators: (1) short-term fluctuations, namely those occurring between moments of synchronization, and (2) inherent drift. The meaning of inherent drift is that the frequency tends to drift away from its nominal value and is kept at that value only by the effect of the synchronization. If the tendency to drift becomes strong enough, the situation may become unstable and the synchronization may become ineffective or erroneous.
It is often desirable to detect frequency drift tendencies before they cause drastic effects. In other cases it is often desirable to detect frequency deviations exceeding certain given threshold values. The need for such detection may arise during production of chips that contain ancillary clock generators, for example, in order to possibly control production parameters or to reject a chip when unacceptable frequency deviations have been detected. A need for such detection may similarly arise during normal usage of the digital system, for example, in order to warn of an actual or impending malfunction due to frequency deviations. For the case of detection during production, it is further desirable that the means for detection be provided on the same chip as the clock generator under consideration, thus avoiding the need for a special test setup.
U.S. Pat. No. 5,633,609 to Duncan discloses an internal monitor circuitry that detects whether a clock signal is present at its input. The circuit does not, however, detect the frequency of the clock signal, nor any deviations of the frequency from a given value. U.S. Pat. No. 5,497,110 to Smith discloses a frequency monitor and error detector circuit that compares an input alternating current (ac) signal with a reference frequency, which is much higher than that of the alternating current (ac) signal. The times of zero transitions of the alternating current (ac) signal are compared with those of the nearest cycles of the reference frequency in order to yield a measure of frequency deviation, which is processed in a logic circuit to obtain a go/no-go decision.
The circuitry of the Smith patent includes an inherently analog circuit and is thus not very suitable for realization on a digital integrated circuit (IC) chip. Furthermore, the Smith patent is directed to electric power frequencies and is not suitable for the high frequencies prevalent in modern digital systems, to which the present invention is directed. Moreover, the circuitry of the Smith patent is relatively complex and thus may not be economical.
Therefore there is a need in the art for a compact on-chip digital circuit for monitoring the frequency of any clock present on the integrated circuit chip.
The present invention comprises a frequency monitor circuit (FMC) that is part of an integrated circuit chip, there being provided on the chip at least one clock, whose frequency is to be monitored, each of the clocks being a respective monitored clock. The FMC comprises:
a reference window generator (RWG), operative to output a reference window signal, the reference window having a given duration;
a monitored clock counter (MCC), responsive to the reference window signal and to any one of the monitored clocks and operative to count all pulses in the respective monitored clock that occur within the duration of the reference window and to output a corresponding pulse count; and
at least two comparators, responsive to the pulse count, each comparator being operative to compare the pulse count with a respective given threshold value and to output a corresponding indication of frequency deviation.
In one advantageous embodiment of the invention the FMC further comprises a storage and logic module (SLM), responsive to outputs of the comparators, wherein the RWG, MCC and comparators are operative to function repeatedly and the SLM is operative to store any indication output by the comparators, the stored indications being available for readout. The SLM may be further operative to process the stored indications to obtain statistical information about the frequency of any of the monitored clocks, including an indication of a trend in frequency deviation.
In one advantageous embodiment of the FMC of the present invention the chip comprises at least one clock generator and the output of any of the generators is one of the monitored clocks. The clock generator may include a PLL or it may be a frequency multiplier. In the latter case, the RWG and the MCC may form part of the frequency multiplier.
In another advantageous embodiment of the FMC of the present invention there is further provided on the chip a reference clock, and the RWG comprises a reference clock counter (RCC) that is responsive to the reference clock and operative to count a given number of reference clock pulses, wherein the beginning of the reference window coincides with the beginning of the counting and the end of the reference window coincides with the end of the counting. In one configuration of this advantageous embodiment, the chip includes a clock generator of the frequency multiplier type, whose output is a monitored clock, the RCC and the MCC form part of the clock generator.
According to another advantageous embodiment of the invention, the FMC further comprises a selector, receptive to a plurality of monitored clocks and operative to switch any one of them into the MCC. Further, when the chip forms part of a digital system, some of the monitored clocks may be generated, within the system, outside the chip.
The foregoing has outlined rather broadly the features and technical advantages of the present invention so that those skilled in the art may better understand the detailed description of the invention that follows. Additional features and advantages of the invention will be described hereinafter that form the subject of the claims of the invention.
Those skilled in the art should appreciate that they may readily use the conception and the specific embodiment disclosed as a basis for modifying or designing other structures for carrying out the same purposes of the present invention. Those skilled in the art should also realize that such equivalent constructions do not depart from the spirit and scope of the invention in its broadest form.
Before undertaking the Detailed Description of the Invention below, it may be advantageous to set forth definitions of certain words and phrases used throughout this patent document: the terms “include” and “comprise,” as well as derivatives thereof, mean inclusion without limitation; the term “or,” is inclusive, meaning and/or; the phrases “associated with” and “associated therewith,” as well as derivatives thereof, may mean to include, be included within, interconnect with, contain, be contained within, connect to or with, couple to or with, be communicable with, cooperate with, interleave, juxtapose, be proximate to, be bound to or with, have, have a property of, or the like; and the term “controller” means any device, system or part thereof that controls at least one operation, such a device may be implemented in hardware, firmware or software, or some combination of at least two of the same. It should be noted that the functionality associated with any particular controller may be centralized or distributed, whether locally or remotely. Definitions for certain words and phrases are provided throughout this patent document, those of ordinary skill in the art should understand that in many, if not most instances, such definitions apply to prior uses, as well as future uses, of such defined words and phrases.
In order to understand the invention and to see how it may be carried out in practice, an advantageous embodiment pf the invention will now be described, by way of non-limiting example only, with reference to the accompanying drawings, in which:
CFM 10 is seen to basically consist of a reference clock counter (RCC) 12, an ancillary clock counter (ACC) 14, two comparators 16 and a Memory & Logic Module (MLM) 18, all interconnected as shown in
Comparators 16 receive, as comparison values, some given threshold values, representing corresponding acceptable limits for frequency deviation. The actual threshold values may be expressed as a nominal count M in the ACC (to be explained more fully below), corresponding to the nominal PLL output frequency, plus or minus, respectively, some given delta, representing the maximum acceptable frequency deviation. The absolute values of the two deltas need not be equal.
In operation, RCC 12 counts a number of successive reference clock pulses equal to the given window count N. The duration of this counting (equal to N times the duration of one cycle of the reference clock) is noted as a reference window and a signal corresponding to the reference window is sent from the RCC 12 to ACC 14. This signal may, for example, be in the form of a pulse, whose duration (or width) is exactly that of the reference window, or, as another example, it may be in the form of a pair of very short pulses—one at the beginning of the reference window and one at its end.
ACC 14 counts up pulses in the ancillary clock, received from PLL 11, over the duration of a reference window and outputs the resultant count into comparators 16. When the frequency of the PLL 11 output is at its nominal value, the count output by the ACC 14 has a certain nominal value M. It is clear that the ratio M/N is exactly equal to the ratio between the nominal PLL clock frequency and the reference clock frequency. The count value obtained from ACC 14 is compared in each comparator 16 with a respective threshold value.
As noted above, a high threshold value, input to one of the comparators (referred to as the upper threshold comparator) is equal to the nominal count value M plus a delta value. Similarly, a low threshold value, input to the other comparator (referred to as the lower threshold comparator) is equal to the nominal count value N minus a delta value. If the count from the ACC 14 is between the two threshold values (signifying that the PLL frequency is close to its nominal value), the output of each comparator 16 remains at its “normal” level. If the count exceeds the higher threshold level (signifying that the PLL frequency deviates upward from its nominal value by more than a given amount, corresponding to an upper threshold), the corresponding upper threshold comparator changes its output to a suitably indicative level.
Similarly, if the count is lower than the lower threshold level (signifying that the PLL frequency deviates downward from its nominal value by more than a given amount, corresponding to a lower threshold), the corresponding lower threshold comparator changes its output to a suitably indicative level. The outputs of comparators 16, which thus indicate excessive frequency deviation, may be fed directly to an indication device or to some suitable control circuit for taking an appropriate action. In the illustrated advantageous embodiment, though, the outputs of comparators 16 are fed to MLM 18 for further processing (to be explained more fully below).
It is to be appreciated that a clock generator of any other type may appear in place of PLL 11 and the CFM 10 of
In an alternative, more general, embodiment of the CFM 10 of the invention (not shown), the RCC 12 is replaced by a reference window generator (RWG) that operates not necessarily by counting supplied reference clock pulses, yet similarly outputs a reference window signal as described above. It may, for example, include an internal crystal-based oscillator. It may thus be particularly suitable for the case that no reference clock is present on the chip. In this general case, the variable N should be interpreted as representing a window width in some suitable units.
The operations of generating a reference window, counting ancillary clock pulses and comparing the count with threshold values, forming together one measurement cycle, are preferably repeated at some regular interval, thus providing a time series of measurement results, some of which may indicate excessive frequency deviations. These results are input to MLM 18 and stored in suitable memory registers therein. A logic circuit within MLM 18 is designed, or programmed, to perform certain statistical operations on the stored indications. These operations may include any of a variety of possible statistical calculations, including, but not limited to, finding averages, variances, peaks and short-term trends. The statistical variables to be calculated may depend on the expected causes of frequency deviations, on the expected nature of the deviations (e.g., whether they are characterized by slow drifts, by random fluctuations, by consistent inaccuracies or by an irreversible change) and on what deviations may be detrimental to the operation of the system or (in the case of in-production testing) the chip.
A very simple yet useful operation that may be performed in the MLM 18 is, for example, to just store any indication of excessive frequency deviation. The stored information may be polled from time to time by an agent external to the chip. Another relatively simple type of operation that may be performed in the MLM is, for example, to detect whether any two consecutive measurement cycles result in a similar excessive deviation indication (i.e., whether both indicate exceeding the upper threshold or going below the lower threshold).
It is to be appreciated that the number of comparators 16 may, in alternative configurations, be greater than two. Each comparator would then be fed a different threshold count. For example, there may be three comparators, two of which will be fed threshold counts less than the nominal count M by two respective delta values, so that their respective outputs indicate two levels of frequency deviation.
It is also to be appreciated that comparators 16 could be replaced by any other logic circuit that would effect the desired comparisons and output corresponding deviation indications. For example, and in particular, a subtraction circuit may be used in which any threshold value is subtracted from the count values in order to obtain deviation values of variable magnitude. The term “comparator” should be understood herein to include any such circuit and the term “comparing” to also include subtracting. It should further be appreciated that threshold values, input as described above, may be represented by other given values (e.g., the nominal count M and suitable delta values).
In operation, a selection signal is applied to selector 19 to select a particular one of the input ancillary clocks (including that from PLL 11) and to switch it to its output, and therefore to the input of ACC 14. At the same time a suitable window count (or window width) value N is applied to RCC 12 and suitable threshold values (related to a nominal count value M) are applied respectively to comparators 16. The operation then proceeds similarly to the operation that has been described above with respect to
The operation may then be repeated with a different selection signal and corresponding values of window count and of thresholds. The operation may be thus repeated for all input clocks, possibly in a cyclical sequence. The value of N, as well as the threshold values (which are akin to the nominal frequency value M), may generally differ for the various ancillary clocks being monitored. When the CFM includes a RCC, the ratio M/N is usually made proportional to the ratio of the nominal ancillary clock frequency to the reference clock frequency.
It is to be noted that the advantageous embodiment shown in
It is to be noted that in the operation of the Fmul of
Another possible type of malfunction of the Fmul is a constant tendency of the frequency inherently generated by the HFPG to slowly drift in one of the two senses (e.g., upwards). In such a case the control mechanism would keep the frequency of the clock, actually output, near the nominal value as long as the drift is within a certain range, but beyond that it will fail. An early detection of this tendency is therefore desirable.
Yet another type of possible malfunction, for which monitoring is desirable, is associated with the control mechanism in the HFPG. The control value obtained from control logic 23 is transmitted as a digital signal and is converted within HFPG 21 to an analog signal by means of a digital-to-analog converter (D/A). Inherent inaccuracies in the D/A may cause the differences between certain adjacent value levels to be different from others, thus possibly causing appreciable jumps in the frequency during the correction process.
RCC 22, HFCC 24, comparators 26 and MLM 28 are analogous to, and their operation is similar to, RCC 12, ACC 14, comparators 16 and MLM 18, respectively, of
It is to be noted that the sharing of the RCC and the HFCC between the Fmul and the CFM is economical and makes the application of the CFM of the invention particularly advantageous for monitoring clock generators of the Fmul type. It is to be appreciated that, similar to the advantageous embodiment shown in
Here, again, the selector would be fed additional clocks as inputs, which clocks may come from other ancillary clock generators on the chip, not necessarily of the Fmul type, or from sources external to the chip. Monitoring of these other clocks would be effected by occasionally switching the selector to receive any of the other inputs (thus interrupting the control loop of the Fmul), feeding a corresponding N value to RCC 22 and corresponding threshold values to comparators 26 and reading resultant output from MLM 28.
Although the present invention has been described with respect to a number of exemplary embodiments, various changes and modifications may be suggested to one skilled in the art. It is intended that the present invention encompass such changes and modifications as fall within the scope of the appended claims.
This patent application claims priority to U.S. Provisional Patent Application Ser. No. 60/453,395 filed on Mar. 10, 2003 entitled “CLOCK FREQUENCY MONITOR.”
Number | Name | Date | Kind |
---|---|---|---|
4352999 | Galpin | Oct 1982 | A |
4380733 | Yano et al. | Apr 1983 | A |
5418409 | Kuhn | May 1995 | A |
5488323 | Beacham et al. | Jan 1996 | A |
5497110 | Smith | Mar 1996 | A |
6008671 | Kang | Dec 1999 | A |
6281699 | Bishop | Aug 2001 | B1 |
6289055 | Knotz | Sep 2001 | B1 |
6542013 | Volk et al. | Apr 2003 | B1 |
6667638 | Kramer et al. | Dec 2003 | B1 |
6998882 | Chung | Feb 2006 | B1 |
Number | Date | Country | |
---|---|---|---|
60453395 | Mar 2003 | US |