Aspects of the invention relate generally to electronic circuits and methods indicating the time of an event arrival. More specifically, aspects of the invention involve electronic circuits and methods of generating a digital value indicating the time of an event arrival denoted by a logic signal.
The accurate and precise recording of the arrival time of an event, such as the transition of a logic signal from one logic level to another, is beneficial in many electronics applications where signal measurement is an important task. For example, various forms of automatic test equipment (“ATE”) measure the performance of a device under test, such as an integrated circuit (“IC”). One common test involves measuring the time at which a logic signal transitions at the output signal line of an IC in response to a change in device input. Such a test is typically used to characterize the operational speed of the IC.
Given a progressive decrease in logic gate delays as IC technology advances, as well as the increased timing constraints under which such ICs operate, capturing the arrival time of an event at a sufficient resolution to provide worthwhile information regarding the performance of the IC becomes increasingly difficult. Oftentimes, the resolution required in determining an event arrival time exceeds the resolution of the fastest system clock available in the ATE system analyzing the IC, making the task even more ominous.
In addition, since such events typically arrive asynchronously to the clock domain of a system utilizing the event timing information, properly transferring the timing information from the event time domain to the system clock time domain is important. Such asynchronous behavior may cause misinterpretation of the event arrival time, and in some cases may even cause metastability in the circuit determining the arrival time of the event of interest.
Given the foregoing, circuits and methods that provide accurate, high-resolution digital coding of the arrival time of an event would be advantageous.
Generally, embodiments of the present invention provide a time code generator and associated method for generating a digital value indicating an arrival time of an event. A first oscillator is used to generate a plurality of first oscillating signals during each positive phase of a system clock, and a second oscillator is employed to generate a plurality of second oscillating signals during each negative phase of the system clock. Each of the oscillating signals is of a different phase relative to the system clock. A first phase counter is driven by one of the first oscillating signals, and a second phase counter is driven by one of the second oscillating signals. Each of the first and second phase counters counts the number of oscillations of the oscillating signals in a phase of the system clock. Each of the oscillating signals drives a vernier interpolator, at least one of which captures an event. A composite time coder is in communication with the phase counters and the vernier interpolators to generate a digital value indicating the arrival time of the event.
In one embodiment of the invention, the digital value, or timestamp, of an event arrival is produced using a state of a vernier interpolator capturing the event, the identity of the vernier interpolator capturing the event, the value of the phase counter associated with the vernier interpolator capturing the event, and the system clock phase associated with the vernier interpolator capturing the event.
In another embodiment, a method for generating a digital value indicating an arrival time of an event includes generating a plurality of oscillating signals by way of a system clock, wherein each of the oscillating signals oscillates faster than the system clock. Also, each oscillating signal is initiated at a different phase within each period of the system clock. An event is captured to produce a logical state indicating the time of the event relative to a particular oscillation of one of the oscillating signals. The digital value is then composed which indicates the time of the event within a period of the system clock by way of the logical state from the capturing step, the identity of the oscillating signal related to the event, and the identity of the particular oscillation of the related oscillation signal.
Additional embodiments and advantages of the invention will be realized by those skilled in the art upon reading the detailed description of the invention, presented below.
One embodiment of the invention, a biphase vernier time code generator 1, is illustrated at a high level in
Generally, the time code generator 1 receives as input two signals: a system clock 2, which typically also drives much of the other electronic circuitry with which the time code generator 1 is coupled, and an event signal 3. The event signal 3 indicates the occurrence of an event by changing voltage levels or logic states. In the embodiments described below, an event is indicated by a LOW-to-HIGH logic level transition of the event signal 3. In alternative embodiments, HIGH-to-LOW logic level transitions may also be detected, as well as analog voltage or current level transitions, given appropriate circuitry to transform the event signal 3 into a digital form usable by the time code generator 1.
While specific embodiments of the time code generator 1 are presented and described herein, alternative embodiments of the invention are possible which are not specifically described below. For example, circuits employing varying alternative logic gates or circuits that provide similar functionality as presented herein are employable while remaining within the scope of the invention. Additionally, a time code generator may be implemented in an application specific integrated circuit (“ASIC”) or other processing platform.
As shown in
Still referring to
In operation, during each positive phase of the system clock 2, the gated ring oscillator 110 of the positive phase section 100 initiates an operational cycle of each associated vernier interpolator V0P-V3P in a phased, cyclical fashion so that at least one interpolator V0P-V3P is operating during the entire positive phase of the system clock 2. Each vernier interpolator V0P-V3P, operating for a limited time period upon initiation, provides a precise mechanism for generating a digital number relating to the time of an event arriving during its operation. In addition, the phase counter C0P of the positive phase section 100 counts each successive cycle of the gated ring oscillator 110 during a particular positive phase of the system clock 2. During each negative phase of the system clock 2, the components of the negative phase section 200 operate in an analogous fashion to that of the positive phase section 100. Thus, taken in the aggregate, the identity of the particular phase of the system clock 2 during which an event occurs (i.e., positive or negative), in conjunction with the value of the active phase counter C0P, C0N at the time of the event arrival, and the identity and attendant digital number of the particular vernier interpolator V0P-V3P, V0N-V3N that captured the event arrival, are employed by the composite time coder 300 to produce a digital value indicating the arrival time of each event captured by the time code generator 1. In addition, the system time domain synchronizer 400 may transfer each digital value produced by the composite time coder 300 to a circuit synchronized with the system clock 2. Each section of the time code generator 1 is described in greater detail below.
Each gated ring oscillator 110, 210 includes four logical AND gates X0P-X3P, X0N-X3N connected in a ring configuration, with the output of one AND gate driving one or both of the inputs of the next AND gate in the ring. Thus, a logic signal will travel through the gates at a rate determined by the propagation delay of each of the AND gates, as well as the length and nature of the conductors connecting the AND gates. This configuration results in an oscillating signal begin generated by each AND gate, with each of the oscillating signals being of a different phase. An output of each of the AND gates within a gated ring oscillator 110, 210 drives a separate vernier interpolator V0P-V3P, V0N-V3N. For example, AND gate X0P drives vernier interpolator V0P, and AND gate X0N drives vernier interpolator V0N. More specifically, when the output of an AND gate X0P-X3P, X0N-X3N becomes active, the operation of its associated vernier interpolator V0P-V3P, V0N-V3N, respectively, is initiated. After initiation, each vernier interpolator V0P-V3P, V0N-V3N operates for a period of time, during which an event arrival may be captured. The operation of the vernier interpolators V0P-V3P, V0N-V3N is described in further detail below. In alternative embodiments, a different number of AND gates (for example, three, five, six or another number) may be employed to similar end. Also, other logical gates, such as OR gates, NAND gates, NOR gates, and the like, may be employed in varying configurations to the same end. Generally, the higher the number of gates employed in the gated ring oscillators 110, 210, the higher the number of vernier interpolators required, thus allowing slower overall oscillations of the ring oscillators 110, 210 at the expense of more circuit area and higher power consumption. Conversely, fewer gates per ring oscillator 110 would reduce circuit area and power requirements, while requiring faster oscillation of the ring oscillators 110, 210, thus making capture of the event arrival time more problematic.
As shown in
Each gated ring oscillator 110, 210 also employs a small “keep-alive” circuit 120, 220 to control the oscillation of its associated series of AND gates X0P-X3P, X0N-X3N making up the gated ring oscillator 110, 210. Each keep-alive circuit 120, 220 contains a D flip-flop 122, 222 and a logical OR gate 124, 224, both of which are driven by the system clock 2, as shown in
The keep-alive circuits 120, 220 initiate the oscillation of the AND gates X0P-X3P, X0N-X3N when the associated phase section 100, 200 becomes active. For example, when the system clock 2 transitions from a logic LOW to a logic HIGH, one input of the OR gate 124 of the keep-alive circuit 120 within the positive phase section 100 is driven HIGH. The HIGH output drives one of the inputs of the first AND gate X0P HIGH, thereby initiating the oscillation of the positive phase section AND gates X0P-X3P, with all of the outputs of the AND gates X0P-X3P becoming HIGH in series. When the output of the last AND gate X3P transitions to the HIGH state, an active high output of the last AND gate X3P, connected to the clock input of the D flip-flop 122, latches the current value of the system clock 2 (i.e., HIGH), thus driving the second input of the OR gate 124 HIGH as well. Therefore, for proper operation of the circuit, the system clock 2 should have a frequency sufficiently low such that the particular phase of the system clock 2 is essentially constant while the system clock 2 propagates through the OR gate 124 and all four AND gates X0P-X3P, and latches the value of the system clock 2 into the D flip-flop 122. Otherwise, the gated ring oscillator 110 may not produce a full initial cycle, thus potentially causing timing anomalies within the vernier interpolators V0P-V3P driven by the AND gates X0P-X3P.
As long as the system clock 2 remains HIGH, the output of the OR gate 124 remains HIGH, thus ensuring the continued oscillation of the series of AND gates X0P-X3P in the positive phase section 100. Once the system clock 2 transitions from HIGH to LOW, the positive phase keep-alive circuit 120 ensures that the AND gates X0P-X3P complete their current oscillation. In other words, the AND gates X0P-X3P continue to operate as described above until the next time the active high output of the last AND gate X3P transitions from LOW to HIGH, thus latching the current value of the system clock 2 (i.e., LOW) into the D flip-flop 122. At that point, the output of both the D flip-flop 122 and the OR gate 124 of the keep-alive circuit 120 are LOW, thus forcing the output of the first AND gate X0P (and every other AND gate X1P-X3P in series) LOW, at which point the oscillation of the positive phase gated ring oscillator 110 ceases.
At the same time, the transition of the system clock from HIGH to LOW initiates the oscillation of the gated ring oscillator 210 of the negative phase section 200, which includes the negative phase keep-alive circuit 220, the negative phase counter CON, and the AND gates X0N-X3N. The D flip-flop 222 and the OR gate 224 of the negative phase keep-alive circuit 220, shown in
The gated ring oscillator 210 of the negative phase section 200 then operates as described above in relation to the positive phase oscillator 110. When the logic level of the system clock 2 returns HIGH, the negative phase keep-alive circuit 220 provides for the continued oscillation of the related gated ring oscillator 210 until the current oscillation is complete, as described above with respect to the positive phase section 100. The same LOW-to-HIGH transition of the system clock 2 also reinitiates oscillation of the positive phase section gated ring oscillator 110, restarting the entire oscillation process, which continues in this fashion as long as the system clock 2 continues to oscillate.
Associated with each gated ring oscillator 110, 210 is a phase counter C0P, C0N, which counts the number of oscillations made by the gated ring oscillator 110, 210 during a particular phase of the system clock 2. At the beginning of each phase of the system clock 2, the associated phase counter C0P, C0N is reset to zero by way of the output of the related keep-alive circuit 120, 220 being LOW. For example, after the system clock 2 goes from HIGH to LOW, ultimately causing the output of the positive phase keep-alive circuit 120 to transition LOW when the last positive phase oscillation is complete (as described above), the positive phase counter C0P is set to zero by way of its clear input.
Thereafter, when the system clock 2 returns to the HIGH logic state, the output of the positive phase keep-alive circuit 120 also goes HIGH, thus enabling the positive phase counter C0P by inactivating its clear input. While the system clock 2 remains HIGH, the value of the positive phase counter C0P is incremented each time the active low output of the last AND gate X3P transitions from LOW to HIGH (i.e., when a logic LOW propagates through the last AND gate X3P). In so doing, the value of the positive phase counter C0P denotes the number of the current oscillation of the gated ring oscillator 110 for the current phase of the system clock 2, thus providing a portion of the information that indicates when an event has occurred. The negative phase counter C0N operates in a corresponding manner. The timing diagram of
The value of each phase counter C0P, C0N, as well as the current phase of the system clock 2 (HIGH or LOW) and the identity and stored state of the vernier interpolators V0P-V3P, V0N-V3N, are employed as part of the time code, or timestamp, generated by embodiments of the present invention, as described in greater detail below.
Each AND gate X0P-X3P, X0N-X3N of the gated ring oscillators 110, 210 drives corresponding vernier interpolator V0P-V3P, V0N-V3N, respectively, to finely determine the time of the arrival of an event indicated by the event signal 3. Each of the vernier interpolators V0P-V3P, V0N-V3N, shown in greater detail in
The event signal 3 drives each of the vernier interpolators V0P-V3P, V0N-V3N, propagating through a series of delay elements DE1-DE15 of slightly longer delay relative to the delay elements DO1-DO15 employed for the associated AND gate output. In the embodiment of
To more fully explain,
However, as shown in
The particular examples of Table 1 and
The bus 240 formed by the outputs of each vernier interpolator V0P-V3P, V0N-V3N may then drive a Gray code generator 310 of the composite time coder 300, as indicated in
Variations in different digital logic technologies, IC manufacturing processes, circuit operating environments and the like can influence the performance, and hence the results, of the portions of the time code generator 1 described above. Such variations should be taken into account when analyzing the expected signal timing and resolution of the code time generator 1.
Although sixteen latches and a corresponding number of delay elements are implemented in the embodiment of
Referring again to
Since each interpolator V0P-V3P, V0N-V3N is initiated at a different point in a cycle of a gated ring oscillator 110, 210, the identity of the capturing interpolator, as well as the digital value of the state of that interpolator, is important in determining when the event occurred during a particular cycle of the associated gated ring oscillator. Whether an interpolator V0P-V3P, V0N-V3N contains an event arrival may be determined by comparing the stored values of the first latch L0 and last latch L15 of each interpolator. If they are the same (i.e., both LOW or both HIGH), the interpolator does not hold the event. If they are different (i.e., LOW and HIGH, or HIGH and LOW, depending on the transition direction of the related AND gate output), the interpolator has captured an event. Such a determination may be made with an exclusive-OR (XOR) gate 245 included with each interpolator, as shown in
As mentioned above, and as shown in
Given the above description regarding the vernier interpolators V0P-V3P, V0N-V3N, a valid interpolator Gray-encoded value, as well as the identity of the selected interpolator (together representing the lower seven bits of the timestamp 320), is captured, or “registered,” properly within the composite time coder 300 by way of the event signal 3. However, using the event signal 3 to register the arrival of the event introduces potential metastability or misregistration when the remaining four bits of the timestamp 320, which are synchronous with the system clock 2, are registered within the composite time coder 300. Metastability refers to the possible instability or oscillation of a data latch or register output when the associated data input arrives at essentially the same instant as the related clock or latch enable signal. Misregistration refers to the possibility of aligning an incoming data input of a latch or register with an incorrect period of a clock or latch enable signal. In other words, since the event signal 3 and the system clock 2 are not synchronous, metastability and misregistration with respect to the value of the phase counter C0P, C0N, or the identity of the phase of the system clock 2 during which the event arrived, is possible.
In one embodiment, metastability and misregistration of the value of the phase counter C0P, C0N is prevented, or significantly reduced, by employing within the composite time coder 300 a sequential logic circuit driven by each gated ring oscillator 110, 210. The sequential logic circuit delays registration of the value of the phase counter C0P, C0N until the second edge of the output of the AND gate X0P-X3P, X0N-X3N driving the selected interpolator V0P-V3P, V0N-V3N after the event arrival. The timing diagram of
Since each phase counter C0P, C0N is incremented upon the falling edge of the output of the related fourth AND gate X3P, X3N, the sequential logic circuit is designed so that events captured by way of the falling edge of the output of the last AND gate X3P, X3N of the gated ring oscillator 110, 210 cause the current phase counter C0P, C0N value to be registered prior to incrementing of the counter on the falling edge of the last AND gate X3P, X3N. This function may be accomplished by ensuring the clocking of the phase counter C0P, C0N occurs after registration of the value of the phase counter C0P, C0N relating to an event arrival. Further, since registration of the phase counter C0P, C0N may occur near the end of a positive or negative phase of the system clock 2, the clearing of the phase counter C0P, C0N that normally occurs by way of a change in phase of the system clock 2 is delayed until the value of the phase counter C0P, C0N associated with an event arrival has been registered. Such functionality substantially eliminates any metastability or misregistration involving registration of the value of the phase counter C0P, C0N.
Using the various embodiments of the invention, one event arrival per cycle of the system clock 2 may be captured. In order to further identify each event arrival relative to the system clock domain, each captured event may be associated with the appropriate cycle of the system clock 2 during which the event arrived. However, given that the event signal 3 and the system clock 2 are not synchronous, misregistration or metastability involving registration of the timestamp 320 with the corresponding period of the system clock 2 during which the event arrives may be a concern. Referring to
Metastability in transferring the generated timestamp 320 into the buffer may occur if the event arrives close to the rising edge of the system clock 2. Further, misregistration may occur if the timestamp 320 arrives too late to be clocked into the FIFO buffer 500 during the appropriate system clock cycle compared to other events previously clocked into the FIFO buffer 500, thus indicating the event occurred one cycle of the system clock 2 later than when it actually occurred.
To alleviate such a problem, a system clock domain synchronizing circuit 400 depicted in
After the timestamp 320 has been captured in the timestamp register 412, the output of the second delay element 408 clocks one of the two ping-pong registers 414, 416 to hold the output of the timestamp register 412. The output of the second delay element 408 also drives a first switching register 420 whose output alternates between HIGH and LOW states for each event arrival, due to the feedback of the active-LOW output of the register 420 into the data input of the register 420. The output of the first switching register 420 drives a 1-to-2 demultiplexer 422, which causes the output of the second delay element 408 to alternately clock each of the ping-pong registers 414, 416 for successive events. The outputs of the ping-pong registers 414, 416 then drive a first 2-to-1 multiplexer 424. The output of one of the ping-pong registers 414, 416 is selected for input to the FIFO buffer 500 by way of a second switching register 426 whose output alternates between LOW and HIGH states by way of the falling edge of a held-off system clock 428, which essentially is the system clock 2 with a rising edge delayed by the presence of the hold-off signal 402 if the hold-off signal 402 precedes the system clock 2. The held-off system clock 428 is produced by way of a latch 430 whose latch enable is driven by the hold-off signal 402 and whose data input is driven by the system clock 2. As a result, the system clock 2 is held-off by the hold-off signal 402 only if the hold-off signal 402 reaches the latch 430 first.
The first and second FIFO registers 418, 436 prior to the FIFO buffer 500 are clocked by the same held-off system clock 428 so that the timestamp 320 is guaranteed to be present at the FIFO registers 418, 436 prior to either of the two FIFO registers 418, 436 being clocked. In other words, the system clock 2 is “held off” for a period of time if the event signal 3 occurs near the rising edge of the system clock 2 to prevent a metastable condition, which may cause incorrect data to be ultimately clocked into the FIFO buffer 500.
One possible consequence of holding off the system clock 2 is that a captured event may be clocked into the FIFO buffer 500 one system clock 2 too late. To eliminate that possibility, the synchronization circuit 400 of
Given the high-speed nature of the various embodiments of the time code generator disclosed herein, any of several fast logic families may be employed to construct the time code generator 1, including, but not limited to, emitter coupled logic (ECL), current mode logic (CML), or various high-speed versions of complementary metal oxide semiconductor (CMOS) logic.
Disclosed herein are several embodiments of circuits and methods for generating a digital value or timestamp indicating the time of the arrival of an event. As mentioned earlier, while these embodiments are described in specific terms, other embodiments encompassing principles of the invention are also possible. Thus, the scope of the invention is not to be limited to the disclosed embodiments, but is determined by the following claims.