Capture circuit and micro-processing chip

By adjusting the delay time of the capture delay line using the oscillator delay line and the phase detection unit in the capture circuit, the problem of uncontrollable delay time of the capture delay line is solved, which improves the measurement accuracy and reduces the circuit complexity.

CN222073126UActive Publication Date: 2024-11-26GEEHY SEMICON CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202420425046.7
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2024-03-05
Publication Date
2024-11-26
Estimated Expiration
2034-03-05

AI Technical Summary

Technical Problem

The quality problems of the capture delay components in the existing capture delay lines or external environmental interferences cause the delay time to be uncontrollable, affecting the measurement accuracy.

Method used

Using a capture circuit including an oscillator delay line and two capture delay lines of different lengths, the clock signal is provided through the oscillator delay line, and the delay time of the capture delay line is adjusted by using the phase detection unit and the loop filtering unit to ensure a stable delay time. and high-precision measurements.

Benefits of technology

The stability of the delay time of the delay line and the high accuracy of pulse width measurement are achieved, which avoids the phenomenon of error locking and reduces the circuit cost and complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN222073126U_ABST
    Figure CN222073126U_ABST
Patent Text Reader

Abstract

The utility model provides a capture circuit and a micro-processing chip, and the capture circuit comprises a first circuit which comprises N first delay devices and a logic gate; the second circuit comprises A second delay devices; the third circuit comprises B second delay devices; the phase detection unit is used for detecting a first propagation state of the first clock signal passing through the second circuit and outputting a first control signal or a second control signal; and / or, detecting a second propagation state of a second clock signal passing through a third circuit, and outputting a third control signal or a fourth control signal; the loop filtering unit is used for controlling the second circuit to reduce or increase the delay when the first control signal or the second control signal is received; and / or when the third control signal or the fourth control signal is received, the third circuit is controlled to reduce or increase the delay. According to the embodiment of the invention, it can be ensured that the capture delay line has stable delay duration, and the capture delay line is prevented from being locked mistakenly.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic technology, and in particular to a capture circuit and a microprocessor chip. Background Art

[0002] In a large number of industrial and consumer devices and instruments, it is generally necessary to measure signals such as voltage, current, capacitance, speed, and distance. The measurement accuracy directly affects the accuracy of the equipment and instruments. High-precision digital pulse signal width measurement is widely used in pulse sequence period / duty cycle measurement, instantaneous speed measurement, voltage measurement across isolation boundaries, distance / sonar measurement and scanning, capacitive touch perception and other applications in precision instruments, sonar, robot servo, switching power supply, power devices, touch screens and other equipment.

[0003] In digital signal processing devices, signal measurement generally involves first quantizing signals such as voltage, capacitance, speed, and distance into digital pulse signals (referred to as "pulse signals") through analog-to-digital conversion, and then measuring the pulse signals. Specifically, the measurement of pulse signal width uses a sampling clock (frequency is f) and a clock cycle of a sampling clock as the reference unit to express the width of a pulse signal as a real number containing an integer part and a decimal part. The decimal part is caused by the misalignment of the edge of the pulse signal with the edge of the sampling clock, and comes from the head and tail of the pulse signal. The relationship between the width λ of the pulse signal and f, μ, α, and β is: λ = (μ + 1-α-β) × 1 / f. μ is the integer part and 1-α-β is the decimal part.

[0004] The measurement accuracy of traditional digital signal measurement circuits is 1 / f, the clock period of a sampling clock. It can only measure the integer part μ of the width λ of the pulse signal, but cannot measure the fractional part 1-α-β of the width of the pulse signal. To improve the measurement accuracy, the clock frequency of the sampling clock can only be increased, which greatly increases the power consumption and complexity of the hardware circuit.

[0005] In view of the above problems, a capture circuit is provided in the prior art, including an oscillator delay line and a capture delay line. The oscillator delay line includes a plurality of timing delay units and logic gates, and the plurality of timing delay elements and logic gates are coupled in sequence into a ring to generate a clock signal. The capture delay line includes a plurality of capture delay elements coupled in sequence, and two signal paths are formed in the plurality of capture delay elements, wherein one signal path is used to transmit the clock signal in a first direction, and the other signal path is used to transmit the signal to be detected in a second direction opposite to the first direction. Each capture delay element forms a trigger and provides a one-bit output. According to the output signals of the plurality of capture delay elements, the position where the clock signal and the signal to be detected meet in the capture delay line can be determined, thereby realizing pulse width measurement.

[0006] Theoretically, the capture delay line has a fixed delay time. However, due to the quality of the capture delay element in the capture delay line or interference from the external environment, the delay time of the capture delay line is uncontrollable, which in turn affects the measurement accuracy. It should be pointed out that the information disclosed in the background technology section of this application is only intended to deepen the understanding of the general background technology of this application, and should not be regarded as an admission or in any form of implication that the information constitutes prior art known to those skilled in the art. Utility Model Content

[0007] The present application provides a capture circuit and a microprocessor chip to solve the problem in the prior art that the delay time of the capture delay line is uncontrollable due to the quality of the capture delay element in the capture delay line or interference from the external environment, thereby affecting the measurement accuracy.

[0008] In a first aspect, an embodiment of the present application provides a capture circuit, characterized in that it includes:

[0009] A first circuit, the first circuit comprising N first delay devices and logic gates, wherein the N first delay devices and logic gates are sequentially coupled to form a ring;

[0010] a second circuit, the second circuit comprising A second delay devices coupled in sequence to transmit a first clock signal generated according to the first circuit in a first direction along a first signal path, and transmit a signal to be detected in a second direction opposite to the first direction along a second signal path, A≥2;

[0011] a third circuit, the third circuit comprising B second delay devices coupled in sequence to transmit a second clock signal generated according to the first circuit along a third signal path in the first direction, and to transmit a signal to be detected along a fourth signal path in the second direction, B≥2, N=A+B;

[0012] a phase detection unit, configured to detect a first propagation state of the first clock signal through the second circuit, and output a first control signal or a second control signal according to the first propagation state; and / or to detect a second propagation state of the second clock signal through the third circuit, and output a third control signal or a fourth control signal according to the second propagation state;

[0013] a loop filter unit, configured to control the second circuit to reduce delay when receiving a first control signal output by the phase detection unit, and control the second circuit to increase delay when receiving a second control signal output by the phase detection unit; and / or control the third circuit to reduce delay when receiving a third control signal output by the phase detection unit, and control the third circuit to increase delay when receiving a fourth control signal output by the phase detection unit;

[0014] Wherein, when the first propagation state indicates that the delay of the second circuit is longer than the first delay expectation, the first control signal is output, and when the first propagation state indicates that the delay of the second circuit is shorter than the first delay expectation, the second control signal is output; and / or, when the second propagation state indicates that the delay of the third circuit is longer than the second delay expectation, the third control signal is output, and when the second propagation state indicates that the delay of the third circuit is shorter than the second delay expectation, the fourth control signal is output.

[0015] In other parts of this article, the first circuit may also be referred to as an "oscillator delay line"; the second circuit may also be referred to as a "first capture delay line"; the third circuit may also be referred to as a "second capture delay line"; the first delay device may also be referred to as a "timing delay element"; and the second delay device may also be referred to as a "capture delay element."

[0016] In a possible implementation, the loop filtering unit includes:

[0017] A first loop filter, the first loop filter comprising a first capacitor module, a first end of the first capacitor module being electrically connected to the control ends of the A second delay devices of the second circuit respectively, a second end of the first capacitor module being grounded, and the first loop filter being used for:

[0018] When receiving the first control signal output by the phase detection unit, controlling the first capacitor module to charge so that the second circuit reduces the delay;

[0019] When the second control signal output by the phase detection unit is received, the first capacitor module is controlled to discharge so that the second circuit increases the delay.

[0020] In a possible implementation manner, the first capacitor module includes a plurality of capacitors connected in parallel.

[0021] In a possible implementation, the loop filtering unit includes:

[0022] A second loop filter, the second loop filter comprising a second capacitor module, a first end of the second capacitor module being electrically connected to the control ends of the B second delay devices of the third circuit respectively, a second end of the second capacitor module being grounded, and the second loop filter being used for:

[0023] When receiving a third control signal output by the phase detection unit, controlling the second capacitor module to charge so that the third circuit reduces delay;

[0024] When the fourth control signal output by the phase detection unit is received, the second capacitor module is controlled to discharge, so that the third circuit increases the delay.

[0025] In a possible implementation manner, the second capacitor module includes a plurality of capacitors connected in parallel.

[0026] In a possible implementation, the phase detection unit includes:

[0027] a first phase detector, configured to detect a first propagation state of the first clock signal through the second circuit, and output a first control signal or a second control signal according to the first propagation state;

[0028] and / or,

[0029] The second phase detector is used to detect a second propagation state of the second clock signal through the third circuit, and output a third control signal or a fourth control signal according to the second propagation state.

[0030] In a possible implementation manner, the first phase detector is specifically configured to:

[0031] receiving a plurality of first delayed signals outputted from first output terminals of a plurality of second delay devices in the second circuit;

[0032] comparing the plurality of the first delayed signals with a first reference clock signal to determine a first propagation state of the second circuit;

[0033] outputting a first control signal or a second control signal according to the first propagation state;

[0034] The first output end is an output end for transmitting signals along the first direction.

[0035] In a possible implementation manner, the second phase detector is specifically configured to:

[0036] receiving a plurality of second delayed signals outputted from first output terminals of a plurality of second delay devices in the third circuit;

[0037] comparing the plurality of the second delayed signals with a second reference clock signal to determine a second propagation state of the third circuit;

[0038] outputting a third control signal or a fourth control signal according to the second propagation state;

[0039] The first output end is an output end for transmitting signals along the first direction.

[0040] In a possible implementation, the first delay is expected to be (A / N)*T, and the second delay is expected to be (B / N)*T, where T is a clock period of the first clock signal or the second clock signal.

[0041] In a second aspect, an embodiment of the present application provides a microprocessor chip, characterized in that it includes the capture circuit described in any one of the first aspects.

[0042] In the embodiment of the present application, the phase detection unit is used to detect the propagation state of the clock signal through the capture delay line and output a control signal according to the propagation state. The loop filter unit can adjust the delay time of the capture delay line according to the control signal, thereby ensuring that the capture delay line has a stable delay time and improving the measurement accuracy of the pulse width.

[0043] In addition, since the phase detection unit can detect the propagation state of the clock signal through the capture delay line, it is possible to avoid the capture delay line from being falsely locked. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0045] Figure 1 A schematic diagram of the structure of a capture delay element provided in an embodiment of the present application;

[0046] Figure 2 A schematic diagram of the structure of a capture delay line provided in an embodiment of the present application;

[0047] Figure 3 A schematic diagram of the structure of a timing delay element provided in an embodiment of the present application;

[0048] Figure 4 A schematic diagram of the structure of an oscillator delay line provided in an embodiment of the present application;

[0049] Figure 5 A schematic diagram of the structure of a capture circuit provided in an embodiment of the present application;

[0050] Figure 6 A timing diagram of a clock signal provided in an embodiment of the present application;

[0051] Figure 7 A schematic diagram of the structure of another capture circuit provided in an embodiment of the present application;

[0052] Figure 8 To adopt Figure 7 The signal timing diagram of the capture circuit for edge detection shown;

[0053] Fig. 9 A schematic diagram of the structure of another capture circuit provided in an embodiment of the present application;

[0054] Fig.10 A schematic diagram of the structure of another capture circuit provided in an embodiment of the present application;

[0055] Fig.11 A schematic diagram of the structure of another capture circuit provided in an embodiment of the present application;

[0056] Fig.12 To adopt Fig.11 The signal timing diagram of the capture circuit for edge detection shown;

[0057] Fig.13 A schematic diagram of the structure of another capture circuit provided in an embodiment of the present application;

[0058] Fig.14 A schematic diagram of the structure of a microprocessor chip provided in an embodiment of the present application. DETAILED DESCRIPTION

[0059] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0060] It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0061] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0062] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0063] See also Figure 1 , is a schematic diagram of the structure of a capture delay element provided in an embodiment of the present application. Figure 1As shown, the capture delay element 100 includes a first NAND gate 110, a second NAND gate 120, a third NAND gate 130 and a fourth NAND gate 140. The first input terminal 111 of the first NAND gate 110 is used to receive a first signal transmitted in a first direction (from right to left), such as a clock signal; the first input terminal 121 of the second NAND gate 120 is electrically connected to the output terminal 113 of the first NAND gate 110, the second input terminal 122 of the second NAND gate 120 is set to 1, and the output terminal 123 of the second NAND gate 120 is used to output the first signal in the first direction; the first input terminal 131 of the third NAND gate 130 is used to receive a second signal transmitted in a second direction (from left to right). The first input terminal 141 of the fourth NAND gate 140 is set to 1, the second input terminal 142 of the fourth NAND gate 140 is electrically connected to the output terminal 133 of the third NAND gate 130, and the output terminal 143 of the fourth NAND gate 140 is used to output a second signal in a second direction; the second input terminal 112 of the first NAND gate 110 is electrically connected to the second input terminal 142 of the fourth NAND gate 140, and the first input terminal 121 of the second NAND gate 120 is electrically connected to the second input terminal 132 of the third NAND gate 130. In addition, the output terminal 143 of the fourth NAND gate 140 provides an output bit. That is, the capture delay element 100 can receive two signals input in opposite directions and provide one bit output.

[0064] It should be pointed out that in Figure 1 The capture delay element 100 is described by taking a NAND gate as an example. However, those skilled in the art should understand that other logic circuits can be used to replace the NAND gate to implement the relevant functions of the capture delay element 100, which should fall within the protection scope of this application.

[0065] See also Figure 2 , is a schematic diagram of the structure of a capture delay line provided in an embodiment of the present application. Figure 2 As shown, the capture delay line 200 includes M capture delay elements 100, which are coupled together in sequence to form the capture delay line 200. A first signal (e.g., a clock signal SYSCLK, which may also be referred to as “SYNCI N” in other parts of this document) is received on the lower signal path of the capture delay line 200 and is transmitted from right to left through the lower signal path of the capture delay line 200. A second signal (e.g., a signal to be detected ECAPx IN[x], which may also be referred to as “ASYNCI N” in other parts of this document) is received on the upper signal path of the capture delay line 200 and is transmitted from left to right through the upper signal path of the capture delay line 200.

[0066] Specifically, the high ("1") input corresponding to the rising edge of the clock signal SYSCLK captures the delay element 100-(M-1), causing the first NAND gate 110-(M-1) of the capture delay element 100-(M-1) to generate a low ("0") output; the low ("0") input of the first NAND gate 110-(M-1) to the second NAND gate 120-(M-1) causes the second NAND gate 120-(M-1) to generate a high ("1") output, so that the rising edge is transmitted from right to left, as shown in FIG. Figure 2 As shown by the lower arrow in . At the same time, in the absence of any other input, the low ("0") input of the first NAND gate 110-(M-1) is input to the third NAND gate 120-(M-1), resulting in a high ("1") output of the third NAND gate 120-(M-1); the high ("1") input of the third NAND gate 120-(M-1) is input to the fourth NAND gate 140-(M-1), resulting in a low ("0") output of the fourth NAND gate 140-(M-1), that is, the output bit HR(M-1) of the capture delay element 100-(M-1) is set to 0. As the rising edge is transmitted from right to left, the output bits of the corresponding capture delay elements are set to 0 in sequence.

[0067] Similarly, the high ("1") input corresponding to the rising edge of the to-be-detected signal ECAPxI N[x] is input into the capture delay element 100-0, causing the third NAND gate 130-0 of the capture delay element 100-0 to generate a low ("0") output; the low ("0") input of the third NAND gate 130-0 is input into the fourth NAND gate 140-0, causing the high ("1") output of the fourth NAND gate 140-0, so that the rising edge is transmitted from left to right, as shown in FIG. Figure 2 At the same time, in the absence of any other input, the output bit HR(0) of the capture delay element 100-0 is set to 1. As the rising edge propagates from left to right, the output bits of the corresponding capture delay elements are set to 1 in sequence.

[0068] It can be understood that the clock signal SYSCLK and the signal to be detected ECAPx IN[x] will eventually meet. After the clock signal SYSCLK and the signal to be detected ECAPx IN[x] meet, the state of the output bit of the capture delay element 100 will no longer change, and the clock signal SYSCLK and the signal to be detected ECAPx IN[x] will not propagate further. Therefore, the state of the output bit of the capture delay element 100 depends on which of the rising edges of the clock signal SYSCLK and the signal to be detected ECAPx IN[x] reaches the capture delay element 100 first. Specifically, if the rising edge of the clock signal SYSCLK reaches the capture delay element 100 first, the state of the output bit of the capture delay element 100 is low ("0"); if the rising edge of the signal to be detected ECAPx IN[x] reaches the capture delay element 100 first, the state of the output bit of the capture delay element 100 is high ("1"). Therefore, the movement of the two signals will generate a string of "1" starting from the capture delay element 100-0, and a string of "0" starting from the capture delay element 100-(M-1).

[0069] Since the clock signal SYSCLK always propagates through half of the capture delay line 200, the state of the output bits of the right half of the capture delay line 200 is always 0. Exemplarily, if the rising edges of the clock signal SYSCLK and the signal to be detected ECAPx IN[x] occur at the same time, the capture delay line 200 will be frozen in the middle, that is, the states of the output bits of the left half of the capture delay line 200 are all 1; the states of the output bits of the right half are all 0. If the rising edge of the signal to be detected ECAPx IN[x] is later than the rising edge of the clock signal SYSCLK, the states of the output bits of the left half of the capture delay line 200 are partially 1 and partially 0; the states of the output bits of the right half are all 0. The number of "1"s in the output bits of the left half of the capture delay line 200 will depend on the time difference between the clock signal SYSCLK and the signal to be detected ECAPx IN[x]. Therefore, by decoding the number of 1s in HR[M-1:0] of the capture delay line 200 , the position of the to-be-detected signal ECAPx IN[x] relative to the clock signal SYSCLK can be determined, thereby achieving high resolution of pulse width measurement.

[0070] See also Figure 3 , is a schematic diagram of the structure of a timing delay element provided in an embodiment of the present application. Figure 3As shown, the timing delay element 300 includes a fifth NAND gate 310 and a sixth NAND gate 320. The first input terminal 311 of the fifth NAND gate 310 is used to connect to the output terminal of the previous timing delay element, and the second input terminal 312 of the fifth NAND gate 310 is set to 1; the first input terminal 3231 of the sixth NAND gate 320 is set to 1, the second input terminal 322 of the sixth NAND gate 320 is electrically connected to the output terminal 313 of the fifth NAND gate 310, and the output terminal 323 of the sixth NAND gate 320 is used to connect to the input terminal of the next timing delay element.

[0071] It should be pointed out that in Figure 3 The timing delay element 300 is described by taking a NAND gate as an example. However, those skilled in the art should understand that other logic circuits can be used to replace the NAND gate to implement the related functions of the timing delay element 300, which should all fall within the protection scope of this application.

[0072] See also Figure 4 , is a schematic diagram of the structure of an oscillator delay line provided in an embodiment of the present application. Figure 4 As shown, the oscillator delay line 400 includes N timing delay elements 300. The N timing delay elements 300 are coupled together in sequence to form the oscillator delay line 400. In addition, the oscillator delay line 400 also includes a seventh NAND gate 401, a first input end of the seventh NAND gate 401 is used to receive an enable control signal HRCLK_EN, a second input end of the seventh NAND gate 401 is electrically connected to an output end of the timing delay element 300-(N-1) (a timing delay element at the end), and an output end of the seventh NAND gate 401 is electrically connected to a first input end of the timing delay element 300-0 (a timing delay element at the front end), so that the N timing units and the seventh NAND gate 401 form a ring loop.

[0073] When the enable control signal HRCLK_EN is high ("1"), the oscillator delay line 400 forms an oscillator, and can generate a clock signal. In order to distinguish it from other clock signals in the following text, the clock signal generated by the oscillator delay line 400 is called the "initial clock signal HRCLK". Assuming that the delay generated by the signal passing through a timing delay element 300 is δ, the relationship between the clock period THRCLK of the initial clock signal HRCLK output after the oscillator stabilizes, the delay δ of the timing delay element 300, and the number N of the timing delay elements 300 is: THRCLK = 2*N*δ, N is an even number.

[0074] It should be noted that those skilled in the art may also use other logic gates to replace the seventh NAND gate 401 to implement related functions according to actual needs. Alternatively, the seventh NAND gate 401 is omitted in the oscillator delay line 400, so that the output end of the last timing delay element 300 is electrically connected to the input end of the frontmost timing delay element 300 to form a ring loop. However, in this case, if an oscillator is formed, the number N of the timing delay elements 300 in the oscillator delay line 400 should be an odd number.

[0075] Please continue reading Figure 2 , since the clock signal SYSCLK always propagates through half of the capture delay line 200, in order to accurately capture the position where the edge of the detected signal ECAPxIN[x] occurs, the length of the capture delay line 200 must span two clock cycles of the clock signal SYSCLK. At the same time, the resolution of the pulse width measurement depends on the clock cycle TSYSCLK of the clock signal SYSCLK and the number M of the capture delay elements 100, specifically: TSYSCLK divided by (M / 2). It should be noted that the length of the capture delay line 200 refers to the time it takes for the signal to pass from one end of the capture delay line 200 to the other end.

[0076] From another perspective, the capture delay line 200 with a specified length can only support a specific clock frequency. If it depends on the system clock, the length of the capture delay line 200 may not be flexibly adjusted. In addition, in some application scenarios, the system clock may run at different frequencies, resulting in the system clock being unavailable for the circuit. By setting a dedicated clock for the capture delay line that is independent of the system clock, greater flexibility can be achieved, but since a phase-locked loop circuit needs to be added to the dedicated clock circuit, the circuit cost increases.

[0077] In summary, Figure 2 The capture delay line 200 shown has at least the following problems: 1) Since a capture delay line with a specified length can only support a specific clock frequency, if it depends on the system clock, the length of the capture delay line cannot be flexibly adjusted; 2) If a dedicated clock independent of the system clock is set for the capture delay line, a phase-locked loop circuit needs to be added, thereby increasing the circuit cost; 3) The length of the capture delay line needs to be designed to be greater than two clock cycles in order to work properly.

[0078] In response to the above problems, an embodiment of the present application provides a capture circuit, including one oscillator delay line and two capture delay lines of different lengths, wherein the oscillator delay line provides a clock signal for the two capture delay lines, and the two capture delay lines jointly determine the position where the edge of the signal to be detected occurs. The capture circuit provided by the embodiment of the present application has at least the following advantages: 1) The clock signal is provided by the oscillator delay line, and no additional phase-locked loop circuit is required, and it is not dependent on the system clock; 2) Since the position where the edge of the signal to be detected occurs is jointly determined by the two capture delay lines, the length of at least one capture delay line can be less than one clock cycle; 3) The phase difference between the clock signals corresponding to different capture delay lines is set by the ratio of the number of capture delay elements in different capture delay lines, which makes the design of the clock signal and the capture delay element more flexible. This is described in detail below in conjunction with the specific implementation method.

[0079] See also Figure 5 , is a schematic diagram of a capture circuit provided in an embodiment of the present application. Figure 5 As shown, the capture circuit includes one oscillator delay line 400 and two capture delay lines 200 (a first capture delay line 201 and a second capture delay line 202). The oscillator delay line 400 includes N timing delay elements 300; the first capture delay line 201 includes A capture delay elements 100, A≥2; the second capture delay line 202 includes B capture delay elements 100, B≥2, and A≠B. That is, the lengths of the first capture delay line 201 and the second capture delay line 202 are not equal.

