Digital phase comparing circuit

Abstract: A digital phase comparing circuit includes: first and second input terminals (IN1, IN2); a level change detecting circuit (D1, D2) for detecting changes in levels of first and second input signals (S1, S2) applied to the first and second input terminals, respectively, and outputting first and second detection signals (S3, S4) indicating the changes in levels; and a flip-flop circuit (FF3, FF4, 11) which is set in response to an input of one of the first and second detection signals and which is reset in response to a following input of one of the first and second detection signals. The digital phase comparing circuit outputs a pair of output signals (S5, S6; S7, S8) having a pulse width corresponding to a phase difference (, 1, 2) between the first and second input signals, thereby making it convenient for a following circuit to utilize both "H" level and "L" level signals, while simplifying the process and facilitating the high degree of integration thereof.

Description: The present invention relates to a digital phase comparing circuit. The circuit according to the present invention can be utilized in various fields, for example, in an apparatus employing a phase locked loop (PLL) circuit, e.g., acoustic equipment such as a stereo, a television set and the like, a frequency synthesizer, or telecommunication equipment. A digital phase comparing circuit is generally comprised of a plurality of logical gates constituted by a plurality of transistors formed and integrated on a semiconductor substrate, and constituted such that it receives two digital input signals, and based on a phase comparison thereof, outputs an output signal having a pulse width corresponding to the phase difference between the digital input signals. An example of such a circuit is disclosed, for example, by USP 3,610,954, wherein the circuit is constituted by a plurality of types of NAND gates, i.e., two-input type, three-input type, and four-input type NAND gates, and the logical level of the pulse signal output based on the phase comparison is fixed to either the "L" level or "H" level. In practical application, however, it is assumed that an "H" level (or "L" level) signal is more convenient than an "L" level (or "H" level) signal as the input signal of a circuit following the phase comparing circuit. In this case, to adapt the phase comparing circuit to the following circuit, an inverter for inverting the "L" level (or "H" level) signal to the "H" level (or "L" level) signal must be added in parallel to the output end. This leads to an increase in the region of the semiconductor substrate needed for the formation of the transistors constituting the inverter, and thus is not preferable from the viewpoint of obtaining a high degree of integration. Also, since the above circuit employs a plurality of types of NAND gates, a plurality of gate circuit patterns corresponding to the various types of NAND gates must be prepared and, accordingly, the patterning process during the production of the circuit becomes very complicated and unpreferable. EP-A-0 011 128 discloses (Fig. 7) a digital phase comparing circuit according to the preamble of accompanying claim 1. In this circuit, the output of one flip-flop is directly fed back to the data input of another flip-flop, and the flip-flops are reset by outputs of respective edge extracting circuits. In another embodiment (Fig. 13), EP-A-0 011 128 discloses a digital phase comparing circuit in which the edge extracting circuits are constituted by D-type flip-flops whose outputs are connected to an AND gate, the output of which, in turn, is connected to the reset terminals of the D-type flip-flops. According to the present invention, there is provided a digital phase comparing circuit comprising:- first and second input terminals receiving first and second input signals, respectively; a first level change detecting circuit for detecting a rise of said first input signal and outputting a first detection signal; a second level change detecting circuit for detecting a rise of said second input signal and outputting a second detection signal; a first flip-flop, operatively connected to said first level change detecting circuit, and set in response to said first detection signal; a second flip-flop, operatively connected to said second level change detecting circuit, and set in response to said second detection signal; outputs of said first and second flips-flops having pulse widths corresponding to the phase difference () between the first and second input signals; characterised by:- each of said first and second level change detecting circuits comprising a latch circuit operable to perform a latch operation in response to a rising edge of said first or second input signal respectively; and a logic gate circuit responsive to outputs of said first and second flip-flops to generate a reset signal whenever the outputs of said first and second flip-flops coincide, said reset signal being used to reset both said first and second flip-flops. An embodiment of the present invention may provide a digital phase comparing circuit which is more convenient for a following circuit, so that the following circuit can utilize both the "H" level and "L" level signals, while simplifying the patterning process and facilitating a high degree of integration thereof. Reference is made, by way of example, to the accompanying drawings in which:- Fig. 1 is a circuit diagram illustrating a constitution of an example of the prior art digital phase comparing circuit; Figs. 2a to 2i are timing charts of signals for explaining an example of the operation of the circuit shown in Fig. 1; Fig. 3 is a circuit diagram illustrating a constitution of the digital phase comparing circuit as an embodiment of the present invention; Figs. 4a to 4k are timing charts of signals for explaining an example of the operation of the circuit shown in Fig 3; Figs. 5a to 5f are timing charts of signals, showing a first example of the operation of the circuit shown in Fig. 3; Figs. 6a to 6f are timing charts of signals, showing a second example of the operation of the circuit shown in Fig. 3; Figs. 7a to 7f are timing charts of signals, showing a third example of the operation of the circuit shown in Fig 3; Figs. 8a to 8f are timing charts of signals, showing a fourth example of the operation of the circuit shown in Fig. 3; and Figs. 9a to 9i are timing charts of signals for explaining the third example of the operation of the circuit shown in Fig 3. For a better understanding of the preferred embodiments, the problems of the prior art will now be explained with reference to Fig. 1. Figure 1 shows a circuit constitution of an example of the prior art digital phase comparing circuit disclosed in USP 3,610,954. The circuit is constituted by a two-input NAND gate 21 responding to a digital input signal f₁ and a phase-comparison output signal Sf; a pair of two-input NAND gates 22 and 23 constituting a flip-flop responding to the output Sa of the NAND gate 21 and a reset signal Se; a two-input NAND gate 24 responding to another digital input signal f₂ and another phase-comparison output signal Sg; a pair of two-input NAND gates 25 and 26 constituting a flip-flop responding to the output Sc of the NAND gate 24 and the reset signal Se; a three-input NAND gate 27 responding to the output Sa of the NAND gate 21, the output Sb of the flip-flop 22, 23, and the reset signal Se, and outputting the phase-comparison output signal Sf; a three-input NAND gate 28 responding to the output Sc of the NAND gate 24, the output Sd of the flip-flop 25, 26, and the reset signal Se, and outputting the phase-comparison output signal Sg; and a four-input NAND gate 29 responding to the signals Sa, Sb, Sc, and Sd, and outputting the reset signal Se. The circuit of Fig. 1 carries out the phase-comparison operation when the digital input signals f₁ and f₂ are made "L" level. For example, where the input signal f₁ leads in phase compared with the input signal f₂, a signal having a pulse width corresponding to the phase difference between the input signals is output to an output terminal A as the phase-comparison output Sf. Conversely, where the input signal f₁ lags in phase compared with the input signal f₂, a signal having a pulse width corresponding to the phase difference is output to an output terminal B as the phase-comparison output Sg. In this case, the output signal appearing at each of the terminals A and B as the phase-comparison output is a signal in the form of an "L" level pulse. In some applications, however, it is assumed that an "H" level pulse signal would be more convenient for a circuit following the circuit of Fig. 1. Accordingly, two inverters must be added in parallel to the output terminals A and B, respectively, and an "H" level pulse signal produced. Assuming that each of the inverters is constituted by two transistors having a complementary metal oxide semiconductor structure, four transistors must be newly added to the circuit. But, since this means that the region of the semiconductor substrate, required for the formation of the four transistors is increased, it is disadvantageous to the high degree of integration of the circuit. Also, since three types of NAND gates are employed in the circuit of Fig. 1, three types of gate circuit patterns must be prepared during the production of the circuit, and thus the patterning process becomes complicated. In the circuit constitution of Fig. 1, where the input signal f₁ is synchronized in phase with the input signal f₂, there is no phase difference therebetween, and accordingly, in logical terms, no pulse signal appears at the terminals A and B. In actual operation, however, a transient pulse signal such as a spike wave appears at each terminal, as shown in Figs. 2h and 2i. Figures 2a to 2i show the operational timing of each signal where the input signals f₁ and f₂ are synchronized in phase. Referring to Figs. 1 and 2a to 2i, when the input signal f₁ is made "L" level, the signal Sa is made "H" level and the output signal Sf is then made "L" level. Also, when the input signal f₂ is made "L" level, the signal Sc is made "H" level and the output signal Sg is then made "L" level. When the signals Sa and Sc are made "H" level, the output signal Se of the NAND gate 29 is made "L" level, because the signals Sb and Sd are "L" level. Upon receipt of the change in level of the signal Se, the output signals Sf and Sg are made "H" level. Namely, a transient pulse signal (Sf, Sg) appears at each of the terminals A and B due to the operational delay of the four-input NAND gate 29, even if the input signals f₁ and f₂ are synchronized in phase. Where the pulse width t₄ of the transient pulse signal becomes larger than a permissible value, this may have an adverse affect on the following circuit. Therefore, preferably, the pulse width is as small as possible. Next, a preferred embodiment of the present invention will be described in detail with reference to Figs. 3 to 9i. Figure 3 illustrates a circuit constitution of the digital phase comparing circuit as an embodiment of the present invention. The circuit of the present embodiment is constituted by only two-input NAND gates. In Fig. 3, two NAND gates 1 and 2 constitute an RS type flip-flop FF1; two NAND gates 3 and 4, an RS type flip-flop FF2; two NAND gates 5 and 6, an RS type flip-flop FF3; and two NAND gates 7 and 8, an RS type flip-flop FF4. Note, references R , S , Q and Q given to each of the flip-flops indicate a reset input, a set input, a positive logic output, and a negative logic output, respectively. For example, referring to the flip-flop FF1, one input end of the NAND gate 1 receives the set input S and the other input end thereof receives the output Q of the NAND gate 2, and one input end of the NAND gate 2 receives the reset input R and the other input end thereof receives the output Q of the NAND gate 1. The other flip-flops FF2, FF3, and FF4 are connected in the same manner as the flip-flop FF1. An input terminal IN1 is connected to the set input end S of the flip-flop FF1 and one input end of an NAND gate 9. The other input end of the NAND gate 9 is connected to the output end Q of the flip-flop FF1, and the output end thereof is connected to the reset input end R of the flip-flop FF1. The NAND gate 9 constitutes a rise detecting circuit D₁ together with the flip-flop FF1. Namely, the rise detecting circuit D₁ has the function of detecting a time of the rise of the digital input signal S1 applied to the input terminal IN1. The output signal of the rise detecting circuit D1 is hereinafter indicated by reference S3. In the same way, an input terminal IN2 is connected to the set input end S of the flip-flop FF2 and one input end of an NAND gate 10. The other input end of the NAND gate 10 is connected to the output end Q of the flip-flop FF2, and the output end thereof is connected to the reset input end R of the flip-flop FF2. The NAND gate 10 constitutes a rise detecting circuit D2 together with the flip-flop FF2. The rise detecting circuit D2 also has the function of detecting a time of the rise of a digital input signal S2 applied to the input terminal IN2. The output signal of the rise detecting circuit D2 is hereinafter indicated by reference S4. The output end of the rise detecting circuit D1 is connected to a set input end S of the flip-flop FF3, and the output end of the rise detecting circuit D2 is connected to a set input end S of the flip-flop FF4. One output end Q of the flip-flop FF3 is connected to an output terminal OUT1, and the other output end Q thereof is connected to an output terminal OUT2 and one input end of an NAND gate 11. In the same way, one output end Q of the flip-flop FF4 is connected to an output terminal OUT3, and the other output end Q thereof is connected to an output terminal OUT4 and the other input end of an NAND gate 11. The output end of the NAND gate 11 is connected to each reset input end R of the flip-flops FF3 and FF4. The output signals appearing at the output terminals OUT1, OUT2, OUT3, and OUT4 are hereinafter indicated by references S5, S6, S7, and S8, respectively. Also, the output signal of the NAND gate 11 is indicated by reference S9. Next, an example of the operation of the circuit shown in Fig. 3 will be explained with reference to the timing charts of signals shown in Figs. 4a to 4k. Note, it is assumed that the input signal S1 leads by the phase difference , compared with the input signal S2, and that the flip-flop FF1 and FF2 are reset. When the input signal S1 is applied to the input terminal IN1 and made "H" level at a time t₁ (see Fig. 4a), the output S3 of the rise detecting circuit D1 is made "L" level (see Fig. 4d). Upon receipt of the change in level, the negative logic output Q (signal S5) of the flip-flop FF3 is made "L" level (see Fig. 4g), and the positive logic output Q (signal S6) thereof is made "H" level (see Fig. 4h). Also, in the rise detecting circuit D1, the positive logic output Q of the flip-flop FF1 is made "L" level, after a slight delayed from the time t₁ due to a delay in the operation of the NAND gates 1, 2, and 9 (see Fig. 4c). At this time, the output S3 of the rise detecting circuit D1 is made "H" level. In the same way, when the input signal S2 is applied to the input terminal IN2 and made "H" level at a time t₂ (see Fig. 4b), the output S4 of the rise detecting circuit D2 is made "L" level (see Fig. 4f). Upon receipt of the change in level, the negative logic output Q (signal S7) of the flip-flop FF4 is made "L" level (see Fig. 4i), and the positive logic output Q (signal S8) thereof is made "H" level (see Fig. 4j). Also, in the rise detecting circuit D2, the positive logic output Q of the flip-flop FF2 is made "L" level, after a slight delayed from the time t₂ due to a delay in the operation of the NAND gates 3, 4 and 10 (see Fig. 4e). At this time, the output S4 of the rise detecting circuit D2 is made "H" level. When the output signal S8 of the flip-flop FF4 is made "H" level at the time t₂, the output signal S9 of the NAND gate 11 is made "L" level (see Fig. 4k), because the output signal S6 of the flip-flop FF3 is now "H" level. Upon receipt of the change in level, the flip-flops FF3 and FF4 are reset, and as a result, the output signal S5 of the flip-flop FF3 is made "H" level, and the output signal S7 of the flip-flop FF4 is made "H" level. When the output signal S4 of the rise detecting circuit D2 is then made "H" level, the output Q (signal S8) of the flip-flop FF4 is made "L" level (see Fig. 4j). When either the output signal S6 of the flip-flop FF3 or the output signal S8 of the flip-flop FF4 is made "L" level, the output signal S9 of the NAND gate 11 is made "H" level, so that the reset of the flip-flops FF3 and FF4 is cancelled. Note, for the flip-flop FF3, when the output S9 of the NAND gate 11 is "L" level, the output Q (signal S6) is made "L" level due to the delay at the gates, because the set input (signal S3) is "H" level. Figures 4a to 4k show the operational timing of each signal in the circuit of Fig. 3 in detail, whereby the time t₂ is different from the time of the rise of the output signal S5 of the flip-flop FF3 and of the fall of the output signal S6 thereof. In actual operation, however, a period from the time t₂ to the rise of the signal S5 and a period from the time t₂ to the fall of the signal S6 are very short, and thus can be disregarded. Therefore, a period during which the output signal S5 of the flip-flop FF3 is "L" level and the output signal S6 thereof is "H" level indicates a period corresponding to the phase difference  between the input signals S1 and S2. Also, the output signals S7 and S8 of the flip-flop FF4 are actually output in the form of a spike wave or a hazard, although these signals have the form of a rectangular wave in Figs. 4i and 4j. The circuit of Fig. 3 is constituted such that it can output the phase-comparison output signal having a pulse width corresponding to the phase difference between the input signals in the form of both of "H" level and "L" level, and thus is conveniently utilized at the following circuit. Also, as the circuit is constituted only by two-input NAND gates, only one type of gate circuit pattern need be prepared for the production of the circuit, which greatly simplifies the process and enhances a high degree of integration. Although, in the above example, the operational mode wherein the input signal S1 leads in phase compared with the input signal S2 is described, the present invention is not restricted thereto, and other operational modes of a phase lead or phase lag can be used, as described hereinafter with reference to Figs. 5a to 8f. Figures 5a to 5f show the operational timing of each signal where the input signal S1 leads in phase compared with the input signal S2, i.e., the operational timing illustrated in Figs. 4a to 4k, and thus an explanation thereof will be omitted. Note, in this case, the phase difference 1 between the input signals S1 and S2 is represented by the outputs Q and Q of the flip-flop FF3 and appears at the output terminals OUT1 and OUT2. Accordingly, where an "H" level signal would be more convenient as the input signal for a circuit at the next stage and connected to the present digital phase comparing circuit, the output signal S6 appearing at the output terminal OUT2 is preferably utilized. Conversely, where an "L" level signal would be more convenient, the output signal S5 appearing at the output terminal OUT1 is preferably utilized. Figures 6a to 6f show the operational timing of each signal where the input signal S1 lags in phase compared with the input signal S2. Since the operational mode is easily deduced from that shown in Figs. 5a to 5f, based on the symmetrical constitution of the present circuit, an explanation thereof will be omitted. Note, in this case, the phase difference 2 between the input signals S1 and S2 is represented by the outputs Q and Q of the flip-flop FF4 and appears at the output terminals OUT3 and OUT4. Also, since the manner of utilization of the output signals S7 and S8 is the same as that shown in Figs. 5a to 5f, an explanation thereof will be omitted. Figures 7a to 7f show the operational timing of each signal where the input signal S1 is synchronized in phase with the input signal S2. Since the operational mode is easily deduced from that shown in Figs. 5a to 5f or Figs. 6a to 6f, an explanation thereof will be omitted. Note, in this case, since there is no phase difference between the input signals S1 and S2, a transient signal such as "a spike wave" appears at each of the output terminals OUT1 to OUT4, as shown in Figs. 7c to 7f, but the duration of appearance of the transient signal is very short, and thus can be disregarded in the actual operation of the present circuit. Figures 8a to 8f show the operational timing of each signal where both of a phase lead and a phase lag exist between the input signals S1 and S2. Since the operational mode is easily deduced from that in the above described cases, an explanation thereof will be omitted. Figures 9a to 9i show the operational timing illustrated in Figs. 7a to 7f in more detal, as a comparison with Figs. 2a to 2i. According to the constitution shown in Fig. 3, when the input signals S1 and S2 are synchronized in phase, transient pulse signals S5, S6, S7, and S8 appear at the terminals OUT1, OUT2, OUT3, and OUT4, respectively, as shown in Figs. 9e to 9h. In this case, the transient pulse S5 (S7) is generated due to the operational delay of the two-input NAND gate 11, and the transient pulse S6 (S8) is generated due to the operational delay of the three two-input NAND gates 11, 6, and 5 (11, 8, and 7). Taking into consideration the constitutions of the two-input and four-input NAND gates, the operational delay in the former is much shorter than that in the latter, and therefore, since the pulse width t₂ of the transient pulses S5 and S7 becomes shorter than that (t₄) of the prior art transient pulse, it is possible to reduce any adverse affect on the following circuit. Although the present invention has been disclosed and described by way of only one embodiment, it is apparent to those skilled in the art that other embodiments and modifications of the present invention are possible without departing from the spirit or essential features thereof.

