Clock circuit function detection system
By designing voltage generation, control, start-up and self-test output circuits in the clock chip, internal source and sink current detection is realized, which solves the problem of traditional detection methods requiring external test circuits, reduces costs and improves detection efficiency and reliability. .
Patent Information
- Application Number
- CN202420087931.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-15
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2034-01-15
AI Technical Summary
Traditional clock chip detection requires external construction of test circuits, resulting in increased production hours and costs.
Design a clock circuit function detection system, including a voltage generation circuit, a control circuit, an oscillator circuit and a self-test output circuit. The internal pull-and-sink current detection circuit enables the clock chip to self-test the driving ability, and uses the control signal and the reference voltage for comparison. Yes, generate an enable signal to output the detection result.
The self-detection capability of the clock chip is realized, the detection cost is reduced, the detection efficiency is improved, manual intervention is reduced, and the reliability and safety of detection are improved.
Smart Images

Figure CN221707654U
Abstract
Description
Technical Field
[0001] The utility model relates to the technical field of clock circuit detection, in particular to a clock circuit function detection system. Background Art
[0002] Crystal oscillator modules and circuits are one of the most important components of various timing circuits as the reference timing of the system. The driving capability of the clock chip can be confirmed by testing the Sink & Source current. When testing traditional clock chips, it is necessary to build test circuits and test environments externally, and manually collect and analyze relevant data, which takes up chip production time and increases costs. Summary of the invention
[0003] The technical problem to be solved by the utility model is to provide a clock circuit function detection system, which can realize the self-detection of the driving ability of the clock chip, and reduce the chip detection cost while ensuring the reliability and safety of the product.
[0004] The technical solution adopted by the utility model to solve the technical problem is: to provide a clock circuit function detection system, including:
[0005] A voltage generating circuit, used for generating and outputting a set voltage;
[0006] A control circuit, used for acquiring a control signal and generating an enable signal according to the control signal;
[0007] an oscillator circuit connected to the crystal oscillator, the oscillator circuit being used to generate and output one of a detection voltage and an oscillation signal according to the enable signal, the detection voltage comprising a first detection voltage and a second detection voltage;
[0008] The self-detection output circuit is used to select, according to the enable signal, to convert the oscillation signal into a clock signal for output, or to select to use the detection voltage and the set voltage to perform current source / sink self-detection and output the detection result.
[0009] Furthermore, the control circuit comprises:
[0010] A first voltage divider circuit, used to generate a first reference voltage, a second reference voltage and a third reference voltage;
[0011] The enabling switch circuit is used to compare the control signal with the first reference voltage, the second reference voltage and the third reference voltage respectively to obtain a first enabling signal, a second enabling signal and a third enabling signal.
[0012] Furthermore, the voltage values of the first reference voltage, the second reference voltage and the third reference voltage decrease in sequence.
[0013] Further, the enabling switch circuit includes: a first comparator, a second comparator, a third comparator, a first switch device, a second switch device and a third switch device; the first input port of the first comparator is connected to the control signal, the second input port is connected to the first reference voltage, and the output port is connected to the control port of the second switch device and the first port of the third switch device; the first input port of the second comparator is connected to the control signal, the second input port is connected to the second reference voltage, and the output port is connected to the control port of the first switch device and the first port of the second switch device; the first input port of the third comparator is connected to the control signal, the second input port is connected to the third reference voltage, and the output port is connected to the first port of the first switch device; the second port of the first switch device outputs the first enabling signal, the second port of the second switching device outputs the second enabling signal, the second port of the third switching device outputs the third enabling signal, and the control port of the third switching device is grounded.
[0014] Furthermore, the set voltage includes a first set voltage, a second set voltage and a third set voltage.
[0015] Furthermore, the oscillation starting circuit includes: a fourth switching device, a fifth switching device, a sixth switching device and an inverter; the control port of the fourth switching device is connected to the first enable signal, the second port is grounded, and the first port is connected to the input port of the inverter; the control port of the fifth switching device is connected to the second enable signal, the second port is connected to the first set voltage, and the first port is connected to the input port of the inverter; the control port of the sixth switching device is connected to the third enable signal, the second port is connected to the first port of the crystal oscillator, and the first port is connected to the input port of the inverter; the output port of the inverter is connected to the second port of the crystal oscillator and the input port of the self-test output circuit.
[0016] Furthermore, the self-test output circuit includes a self-test circuit and a comparison logic circuit. The input port of the self-test circuit is connected to the output port of the oscillation circuit. According to the enable signal, the clock signal is output through the output port, or the detection current is output through the detection port. The comparison logic circuit collects the detection current for detection and outputs the detection result.
[0017] Further, the self-test circuit includes: a seventh switch device, an eighth switch device, a ninth switch device, a tenth switch device, an eleventh switch device, a twelfth switch device, a thirteenth switch device, a first OR gate and a detection resistor; the control port of the seventh switch device is connected to the second enable signal, the second port is connected to the first port of the twelfth switch device, and the first port is connected to the first set voltage; the first input port of the first OR gate is connected to the first enable signal, and the second input port is connected to the third enable signal; the control port of the eighth switch device is connected to the output port of the first OR gate, the second port is connected to the first port of the twelfth switch device, and the first port is connected to a digital power supply; the control port of the ninth switch device is connected to the third enable signal, and the second port is connected to the comparison logic circuit The control port of the tenth switch device is connected to the second enable signal, the second port is connected to the first port of the detection resistor, and the first port is connected to the second set voltage; the control port of the eleventh switch device is connected to the first enable signal, the second port is connected to the first port of the detection resistor, and the first port is connected to the third set voltage; the control port of the twelfth switch device is connected to the output port of the oscillator circuit, and the second port is connected to the input port of the comparison logic circuit; the control port of the thirteenth switch device is connected to the output port of the oscillator circuit, the second port is connected to the digital ground, and the first port is connected to the input port of the comparison logic circuit; the second port of the detection resistor is connected to the input port of the comparison logic circuit.
[0018] Furthermore, the comparison logic circuit includes:
[0019] A second voltage divider circuit, used to generate a first threshold voltage and a second threshold voltage;
[0020] A comparison circuit, used for sampling the detection current, and comparing the sampled voltage obtained by sampling with the first threshold voltage and the second threshold voltage to obtain a first comparison result and a second comparison result;
[0021] A logic circuit is used to generate a detection result according to the first comparison result and the second comparison result.
[0022] Further, the logic circuit includes a NOT gate, a fourteenth switch device, a fifteenth switch device, a first NAND gate, a second NAND gate, a first register, a second register and a second OR gate; the input port of the NOT gate is connected to the second comparison result, and the output port is connected to the first port of the fourteenth switch device; the control port of the fourteenth switch device is connected to the second enable signal, and the second port is connected to the second input port of the first NAND gate; the first input port of the first NAND gate is connected to the first comparison result, and the output port is connected to the clock port of the first register; the data port of the first register is connected to a high level, and the first output port is connected to the first port of the second OR gate; the control port of the fifteenth switch device is connected to the first enable signal, the first port is connected to the second comparison result, and the second port is connected to the second input port of the second NAND gate; the first input port of the second NAND gate is connected to the first comparison result, and the output port is connected to the clock port of the second register; the data port of the second register is connected to a high level, and the first output port is connected to the second port of the second OR gate; the output port of the second OR gate outputs the detection result.
[0023] Beneficial Effects
[0024] Due to the adoption of the above-mentioned technical scheme, the utility model has the following advantages and positive effects compared with the prior art: the utility model adds a source-sink current detection circuit to the internal circuit of the clock chip, so that the clock circuit enters the detection mode according to the control signal, obtains the output voltage of the detection node, and obtains the source-sink current detection result and outputs the self-test result by comparing the output voltage with the threshold voltage, so that the clock circuit can perform self-test of the driving capability by only inputting the control signal. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a schematic diagram of the system structure of an implementation mode of the utility model;
[0026] Figure 2 It is a schematic diagram of a voltage generating circuit according to an embodiment of the utility model;
[0027] Figure 3 is a circuit diagram of a control circuit of an embodiment of the utility model;
[0028] Figure 4 It is a circuit diagram of an oscillating circuit according to an embodiment of the utility model;
[0029] Figure 5 It is a circuit diagram of a self-test output circuit according to an embodiment of the utility model;
[0030] Figure 6 is a circuit diagram of a logic circuit according to an embodiment of the present utility model;
[0031] Figure 7 It is a schematic diagram of the output state of the oscillating circuit of the embodiment of the utility model;
[0032] Figure 8 It is a schematic diagram of the output state of the self-test output circuit in the implementation mode of the utility model. DETAILED DESCRIPTION
[0033] The present invention is further described below in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms also fall within the scope defined by the claims attached to this application.
[0034] The embodiment of the utility model relates to a clock circuit function detection system, such as Figure 1 As shown, including:
[0035] A voltage generating circuit, used for generating and outputting a set voltage;
[0036] A control circuit, used for generating an enable signal according to a control signal;
[0037] An oscillator circuit, connected to the crystal oscillator, for generating and outputting one of a detection voltage and an oscillation signal according to an enable signal, wherein the detection voltage includes a first detection voltage and a second detection voltage;
[0038] The self-test output circuit is used to convert the oscillation signal into a clock signal output according to the enable signal, or to use the detection voltage and the set voltage to perform the source and sink current detection and output the detection result.
[0039] The present implementation is further described below in conjunction with a specific circuit.
[0040] First, the voltage generating circuit, such as Figure 2 As shown, it is used to generate and output a first set voltage, a second set voltage and a third set voltage, and the above set voltages are set according to actual experience, for example, they can be set to 3V, 2.4V and 0.6V respectively.
[0041] Second, the control circuit, such as Figure 3 As shown, including:
[0042] A first voltage divider circuit is used to generate a first reference voltage V1, a second reference voltage V2 and a third reference voltage V3 with decreasing voltage values in sequence;
[0043] The enabling switch circuit is used to compare the control signal EN with the first reference voltage, the second reference voltage and the third reference voltage respectively to obtain the first enabling signal A, the second enabling signal B and the third enabling signal C.
[0044] Among them, the enabling switch circuit includes: a first comparator OP1, a second comparator OP2, a third comparator OP3, a first switch device Q1, a second switch device Q2 and a third switch device Q3; the first input port of the first comparator OP1 is connected to the control signal, the second input port is connected to the first reference voltage, and the output port is connected to the first end of the second switch device Q2 and the third end of the third switch device Q3; the first input port of the second comparator OP2 is connected to the control signal, the second input port is connected to the second reference voltage, and the output port is connected to the first end of the first switch device Q1 and the third end of the second switch device Q2; the first input port of the third comparator OP3 is connected to the control signal, the second input port is connected to the third reference voltage, and the output port is connected to the third end of the first switch device Q1; the second port of the first switch device Q1 outputs the first enabling signal A, the second port of the second switch device Q2 outputs the second enabling signal B, the second port of the third switch device Q3 outputs the third enabling signal C, and the control port of the third switch device Q3 is grounded.
[0045] The logical relationship between the reference voltage and the enable signal is shown in Table 1 below.
[0046]
[0047] Table 1. EN control circuit status table
[0048] Third, the oscillator circuit, such as Figure 4 As shown, it includes: a fourth switch device Q4, a fifth switch device Q5, a sixth switch device Q6 and an inverter; the control port of the fourth switch device Q4 is connected to the first enable signal A, the second port is grounded, and the first port is connected to the input port of the inverter; the control port of the fifth switch device Q5 is connected to the second enable signal B, the second port is connected to the first set voltage, and the first port is connected to the input port of the inverter; the control port of the sixth switch device Q6 is connected to the third enable signal C, the second port is connected to the first port of the crystal oscillator, and the first port is connected to the input port of the inverter; the output port of the inverter is connected to the second port of the crystal oscillator and the input port of the self-test output circuit.
[0049] like Figure 7 As shown, the three enable signals A, B, and C respectively control the on / off of the switch devices Q4, Q5, and Q6, so that the output port COUT of the oscillator circuit outputs output signals corresponding to the three states of source current detection, sink current detection, and normal clock output.
[0050] Fourth, the self-test output circuit includes a self-test circuit and a comparison logic circuit. The input port of the self-test circuit is connected to the output port of the oscillation circuit. According to the enable signal, the clock signal is output through the output port, or the detection current is output through the detection port. The comparison logic circuit collects the detection current for detection and outputs the detection result.
[0051] like Figure 5 As shown, the self-test circuit includes: a seventh switch device Q7, an eighth switch device Q8, a ninth switch device Q9, a tenth switch device Q10, an eleventh switch device Q11, a twelfth switch device Q12, a thirteenth switch device Q13, a first OR gate and a detection resistor; the control port of the seventh switch device Q7 is connected to the second enable signal B, the second port is connected to the first port of the twelfth switch device Q12, and the first port is connected to the first set voltage; the first input port of the first OR gate is connected to the first enable signal A, and the second input port of the first OR gate is connected to the third enable signal C; the control port of the eighth switch device Q8 is connected to the output port of the first OR gate, the second port is connected to the first port of the twelfth switch device Q12, and the first port is connected to the digital power supply; the control port of the ninth switch device Q9 is connected to the third enable signal C The first port is connected to the output port of the oscillator circuit, the second port is connected to the input port of the comparison logic circuit, and the first port outputs a clock signal; the control port of the tenth switch device Q10 is connected to the second enable signal B, the second port is connected to the first port of the detection resistor, and the first port is connected to the second set voltage; the control port of the eleventh switch device Q11 is connected to the first enable signal A, the second port is connected to the first port of the detection resistor, and the first port is connected to the third set voltage; the control port of the twelfth switch device Q12 is connected to the output port of the oscillator circuit, and the second port is connected to the input port of the comparison logic circuit; the control port of the thirteenth switch device Q13 is connected to the output port of the oscillator circuit, the second port is connected to the digital ground, and the first port is connected to the input port of the comparison logic circuit; the second port of the detection resistor is connected to the input port of the comparison logic circuit.
[0052] The output status table of the self-test circuit output port is as follows Figure 8 shown.
[0053] The comparison logic circuit includes:
[0054] A second voltage divider circuit, used to generate a first threshold voltage VO1 and a second threshold voltage VO2;
[0055] A comparison circuit is used to sample the detection current and compare the sampled voltage with the first threshold voltage VO1 and the second threshold voltage VO2 to obtain a first comparison result and a second comparison result;
[0056] The logic circuit is used to generate a detection result PG according to the first comparison result and the second comparison result.
[0057] Among them, the comparison circuit includes: a fourth comparator OP4 and a fifth comparator OP5; the first input port of the fourth comparator OP4 is connected to the first threshold voltage VO1, the second input port is connected to the detection port of the self-test circuit, and the output port is connected to the first input port of the logic circuit; the first input port of the fifth comparator OP5 is connected to the detection port of the self-test circuit, the second input port is connected to the second threshold voltage VO2, and the output port is connected to the first input port of the logic circuit.
[0058] like Figure 6 As shown, the logic circuit includes a NOT gate, a fourteenth switch device Q14, a fifteenth switch device Q15, a first NAND gate NAND1, a second NAND gate NAND2, a first register R1, a second register R2 and a second OR gate; the input port of the NOT gate is connected to the second comparison result, and the output port is connected to the first port of the fourteenth switch device Q14; the control port of the fourteenth switch device Q14 is connected to the second enable signal, and the second port is connected to the second input port of the first NAND gate NAND1; the first input port of the first NAND gate NAND1 is connected to the first comparison result, and the output port is connected to the clock port of the first register R1. The data port of the first register R1 is connected to a high level, and the first output port is connected to the first port of the second OR gate; the control port of the fifteenth switch device Q15 is connected to the first enable signal, the first port is connected to the second comparison result, and the second port is connected to the second input port of the second NAND gate NAND2; the first input port of the second NAND gate NAND2 is connected to the first comparison result, and the output port is connected to the clock port of the second register R2; the data port of the second register R2 is connected to a high level, and the first output port is connected to the second port of the second OR gate; the output port of the second OR gate outputs the detection result
[0059] As shown in Table 2 below, OP4 and OP5 of the self-test circuit send I and II states to the logic module respectively during source current detection and sink current detection. The logic module determines whether the source current and sink current are lower than the detection set value based on I and II states. If an abnormality is detected, PG sends a high level.
[0060]
[0061] Table 2. Logical module status table
[0062] Through the self-test output circuit, the digital power supply VDD generates two additional threshold voltages VO1 and VO2, and the switch devices Q12 and Q13 form a reverse output circuit. The enable signals A, B, and C control the on and off states of the switch devices Q7 to Q13 to form a source and sink current measurement circuit. Comparators OP4 and OP5 compare the sampled currents of the source current and the sink current respectively, and output the PG signal through the logic module to realize the self-test of the chip.
Claims
1. A clock circuit function detection system, characterized in that: include: A voltage generating circuit, used for generating and outputting a set voltage; A control circuit, used for acquiring a control signal and generating an enable signal according to the control signal; an oscillator circuit connected to the crystal oscillator, the oscillator circuit being used to generate and output one of a detection voltage and an oscillation signal according to the enable signal, the detection voltage comprising a first detection voltage and a second detection voltage; The self-detection output circuit is used to select, according to the enable signal, to convert the oscillation signal into a clock signal for output, or to select to use the detection voltage and the set voltage to perform current source / sink self-detection and output the detection result.
2. The system according to claim 1, characterized in that The control circuit comprises: A first voltage divider circuit, used to generate a first reference voltage, a second reference voltage and a third reference voltage; The enabling switch circuit is used to compare the control signal with the first reference voltage, the second reference voltage and the third reference voltage respectively to obtain a first enabling signal, a second enabling signal and a third enabling signal.
3. The system according to claim 2, characterized in that The voltage values of the first reference voltage, the second reference voltage and the third reference voltage decrease in sequence.
4. The system according to claim 2, characterized in that The enabling switch circuit includes: a first comparator, a second comparator, a third comparator, a first switch device, a second switch device and a third switch device; the first input port of the first comparator is connected to the control signal, the second input port is connected to the first reference voltage, and the output port is connected to the control port of the second switch device and the first port of the third switch device; the first input port of the second comparator is connected to the control signal, the second input port is connected to the second reference voltage, and the output port is connected to the control port of the first switch device and the first port of the second switch device; the first input port of the third comparator is connected to the control signal, the second input port is connected to the third reference voltage, and the output port is connected to the first port of the first switch device; the second port of the first switch device outputs the first enabling signal, the second port of the second switch device outputs the second enabling signal, the second port of the third switch device outputs the third enabling signal, and the control port of the third switch device is grounded.
5. The system according to claim 2, characterized in that The set voltage includes a first set voltage, a second set voltage and a third set voltage.
6. The system according to claim 5, characterized in that The oscillation starting circuit includes: a fourth switch device, a fifth switch device, a sixth switch device and an inverter; the control port of the fourth switch device is connected to the first enable signal, the second port is grounded, and the first port is connected to the input port of the inverter; the control port of the fifth switch device is connected to the second enable signal, the second port is connected to the first set voltage, and the first port is connected to the input port of the inverter; the control port of the sixth switch device is connected to the third enable signal, the second port is connected to the first port of the crystal oscillator, and the first port is connected to the input port of the inverter; the output port of the inverter is connected to the second port of the crystal oscillator and the input port of the self-test output circuit.
7. The system according to claim 5, characterized in that The self-test output circuit includes a self-test circuit and a comparison logic circuit. The input port of the self-test circuit is connected to the output port of the oscillation circuit. According to the enable signal, the clock signal is output through the output port, or the detection current is output through the detection port. The comparison logic circuit collects the detection current for detection and outputs the detection result.
8. The system according to claim 7, characterized in that The self-test circuit includes: a seventh switch device, an eighth switch device, a ninth switch device, a tenth switch device, an eleventh switch device, a twelfth switch device, a thirteenth switch device, a first OR gate and a detection resistor; the control port of the seventh switch device is connected to the second enable signal, the second port is connected to the first port of the twelfth switch device, and the first port is connected to the first set voltage; the first input port of the first OR gate is connected to the first enable signal, and the second input port is connected to the third enable signal; the control port of the eighth switch device is connected to the output port of the first OR gate, the second port is connected to the first port of the twelfth switch device, and the first port is connected to a digital power supply; the control port of the ninth switch device is connected to the third enable signal, the second port is connected to the input port of the comparison logic circuit, and the second input port is connected to the output port of the first OR gate. The control port of the tenth switch device is connected to the second enable signal, the second port is connected to the first port of the detection resistor, and the first port is connected to the second set voltage; the control port of the eleventh switch device is connected to the first enable signal, the second port is connected to the first port of the detection resistor, and the first port is connected to the third set voltage; the control port of the twelfth switch device is connected to the output port of the oscillator circuit, and the second port is connected to the input port of the comparison logic circuit; the control port of the thirteenth switch device is connected to the output port of the oscillator circuit, the second port is connected to the digital ground, and the first port is connected to the input port of the comparison logic circuit; the second port of the detection resistor is connected to the input port of the comparison logic circuit.
9. The system according to claim 7, characterized in that The comparison logic circuit comprises: A second voltage divider circuit is used to generate a first threshold voltage and a second threshold voltage, wherein the first threshold voltage is greater than the second threshold voltage; A comparison circuit, used for sampling the detection current, and comparing the sampled voltage obtained by sampling with the first threshold voltage and the second threshold voltage respectively, and outputting a first comparison result and a second comparison result; A logic circuit is used to generate a detection result according to the first comparison result and the second comparison result.
10. The system according to claim 9, characterized in that The logic circuit includes a NOT gate, a fourteenth switch device, a fifteenth switch device, a first NAND gate, a second NAND gate, a first register, a second register and a second OR gate; an input port of the NOT gate is connected to the second comparison result, and an output port is connected to the first port of the fourteenth switch device; a control port of the fourteenth switch device is connected to the second enable signal, and a second port is connected to the second input port of the first NAND gate; a first input port of the first NAND gate is connected to the first comparison result, and an output port is connected to the clock port of the first register; a data port of the first register is connected to a high level, and a first output port is connected to the first port of the second OR gate; a control port of the fifteenth switch device is connected to the first enable signal, a first port is connected to the second comparison result, and a second port is connected to the second input port of the second NAND gate; a first input port of the second NAND gate is connected to the first comparison result, and an output port is connected to the clock port of the second register; a data port of the second register is connected to a high level, and a first output port is connected to the second port of the second OR gate; an output port of the second OR gate outputs the detection result.