[0080] When the oscillator delay line 400 is working, the oscillator delay line 400 can generate an initial clock signal HRCLK, and further, a first clock signal HRCLK1 and a second clock signal HRCLK2 can be generated according to the initial clock signal HRCLK, and provided to the two capture delay lines 200 respectively. That is to say, in the embodiment of the present application, the clock signal is provided by the oscillator delay line 400, so there is no need to set up an additional phase-locked loop circuit, and it is not dependent on the system clock.

[0081] See also Figure 6 , is a timing diagram of a clock signal provided in an embodiment of the present application. Figure 6As shown, there is a phase difference between the first clock signal HRCLK1 and the second clock signal HRCLK2. In the embodiment of the present application, one clock cycle of the clock signal can be divided into two time intervals by the phase difference between different clock signals. In time interval A, the first capture delay line 201 provides the position where the edge of the signal to be detected ECAPx IN[x] occurs. Specifically, the first capture delay line 201 transmits the first clock signal HRCLK1 in a first direction (from right to left) along the first signal path, and transmits the signal to be detected ECAPx IN[x] in a second direction (from left to right) opposite to the first direction along the second signal path. In time interval B, the second capture delay line 202 provides the position where the edge of the signal to be detected ECAPx IN[x] occurs. Specifically, the second capture delay line 202 transmits the second clock signal HRCLK2 in a first direction along the third signal path, and transmits the signal to be detected ECAPx IN[x] in a second direction along the fourth signal path.

[0082] That is, each capture delay line 200 is only responsible for the detection of a certain time interval in a clock cycle, and the two capture delay lines 200 jointly determine the position where the edge of the to-be-detected signal ECAPx IN[x] occurs. Figure 2 When the capture delay line 200 shown in the figure performs signal edge detection, in order to accurately capture the position where the edge of the signal to be detected ECAPx IN[x] occurs, the capture delay line 200 must span two clock cycles. In the embodiment of the present application, since the position where the edge of the signal to be detected ECAPx IN[x] occurs is jointly determined by two capture delay lines 200, the length of at least one capture delay line 200 can be less than one clock cycle.

[0083] It can be understood that the length of the capture delay line 200 can be characterized by the number of capture delay elements 100 in the capture delay line 200. Since the "ratio of the number of capture delay elements 100 in different capture delay lines 200" is associated with the "phase difference between clock signals corresponding to different capture delay lines 200", the "phase difference between clock signals corresponding to different capture delay lines 200" can be determined by the "ratio of the number of capture delay elements 100 in different capture delay lines 200". Specifically, the phase difference between the first clock signal HRCLK1 and the second clock signal HRCLK2 is A / (A+B)*360°. Among them, A and B are the number of capture delay elements 100 in the first capture delay line 201 and the second capture delay line 202, respectively. Exemplarily, when A=2B, the phase difference between the first clock signal HRCLK1 and the second clock signal HRCLK2 is 120°. When the initial clock signal HRCLK and the first clock signal HRCLK1 have the same phase, a phase shifter is required to shift the initial clock signal HRCLK by 120° to generate the second clock signal HRCLK2. When there is a phase difference α between the initial clock signal HRCLK and the first clock signal HRCLK1 (the initial clock signal HRCLK is shifted by α to obtain the first clock signal HRCLK1 or the phase difference is caused by components), the initial clock signal HRCLK is shifted by α+120° to obtain the second clock signal HRCLK2 or the first clock signal HRCLK1 is shifted by 120° to obtain the second clock signal HRCLK2.

[0084] To sum up, in the embodiments of the present application, the number of capture delay elements 100 in different capture delay lines 200 can be flexibly configured, and the phase difference between the clock signals corresponding to different capture delay lines 200 can be set by the number ratio of the capture delay elements 100 in different capture delay lines 200, which makes the design of the clock signal and the capture delay element 100 more flexible.

[0085] Please continue reading Figure 5 In the embodiment of the present application, the capture circuit further includes a phase shifter. After the oscillator delay line 400 generates the initial clock signal HRCLK, the first clock signal HRCLK1 can be determined according to the initial clock signal HRCLK. The first clock signal HRCLK1 can be a signal that is completely identical to the initial clock signal HRCLK, or a signal in which the initial clock signal HRCLK is delayed for a certain time (for example, delayed by 1 / 6 of a clock cycle). Delaying the initial clock signal HRCLK can reserve time for the subsequent phase shifting operation of the phase shifter.

[0086] After obtaining the first clock signal HRCLK1, the first phase shifter can shift the phase of the first clock signal HRCLK1 to obtain the second clock signal HRCLK2. For example, if the phase difference between the first clock signal HRCLK1 and the second clock signal HRCLK2 is 120°, the first clock signal HRCLK1 can be shifted by 120° by the phase shifter to obtain the second clock signal HRCLK2.

[0087] In some possible implementations, the first clock signal HRCLK1 and the second clock signal HRCLK2 with a specified phase difference can also be directly obtained at different nodes of the oscillator delay line 400. For example, refer to Figure 7 The first clock signal HRCLK1 can be provided from the output of 300-(17); the second clock signal HRCLK2 can be provided from the output of 300-(35), which also belongs to the scope of "clock signal generated according to the initial clock signal HRCLK". It can be understood that at this time, the phase shifter in the capture circuit can be omitted.

[0088] Please continue reading Figure 5 In the embodiment of the present application, the capture circuit further includes a multiplexer 510. The first input terminal 511 of the multiplexer 510 is used to receive the signal to be detected ECAPx IN[x], and the second input terminal 512 is used to receive the inverted signal of the signal to be detected ECAPx IN[x]. The output terminal 514 of the multiplexer 510 is electrically connected to the first capture delay line 201 and the second capture delay line 202 respectively. The control terminal 514 of the multiplexer 510 can receive the control signal CAPI N, and select the connection between the first input terminal 511 and the output terminal 514 according to the control signal CAPI N, and provide the first capture delay line 201 and the second capture delay line 202 with the signal to be detected ECAPx IN[x]; or select the connection between the second input terminal 512 and the output terminal 514, and provide the first capture delay line 201 and the second capture delay line 202 with the inverted signal of the signal to be detected ECAPx IN[x].

[0089] In some possible implementations, the multiplexer 510 may also receive a phase-shifted signal of the detection signal ECAPx IN[x], and then select the first capture delay line 201 and the second capture delay line 202 to provide the phase-shifted signal of the detection signal ECAPx IN[x] through the control signal CAPI N.

[0090] To facilitate understanding, the technical solution provided in the embodiments of the present application is described in detail below in combination with specific implementation methods.

[0091] See also Figure 7, is a schematic diagram of the structure of another capture circuit provided in an embodiment of the present application. Figure 7 As shown, the capture circuit includes one oscillator delay line 400 and two capture delay lines 200 (a first capture delay line 201 and a second capture delay line 202). The oscillator delay line 400 includes 36 timing delay elements 300, the first capture delay line 201 includes 16 capture delay elements 100, and the second capture delay line 202 includes 20 capture delay elements 100.

[0092] When the enable control signal HRCLK_EN of the seventh NAND gate 401 in the oscillator delay line 400 is low ("0"), the oscillator delay line 400 does not work. When the enable control signal HRCLK_EN of the oscillator delay line 400 is high ("1"), the oscillator delay line 400 forms an oscillator to generate an initial clock signal HRCLK, and then the first clock signal HRCLK1 can be determined according to the initial clock signal HRCLK. The phase difference between the first capture delay line 201 and the second capture delay line 202 is A / (A+B)=160°. That is, the phase shifter can shift the phase of the first clock signal HRCLK1 by 160° to obtain the second clock signal HRCLK2. Specifically, in the 0-4 / 9 cycle, the first capture delay line 201 determines the position where the edge of the to-be-detected signal ECAPx IN[x] occurs; in the 4 / 3-9 / 9 cycle, the second capture delay line 202 determines the position where the edge of the to-be-detected signal ECAPx IN[x] occurs.

[0093] See also Figure 8 , for the adoption of Figure 7 The capture circuit shown in the figure performs edge detection signal timing diagram. Figure 8As shown, in time interval A (the first 4 / 9 clock cycles), the first clock signal HRCLK1 is at a high level, and the rising edge of the first clock signal HRCLK1 propagates from right to left along the first signal path in the first capture delay line 201. The signal to be detected ECAPx IN[x] becomes high in time interval A, and the rising edge of the signal to be detected ECAPx IN[x] propagates from left to right along the second signal path in the first capture delay line 201. The output of the first capture delay line 201 is latched in HR1[15:0] and sent out after a short delay. In time interval B, the second clock signal HRCLK2 is at a high level, and the rising edge of the second clock signal HRCLK2 propagates from right to left along the third signal path in the second capture delay line 202. In time interval B (the last 5 / 9 clock cycles), the signal to be detected ECAPx IN[x] is all at a high level, and the high level propagates from left to right along the fourth signal path in the second capture delay line 202. The output of the second capture delay line 202 is latched in HR2[19:0] and sent out after a short delay.

[0094] When both HR1[15:0] and HR2[19:0] values ​​are captured, the two values ​​are connected as HROUT[35:0]. By counting the number of 1s in HROUT[35:0], the HR value can be determined. This HR value can represent the position of the rising edge of the detected signal ECAPx IN[x] in a clock cycle, and then the fractional part of the pulse width can be determined, achieving high-precision measurement of the pulse width.

[0095] As described above, since the clock signal always propagates through half of the capture delay line 200, the state of the output bits of the right half of the capture delay line 200 is always 0, and these values ​​do not need to be captured and sent. Therefore, only half of the output bits in HROUT[35:0] need to be counted. Accordingly, when the total number of capture delay elements 100 in the two capture delay lines 200 is M, the resolution of the capture circuit is: the clock period THRCLK of the clock signal divided by M / 2.

[0096] For example, in Figure 7In the capture circuit shown, the first capture delay line 201 includes 16 capture delay elements 100, so 8 output bits need to be counted in the first capture delay line 201, and the second capture delay line 202 includes 20 capture delay elements 100, so 10 output bits need to be counted in the second capture delay line 202. The relationship between the to-be-detected signal ECAPx IN[x], HROUT[35:0], HR value and capture value is shown in Table 1. The data in the to-be-detected signal ECAPx IN[x] represents the relative position of the edge (e.g., rising edge) of the to-be-detected signal ECAPx IN[x] and the clock signal. For example, when the edge of the signal to be detected ECAPx IN[x] is located at the 1 / 18 position of the clock signal, the HROUT[35:0] captured by the capture circuit is 11111111111_111111110. By counting the proportion of 1 in HROUT[35:0], the HR value can be determined to be 1 / 18, and then the capture value can be determined to be (1 / 18)+17. Among them, the value "17" of this part represents the integer part of the pulse width in the signal to be detected ECAPx IN[x]. Similarly, when the edge of the signal to be detected ECAPx IN[x] is located at other positions of the clock signal, the corresponding capture value can be obtained by the capture circuit, thereby achieving high-precision measurement of the pulse width.

[0097] Table 1:

[0098]

[0099]

[0100] Please continue reading Figure 7 In the embodiment of the present application, the oscillator delay line 400 includes 36 sequential delay elements 300, the first capture delay line 201 includes 16 capture delay elements 100, and the second capture delay line 202 includes 20 capture delay elements 100. That is, the number N of sequential delay elements 300 in the oscillator delay line 400 = the number A of capture delay elements 100 in the first capture delay line 201 + the number B of capture delay elements 100 in the second capture delay line 202.

[0101] In the embodiment of the present application, each timing delay element 300 and each capture delay element 100 have similar delays. It can be understood that in this case, when N=A+B, the length of the two capture delay lines 200 matches the clock period of the clock signal generated by the oscillator delay line 400.

[0102] For specific contents of the embodiments of the present application, please refer to the description of the above embodiments. For the sake of brevity, they will not be repeated here.

[0103] See also Fig. 9 , is a schematic diagram of the structure of another capture circuit provided in an embodiment of the present application. Fig. 9 As shown, the embodiments of the present application are Figure 7 The difference of the illustrated embodiment is that the first capture delay line 201 includes 15 capture delay elements 100. It is understandable that if the first capture delay line 201 includes 16 capture delay elements 100, a signal of 4 / 9 clock cycle can be detected. When the number of capture delay elements 100 is one less (including 15 capture delay elements 100), it is estimated that the signal of (4 / 9 clock cycle)*(1 / 16) timing will be lost, which has a certain impact on the final capture result. However, if there are more capture delay elements 100 in a capture delay line 200, for example, 50, when the number of capture delay elements 100 is one less (including 49 capture delay elements 100), it is estimated that the signal of (4 / 9 clock cycle)*(1 / 50) timing will be lost, which has a small impact on the final capture result, and is usually within an acceptable signal loss. That is to say, even if the length of the capture delay line 200 does not match the preset clock cycle, as long as the difference is not too large, normal signal detection can be performed.

[0104] For specific contents of the embodiments of the present application, please refer to the description of the above embodiments. For the sake of brevity, they will not be repeated here.

[0105] See also Fig.10 , is a schematic diagram of the structure of another capture circuit provided in an embodiment of the present application. Fig.10 As shown, the embodiments of the present application are Figure 7 The difference between the illustrated embodiment is that the phase shifter includes a first phase shifter and a second phase shifter. The first phase shifter is used to shift the first clock signal HRCLK1 to a first phase and output a second clock signal HRCLK2A; the second phase shifter is used to shift the first clock signal HRCLK1 to a second phase and output a second clock signal HRCLK2B. In addition, the capture circuit also includes a selection switch 1001, which is used to select the connection between the first phase shifter and the oscillator delay line 400 and the second capture delay line 202 to provide the second capture delay line 202 with the second clock signal HRCLK2A; or to select the connection between the second phase shifter and the oscillator delay line 400 and the second capture delay line 202 to provide the second capture delay line 202 with the second clock signal HRCLK2B.

[0106] In a possible application scenario, the first phase and the second phase are the same, that is, the second clock signal HRCLK2A and the second clock signal HRCLK2B obtained by the two phase shifters have the same phase. In this application scenario, the two phase shifters back up each other. When one phase shifter fails or is abnormal, it can switch to the other phase shifter to work, thereby improving the reliability of the circuit.

[0107] In another possible application scenario, the first phase and the second phase are different, that is, the phases of the second clock signal HRCLK2A and the second clock signal HRCLK2B obtained by the two phase shifters are different. As described above, the phase difference between the first clock signal HRCLK1 and the second clock signal HRCLK2 should be A / (A+B)*360°, that is, the phase shifter only needs to shift the first clock signal HRCLK1 by A / (A+B)*360° to obtain the second clock signal HRCLK2. However, in actual applications, due to problems such as abnormal capture of the delay element 300, delay timing errors may be caused. In an embodiment of the present application, the selected phase shift phase can be determined based on the final adoption effect of the first clock signal HRCLK1, and the sampling effect of the second clock signal HRCLK2 can be optimized.

[0108] Please continue reading Fig.10 In the embodiment of the present application, the capture circuit further includes a first latch and a second latch. The input end of the first latch is used to receive the first clock signal HRCLK1, latch the first clock signal HRCLK1, and provide the latched first clock signal HRCLK1 to the first capture delay line 201. The input end of the second latch is used to receive the second clock signal HRCLK2, latch the second clock signal HRCLK2, and provide the latched second clock signal HRCLK2 to the second capture delay line 202. It can be understood that when there are two phase shifters, the second latch can receive the second clock signal HRCLK2A or the second clock signal HRCLK2B, latch the second clock signal HRCLK2A or the second clock signal HRCLK2B, and provide the latched second clock signal HRCLK2A or the second clock signal HRCLK2B to the second capture delay line 202.

[0109] It can be understood that by latching the first clock signal HRCLK1 and / or the second clock signal HRCLK2, the time nodes at which the first clock signal HRCLK1 and the second clock signal HRCLK2 are respectively input into the first capture delay line 201 and the second capture delay line 202 can be flexibly adjusted, thereby improving the flexibility and robustness of the circuit. Exemplarily, by latching the first clock signal HRCLK1 and / or the second clock signal HRCLK2, it can be ensured that the first capture delay line 201 and the second capture delay line 202 complete capture at the same time.

[0110] See also Fig.11 , is a schematic diagram of the structure of another capture circuit provided in an embodiment of the present application. Fig.11 As shown, the embodiments of the present application are Fig.10 The difference of the embodiment shown is that there is only a second latch. Of course, in some possible implementations, the capture circuit may also only have a first latch without a second latch, which will not be described in detail in the embodiment of the present application.

[0111] See also Fig.12 , for the adoption of Fig.11 The capture circuit shown in the figure performs edge detection signal timing diagram. Fig.12 The solid line portion in is a timing diagram corresponding to the first clock signal HRCLK1 and the second clock signal HRCLK2A, and the dotted line portion is a timing diagram corresponding to the second clock signal HRCLK2B. The second clock signal HRCLK2A and the second clock signal HRCLK2B have different phases, and the second clock signal HRCLK2B is latched. By comparing the timing diagrams corresponding to the second clock signal HRCLK2A and the second clock signal HRCLK2B, it can be seen that after the second clock signal HRCLK2B is latched, the time node at which the second clock signal HRCLK2B is input into the second capture delay line 202 can be adjusted.

[0112] For specific contents of the embodiments of the present application, please refer to the description of the above embodiments. For the sake of brevity, they will not be repeated here.

[0113] It is understandable that in order to obtain a higher pulse width measurement accuracy, the capture delay line needs to have a stable delay time. However, due to the quality of the capture delay element in the capture delay line or interference from the external environment, the delay time of the capture delay line is uncontrollable, which in turn affects the measurement accuracy.

[0114] In view of the above problems, the embodiment of the present application further adds a phase detection unit and a loop filter unit in the capture circuit. The phase detection unit is used to detect the propagation state of the clock signal through the capture delay line and output a control signal according to the propagation state. The loop filter unit can adjust the delay time of the capture delay line according to the control signal, thereby ensuring that the capture delay line has a stable delay time and improving the measurement accuracy of the pulse width. This is described in detail below in conjunction with a specific implementation method.

[0115] See also Fig.13 , is a schematic diagram of the structure of another capture circuit provided in an embodiment of the present application. Fig.13 As shown, the capture circuit Figure 5 The illustrated embodiment further includes a first phase detector 501 , a first loop filter 601 , a second phase detector 502 , and a second loop filter 602 .

[0116] The first phase detector 501 and the first loop filter 601 are used to control the delay time of the first capture delay line 201. Specifically, the first phase detector 501 is used to detect the first propagation state of the first clock signal HRCLK1 through the first capture delay line 201, and output a first control signal UP1 when the first propagation state indicates that the delay of the first capture delay line 201 is longer than the first delay expectation, and output a second control signal DOWN1 when the first propagation state indicates that the delay of the first capture delay line 201 is shorter than the first delay expectation. The first loop filter 601 is used to control the first capture delay line 201 to reduce the delay when receiving the first control signal UP1 output by the phase detection unit, and control the first capture delay line 201 to increase the delay when receiving the second control signal DOWN1 output by the phase detection unit, so that the delay time of the first capture delay line 201 is stabilized at the first delay expectation.

[0117] The second phase detector 502 and the second loop filter 602 are used to control the delay time of the second capture delay line 202. Specifically, the second phase detector 502 is used to detect the second propagation state of the second clock signal HRCLK2 through the second capture delay line 202, and output the third control signal UP2 when the second propagation state indicates that the delay of the second capture delay line 202 is longer than the second delay expectation, and output the fourth control signal DOWN2 when the second propagation state indicates that the delay of the second capture delay line 202 is shorter than the second delay expectation. The second loop filter 602 is used to control the second capture delay line 202 to reduce the delay when receiving the third control signal UP2 output by the phase detection unit, and control the second capture delay line 202 to increase the delay when receiving the fourth control signal DOWN2 output by the phase detection unit, so that the delay time of the second capture delay line 202 is stabilized at the second delay expectation.

[0118] It should be pointed out that in Fig.13 Although the illustrated implementation method includes the first phase detector 501, the first loop filter 601, the second phase detector 502 and the second loop filter 602 at the same time, those skilled in the art may also only set the “first phase detector 501 and the first loop filter 601” according to actual needs, that is, only adjust the delay time of the first capture delay line 201; or only set the “second phase detector 502 and the second loop filter 602”, that is, only adjust the delay time of the second capture delay line 202, and the embodiment of the present application does not impose specific restrictions on this.

[0119] Please continue reading Fig.13 , the first phase detector 501 includes a first input terminal IN11 and a second input terminal IN12. The first input terminal IN11 is used to receive a plurality of first delayed signals outputted from the first output terminals of a plurality of capture delay elements in the first capture delay line 201; the second input terminal IN12 is used to receive the first clock signal HRCLK1. It should be noted that the first output terminal of the capture delay element is an output terminal for transmitting a signal in a first direction, that is, the signal outputted from the first output terminal is a clock signal. Accordingly, the first delayed signal is a clock signal delayed by the capture delay element. Exemplarily, the first delayed signal outputted from the first output terminal of the capture delay element 100-(A-1) is a clock signal delayed by the capture delay element 100-(A-1); the first delayed signal outputted from the first output terminal of the capture delay element 100-(A-2) is a clock signal delayed by the capture delay element 100-(A-1) and the capture delay element 100-(A-2); and so on.

[0120] It can be understood that the multiple first delay signals output by the multiple capture delay elements in the first capture delay line 201 can reflect the propagation state (propagation too fast or too slow) of the first clock signal HRCLK1 in the first capture delay line 201, that is, the first propagation state. Therefore, the first phase detector 501 can determine the first propagation state of the first clock signal HRCLK1 in the first capture delay line 201 according to the multiple first delay signals and the first clock signal HRCLK1 (as a reference signal). Further, according to the first propagation state, it can be determined whether the delay of the first capture delay line 201 is shorter than the preset first delay expectation (the delay is too short so that the clock signal propagates too fast) or longer than the preset first delay expectation (the delay is too long so that the clock signal propagates too slowly). In a specific implementation, the first delay expectation is (A / N)*T, where N is the total number of capture delay elements in the first capture delay line 201 and the second capture delay line 202, and T is the clock period of the first clock signal HRCLK1.

[0121] In some possible implementations, the plurality of first delayed signals used to determine the first propagation state may be all first delayed signals output by the A capture delay elements in the first capture delay line 201, that is, Fig.13 However, it should be understood by those skilled in the art that the propagation state of the clock signal in the first capture delay line 201 can also be determined by using part of the first delay signals output by the A capture delay elements in the first capture delay line 201. For example, a first delay signal is taken for each capture delay element. Of course, those skilled in the art can also adopt other methods for selecting the first delay signal, which is not specifically limited in the embodiments of the present application.

[0122] Further, if the first phase detector 501 determines that the delay of the first capture delay line 201 is longer than the first delay expectation according to the first propagation state, the first control signal UP1 is output at the first output terminal OUT11 thereof; when the first loop filter 601 receives the first control signal UP1, the first capture delay line 201 is controlled to reduce the delay. If the first phase detector 501 determines that the delay of the first capture delay line 201 is shorter than the first delay expectation according to the first propagation state, the second control signal DOWN1 is output at the second output terminal OUT12 thereof; when the first loop filter 601 receives the first control signal UP1, the first capture delay line 201 is controlled to increase the delay. In other words, the delay time length of the first capture delay line 201 is adjusted by the first control signal UP1 and the second control signal DOWN1, so that the delay time length of the first capture delay line 201 can be stabilized at the first delay expectation.

[0123] Specifically, the first loop filter 601 includes a first capacitor module, a first current source 711, a second current source 712, a first switch S11 and a second switch S12. In an embodiment of the present application, the first capacitor module includes two capacitors, that is, a first capacitor C11 and a second capacitor C12 in parallel. Of course, those skilled in the art can also set fewer (for example, 1) or more (for example, 3, 4 or 5, etc.) capacitors in the first capacitor module according to actual needs, and the embodiment of the present application does not specifically limit this. Since setting a plurality of parallel capacitors will increase the capacitance value of the first capacitor module, the control ability of the loop filter to the delay time length of the capture delay line can be improved. Therefore, when the delay time length of the first capture delay line 201 changes greatly, a plurality of parallel capacitors can be set in the first capacitor module.

[0124] Please continue reading Fig.13The positive electrode of the first current source 711 is used to connect to the high level VDD, the negative electrode of the first current source 711 is electrically connected to the positive electrode of the second current source 712 through the first switch S11 and the second switch S12, and the negative electrode of the second current source 712 is used to be grounded GND. The node between the first switch S11 and the second switch S12 is electrically connected to the first end of the first capacitor C11 and the second capacitor C12, the first ends of the first capacitor C11 and the second capacitor C12 are also electrically connected to the control ends of the A capture delay elements in the first capture delay line 201, and the second ends of the first capacitor C11 and the second capacitor C12 are grounded GND.

[0125] The first output terminal OUT11 of the first phase detector 501 is electrically connected to the control terminal of the first switch S11, and the first switch S11 is in a normally open state; the second output terminal OUT12 of the first phase detector 501 is electrically connected to the control terminal of the second switch S12, and the second switch S12 is in a normally open state. When the first output terminal OUT11 of the first phase detector 501 outputs the first control signal UP1, the first switch S11 is closed, and then more charges are provided to the first capacitor C11 and the second capacitor C12 through the first current source 711, so that the voltage of the first capacitor C11 and the second capacitor C12 increases, that is, the voltage applied to the control terminal of the capture delay element increases, thereby reducing the delay of the clock signal passing through the capture delay element. When the second output terminal OUT12 of the first phase detector 501 outputs the second control signal DOWN1, the second switch S12 is closed, and the charges on the first capacitor C11 and the second capacitor C12 are released through the second current source 712, so that the voltage of the first capacitor C11 and the second capacitor C12 is reduced, that is, the voltage applied to the control terminal of the capture delay element is reduced, thereby increasing the delay of the clock signal passing through the capture delay element.

[0126] It can be understood that in the embodiment of the present application, the "first current source 711, the second current source 712, the first switch S11 and the second switch S12" constitute the control circuit of the first capacitor module, which is used to control the charging and discharging of the first capacitor module according to the first control signal UP1 and the second control signal DOWN1. In practical applications, those skilled in the art can also set other control circuits in the first loop filter 601 to realize the charging and discharging control of the first capacitor module, and the embodiment of the present application does not specifically limit this.

[0127] In summary, in the embodiment of the present application, the first phase detector 501 can detect the first propagation state of the first clock signal HRCLK1 through the first capture delay line 201, and output the first control signal UP1 or the second control signal DOWN1 according to the first propagation state. The first loop filter 601 can adjust the delay time of the first capture delay line 201 according to the first control signal UP1 and the second control signal DOWN1, thereby ensuring that the first capture delay line 201 has a stable delay time, and improving the measurement accuracy of the pulse width.

[0128] In addition, since the first phase detector 501 can detect the first propagation state of the first clock signal HRCLK1 through the first capture delay line 201, the first capture delay line 201 can also be prevented from being mislocked in the embodiment of the present application. Here, "mislock" means that the capture delay line is locked at an incorrect delay time. For example, the delay time of the capture delay line is T 延迟 , if the delay time of the capture delay line is locked at k*T 延迟 (k is an integer greater than 1), it is considered that the capture delay line is mislocked.

[0129] Please continue reading Fig.13 The second phase detector 502 includes a first input terminal IN21 and a second input terminal IN22. The first input terminal IN21 is used to receive a plurality of second delayed signals outputted from the first output terminals of a plurality of capture delay elements in the second capture delay line 202; the second input terminal IN22 is used to receive the second clock signal HRCLK2HRCLK2. Exemplarily, the second delayed signal outputted from the first output terminal of the capture delay element 100-(B-1) is the clock signal delayed by the capture delay element 100-(B-1); the second delayed signal outputted from the first output terminal of the capture delay element 100-(B-2) is the clock signal delayed by the capture delay element 100-(B-1) and the capture delay element 100-(B-2); and so on.

[0130] It can be understood that the multiple second delay signals output by the multiple capture delay elements in the second capture delay line 202 can reflect the propagation state (propagation too fast or too slow) of the second clock signal HRCLK2 in the second capture delay line 202, that is, the second propagation state. Therefore, the second phase detector 502 can determine the second propagation state of the second clock signal HRCLK2 in the second capture delay line 202 according to the multiple second delay signals and the second clock signal HRCLK2 (as a reference signal). Further, according to the second propagation state, it can be determined whether the delay of the second capture delay line 202 is shorter than the preset second delay expectation (the delay is too short so that the clock signal propagates too fast) or longer than the preset second delay expectation (the delay is too long so that the clock signal propagates too slowly). In a specific implementation, the second delay expectation is (B / N)*T, where N is the total number of capture delay elements in the second capture delay line 202 and the second capture delay line 202, and T is the clock period of the second clock signal HRCLK2.

[0131] In some possible implementations, the plurality of second delayed signals used to determine the second propagation state may be all second delayed signals output by B capture delay elements in the second capture delay line 202, that is, Fig.13 However, it should be understood by those skilled in the art that the propagation state of the clock signal in the second capture delay line 202 can also be determined by using part of the second delay signals output by the B capture delay elements in the second capture delay line 202. For example, a second delay signal is taken for each capture delay element. Of course, those skilled in the art can also adopt other methods for selecting the second delay signal, which is not specifically limited in the embodiments of the present application.

[0132] Further, if the second phase detector 502 determines that the delay of the second capture delay line 202 is longer than the second delay expectation according to the second propagation state, the third control signal UP2 is outputted at the first output terminal OUT21 thereof; when the second loop filter 602 receives the third control signal UP2, the second capture delay line 202 is controlled to reduce the delay. If the second phase detector 502 determines that the delay of the second capture delay line 202 is shorter than the second delay expectation according to the second propagation state, the fourth control signal DOWN2 is outputted at the second output terminal OUT22 thereof; when the second loop filter 602 receives the third control signal UP2, the second capture delay line 202 is controlled to increase the delay. In other words, the delay time length of the second capture delay line 202 is adjusted by the third control signal UP2 and the fourth control signal DOWN2, so that the delay time length of the second capture delay line 202 can be stabilized at the second delay expectation.

[0133] Specifically, the second loop filter 602 includes a second capacitor module, a third current source 721, a fourth current source 722, a third switch S21 and a fourth switch S22. In an embodiment of the present application, the second capacitor module includes two capacitors, that is, a third capacitor C21 and a fourth capacitor C22 in parallel. Of course, those skilled in the art can also set fewer (for example, 1) or more (for example, 3, 4 or 5, etc.) capacitors in the second capacitor module according to actual needs, and the embodiment of the present application does not specifically limit this. Since a plurality of capacitors in parallel are set to increase the capacitance value of the second capacitor module, the control ability of the delay time length of the capture delay line can be improved by the loop filter. Therefore, when the delay time length of the second capture delay line 202 changes greatly, a plurality of capacitors in parallel can be set in the second capacitor module.

[0134] Please continue reading Fig.13 The positive electrode of the third current source 721 is used to connect to the high level VDD, the negative electrode of the third current source 721 is electrically connected to the positive electrode of the fourth current source 722 through the third switch S21 and the fourth switch S22, and the negative electrode of the fourth current source 722 is used to be grounded GND. The node between the third switch S21 and the fourth switch S22 is electrically connected to the first end of the third capacitor C21 and the fourth capacitor C22, the first end of the third capacitor C21 and the fourth capacitor C22 are also electrically connected to the control end of the B capture delay elements in the second capture delay line 202, and the second end of the third capacitor C21 and the fourth capacitor C22 is grounded GND.

