Digital phase locked loop circuit

Abstract: A phase locked loop circuit for producing a control signal (D₄) with a predetermined phase relationship to an input signal (f IN ), comprises a first counter (1) counting a reference clock signal () and operating in a normal mode wherein a count value thereof is changed one by one when both of first and second signals are not supplied thereto, in a skip mode wherein a first predeter­ mined count value is skipped when said first signal is supplied thereto and in a repeat mode wherein a second predetermined count value is repeated when said second signal is supplied thereto, a second counter (2) performing a count operation in synchromism with the reference clock signal () under control of an output of the first counter (1) to produce the control signal (D₄), a phase comparator (4) producing phase difference data representative of a phase difference between said control signal (D₄) and said input signal (f IN ), and control means (6) responsive to said phase difference data for operatively producing said first and second signals to command said first counter (1) to operate in at least one of the normal, skip and repeat modes a plurality of times during one cycle period of the control signal.

Description: The present invention relates to a phase locked loop (called hereinafter "PLL") circuit and, more particularly, to a digital PLL circuit for producing a control signal which is locked in a predetermined phase relationship to an input signal supplied with a variable phase. A digital PLL circuit employed in a data processing system requiring a control signal locked in a predetermined phase relationship to an input signal having a variable and arbitrary phase, includes an oscillator, a variable divider, a phase comparator and a control circuit. The oscillator generates a reference clock signal of a constant frequency higher than the frequency of the input signal. The divider frequency-divides the reference clock signal in accordance with a division ratio to produce the control signal. The comparator compares the phase of the control signal with the phase of the input signal and produces phase difference data representative of a phase difference therebetween. The control circuit controls the division ratio of the divider in response to the phase difference data such that the control signal takes a predetermined phase relationship to the input signal. The digital PLL circuit is required to control the phase of the control signal in such a manner that a phase error between the input and control signals is in a range of one clock cycle of the reference clock signal with a simplified construction. It is further required to easily change a loop gain of the circuit. SUMMARY OF THE INVENTION Therefore, an object of the invention is to provide an improved digital PLL circuit which can satisfy the above requirements. Another object of the present invention is to provide a digital PLL circuit to which a microprogram control technique is applicable. US-A-4.563.657 discloses a phase-locked loop circuit for producing a control signal with a predetermined phase relationship to an input signal comprising a first counter counting a reference clock signal and operating in three modes according to first and second signals, a second counter performing a count operation in synchronism with said reference clock signal under control of an output of said first counter to produce said control signal, a phase comparator producing phase difference data representative of a phase difference between said control signal and said input signal, and control means responsive to said phase difference data for operatively producing said first and second signals to command said first counter to operate in at least one of said three modes a plurality of times during one cycle period of said control signal. IBM Technical Disclosure Bulletin, Vol. 27, No. 11 discloses a phase-locked loop oscillator comprising a scrambler counter. According to the present invention there is provided a phase-locked loop circuit for producing a control signal with a predetermined phase relationship to an input signal comprising a first counter counting a reference clock signal and operating in three modes according to first and second signals, a second counter performing a count operation in synchronism with said reference clock signal under control of an output of said first counter to produce said control signal, a phase comparator producing phase difference data representative of a phase difference between said control signal and said input signal, and control means responsive to said phase difference data for operatively producing said first and second signals to command said first counter to operate in at least one of said three modes a plurality of times during one cycle period of said control signal, characterised in that the first counter operates in a normal mode wherein a count value thereof is changed one by one when both of first and second signals are not supplied thereto, in a skip mode wherein a first predetermined count value is skipped when said first signal is supplied thereto and in a repeat mode wherein in a second predetermined count value is repeated when said second signal is supplied thereto, and in that said circuit further comprises means responsive to an output of said second counter for producing a plurality of state signals during one cycle of said control signal and that said control means operatively produces said first and second signals under the control of said state signals. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram representative of an embodiment of the present invention; Fig. 2 is a timing chart representative of counters shown in Fig. 1; Fig. 3 is a timing chart representative of an operation of a timing generator shown in Fig. 1; Fig. 4 is a flow chart executed by a sequence controller shown in Fig. 1; Figs, 5A, 5B and 5C are timing charts representative of normal, skip and repeat modes of a first counter shown in Fig. 1, respectively; Fig. 6 is a diagram representative of an operation of a counter control circuit shown in Fig. 1; Fig. 7 is a block diagram representative of a phase comparator shown in Fig. 1; Fig. 8 is a circuit diagram representative of a first counter shown in Fig. 1; and Fig. 9 is a circuit diagram representative of a counter control circuit shown in Fig. 1. Detailed Description of the Preferred Embodiment Referring to Fig. 1, a digital PLL circuit according to an embodiment of the present invention includes a 2-bit binary counter 1, an AND gate 2, a 4-bit binary counter 3, a phase comparator 4, a timing generator 5, a counter control circuit 6 for controlling a count value of the counter 1, a quantization circuit 7, seven registers 8 and 12 to 17, an input detector 9 having an S-R flip-flop 9-1 and a D-type flip-flop 9-2, a sequence controller 10, an arithmetic and logic unit (ALU) 11, and a constant table memory 18 for storing a constant used in an arithmetic operation, which are connected as shown. When the circuit 6 designates the counter 1 to a normal mode, the counters 1 and 2 performs a count operation shown in Fig. 2. Each of the counter 1 and 2 changes its count value in synchronism with the leading edge of a reference clock signal  which is generated by a reference oscillator (not shown). The outputs D₀ and D₁ of the counter 1 are supplied to the AND gate 2 whose output is in turn supplied to the counter 3 to control the count operation thereof. When the leading edge of the reference clock  appears durint the high level period of the AND gate 2, the counter 3 increments the count value thereof by one. The counter 3 produces four outputs D₂ to D₅, the output D₄ of which is controlled to take a predetermined phase relationship to an input signal f IN . The circuit shown in Fig. 1 is employed as a digital PLL circuit for a floppy disk controller, and hence the output D₅, which has a half frequence of the output D₄, is led out as a window signal f OUT . This signal f OUT is used for reproduce or extract data bit from the input signal f IN . The outputs D₀ to D₄ of the counters 1 and 2 are supplied to the phase comparator 4. As shown in Fig. 7, the phase comparator 4 includes an AND gate 4-1, an S-R flip-flop 4-2, a NOR gate 4-3, a latch circuit 4-4 and a decoder 4-5. Therefore, the count value represented by the outputs D₀ to D₄ are latched in the latch circuit 4-4 in response to the leading edge of the input signal f IN . Since the counters 1 and 2 change the count value in synchronism with the leading edge of the clock , a latch-enable pulse to the latch circuit 4-4 is produced in synchronism with the falling edge of the clock . The count value latched by the latch circuit 4-4 is supplied to a decoder 4-5 which thereby produces phase difference data PD₀ to PD₃ representative of a phase difference between the input signal f IN and the output D₄ or D₅. In the present description, the output D₄ is controlled such that the leading edge thereof is coincident with the leading edge of the input signal f IN . Accordingly, the decoder 4-5 produces the phase difference data PD₀ to PD₃ in response to the latched data, as shown in the following TABLE-1: In TABLE-1, the bit PD₃ is used as a sign bit, so that a negative phase difference is denoted by a 2's complement number. Turning back to Fig. 1, the outputs D₀ to D₄ from the counters 1 and 2 are supplied to the timing generator 5. The generator 5 generates eight timing signals C₀ to C₇ which are changed in sequence, as shown in Fig. 3. The signals C₀ to C₇ are used as state designation signals. That is, the high level periods of the signals C₀ to C₇ are designated to states ST0 to ST7, respectively. The timing signals C₀ to C₇ are supplied to the sequence controller 10. The controller 10 responds to the signals C₀ to C₇ and produces control signals I₀ to I n to control the ALU 11, registers 8 and 12 to 17 and memory 18 such that a series of operations shown in Fig. 4 as a flow chart are executed. By these operations, phase control data is derived and then stored into the register 8. The quantization circuit 7 receives the phase control data and then produces one value of fifteen values of -7, -6, -5, ..., +5, +6 and +7. The counter control circuit 6 controls the counter 1 such that the counter 1 operates in one of three modes consisting of a normal mode, a skip mode and a repeat mode. These modes are shown in Figs. 5A to 5C as timing charts and are explained as follows: (1) Normal Mode (Fig. 5A): The count value of the counter 1 is changed one by one, i.e., 0 → 1 → 2 → 3, in synchronism with the reference clock . (2) Skip Mode (Fig. 5B): The count value of the counter 1 is changed in the order of 0 → 2 → 3. That is, count value 1 is skipped. (3) Repeat Mode (Fig. 5C): Count value 1 is repeated, so that the count value of the counter 1 is changed in the order of 0 → 1 → 1 → 2 → 3. As shown in Fig. 8, each bit of the counter 1 is of a master-slave type and consists of five inverters I₁ to I₅, four transfer gates T₁ to T₄ and two NAND gates NA₁ and NA₂, which are connected as shown. Accordingly, by the logic levels of two control signals RC and SC, the count value of the counter 1 can be controlled. Although the count order of the counter 1 is changed as mentioned above, since the counter 2 increments the count value thereof by one in response to the leading edge of the clock  during the high level period of the AND gate 2, the change in count value of the counter 2 is not disturbed. However, the period representative of each count value of the counter 2 is changed in accordance with the operation mode of the counter 1. The timing signals C₀ to C₇ are further supplied to the counter control circuit 6. In response to the timing signals C₀ to C₇ and the output from the quantization circuit 7, the control circuit 6 controls the count operation mode of the counter 1 as shown in Fig. 6. For example, when the quantization circuit 7 produces an output of "-7", the control circuit 6 designates the skip mode operation to the counter 1 during seven states ST0 and ST2 to ST7, so that a half cycle of the output f OUT from the counter 2 is shortened by a period corresponding to seven clock pulses of the clock signal . Similarly, the output of "-6" of the circuit 7 shortenes the output f OUT by the period corresponding to the six clock pulses. The output of "+5" prolongs the output f OUT by the period corresponding to the five clock pulses. Since the change in count value of the counter 3 is not disturbed, the timing generator 5 and the sequence controller 10 operates normally; so that the operation flow shown in Fig. 4 is executed without problem. In the first state ST0, the phase difference data PD₀ to PD₃ from the phase comparator 4 are stored in the register 17. In the second state ST1, the output level of the flip-flop 9-2 is detected. If level "1" of the output of the flip-flop 9-2 is detected, the contents of the registers 16 and 17 are added and the resultant is loaded to the register 8, in the third state ST2. In the case where the output of the flip-flop 9-2 is detected to be "0", the content of the register 16 is loaded to the register 8. The content of the register 8 is add-resultant of preceding three phase difference data. The content of the register 17 represents the current phase difference data. Therefore, four phase difference data are added and supplied to the register 8. As a result, the phase of the signal f OUT is changed by the circuits 7 and 6. In the state, the content of the register 13 is loaded to the register 14, and the content of the register 12 is loaded to the register 13 in the state ST4. The content of the register R6 is thereafter loaded to the register 12 in the state ST5. The contents of the registers 13 and 14 are added and then loaded to the register 15, in the state ST6. Finally, in the state ST7, the contents of the registers 12 and 15 are added and then transferred to the register 16. Referring to Fig. 9, the control circuit 6 includes a plurality of gates 6-1, 6-2, ... and a decoder 6-5. In particular, the NOR gate 6-1 detects count value "0" (D₀, D₁ = 0, 0) of the counter 1 to control the skip operation. The AND gate 6-2 detects count value "1" (D₀, D₁ = 1, 0) of the counter 1 to control the repeat operation. The present invention is not limited to the above embodiment, but may be modified and changed without departing from the scope of the appended claims. For example, by modifying the sequence controller 10, two phase difference data can be employed as data to be stored in the register 8.

