[go: up one dir, main page]

CN112782473B - A frequency detection circuit and method - Google Patents

A frequency detection circuit and method Download PDF

Info

Publication number
CN112782473B
CN112782473B CN202011230915.3A CN202011230915A CN112782473B CN 112782473 B CN112782473 B CN 112782473B CN 202011230915 A CN202011230915 A CN 202011230915A CN 112782473 B CN112782473 B CN 112782473B
Authority
CN
China
Prior art keywords
variable capacitor
voltage
frequency
circuit
calibration
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202011230915.3A
Other languages
Chinese (zh)
Other versions
CN112782473A (en
Inventor
陈培炜
廖芳仁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lianen Microelectronics Co ltd
Original Assignee
Lianen Microelectronics Co ltd
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 Lianen Microelectronics Co ltd filed Critical Lianen Microelectronics Co ltd
Publication of CN112782473A publication Critical patent/CN112782473A/en
Application granted granted Critical
Publication of CN112782473B publication Critical patent/CN112782473B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R23/00Arrangements for measuring frequencies; Arrangements for analysing frequency spectra
    • G01R23/02Arrangements for measuring frequency, e.g. pulse repetition rate; Arrangements for measuring period of current or voltage
    • G01R23/04Arrangements for measuring frequency, e.g. pulse repetition rate; Arrangements for measuring period of current or voltage adapted for measuring in circuits having distributed constants
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R23/00Arrangements for measuring frequencies; Arrangements for analysing frequency spectra
    • G01R23/02Arrangements for measuring frequency, e.g. pulse repetition rate; Arrangements for measuring period of current or voltage
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/28Testing of electronic circuits, e.g. by signal tracer
    • G01R31/2832Specific tests of electronic circuits not provided for elsewhere
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/28Testing of electronic circuits, e.g. by signal tracer
    • G01R31/30Marginal testing, e.g. by varying supply voltage
    • G01R31/3004Current or voltage test
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/28Testing of electronic circuits, e.g. by signal tracer
    • G01R31/302Contactless testing
    • G01R31/312Contactless testing by capacitive methods
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R35/00Testing or calibrating of apparatus covered by the other groups of this subclass

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Measurement Of Resistance Or Impedance (AREA)
  • Semiconductor Integrated Circuits (AREA)
  • Amplifiers (AREA)

Abstract

The invention provides a frequency detection circuit and a frequency detection method, wherein during frequency detection, a constant current source outputs current to charge a variable capacitor for multiple periods. In the calibration mode, the capacitance value of the variable capacitor is adjusted according to the comparison result of the voltage across the variable capacitor and the reference voltage, so as to obtain a target capacitance value of the variable capacitor. In the monitoring mode, the operation frequency to be measured of the circuit to be measured is obtained according to the reference frequency and the voltage across the variable capacitor.

Description

一种频率侦测电路与方法A frequency detection circuit and method

技术领域Technical Field

本发明涉及一种频率侦测电路与方法,特别是一种可实时、动态侦测电路操作频率的适用于光纤收发器的频率侦测电路与方法。The present invention relates to a frequency detection circuit and method, in particular to a frequency detection circuit and method applicable to an optical fiber transceiver, which can detect the circuit operating frequency in real time and dynamically.

背景技术Background technique

数字数据在高速传输时可能容易出现噪声。因此,收发器通常需要频率数据恢复电路(Clock and Data Recovery Circuit,CDR),来重新产生低抖动频率以及回复出低噪声数据。所以,频率数据恢复电路对于数据和频率的传输与接收扮演重要角色。Digital data may be prone to noise when transmitted at high speed. Therefore, transceivers usually need a clock and data recovery circuit (CDR) to regenerate low-jitter frequency and restore low-noise data. Therefore, the clock and data recovery circuit plays an important role in the transmission and reception of data and frequency.

频率数据恢复电路所产生的频率最好能满足:1.频率频率必须和数据速率相同。2.频率和数据间必须要有正确的相位关系。3.频率本身必须要有小的抖动。The frequency generated by the frequency data recovery circuit should preferably meet the following requirements: 1. The frequency must be the same as the data rate. 2. There must be a correct phase relationship between the frequency and the data. 3. The frequency itself must have small jitter.

在使用频率数据恢复电路时,如果能够侦测出频率数据恢复电路的操作频率,对于后续操作将会有帮助When using a frequency data recovery circuit, it will be helpful for subsequent operations if the operating frequency of the frequency data recovery circuit can be detected.

发明内容Summary of the invention

本发明提出一种频率侦测电路与方法,可实时、动态侦测电路的操作频率。The present invention provides a frequency detection circuit and method, which can detect the operating frequency of the circuit in real time and dynamically.

根据本案一实施例,提出一种频率侦测电路,用以侦测一待测电路的一待测频率,该频率侦测电路包括:一误差放大器,用以比较一第一参考电压与一节点电压,并输出一第一比较结果;一电流镜,耦接于该误差放大器,根据该第一比较结果而输出一参考电流,其中,该参考电流用以产生该节点电压,且该电流镜更根据该参考电流而输出一输出电流;一可变电容,耦接至该电流镜,该电流镜的该输出电流对该可变电容进行充电;一比较器,耦接至该可变电容,用以比较一第二参考电压与该可变电容的一跨压以产生一第二比较结果;以及一控制电路,耦接至该比较器与该可变电容,该控制电路根据该比较器的该第二比较结果来输出一控制信号,以控制该可变电容的一电容值,该控制电路更重设该可变电容的该跨压,该控制电路接收一参考频率与该待测电路的该待测频率。于一校准模式下,该控制电路接收该参考频率,于多个校准周期内,该电流镜的该输出电流对该可变电容充电,于各该些校准周期结束时,该控制电路重设该可变电容的该跨压,于各该些校准周期结束时,该控制电路根据该比较器所输出的该第二比较结果来控制该控制信号以控制于一下一校准周期的该可变电容的该电容值。在该校准模式结束后,该控制电路决定该可变电容的一目标电容值。于一监测模式下,于一第一监测周期内,该控制电路接收该参考频率,于该第一监测周期结束时,测量该可变电容的该跨压为一第一跨压。于一第二监测周期内,该控制电路接收由该待测电路所提供的该待测频率,于该第二监测周期结束时,测量该可变电容的该跨压为一第二跨压,该控制电路根据该参考频率、该第一跨压与该第二跨压而决定该待测频率。According to an embodiment of the present case, a frequency detection circuit is provided for detecting a frequency to be measured of a circuit to be measured, and the frequency detection circuit includes: an error amplifier for comparing a first reference voltage with a node voltage and outputting a first comparison result; a current mirror coupled to the error amplifier and outputting a reference current according to the first comparison result, wherein the reference current is used to generate the node voltage, and the current mirror further outputs an output current according to the reference current; a variable capacitor coupled to the current mirror, and the output current of the current mirror charges the variable capacitor; a comparator coupled to the variable capacitor and comparing a second reference voltage with a voltage across the variable capacitor to generate a second comparison result; and a control circuit coupled to the comparator and the variable capacitor, the control circuit outputting a control signal according to the second comparison result of the comparator to control a capacitance value of the variable capacitor, the control circuit further resets the voltage across the variable capacitor, and the control circuit receives a reference frequency and the frequency to be measured of the circuit to be measured. In a calibration mode, the control circuit receives the reference frequency, and in a plurality of calibration cycles, the output current of the current mirror charges the variable capacitor. At the end of each of the calibration cycles, the control circuit resets the cross voltage of the variable capacitor. At the end of each of the calibration cycles, the control circuit controls the control signal according to the second comparison result output by the comparator to control the capacitance value of the variable capacitor in the next calibration cycle. After the calibration mode ends, the control circuit determines a target capacitance value of the variable capacitor. In a monitoring mode, in a first monitoring cycle, the control circuit receives the reference frequency, and at the end of the first monitoring cycle, the cross voltage of the variable capacitor is measured as a first cross voltage. In a second monitoring cycle, the control circuit receives the frequency to be measured provided by the circuit to be measured, and at the end of the second monitoring cycle, the cross voltage of the variable capacitor is measured as a second cross voltage. The control circuit determines the frequency to be measured according to the reference frequency, the first cross voltage and the second cross voltage.

根据本案另一实施例,提出一种频率侦测方法,用以侦测一待测电路的一待测频率。该频率侦测方法包括:比较一第一参考电压与一节点电压,并输出一第一比较结果;根据该第一比较结果而输出一参考电流,其中,该参考电流用以产生该节点电压,且更根据该参考电流而输出一输出电流;以该输出电流对该可变电容进行充电;比较一第二参考电压与该可变电容的一跨压以产生一第二比较结果;以及根据该第二比较结果来输出一控制信号,以控制该可变电容的一电容值,更重设该可变电容的该跨压。于一校准模式下,接收一参考频率,于多个校准周期内,该输出电流对该可变电容充电,于各该些校准周期结束时,重设该可变电容的该跨压,于各该些校准周期结束时,根据该第二比较结果来控制该控制信号以控制于一下一校准周期的该可变电容的该电容值。在该校准模式结束后,决定该可变电容的一目标电容值。于一监测模式下,于一第一监测周期内,接收该参考频率,于该第一监测周期结束时,测量该可变电容的该跨压为一第一跨压。于一第二监测周期内,接收该待测电路所提供的该待测频率,于该第二监测周期结束时,测量该可变电容的该跨压为一第二跨压,根据该参考频率、该第一跨压与该第二跨压而决定该待测频率。According to another embodiment of the present case, a frequency detection method is proposed to detect a frequency to be tested of a circuit to be tested. The frequency detection method includes: comparing a first reference voltage with a node voltage and outputting a first comparison result; outputting a reference current according to the first comparison result, wherein the reference current is used to generate the node voltage, and further outputting an output current according to the reference current; charging the variable capacitor with the output current; comparing a second reference voltage with a cross voltage of the variable capacitor to generate a second comparison result; and outputting a control signal according to the second comparison result to control a capacitance value of the variable capacitor and reset the cross voltage of the variable capacitor. In a calibration mode, a reference frequency is received, and in multiple calibration cycles, the output current charges the variable capacitor, and at the end of each of the calibration cycles, the cross voltage of the variable capacitor is reset, and at the end of each of the calibration cycles, the control signal is controlled according to the second comparison result to control the capacitance value of the variable capacitor in the next calibration cycle. After the calibration mode ends, a target capacitance value of the variable capacitor is determined. In a monitoring mode, the reference frequency is received in a first monitoring cycle, and at the end of the first monitoring cycle, the voltage across the variable capacitor is measured as a first voltage across the variable capacitor. In a second monitoring cycle, the frequency to be tested provided by the circuit to be tested is received, and at the end of the second monitoring cycle, the voltage across the variable capacitor is measured as a second voltage across the variable capacitor, and the frequency to be tested is determined according to the reference frequency, the first voltage across the variable capacitor, and the second voltage across the variable capacitor.

为了对本发明的上述及其他方面有更佳的了解,下文特举实施例,并配合所附图式详细说明。In order to better understand the above and other aspects of the present invention, embodiments are given below and described in detail with reference to the accompanying drawings.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1显示根据本案一示范性实施例的频率侦测电路的功能方块图。FIG. 1 shows a functional block diagram of a frequency detection circuit according to an exemplary embodiment of the present invention.

图2显示根据本案一示范性实施例的频率侦测电路操作于校准(calibration)模式下的波形图。FIG. 2 is a waveform diagram showing a frequency detection circuit operating in a calibration mode according to an exemplary embodiment of the present invention.

图3显示根据本案一示范性实施例的频率侦测电路操作于监测模式下的波形图。FIG. 3 is a waveform diagram showing a frequency detection circuit operating in a monitoring mode according to an exemplary embodiment of the present invention.

图4显示根据本案一示范性实施例的频率侦测方法的流程图。FIG. 4 is a flow chart showing a frequency detection method according to an exemplary embodiment of the present invention.

附图标记Reference numerals

100:频率侦测电路 50:待测电路100: Frequency detection circuit 50: Circuit to be tested

110:误差放大器 120:电流镜110: Error amplifier 120: Current mirror

R:电阻 C:可变电容R: resistance C: variable capacitance

130:比较器 140:控制电路130: Comparator 140: Control circuit

SW:开关 N1:节点SW: switch N1: node

T1-T7:周期T1-T7: Cycle

410-490:步骤410-490: Steps

具体实施方式Detailed ways

本说明书的技术用语系参照本技术领域的习惯用语,如本说明书对部分用语有加以说明或定义,该部分用语的解释是以本说明书的说明或定义为准。本揭露的各个实施例分别具有一或多个技术特征。在可能实施的前提下,本技术领域具有通常知识者可选择性地实施任一实施例中部分或全部的技术特征,或者选择性地将这些实施例中部分或全部的技术特征加以组合。The technical terms used in this specification refer to the customary terms in the technical field. If some terms are explained or defined in this specification, the interpretation of these terms shall be based on the explanation or definition in this specification. Each embodiment of the present disclosure has one or more technical features. Under the premise of possible implementation, a person with ordinary knowledge in the technical field can selectively implement some or all of the technical features in any embodiment, or selectively combine some or all of the technical features in these embodiments.

图1显示根据本案一示范性实施例的频率侦测电路的功能方块图。频率侦测电路100用以侦测待测电路50的操作频率。待测电路50例如可以是频率数据恢复电路(Clockand Data Recovery Circuit,CDR),但本案并不受限于此。1 shows a functional block diagram of a frequency detection circuit according to an exemplary embodiment of the present invention. The frequency detection circuit 100 is used to detect the operating frequency of the circuit under test 50. The circuit under test 50 may be, for example, a clock and data recovery circuit (CDR), but the present invention is not limited thereto.

频率侦测电路100包括:误差放大器(Error Amplifier,EA)110、电流镜120、电阻R、可变电容C、比较器130、控制电路140与开关SW。The frequency detection circuit 100 includes an error amplifier (EA) 110 , a current mirror 120 , a resistor R, a variable capacitor C, a comparator 130 , a control circuit 140 and a switch SW.

误差放大器110用以比较第一参考电压VREF1与节点N1的电压,其中,节点N1的电压可以表示为:VN1=IREF*R,IREF代表由电流镜120所输出的参考电流,R代表电阻R的电阻值(其为既定值)。误差放大器110的比较结果(也可以称为「第一比较结果」)可以输入至电流镜120,以调整由电流镜120所输出的参考电流IREF,亦即调整节点N1的电压VN1。藉由误差放大器110的操作,节点N1的电压VN1可以接近于第一参考电压VREF1,亦即,VREF=IREF*R,故而,由此可以推出,当节点N1的电压VN1接近于第一参考电压VREF1时,由电流镜120所输出的参考电流IREF可表示为:IREF=VREF/R。The error amplifier 110 is used to compare the first reference voltage VREF1 with the voltage of the node N1, wherein the voltage of the node N1 can be expressed as: VN1=IREF*R, IREF represents the reference current output by the current mirror 120, and R represents the resistance value of the resistor R (which is a predetermined value). The comparison result of the error amplifier 110 (also referred to as the "first comparison result") can be input to the current mirror 120 to adjust the reference current IREF output by the current mirror 120, that is, to adjust the voltage VN1 of the node N1. Through the operation of the error amplifier 110, the voltage VN1 of the node N1 can be close to the first reference voltage VREF1, that is, VREF=IREF*R. Therefore, it can be deduced that when the voltage VN1 of the node N1 is close to the first reference voltage VREF1, the reference current IREF output by the current mirror 120 can be expressed as: IREF=VREF/R.

电流镜120耦接于误差放大器110与电阻R。如上述般,当节点N1的电压VN1接近于第一参考电压VREF1时,由电流镜120所输出的参考电流IREF可表示为:IREF=VREF/R。电流镜120更输出一输出电流IOUT,该输出电流IOUT可表示为:IOUT=M*IREF,其中,参数M代表电流镜120的电流放大倍数。电流镜120的电路架构于此可不特别限定之。电流镜120亦可称为定电流源。The current mirror 120 is coupled to the error amplifier 110 and the resistor R. As described above, when the voltage VN1 of the node N1 is close to the first reference voltage VREF1, the reference current IREF output by the current mirror 120 can be expressed as: IREF=VREF/R. The current mirror 120 further outputs an output current IOUT, which can be expressed as: IOUT=M*IREF, where the parameter M represents the current amplification factor of the current mirror 120. The circuit architecture of the current mirror 120 is not particularly limited here. The current mirror 120 can also be called a constant current source.

电阻R耦接于误差放大器110与电流镜120,参考电流IREF流经电阻R。电阻R上的跨压即为节点N1的电压VN1。The resistor R is coupled to the error amplifier 110 and the current mirror 120 , and the reference current IREF flows through the resistor R. The voltage across the resistor R is the voltage VN1 of the node N1 .

可变电容C耦接至电流镜120。可变电容C可以是电容矩阵。在一充电时期内,电流镜120的输出电流IOUT可以对可变电容C进行充电,以提高可变电容C的跨压VOUT。当充电时期愈长,可变电容C的跨压VOUT自然愈高,反之亦然。另外,如果可变电容C的电容愈大,则可变电容C的跨压VOUT的上升/下降速度自然愈慢,反之亦然。在本案实施例中,可变电容C的跨压VOUT可由测量而得知。The variable capacitor C is coupled to the current mirror 120. The variable capacitor C can be a capacitor matrix. During a charging period, the output current IOUT of the current mirror 120 can charge the variable capacitor C to increase the voltage VOUT of the variable capacitor C. The longer the charging period, the higher the voltage VOUT of the variable capacitor C, and vice versa. In addition, if the capacitance of the variable capacitor C is larger, the rise/fall speed of the voltage VOUT of the variable capacitor C will naturally be slower, and vice versa. In the present embodiment, the voltage VOUT of the variable capacitor C can be measured.

比较器130耦接至可变电容C。比较器130用以比较第二参考电压VREF2与可变电容C的跨压VOUT以产生第二比较结果。比较器130的第二比较结果系输入至控制电路140。The comparator 130 is coupled to the variable capacitor C. The comparator 130 is used to compare the second reference voltage VREF2 with the voltage across the variable capacitor C VOUT to generate a second comparison result. The second comparison result of the comparator 130 is input to the control circuit 140 .

控制电路140耦接至比较器130与可变电容C。控制电路140根据比较器130的输出信号(亦即第二比较结果)来输出控制信号CTRL,以控制可变电容C的电容值。此外,控制电路140可以将重设信号RS输出给开关SW,以重设可变电容C的跨压VOUT。控制电路140接收参考频率FREF与待测频率FTEST。开关SW耦接至可变电容C与控制电路140。The control circuit 140 is coupled to the comparator 130 and the variable capacitor C. The control circuit 140 outputs a control signal CTRL according to the output signal of the comparator 130 (i.e., the second comparison result) to control the capacitance value of the variable capacitor C. In addition, the control circuit 140 can output a reset signal RS to the switch SW to reset the voltage VOUT of the variable capacitor C. The control circuit 140 receives a reference frequency FREF and a frequency to be measured FTEST. The switch SW is coupled to the variable capacitor C and the control circuit 140.

在底下,以控制信号CTRL为4位为例,但当知本案并不受限于此。可变电容C的电容值可表示为:C=CTRL*Cunit,其中,Cunit代表单位电容。当控制信号CTRL为[1111]时,可变电容C的电容值有最大值;当控制信号CTRL为[0000]时,可变电容C的电容值有最小值。其余可依此类推。所以,当控制信号CTRL增加时,可变电容C的电容值随之增加;反之亦然。Below, the control signal CTRL is taken as 4 bits as an example, but it should be known that the present case is not limited to this. The capacitance value of the variable capacitor C can be expressed as: C = CTRL * Cunit, where Cunit represents the unit capacitance. When the control signal CTRL is [1111], the capacitance value of the variable capacitor C has a maximum value; when the control signal CTRL is [0000], the capacitance value of the variable capacitor C has a minimum value. The rest can be deduced accordingly. Therefore, when the control signal CTRL increases, the capacitance value of the variable capacitor C increases accordingly; and vice versa.

开关SW受控于控制电路140。当控制电路140输出重设信号RS给开关SW时,开关SW为导通,以将可变电容C所储存的电压放电(亦即重设可变电容C的跨压VOUT)。The switch SW is controlled by the control circuit 140. When the control circuit 140 outputs a reset signal RS to the switch SW, the switch SW is turned on to discharge the voltage stored in the variable capacitor C (ie, to reset the voltage VOUT of the variable capacitor C).

图2显示根据本案一示范性实施例的频率侦测电路操作于校准(calibration)模式下的波形图。每一周期T1-T4(亦可称为校准周期T1-T4)的长度TREF=N/FREF(N为正整数),其中,FREF代表参考频率,该参考频率FREF可以由待测电路50所提供,或者由一外部参考信号源(未显示)所提供。FIG2 shows a waveform diagram of a frequency detection circuit operating in a calibration mode according to an exemplary embodiment of the present invention. The length of each period T1-T4 (also referred to as a calibration period T1-T4) is TREF=N/FREF (N is a positive integer), where FREF represents a reference frequency, which can be provided by the circuit under test 50 or by an external reference signal source (not shown).

如图2,于第一周期T1,令控制信号CTRL为[1000]。于充电时期TREF内,电流镜120的输出电流IOUT对可变电容C充电,使得可变电容C的跨压VOUT上升。于充电时期TREF结束时,控制电路140输出重设信号RS给开关SW,以重设可变电容C的跨压VOUT。于第一周期T1结束时,控制电路140可以根据比较器130的比较结果来输出控制信号CTRL给可变电容C,以控制下一周期T2的可变电容C的电容值。亦即,如果于第一周期T1结束时,可变电容C的跨压VOUT高于第二参考电压VREF2,则代表可变电容C的电容值较低。故而,于下一周期,控制电路140增加控制信号CTRL的值(例如从[1000]变为[1100]),以增加可变电容C的电容值,值得注意的是,本发明可视准确度需求而增加(或减少)数字控制信号CTRL的位数。相反地,如果于第一周期T1结束时,可变电容C的跨压VOUT低于第二参考电压VREF2,则代表可变电容C的电容值较高。故而,于下一周期,控制电路140降低控制信号CTRL的值(例如从[1000]变为[0111]),以降低可变电容C的电容值。As shown in FIG2 , in the first cycle T1, the control signal CTRL is set to [1000]. In the charging period TREF, the output current IOUT of the current mirror 120 charges the variable capacitor C, so that the voltage VOUT of the variable capacitor C increases. At the end of the charging period TREF, the control circuit 140 outputs a reset signal RS to the switch SW to reset the voltage VOUT of the variable capacitor C. At the end of the first cycle T1, the control circuit 140 can output the control signal CTRL to the variable capacitor C according to the comparison result of the comparator 130 to control the capacitance value of the variable capacitor C in the next cycle T2. That is, if the voltage VOUT of the variable capacitor C is higher than the second reference voltage VREF2 at the end of the first cycle T1, it means that the capacitance value of the variable capacitor C is lower. Therefore, in the next cycle, the control circuit 140 increases the value of the control signal CTRL (for example, from [1000] to [1100]) to increase the capacitance value of the variable capacitor C. It is worth noting that the present invention can increase (or decrease) the number of bits of the digital control signal CTRL according to the accuracy requirements. On the contrary, if the voltage VOUT of the variable capacitor C is lower than the second reference voltage VREF2 at the end of the first cycle T1, it means that the capacitance of the variable capacitor C is higher. Therefore, in the next cycle, the control circuit 140 reduces the value of the control signal CTRL (for example, from [1000] to [0111]) to reduce the capacitance of the variable capacitor C.

以图2为例,于第一周期T1结束后,可变电容C的跨压VOUT高于第二参考电压VREF2(代表可变电容C的电容值较低)。于下一周期T2,控制电路140增加控制信号CTRL的值(从[1000]变为[1100]),以增加可变电容C的电容值。Taking FIG. 2 as an example, after the first cycle T1 ends, the voltage VOUT of the variable capacitor C is higher than the second reference voltage VREF2 (indicating that the capacitance value of the variable capacitor C is lower). In the next cycle T2, the control circuit 140 increases the value of the control signal CTRL (from [1000] to [1100]) to increase the capacitance value of the variable capacitor C.

同样地,以图2为例,于第二周期T2结束后,可变电容C的跨压VOUT低于第二参考电压VREF2(代表可变电容C的电容值较高)。于下一周期T3,控制电路140降低控制信号CTRL的值(从[1100]变为[1010]),以降低可变电容C的电容值。Similarly, taking FIG. 2 as an example, after the second cycle T2 ends, the voltage VOUT of the variable capacitor C is lower than the second reference voltage VREF2 (indicating that the capacitance value of the variable capacitor C is higher). In the next cycle T3, the control circuit 140 reduces the value of the control signal CTRL (from [1100] to [1010]) to reduce the capacitance value of the variable capacitor C.

同样地,以图2为例,于第三周期T3结束后,可变电容C的跨压VOUT高于第二参考电压VREF2(代表可变电容C的电容值较低)。于下一周期T4,控制电路140降低控制信号CTRL的值(从[1010]变为[1011]),以降低可变电容C的电容值。Similarly, taking FIG. 2 as an example, after the third cycle T3 ends, the voltage VOUT of the variable capacitor C is higher than the second reference voltage VREF2 (indicating that the capacitance value of the variable capacitor C is lower). In the next cycle T4, the control circuit 140 reduces the value of the control signal CTRL (from [1010] to [1011]) to reduce the capacitance value of the variable capacitor C.

经过4个周期后,可变电容C的跨压VOUT已较接近第二参考电压VREF2,代表可变电容C的电容值已接近于目标值CREF,其中,VOUT=(IOUT*TREF)/CREF,故而,CREF=(IOUT*TREF)/VOUT。After 4 cycles, the voltage VOUT of the variable capacitor C is closer to the second reference voltage VREF2, which means that the capacitance of the variable capacitor C is close to the target value CREF, wherein VOUT=(IOUT*TREF)/CREF, therefore, CREF=(IOUT*TREF)/VOUT.

亦即,在校准模式下,用以决定可变电容C的目标电容值(亦即,决定控制信号CTRL的值)。当决定好可变电容C的目标电容值后,频率侦测电路可从校准模式进入监测(monitor)模式。其中,于监测模式下,可变电容C的电容值相同于校准模式下的最后一个周期的可变电容C的电容值。一实施例中,本发明可以视需求,选择性地再进行几轮4个周期的量测循环。That is, in the calibration mode, the target capacitance value of the variable capacitor C is determined (that is, the value of the control signal CTRL is determined). After the target capacitance value of the variable capacitor C is determined, the frequency detection circuit can enter the monitoring mode from the calibration mode. In the monitoring mode, the capacitance value of the variable capacitor C is the same as the capacitance value of the variable capacitor C in the last cycle in the calibration mode. In one embodiment, the present invention can selectively perform several more rounds of 4-cycle measurement cycles as needed.

图3显示根据本案一示范性实施例的频率侦测电路操作于监测模式下的波形图。在图3中,于周期T5(周期T5也可称为第一监测周期)内,控制电路140接收参考频率FREF,以据以控制周期T5长度为TREF=N/FREF(N为正整数)。于周期T5结束后,测量可变电容C的跨压VOUT(将其值表示为VOUT_REF,或称为第一跨压),并重设之。FIG3 shows a waveform diagram of a frequency detection circuit operating in a monitoring mode according to an exemplary embodiment of the present invention. In FIG3, during period T5 (period T5 may also be referred to as a first monitoring period), the control circuit 140 receives a reference frequency FREF to control the length of period T5 to TREF=N/FREF (N is a positive integer). After period T5 ends, the voltage VOUT of the variable capacitor C is measured (its value is represented as VOUT_REF, or referred to as the first voltage) and reset.

于周期T6(周期T6也可称为第二监测周期)时,控制电路140接收由待测电路50所提供的待测频率FTEST,以据以控制周期T6长度为TTEST=N/FTEST(N为正整数)。于周期T6结束后,测量可变电容C的跨压VOUT(将其值表示为VOUT_TEST,或称为第二跨压),并重设之。During period T6 (period T6 may also be referred to as the second monitoring period), the control circuit 140 receives the test frequency FTEST provided by the test circuit 50, and controls the length of period T6 to be TTEST=N/FTEST (N is a positive integer). After period T6 ends, the voltage VOUT of the variable capacitor C is measured (its value is represented as VOUT_TEST, or referred to as the second voltage), and reset.

在监测模式下,由于可变电容C的电容值已为固定且已知,且电流镜120的输出电流IOUT也为固定且已知,故而,可变电容C的跨压VOUT将正比于周期长度,也就是说,VOUT_TEST/VOUT_REF=TTEST/TREF。由于TREF=N/FREF且TTEST=N/FTEST,所以推论出VOUT_TEST/VOUT_REF=FREF/FTEST。故而,待测频率FTEST可以表示为:FTEST=FREF/(VOUT_TEST/VOUT_REF)。In the monitoring mode, since the capacitance of the variable capacitor C is fixed and known, and the output current IOUT of the current mirror 120 is also fixed and known, the voltage VOUT across the variable capacitor C will be proportional to the cycle length, that is, VOUT_TEST/VOUT_REF=TTEST/TREF. Since TREF=N/FREF and TTEST=N/FTEST, it can be deduced that VOUT_TEST/VOUT_REF=FREF/FTEST. Therefore, the frequency to be measured FTEST can be expressed as: FTEST=FREF/(VOUT_TEST/VOUT_REF).

如图3所示,如果需要的话,在监测模式下,可以实时监测待测电路50的操作频率(如周期T7所示)。As shown in FIG. 3 , if necessary, in the monitoring mode, the operating frequency of the circuit under test 50 can be monitored in real time (as shown in period T7 ).

由上述可知,在本案实施例中,于校准模式下,决定可变电容C的电容值。于监测模式,则可以侦测待测电路50的操作频率。As can be seen from the above, in the present embodiment, in the calibration mode, the capacitance value of the variable capacitor C is determined. In the monitoring mode, the operating frequency of the circuit under test 50 can be detected.

图4显示根据本案一示范性实施例的频率侦测方法的流程图。于步骤410中,比较一第一参考电压与一节点电压,并输出一第一比较结果。于步骤420中,根据该第一比较结果而输出一参考电流,其中,该参考电流用以产生该节点电压,且更根据该参考电流而输出一输出电流。于步骤430中,以该输出电流对该可变电容进行充电。于步骤440中,比较一第二参考电压与该可变电容的一跨压以产生一第二比较结果。于步骤450中,根据该第二比较结果来输出一控制信号,以控制该可变电容的一电容值,更重设该可变电容的该跨压。于步骤460中,于一校准模式下,接收一参考频率,于复数个校准周期内,该输出电流对该可变电容充电,于各该些校准周期结束时,重设该可变电容的该跨压,于各该些校准周期结束时,根据该第二比较结果来控制该控制信号以控制于一下一校准周期的该可变电容的该电容值。于步骤470中,在该校准模式结束后,决定该可变电容的一目标电容值。于步骤480中,于一监测模式下,于一第一监测周期内,接收该参考频率,于该第一监测周期结束时,测量该可变电容的该跨压为一第一跨压。于步骤490中,于一第二监测周期内,接收该待测电路所提供的该待测频率,于该第二监测周期结束时,测量该可变电容的该跨压为一第二跨压,根据该参考频率、该第一跨压与该第二跨压而决定该待测频率。FIG4 shows a flow chart of a frequency detection method according to an exemplary embodiment of the present invention. In step 410, a first reference voltage is compared with a node voltage, and a first comparison result is output. In step 420, a reference current is output according to the first comparison result, wherein the reference current is used to generate the node voltage, and an output current is output according to the reference current. In step 430, the variable capacitor is charged with the output current. In step 440, a second reference voltage is compared with a cross-voltage of the variable capacitor to generate a second comparison result. In step 450, a control signal is output according to the second comparison result to control a capacitance value of the variable capacitor and reset the cross-voltage of the variable capacitor. In step 460, in a calibration mode, a reference frequency is received, and in a plurality of calibration cycles, the output current charges the variable capacitor, and at the end of each of the calibration cycles, the cross-voltage of the variable capacitor is reset, and at the end of each of the calibration cycles, the control signal is controlled according to the second comparison result to control the capacitance value of the variable capacitor in the next calibration cycle. In step 470, after the calibration mode ends, a target capacitance value of the variable capacitor is determined. In step 480, in a monitoring mode, in a first monitoring cycle, the reference frequency is received, and at the end of the first monitoring cycle, the cross-voltage of the variable capacitor is measured as a first cross-voltage. In step 490, in a second monitoring cycle, the frequency to be measured provided by the circuit to be measured is received, and at the end of the second monitoring cycle, the cross-voltage of the variable capacitor is measured as a second cross-voltage, and the frequency to be measured is determined according to the reference frequency, the first cross-voltage and the second cross-voltage.

此外,于本案实施例中,第一参考电压VREF1与第二参考电压VREF2可以是分压的关系。In addition, in the present embodiment, the first reference voltage VREF1 and the second reference voltage VREF2 may be in a voltage-dividing relationship.

本案实施例揭露一种可自动感测电路操作频率的频率侦测电路及其方法,适用于光纤收发器等需要侦测电路操作频率的装置。本案实施例利用电流乘上充电时间等于电容电压的基本原理,对该可变电容进行多周期的充放电程序,且根据预先设好的特定条件,以得到待测电路的操作频率。The present embodiment discloses a frequency detection circuit and method that can automatically sense the operating frequency of a circuit, which is applicable to devices such as optical fiber transceivers that need to detect the operating frequency of a circuit. The present embodiment uses the basic principle that current multiplied by charging time equals capacitor voltage to perform a multi-cycle charging and discharging process on the variable capacitor, and obtains the operating frequency of the circuit to be tested according to pre-set specific conditions.

综上所述,虽然本发明已以实施例揭露如上,然其并非用以限定本发明。本发明所属技术领域中具有通常知识者,在不脱离本发明的精神和范围内,当可作各种的更动与润饰。因此,本发明的保护范围当视后附的权利要求所界定者为准。In summary, although the present invention has been disclosed by way of embodiments, it is not intended to limit the present invention. A person skilled in the art of the present invention may make various modifications and alterations without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be determined by the following claims.

Claims (9)

1. A frequency detection circuit for detecting a frequency to be detected of a circuit to be detected, the frequency detection circuit comprising:
an error amplifier for comparing a first reference voltage with a node voltage and outputting a first comparison result;
A current mirror coupled to the error amplifier for outputting a reference current according to the first comparison result, wherein the reference current is used for generating the node voltage, and the current mirror outputs an output current according to the reference current;
A variable capacitor coupled to the current mirror, the output current of the current mirror charging the variable capacitor;
A comparator coupled to the variable capacitor for comparing a second reference voltage with a voltage across the variable capacitor to generate a second comparison result; and
The control circuit is coupled to the comparator and the variable capacitor, outputs a control signal according to the second comparison result of the comparator so as to control a capacitance value of the variable capacitor, resets the voltage across the variable capacitor, and receives a reference frequency and the frequency to be measured of the circuit to be measured;
Wherein,
In a calibration mode, the control circuit receives the reference frequency, the output current of the current mirror charges the variable capacitor in a plurality of calibration periods, the control circuit resets the voltage across the variable capacitor when each calibration period is finished, and the control circuit controls the control signal according to the second comparison result output by the comparator to control the capacitance value of the variable capacitor in the next calibration period when each calibration period is finished;
After the calibration mode is finished, the control circuit determines a target capacitance value of the variable capacitor;
In a monitoring mode, the control circuit receives the reference frequency in a first monitoring period, and measures the voltage across the variable capacitor as a first voltage across the variable capacitor at the end of the first monitoring period; and
In a second monitoring period, the control circuit receives the frequency to be detected provided by the circuit to be detected, and measures the voltage across the variable capacitor as a second voltage across the variable capacitor at the end of the second monitoring period, and the control circuit determines the frequency to be detected according to the reference frequency, the first voltage across the variable capacitor and the second voltage across the variable capacitor.
2. The frequency detection circuit of claim 1, further comprising:
the resistor is coupled to the current mirror, the reference current flows through the resistor, and a voltage across the resistor is the node voltage; and
And a switch coupled to the variable capacitor and the control circuit, wherein the control circuit outputs a reset signal to the switch to reset the voltage across the variable capacitor when each calibration period is completed.
3. The frequency detection circuit of claim 1, wherein, in the calibration mode,
At the end of each calibration period, if the voltage across the variable capacitor is higher than the second reference voltage, the control circuit increases the control signal to increase the capacitance value of the variable capacitor in the next calibration period; and
At the end of each calibration period, if the voltage across the variable capacitor is lower than the second reference voltage, the control circuit decreases the control signal to decrease the capacitance value of the variable capacitor in the next calibration period.
4. The frequency detection circuit of claim 1, wherein the first reference voltage and the second reference voltage are in a divided relationship.
5. The frequency detection circuit of claim 1, wherein the reference frequency is provided by the circuit under test or by an external reference signal source.
6. A frequency detection method for detecting a frequency to be detected of a circuit to be detected, the frequency detection method comprising:
Comparing a first reference voltage with a node voltage and outputting a first comparison result;
Outputting a reference current according to the first comparison result, wherein the reference current is used for generating the node voltage, and outputting an output current according to the reference current;
Charging a variable capacitance with the output current;
comparing a second reference voltage with a voltage across the variable capacitor to generate a second comparison result; and
Outputting a control signal according to the second comparison result to control a capacitance value of the variable capacitor and reset the voltage across the variable capacitor;
Wherein,
In a calibration mode, receiving a reference frequency, charging the variable capacitor by the output current in a plurality of calibration periods, resetting the voltage across the variable capacitor when each calibration period is finished, and controlling the control signal according to the second comparison result to control the capacitance value of the variable capacitor in a next calibration period when each calibration period is finished;
after the calibration mode is finished, determining a target capacitance value of the variable capacitor;
in a monitoring mode, the reference frequency is received in a first monitoring period, and the voltage across the variable capacitor is measured as a first voltage across the variable capacitor at the end of the first monitoring period; and
And in a second monitoring period, receiving the frequency to be detected provided by the circuit to be detected, and measuring the voltage across the variable capacitor to be a second voltage across the variable capacitor when the second monitoring period is finished, and determining the frequency to be detected according to the reference frequency, the first voltage across the variable capacitor and the second voltage across the variable capacitor.
7. The method of claim 6, wherein, in the calibration mode,
At the end of each calibration period, if the voltage across the variable capacitor is higher than the second reference voltage, increasing the control signal to increase the capacitance of the variable capacitor in the next calibration period; and
At the end of each calibration period, if the voltage across the variable capacitor is lower than the second reference voltage, the control signal is lowered to lower the capacitance value of the variable capacitor in the next calibration period.
8. The method of claim 6, wherein the first reference voltage and the second reference voltage are in a voltage division relationship.
9. The method of claim 6, wherein the reference frequency is provided by the circuit under test or by an external reference signal source.
CN202011230915.3A 2019-11-07 2020-11-06 A frequency detection circuit and method Active CN112782473B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
TW108140519 2019-11-07
TW108140519A TWI736009B (en) 2019-11-07 2019-11-07 Frequency detection circuit and method

Publications (2)

Publication Number Publication Date
CN112782473A CN112782473A (en) 2021-05-11
CN112782473B true CN112782473B (en) 2024-07-23

Family

ID=75750397

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011230915.3A Active CN112782473B (en) 2019-11-07 2020-11-06 A frequency detection circuit and method

Country Status (3)

Country Link
US (1) US11327098B2 (en)
CN (1) CN112782473B (en)
TW (1) TWI736009B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11868173B2 (en) * 2021-08-19 2024-01-09 Marvell Asia Pte Ltd Wireline transceiver with internal and external clock generation
TWI850742B (en) * 2022-08-24 2024-08-01 立錡科技股份有限公司 Electronic device and monitoring method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008079274A (en) * 2006-09-20 2008-04-03 Analog Integrations Corp Frequency comparator, frequency synthesizer, and associated method
CN103873048A (en) * 2014-03-12 2014-06-18 无锡中科微电子工业技术研究院有限责任公司 On-chip RC oscillator with frequency self correction function and frequency self correction method

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6753738B1 (en) * 2001-06-25 2004-06-22 Silicon Laboratories, Inc. Impedance tuning circuit
US6731145B1 (en) * 2002-08-09 2004-05-04 Rf Micro Devices, Inc. Phase-locked loop having loop gain and frequency response calibration
US7081789B2 (en) * 2003-12-24 2006-07-25 Telefonaktiebolaget Lm Erisson (Publ) Switched capacitor circuit compensation apparatus and method
US7679463B2 (en) * 2004-03-22 2010-03-16 Mobius Microsystems, Inc. Multi-terminal harmonic oscillator integrated circuit with frequency calibration and frequency configuration
US7411381B2 (en) * 2006-06-02 2008-08-12 Broadcom Corporation Circuit calibration using a time constant
US7477098B2 (en) * 2007-02-08 2009-01-13 Mediatek Singapore Pte Ltd Method and apparatus for tuning an active filter
US20080191794A1 (en) * 2007-02-08 2008-08-14 Mediatek Inc. Method and apparatus for tuning an active filter
JP2010246192A (en) * 2009-04-01 2010-10-28 Fujitsu Semiconductor Ltd Power supply device, power supply device control circuit, and power supply device control method
TWI473425B (en) * 2012-02-13 2015-02-11 Novatek Microelectronics Corp Rc calibration circuit without current mismatch
CN107196530A (en) * 2016-03-14 2017-09-22 恩智浦有限公司 Load current is measured
US10386882B2 (en) * 2017-04-14 2019-08-20 Allegro Microsystems, Llc Control circuit
TWI750357B (en) * 2018-03-23 2021-12-21 力智電子股份有限公司 Current mirror calibration circuit and current mirror calibration method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008079274A (en) * 2006-09-20 2008-04-03 Analog Integrations Corp Frequency comparator, frequency synthesizer, and associated method
CN103873048A (en) * 2014-03-12 2014-06-18 无锡中科微电子工业技术研究院有限责任公司 On-chip RC oscillator with frequency self correction function and frequency self correction method

Also Published As

Publication number Publication date
US11327098B2 (en) 2022-05-10
TW202119045A (en) 2021-05-16
TWI736009B (en) 2021-08-11
US20210141008A1 (en) 2021-05-13
CN112782473A (en) 2021-05-11

Similar Documents

Publication Publication Date Title
CN110249534B (en) Asynchronous SAR ADC with slew rate control feedback loop
CN112782473B (en) A frequency detection circuit and method
US8749224B2 (en) Voltage detection circuit and method for controlling the same
US9201119B2 (en) Battery fuel gauge
CN101242164A (en) Method and apparatus for tuning an active filter
US9651596B2 (en) System and apparatus for measuring capacitance
US20080191794A1 (en) Method and apparatus for tuning an active filter
US10732210B2 (en) Sensor and method of sensing a value of a parameter
US8816888B2 (en) Ad conversion circuit, semiconductor device, and ad conversion method
JPWO2011122365A1 (en) Semiconductor integrated circuit aging deterioration diagnosis circuit and aging deterioration diagnosis method
US8373487B1 (en) True RMS power measurement
TWI449313B (en) Signal peak detector and method and control ic and control method for a pfc converter
JP2010287860A (en) Semiconductor integrated circuit device
US8552753B2 (en) Circuits and methods for sensing resistance
CN115480234A (en) Voltage calibration method, circuit, laser radar system and storage medium
KR101223953B1 (en) Self Temperature Compensated Precision Event timer using Standard Time reference Frequency
US10340957B2 (en) Methods and devices for monitoring optical signals
TWI726753B (en) Rapid sensing value estimation circuit and method thereof
JP4686551B2 (en) Offset correction in feedback system for voltage controlled oscillator
US20090157340A1 (en) Method and system for yield enhancement
CN113608111A (en) System for accurately detecting input signal amplitude
KR20230001463A (en) Internal voltage generation circuit
WO2024067590A1 (en) Capacitance measurement method based on delay phase-locked loop and capacitance measurement circuit
US20250007395A1 (en) Multi-mode voltage regulator voltage feedback loop
KR102763362B1 (en) Wideband Frequency Modulators

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant