TWI804192B - Digital Phase Locked Loop Circuit - Google Patents

Digital Phase Locked Loop Circuit Download PDF

Info

Publication number
TWI804192B
TWI804192B TW111105475A TW111105475A TWI804192B TW I804192 B TWI804192 B TW I804192B TW 111105475 A TW111105475 A TW 111105475A TW 111105475 A TW111105475 A TW 111105475A TW I804192 B TWI804192 B TW I804192B
Authority
TW
Taiwan
Prior art keywords
signal
clock
output
variable
basic clock
Prior art date
Application number
TW111105475A
Other languages
Chinese (zh)
Other versions
TW202327282A (en
Inventor
劉拓夫
李萌
Original Assignee
大陸商昂寶電子(上海)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 大陸商昂寶電子(上海)有限公司 filed Critical 大陸商昂寶電子(上海)有限公司
Application granted granted Critical
Publication of TWI804192B publication Critical patent/TWI804192B/en
Publication of TW202327282A publication Critical patent/TW202327282A/en

Links

Images

Landscapes

  • Stabilization Of Oscillater, Synchronisation, Frequency Synthesizers (AREA)

Abstract

提供了一種數位鎖相環電路,包括:同步控制模組,被配置為基於基礎時鐘信號和輸入週期信號,產生表徵輸入週期信號相對於基礎時鐘信號的週期性變化的輸入表徵信號;計數控制模組,被配置為基於基礎時鐘信號和輸入表徵信號,產生表徵輸入表徵信號的週期與基礎時鐘信號的週期之間的倍數關係的時鐘計數結果;運算控制模組,被配置為基於輸出時鐘信號的頻率與輸入週期信號的頻率之間的預設倍頻係數產生基礎時鐘控制變數,並基於時鐘計數結果產生輸出時鐘控制變數;以及輸出控制模組,被配置為基於基礎時鐘控制變數和輸出時鐘控制變數產生輸出控制信號,並基於輸出控制信號和基礎時鐘信號產生輸出時鐘信號。 A digital phase-locked loop circuit is provided, comprising: a synchronous control module configured to generate an input representative signal representing a periodic change of the input periodic signal relative to the basic clock signal based on a basic clock signal and an input periodic signal; a counting control module The group is configured to generate a clock counting result representing the multiple relationship between the period of the input characterization signal and the period of the basic clock signal based on the basic clock signal and the input characterization signal; the operation control module is configured to be based on the output clock signal A preset multiplication factor between the frequency and the frequency of the input periodic signal generates a base clock control variable, and generates an output clock control variable based on a clock count result; and an output control module configured to control the base clock based on the base clock control variable and the output clock The variable generates an output control signal, and generates an output clock signal based on the output control signal and the base clock signal.

Description

數位鎖相環電路 Digital Phase Locked Loop Circuit

本發明涉及電路領域,更具體地涉及一種數位鎖相環電路。 The invention relates to the field of circuits, in particular to a digital phase-locked loop circuit.

鎖相環電路是一種常見電路,可以用來基於輸入週期信號產生與該輸入週期信號同步(頻率和相位兩方面同步)的輸出時鐘信號。圖1示出了傳統的類比鎖相環電路的示意框圖。如圖1所示,類比鎖相環電路包括鑒相器、環路濾波器、和壓控振盪器三部分,其中,當輸入週期信號Sin的頻率發生變化時,由於環路濾波器不能隨著輸入週期信號Sin的頻率變化而快速調節提供給壓控振盪器的電壓,壓控振盪器產生的輸出時鐘信號Sout的頻率會發生較大幅度的振盪且需要較長的調節時間才能與輸入週期信號Sin的頻率實現同步;另外,由於環路濾波器的濾波參數的限制,類比鎖相環電路不適合用於輸入週期信號的頻率範圍較寬的情況。 A phase-locked loop circuit is a common circuit that can be used to generate an output clock signal that is synchronized with the input periodic signal (synchronous in both frequency and phase) based on the input periodic signal. Fig. 1 shows a schematic block diagram of a traditional analog phase-locked loop circuit. As shown in Figure 1, the analog phase-locked loop circuit includes three parts: a phase detector, a loop filter, and a voltage-controlled oscillator. When the frequency of the input periodic signal Sin changes, the loop filter cannot follow the The frequency of the input periodic signal Sin changes to quickly adjust the voltage supplied to the voltage-controlled oscillator. The frequency of the output clock signal Sout generated by the voltage-controlled oscillator will oscillate to a greater extent and require a longer adjustment time to match the input periodic signal. The frequency of Sin is synchronized; in addition, due to the limitation of the filtering parameters of the loop filter, the analog phase-locked loop circuit is not suitable for the case where the frequency range of the input periodic signal is wide.

根據本發明實施例的數位鎖相環電路,包括:同步控制模組,被配置為基於基礎時鐘信號和輸入週期信號,產生表徵輸入週期信號相對於基礎時鐘信號的週期性變化的輸入表徵信號;計數控制模組,被配置為基於基礎時鐘信號和輸入表徵信號,產生表徵輸入表徵信號的週期與基礎時鐘信號的週期之間的倍數關係的時鐘計數結果;運算控制模組,被配置為基於輸出時鐘信號的頻率與輸入週期信號的頻率之間的預設倍頻係數產生基礎時鐘控制變數,並基於時鐘計數結果產生輸出時鐘控制變數;以及輸出控制模組,被配置為基於基礎時鐘控制變數和輸出時鐘控制變數產生輸出控制信號,並基於輸出控制信號和基礎時鐘信號產生輸出時鐘信號。 The digital phase-locked loop circuit according to an embodiment of the present invention includes: a synchronous control module configured to generate an input representative signal representing a periodic change of the input periodic signal relative to the basic clock signal based on the basic clock signal and the input periodic signal; The counting control module is configured to generate a clock counting result representing the multiple relationship between the period of the input representative signal and the period of the basic clock signal based on the basic clock signal and the input representative signal; the operation control module is configured to output The preset frequency multiplication coefficient between the frequency of the clock signal and the frequency of the input periodic signal generates a basic clock control variable, and generates an output clock control variable based on the clock counting result; and the output control module is configured to be based on the basic clock control variable and The output clock control variable generates the output control signal, and generates the output clock signal based on the output control signal and the base clock signal.

根據本發明實施例的數位鎖相環電路能夠以遠小於類比鎖相環電路的調節時間實現輸出時鐘信號與輸入週期信號之間的同步(頻率和相位兩方面同步),且不存在類比鎖相環電路的環路震盪問題。 The digital phase-locked loop circuit according to the embodiment of the present invention can realize the synchronization between the output clock signal and the input periodic signal (synchronization in both frequency and phase) with an adjustment time much shorter than that of the analog phase-locked loop circuit, and there is no analog phase-locked loop The loop oscillation problem of the circuit.

0,1:端子 0,1: terminal

200:數位鎖相環電路 200: Digital PLL circuit

202:同步控制模組 202: Synchronous control module

204:計數控制模組 204: Counting control module

206:運算控制模組 206: Operation control module

208:輸出控制模組 208: Output control module

AND2:及閘 AND2: AND gate

DPLL_CLK:輸出時鐘訊號 DPLL_CLK: output clock signal

DPLL_PASS:輸出控制訊號 DPLL_PASS: output control signal

DPLL_SUM:輸出時鐘控制變數 DPLL_SUM: output clock control variable

Fin,Fosc,Fout:頻率 Fin, Fosc, Fout: Frequency

Nset:預設倍頻係數 Nset: preset multiplication factor

Nsin:時鐘計數結果 Nsin: clock count result

OSC_CLK:基礎時鐘訊號 OSC_CLK: basic clock signal

OSC_SUM:基礎時鐘控制變數 OSC_SUM: Base clock control variable

Q1:第一表徵訊號 Q1: The first characteristic signal

Q2:第二表徵訊號 Q2: The second characteristic signal

Sin:輸入週期訊號 Sin: input periodic signal

Sin_start:輸入表徵訊號 Sin_start: input characterization signal

Sout:輸出時鐘訊號 Sout: output clock signal

SUM_COMP:變數比較訊號 SUM_COMP: variable comparison signal

T1~T7:D觸發器 T1~T7: D flip-flop

U1~U5:2路選擇器 U1~U5: 2-way selector

從下面結合圖式對本發明的具體實施方式的描述中可以更好地理解本發明,其中: The present invention can be better understood from the following description of specific embodiments of the present invention in conjunction with the drawings, wherein:

圖1示出了傳統的類比鎖相環電路的示意框圖。 Fig. 1 shows a schematic block diagram of a traditional analog phase-locked loop circuit.

圖2示出了根據本發明實施例的數位鎖相環電路的示意框圖。 Fig. 2 shows a schematic block diagram of a digital phase-locked loop circuit according to an embodiment of the present invention.

圖3示出了圖2所示的同步控制模組的示例實現的示意圖; FIG. 3 shows a schematic diagram of an example implementation of the synchronous control module shown in FIG. 2;

圖4示出了與圖3所示的同步控制模組有關的多個信號的波形圖; Figure 4 shows a waveform diagram of a plurality of signals related to the synchronous control module shown in Figure 3;

圖5示出了圖2所示的計數控制模組的示例實現的示意圖; Fig. 5 shows a schematic diagram of an example implementation of the counting control module shown in Fig. 2;

圖6示出了圖2所示的運算控制模組的部分示例實現的示意圖; Fig. 6 shows a schematic diagram of a partial example implementation of the operation control module shown in Fig. 2;

圖7示出了圖2所示的運算控制模組的部分示例實現的示意圖; Fig. 7 shows a schematic diagram of a partial example implementation of the operation control module shown in Fig. 2;

圖8示出了圖2所示的輸出控制模組的示例實現的示意圖; FIG. 8 shows a schematic diagram of an example implementation of the output control module shown in FIG. 2;

圖9示出了根據本發明實施例的數位鎖相環電路的控制流程圖; Fig. 9 shows the control flowchart of the digital PLL circuit according to an embodiment of the present invention;

圖10示出了與圖8所示的輸出控制模組有關的多個信號的波形圖。 FIG. 10 shows waveform diagrams of various signals related to the output control module shown in FIG. 8 .

下面將詳細描述本發明的各個方面的特徵和示例性實施例。在下面的詳細描述中,提出了許多具體細節,以便提供對本發明的全面理解。但是,對於本領域技術人員來說很明顯的是,本發明可以在不需要這些具體細節中的一些細節的情況下實施。下面對實施例的描述僅僅是為了通過示出本發明的示例來提供對本發明的更好的理解。本發明決不限於下面所提出的任何具體配置和演算法,而是在不脫離本發明的精神的前提下覆蓋了元素、部件和演算法的任何修改、替換和改進。在圖式和下面的描述中,沒有示出公知的結構和技術,以便避免對本發明造成不必要的模糊。 Features and exemplary embodiments of various aspects of the invention will be described in detail below. In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is only to provide a better understanding of the present invention by showing examples of the present invention. The present invention is by no means limited to any specific configurations and algorithms set forth below, but covers any modification, substitution and improvement of elements, components and algorithms without departing from the spirit of the invention. In the drawings and the following description, well-known structures and techniques have not been shown in order to avoid unnecessarily obscuring the present invention.

鑒於傳統的類比鎖相環電路存在的一個或多個問題,提出了一種數位鎖相環電路,其可以通過數位運算的方式實現快速的鎖相控制,並且可以提高鎖相環電路的信號頻率範圍並極大地降低鎖相環電路的電路複雜度。 In view of one or more problems existing in the traditional analog phase-locked loop circuit, a digital phase-locked loop circuit is proposed, which can realize fast phase-locked control through digital operations, and can improve the signal frequency range of the phase-locked loop circuit And greatly reduce the circuit complexity of the phase-locked loop circuit.

圖2示出了根據本發明實施例的數位鎖相環電路200的示意框圖。如圖2所示,數位鎖相環電路200包括同步控制模組202、計數控制模組204、運算控制模組206、以及輸出控制模組208,其中:同步控制模組202被配置為基於基礎時鐘信號OSC_CLK和輸入週期信號Sin,產生表徵輸入週期 信號Sin相對於基礎時鐘信號OSC_CLK的週期性變化的輸入表徵信號Sin_start;計數控制模組204被配置為基於基礎時鐘信號OSC_CLK和輸入表徵信號Sin_start,產生表徵輸入表徵信號Sin_start的週期與基礎時鐘信號OSC_CLK的週期之間的倍數關係的時鐘計數結果Nsin;運算控制模組206被配置為基於輸出時鐘信號DPLL_CLK的頻率與輸入週期信號Sin的頻率之間的預設倍頻係數Nset產生基礎時鐘控制變數OSC_SUM,並基於時鐘計數結果Nsin產生輸出時鐘控制變數DPLL_SUM;輸出控制模組208被配置為基於基礎時鐘控制變數OSC_SUM和輸出時鐘控制變數DPLL_SUM產生輸出控制信號DPLL_PASS,並基於輸出控制信號DPLL_PASS和基礎時鐘信號OSC_CLK產生輸出時鐘信號DPLL_CLK。 FIG. 2 shows a schematic block diagram of a digital phase-locked loop circuit 200 according to an embodiment of the present invention. As shown in Figure 2, the digital PLL circuit 200 includes a synchronous control module 202, a counting control module 204, an operation control module 206, and an output control module 208, wherein: the synchronous control module 202 is configured based on The clock signal OSC_CLK and the input cycle signal Sin generate a representative input cycle The input representative signal Sin_start of the periodic change of the signal Sin relative to the basic clock signal OSC_CLK; the counting control module 204 is configured to generate a period representing the input representative signal Sin_start and the basic clock signal OSC_CLK based on the basic clock signal OSC_CLK and the input representative signal Sin_start The clock counting result Nsin of the multiple relationship between the periods of ; the operation control module 206 is configured to generate the basic clock control variable OSC_SUM based on the preset frequency multiplication coefficient Nset between the frequency of the output clock signal DPLL_CLK and the frequency of the input period signal Sin , and generate the output clock control variable DPLL_SUM based on the clock counting result Nsin; the output control module 208 is configured to generate the output control signal DPLL_PASS based on the basic clock control variable OSC_SUM and the output clock control variable DPLL_SUM, and based on the output control signal DPLL_PASS and the basic clock signal OSC_CLK generates the output clock signal DPLL_CLK.

這裡,假設基礎時鐘信號OSC_CLK的頻率為Fosc,輸入週期信號Sin的頻率為Fin,輸出時鐘信號DPLL_CLK的頻率為Fout=Nset×Fin,其中,基礎時鐘信號OSC_CLK通常為頻率遠大於輸入週期信號的高頻時鐘信號(例如,高頻振盪信號)。 Here, it is assumed that the frequency of the basic clock signal OSC_CLK is Fosc, the frequency of the input periodic signal Sin is Fin, and the frequency of the output clock signal DPLL_CLK is Fout=Nset×Fin, where the frequency of the basic clock signal OSC_CLK is usually much higher than that of the input periodic signal. A high frequency clock signal (for example, a high frequency oscillator signal).

圖3示出了圖2所示的同步控制模組202的示例實現的示意圖。如圖2所示,在一些實施例中,同步控制模組202可以進一步被配置為:基於基礎時鐘信號OSC_CLK的下降沿和輸入週期信號Sin,利用D觸發器T1產生第一表徵信號Q1;基於基礎時鐘信號OSC_CLK的下降沿和第一表徵信號Q1,利用D觸發器T2產生第二表徵信號Q2;以及基於第二表徵信號Q2的反相信號和第一表徵信號Q1,利用及閘AND1產生輸入表徵信號Sin_start。 FIG. 3 shows a schematic diagram of an example implementation of the synchronization control module 202 shown in FIG. 2 . As shown in FIG. 2 , in some embodiments, the synchronous control module 202 may be further configured to: use D flip-flop T1 to generate the first characteristic signal Q1 based on the falling edge of the basic clock signal OSC_CLK and the input periodic signal Sin; The falling edge of the basic clock signal OSC_CLK and the first characteristic signal Q1, use the D flip-flop T2 to generate the second characteristic signal Q2; and based on the inversion signal of the second characteristic signal Q2 and the first characteristic signal Q1, use the AND gate AND1 to generate the input Characterize the signal Sin_start.

圖4示出了與圖3所示的同步控制模組202有關的多個信號的波形圖。需要說明的是,圖4所示的波形圖是圖3所示的同步控制模組202以輸入週期信號Sin的上升沿為有效沿且以基礎時鐘信號OSC_CLK的下降沿為有效沿產生的波形圖。 FIG. 4 shows a waveform diagram of various signals related to the synchronous control module 202 shown in FIG. 3 . It should be noted that the waveform diagram shown in FIG. 4 is a waveform diagram generated by the synchronous control module 202 shown in FIG. 3 with the rising edge of the input periodic signal Sin as the valid edge and the falling edge of the basic clock signal OSC_CLK as the valid edge. .

圖5示出了圖2所示的計數控制模組204的示例實現的示意圖。如圖5所示,在一些實施例中,計數控制模組204可以進一步被配置為:當輸入表徵信號Sin_start處於非有效位準(例如,低位準)時,利用時鐘計數器對基礎時鐘信號OSC_CLK的週期數目進行計數;當輸入表徵信號Sin_start處於有效位準(例如,高位準)時,將時鐘計數器的計數結果更新至時鐘計數結果 Nsin並將時鐘計數器清零。 FIG. 5 shows a schematic diagram of an example implementation of the count control module 204 shown in FIG. 2 . As shown in FIG. 5 , in some embodiments, the counting control module 204 can be further configured to: when the input characteristic signal Sin_start is at an inactive level (for example, a low level), use the clock counter to control the basic clock signal OSC_CLK The number of cycles is counted; when the input characterization signal Sin_start is at a valid level (for example, a high level), the counting result of the clock counter is updated to the clock counting result Nsin and clears the clock counter.

具體地,在圖5所示的計數控制模組204的示例實現中,2路選擇器U1、D觸發器T3、以及加法器(+1運算)構成時鐘計數器,其中,輸入表徵信號Sin_start被用作2路選擇器U1的輸出控制信號,當輸入表徵信號Sin_start為邏輯0時,2路選擇器U1輸出端子0接收的信號,當輸入表徵信號Sin_start為邏輯1時,2路選擇器U1輸出端子1接收的信號;2路選擇器U2和D觸發器T4構成計數輸出器,用於將時鐘計數器的計數結果更新至時鐘計數結果Nsin輸出到外部,其中,輸入表徵信號Sin_start被用作2路選擇器U2的輸出控制信號,當輸入表徵信號Sin_start為邏輯0時,2路選擇器U2輸出端子0接收的信號,當輸入表徵信號Sin_start為邏輯1時,2路選擇器U2輸出端子1接收的信號。 Specifically, in the example implementation of the counting control module 204 shown in FIG. 5 , the 2-way selector U1, the D flip-flop T3, and the adder (+1 operation) constitute a clock counter, wherein the input characterization signal Sin_start is used As the output control signal of the 2-way selector U1, when the input representative signal Sin_start is logic 0, the signal received by the output terminal 0 of the 2-way selector U1, when the input representative signal Sin_start is logic 1, the output terminal of the 2-way selector U1 1 signal received; 2-way selector U2 and D flip-flop T4 constitute a count output device, which is used to update the counting result of the clock counter to the clock counting result Nsin and output it to the outside, where the input characterization signal Sin_start is used as 2-way selection The output control signal of the device U2, when the input representative signal Sin_start is logic 0, the signal received by the 2-way selector U2 output terminal 0, when the input representative signal Sin_start is logic 1, the signal received by the 2-way selector U2 output terminal 1 .

圖6示出了圖2所示的運算控制模組206的部分示例實現的示意圖。如圖6所示,在一些實施例中,運算控制模組206可以進一步被配置為:當輸入表徵信號Sin_start處於有效位準(例如,高位準)時,基於輸出時鐘信號DPLL_CLK的頻率Fout與輸入週期信號Sin的頻率Fin之間的預設倍頻係數Nset對基礎時鐘控制變數OSC_SUM進行初始化。例如,可以將基礎時鐘控制變數OSC_SUM的變數值初始化為OSCSUM=1.5×NsetFIG. 6 shows a schematic diagram of a partial implementation of the calculation control module 206 shown in FIG. 2 . As shown in FIG. 6, in some embodiments, the operation control module 206 can be further configured to: when the input characteristic signal Sin_start is at a valid level (for example, a high level), based on the frequency Fout of the output clock signal DPLL_CLK and the input The preset frequency multiplication factor Nset between the frequencies Fin of the periodic signal Sin initializes the basic clock control variable OSC_SUM. For example, the variable value of the basic clock control variable OSC_SUM may be initialized as OSC SUM =1.5×N set .

如圖6所示,在一些實施例中,運算控制模組206可以進一步被配置為:當輸入表徵信號Sin_start處於非有效位準(例如,低位準)時,基於輸出時鐘信號DPLL_CLK的頻率Fout與輸入週期信號Sin的頻率Fin之間的預設倍頻係數Nset對基礎時鐘控制變數OSC_SUM進行更新。例如,可以基於基礎時鐘控制變數OSC_SUM在基礎時鐘信號OSC_CLK的前一個有效沿來臨時更新的變數值和輸出時鐘信號DPLL_CLK的頻率Fout與輸入週期信號Sin的頻率Fin之間的預設倍頻係數Nset,計算基礎時鐘控制變數OSC_SUM的更新變數值,並在基礎時鐘信號OSC_CLK的當前有效沿來臨時利用所計算的更新變數值來更新基礎時鐘控制變數OSC_SUM。例如,可以將基礎時鐘控制變數OSC_SUM的變數值更新為OSC_SUM=OSC_SUM+NSetAs shown in FIG. 6 , in some embodiments, the operation control module 206 can be further configured to: when the input characteristic signal Sin_start is at an inactive level (for example, a low level), based on the frequency Fout and the frequency of the output clock signal DPLL_CLK The preset frequency multiplication coefficient Nset between the frequencies Fin of the input periodic signal Sin updates the basic clock control variable OSC_SUM. For example, the variable value temporarily updated based on the basic clock control variable OSC_SUM at the previous effective edge of the basic clock signal OSC_CLK and the preset frequency multiplication coefficient Nset between the frequency Fout of the output clock signal DPLL_CLK and the frequency Fin of the input periodic signal Sin , calculate the update variable value of the basic clock control variable OSC_SUM, and use the calculated update variable value to update the basic clock control variable OSC_SUM when the current effective edge of the basic clock signal OSC_CLK comes. For example, the variable value of the basic clock control variable OSC_SUM may be updated as OSC_SUM=OSC_SUM+N Set .

具體地,在圖6所示的運算控制模組206的部分示例實現中,2路選擇器U3、D觸發器T5、以及加法器(+Nset運算)構成第一運算單元,用 於對基礎時鐘控制變數OSC_SUM進行初始化和更新,其中,輸入表徵信號Sin_start被用作2路選擇器U3的輸出控制信號,當輸入表徵信號Sin_start為邏輯0時,2路選擇器U3輸出端子0接收的信號(即,基礎時鐘控制變數OSC_SUM在基礎時鐘信號OSC_CLK的前一個有效沿時更新的變數值與預設倍頻係數Nset之和),當輸入表徵信號Sin_start為邏輯1時,2路選擇器U3輸出端子1接收的信號(即,1.5*Nset)。 Specifically, in some example implementations of the operation control module 206 shown in FIG. 6 , the 2-way selector U3, the D flip-flop T5, and the adder (+Nset operation) constitute the first operation unit, which is used to To initialize and update the basic clock control variable OSC_SUM, wherein the input signal Sin_start is used as the output control signal of the 2-way selector U3, when the input signal Sin_start is logic 0, the output terminal 0 of the 2-way selector U3 receives The signal of the basic clock control variable OSC_SUM (that is, the sum of the updated variable value and the preset frequency multiplication coefficient Nset when the basic clock control variable OSC_SUM is on the previous effective edge of the basic clock signal OSC_CLK), when the input characterization signal Sin_start is logic 1, the 2-way selector U3 outputs the signal received at terminal 1 (ie, 1.5*Nset).

圖7示出了圖2所示的運算控制模組206的部分示例實現的示意圖。如圖7所示,在一些實施例中,運算控制模組206可以進一步被配置為:當輸入表徵信號Sin_start處於有效位準(例如,高位準)時,基於時鐘計數結果Nsin對輸出時鐘控制變數DPLL_SUM進行初始化。例如,可以將輸出時鐘控制變數DPLL_SUM的變數值初始化為DPLL_SUM=NSinFIG. 7 shows a schematic diagram of a partial example implementation of the calculation control module 206 shown in FIG. 2 . As shown in FIG. 7 , in some embodiments, the operation control module 206 can be further configured to: when the input characterization signal Sin_start is at a valid level (for example, a high level), control the output clock variable based on the clock counting result Nsin DPLL_SUM is initialized. For example, the variable value of the output clock control variable DPLL_SUM may be initialized as DPLL_SUM=N Sin .

如圖7所示,在一些實施例中,運算控制模組206可以進一步被配置為:當輸入表徵信號Sin_start處於非有效位準(例如,低位準)時,基於時鐘計數結果Nsin對輸出時鐘控制變數DPLL_SUM進行更新。例如,可以基於輸出時鐘控制變數DPLL_SUM在基礎時鐘信號OSC_CLK的前一個有效沿來臨時更新的變數值、時鐘計數結果Nsin、以及輸出控制信號DPLL_PASS,計算輸出時鐘控制變數DPLL_SUM的更新變數值,並在基礎時鐘信號OSC_CLK的當前有效沿來臨時利用所計算的更新變數值來更新輸出時鐘控制變數DPLL_SUM,其中,輸出控制信號DPLL_PASS表徵基礎時鐘控制變數OSC_SUM和輸出時鐘控制變數DPLL_SUM在基礎時鐘信號的前一個有效沿來臨時更新的變數值之間的大小對比關係。例如,可以將輸出時鐘控制變數DPLL_SUM的變數值更新為DPLL_SUM=DPLL_SUM+DPLL_PAss*NSinAs shown in FIG. 7 , in some embodiments, the operation control module 206 can be further configured to: when the input characteristic signal Sin_start is at an inactive level (for example, a low level), control the output clock based on the clock count result Nsin The variable DPLL_SUM is updated. For example, the updated variable value of the output clock control variable DPLL_SUM can be calculated based on the temporarily updated variable value of the output clock control variable DPLL_SUM at the previous effective edge of the basic clock signal OSC_CLK, the clock counting result Nsin, and the output control signal DPLL_PASS, and then When the current effective edge of the basic clock signal OSC_CLK comes, the calculated update variable value is used to update the output clock control variable DPLL_SUM, wherein the output control signal DPLL_PASS represents that the basic clock control variable OSC_SUM and the output clock control variable DPLL_SUM are in the previous period of the basic clock signal. The effective edge is the size comparison relationship between the variable values that are updated temporarily. For example, the variable value of the output clock control variable DPLL_SUM may be updated as DPLL_SUM=DPLL_SUM+DPLL_PAss*N Sin .

具體地,在圖7所示的運算控制模組206的部分示例實現中,2路選擇器U4和U5、D觸發器T6、以及加法器構成第二運算單元,用於對輸出時鐘控制變數DPLL_SUM進行初始化和更新,其中,輸出控制信號DPLL_PASS被用作2路選擇器U4的輸出控制信號,當輸出控制信號DPLL_PASS為邏輯0時,2路選擇器U4輸出端子0接收的信號(即,邏輯0),當輸出控制信號DPLL_PASS為邏輯1時,2路選擇器U4輸出端子1接收的信號(即,時鐘計數結果Nsin),輸入表徵信號Sin_start被用作2路選擇 器U5的輸出控制信號,當輸入表徵信號Sin_start為邏輯0時,2路選擇器U5輸出端子0接收的信號(即,輸出時鐘控制變數DPLL_SUM在基礎時鐘信號OSC_CLK的前一個有效沿時更新的變數值與2路選擇器U4的輸出信號進行加法運算的結果),當輸入表徵信號Sin_start為邏輯1時,2路選擇器U5輸出端子1接收的信號(即,時鐘計數結果Nsin)。 Specifically, in some example implementations of the operation control module 206 shown in FIG. 7 , the 2-way selectors U4 and U5, the D flip-flop T6, and the adder constitute a second operation unit for controlling the output clock variable DPLL_SUM Initialize and update, wherein, the output control signal DPLL_PASS is used as the output control signal of the 2-way selector U4, when the output control signal DPLL_PASS is logic 0, the signal received by the 2-way selector U4 output terminal 0 (that is, logic 0 ), when the output control signal DPLL_PASS is logic 1, the 2-way selector U4 outputs the signal received by terminal 1 (that is, the clock counting result Nsin), and the input characterization signal Sin_start is used as 2-way selection The output control signal of the device U5, when the input characterization signal Sin_start is logic 0, the signal received by the output terminal 0 of the 2-way selector U5 (that is, the variable that the output clock control variable DPLL_SUM is updated on the previous valid edge of the basic clock signal OSC_CLK value and the output signal of the 2-way selector U4), when the input signal Sin_start is logic 1, the 2-way selector U5 outputs the signal received by terminal 1 (that is, the clock counting result Nsin).

圖8示出了圖2所示的輸出控制模組208的示例實現的示意圖。如圖8所示,在一些實施例中,輸出控制模組208可以進一步被配置為:基於基礎時鐘控制變數OSC_SUM和輸出時鐘控制變數DPLL_SUM,利用比較器產生變數比較信號SUM_COMP;基於基礎時鐘信號OSC_CLK的下降沿和變數比較信號SUM_COMP,利用D觸發器T7產生輸出控制信號DPLL_PASS;以及基於基礎時鐘信號OSC_CLK和輸出控制信號DPLL_PASS,利用及閘AND2產生輸出時鐘信號DPLL_CLK。這裡,當基礎時鐘控制變數OSC_SUM大於輸出時鐘控制變數DPLL_SUM時,輸出控制信號DPLL_PASS為邏輯1,輸出基礎時鐘信號OSC_CLK的下一個脈衝作為輸出時鐘信號DPLL_CLK的一個脈衝;在基礎時鐘控制變數OSC_SUM不大於輸出時鐘控制變數DPLL_SUM時,輸出控制信號SUM_COMP為邏輯0,輸出時鐘信號DPLL_CLK為邏輯0。 FIG. 8 shows a schematic diagram of an example implementation of the output control module 208 shown in FIG. 2 . As shown in FIG. 8 , in some embodiments, the output control module 208 can be further configured to: use a comparator to generate a variable comparison signal SUM_COMP based on the basic clock control variable OSC_SUM and the output clock control variable DPLL_SUM; based on the basic clock signal OSC_CLK The falling edge of the variable comparison signal SUM_COMP, using the D flip-flop T7 to generate the output control signal DPLL_PASS; and based on the basic clock signal OSC_CLK and the output control signal DPLL_PASS, using the AND gate AND2 to generate the output clock signal DPLL_CLK. Here, when the basic clock control variable OSC_SUM is greater than the output clock control variable DPLL_SUM, the output control signal DPLL_PASS is logic 1, and the next pulse of the basic clock signal OSC_CLK is output as a pulse of the output clock signal DPLL_CLK; when the basic clock control variable OSC_SUM is not greater than When the clock control variable DPLL_SUM is output, the output control signal SUM_COMP is logic 0, and the output clock signal DPLL_CLK is logic 0.

在一些實施例中,計數控制模組204和運算控制模組206將基礎時鐘信號OSC_CLK的上升沿作為有效沿,同步控制模組202和輸出控制模組208將基礎時鐘信號OSC_CLK的下降沿作為有效沿;替代地,計數控制模組204和運算控制模組206將基礎時鐘信號OSC_CLK的下降沿作為有效沿,同步控制模組202和輸出控制模組208將基礎時鐘信號OSC_CLK的上升沿作為有效沿。 In some embodiments, the counting control module 204 and the operation control module 206 regard the rising edge of the basic clock signal OSC_CLK as the valid edge, and the synchronization control module 202 and the output control module 208 regard the falling edge of the basic clock signal OSC_CLK as the valid edge. Alternatively, the counting control module 204 and the operation control module 206 use the falling edge of the basic clock signal OSC_CLK as the valid edge, and the synchronous control module 202 and the output control module 208 use the rising edge of the basic clock signal OSC_CLK as the valid edge .

圖9示出了根據本發明實施例的數位鎖相環電路的控制流程圖。如圖9所示,根據本發明實施例的數位鎖相環電路的控制流程包括:當基礎時鐘信號OSC_CLK的有效沿來臨時,判斷輸入週期信號Sin的有效沿是否來臨(即,輸入表徵信號Sin_start是否處於有效位準(例如,高位準));當輸入週期信號Sin的有效沿來臨時(即,輸入表徵信號Sin_start處於有效位準時),對時鐘計數結果Nsin進行更新,對時鐘計數器進行清零,對輸出時鐘控 制變數DPLL_SUM進行初始化,並對基礎時鐘控制變數OSC_SUM進行初始化;當輸入週期信號Sin的有效沿沒有來臨時(即,輸入表徵信號Sin_start處於非有效位準(例如,低位準)時),時鐘計數器的計數數目加1,對輸出時鐘控制變數DPLL_SUM進行累加,並對基礎時鐘控制變數OSC_SUM進行累加;判斷基礎時鐘控制變數OSC_SUM是否大於輸出時鐘控制變數DPLL_SUM;如果基礎時鐘控制變數OSC_SUM大於輸出時鐘控制變數DPLL_SUM,則輸出控制信號DPLL_PASS為邏輯1,輸出基礎時鐘信號OSC_CLK的下一個脈衝作為輸出時鐘信號DPLL_CLK;如果基礎時鐘控制變數OSC_SUM不大於輸出時鐘控制變數DPLL_SUM,則輸出控制信號DPLL_PASS為邏輯0,遮罩基礎時鐘信號OSC_CLK的下一個脈衝,即輸出時鐘信號DPLL_CLK為邏輯0。這裡,框1中的步驟對應基礎時鐘信號OSC_CLK的有效沿為上升沿,框2中的步驟對應基礎時鐘信號OSC_CLK的有效沿為下降沿。 FIG. 9 shows a control flowchart of a digital phase-locked loop circuit according to an embodiment of the present invention. As shown in FIG. 9 , the control flow of the digital phase-locked loop circuit according to the embodiment of the present invention includes: when the valid edge of the basic clock signal OSC_CLK comes, it is judged whether the valid edge of the input periodic signal Sin is coming (that is, the input characteristic signal Sin_start Whether it is at a valid level (for example, a high level)); when the valid edge of the input periodic signal Sin comes (that is, when the input characterization signal Sin_start is at a valid level), the clock counting result Nsin is updated, and the clock counter is cleared , the output clock control The control variable DPLL_SUM is initialized, and the basic clock control variable OSC_SUM is initialized; when the valid edge of the input periodic signal Sin does not come (that is, when the input characterization signal Sin_start is at an inactive level (for example, low level)), the clock counter Add 1 to the count number of the output clock control variable DPLL_SUM, and accumulate the basic clock control variable OSC_SUM; judge whether the basic clock control variable OSC_SUM is greater than the output clock control variable DPLL_SUM; if the basic clock control variable OSC_SUM is greater than the output clock control variable DPLL_SUM, the output control signal DPLL_PASS is logic 1, and the next pulse of the basic clock signal OSC_CLK is output as the output clock signal DPLL_CLK; if the basic clock control variable OSC_SUM is not greater than the output clock control variable DPLL_SUM, the output control signal DPLL_PASS is logic 0, blocking The next pulse of the basic clock signal OSC_CLK, that is, the output clock signal DPLL_CLK is logic 0. Here, the steps in box 1 correspond to the rising edge of the basic clock signal OSC_CLK, and the steps in box 2 correspond to the falling edge of the basic clock signal OSC_CLK.

圖10示出了與圖8所示的輸出控制模組208有關的多個信號的波形圖。具體地,圖10示出了在以下示例中與輸出控制模組208相關的多個信號的波形圖:基於10MHz的基礎時鐘信號OSC_CLK和1kHz的輸入週期信號Sin,產生頻率為輸入週期信號Sin的頻率的3000倍的輸出時鐘信號DPLL_CLK;時鐘計數結果Nsin為10,000,輸出時鐘信號DPLL_CLK的頻率與輸入週期信號Sin的頻率之間的預設倍頻係數Nset為3,000;當輸入週期信號Sin的上升沿來臨時(即,Sin_start處於有效位準時),基礎時鐘控制變數OSC_SUM和輸出時鐘控制變數DPLL_SUM在基礎時鐘信號OSC_CLK的上升沿來臨時分別被初始化至4500(1.5Nset)和10,000(Nsin),輸出控制信號DPLL_PASS在基礎時鐘信號OSC_CLK的下降沿來臨時被更新為邏輯0,遮罩基礎時鐘信號OSC_CLK的下一個脈衝,依次類推,後續的基礎時鐘控制信號OSC_CLK與輸出時鐘信號DPLL_CLK的對應結果如下: FIG. 10 shows a waveform diagram of various signals related to the output control module 208 shown in FIG. 8 . Specifically, FIG. 10 shows a waveform diagram of a plurality of signals related to the output control module 208 in the following example: based on the basic clock signal OSC_CLK of 10MHz and the input periodic signal Sin of 1kHz, the frequency of the input periodic signal Sin is The output clock signal DPLL_CLK whose frequency is 3000 times; the clock counting result Nsin is 10,000, and the preset frequency multiplication coefficient Nset between the frequency of the output clock signal DPLL_CLK and the frequency of the input periodic signal Sin is 3,000; when the rising edge of the input periodic signal Sin When it comes (that is, when Sin_start is at a valid level), the basic clock control variable OSC_SUM and the output clock control variable DPLL_SUM are initialized to 4500 (1.5Nset) and 10,000 (Nsin) respectively when the rising edge of the basic clock signal OSC_CLK comes, and the output control The signal DPLL_PASS is updated to logic 0 when the falling edge of the basic clock signal OSC_CLK comes, masking the next pulse of the basic clock signal OSC_CLK, and so on. The corresponding results of the subsequent basic clock control signal OSC_CLK and the output clock signal DPLL_CLK are as follows:

Figure 111105475-A0101-12-0007-2
Figure 111105475-A0101-12-0007-2

Figure 111105475-A0101-12-0008-3
Figure 111105475-A0101-12-0008-3

從圖10可以看出,輸出時鐘信號DPLL_CLK與基礎時鐘信號OSC_CLK的時鐘沿同步;由於基礎時鐘信號OSC_CLK的頻率(10MHz)與輸出時鐘信號DPLL_CLK的頻率(3MHz)並非整數倍關係,所以輸出時鐘信號DPLL_CLK並非均勻分佈,其計數/計時最大偏差為基礎時鐘信號OSC_CLK的0.5個週期(50ns)。以長時間來看,輸出時鐘信號DPLL_CLK被用於計數計時等功能時,1s的誤差量為50ns/1s(億分之5),1ms的誤差量為50ns/1ms(萬分之0.5),其誤差幾乎可以忽略不計,且隨著基礎時鐘信號 OSC_CLK的頻率的提高,可以進一步降低其誤差。 It can be seen from Figure 10 that the output clock signal DPLL_CLK is synchronized with the clock edge of the basic clock signal OSC_CLK; since the frequency (10MHz) of the basic clock signal OSC_CLK and the frequency (3MHz) of the output clock signal DPLL_CLK are not integer multiples, the output clock signal DPLL_CLK is not evenly distributed, and its counting/timing maximum deviation is 0.5 period (50ns) of the basic clock signal OSC_CLK. In the long term, when the output clock signal DPLL_CLK is used for functions such as counting and timing, the error of 1s is 50ns/1s (5 parts per billion), and the error of 1ms is 50ns/1ms (0.5 parts per ten thousand). is almost negligible, and as the underlying clock signal The improvement of the frequency of OSC_CLK can further reduce its error.

下面,對根據本發明實施例的數位鎖相環電路所實現的效果進行數學推導: Next, mathematically deduce the effect achieved by the digital phase-locked loop circuit according to the embodiment of the present invention:

假設在輸入表徵信號Sin_start處於有效位準時,輸出時鐘信號DPLL_CLK的任意一個上升沿為第NDPLL個上升沿,並且基礎時鐘信號OSC_CLK的、對應於輸出時鐘信號DPLL_CLK的第NDPLL個上升沿的上升沿為第NOSC個上升沿。 Assume that when the input characterization signal Sin_start is at a valid level, any rising edge of the output clock signal DPLL_CLK is the Nth DPLL rising edge, and the basic clock signal OSC_CLK corresponds to the rising edge of the Nth DPLL rising edge of the output clock signal DPLL_CLK The edge is the rising edge of N OSC .

當基礎時鐘信號OSC_CLK的第NOSC個上升沿來臨時,基礎時鐘控制變數OSC_SUM將輸出如下計算的更新變數值: When the N OSC rising edge of the basic clock signal OSC_CLK comes, the basic clock control variable OSC_SUM will output the update variable value calculated as follows:

Figure 111105475-A0101-12-0009-6
Figure 111105475-A0101-12-0009-6

當基礎時鐘信號OSC_CLK的第NOSC個上升沿來臨時,輸出時鐘控制變數DPLL_SUM將輸出如下計算的更新變數值: When the N OSC rising edge of the basic clock signal OSC_CLK comes, the output clock control variable DPLL_SUM will output the update variable value calculated as follows:

Figure 111105475-A0101-12-0009-7
Figure 111105475-A0101-12-0009-7

由根據本發明實施例的數位鎖相環電路的工作機制可知: From the working mechanism of the digital phase-locked loop circuit according to the embodiment of the present invention:

Figure 111105475-A0101-12-0009-8
Figure 111105475-A0101-12-0009-8

結合(1)、(2)、(3)可以得到: Combining (1), (2), (3) can get:

Figure 111105475-A0101-12-0009-9
Figure 111105475-A0101-12-0009-9

即,輸出時鐘信號DPLL_CLK的第NDPLL個脈衝需要在基礎時 鐘信號OSC_CLK的第

Figure 111105475-A0101-12-0009-4
個脈衝的時刻產生,NOSC為對
Figure 111105475-A0101-12-0009-5
四捨 五入後的取整結果。 That is, the Nth DPLL pulse of the output clock signal DPLL_CLK needs to be at the
Figure 111105475-A0101-12-0009-4
pulses are generated at the moment, N OSC is the pair
Figure 111105475-A0101-12-0009-5
The rounded result after rounding.

繼續上述示例: Continuing with the above example:

輸出時鐘信號DPLL_CLK的第1個脈衝理論上應該在基礎時鐘信號OSC_CLK的第3.33個脈衝的時刻產生,實際在基礎時鐘信號OSC_CLK的第3個脈衝的時刻產生。 The first pulse of the output clock signal DPLL_CLK should theoretically be generated at the moment of the 3.33rd pulse of the basic clock signal OSC_CLK, but actually it is generated at the moment of the third pulse of the basic clock signal OSC_CLK.

輸出時鐘信號DPLL_CLK的第2個脈衝理論上應該在基礎時鐘信號OSC_CLK的第6.67個脈衝的時刻產生,實際在基礎時鐘信號OSC_CLK的第7個脈衝的時刻產生。 The second pulse of the output clock signal DPLL_CLK should theoretically be generated at the moment of the 6.67th pulse of the basic clock signal OSC_CLK, but actually it is generated at the moment of the seventh pulse of the basic clock signal OSC_CLK.

輸出時鐘信號DPLL_CLK的第3個脈衝理論上應該在基礎時鐘信號OSC_CLK的第10個脈衝的時刻產生,實際在基礎時鐘信號OSC_CLK的 第10個脈衝的時刻產生。 The third pulse of the output clock signal DPLL_CLK should theoretically be generated at the time of the 10th pulse of the basic clock signal OSC_CLK, actually at the time of the 10th pulse of the basic clock signal OSC_CLK The moment of the 10th pulse is generated.

依次類推: And so on:

輸出時鐘信號DPLL_CLK的第30個脈衝理論上應該在基礎時鐘信號OSC_CLK的第100個脈衝的時刻產生,實際在基礎時鐘信號OSC_CLK的第100個脈衝的時刻產生。 The 30th pulse of the output clock signal DPLL_CLK should theoretically be generated at the time of the 100th pulse of the basic clock signal OSC_CLK, but it is actually generated at the time of the 100th pulse of the basic clock signal OSC_CLK.

輸出時鐘信號DPLL_CLK的第3000(Nset)個脈衝理論上應該在基礎時鐘信號OSC_CLK的第10000(Nsin)個脈衝的時刻產生,此時對應輸入表徵信號Sin_start的下一個脈衝來臨,一個週期結束。 The 3000th (Nset) pulse of the output clock signal DPLL_CLK should theoretically be generated at the moment of the 10000th (Nsin) pulse of the basic clock signal OSC_CLK. At this time, the next pulse corresponding to the input signal Sin_start comes, and a cycle ends.

根據本發明實施例的數位鎖相環電路可以保證在輸入週期信號Sin的一個週期內近似均勻地產生Nset個週期的輸出時鐘信號DPLL_CLK,從而實現對輸入週期信號Sin的Nset倍頻。雖然基礎時鐘信號OSC_CLK的頻率會對根據本發明實施例的數位鎖相環電路的運算過程產生影響,但不會對輸出時鐘信號DPLL_CLK產生明顯的影響。利用不同頻率的基礎時鐘信號OSC_CLK(只要其頻率高於輸出時鐘信號DPLL_CLK的預期頻率),都可以達到輸入週期信號Sin的Nset倍頻效果,因此對基礎時鐘信號OSC_CLK的頻率精度要求不高。而對於輸入週期信號Sin的頻率發生變化的情況,時鐘計數結果Nsin將在輸入週期信號Sin的一個週期結束時立即被更新,所以其回應只滯後1個週期,遠快於類比鎖相環電路,並且不會存在類比鎖相環電路中的環路濾波器所帶來的振盪問題。另外,對於輸入週期信號Sin的頻率較低的情況,只需要保證相應變數(例如,Nsin,OSC_SUM,DPLL_SUM)的位寬足夠、不發生溢出即可,如此可以使得根據本發明實施例的數位鎖相環電路在輸入週期信號Sin的頻率範圍較寬的情況下也可以正常工作。 The digital phase-locked loop circuit according to the embodiment of the present invention can ensure that the output clock signal DPLL_CLK of Nset periods is approximately uniformly generated within one period of the input period signal Sin, thereby realizing Nset frequency multiplication of the input period signal Sin. Although the frequency of the basic clock signal OSC_CLK will affect the operation process of the digital PLL circuit according to the embodiment of the present invention, it will not significantly affect the output clock signal DPLL_CLK. Using the basic clock signal OSC_CLK of different frequencies (as long as its frequency is higher than the expected frequency of the output clock signal DPLL_CLK) can achieve the Nset frequency multiplication effect of the input periodic signal Sin, so the frequency accuracy of the basic clock signal OSC_CLK is not high. For the case where the frequency of the input periodic signal Sin changes, the clock counting result Nsin will be updated immediately at the end of one cycle of the input periodic signal Sin, so its response only lags by 1 cycle, which is much faster than the analog phase-locked loop circuit. And there will be no oscillation problem caused by the loop filter in the analog phase-locked loop circuit. In addition, when the frequency of the input periodic signal Sin is low, it is only necessary to ensure that the bit width of the corresponding variable (for example, Nsin, OSC_SUM, DPLL_SUM) is sufficient and no overflow occurs, so that the digital lock according to the embodiment of the present invention The phase loop circuit can also work normally when the frequency range of the input periodic signal Sin is wide.

綜上所述,根據本發明實施例的數位鎖相環電路僅需要使用加法器、比較器、觸發器等元件即可實現輸入週期信號與輸出時鐘信號的同步(頻率和相位兩方面的同步),無需使用乘除法等運算單元,極大地簡化了運算及電路設計複雜度。 In summary, the digital phase-locked loop circuit according to the embodiment of the present invention only needs to use components such as adders, comparators, and flip-flops to realize the synchronization of the input periodic signal and the output clock signal (synchronization of both frequency and phase) , no need to use arithmetic units such as multiplication and division, which greatly simplifies the complexity of calculation and circuit design.

本發明可以以其他的具體形式實現,而不脫離其精神和本質特徵。例如,特定實施例中所描述的演算法可以被修改,而系統體系結構並不脫離本發明的基本精神。因此,當前的實施例在所有方面都被看作是示例性的而 非限定性的,本發明的範圍由所附請求項而非上述描述定義,並且,落入請求項的含義和等同物的範圍內的全部改變從而都被包括在本發明的範圍之中。 The present invention may be embodied in other specific forms without departing from its spirit and essential characteristics. For example, the algorithms described in certain embodiments may be modified without departing from the basic spirit of the invention in terms of system architecture. Accordingly, the present embodiments are to be considered in all respects as exemplary and not Without limitation, the scope of the present invention is defined by the appended claims rather than the above description, and all changes that come within the meaning and range of equivalents of the claims are thereby embraced in the scope of the present invention.

200:數位鎖相環電路 200: Digital PLL circuit

202:同步控制模組 202: Synchronous control module

204:計數控制模組 204: Counting control module

206:運算控制模組 206: Operation control module

208:輸出控制模組 208: Output control module

DPLL_CLK:輸出時鐘訊號 DPLL_CLK: output clock signal

Nset:預設倍頻係數 Nset: preset multiplication factor

OSC_CLK:基礎時鐘訊號 OSC_CLK: basic clock signal

Sin:輸入週期訊號 Sin: input periodic signal

Claims (18)

一種數位鎖相環電路,包括:同步控制模組,被配置為基於基礎時鐘信號和輸入週期信號,產生表徵所述輸入週期信號相對於所述基礎時鐘信號的週期性變化的輸入表徵信號,即,基於所述基礎時鐘信號和所述輸入週期信號,利用第一D觸發器產生第一表徵信號;基於所述基礎時鐘信號和所述第一表徵信號,利用第二D觸發器產生第二表徵信號;以及基於所述第二表徵信號的反相信號和所述第一表徵信號,利用第一及閘產生所述輸入表徵信號;計數控制模組,被配置為基於所述基礎時鐘信號和所述輸入表徵信號,產生表徵所述輸入表徵信號的週期與所述基礎時鐘信號的週期之間的倍數關係的時鐘計數結果;運算控制模組,被配置為基於輸出時鐘信號的頻率與所述輸入週期信號的頻率之間的預設倍頻係數產生基礎時鐘控制變數,並基於所述時鐘計數結果產生輸出時鐘控制變數;以及輸出控制模組,被配置為基於所述基礎時鐘控制變數和所述輸出時鐘控制變數產生輸出控制信號,並基於所述輸出控制信號和所述基礎時鐘信號產生所述輸出時鐘信號。 A digital phase-locked loop circuit, comprising: a synchronous control module configured to generate, based on a basic clock signal and an input periodic signal, an input representative signal representing a periodic change of the input periodic signal relative to the basic clock signal, namely , based on the basic clock signal and the input periodic signal, using a first D flip-flop to generate a first characterization signal; based on the basic clock signal and the first characterization signal, using a second D flip-flop to generate a second characterization signal; and based on the inversion signal of the second characterization signal and the first characterization signal, using the first AND gate to generate the input characterization signal; the counting control module is configured to be based on the basic clock signal and the The input representative signal generates a clock counting result representing the multiple relationship between the period of the input representative signal and the period of the basic clock signal; the operation control module is configured to be based on the frequency of the output clock signal and the input A preset frequency multiplication factor between the frequencies of the periodic signal generates a basic clock control variable, and generates an output clock control variable based on the clock counting result; and an output control module configured to control the basic clock variable based on the basic clock control variable and the An output clock control variable generates an output control signal, and generates the output clock signal based on the output control signal and the base clock signal. 根據請求項1所述的數位鎖相環電路,其中,所述計數控制模組進一步被配置為:當所述輸入表徵信號處於非有效位準時,利用時鐘計數器對所述基礎時鐘信號的週期數目進行計數;當所述輸入表徵信號處於有效位準時,將所述時鐘計數器的計數結果更新至所述時鐘計數結果並將所述時鐘計數器清零。 According to the digital phase-locked loop circuit described in claim 1, wherein the counting control module is further configured to: use a clock counter to count the number of cycles of the basic clock signal when the input representative signal is at an inactive level Counting; when the input representative signal is at a valid level, updating the counting result of the clock counter to the clock counting result and clearing the clock counter. 根據請求項1所述的數位鎖相環電路,其中,所述運算控制模組進一步被配置為:當所述輸入表徵信號處於有效位準時,基於所述輸出時鐘信號的頻率與所述輸入週期信號的頻率之間的預設倍頻係數對所述基礎時鐘控制變數進行初始化;以及 當所述輸入表徵信號處於非有效位準時,基於所述輸出時鐘信號的頻率與所述輸入週期信號的頻率之間的預設倍頻係數對所述基礎時鐘控制變數進行更新。 The digital phase-locked loop circuit according to claim 1, wherein the operation control module is further configured to: when the input representative signal is at a valid level, based on the frequency of the output clock signal and the input period initializing said base clock control variable with a preset multiplication factor between frequencies of the signal; and When the input representative signal is at an inactive level, the basic clock control variable is updated based on a preset frequency multiplication factor between the frequency of the output clock signal and the frequency of the input periodic signal. 根據請求項3所述的數位鎖相環電路,其中,所述運算控制模組進一步被配置為:基於所述基礎時鐘控制變數在所述基礎時鐘信號的前一個有效沿來臨時更新的變數值和所述輸出時鐘信號的頻率與所述輸入週期信號的頻率之間的預設倍頻係數,計算所述基礎時鐘控制變數的更新變數值;以及在所述基礎時鐘信號的當前有效沿來臨時,利用所計算的更新變數值來更新所述基礎時鐘控制變數。 The digital phase-locked loop circuit according to claim 3, wherein the operation control module is further configured to: based on the variable value of the basic clock control variable that is temporarily updated when the previous valid edge of the basic clock signal comes and the preset frequency multiplication coefficient between the frequency of the output clock signal and the frequency of the input periodic signal, calculate the update variable value of the basic clock control variable; and when the current effective edge of the basic clock signal comes , updating the basic clock control variable with the calculated update variable value. 根據請求項1所述的數位鎖相環電路,其中,所述運算控制模組進一步被配置為:當所述輸入表徵信號處於有效位準時,基於所述時鐘計數結果對所述輸出時鐘控制變數進行初始化;以及當所述輸入表徵信號處於非有效位準時,基於所述時鐘計數結果對所述輸出時鐘控制變數進行更新。 According to the digital phase-locked loop circuit described in claim 1, wherein the operation control module is further configured to: when the input representative signal is at a valid level, control the variable of the output clock based on the clock count result performing initialization; and updating the output clock control variable based on the clock counting result when the input representative signal is at an inactive level. 根據請求項5所述的數位鎖相環電路,其中,所述運算控制模組進一步被配置為:基於所述輸出時鐘控制變數在所述基礎時鐘信號的前一個有效沿來臨時更新的變數值、所述時鐘計數結果、以及所述輸出控制信號,計算所述輸出時鐘控制變數的更新變數值,其中,所述輸出控制信號表徵所述基礎時鐘控制變數和所述輸出時鐘控制變數在所述基礎時鐘信號的前一個有效沿來臨時更新的變數值之間的大小對比關係;以及在所述基礎時鐘信號的當前有效沿來臨時,利用所計算的更新變數值來更新所述輸出時鐘控制變數。 According to the digital phase-locked loop circuit described in claim 5, wherein the operation control module is further configured to: based on the variable value of the output clock control variable that is temporarily updated at the previous valid edge of the basic clock signal , the clock counting result, and the output control signal, calculate the update variable value of the output clock control variable, wherein the output control signal represents the base clock control variable and the output clock control variable in the The size comparison relationship between the variable values updated when the previous valid edge of the basic clock signal comes; and when the current valid edge of the basic clock signal comes, update the output clock control variable with the calculated update variable value . 根據請求項6所述的數位鎖相環電路,其中,所述輸出控制信號在所述基礎時鐘控制變數大於所述輸出時鐘控制變數時為邏輯1,在所述基礎時鐘控制變數不大於所述輸出時鐘控制變數時為邏輯0。 The digital phase-locked loop circuit according to claim 6, wherein the output control signal is logic 1 when the basic clock control variable is greater than the output clock control variable, and is logic 1 when the basic clock control variable is not greater than the Logic 0 when the output clock controls the variable. 根據請求項1所述的數位鎖相環電路,其中,所述輸出控制模 組進一步被配置為:基於所述基礎時鐘控制變數和所述輸出時鐘控制變數,利用比較器產生變數比較信號;基於所述基礎時鐘信號和所述變數比較信號,利用第三D觸發器產生所述輸出控制信號;以及基於所述基礎時鐘信號和所述輸出控制信號,利用第二及閘產生所述輸出時鐘信號。 According to the digital phase-locked loop circuit described in claim 1, wherein the output control module The group is further configured to: use a comparator to generate a variable comparison signal based on the basic clock control variable and the output clock control variable; use a third D flip-flop to generate the variable comparison signal based on the basic clock signal and the variable comparison signal. the output control signal; and based on the basic clock signal and the output control signal, using a second AND gate to generate the output clock signal. 根據請求項1所述的數位鎖相環電路,其中,所述計數控制模組和所述運算控制模組將所述基礎時鐘信號的上升沿作為有效沿,所述同步控制模組和所述輸出控制模組將所述基礎時鐘信號的下降沿作為有效沿,或者所述計數控制模組和所述運算控制模組將所述基礎時鐘信號的下降沿作為有效沿,所述同步控制模組和所述輸出控制模組將所述基礎時鐘信號的上升沿作為有效沿。 According to the digital phase-locked loop circuit described in claim 1, wherein, the counting control module and the operation control module use the rising edge of the basic clock signal as a valid edge, and the synchronization control module and the The output control module takes the falling edge of the basic clock signal as the valid edge, or the counting control module and the operation control module take the falling edge of the basic clock signal as the valid edge, and the synchronous control module and the output control module takes the rising edge of the basic clock signal as a valid edge. 一種由數位鎖相環電路實現的控制方法,包括:基於基礎時鐘信號和輸入週期信號,產生表徵所述輸入週期信號相對於所述基礎時鐘信號的週期性變化的輸入表徵信號,即,基於所述基礎時鐘信號和所述輸入週期信號,利用第一D觸發器產生第一表徵信號;基於所述基礎時鐘信號和所述第一表徵信號,利用第二D觸發器產生第二表徵信號;以及基於所述第二表徵信號的反相信號和所述第一表徵信號,利用第一及閘產生所述輸入表徵信號;基於所述基礎時鐘信號和所述輸入表徵信號,產生表徵所述輸入表徵信號的週期與所述基礎時鐘信號的週期之間的倍數關係的時鐘計數結果;基於輸出時鐘信號的頻率與所述輸入週期信號的頻率之間的預設倍頻係數產生基礎時鐘控制變數,並基於所述時鐘計數結果產生輸出時鐘控制變數;以及基於所述基礎時鐘控制變數和所述輸出時鐘控制變數產生輸出控制信號,並基於所述輸出控制信號和所述基礎時鐘信號產生輸出時鐘信號。 A control method implemented by a digital phase-locked loop circuit, including: based on a basic clock signal and an input periodic signal, generating an input characterization signal that characterizes the periodic change of the input periodic signal relative to the basic clock signal, that is, based on the The basic clock signal and the input periodic signal, using a first D flip-flop to generate a first representative signal; based on the basic clock signal and the first representative signal, using a second D flip-flop to generate a second representative signal; and Based on the inversion signal of the second characterization signal and the first characterization signal, using a first AND gate to generate the input characterization signal; based on the basic clock signal and the input characterization signal, generating the input characterization signal A clock counting result of the multiple relationship between the period of the signal and the period of the basic clock signal; a basic clock control variable is generated based on a preset frequency multiplication factor between the frequency of the output clock signal and the frequency of the input periodic signal, and generating an output clock control variable based on the clock count result; and generating an output control signal based on the base clock control variable and the output clock control variable, and generating an output clock signal based on the output control signal and the base clock signal. 根據請求項10所述的控制方法,其中,產生所述時鐘計數結果的處理包括: 當所述輸入表徵信號處於非有效位準時,利用時鐘計數器對所述基礎時鐘信號的週期數目進行計數;當所述輸入表徵信號處於有效位準時,將所述時鐘計數器的計數結果更新至所述時鐘計數結果並將所述時鐘計數器清零。 According to the control method described in claim 10, wherein the processing of generating the clock counting result includes: When the input representative signal is at an inactive level, use a clock counter to count the number of cycles of the basic clock signal; when the input representative signal is at a valid level, update the counting result of the clock counter to the clock counts the result and clears the clock counter. 根據請求項10所述的控制方法,其中,產生所述基礎時鐘控制變數的處理包括:當所述輸入表徵信號處於有效位準時,基於所述輸出時鐘信號的頻率與所述輸入週期信號的頻率之間的預設倍頻係數對所述基礎時鐘控制變數進行初始化;以及當所述輸入表徵信號處於非有效位準時,基於所述輸出時鐘信號的頻率與所述輸入週期信號的頻率之間的預設倍頻係數對所述基礎時鐘控制變數進行更新。 The control method according to claim 10, wherein the process of generating the basic clock control variable includes: when the input representative signal is at a valid level, based on the frequency of the output clock signal and the frequency of the input periodic signal Initialize the basic clock control variable with a preset multiplication factor between; and when the input representative signal is at an inactive level, based on the frequency of the output clock signal and the frequency of the input periodic signal The preset frequency multiplication coefficient updates the basic clock control variable. 根據請求項12所述的控制方法,其中,對所述基礎時鐘控制變數進行更新的處理包括:基於所述基礎時鐘控制變數在所述基礎時鐘信號的前一個有效沿來臨時更新的變數值和所述輸出時鐘信號的頻率與所述輸入週期信號的頻率之間的預設倍頻係數,計算所述基礎時鐘控制變數的更新變數值;以及在所述基礎時鐘信號的當前有效沿來臨時,利用所計算的更新變數值來更新所述基礎時鐘控制變數。 The control method according to claim 12, wherein the process of updating the basic clock control variable includes: based on the variable value and A preset frequency multiplication coefficient between the frequency of the output clock signal and the frequency of the input periodic signal is used to calculate the update variable value of the basic clock control variable; and when the current effective edge of the basic clock signal comes, The base clock control variable is updated with the calculated update variable value. 根據請求項10所述的控制方法,其中,產生所述輸出時鐘控制變數的處理包括:當所述輸入表徵信號處於有效位準時,基於所述時鐘計數結果對所述輸出時鐘控制變數進行初始化;以及當所述輸入表徵信號處於非有效位準時,基於所述時鐘計數結果對所述輸出時鐘控制變數進行更新。 The control method according to claim 10, wherein the process of generating the output clock control variable includes: when the input representative signal is at a valid level, initializing the output clock control variable based on the clock count result; and updating the output clock control variable based on the clock counting result when the input representative signal is at an inactive level. 根據請求項14所述的控制方法,其中,對所述輸出時鐘控制變數進行更新的處理包括:基於所述輸出時鐘控制變數在所述基礎時鐘信號的前一個有效沿來臨時更新的變數值、所述時鐘計數結果、以及所述輸出控制信號,計算所述輸出時鐘 控制變數的更新變數值,其中,所述輸出控制信號表徵所述基礎時鐘控制變數和所述輸出時鐘控制變數在所述基礎時鐘信號的前一個有效沿來臨時更新的變數值之間的大小對比關係;以及在所述基礎時鐘信號的當前有效沿來臨時,利用所計算的更新變數值來更新所述輸出時鐘控制變數。 The control method according to claim 14, wherein the process of updating the output clock control variable includes: based on the variable value temporarily updated when the output clock control variable comes at the previous valid edge of the basic clock signal, The clock counting result and the output control signal are used to calculate the output clock The updated variable value of the control variable, wherein the output control signal represents the size comparison between the basic clock control variable and the variable value updated when the previous valid edge of the basic clock signal comes. relationship; and updating the output clock control variable with the calculated update variable value when the current effective edge of the basic clock signal comes. 根據請求項15所述的控制方法,其中,所述輸出控制信號在所述基礎時鐘控制變數大於所述輸出時鐘控制變數時為邏輯1,在所述基礎時鐘控制變數不大於所述輸出時鐘控制變數時為邏輯0。 The control method according to claim 15, wherein the output control signal is logic 1 when the basic clock control variable is greater than the output clock control variable, and is logic 1 when the basic clock control variable is not greater than the output clock control variable Logical 0 when variable. 根據請求項10所述的控制方法,其中,產生所述輸出時鐘信號的處理包括:基於所述基礎時鐘控制變數和所述輸出時鐘控制變數,利用比較器產生變數比較信號;基於所述基礎時鐘信號和所述變數比較信號,利用第三D觸發器產生所述輸出控制信號;以及基於所述基礎時鐘信號和所述輸出控制信號,利用第二及閘產生所述輸出時鐘信號。 The control method according to claim 10, wherein the process of generating the output clock signal includes: using a comparator to generate a variable comparison signal based on the basic clock control variable and the output clock control variable; signal and the variable comparison signal, using a third D flip-flop to generate the output control signal; and based on the basic clock signal and the output control signal, using a second AND gate to generate the output clock signal. 根據請求項10所述的控制方法,其中,產生所述時鐘計數結果的處理和產生所述基礎時鐘控制變數和所述輸出時鐘控制變數的處理將所述基礎時鐘信號的上升沿作為有效沿,產生所述輸入表徵信號的處理和產生所述輸出時鐘信號的處理將所述基礎時鐘信號的下降沿作為有效沿,或產生所述時鐘計數結果的處理和產生所述基礎時鐘控制變數和所述輸出時鐘控制變數的處理將所述基礎時鐘信號的下降沿作為有效沿,產生所述輸入表徵信號的處理和產生所述輸出時鐘信號的處理將所述基礎時鐘信號的上升沿作為有效沿。 According to the control method described in claim 10, wherein the processing of generating the clock counting result and the processing of generating the basic clock control variable and the output clock control variable use the rising edge of the basic clock signal as an effective edge, The processing of generating the input characterization signal and the processing of generating the output clock signal take the falling edge of the basic clock signal as an effective edge, or the processing of generating the clock counting result and generating the basic clock control variable and the The process of outputting the clock control variable takes the falling edge of the basic clock signal as a valid edge, and the process of generating the input representative signal and the process of generating the output clock signal take the rising edge of the basic clock signal as a valid edge.
TW111105475A 2021-12-23 2022-02-15 Digital Phase Locked Loop Circuit TWI804192B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111589977.8 2021-12-23
CN202111589977.8A CN114337659A (en) 2021-12-23 2021-12-23 Digital phase-locked loop circuit

Publications (2)

Publication Number Publication Date
TWI804192B true TWI804192B (en) 2023-06-01
TW202327282A TW202327282A (en) 2023-07-01

Family

ID=81053732

Family Applications (1)

Application Number Title Priority Date Filing Date
TW111105475A TWI804192B (en) 2021-12-23 2022-02-15 Digital Phase Locked Loop Circuit

Country Status (2)

Country Link
CN (1) CN114337659A (en)
TW (1) TWI804192B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4829301A (en) * 1987-11-13 1989-05-09 Ford Aerospace & Communications Corporation Digital first order hold circuit
TW234805B (en) * 1991-11-23 1994-11-21 Philips Electronics Nv
US20080129351A1 (en) * 2006-05-15 2008-06-05 Stmicroelectronics Pvt. Ltd. Spread spectrum clock generation

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4829301A (en) * 1987-11-13 1989-05-09 Ford Aerospace & Communications Corporation Digital first order hold circuit
TW234805B (en) * 1991-11-23 1994-11-21 Philips Electronics Nv
US20080129351A1 (en) * 2006-05-15 2008-06-05 Stmicroelectronics Pvt. Ltd. Spread spectrum clock generation

Also Published As

Publication number Publication date
CN114337659A (en) 2022-04-12
TW202327282A (en) 2023-07-01

Similar Documents

Publication Publication Date Title
US9543970B2 (en) Circuit for digitizing phase differences, PLL circuit and method for the same
US6906562B1 (en) Counter-based clock multiplier circuits and methods
US5550515A (en) Multiphase clock synthesizer having a plurality of phase shifted inputs to a plurality of phase comparators in a phase locked loop
JP2994272B2 (en) Multi-phase clock generation circuit
WO2018126720A1 (en) Numerically-controlled oscillator and all-digital frequency-locked loop and phase-locked loop based on numerically-controlled oscillator
KR100214783B1 (en) Digital vco
JP5463246B2 (en) Phase synchronization circuit, CDR circuit, and reception circuit
US7375563B1 (en) Duty cycle correction using input clock and feedback clock of phase-locked-loop (PLL)
US6281759B1 (en) Digital frequency generation method and apparatus
US8891725B2 (en) Frequency divider with improved linearity for a fractional-N synthesizer using a multi-modulus prescaler
US7786782B2 (en) Method and apparatus for counter-based clock signal adaptation
US7496170B2 (en) Digitally controlled oscillator having enhanced control resolution
US20050073343A1 (en) Phase-locked loop circuit having phase lock detection function and method for detecting phase lock thereof
US5614869A (en) High speed divider for phase-locked loops
US20120326760A1 (en) Programmable duty cycle selection using incremental pulse widths
US5608354A (en) Phase-locked loop circuit obtaining the phase difference between time series pulse strings and a reference frequency
JP2006119123A (en) Phase difference detection device
US6906571B1 (en) Counter-based phased clock generator circuits and methods
US9685964B1 (en) Fast-locking frequency synthesizer
US7157953B1 (en) Circuit for and method of employing a clock signal
JP2004519958A (en) Baud rate generator with fractional divider
TWI804192B (en) Digital Phase Locked Loop Circuit
WO2021036775A1 (en) Signal generation circuit and method, and digital-to-time conversion circuit and method
KR20060010032A (en) Phase lock loop circuit having phase lock detecting function and method for detecting phase lock thereof
JP2001028542A (en) Pll circuit