Claims: A phase-locked loop circuit for producing a control signal with a predetermined phase relationship to an input signal comprising a first counter (1) counting a reference clock signal () and operating in three modes according to first and second signals (RC,SC), a second counter (3) performing a count operation in synchronism with said reference clock signal under control of an output of said first counter to produce said control signal, a phase comparator (4) producing phase difference data representative of a phase difference between said control signal and said input signal, and control means (6-18) responsive to said phase difference data for operatively producing said first and second signals to command said first counter (1) to operate in at least one of said three modes a plurality of times during one cycle period of said control signal, characterised in that the first counter (1) operates in a normal mode wherein a count value thereof is changed one by one when both of first and second signals are not supplied thereto, in a skip mode wherein a first predetermined count value is skipped when said first signal is supplied thereto and in a repeat mode wherein a second predetermined count value is repeated when said second signal is supplied thereto, and in that said circuit further comprises means (5) responsive to an output (D2-D4) of said second counter (3) for producing a plurality of state signals (C0-C7) during one cycle of said control signal and that said control means (6-18) operatively produces said first and second signals under the control of said state signals. The circuit as claimed in Claim 1, characterised in that said first and second predetermined count values are the same as each other.

Inventors: HAGIWARA MISAO C O NEC CORPORA, HAGIWARA, MISAO C/O NEC CORPORATION
Applicants: NIPPON ELECTRIC CO, NEC CORPORATION
Application year: 1989
Main classification: H03L7
IPC codes: H03L7