Claims: A digital phase comparing circuit comprising:- first and second input terminals (IN1, IN2) receiving first and second input signals (S1, S2), respectively; a first level change detecting circuit (D1) for detecting a rise of said first input signal (S1) and outputting a first detection signal (S3); a second level change detecting circuit (D2) for detecting a rise of said second input signal (S2) and outputting a second detection signal (S4); a first flip-flop (FF3), operatively connected to said first level change detecting circuit (D1), and set in response to said first detection signal (S3); a second flip-flop (FF4), operatively connected to said second level change detecting circuit (D2), and set in response to said second detection signal (S4); outputs of said first and second flips-flops having pulse widths corresponding to the phase difference () between the first and second input signals (S1, S2); characterised by:- each of said first and second level change detecting circuits (D1, D2) comprising a latch circuit (FF1, 9; FF2, 10) operable to perform a latch operation in response to a rising edge of said first or second input signal (S1, S2) respectively; and a logic gate circuit (11) responsive to outputs of said first and second flip-flops (FF3, FF4) to generate a reset signal (S9) whenever the outputs of said first and second flip-flops coincide, said reset signal (S9) being used to reset both said first and second flip-flops (FF3, FF4). A digital phase comparing circuit as claimed in claim 1, wherein each of said latch circuits of said first and second level change detecting circuits (D1, D2) comprises:- a flip-flop (FF1, FF2) constituted by two two-input NAND gates (1, 2; 3, 4) which are cross-coupled, being set in response to a corresponding one of said first and second input signals (S1, S2) and being reset in response to a corresponding one of said first and second detection signals (S3, S4); and a two-input NAND gate (9, 10) outputting said corresponding one of the first and second detection signals (S3, S4) in response to said corresponding one of the first and second input signals (S1, S2) and a positive logic output of the corresponding flip-flop (FF1, FF2). A digital phase comparing circuit as claimed in claim 2, wherein said first and second flip-flops (FF3, FF4) comprise two two-input NAND gates (5, 6; 7, 8) which are cross-coupled, respectively, and said logical gate circuit (11) comprises a two-input NAND gate outputting said reset signal (S9) in response to positive logic outputs (Q) of said flip-flops (FF3, FF4), each of said first and second flip-flops (FF3, FF4) being responsive to said corresponding one of the first and second detection signals (S3, S4) and said reset signal (S9) and outputting a pair of output signals (S5, S6; S7, S8). A digital phase comparing circuit as claimed in claim 3, wherein in said pairs of output signals (S5, S6; S7, S8), each signal has an opposite logic level.

Inventors: EBESYU HIDETAKA MATSUOKASO -GO, EBESYU, HIDETAKA MATSUOKASO 202-GO, 23-5
Applicants: FUJITSU LTD, FUJITSU LIMITED
Application year: 1988
Main classification: H03D13
IPC codes: H03K5, H03D13, G01R25