Clock frequency division circuit and electronic equipment
By introducing a clock frequency division circuit into the chip design and using control circuits and flip-flops to collect the rising and falling edges of the clock signal to ensure a 50% duty cycle of the clock output signal, the high complexity and odd frequency division of the clock in the chip are solved. The problem of high cost and low reusability has been achieved with the effect of simple structure, low cost and high reusability.
Patent Information
- Application Number
- CN202210746375.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-29
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2042-06-29
AI Technical Summary
In the existing chip design, it is difficult to guarantee the 50% duty cycle of the odd frequency division of the clock, resulting in a limited number of PLLs, high cost, high complexity and low reusability when increasing clock frequency support.
Design a clock frequency division circuit, including a control circuit, a flip-flop and an output logic gate circuit. By receiving an external clock signal and frequency division coefficient, it outputs an odd/even trigger signal, collects the rising edge and falling edge of the clock signal, and ensures the accuracy of the output. The clock signal duty cycle remains at 50%.
It achieves 50% duty cycle maintenance of the clock output signal under odd and even frequency division coefficients, simplifies the circuit structure, reduces production costs, and improves device reusability.
Smart Images

Figure CN115085719B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of clock frequency dividers, and in particular to a clock frequency dividing circuit and electronic equipment. Background Art
[0002] At present, peripheral interfaces such as SD / eMMC interface, SPI interface, I2C interface, Ethernet, etc. all require a clock with a 50% duty cycle, but the number of phase-locked loops (PLL) in the chip is limited, and it is impossible to provide multiple different clock frequencies. In order to reduce the number of PLLs in the chip, a clock divider with a 50% duty cycle is needed at this time; in the digital design of the chip, the even division of the clock divider can guarantee a 50% duty cycle, but it is difficult to guarantee a 50% duty cycle for the odd division of the clock, and the odd division of the clock is generally implemented by analog circuits. The number of PLLs in chip design is limited. In order to generate more clock frequencies, a clock divider that supports an odd 50% duty cycle has a great impact on chip function, area, and cost. Summary of the invention
[0003] The main purpose of the present invention is to provide a clock frequency dividing circuit electronic device, aiming to solve the problems of complex structure, high production cost and low reusability of the clock frequency divider supporting odd and even 50% duty cycles.
[0004] To achieve the above object, the present invention provides a clock frequency division circuit comprising:
[0005] A control circuit, the control circuit is used to receive a clock signal and a clock frequency division coefficient output by a first external device, and output a corresponding odd / even trigger signal through an output terminal according to the clock frequency division coefficient, the control circuit is also used to count the received clock signal to obtain a count value, and output a flip trigger signal through the output terminal according to a corresponding relationship between the count value and the clock frequency division coefficient;
[0006] a first trigger, wherein the input end of the first trigger is connected to the output end of the control circuit; the first trigger is used to receive the clock signal output by the first external device, and when receiving the flip trigger signal, collect the rising edge of the clock signal to output a first clock collection signal corresponding to the rising edge of the clock signal;
[0007] a second trigger, wherein the input end of the second trigger is respectively connected to the output end of the first trigger and the output end of the control circuit; the second trigger is used for collecting the falling edge of the clock signal when receiving the odd trigger signal and the first clock collection signal, so as to output a second clock collection signal corresponding to the falling edge of the clock signal;
[0008] An output logic gate circuit, wherein the input end of the output logic gate circuit is respectively connected to the output end of the first trigger and the output end of the second trigger, and the output end of the output logic gate circuit is used to connect to a second external device. The output logic gate circuit is also used to output a clock output signal with a corresponding duty cycle to the second external device when the first clock acquisition signal and the second clock acquisition signal meet a second preset trigger condition.
[0009] Optionally, the control circuit includes:
[0010] a counter, the counter being used to receive the clock signal output by the first external device, and to count the received clock signal to output the corresponding count value;
[0011] a processor, the processor being electrically connected to the counter, the processor being used to receive the clock frequency division coefficient, and outputting the corresponding odd / even trigger signal through an output terminal according to the clock frequency division coefficient, and the processor being further used to output a plurality of corresponding determination signals through the output terminal in sequence according to the received count value and the correspondence between the count value and the clock frequency division coefficient;
[0012] A control logic gate circuit, wherein the input end of the control logic gate circuit is connected to the output end of the processor, and the control logic gate circuit is used to output the flip trigger signal to the first trigger through the output end when the multiple judgment signals meet the first preset trigger condition.
[0013] Optionally, the processor is used to output the odd trigger signal to the second trigger when the frequency division coefficient is an odd number, so as to trigger the second trigger to start collecting the falling edge of the clock signal; when the frequency division coefficient is an even number, output the even trigger signal to the second trigger to trigger the second trigger to stop collecting the falling edge of the clock signal.
[0014] Optionally, the processor outputs a plurality of corresponding judgment signals including: a first judgment signal, a second judgment signal and a third judgment signal;
[0015] The processor outputs the first judgment signal to the control logic gate circuit when the count value is equal to the frequency division coefficient or the count value is equal to 0; outputs the second judgment signal to the control logic gate circuit when the count value is equal to half of the frequency division coefficient and the frequency division coefficient is an even number; outputs the third judgment signal to the control logic gate circuit when the count value is equal to half of the frequency division coefficient minus 1 and the frequency division coefficient is an odd number;
[0016] The control logic gate circuit is used to output the flip trigger signal to the first trigger when any one of the received first judgment signal, the second judgment signal or the third judgment signal is high.
[0017] Optionally, the control logic gate circuit includes:
[0018] A first OR gate, wherein the first OR gate has a first input terminal and a second input terminal, wherein the first input terminal and the second input terminal are respectively connected to an output terminal of the processor, and the first OR gate is used to output a first logic signal when either the first judgment signal or the second judgment signal is high;
[0019] A second OR gate, the second OR gate has a first input terminal and a second input terminal, the first input terminal and the second input terminal are respectively connected to the output terminal of the processor and the output terminal of the first OR gate, and the second OR gate is used to output the flip trigger signal to the first trigger when either the first logic signal or the third judgment signal is high.
[0020] Optionally, the first trigger is used to collect the rising edge of the clock signal when receiving the flip trigger signal as high, and output a high first clock collection signal to the second trigger and the output logic gate circuit;
[0021] The second trigger is used to collect the falling edge of the clock signal output by the first external device when the odd trigger signal is received and the first clock collection signal is high, and output the high second clock collection signal to the output logic gate circuit.
[0022] Optionally, the first trigger is used to collect the rising edge of the clock signal when receiving the flip trigger signal as high, and output a high first clock collection signal to the second trigger and the output logic gate circuit;
[0023] The second trigger is used to stop collecting the falling edge of the clock signal output by the first external device and output the low second clock collection signal to the output logic gate circuit when receiving the even trigger signal.
[0024] Optionally, the first trigger has a first input terminal, a second input terminal and a clock collection terminal, the first input terminal of the first trigger is connected to the output terminal of the trigger, the second input terminal of the first trigger is connected to the output terminal of the control logic gate circuit, and the clock collection terminal of the first trigger is used to collect a clock signal;
[0025] The second trigger has a first input terminal, a second input terminal and a clock collection terminal. The first input terminal of the second trigger is connected to the output terminal of the first trigger, the second input terminal of the second trigger is connected to the output terminal of the control circuit, and the clock collection terminal of the second trigger is used to collect a clock signal.
[0026] Optionally, the output logic gate circuit includes:
[0027] A third OR gate, wherein a first input terminal of the third OR gate is connected to an output terminal of the first trigger, a second input terminal of the third OR gate is connected to an output terminal of the second trigger, an output terminal of the third OR gate is used to connect to the second external device, and the third OR gate is used to output a high clock output signal to the second external device when either the first clock acquisition signal or the second clock acquisition signal is received high.
[0028] The present invention further provides an electronic device, comprising any one of the clock frequency division circuits described above.
[0029] In the technical solution of the present invention, the control circuit can receive the clock signal and the clock division coefficient output by the first external device, and output the corresponding odd / even trigger signal through the output end according to the clock division coefficient. The control circuit can also count the received clock signal to obtain a count value, and output a flip trigger signal to the first trigger through the output end according to the correspondence between the count value and the clock division coefficient. The first trigger is used to collect the rising edge of the clock signal when the flip trigger signal is received, and output the corresponding first clock collection signal to the second trigger. The second trigger is used to collect / not collect the falling edge of the clock signal according to the received odd / even trigger signal and the first clock collection signal, so as to output the corresponding second clock collection signal to the output logic gate circuit. The output logic gate circuit is used to output the clock output signal of the corresponding duty cycle to the external device when the first clock collection signal and the second clock collection signal meet the preset trigger condition, so that the duty cycle of the clock output signal output by the output logic gate circuit to the second external device according to the first clock collection signal and the second clock collection signal can be maintained at 50%. When the clock frequency division circuit of the present scheme receives an odd frequency division signal, the falling edge of the clock signal is collected by the second trigger, and the generated second clock collection signal is delayed by half a clock signal cycle compared with the first clock collection signal, and then the first clock collection signal and the second clock collection signal are output through the output logic gate circuit so that the clock output signal with a 50% duty cycle can be output when the preset trigger condition is met; therefore, when the clock frequency divider of the present scheme receives an even frequency division coefficient and an odd frequency division coefficient, the duty cycle of the output clock output signal can be maintained at 50%, and the clock frequency divider implementing this method has a simple structure, low production cost, and the devices used are little affected by temperature and process changes, so it has high reusability. The present invention solves the problems of complex structure, high production cost and low reusability of clock frequency dividers supporting odd and even 50% duty cycles. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.
[0031] Figure 1 A schematic diagram of the circuit structure of an embodiment of a clock frequency division circuit of the present invention;
[0032] Figure 2 It is an even-number frequency division timing diagram of an embodiment of a clock frequency division circuit of the present invention;
[0033] Figure 3 FIG. 1 is a timing diagram of an odd-number frequency division circuit according to an embodiment of the present invention.
[0034] Description of Figure Numbers:
[0035] Label name Label name 10 counter 51 The third OR gate 20 processor 41 First trigger 31 First OR Gate 42 Second trigger 32 Second OR gate
[0036] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0038] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0039] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0040] At present, peripheral interfaces such as SD / eMMC interface, SPI interface, I2C interface, Ethernet, etc. all require a clock with a 50% duty cycle, but the number of PLLs in the chip is limited and cannot provide multiple different clock frequencies. In order to reduce the number of PLLs in the chip, a clock divider with a 50% duty cycle is needed at this time; in the digital design of the chip, the even division of the clock divider can guarantee a 50% duty cycle, but it is difficult to guarantee a 50% duty cycle for the odd division of the clock, and the odd division of the clock is generally implemented by analog circuits. The number of PLLs in chip design is limited. In order to generate more clock frequencies, a clock divider that supports an odd 50% duty cycle has a great impact on chip function, area, and cost.
[0041] The invention provides a clock frequency dividing circuit which is applied to a clock frequency divider.
[0042] In one embodiment of the present invention, the clock frequency division circuit includes:
[0043] A control circuit, the control circuit is used to receive a clock signal and a clock frequency division coefficient output by a first external device, and output a corresponding odd / even trigger signal through an output terminal according to the clock frequency division coefficient, the control circuit is also used to count the received clock signal to obtain a count value, and output a flip trigger signal through the output terminal according to a corresponding relationship between the count value and the clock frequency division coefficient;
[0044] a first trigger 41, wherein the input end of the first trigger 41 is connected to the output end of the control circuit; the first trigger 41 is used to receive the clock signal output by the first external device, and when receiving the flip trigger signal, collect the rising edge of the clock signal to output a first clock collection signal corresponding to the rising edge of the clock signal;
[0045] a second trigger 42, wherein the input end of the second trigger 42 is respectively connected to the output end of the first trigger 41 and the output end of the control circuit; the second trigger 42 is used for collecting the falling edge of the clock signal when receiving the odd trigger signal and the first clock collection signal, so as to output a second clock collection signal corresponding to the falling edge of the clock signal;
[0046] An output logic gate circuit, wherein the input end of the output logic gate circuit is respectively connected to the output end of the first trigger 41 and the second trigger 42, and the output end of the output logic gate circuit is used to connect to a second external device. The output logic gate circuit is also used to output a clock output signal with a corresponding duty cycle to the second external device when the first clock acquisition signal and the second clock acquisition signal meet a second preset trigger condition.
[0047] Reference Figures 1 to 3In one embodiment of the present invention, the control circuit can receive the clock signal and the clock frequency division coefficient output by the first external device, and output the corresponding odd / even trigger signal to the second trigger 42 through the output end according to the clock frequency division coefficient, and count the received clock signal to obtain the count value, and then output the flip trigger signal to the first trigger 41 through the output end according to the correspondence between the count value and the clock frequency division coefficient; for example, when the clock frequency division coefficient is an odd number, the control circuit will output an odd trigger signal to the second trigger 42, and when the clock frequency division coefficient is an even number, the control circuit will output an even trigger signal to the second trigger 42; the control circuit can output the flip trigger signal to the first trigger when the count value and the clock frequency division coefficient meet the correspondence; for example, when the count value is equal to the frequency division coefficient or the count value is equal to 0, when the count value is equal to half of the frequency division coefficient and the frequency division coefficient is an even number, when the count value is equal to half of the frequency division coefficient minus 1 and the frequency division coefficient is an odd number; the specific correspondence can also be set according to actual conditions, including but not limited to the above-mentioned types.
[0048] The first trigger 41 used in this embodiment will collect the rising edge of the clock signal. After collecting the rising edge of the clock signal according to the received flip trigger signal, the first trigger 41 outputs the corresponding first clock collection signal to the second trigger 42 and the output logic gate circuit. For example, after the received flip trigger signal is 1 and the rising edge of the clock signal is collected, the first clock collection signal continuously output to the second trigger 42 and the output logic gate circuit is 1, until the received flip trigger signal is 0 and the rising edge of the clock signal is collected, the first clock collection signal continuously output to the second trigger 42 and the output logic gate circuit becomes 0, and this cycle repeats. The second trigger 42 used in this embodiment will collect the falling edge of the clock signal. The second trigger 42 will start collecting the falling edge of the clock signal when it receives an odd trigger signal, and will stop collecting the falling edge of the clock signal when it receives an even trigger signal. After collecting the falling edge of the clock signal according to the received odd trigger signal and the first clock collection signal, the second trigger 42 will output the corresponding second clock collection signal to the output logic gate circuit; for example, the first clock collection signal received by the second trigger 42 is 1 and after collecting the falling edge of the clock signal, the second clock collection signal continuously input to the output logic gate circuit is 1, until the first clock collection signal received by the second trigger 42 is 0 and after collecting the falling edge of the clock signal, the second clock collection signal continuously input to the output logic gate circuit is 0, and this cycle repeats.
[0049] The output logic gate circuit will output the corresponding clock output signal to the external device when the first clock acquisition signal and the second clock acquisition signal meet the preset trigger conditions. In this embodiment, the output logic gate circuit is composed of an OR gate, and the OR gate can receive the first clock acquisition signal and the second clock acquisition signal output by the first trigger 41 and the second trigger 42. The preset trigger condition of the OR gate is that when any one of the first clock acquisition signal and the second clock acquisition signal is 1, the clock output signal output by the OR gate to the external device is 1. When the first clock acquisition signal and the second clock acquisition signal are both 0, the clock output signal output by the OR gate to the external device is 0.
[0050] Specifically, when the frequency division coefficient is an even number, the second trigger 42 receives an even trigger signal. At this time, the second trigger 42 stops working and will not collect the falling edge of the clock signal, so the output second clock collection signal always remains at 0, and the clock output signal output by the output logic gate circuit will change according to the specific changes of the first clock collection signal; when the frequency division coefficient is an even number, the control logic gate circuit outputs a flip trigger signal to the first trigger 41 according to the preset trigger condition, which will make the time of the first clock collection signal 0 and 1 output by the first trigger 41 each occupy half of a frequency division coefficient cycle, so the duty cycle of the clock output signal output by the output logic gate circuit is 50%. When the frequency division coefficient is an odd number, the second trigger 42 receives an odd number trigger signal, and the second trigger 42 starts to work and collects the falling edge of the clock signal. At this time, the clock output signal output by the output logic gate circuit will change according to the specific changes of the first clock collection signal and the second clock collection signal; because the frequency division coefficient is an odd number, the first trigger 41 collects the clock signal along the rising edge of the clock signal, and the control logic gate circuit outputs a flip trigger signal to the first trigger 41 according to the preset trigger condition, which will make the time when the first clock collection signal output by the first trigger 41 is 1 less than the time when the first clock collection signal is 0 by one clock signal cycle, and the second trigger 42 collects the falling edge of the clock signal according to the first clock collection signal output by the first trigger 41, and will generate a second clock collection signal that is delayed by half a clock signal cycle than the first clock collection signal. In this case, after receiving the first clock collection signal and the second clock collection signal, the duty cycle of the clock output signal output by the output logic gate circuit implemented by the OR gate is 50%. The clock divider of the clock division circuit in this scheme can maintain the duty cycle of the output clock output signal at 50% when receiving an even division coefficient and an odd division coefficient. The clock division circuit of this scheme has a simple structure and low production cost. The devices in the circuit are little affected by temperature and process changes, so they have high reusability.
[0051] In the technical solution of the present invention, the control circuit can receive the clock signal and the clock division coefficient output by the first external device, and output the corresponding odd / even trigger signal through the output end according to the clock division coefficient. The control circuit can also count the received clock signal to obtain a count value, and output a flip trigger signal to the first flip-flop 41 through the output end according to the correspondence between the count value and the clock division coefficient. The first flip-flop 41 is used to collect the rising edge of the clock signal when the flip trigger signal is received, and output the corresponding first clock collection signal to the second flip-flop 42. The second flip-flop 42 is used to collect / not collect the falling edge of the clock signal according to the received odd / even trigger signal and the first clock collection signal, so as to output the corresponding second clock collection signal to the output logic gate circuit. The output logic gate circuit is used to output a clock output signal with a corresponding duty cycle to the external device when the first clock collection signal and the second clock collection signal meet the preset trigger condition, so that the duty cycle of the clock output signal output by the output logic gate circuit to the second external device according to the first clock collection signal and the second clock collection signal can be maintained at 50%. When the clock frequency division circuit of the present scheme receives an odd frequency division signal, the falling edge of the clock signal is collected by the second trigger, and the generated second clock collection signal is delayed by half a clock signal cycle compared with the first clock collection signal, and then the first clock collection signal and the second clock collection signal are output through the output logic gate circuit so that the clock output signal with a 50% duty cycle can be output when the preset trigger condition is met; therefore, when the clock frequency divider of the present scheme receives an even frequency division coefficient and an odd frequency division coefficient, the duty cycle of the output clock output signal can be maintained at 50%, and the clock frequency divider implementing this method has a simple structure, low production cost, and the devices used are little affected by temperature and process changes, so it has high reusability. The present invention solves the problems of complex structure, high production cost and low reusability of clock frequency dividers supporting odd and even 50% duty cycles.
[0052] Reference Figures 1 to 3 In one embodiment, the control circuit comprises:
[0053] A counter 10, the counter 10 is used to receive the clock signal output by the first external device, and count the received clock signal to output the corresponding count value;
[0054] A processor 20, the processor 20 being electrically connected to the counter 10, the processor 20 being used to receive the clock frequency division coefficient, and outputting the corresponding odd / even trigger signal through the output terminal according to the clock frequency division coefficient, and the processor 20 being further used to output a plurality of corresponding determination signals through the output terminal in sequence according to the received count value and the correspondence between the count value and the clock frequency division coefficient;
[0055] A control logic gate circuit, wherein the input end of the control logic gate circuit is connected to the output end of the processor, and the control logic gate circuit is used to output the flip trigger signal to the first trigger through the output end when the multiple judgment signals meet the first preset trigger condition.
[0056] In this embodiment, the counter 10 mainly counts the number of pulses to achieve the functions of measurement, counting and control, and also has a frequency division function; the processor 20 can be a programmable logic device (PLD), a field programmable gate array (FPGA), an MCU or other electronic components. The control logic gate circuit and the output logic gate circuit can be implemented by using an OR gate; the first trigger 41 and the second trigger 42 can be a D trigger, which is an information storage device with a memory function and two stable states, and is the most basic logic unit for constituting a variety of sequential circuits. The trigger has two stable states, namely "0" and "1", and can flip from one stable state to another stable state under the action of a certain external signal.
[0057] It can be understood that the counter 10 can count the received clock signal and output the corresponding count value to the processor 20; the processor 20 can obtain the clock division coefficient output by the external device, and output the corresponding odd / even trigger signal according to the clock division coefficient. For example, when the clock division coefficient is an odd number, the processor 20 will output an odd trigger signal to the second trigger 42, and the odd trigger signal can be 1; when the clock division coefficient is an even number, the processor 20 can output an even trigger signal to the second trigger 42, and the even trigger signal can be 0; the processor 20 will also receive the count value received and the corresponding relationship between the count value and the clock division coefficient, and output the corresponding odd / even trigger signal in sequence. Output multiple corresponding judgment signals to the control logic gate circuit; for example, when the value of the frequency division coefficient is equal to the count value, the output judgment signal is 1, and when the value of the frequency division coefficient is not equal to the value of the count signal, the output judgment signal is 0. The specific relationship between the frequency division coefficient and the count value is specifically set corresponding to the situation where the clock frequency division coefficient is an odd number or an even number; the control logic gate circuit will output a flip trigger signal to the first trigger 41 when multiple judgment signals meet the preset trigger condition, for example, when any one of the multiple judgment signals is 1, the flip trigger signal output to the first trigger 41 is 1, and when the multiple judgment signals are all 0, the flip trigger signal output to the first trigger 41 is 0. In this embodiment, the control circuit composed of the counter 10, the processor 20 and the control logic gate circuit can receive the clock signal and the clock frequency division coefficient output by the first external device, and output the corresponding odd / even trigger signal through the output terminal according to the clock frequency division coefficient. The control circuit can also count the received clock signal to obtain the count value, and output the corresponding flip trigger signal to the first trigger 41 through the output terminal according to the corresponding relationship between the count value and the clock frequency division coefficient.
[0058] Reference Figures 1 to 3 In one embodiment, the processor 20 is used to output an odd trigger signal to the second trigger 42 when the frequency division coefficient is an odd number, so as to trigger the second trigger 42 to start collecting the falling edge of the clock signal; when the frequency division coefficient is an even number, the processor 20 is used to output an even trigger signal to the second trigger 42 to trigger the second trigger 42 to stop collecting the falling edge of the clock signal.
[0059] In this embodiment, when the frequency division coefficient is an odd number, the processor 20 will output an odd trigger signal to the second trigger 42, and the odd trigger signal may be 1, so that the second trigger 42 starts to collect the falling edge of the clock signal; when the frequency division coefficient is an even number, the processor 20 will output an even trigger signal to the second trigger 42, and the even trigger signal may be 0, so that the second trigger 42 stops collecting the falling edge of the clock signal. In this embodiment, the processor 20 can control the second trigger 42 to start or stop collecting the falling edge of the clock signal when the frequency division coefficient is an odd number or an even number.
[0060] Reference Figures 1 to 3 In one embodiment, the processor 20 outputs a plurality of corresponding judgment signals including: a first judgment signal, a second judgment signal and a third judgment signal;
[0061] The processor 20 outputs the first judgment signal to the control logic gate circuit when the count value is equal to the frequency division coefficient or the count value is equal to 0; outputs the second judgment signal to the control logic gate circuit when the count value is equal to half of the frequency division coefficient and the frequency division coefficient is an even number; outputs the third judgment signal to the control logic gate circuit when the count value is equal to half of the frequency division coefficient minus 1 and the frequency division coefficient is an odd number;
[0062] The control logic gate circuit is used for outputting the flip trigger signal to the first trigger 41 when any one of the received first judgment signal, the second judgment signal or the third judgment signal is high.
[0063] In this embodiment, when the count value and the division coefficient satisfy the corresponding relationship, the multiple corresponding judgment signals output by the processor 20 may be a first judgment signal, a second judgment signal and a third judgment signal; the corresponding relationship between the count value preset in the processor 20 and the clock division coefficient may be that the count value is equal to the division coefficient or the count value is equal to 0, at which time the first judgment signal output by the processor 20 to the control logic gate circuit is 1, and if the condition is not met, 0 is output; when the count value is equal to half of the division coefficient and the division coefficient is an even number, the second judgment signal output to the control logic gate circuit is 1, and if the condition is not met, 0 is output; when the count value is equal to half of the division coefficient minus 1 and the division coefficient is an odd number, the third judgment signal output to the control logic gate circuit is 1, and if the condition is not met, 0 is output. For example, when the frequency division coefficient is 4, a frequency division coefficient cycle is 4, and the value of the count signal is 0, 2, or 4, 1 is output to the control logic gate circuit, otherwise 0 is output; when the frequency division coefficient is 5, a frequency division coefficient cycle is 5, and the count value is 0, 2, or 5, 1 is output to the control logic gate circuit, otherwise 0 is output. When any one of the received first judgment signal, the second judgment signal, or the third judgment signal is 1, that is, high, the control logic gate circuit outputs a flip trigger signal to the first trigger 41. In this embodiment, the processor 20 can output multiple corresponding judgment signals in sequence according to the received count value and the corresponding relationship between the count value and the clock frequency division coefficient.
[0064] Reference Figures 1 to 3 In one embodiment, the control logic gate circuit includes:
[0065] A first OR gate 31, wherein the first OR gate 31 has a first input terminal and a second input terminal, wherein the first input terminal and the second input terminal of the first OR gate 31 are respectively connected to the output terminal of the processor 20, and the first OR gate 31 is used to output a first logic signal when either the first judgment signal or the second judgment signal is high;
[0066] A second OR gate 32, wherein the second OR gate 32 has a first input terminal and a second input terminal, wherein the first input terminal and the second input terminal of the second OR gate 32 are respectively connected to the output terminal of the processor 20 and the output terminal of the first OR gate 31, and the second OR gate 32 is used for outputting the flip trigger signal to the first trigger 41 when either the first logic signal or the third judgment signal is high.
[0067] In this embodiment, the control logic gate circuit can be composed of a first OR gate 31 and a second OR gate 32; when any one of the first judgment signal and the second judgment signal is high, the first OR gate 31 will output the corresponding first logic signal to the second OR gate 32, for example, when any one of the first judgment signal and the second judgment signal is 1, the first logic signal output to the second OR gate 32 by the control logic gate circuit is 1, and when both the first judgment signal and the second judgment signal are 0, the first logic signal output to the second OR gate 32 is 0; the second OR gate 32 will output the corresponding flip trigger signal to the first trigger 41 when any one of the first logic signal and the third judgment signal is high; for example, when any one of the first logic signal and the third judgment signal is 1, the flip trigger signal output to the first trigger 41 by the output logic gate circuit is 1, and when both the first logic signal and the third judgment signal are 0, the flip trigger signal output to the first trigger 41 is 0. In this embodiment, the control logic gate circuit can output the corresponding flip trigger signal to the first trigger 41 when any one of the multiple judgment signals is high.
[0068] Reference Figures 1 to 3 In one embodiment, the first trigger 41 is used to collect the rising edge of the clock signal when receiving the flip trigger signal as high, and output a high first clock collection signal to the second trigger 42 and the output logic gate circuit;
[0069] The second trigger 42 is used to collect the falling edge of the clock signal output by the first external device when receiving the odd trigger signal and the first clock collection signal is high, and output the high second clock collection signal to the output logic gate circuit.
[0070] In this embodiment, the first trigger 41 collects the rising edge of the clock signal when the received flip trigger signal is high, and outputs a high first clock collection signal to the second trigger 42 and the output logic gate circuit. For example, after the received logic signal is 1 and the collected clock signal is a rising edge, the first clock collection signal continuously output to the second trigger 42 and the output logic gate circuit is 1, until the received logic signal is 0 and the collected clock signal is a rising edge, the first clock collection signal continuously output to the second trigger 42 and the output logic gate circuit becomes 0, and this cycle repeats. The second trigger 42 used in this embodiment collects the falling edge of the clock signal. , the second trigger 42 will start to collect the falling edge of the clock signal when it receives the odd trigger signal. After collecting the falling edge of the clock signal according to the received odd trigger signal and the first clock collection signal, the second trigger 42 will output a high second clock collection signal to the output logic gate circuit; for example, the first clock collection signal received by the second trigger 42 is 1 and after collecting the falling edge of the clock signal, the second clock collection signal continuously input to the output logic gate circuit is 1, until the first clock collection signal received by the second trigger 42 is 0 and after collecting the falling edge of the clock signal, the second clock collection signal continuously input to the output logic gate circuit is 0, and this cycle repeats.
[0071] Reference Figures 1 to 3 In one embodiment, the first trigger 41 is used to collect the rising edge of the clock signal when receiving the flip trigger signal as high, and output a high first clock collection signal to the second trigger 42 and the output logic gate circuit;
[0072] The second trigger 42 is used to stop collecting the falling edge of the clock signal output by the first external device and output a low second clock collection signal to the output logic gate circuit when receiving the even trigger signal.
[0073] In this embodiment, the first trigger 41 collects the rising edge of the clock signal when the received flip trigger signal is high, and outputs a high first clock collection signal to the second trigger 42 and the output logic gate circuit. For example, after the received logic signal is 1 and the collected clock signal is a rising edge, the first clock collection signal continuously output to the second trigger 42 and the output logic gate circuit is 1, until the received logic signal is 0 and the collected clock signal is a rising edge, the first clock collection signal continuously output to the second trigger 42 and the output logic gate circuit becomes 0, and this cycle repeats; the second trigger 42 used in this embodiment will collect the falling edge of the clock signal. When the second trigger 42 receives an even trigger signal, it will stop collecting the falling edge of the clock signal. At this time, the second trigger 42 will continue to output a low second clock collection signal, such as 0 to the output logic gate circuit, and remain unchanged.
[0074] Reference Figures 1 to 3 In one embodiment, the first trigger 41 has a first input terminal, a second input terminal and a clock collection terminal, the first input terminal of the first trigger 41 is connected to the output terminal of the trigger, the second input terminal of the first trigger 41 is connected to the output terminal of the control logic gate circuit, and the clock collection terminal of the first trigger 41 is used to collect clock signals;
[0075] The second trigger 42 has a first input terminal, a second input terminal and a clock collection terminal. The first input terminal of the second trigger 42 is connected to the output terminal of the first trigger 41, the second input terminal of the second trigger 42 is connected to the output terminal of the control circuit, and the clock collection terminal of the second trigger 42 is used to collect the clock signal.
[0076] In this embodiment, the input end of the first trigger 41 includes a first input end, a second input end, and a clock collection end. The first input end of the first trigger 41 is connected to the output end of the first trigger 41. The first receiving end of the first trigger 41 receives the first clock collection signal output by the first trigger 41 to maintain the stability of the first trigger 41. The second input end of the first trigger 41 is connected to the output end of the control logic gate circuit and is used to receive a flip trigger signal. When the flip trigger signal is 1, the signal output by the first trigger 41 flips, for example, from 0 to 1 or from 1 to 0. The clock collection end of the first trigger 41 is used to connect to a first external device to collect the rising edge of the clock signal. The first trigger 41 outputs a first clock collection signal corresponding to the rising edge of the clock signal according to the signal received at the input end and the rising edge of the collected clock signal. The input end of the second trigger 42 includes a first input end and a second input end, and also has a clock acquisition end. The first input end of the second trigger 42 is connected to the output end of the first trigger 41 for receiving the first clock acquisition signal. When the first clock acquisition signal is 1, the signal output by the second trigger 42 is flipped, such as from 0 to 1 or from 1 to 0. The second input end of the second trigger 42 is connected to the output end of the processor 20 for receiving an odd / even trigger signal and starting / stopping work according to the odd / even trigger signal. The clock acquisition end of the second trigger 42 is used to connect to a first external device to collect the falling edge of the clock signal. The second trigger 42 outputs a second clock acquisition signal corresponding to the falling edge of the clock signal to the output logic gate circuit according to the signal received at the input end and the falling edge of the collected clock signal. In this embodiment, the first trigger 41 and the second trigger 42 can receive and collect signals through the input end and the clock acquisition end to output the corresponding first clock acquisition signal and the second clock acquisition signal.
[0077] Reference Figures 1 to 3In one embodiment, the output logic gate circuit includes:
[0078] A third OR gate 51, wherein a first input terminal of the third OR gate 51 is connected to an output terminal of the first trigger 41, a second input terminal of the third OR gate 51 is connected to an output terminal of the second trigger 42, an output terminal of the third OR gate 51 is used to connect to the second external device, and the third OR gate 51 is used to output a high clock output signal to the second external device when either the first clock acquisition signal or the second clock acquisition signal is received high.
[0079] In this embodiment, the second logic gate may be composed of a third OR gate 51, and the third OR gate 51 outputs a high clock output signal to the second external device when either the received first clock acquisition signal or the second clock acquisition signal is high; for example, when either the first clock acquisition signal or the second clock acquisition signal is 1, the clock output signal output to the external device is 1, and when both the first clock acquisition signal and the second clock acquisition signal are 0, the clock output signal output to the external device is 0. In this embodiment, the output logic gate circuit may output a high clock output signal to the second external device when either the first clock acquisition signal or the second clock acquisition signal is high.
[0080] The invention also provides an electronic device.
[0081] In one embodiment, the electronic device includes the system-level chip as described above. The specific structure of the system-level chip refers to the above embodiment. Since the electronic device adopts all the technical solutions of all the above embodiments, it at least has all the beneficial effects brought by the technical solutions of the above embodiments, which will not be described one by one here.
[0082] The above descriptions are only optional embodiments of the present invention, and are not intended to limit the patent scope of the present invention. All equivalent structural changes made using the contents of the present invention's specification and drawings under the technical concept of the present invention, or directly / indirectly applied in other related technical fields, are included in the patent protection scope of the present invention.
Claims
1. A clock frequency division circuit, characterized in that: The clock frequency division circuit comprises: A control circuit, the control circuit is used to receive a clock signal and a clock frequency division coefficient output by a first external device, and output a corresponding odd / even trigger signal through an output terminal according to the clock frequency division coefficient, the control circuit is also used to count the received clock signal to obtain a count value, and output a flip trigger signal through the output terminal according to a corresponding relationship between the count value and the clock frequency division coefficient; a first trigger, wherein the input end of the first trigger is connected to the output end of the control circuit; the first trigger is used to receive the clock signal output by the first external device, and when receiving the flip trigger signal, collect the rising edge of the clock signal to output a first clock collection signal corresponding to the rising edge of the clock signal; a second trigger, wherein the input end of the second trigger is respectively connected to the output end of the first trigger and the output end of the control circuit; the second trigger is used for collecting the falling edge of the clock signal when receiving the odd trigger signal and the first clock collection signal, so as to output a second clock collection signal corresponding to the falling edge of the clock signal; An output logic gate circuit, wherein the input end of the output logic gate circuit is respectively connected to the output end of the first trigger and the output end of the second trigger, and the output end of the output logic gate circuit is used to connect to a second external device. The output logic gate circuit is also used to output a clock output signal with a corresponding duty cycle to the second external device when the first clock acquisition signal and the second clock acquisition signal meet a second preset trigger condition.
2. The clock frequency division circuit according to claim 1, characterized in that: The control circuit comprises: a counter, the counter being used to receive the clock signal output by the first external device, and to count the received clock signal to output the corresponding count value; a processor, the processor being electrically connected to the counter, the processor being used to receive the clock frequency division coefficient, and outputting the corresponding odd / even trigger signal through an output terminal according to the clock frequency division coefficient, and the processor being further used to output a plurality of corresponding determination signals through the output terminal in sequence according to the received count value and the correspondence between the count value and the clock frequency division coefficient; A control logic gate circuit, wherein the input end of the control logic gate circuit is connected to the output end of the processor, and the control logic gate circuit is used to output the flip trigger signal to the first trigger through the output end when the multiple judgment signals meet the first preset trigger condition.
3. The clock frequency division circuit according to claim 2, characterized in that: The processor is used to output the odd trigger signal to the second trigger when the frequency division coefficient is an odd number, so as to trigger the second trigger to start collecting the falling edge of the clock signal; when the frequency division coefficient is an even number, output the even trigger signal to the second trigger to trigger the second trigger to stop collecting the falling edge of the clock signal.
4. The clock frequency division circuit according to claim 3, characterized in that: The processor outputs a plurality of corresponding judgment signals including: a first judgment signal, a second judgment signal and a third judgment signal; The processor outputs the first judgment signal to the control logic gate circuit when the count value is equal to the frequency division coefficient or the count value is equal to 0; outputs the second judgment signal to the control logic gate circuit when the count value is equal to half of the frequency division coefficient and the frequency division coefficient is an even number; outputs the third judgment signal to the control logic gate circuit when the count value is equal to half of the frequency division coefficient minus 1 and the frequency division coefficient is an odd number; The control logic gate circuit is used to output the flip trigger signal to the first trigger when any one of the received first judgment signal, the second judgment signal or the third judgment signal is high.
5. The clock frequency division circuit according to claim 4, characterized in that: The control logic gate circuit comprises: A first OR gate, wherein the first OR gate has a first input terminal and a second input terminal, wherein the first input terminal and the second input terminal are respectively connected to an output terminal of the processor, and the first OR gate is used to output a first logic signal when either the first judgment signal or the second judgment signal is high; A second OR gate, the second OR gate has a first input terminal and a second input terminal, the first input terminal and the second input terminal are respectively connected to the output terminal of the processor and the output terminal of the first OR gate, and the second OR gate is used to output the flip trigger signal to the first trigger when either the first logic signal or the third judgment signal is high.
6. The clock frequency dividing circuit according to claim 5, characterized in that: The first trigger is used to collect the rising edge of the clock signal when receiving the flip trigger signal as high, and output a high first clock collection signal to the second trigger and the output logic gate circuit; The second trigger is used to collect the falling edge of the clock signal output by the first external device when the odd trigger signal is received and the first clock collection signal is high, and output the high second clock collection signal to the output logic gate circuit.
7. The clock frequency division circuit according to claim 5, characterized in that: The first trigger is used to collect the rising edge of the clock signal when receiving the flip trigger signal as high, and output a high first clock collection signal to the second trigger and the output logic gate circuit; The second trigger is used to stop collecting the falling edge of the clock signal output by the first external device and output the low second clock collection signal to the output logic gate circuit when receiving the even trigger signal.
8. The clock frequency division circuit according to claim 1, characterized in that: The first trigger has a first input terminal, a second input terminal and a clock collection terminal, the first input terminal of the first trigger is connected to the output terminal of the trigger, the second input terminal of the first trigger is connected to the output terminal of the control logic gate circuit, and the clock collection terminal of the first trigger is used to collect a clock signal; The second trigger has a first input terminal, a second input terminal and a clock collection terminal. The first input terminal of the second trigger is connected to the output terminal of the first trigger, the second input terminal of the second trigger is connected to the output terminal of the control circuit, and the clock collection terminal of the second trigger is used to collect a clock signal.
9. The clock frequency division circuit according to claim 1, characterized in that: The output logic gate circuit comprises: A third OR gate, wherein a first input terminal of the third OR gate is connected to an output terminal of the first trigger, a second input terminal of the third OR gate is connected to an output terminal of the second trigger, an output terminal of the third OR gate is used to connect to the second external device, and the third OR gate is used to output a high clock output signal to the second external device when either the first clock acquisition signal or the second clock acquisition signal is received high.
10. An electronic device, characterized in that: The electronic device comprises the clock frequency division circuit as described in any one of claims 1-9.