[0135] The first output terminal OUT21 of the second phase detector 502 is electrically connected to the control terminal of the third switch S21, and the third switch S21 is in a normally open state; the second output terminal OUT22 of the second phase detector 502 is electrically connected to the control terminal of the fourth switch S22, and the fourth switch S22 is in a normally open state. When the first output terminal OUT21 of the second phase detector 502 outputs the third control signal UP2, the third switch S21 is closed, and then more charges are provided to the third capacitor C21 and the fourth capacitor C22 through the third current source 721, so that the voltage of the third capacitor C21 and the fourth capacitor C22 increases, that is, the voltage applied to the control terminal of the capture delay element increases, thereby reducing the delay of the clock signal passing through the capture delay element. When the second output terminal OUT22 of the second phase detector 502 outputs the fourth control signal DOWN2, the fourth switch S22 is closed, and the charges on the third capacitor C21 and the fourth capacitor C22 are released through the fourth current source 722, so that the voltage of the third capacitor C21 and the fourth capacitor C22 is reduced, that is, the voltage applied to the control terminal of the capture delay element is reduced, thereby increasing the delay of the clock signal passing through the capture delay element.

[0136] It can be understood that in the embodiment of the present application, the "third current source 721, the fourth current source 722, the third switch S21 and the fourth switch S22" constitute the control circuit of the second capacitor module, which is used to control the charging and discharging of the second capacitor module according to the third control signal UP2 and the fourth control signal DOWN2. In practical applications, those skilled in the art can also set other control circuits in the second loop filter 602 to realize the charging and discharging control of the second capacitor module, and the embodiment of the present application does not specifically limit this.

[0137] In summary, in the embodiment of the present application, the second phase detector 502 can detect the second propagation state of the first clock signal HRCLK1 through the second capture delay line 202, and output the third control signal UP2 or the fourth control signal DOWN2 according to the second propagation state. The second loop filter 602 can adjust the delay time of the second capture delay line 202 according to the third control signal UP2 and the fourth control signal DOWN2, thereby ensuring that the second capture delay line 202 has a stable delay time, and improving the measurement accuracy of the pulse width.

[0138] In addition, since the second phase detector 502 can detect the second propagation state of the first clock signal HRCLK1 through the second capture delay line 202, the second capture delay line 202 can also be prevented from being mislocked in the embodiment of the present application.

[0139] It should be pointed out that Fig.13 The other parts of the capture circuit shown can be seen in Figure 5-Figure 12 For the sake of brevity, the description of the illustrated embodiment will not be repeated here.

[0140] Corresponding to the above embodiment, the embodiment of the present application also provides a microprocessor chip.

[0141] See also Fig.14 , is a schematic diagram of the structure of a microprocessor chip provided in an embodiment of the present application. Fig.14 As shown, the microprocessor chip includes a capture circuit. The specific content of the capture circuit can be found in the description of the above embodiment, and will not be repeated here for the sake of brevity.

[0142] In a specific implementation, the microprocessor chip may be a control module, DSP, MPU, micro CPU, etc., which can process digital signals, analog signals, or perform signal control functions, instruction processing and calculation functions, and a micro central control chip, system-on-chip chip, etc. The embodiment of the present application does not limit its product form and specific functions.

[0143] For specific contents of the embodiments of the present application, please refer to the description of the above embodiments. For the sake of brevity, they will not be repeated here.

[0144] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0145] Those of ordinary skill in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0146] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0147] In several embodiments provided in the present application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0148] The above is only a specific implementation of the present application. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. The protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A capture circuit, characterized in that: include: A first circuit, the first circuit comprising N first delay devices and logic gates, wherein the N first delay devices and logic gates are sequentially coupled to form a ring; a second circuit, the second circuit comprising A second delay devices coupled in sequence to transmit a first clock signal generated according to the first circuit in a first direction along a first signal path, and transmit a signal to be detected in a second direction opposite to the first direction along a second signal path, A≥2; a third circuit, the third circuit comprising B second delay devices coupled in sequence to transmit a second clock signal generated according to the first circuit along a third signal path in the first direction, and to transmit a signal to be detected along a fourth signal path in the second direction, B≥2, N=A+B; a phase detection unit, configured to detect a first propagation state of the first clock signal through the second circuit, and output a first control signal or a second control signal according to the first propagation state; and / or to detect a second propagation state of the second clock signal through the third circuit, and output a third control signal or a fourth control signal according to the second propagation state; a loop filter unit, configured to control the second circuit to reduce delay when receiving a first control signal output by the phase detection unit, and control the second circuit to increase delay when receiving a second control signal output by the phase detection unit; and / or control the third circuit to reduce delay when receiving a third control signal output by the phase detection unit, and control the third circuit to increase delay when receiving a fourth control signal output by the phase detection unit; Wherein, when the first propagation state indicates that the delay of the second circuit is longer than the first delay expectation, the first control signal is output, and when the first propagation state indicates that the delay of the second circuit is shorter than the first delay expectation, the second control signal is output; and / or, when the second propagation state indicates that the delay of the third circuit is longer than the second delay expectation, the third control signal is output, and when the second propagation state indicates that the delay of the third circuit is shorter than the second delay expectation, the fourth control signal is output.

2. The capture circuit according to claim 1, characterized in that: The loop filter unit comprises: A first loop filter, the first loop filter comprising a first capacitor module, a first end of the first capacitor module being electrically connected to the control ends of the A second delay devices of the second circuit respectively, a second end of the first capacitor module being grounded, and the first loop filter being used for: When receiving the first control signal output by the phase detection unit, controlling the first capacitor module to charge so that the second circuit reduces the delay; When the second control signal output by the phase detection unit is received, the first capacitor module is controlled to discharge so that the second circuit increases the delay.

3. The capture circuit according to claim 2, characterized in that: The first capacitor module includes a plurality of capacitors connected in parallel.

4. The capture circuit according to claim 1, characterized in that: The loop filter unit comprises: A second loop filter, the second loop filter comprising a second capacitor module, a first end of the second capacitor module being electrically connected to the control ends of the B second delay devices of the third circuit respectively, a second end of the second capacitor module being grounded, and the second loop filter being used for: When receiving a third control signal output by the phase detection unit, controlling the second capacitor module to charge so that the third circuit reduces delay; When the fourth control signal output by the phase detection unit is received, the second capacitor module is controlled to discharge, so that the third circuit increases the delay.

5. The capture circuit according to claim 4, characterized in that: The second capacitor module includes a plurality of capacitors connected in parallel.

6. The capture circuit according to claim 1, characterized in that: The phase detection unit comprises: a first phase detector, configured to detect a first propagation state of the first clock signal through the second circuit, and output a first control signal or a second control signal according to the first propagation state; and / or, The second phase detector is used to detect a second propagation state of the second clock signal through the third circuit, and output a third control signal or a fourth control signal according to the second propagation state.

7. The capture circuit according to claim 6, characterized in that: The first phase detector is specifically used for: receiving a plurality of first delayed signals outputted from first output terminals of a plurality of second delay devices in the second circuit; comparing the plurality of the first delayed signals with a first reference clock signal to determine a first propagation state of the second circuit; outputting a first control signal or a second control signal according to the first propagation state; The first output end is an output end for transmitting signals along the first direction.

8. The capture circuit according to claim 6, characterized in that: The second phase detector is specifically used for: receiving a plurality of second delayed signals outputted from first output terminals of a plurality of second delay devices in the third circuit; comparing the plurality of the second delayed signals with a second reference clock signal to determine a second propagation state of the third circuit; outputting a third control signal or a fourth control signal according to the second propagation state; The first output end is an output end for transmitting signals along the first direction.

9. The capture circuit according to claim 1, characterized in that: The first delay is expected to be (A / N)*T, and the second delay is expected to be (B / N)*T, where T is a clock period of the first clock signal or the second clock signal.

10. A microprocessor chip, characterized in that: The capture circuit comprises the capture circuit according to any one of claims 1 to 9.