WO2020134531A1 - 一种时钟控制电路及控制方法 - Google Patents

一种时钟控制电路及控制方法 Download PDF

Info

Publication number
WO2020134531A1
WO2020134531A1 PCT/CN2019/114441 CN2019114441W WO2020134531A1 WO 2020134531 A1 WO2020134531 A1 WO 2020134531A1 CN 2019114441 W CN2019114441 W CN 2019114441W WO 2020134531 A1 WO2020134531 A1 WO 2020134531A1
Authority
WO
WIPO (PCT)
Prior art keywords
clock
register
reset
terminal
reset signal
Prior art date
Application number
PCT/CN2019/114441
Other languages
English (en)
French (fr)
Inventor
孔庆海
李炜
Original Assignee
深圳云天励飞技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳云天励飞技术有限公司 filed Critical 深圳云天励飞技术有限公司
Priority to US17/256,657 priority Critical patent/US11016525B1/en
Publication of WO2020134531A1 publication Critical patent/WO2020134531A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/04Generating or distributing clock signals or signals derived directly therefrom
    • G06F1/08Clock generators with changeable or programmable clock frequency
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/04Generating or distributing clock signals or signals derived directly therefrom
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/04Generating or distributing clock signals or signals derived directly therefrom
    • G06F1/06Clock generators producing several clock signals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/24Resetting means

Definitions

  • the present invention relates to the field of electronic technology, and in particular, to a clock control circuit and a control method.
  • clock design is the basis of more and more complex multi-function digital circuits, which directly affects the performance of digital circuits. Due to the continuous development of modern electronic technology, the scope of application of the clock is becoming more and more extensive. In the design of digital circuits, the number of registers that generally reset the signal load is very large (tens of thousands or even hundreds of thousands)
  • the present invention provides a clock control circuit and a control method, which can reset the register set in the circuit without the requirement of one clock cycle, avoid abnormality of the internal logic function of the circuit, and have high applicability.
  • an embodiment of the present invention provides a clock control circuit including: a clock source, a reset signal source, a register set, and a clock control unit, where the clock control unit includes a clock adjustment module and Clock gating, where:
  • the first receiving end of the clock adjusting module is connected to the clock source, the second receiving end of the clock adjusting module is connected to the reset signal source; the first receiving end of the clock gating and the output of the clock adjusting module Connected to the terminal, the second receiving terminal of the clock gating is connected to the clock source, the output terminal of the clock gating is connected to one end of the register group, and the other end of the register group is connected to the reset signal source, wherein the register group Including multiple first registers;
  • the clock adjustment module controls the clock gating.
  • Each first register in the register group receives the reset signal output by the reset signal source and completes the reset.
  • the first clock signal output by the clock source is adjusted to a second clock signal, and the second clock signal is output to the register set.
  • the clock control circuit enables the clock signal to be output to the register group after the reset of the register group of the control circuit is completed by the clock control unit, which solves that the registers in the register group in the traditional circuit cannot be in a clock
  • the problem of complete reset in the cycle avoids the circuit logic error caused by the difference in reset timing of multiple reset registers in the register group, and the problems of circuit frequency reduction and power consumption increase caused by it, and has high applicability.
  • the clock adjustment module further includes a data source and N second registers, where N is an integer greater than 1;
  • each second register is connected to the clock source
  • the reset signal input terminal of each second register is connected to the reset signal source
  • the data input terminal of the first second register is connected to the data source
  • the data input terminal of the first register is connected to the data output terminal of the 1-1th register
  • the data output terminal of the Nth register is connected to the above-mentioned clock gating terminal, where 1 ⁇ 1.
  • the time used by the clock adjustment unit to adjust the first clock signal to the second clock signal can be appropriately increased or decreased, so that the time
  • the specific number and connection mode of the register group in the clock control circuit realize the dynamic adjustment of the clock adjustment module in the clock control circuit, enhance the flexibility and operability of the clock control circuit provided by the embodiment of the present invention, and have higher applicability.
  • the clock adjustment module resets the N second registers; [0014] After the Jth second register is reset, the first clock signal triggers the Jth second register at the Jth clock cycle, and the data output end of the Jth second register converts the Jth second register The data received by the data input of the second register is output to the data input of the J+1 second register, where 1 ⁇ N;
  • the first clock signal triggers the Nth second register in the Nth clock cycle, and the data output end of the Nth second register converts the Nth second register The data received by the data input terminal of the second register is output to the clock receiving first receiving terminal.
  • the first clock signal is used to control the transmission mode of the data output by the data source in the clock adjustment module in the clock control circuit in each register, so that the data output by the data source is in the clock adjustment module
  • the registers are transferred in order, and the first clock signal can be determined as the second clock signal at an accurate time. Not only guarantees the stability of the transfer of the first clock signal between the registers in the clock adjustment module, but also guarantees the time accuracy of adjusting the first clock signal to the second clock signal to the maximum extent, so that the clock provided by the embodiment of the present invention The stability of the control circuit is higher.
  • the clock gating controls the Nth clock The first clock signal after the cycle is output to the register set as the second clock signal.
  • the clock gating is controlled to be opened by the data output by the data source, so that the second clock signal is more stable when output to the register group in the clock control circuit.
  • the second clock signal is output to the register group in the clock control circuit through clock gating, which avoids the situation that the second clock signal generates a signal flip, and ensures the register group in the clock control circuit to work at the same time, thereby effectively improving The stability of the logic function of the clock control circuit.
  • the number N of the second registers in the clock adjustment module is the target first register in the register group that receives the reset signal and completes a reset for a target duration It is determined that the data output from the data source is transferred from the first second register to the Nth second register and transferred from the Nth second register to the clock gating time is not less than the target time;
  • the target first register is the first register in the register group that receives the reset signal and completes the reset for the longest time, and when the target first register completes the reset, the register group is divided by the above All other first registers except the target first register are reset.
  • the data output from the data source is transferred from the first second register to the Nth second register and from the Nth second register to the clock gating time is not less than the register.
  • the target first register in the group receives the reset signal and completes the reset of the target duration, so that when the number of first registers and the connection mode of the register group in the clock control circuit change, it is necessary to adjust the clock control unit in the clock control circuit.
  • the number of second registers provides a basis, and at the same time, it can achieve the purpose of controlling the output of the second clock signal after the second registers in the register set are all reset.
  • the clock control circuit further includes: a filtering circuit, where:
  • the receiving end of the filter circuit is connected to the reset signal source, the first output end of the filter circuit is connected to the second receiving end of the clock adjustment module, and the output end of the filter circuit is also connected to the other end of the register set ;
  • the filter circuit eliminates glitches generated by the reset signal before power-on and/or at power-on, to obtain a reset signal after removing the glitches.
  • a filter circuit is provided to remove glitches generated by the reset signal generated by the reset signal source, which greatly improves the signal stability of the reset signal.
  • a stable reset signal can make the working state of the circuit more stable and have high applicability.
  • an embodiment of the present invention provides a clock control method, which is applicable to a terminal including the clock control circuit provided in the foregoing first aspect and/or any possible implementation manner of the first aspect , The method includes:
  • the clock source and the reset signal source built in the terminal respectively output the first clock signal and the reset signal
  • the terminal causes the built-in clock adjustment module to control the clock built in the terminal to gate each first register in the register set in the terminal to receive After the reset signal is completed and reset, the first clock signal is adjusted to the second clock signal;
  • the clock gating built into the terminal outputs the second clock signal to a register set built into the terminal.
  • the terminal enables the clock signal to be output to the register group after the reset of the built-in register group of the terminal is completed by the clock control unit, which solves the problems in the register group of the terminal including the conventional clock control circuit
  • the problem that the registers cannot be completely reset in one clock cycle avoids the The circuit logic error caused by the difference in reset timing of multiple reset registers in the register set, and the subsequent problems of terminal frequency reduction and increased power consumption are highly applicable.
  • the clock gating built into the terminal to output the second clock signal to the register set built into the terminal includes:
  • the clock gating built into the terminal After the clock gating built into the terminal receives the data output by the clock adjustment module built into the terminal, the clock gating built into the terminal outputs the first clock signal as the second clock signal to the built-in terminal Register bank
  • the clock adjustment module built in the terminal includes a data source and N second registers, N is an integer greater than 1, and the N second registers are used to receive data output by the data source and output the data To the above clock gating.
  • the terminal adjusts the first clock signal to the second clock signal by controlling the clock gating and outputs the second clock signal to the register set built in the terminal to determine the clock gating built into the terminal to the terminal
  • the built-in register set outputs the time of the second clock signal.
  • the second clock signal is output through clock gating, which not only improves the stability of the clock adjustment module built in the terminal, but also avoids the problem of terminal function failure caused by the signal inversion at the second clock.
  • the number N of the second registers in the clock adjustment module built in the terminal receives the reset signal from the target first register in the register set built in the terminal And the determination of the target duration of resetting is completed, and the duration that the N second registers receive the data output from the data source to the N second registers to output the data to the clock gating built into the terminal is not less than the target duration;
  • the target first register is the first register in the register group that receives the reset signal and completes the reset for the longest time, and when the target first register completes the reset, the register group in addition to the above All other first registers except the target first register are reset.
  • the data output from the data source to the N second registers is output to the N second registers to output the data to the duration of the clock gating built into the terminal to be not less than the registers built into the terminal Within the time range in which all the groups complete the reset, it is ensured that the terminal can output a second clock signal to the register group after the reset of each register in the built-in register group of the terminal, and the terminal has better stability.
  • the foregoing method further includes: [0039] Acquire the target first register in the register set built in the terminal and receive the reset signal and complete the reset target duration;
  • the number N of the second registers in the clock adjustment module is determined based on the target duration and the transmission duration, where the first second register in the clock adjustment module receives the data to the clock adjustment module
  • the duration of the Nth second register outputting the above data is not less than the above target duration.
  • the reset signal is received and the duration of the reset is completed, and a second register in the terminal's built-in clock adjustment module receives data to output
  • the data transmission time, and the specific number of the second register can be obtained through comparison and calculation.
  • it can further ensure that the clock gating is turned on and output the second clock signal after each first register in the register group is reset, ensuring the working stability and effectiveness of the clock control circuit built in the terminal Sex.
  • an embodiment of the present invention provides a terminal including the clock control circuit provided in the foregoing first aspect and/or any possible implementation manner of the first aspect, and the foregoing terminal is configured to execute the foregoing The method provided in the second aspect and/or any possible implementation manner of the second aspect.
  • an embodiment of the present invention provides a computer-readable storage medium that stores a computer program, and the computer program includes program instructions, which when executed by a processor cause the The processor executes the method provided in the second aspect and/or any possible implementation manner of the second aspect.
  • FIG. 1 is a schematic structural diagram of a clock control circuit provided by an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a clock control method provided by an embodiment of the present invention
  • FIG. 3 is a schematic diagram of an internal circuit of a terminal including a clock control circuit provided by an embodiment of the present invention
  • FIG. 4 is a timing diagram of a clock control circuit provided by an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a terminal provided by an embodiment of the present invention.
  • the clock control circuit and clock control method provided by the embodiments of the present invention are suitable for circuits in which multiple register reset situations exist in high-speed design of digital circuits, and can ensure that registers located in a clock domain are completely reset before receiving a clock signal, Moreover, the reset completion time of a register in a clock domain is no longer limited to one clock cycle, which helps to reduce the probability of abnormality of the internal logic function of the circuit.
  • FIG. 1 is a schematic structural diagram of a clock control circuit according to an embodiment of the present invention.
  • the clock control circuit provided by the embodiment of the present invention includes: a clock source 11, a reset signal source 12, a register set 14, and a clock control unit 13, the clock control unit 13 includes a clock adjustment module 1301 and a clock gating 1302, wherein:
  • the first receiving end of the clock adjustment module 1301 is connected to the clock source 11, and the second receiving end of the clock adjustment module 1301 is connected to the reset signal source 12;
  • the data input terminal of the clock gate 1302 is connected to the output terminal of the clock adjustment module 1301, the clock input terminal of the clock gate 1302 is connected to the clock source 11, and the output terminal of the clock gate 1302 is connected to the register One end of group 14 is connected;
  • the other end of the register group 14 is connected to the reset signal source 12, wherein the register group 14 includes at least two registers;
  • the clock adjustment module 1301 controls the clock gating 1302 to receive the output of the reset signal source 12 in each first register in the register group 14 After resetting the signal and completing the reset, the first clock signal output by the clock source 11 is adjusted to a second clock signal, and the second clock signal is output to the register group 14.
  • the clock adjustment module 1301 includes a data source and N second registers, where N is an integer greater than 1;
  • each second register is connected to the above clock source
  • the reset signal input terminal of each second register is connected to the above reset signal source 12
  • the data input terminal of the first second register is The above data source 11 is connected
  • the data input terminal of the first register is connected to the data output terminal of the 1-1 register
  • the data output terminal of the Nth register is connected to the data input terminal of the clock gating 1302, where 1 ⁇ ISN
  • the clock adjustment module 1301 resets the N second registers
  • the first clock signal triggers the Jth second register at the Jth clock cycle, and the data output end of the Jth second register converts the The data received by the data input terminal of the J second registers is output to the data input terminal of the J+ 1 second register, where 1 ⁇ J ⁇ N;
  • the first clock signal triggers the Nth second register in the Nth clock cycle, and the data output end of the Nth second register converts the Nth second register
  • the data received by the data input terminal of the second register is output to the data input terminal of the clock gating 1301.
  • the clock gating 1302 converts the A clock signal is output to the register group 14 as the second clock signal.
  • the number N of the second registers in the clock adjustment module 1301 is determined by the target duration of the target first register in the register group 14 receiving the reset signal and completing the reset, and the above
  • the data output from the data source is transferred from the first second register to the Nth second register and transferred from the Nth second register to the clock gating 1302 for a duration not less than the target duration;
  • the target first register is the first register in the register group 14 that receives the reset signal and completes the reset for the longest time, and when the target first register completes the reset, the register group 14 All the first registers except the above-mentioned target first register are reset.
  • the above clock control circuit further includes: a filter circuit 15, wherein: [0067] The receiver of the filter circuit 15 is connected to the reset signal source 12, the first output of the filter circuit 15 is connected to the second receiver of the clock adjustment module 1301, and the output of the filter circuit 15 is connected to the register set 14 is connected to the other end;
  • the filter circuit 15 can eliminate glitches generated by the reset signal before and/or at power-on, to obtain a reset signal after removing the glitches.
  • the clock control circuit provided by the embodiment of the present invention may execute the implementation provided by the clock control circuit shown in FIG. 1 through each of its built-in modules.
  • the clock control circuit shown in FIG. 1 may execute the implementation provided by the clock control circuit shown in FIG. 1 through each of its built-in modules.
  • the above-mentioned clock source 11 may be used to generate the above-mentioned first clock signal and other implementation manners.
  • reference may be made to the implementation manner provided by the clock control circuit shown in FIG. 1, and details are not described herein again.
  • the above-mentioned reset signal source 12 may be used to generate the above-mentioned reset signal and other implementation manners.
  • reference may be made to the implementation manner provided by the clock control circuit shown in FIG. 1, and details are not described herein again.
  • the clock adjustment module 1301 may be used to receive the reset signal output by the reset signal source 11 and other implementation manners. For details, refer to the implementation manner provided by the clock control circuit shown in FIG. Repeat.
  • the above-mentioned clock gating 1302 may be used to output the above-mentioned second clock signal to the register set 14 and other implementation manners.
  • the clock control circuit shown in FIG. Repeat refer to the implementation manner provided by the clock control circuit shown in FIG. Repeat.
  • the register group 14 may be used to receive the second clock signal and the reset signal, and other implementations.
  • the register group 14 may be used to receive the second clock signal and the reset signal, and other implementations.
  • the clock control circuit shown in FIG. 1 refer to the implementation provided by the clock control circuit shown in FIG. 1, and details are not described herein.
  • the filter circuit 15 may be used to eliminate glitches generated by the reset signal before and/or when the reset signal source 12 outputs the reset signal to obtain a reset signal after removing the glitch
  • the filter circuit 15 may be used to eliminate glitches generated by the reset signal before and/or when the reset signal source 12 outputs the reset signal to obtain a reset signal after removing the glitch
  • the clock control circuit enables the clock signal to be output to the register group after the reset of the register group of the control circuit is completed by the clock control unit, which solves the problem that the reset signal is transmitted to each register in the traditional circuit
  • the required time is inconsistent, resulting in the problem that some registers cannot complete the reset within a single clock cycle. Avoid the reset time difference caused by multiple reset registers in the register set
  • FIG. 2 is a schematic flowchart of a clock control method provided by an embodiment of the present invention.
  • the clock control method provided by an embodiment of the present invention may include the following steps S201-S203:
  • S201 The clock source and the reset signal source built in the terminal respectively output the first clock signal and the reset signal.
  • the clock source 11 built in the terminal may be an internal clock source or an external clock source, which is not limited in any way, and at the same time, the internal clock source and/or the external clock source High-speed and low-speed are not restricted.
  • the STM32F4 single-chip microcomputer can provide an internal low-speed clock source with a frequency of about 32 kHz or a frequency of 32.768 kHz, an internal high-speed clock source with a frequency of 16 MHz, and an external 4M ⁇ 26 MHz crystal oscillator to obtain an external high-speed Clock source. In addition, it can also receive the external high-speed clock source output by the PLL frequency multiplier.
  • the glitches generated by the reset signal before and/or at power-on may be eliminated to obtain a reset signal after the glitches are eliminated.
  • the size of the delay is related to the length of the wiring and the number of logic cells, and it is also affected by the manufacturing process, operating voltage, temperature and other conditions of the device. Glitches generated by the reset signal during this process will affect the stability of the reset signal and the normal operation of the circuit.
  • the glitch in the reset signal can be eliminated by the filter circuit, and at the same time, the function of the filter circuit can also be implemented by software, which is not limited herein.
  • the terminal causes the built-in clock adjustment module to control the clock built in the terminal to gate each first register in the register set in the terminal After receiving the reset signal and completing the reset, the first clock signal is adjusted to the second clock signal.
  • FIG. 3 is a schematic diagram of an internal circuit principle of a terminal including a clock control circuit provided by an embodiment of the present invention.
  • the clock control unit 13 includes a clock adjustment module 1301 and a clock gating 1302, where the clock adjustment module 1301 is composed of N second registers and one data source connected in series, where N is an integer greater than 1.
  • each second register is connected to the clock source 11
  • the reset signal input terminal of each second register is connected to the reset signal source 12
  • the data input terminal of the first second register is connected to the data
  • the source is connected
  • the data input of the first register is connected to the data output of the 1-1th register
  • the data output of the Nth register is connected to the data input of the above-mentioned clock gating 1302, where 1 ⁇ N
  • the terminal may reset each register in the clock adjustment module 1301 through the reset signal, and the clock gating 1302 is off. That is, the clock control unit 13 cannot transmit the clock signal to the register group 14 in the terminal, and the registers in the register group 14 do not operate.
  • the reset signal generated by the reset signal source 12 is released at this time, that is, the reset signal is in a high reset state, and the registers and the registers in the clock adjustment module 1301 are no longer controlled.
  • Each register in the above register set 14 is reset.
  • the data source in the clock control module 1301 outputs to the first second register in the clock control module 1301 data.
  • the first clock signal is sequentially transmitted to each second register in the clock adjustment module 1301 to trigger each second register in the clock adjustment module 1301 to output the received data. It should be noted that the value of the data output by the above data source can be determined according to the actual circuit scenario, and is not limited herein.
  • the first clock signal may trigger the Jth second register at the Jth clock cycle, at which time the Jth second register starts jobs. That is, the data output terminal of the Jth second register outputs the data received by the data input terminal of the Jth second register to the data input terminal of the J+1 second register, where 1 ⁇ N;
  • the first clock signal triggers the Nth second register in the Nth clock cycle, and at this time, the data output end of the Nth second register will The data received by the data input terminal of the N-th second register is output to the data input terminal of the clock gating 1302.
  • the clock gating 1302 adjusts the first clock signal to the second clock signal.
  • the terminal when the reset signal is 0, the terminal causes the built-in register group 14 to receive the reset signal, and completes the reset of each register in the register group 14 Bit. Otherwise, if all the registers in the register group 14 are not completely reset, logic errors will occur in the actual operation of the circuit in the terminal, resulting in an increase in power consumption of the terminal.
  • the register set provided in FIG. 3 is only a certain expression form of the above-mentioned built-in register set 14 of the terminal, and different functions of different terminals determine different connection methods and registers of the registers in the built-in register set 14 of the terminal.
  • the number is not limited here.
  • the resulting structure of the clock tree and the transmission path of the reset signal will also have multiple expressions, and there are no restrictions here.
  • the number N of the second registers in the clock adjustment module 1301 built in the terminal is received by the target first register in the register group 14 built in the terminal and the reset signal is completed.
  • the target duration is determined, and the duration that the N second registers receive the data output from the data source to output the data to the N second registers to the clock gating 1302 built in the terminal is not less than the target duration.
  • curve A in FIG. 3 represents the longest transmission path through which the reset signal is transferred to each first register in the register group 14.
  • the first register finally pointed to by curve A is the target first register.
  • the clock gating 1302 adjusts the first clock signal to the second clock signal
  • the target time register in the register group 14 first receives the reset signal and completes the reset of the target duration to determine the clock adjustment module
  • the number of registers is to ensure that the clock-preserving gate 1302 receives the reset signal from each first register in the register group 14 and completes the reset, and then adjusts the first clock signal to the second clock signal.
  • the target first register in the register group 14 built in the terminal may first obtain the target duration for receiving the reset signal and completing the reset, and then obtain the clock adjustment
  • a second register in the module 1302 receives the data output from the clock source 11 to output the transmission time of the data, and determines the number N of the second registers in the clock adjustment module 1 301 based on the target time and the transmission time
  • the duration that the first second register in the clock adjustment module 1301 receives the data and outputs the data to the Nth second register in the clock adjustment module 1301 is not less than the target duration.
  • the target duration is 10 ms and the transmission duration is 2 ms
  • the number of second registers in the clock adjustment module 1301 is 5 at this time.
  • the target duration is 10 ms and the transmission duration is 1.5 ms
  • the number of second registers in the clock adjustment module 1301 is 1.
  • a certain number of buffers may be added within the register group 14 and between the register group 14 and the reset signal source 12 according to the complexity of the actual circuit and functional requirements, which may improve The load capacity of the larger circuit is fanned out to improve the circuit driving capacity.
  • the buffer in the clock control circuit does not have any effect on the state of the reset signal flowing through the buffer, it can play a coordination role between the clock control circuit and the terminal and/or peripheral device, In addition to achieving the synchronous transmission of the reset signal as much as possible, a certain number of buffers can effectively ensure the correct timing of the signals in the circuit and improve the stability of the internal circuit of the terminal.
  • the buffer is an actual electrical component in the clock control circuit, if there are a large number of buffers in the clock circuit, it will cause a certain amount of transmission of the reset signal in the clock control circuit. Transmission delay, so the length of time that the reset signal passes to the registers in the register set should take into account the time delay caused by the reset signal passing through the buffer during transmission.
  • FIG. 4 is a timing diagram of a clock control circuit provided by an embodiment of the present invention.
  • the first clock signal is continuously transmitted after entering the clock control unit 13.
  • register A For example, for the reset of register A and register B of the same register group, the path of the signal to register A is shorter, and the path to register B is longer. In this case, register A may be reset before register B. Since there is no restriction on the time when the clock signal starts to output the clock signal to the register set, the register starts to work normally after reset. When register A and register B complete reset at different times, the registers in the same register group may start to work normally at different times, which may cause abnormal logic functions in the circuit.
  • the clock gating 1302 transmits the second clock signal to the register group 14 after the register group 14 receives the second clock signal Enter the working state.
  • the clock gating 1302 can realize the switching function under the action of the data output by the data source. Even if all the registers in the register group 14 are completely reset, the clock gating 1302 must be received. Only after the data output from the data source can the clock gate be opened to output the second clock signal to the register group 14. In addition, the clock gating 1302 can not only realize the switch function to output the second clock signal to the register group 14, but also ensure that the second clock signal does not reverse when the signal is output to the register group 14. In this case, it can be avoided that the registers in the above-mentioned register group 14 cannot work synchronously due to the inversion signal received, resulting in an error in the circuit logic function.
  • An embodiment of the present invention further provides a terminal.
  • the terminal includes the clock control circuit provided by the embodiment of the present invention, and executes the clock control method provided by the embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a terminal provided by an embodiment of the present invention.
  • the terminal in this embodiment may include: a clock control circuit 501 and a memory 502.
  • the clock control circuit 501 and the memory 502 are connected through a bus 503.
  • the memory 502 is used to store a computer program, and the computer program includes program instructions, and the clock control circuit 501 is used to execute the program instructions stored in the memory 502, and performs the following operations:
  • the clock source and the reset signal source built in the clock control circuit 501 output the first clock signal and the reset signal, respectively;
  • the clock control circuit 501 After the clock adjustment module built in the clock control circuit 501 receives the reset signal, the clock control circuit 501 causes the built-in clock adjustment module to control the clock built in the clock control circuit 501 in the clock control circuit 501 After receiving the reset signal and completing the reset, each first register in the register group in the register adjusts the first clock signal to a second clock signal;
  • the clock gating built into the clock control circuit 501 outputs the second clock signal to the register set built into the clock control circuit 501.
  • the clock gating built into the clock control circuit 501 when the clock gating built into the clock control circuit 501 receives the data output by the clock adjustment module built into the clock control circuit 501, the clock gating built into the clock control circuit 501 will The first clock signal is output as the second clock signal to the register set built in the clock control circuit 501;
  • the clock adjustment module built in the clock control circuit 501 includes a data source and N second registers, N is an integer greater than 1, and the N second registers are used to receive data output by the data source and The above data is output to the above clock gating.
  • the number N of second registers in the clock adjustment module built in the clock control circuit 501 receives the reset signal from the target first register in the register set built in the clock control circuit 501 And the target duration of the reset is determined, and the N second registers receive the data output from the data source to the N second registers to output the data to the built-in terminal
  • the duration of clock gating is not less than the above target duration
  • the target first register is the first register in the register group that receives the reset signal and completes the reset for the longest time, and when the target first register completes the reset, the register group is divided by the above All other first registers except the target first register are reset.
  • the above-mentioned clock control circuit 501 is further used for:
  • the number N of the second registers in the clock adjustment module built in the clock control circuit 501 is determined based on the target duration and the transmission duration, where the first second in the clock adjustment module built in the clock control circuit 501 The time when the register receives the data and outputs the data to the Nth second register in the clock adjustment module built in the clock control circuit 501 is not less than the target time.
  • the terminal provided by the embodiment of the present invention may be any terminal including the clock control circuit provided by the embodiment of the present invention and/or for performing the clock control method provided by the embodiment of the present invention.
  • the above terminal solves the problem that each register in the register group in the internal circuit of the traditional terminal cannot complete the reset in one clock cycle, and avoids the circuit logic error caused by the difference in reset timing of multiple reset registers in the register group, and the subsequent The problems of circuit frequency reduction and power consumption increase are highly applicable.
  • Embodiments of the present invention also provide a computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes program instructions, the program instructions are executed by the terminal to implement each of FIGS. 1 to 2
  • the computer-readable storage medium stores a computer program
  • the computer program includes program instructions
  • the program instructions are executed by the terminal to implement each of FIGS. 1 to 2
  • the circuit and/or method provided in the step reference may be made to the implementation provided in each step above, and details are not described herein again.
  • the computer-readable storage medium may be a clock control circuit provided in any of the foregoing embodiments or an internal storage unit of the terminal, such as a hard disk or a memory of an electronic device.
  • the computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk equipped on the electronic device, a smart media card (smart media card, SMC), a secure digital (SD) card, Flash card (flashcard), etc.
  • the computer-readable storage medium may further include a magnetic disk, an optical disk, a read-only memory (read-only memory, ROM), a random access memory (random access memory, RAM), and so on.
  • the computer-readable storage medium may also include both an internal storage unit of the electronic device and an external storage device.
  • the computer-readable storage medium is used to store the computer program and other programs and data required by the electronic device.
  • the computer-readable storage medium can also be used to temporarily store data that has been or will be output.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Electronic Switches (AREA)

Abstract

一种时钟控制电路及控制方法,该时钟控制电路包括:时钟源(11)、复位信号源(12)、寄存器组(14)以及时钟控制单元(13),时钟控制单元(13)包括时钟调整模块(1301)和时钟门控(1302),其中,时钟调整模块(1301)的第一接收端与时钟源(11)相连,时钟调整模块(1301)的第二接收端与复位信号源(12)相连;时钟门控(1302)的第一接收端与时钟调整模块(1301)的输出端相连,时钟门控(1302)的第二接收端与时钟源(11)相连,时钟门控(1302)的输出端与寄存器组(14)的一端相连,寄存器组(14)的另一端与复位信号源(12)相连,其中寄存器组(14)包括多个第一寄存器。该电路可使电路中寄存器组的复位不再有一个时钟周期的限制,避免了电路功能出错,减少功耗,适用性高。

Description

一种时钟控制电路及控制方法
技术领域
[0001] 本发明涉及电子技术领域, 尤其涉及一种时钟控制电路及控制方法。
[0002] 本申请要求于 2018年 12月 29日提交中国专利局, 申请号为 201811641843.4、 发 明名称为“一种时钟控制电路及控制方法”的中国专利申请的优先权, 其全部内容 通过引用结合在本申请中。
背景技术
[0003] 时钟是数字电路的重要组成部分, 只要是时序电路, 就离不开时钟。 因此, 时 钟设计是现在越来越复杂的多功能数字电路的基础, 它直接影响着数字电路的 性能。 由于现代电子技术的不断发展, 时钟的应用的范围也越来越广泛。 在数 字电路设计中, 一般复位信号负载的寄存器数量非常庞大 (几万甚至几十万)
, 尤其对于高速设计, 复位信号传输到每个寄存器需要的时间比较长, 可能会 超过一个时钟周期, 导致一部分部分寄存器在单周期能完成复位 /释放, 另外一 部分寄存器不能在单个周期完成复位 /释放, 导致功能出错, 从而导致设计降频
[0004] 另外, 即使通过时序优化手段将复位控制在了一个周期, 但是由于复位路径时 序比较紧, 在优化过程中选择了速度快、 漏电大的标准电池, 会导致面积和功 耗的增加, 适用性不高。
发明概述
技术问题
问题的解决方案
技术解决方案
[0005] 本发明提供了一种时钟控制电路及控制方法, 可使电路内的寄存器组复位不再 有一个时钟周期的要求, 避免了电路内部逻辑功能发生异常, 适用性高。
[0006] 第一方面, 本发明实施例提供一种时钟控制电路, 该电路包括: 时钟源、 复位 信号源、 寄存器组以及时钟控制单元, 上述时钟控制单元包括时钟调整模块和 时钟门控, 其中:
[0007] 上述时钟调整模块的第一接收端与上述时钟源相连, 上述时钟调整模块的第二 接收端与上述复位信号源相连; 上述时钟门控的第一接收端与上述时钟调整模 块的输出端相连, 上述时钟门控的第二接收端与上述时钟源相连, 上述时钟门 控的输出端与上述寄存器组的一端相连, 上述寄存器组的另一端与上述复位信 号源相连, 其中上述寄存器组包括多个第一寄存器;
[0008] 上述时钟调整模块接收到上述复位信号源输出的复位信号后, 控制上述时钟门 控在上述寄存器组中的各个第一寄存器接收到上述复位信号源输出的复位信号 并完成复位后, 将上述时钟源输出的第一时钟信号调整为第二时钟信号, 并向 上述寄存器组输出上述第二时钟信号。
[0009] 在本发明实施例中, 时钟控制电路通过时钟控制单元使时钟信号能在控制电路 的寄存器组全部完成复位以后向寄存器组输出, 解决了传统电路中寄存器组中 各寄存器不能在一个时钟周期内全部完成复位的问题, 避免了由于寄存器组中 多个复位寄存器复位时刻差异所带来的电路逻辑错误, 以及随之带来的电路降 频和功耗增加的问题, 适用性高。
[0010] 结合第一方面, 在一种可能的实施方式中, 上述时钟调整模块中还包括数据源 和 N个第二寄存器, 其中, N为大于 1的整数;
[0011] 每个第二寄存器的时钟输入端与上述时钟源相连, 每个第二寄存器的复位信号 输入端与上述复位信号源相连, 第一个第二寄存器的数据输入端与上述数据源 相连, 第 I个寄存器的数据输入端与第 1-1个寄存器的数据输出端相连, 第 N个寄 存器的数据输出端与上述时钟门控的端相连, 其中 1 < 1 。
[0012] 在本发明实施例中, 通过控制时钟控制电路的时钟调整模块内寄存器的数量, 可适当增加或减少时钟调整单元将第一时钟信号调整为第二时钟信号所用的时 间, 从而可根据时钟控制电路中寄存器组的具体数量和连接方式实现对时钟控 制电路内的时钟调整模块的动态调整, 增强了本发明实施例提供的时钟控制电 路的灵活性和可操作性, 适用性更高。
[0013] 结合第一方面, 在一种可能的实施方式中, 上述时钟调整模块接收到上述复位 信号后, 将上述 N个第二寄存器复位; [0014] 当第 J个第二寄存器完成复位后, 上述第一时钟信号在第 J个时钟周期触发第 J个 第二寄存器, 上述第 J个第二寄存器的数据输出端将上述第 J个第二寄存器的数据 输入端接收到的数据输出至第 J+ 1个第二寄存器的数据输入端, 其中 1 < N ;
[0015] 当上述第 N个第二寄存器完成复位后, 上述第一时钟信号在第 N个时钟周期触 发上述第 N个第二寄存器, 上述第 N个第二寄存器的数据输出端将上述第 N个第 二寄存器的数据输入端接收到的数据输出至上述时钟门控的第一接收端。
[0016] 在本发明实施例中, 通过第一时钟信号控制时钟控制电路中的时钟调整模块内 的数据源输出的数据在各寄存器中的传递方式, 使得数据源输出的数据在时钟 调整模块内各寄存器中有序传递, 进而可在准确的时刻将第一时钟信号确定为 第二时钟信号。 不仅保证了第一时钟信号在时钟调整模块内各寄存器间传递的 稳定性, 也最大限度的保证了将第一时钟信号调整为第二时钟信号的时刻准确 性, 使得本发明实施例提供的时钟控制电路的稳定性更高。
[0017] 结合第一方面, 在一种可能的实施方式中, 当上述时钟门控的第一接收端接收 到上述第 N个第二寄存器输出的数据时, 上述时钟门控将第 N个时钟周期后的上 述第一时钟信号作为上述第二时钟信号输出至上述寄存器组。
[0018] 在本发明实施例中, 通过数据源输出的数据来控制时钟门控打开, 使得第二时 钟信号向时钟控制电路内的寄存器组输出时更加稳定。 同时通过时钟门控将第 二时钟信号向时钟控制电路内的寄存器组输出, 避免了第二时钟信号产生信号 翻转的情况, 最大程度上确保时钟控制电路内的寄存器组能够同时工作, 从而 有效提升时钟控制电路的逻辑功能的稳定性。
[0019] 结合第一方面, 在一种可能的实施方式中, 上述时钟调整模块中的第二寄存器 的数量 N由上述寄存器组中的目标第一寄存器接收到上述复位信号并完成复位的 目标时长确定, 且上述数据源输出的数据从上述第一个第二寄存器传输至上述 第 N个第二寄存器并由上述第 N个第二寄存器传输至上述时钟门控的时长不小于 上述目标时长;
[0020] 其中, 上述目标第一寄存器为上述寄存器组中接收到上述复位信号并完成复位 的时长最长的第一寄存器, 且当上述目标第一寄存器完成复位时, 上述寄存器 组中的除上述目标第一寄存器外的其他第一寄存器均完成复位。 [0021] 在本发明实施例中, 通过将数据源输出的数据从第一个第二寄存器传输至第 N 个第二寄存器并由第 N个第二寄存器传输至时钟门控的时长不小于寄存器组中的 目标第一寄存器接收到复位信号并完成复位的目标时长, 使得在时钟控制电路 内的寄存器组的第一寄存器数量和连接方式发生变化时, 为调整时钟控制电路 内的时钟控制单元的第二寄存器数量提供了依据, 同时可达到控制第二时钟信 号在寄存器组中的第二寄存器全部完成复位以后输出的目的。
[0022] 结合第一方面, 在一种可能的实施方式中, 上述时钟控制电路还包括: 滤波电 路, 其中:
[0023] 上述滤波电路的接收端连接上述复位信号源, 上述滤波电路的第一输出端与上 述时钟调整模块的第二接收端相连, 上述滤波电路的输出端还与上述寄存器组 的另一端相连;
[0024] 上述滤波电路在上述复位信号源输出上述复位信号后, 消除上述复位信号在上 电前和 /或上电时产生的毛刺, 得到消除毛刺后的复位信号。
[0025] 在本发明实施例中, 通过设置滤波电路去除复位信号源生成的复位信号产生的 毛刺, 极大提高了复位信号的信号稳定性。 特别是在高速复位的时钟控制电路 中, 稳定的复位信号可使电路的工作状态更加稳定, 适用性高。
[0026] 第二方面, 本发明实施例提供了一种时钟控制方法, 该方法适用于包括上述第 一方面和 /或第一方面任一种可能的实施方式中所提供的时钟控制电路的终端, 该方法包括:
[0027] 终端内置的时钟源和复位信号源分别输出第一时钟信号和复位信号;
[0028] 当上述终端内置的时钟调整模块接收到上述复位信号后, 上述终端使其内置的 时钟调整模块控制上述终端内置的时钟门控在上述终端内的寄存器组中的各个 第一寄存器接收到上述复位信号并完成复位后, 将上述第一时钟信号调整为第 二时钟信号;
[0029] 上述终端内置的时钟门控向上述终端内置的寄存器组输出上述第二时钟信号。
[0030] 在本发明实施例中, 终端通过时钟控制单元使使时钟信号能在终端内置的寄存 器组全部完成复位以后向寄存器组输出, 解决了传统内含时钟控制电路的终端 的寄存器组中各寄存器不能在一个时钟周期内全部完成复位的问题, 避免了由 于寄存器组中多个复位寄存器复位时刻差异所带来的电路逻辑错误, 以及随之 带来的终端降频和功耗增加的问题, 适用性高。
[0031] 结合第一方面, 在一种可能的实施方式中, 上述终端内置的时钟门控向上述终 端内置的寄存器组输出上述第二时钟信号包括:
[0032] 当上述终端内置的时钟门控接收到上述终端内置的时钟调整模块输出的数据后 , 上述终端内置的时钟门控将上述第一时钟信号作为上述第二时钟信号输出至 上述终端内置的寄存器组;
[0033] 其中, 上述终端内置的时钟调整模块中包括数据源和 N个第二寄存器, N为大 于 1的整数, 上述 N个第二寄存器用于接收上述数据源输出的数据并将上述数据 输出至上述时钟门控。
[0034] 在本发明实施例中, 终端通过控制时钟门控将第一时钟信号调整为第二时钟信 号并向终端内置的寄存器组输出第二时钟信号, 确定了终端内置的时钟门控向 终端内置的寄存器组输出第二时钟信号的时刻。 同时通过时钟门控输出第二时 钟信号, 不仅提高了终端内置的时钟调整模块的稳定性, 也避免了由于第二时 钟出现信号翻转带来的终端功能故障问题。
[0035] 结合第一方面, 在一种可能的实施方式中, 上述终端内置的时钟调整模块中的 第二寄存器的数量 N由上述终端内置的寄存器组中的目标第一寄存器接收到上述 复位信号并完成复位的目标时长确定, 且上述 N个第二寄存器接收到上述数据源 输出的数据至上述 N个第二寄存器将上述数据输出至上述终端内置的时钟门控的 时长不小于上述目标时长;
[0036] 其中, 上述目标第一寄存器为上述寄存器组中接收到上述复位信号并完成复位 的时长最长的第一寄存器, 且当上述目标第一寄存器完成复位时, 上述寄存器 组中的除上述目标第一寄存器外的其他第一寄存器均完成复位。
[0037] 在本发明实施例中, 通过将 N个第二寄存器接收到数据源输出的数据至 N个第 二寄存器将数据输出至终端内置的时钟门控的时长控制在不小于终端内置的寄 存器组全部完成复位的时间范围内, 确保终端可在终端内置的寄存器组中的各 个寄存器完成复位之后向寄存器组输出第二时钟信号, 终端稳定性更好。
[0038] 结合第一方面, 在一种可能的实施方式中, 上述方法还包括: [0039] 获取上述终端内置的寄存器组中的目标第一寄存器接收到上述复位信号并完成 复位的目标时长;
[0040] 获取上述终端内置的时钟调整模块中的一个第二寄存器接收到上述数据至输出 上述数据的传输时长;
[0041] 基于上述目标时长和上述传输时长确定上述时钟调整模块内的第二寄存器的数 量 N, 其中, 上述时钟调整模块中的第一个第二寄存器接收到上述数据至上述时 钟调整模块中的第 N个第二寄存器输出上述数据的时长不小于上述目标时长。
[0042] 在本发明实施例中, 通过获取终端内置的寄存器组中的目标第一寄存器接收到 复位信号并完成复位的时长和终端内置的时钟调整模块中的一个第二寄存器接 收到数据至输出数据的传输时长, 并通过比较计算可得到第二寄存器的具体数 量。 同时在第二寄存器的数量确定后, 可进一步保证时钟门控在寄存器组中的 各个第一寄存器完成复位后打开并输出第二时钟信号, 保证了终端内置的时钟 控制电路的工作稳定性和有效性。
[0043] 第三方面, 本发明实施例提供了一种终端, 该终端包括上述第一方面和 /或第 一方面任一种可能的实施方式所提供的时钟控制电路, 上述终端用于执行上述 第二方面和 /或第二方面任一种可能的实施方式所提供的方法。
[0044] 第四方面, 本发明实施例提供了一种计算机可读存储介质, 该计算机可读存储 介质存储有计算机程序, 该计算机程序包括程序指令, 该程序指令当被处理器 执行时使该处理器执行上述第二方面和 /或第二方面任一种可能的实施方式所提 供的方法。
发明的有益效果
对附图的简要说明
附图说明
[0045] 为了更清楚地说明本发明实施例中的技术方案, 下面将对实施例中所需要使用 的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本发明的一些实 施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动的前提下, 还可以 根据这些附图获得其他的附图。
[0046] 图 1是本发明实施例提供的时钟控制电路的一结构示意图; [0047] 图 2是本发明实施例提供的时钟控制方法的一流程示意图;
[0048] 图 3是本发明实施例提供的包括本发明提供的时钟控制电路的一终端内部电路 原理示意图;
[0049] 图 4是本发明实施例提供的时钟控制电路的一时序示意图;
[0050] 图 5是本发明实施例提供的终端的结构示意图。
发明实施例
本发明的实施方式
[0051] 本发明实施例提供的时钟控制电路和时钟控制方法适用于各数字电路高速设计 中存在多寄存器复位情况的电路, 能够保证位于一个时钟域内的寄存器在接收 到时钟信号之前全部完成复位, 且一个时钟域内的寄存器的复位完成时间不再 局限于一个时钟周期内, 有助于减少电路内部逻辑功能出现异常的概率。
[0052] 下面将结合图 1至图 4, 对本发明实施例提供的时钟控制电路及控制方法的具体 实施方式进行说明。
[0053] 参见图 1, 图 1是本发明实施例提供的时钟控制电路的一结构示意图。 本发明实 施例提供的时钟控制电路包括: 时钟源 11、 复位信号源 12、 寄存器组 14以及时 钟控制单元 13, 上述时钟控制单元 13包括时钟调整模块 1301和时钟门控 1302, 其中:
[0054] 上述时钟调整模块 1301的第一接收端与上述时钟源 11相连, 上述时钟调整模块 1301的第二接收端与上述复位信号源 12相连;
[0055] 上述时钟门控 1302的数据输入端与上述时钟调整模块 1301的输出端相连, 上述 时钟门控 1302的时钟输入端与上述时钟源 11相连, 上述时钟门控 1302的输出端 与上述寄存器组 14的一端相连;
[0056] 上述寄存器组 14的另一端与上述复位信号源 12相连, 其中上述寄存器组 14至少 包括两个寄存器;
[0057] 具体地, 上述时钟调整模块 1301接收到上述复位信号源 12输出的复位信号后, 控制上述时钟门控 1302在上述寄存器组 14中的各个第一寄存器接收到上述复位 信号源 12输出的复位信号并完成复位后, 将上述时钟源 11输出的第一时钟信号 调整为第二时钟信号, 并向上述寄存器组 14输出上述第二时钟信号。 [0058] 在一些可行的实施方式中, 上述时钟调整模块 1301中包括数据源和 N个第二寄 存器, 其中, N为大于 1的整数;
[0059] 具体地, 每个第二寄存器的时钟输入端与上述时钟源相连, 每个第二寄存器的 复位信号输入端与上述复位信号源 12相连, 第一个第二寄存器的数据输入端与 上述数据源 11相连, 第 I个寄存器的数据输入端与第 1-1个寄存器的数据输出端相 连, 第 N个寄存器的数据输出端与上述时钟门控 1302的数据输入端相连, 其中 1 < ISN
[0060] 在一些可行的实施方式中, 上述时钟调整模块 1301接收到上述复位信号后, 将 上述 N个第二寄存器复位;
[0061] 具体地, 当第 J个第二寄存器完成复位后, 上述第一时钟信号在第 J个时钟周期 触发第 J个第二寄存器, 上述第 J个第二寄存器的数据输出端将上述第 J个第二寄 存器的数据输入端接收到的数据输出至第 J+ 1个第二寄存器的数据输入端, 其中 1 <J < N;
[0062] 当上述第 N个第二寄存器完成复位后, 上述第一时钟信号在第 N个时钟周期触 发上述第 N个第二寄存器, 上述第 N个第二寄存器的数据输出端将上述第 N个第 二寄存器的数据输入端接收到的数据输出至上述时钟门控 1301的数据输入端。
[0063] 在一些可行的实施方式中, 当上述时钟门控 1302的数据输入端接收到上述第 N 个第二寄存器输出的数据时, 上述时钟门控 1302将第 N个时钟周期后的上述第一 时钟信号作为上述第二时钟信号输出至上述寄存器组 14。
[0064] 在一些可行的实时方式中, 上述时钟调整模块 1301中的第二寄存器的数量 N由 上述寄存器组 14中的目标第一寄存器接收到上述复位信号并完成复位的目标时 长确定, 且上述数据源输出的数据从上述第一个第二寄存器传输至上述第 N个第 二寄存器并由上述第 N个第二寄存器传输至上述时钟门控 1302的时长不小于上述 目标时长;
[0065] 其中, 上述目标第一寄存器为上述寄存器组 14中接收到上述复位信号并完成复 位的时长最长的第一寄存器, 且当上述目标第一寄存器完成复位时, 上述寄存 器组 14中的除上述目标第一寄存器外的其他第一寄存器均完成复位。
[0066] 在一些可行的实施方式中, 上述时钟控制电路还包括: 滤波电路 15, 其中: [0067] 上述滤波电路 15的接收端连接上述复位信号源 12, 上述滤波电路 15的第一输出 端与上述时钟调整模块 1301的第二接收端相连, 上述滤波电路 15的输出端与上 述寄存器组 14的另一端相连;
[0068] 具体地, 上述滤波电路 15在上述复位信号源 12输出上述复位信号后, 可消除上 述复位信号在上电前和 /或上电时产生的毛刺, 得到消除毛刺后的复位信号。
[0069] 本发明实施例提供的时钟控制电路可通过其内置的各个模块执行如图 1所示的 时钟控制电路所提供的实现方式, 在具体实现中:
[0070] 可选地, 上述时钟源 11可用于生成上述第一时钟信号等实现方式, 具体可参见 图 1所示的时钟控制电路所提供的实现方式, 在此不再赘述。
[0071] 可选地, 上述复位信号源 12可用于生成上述复位信号等实现方式, 具体可参见 图 1所示的时钟控制电路所提供的实现方式, 在此不再赘述。
[0072] 可选地, 上述时钟调整模块 1301可用于接收到上述复位信号源 11输出的复位信 号等实现方式, 具体可参见图 1所示的时钟控制电路所提供的实现方式, 在此不 再赘述。
[0073] 可选地, 上述时钟门控 1302可用于向上述寄存器组 14输出上述第二时钟信号等 实现方式, 具体可参见图 1所示的时钟控制电路所提供的实现方式, 在此不再赘 述。
[0074] 可选地, 上述寄存器组 14可用于接收上述第二时钟信号以及上述复位信号等实 现方式, 具体可参见图 1所示的时钟控制电路所提供的实现方式, 在此不再赘述
[0075] 可选地, 上述滤波电路 15可用于在上述复位信号源 12输出上述复位信号后, 消 除上述复位信号在上电前和 /或上电时产生的毛刺, 得到消除毛刺后的复位信号 等实现方式, 具体可参见图 1所示的时钟控制电路所提供的实现方式, 在此不再 赘述。
[0076] 在本发明实施例中, 时钟控制电路通过时钟控制单元使时钟信号能在控制电路 的寄存器组全部完成复位以后向寄存器组输出, 解决了在传统电路中由于复位 信号传输到每个寄存器需要的时间不一致, 导致一部分寄存器在单时钟周期内 不能完成复位的问题。 避免了由于寄存器组中多个复位寄存器复位时刻差异所 带来的电路逻辑错误, 以及随之带来的电路降频和功耗增加的问题, 适用性高
[0077] 参见图 2, 图 2是本发明实施例提供的时钟控制方法的一流程示意图, 本发明实 施例提供的时钟控制方法可包括如下步骤 S201-S203:
[0078] S201 终端内置的时钟源和复位信号源分别输出第一时钟信号和复位信号。
[0079] 在一些可行的实施方式中, 上述终端内置的时钟源 11可以是内部时钟源, 也可 以是外部时钟源, 对此不做任何限制, 同时, 内部时钟源和 /或外部时钟源的高 速与低速也不做任何限制。
[0080] 以 STM32F4单片机为例, STM32F4单片机可以提供频率为 32kHz左右或者频率 为 32.768kHz的内部低速时钟源, 也可提供频率为 16MHz内部高速时钟源, 同时 也可外接 4M~26MHz晶振获取外部高速时钟源。 此外, 也可以接收由锁相环倍 频输出的外部高速时钟源。
[0081] 在一些可行的实施方式中, 可在上述复位信号源输出上述复位信号后, 消除上 述复位信号在上电前和 /或上电时产生的毛刺, 得到消除毛刺后的复位信号。 复 位信号在产生的过程中, 在复位信号源器件内部通过连线和逻辑单元时, 都会 产生一定的延时。 延时的大小与连线的长短和逻辑单元的数目有关, 同时还受 器件的制造工艺、 工作电压、 温度等条件的影响。 在此过程中复位信号产生毛 刺会对复位信号的稳定性以及电路的正常工作造成影响。 在本发明实施例中, 可通过滤波电路消除复位信号中的毛刺, 同时滤波电路的功能还可以通过软件 来实现, 在此不做限制。
[0082] S202, 当上述终端内置的时钟调整模块接收到上述复位信号后, 上述终端使其 内置的时钟调整模块控制上述终端内置的时钟门控在上述终端内的寄存器组中 的各个第一寄存器接收到上述复位信号并完成复位后, 将上述第一时钟信号调 整为第二时钟信号。
[0083] 结合图 3 , 图 3是本发明实施例提供的包括本发明提供的时钟控制电路的一终端 内部电路原理示意图。 在图 3中, 时钟控制单元 13中包括时钟调整模块 1301和时 钟门控 1302, 其中上述时钟调整模块 1301由 N个第二寄存器一个数据源串联组成 , 其中, N为大于 1的整数。 [0084] 每个第二寄存器的时钟输入端与上述时钟源 11相连, 每个第二寄存器的复位信 号输入端与上述复位信号源 12相连, 第一个第二寄存器的数据输入端与上述数 据源相连, 第 I个寄存器的数据输入端与第 1-1个寄存器的数据输出端相连, 第 N 个寄存器的数据输出端与上述时钟门控 1302的数据输入端相连, 其中 1 < ^N
[0085] 当复位信号源 12生成的复位信号为 0时, 即复位信号为低复位状态时, 上述终 端可通过上述复位信号将上述时钟调整模块 1301内的各寄存器复位, 此时上述 时钟门控 1302处于关闭状态。 即上述时钟控制单元 13不能将时钟信号传递到上 述终端内的寄存器组 14, 上述寄存器组 14内的各寄存器不工作。 当上述寄存器 组 14内的各寄存器完成复位之后, 此时上述复位信号源 12生成的复位信号为 1释 放, 即上述复位信号为高复位状态, 不再控制上述时钟调整模块 1301内的各寄 存器和上述寄存器组 14中的各寄存器复位。
[0086] 在一些可行的实施方式中, 当上述时钟控制模块内 1301内的各寄存器完成复位 之后, 上述时钟控制模块内 1301的数据源向上述时钟控制模块 1301内的第一个 第二寄存器输出数据。 同时上述第一时钟信号依次向上述时钟调整模块 1301内 的各个第二寄存器传递, 以触发上述时钟调整模块 1301内的各个第二寄存器输 出接收到的数据。 需要特别说明的是, 上述数据源输出的数据的值可根据实际 电路场景确定, 在此不做限制。
[0087] 当上述时钟调整模块 1301内的第 J个第二寄存器完成复位后, 上述第一时钟信 号可在第 J个时钟周期触发第 J个第二寄存器, 此时第 J个第二寄存器开始工作。 即上述第 J个第二寄存器的数据输出端将上述第 J个第二寄存器的数据输入端接收 到的数据输出至第 J+ 1个第二寄存器的数据输入端, 其中 1 < N ;
[0088] 当上述第 N个第二寄存器完成复位后, 上述第一时钟信号在第 N个时钟周期触 发上述第 N个第二寄存器, 此时上述第 N个第二寄存器的数据输出端将上述第 N 个第二寄存器的数据输入端接收到的数据输出至上述时钟门控 1302的数据输入 端。 当上述时钟门控 1302接收到上述第 N个第二寄存器输出的数据后, 上述时钟 门控 1302将上述第一时钟信号调整为上述第二时钟信号。
[0089] 结合图 3 , 在一些可行的实施方式中, 当上述复位信号为 0时, 上述终端使其内 置的寄存器组 14接收上述复位信号, 并将上述寄存器组 14内的各寄存器完成复 位。 否则, 若上述寄存器组 14内的各寄存器没有全部完成复位, 则在终端内的 电路实际工作中会产生逻辑错误, 导致终端功耗的增加。
[0090] 需要特别说明的是, 图 3所提供的寄存器组只是上述终端内置的寄存器组 14的 某种表现形式, 不同终端的不同功能决定了终端内置的寄存器组 14中寄存器的 不同连接方式和数量, 在此不做限制。 同时由此产生的时钟树的结构组成和复 位信号的传输路径也会有多种表现形式, 在此也不做任何限制。
[0091] 在一些可行的实施方式中, 上述终端内置的时钟调整模块 1301中的第二寄存器 的数量 N由上述终端内置的寄存器组 14中的目标第一寄存器接收到上述复位信号 并完成复位的目标时长确定, 且上述 N个第二寄存器接收到上述数据源输出的数 据至上述 N个第二寄存器将上述数据输出至上述终端内置的时钟门控 1302的时长 不小于上述目标时长。
[0092] 例如, 图 3中曲线 A表示上述复位信号传递到上述寄存器组 14中的各个第一寄存 器的最长传输路径, 曲线 A的最终指向的第一寄存器为目标第一寄存器。
[0093] 具体地, 上述复位信号在沿曲线 A的路径传递到上述寄存器组 14内的目标第一 寄存器, 且目标第一寄存器在低复位信号的作用下完成复位时, 代表了上述寄 存器组 14中各个第一寄存器均已完成复位。 此时上述时钟门控 1302接收到上述 第 N个第二寄存器输出的数据后, 将上述第一时钟信号调整为上述第二时钟信号
[0094] 在一些可行的实施方式中, 由于寄存器组 14内的各个第一寄存器的数量和连接 方式在不同终端和功能的影响下不会有固定的表现形式, 故在不同的时钟控制 电路中, 上述时钟调整模块内 1301内的寄存器数量也会随之改变。
[0095] 也就是说, 在控制第二时钟信号向寄存器组 14输出时, 首先要根据寄存器组 14 内的目标第一寄存器接收到复位信号并完成复位的目标时长来确定上述时钟调 整模块内的寄存器数量, 以确上述保时钟门控 1302在上述寄存器组 14中的各个 第一寄存器接收到上述复位信号并完成复位后, 将上述第一时钟信号调整为第 二时钟信号。
[0096] 具体地, 在电路进行工作之前, 可先获取上述终端内置的寄存器组 14中的目标 第一寄存器接收到上述复位信号并完成复位的目标时长, 再获取上述时钟调整 模块 1302内的一个第二寄存器接收到上述时钟源 11输出的数据至将上述数据输 出数据的传输时长, 基于上述目标时长和上述传输时长确定上述时钟调整模块 1 301内的第二寄存器的数量 N, 其中, 上述时钟调整模块 1301中的第一个第二寄 存器接收到上述数据至上述时钟调整模块 1301中的第 N个第二寄存器输出上述数 据的时长不小于上述目标时长。
[0097] 例如, 当上述目标时长为 10ms, 上述传输时长为 2ms, 则可确定上述目标时长 不大于 5个上述传输时长, 此时上述时钟调整模块 1301内的第二寄存器数量为 5 。 再如, 当上述目标时长为 10ms, 上述传输时长为 1.5ms, 则可确定上述目标时 长不大于 7个上述传输时长, 此时上述时钟调整模块 1301内的第二寄存器数量为 1。
[0098] 在这种时长要求下, 可确保上述第二时钟信号在向上述寄存器组 14传递时, 上 述寄存器组 14内的各个第一寄存器都已经完成复位, 此时可使电路进入正常工 作状态。
[0099] 在一些可行的实施方式中, 可在上述寄存器组 14内以及上述寄存器组 14与上述 复位信号源 12之间, 根据实际电路的复杂程度和功能需求添加一定数量的缓冲 器, 可提高扇出较大的电路的负载能力, 提高电路驱动能力。
[0100] 可选的, 虽然上述时钟控制电路内的缓冲器对流经该缓冲器的复位信号的状态 不产生任何作用, 但可对时钟控制电路和终端和 /或外设之间起协调作用, 在实 现复位信号尽可能的同步传输之外, 通过一定数量的缓冲器可有效确保电路中 信号的时序正确, 提升终端内部电路的稳定性。
[0101] 可选的, 由于上述缓冲器是上述时钟控制电路中实际的电器元件, 故在上述时 钟电路内存在大量缓冲器的情况下, 会对上述时钟控制电路内的复位信号的传 输造成一定的传输时延, 故上述复位信号传递至上述寄存器组中的寄存器所用 时长中应充分考虑上述复位信号在传输过程中经过缓冲器所造成的时延时长。
[0102] 参见图 4, 图 4是本发明实施例提供的时钟控制电路的一时序示意图。
[0103] 在本发明实施例提供的时钟控制电路的一时序示意图中, 第一时钟信号在进入 时钟控制单兀 13后持续传递。
[0104] 在图 4中可以看出, 当复位信号由低复位状态变为高复位状态的时刻, 即上述 寄存器组中的各寄存器已全部完成复位的相同时刻, 上述时钟门控开启向上述 寄存器组中的各寄存器输出第二时钟信号, 开启上述寄存器组的逻辑工作状态
[0105] 在未采用本发明实施例提供的时钟控制电路及控制方法时, 由于上述复位信号 到达同一寄存器组中的不同寄存器的路径不同, 会导致复位信号到达不同寄存 器的延时时长不同, 从而使得统一时钟域的不同寄存器会在不同的时刻进行复 位。
[0106] 例如, 对于同一寄存器组的寄存器 A和寄存器 B复位, 信号到达寄存器 A的路径 较短, 到达寄存器 B的路径较长, 此时寄存器 A可能先于寄存器 B复位。 由于没 有对时钟信号开始向寄存器组输出时钟信号的时刻进行限制, 故寄存器在复位 之后就开始正常工作。 在寄存器 A和寄存器 B在不同时刻完成复位的情况下, 同 一寄存器组中的寄存器就可能在不同的时刻开始正常工作, 这就有可能导致电 路内部逻辑功能的异常。
[0107] S203 , 上述终端内置的时钟门控向上述终端内置的寄存器组输出上述第二时钟 信号。
[0108] 在上述寄存器组 14内的各个第一寄存器完成复位之后, 上述时钟门控 1302将上 述第二时钟信号传输至上述寄存器组 14 此时的寄存器组 14在接收到上述第二 时钟信号之后进入工作状态。
[0109] 需要特别说明的是, 上述时钟门控 1302可在数据源输出的数据的作用下实现开 关功能, 即便上述寄存器组 14内的各寄存器全部完成复位, 上述时钟门控 1302 也要在接收到上述数据源输出的数据之后, 才能打开时钟门向上述寄存器组 14 输出上述第二时钟信号。 此外, 上述时钟门控 1302除了可以实现开关功能以向 上述寄存器组 14输出上述第二时钟信号之外, 还能保证上述第二时钟信号在向 上述寄存器组 14输出时, 不会出现信号翻转的情况, 可避免上述寄存器组 14内 的各寄存器接收到翻转信号不能同步工作而造成电路逻辑功能错误。
[0110] 在本发明实施例当中, 通过控制时钟控制电路内的时钟门控的开启时刻, 实现 了对时钟信号向时钟控制电路内的寄存器组输出的时刻控制, 进而将时钟信号 的时序变化控制在控制电路的寄存器组全部完成复位时或以后, 避免了由于寄 存器组中多个复位寄存器不能在一个时钟周期内完成复位所带来的电路逻辑错 误, 以及随之带来的电路降频和功耗增加的问题, 适用性高。
[0111] 本发明实施例还提供了一种终端, 上述终端包括本发明实施例提供的时钟控制 电路, 以及执行本发明实施例提供的时钟控制方法。
[0112] 参见图 5 , 图 5是本发明实施例提供的终端的结构示意图。
[0113] 如图 5所示, 本实施例中的终端可以包括: 时钟控制电路 501和存储器 502 上 述时钟控制电路 501和存储器 502通过总线 503连接。 存储器 502用于存储计算机 程序, 该计算机程序包括程序指令, 时钟控制电路 501用于执行存储器 502存储 的程序指令, 执行如下操作:
[0114] 时钟控制电路 501内置的时钟源和复位信号源分别输出第一时钟信号和复位信 号;
[0115] 当上述时钟控制电路 501内置的时钟调整模块接收到上述复位信号后, 上述时 钟控制电路 501使其内置的时钟调整模块控制上述时钟控制电路 501内置的时钟 门控在上述时钟控制电路 501内的寄存器组中的各个第一寄存器接收到上述复位 信号并完成复位后, 将上述第一时钟信号调整为第二时钟信号;
[0116] 上述时钟控制电路 501内置的时钟门控向上述时钟控制电路 501内置的寄存器组 输出上述第二时钟信号。
[0117] 在一些可行的实施方式中, 当上述时钟控制电路 501内置的时钟门控接收到上 述时钟控制电路 501内置的时钟调整模块输出的数据时, 上述时钟控制电路 501 内置的时钟门控将上述第一时钟信号作为上述第二时钟信号输出至上述时钟控 制电路 501内置的寄存器组;
[0118] 其中, 上述时钟控制电路 501内置的时钟调整模块中包括数据源和 N个第二寄存 器, N为大于 1的整数, 上述 N个第二寄存器用于接收上述数据源输出的数据并将 上述数据输出至上述时钟门控。
[0119] 在一些可行的实施方式中, 上述时钟控制电路 501内置的时钟调整模块中的第 二寄存器的数量 N由上述时钟控制电路 501内置的寄存器组中的目标第一寄存器 接收到上述复位信号并完成复位的目标时长确定, 且上述 N个第二寄存器接收到 上述数据源输出的数据至上述 N个第二寄存器将上述数据输出至上述终端内置的 时钟门控的时长不小于上述目标时长;
[0120] 其中, 上述目标第一寄存器为上述寄存器组中接收到上述复位信号并完成复位 的时长最长的第一寄存器, 且当上述目标第一寄存器完成复位时, 上述寄存器 组中的除上述目标第一寄存器外的其他第一寄存器均完成复位。
[0121] 在一种可行的实施方式中, 上述时钟控制电路 501还用于:
[0122] 获取上述时钟控制电路 501内置的寄存器组中的目标第一寄存器接收到上述复 位信号并完成复位的目标时长;
[0123] 获取上述时钟控制电路 501内置的时钟调整模块中的一个第二寄存器接收到上 述数据至输出上述数据的传输时长;
[0124] 基于上述目标时长和上述传输时长确定上述时钟控制电路 501内置的时钟调整 模块内的第二寄存器的数量 N, 其中, 上述时钟控制电路 501内置的时钟调整模 块中的第一个第二寄存器接收到上述数据至上述时钟控制电路 501内置的时钟调 整模块中的第 N个第二寄存器输出上述数据的时长不小于上述目标时长。
[0125] 在本发明实施例当中, 本发明实施例提供的终端可以是包括本发明实施例提供 的时钟控制电路和 /或用于执行本发明实施例提供的时钟控制方法的任一终端。 上述终端解决了传统终端内部电路中寄存器组中各寄存器不能在一个时钟周期 内全部完成复位的问题, 避免了由于寄存器组中多个复位寄存器复位时刻差异 所带来的电路逻辑错误, 以及随之带来的电路降频和功耗增加的问题, 适用性 高。
[0126] 本发明实施例还提供一种计算机可读存储介质, 该计算机可读存储介质存储有 计算机程序, 该计算机程序包括程序指令, 该程序指令被终端执行时实现图 1至 图 2中各个步骤所提供的电路和 /或方法, 具体可参见上述各个步骤所提供的实现 方式, 在此不再赘述。
[0127] 可选地, 上述计算机可读存储介质可以是前述任一实施例提供的时钟控制电路 或者上述终端的内部存储单元, 例如电子设备的硬盘或内存。 该计算机可读存 储介质也可以是该电子设备的外部存储设备, 例如该电子设备上配备的插接式 硬盘, 智能存储卡 (smart media card, SMC) , 安全数字 (secure digital, SD) 卡 , 闪存卡 (flashcard) 等。 [0128] 可选地, 上述计算机可读存储介质还可以包括磁碟、 光盘、 只读存储记忆体 ( read-only memory , ROM) 或随机存储记忆体 (random access memory, RAM) 等。 进一步地, 该计算机可读存储介质还可以既包括该电子设备的内部存储单 元也包括外部存储设备。 该计算机可读存储介质用于存储该计算机程序以及该 电子设备所需的其他程序和数据。 该计算机可读存储介质还可以用于暂时地存 储已经输出或者将要输出的数据。

Claims

权利要求书
[权利要求 i] 一种时钟控制电路, 其特征在于, 所述时钟控制电路包括: 时钟源、 复位信号源、 寄存器组以及时钟控制单元, 所述时钟控制单元包括时 钟调整模块和时钟门控, 其中:
所述时钟调整模块的第一接收端与所述时钟源相连, 所述时钟调整模 块的第二接收端与所述复位信号源相连; 所述时钟门控的数据输入端 与所述时钟调整模块的输出端相连, 所述时钟门控的时钟输入端与所 述时钟源相连, 所述时钟门控的输出端与所述寄存器组的一端相连, 所述寄存器组的另一端与所述复位信号源相连, 其中所述寄存器组中 包括多个第一寄存器;
所述时钟调整模块接收到所述复位信号源输出的复位信号后, 控制所 述时钟门控在所述寄存器组中的各个第一寄存器接收到所述复位信号 源输出的复位信号并完成复位后, 将所述时钟源输出的第一时钟信号 调整为第二时钟信号, 并向所述寄存器组输出所述第二时钟信号。
[权利要求 2] 根据权利要求 1所述的时钟控制电路, 其特征在于, 所述时钟调整模 块包括数据源和 N个第二寄存器, 其中, N为大于 1的整数; 每个第二寄存器的时钟输入端与所述时钟源相连, 每个第二寄存器的 复位信号输入端与所述复位信号源相连, 第一个第二寄存器的数据输 入端与所述数据源相连, 第 I个寄存器的数据输入端与第 1-1个寄存器 的数据输出端相连, 第 N个寄存器的数据输出端与所述时钟门控的数 据输入端相连, 其中 1 < ISN。
[权利要求 3] 根据权利要求 2所述的时钟控制电路, 其特征在于, 所述时钟调整模 块接收到所述复位信号后, 将所述 N个第二寄存器复位;
当第 J个第二寄存器完成复位后, 所述第一时钟信号在第 J个时钟周期 触发第 J个第二寄存器, 所述第 J个第二寄存器的数据输出端将所述第 J个第二寄存器的数据输入端接收到的数据输出至第 J+1个第二寄存器 的数据输入端, 其中 kJ < N;
当所述第 N个第二寄存器完成复位后, 所述第一时钟信号在第 N个时 钟周期触发所述第 N个第二寄存器, 所述第 N个第二寄存器的数据输 出端将所述第 N个第二寄存器的数据输入端接收到的数据输出至所述 时钟门控的数据输入端。
[权利要求 4] 根据权利要求 3所述的时钟控制电路, 其特征在于, 当所述时钟门控 的数据输入端接收到所述第 N个第二寄存器输出的数据时, 所述时钟 门控将第 N个时钟周期后的所述第一时钟信号作为所述第二时钟信号 输出至所述寄存器组。
[权利要求 5] 根据权利要求 3或 4所述的时钟控制电路, 其特征在于, 所述时钟调整 模块中的第二寄存器的数量 N由所述寄存器组中的目标第一寄存器接 收到所述复位信号并完成复位的目标时长确定, 且所述数据源输出的 数据从所述第一个第二寄存器传输至所述第 N个第二寄存器并由所述 第 N个第二寄存器传输至所述时钟门控的时长不小于所述目标时长; 其中, 所述目标第一寄存器为所述寄存器组中接收到所述复位信号并 完成复位的时长最长的第一寄存器, 且当所述目标第一寄存器完成复 位时, 所述寄存器组中的除所述目标第一寄存器外的其他第一寄存器 均完成复位。
[权利要求 6] 根据权利要求 1至 5任一项所述的时钟控制电路, 其特征在于, 所述时 钟控制电路还包括: 滤波电路, 其中:
所述滤波电路的接收端连接所述复位信号源, 所述滤波电路的输出端 与所述时钟调整模块的第二接收端相连, 所述滤波电路的输出端还与 所述寄存器组的另一端相连;
所述滤波电路在所述复位信号源输出所述复位信号后, 消除所述复位 信号在上电前和 /或上电时产生的毛刺, 得到消除毛刺后的复位信号
[权利要求 7] 一种时钟控制方法, 其特征在于, 所述方法适用于包括如权利要求 1 至 6任一项所述的时钟控制电路的终端, 所述方法包括:
终端内置的时钟源和复位信号源分别输出第一时钟信号和复位信号; 当所述终端内置的时钟调整模块接收到所述复位信号后, 所述终端使 其内置的时钟调整模块控制所述终端内置的时钟门控在所述终端内的 寄存器组中的各个第一寄存器接收到所述复位信号并完成复位后, 将 所述第一时钟信号调整为第二时钟信号;
所述终端内置的时钟门控向所述终端内置的寄存器组输出所述第二时 钟信号。
[权利要求 8] 根据权利要求 7所述的方法, 其特征在于, 所述终端内置的时钟门控 向所述终端内置的寄存器组输出所述第二时钟信号, 所述方法包括: 当所述终端内置的时钟门控接收到所述终端内置的时钟调整模块输出 的数据后, 所述终端内置的时钟门控将所述第一时钟信号作为所述第 二时钟信号输出至所述终端内置的寄存器组;
其中, 所述终端内置的时钟调整模块中包括数据源和 N个第二寄存器 , N为大于 1的整数, 所述 N个第二寄存器用于接收所述数据源输出的 数据并将所述数据输出至所述时钟门控。
[权利要求 9] 根据权利要求 7或 8所述的方法, 其特征在于, 所述终端内置的时钟调 整模块中的第二寄存器的数量 N由所述终端内置的寄存器组中的目标 第一寄存器接收到所述复位信号并完成复位的目标时长确定, 且所述 N个第二寄存器接收到所述数据源输出的数据至所述 N个第二寄存器 将所述数据输出至所述终端内置的时钟门控的时长不小于所述目标时 长;
其中, 所述目标第一寄存器为所述寄存器组中接收到所述复位信号并 完成复位的时长最长的第一寄存器, 且当所述目标第一寄存器完成复 位时, 所述寄存器组中的除所述目标第一寄存器外的其他第一寄存器 均完成复位。
[权利要求 10] 根据权利要求 9所述的方法, 其特征在于, 所述方法还包括:
获取所述终端内置的寄存器组中的目标第一寄存器接收到所述复位信 号并完成复位的目标时长;
获取所述终端内置的时钟调整模块中的一个第二寄存器接收到所述数 据至输出所述数据的传输时长; 基于所述目标时长和所述传输时长确定所述时钟调整模块内的第二寄 存器的数量 N, 其中, 所述时钟调整模块中的第一个第二寄存器接收 到所述数据至所述时钟调整模块中的第 N个第二寄存器输出所述数据 的时长不小于所述目标时长。
PCT/CN2019/114441 2018-12-29 2019-10-30 一种时钟控制电路及控制方法 WO2020134531A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/256,657 US11016525B1 (en) 2018-12-29 2019-10-30 Clock control circuit and clock control method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811641843.4A CN109799870B (zh) 2018-12-29 2018-12-29 一种时钟控制电路及控制方法
CN201811641843.4 2018-12-29

Publications (1)

Publication Number Publication Date
WO2020134531A1 true WO2020134531A1 (zh) 2020-07-02

Family

ID=66558271

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/114441 WO2020134531A1 (zh) 2018-12-29 2019-10-30 一种时钟控制电路及控制方法

Country Status (3)

Country Link
US (1) US11016525B1 (zh)
CN (1) CN109799870B (zh)
WO (1) WO2020134531A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114417760A (zh) * 2022-01-28 2022-04-29 杭州士兰微电子股份有限公司 包含时钟门控电路的触发单元

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109799870B (zh) * 2018-12-29 2021-03-05 深圳云天励飞技术有限公司 一种时钟控制电路及控制方法
CN110673689B (zh) * 2019-09-23 2021-09-14 深圳云天励飞技术有限公司 时钟控制电路及方法
CN112104435B (zh) * 2020-08-28 2022-08-30 新华三技术有限公司 一种时钟延时补偿方法、逻辑装置及网络设备
CN115236493B (zh) * 2022-07-28 2023-07-21 摩尔线程智能科技(北京)有限责任公司 Dft测试电路、测试***以及测试方法
CN116126116B (zh) * 2023-02-03 2023-12-01 芯动微电子科技(武汉)有限公司 时钟复位电路、方法、装置、***级芯片和存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1588639A (zh) * 2004-08-18 2005-03-02 大唐微电子技术有限公司 集成电路复位方法及复位***
CN101021739A (zh) * 2007-03-28 2007-08-22 威盛电子股份有限公司 复位***及复位方法
TW201020745A (en) * 2008-11-20 2010-06-01 Holtek Semiconductor Inc Control circuit for power-on-reset and its operating method
CN102156899A (zh) * 2011-04-25 2011-08-17 广州中大微电子有限公司 Rfid标签芯片时钟管理单元
US20160164532A1 (en) * 2014-12-05 2016-06-09 Texas Instruments Incorporated Clock conditioner circuitry with improved holdover exit transient performance
CN109799870A (zh) * 2018-12-29 2019-05-24 深圳云天励飞技术有限公司 一种时钟控制电路及控制方法

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1999059051A1 (fr) * 1998-05-13 1999-11-18 Mitsubishi Denki Kabushiki Kaisha Dispositif et appareil pour detecter une defaillance d'horloge
US6457137B1 (en) * 1999-05-28 2002-09-24 3Com Corporation Method for configuring clock ratios in a microprocessor
US6696854B2 (en) * 2001-09-17 2004-02-24 Broadcom Corporation Methods and circuitry for implementing first-in first-out structure
US7039823B2 (en) * 2002-04-26 2006-05-02 Texas Instruments Incorporated On-chip reset circuitry and method
JP3920830B2 (ja) * 2003-09-19 2007-05-30 三洋電機株式会社 インターフェース回路、データ処理回路、データ処理システム、集積回路
WO2006087806A1 (ja) * 2005-02-18 2006-08-24 Fujitsu Limited クロック生成装置、クロック生成方法、クロック生成プログラム、動作検証装置、動作検証方法及び動作検証プログラム
CN100549909C (zh) * 2006-10-09 2009-10-14 中兴通讯股份有限公司 一种异步复位电路及其实现方法
CN100541385C (zh) * 2007-12-28 2009-09-16 北京航空航天大学 数字电视调制器芯片中同步分频时钟的产生装置及其方法
CN101825939B (zh) * 2010-04-30 2012-06-27 深圳市芯海科技有限公司 一种数字***及其上电复位电路
CN102629459A (zh) * 2011-10-26 2012-08-08 北京京东方光电科技有限公司 栅线驱动方法、移位寄存器及栅线驱动装置
CN103021466B (zh) * 2012-12-14 2016-08-03 京东方科技集团股份有限公司 移位寄存器及其工作方法、栅极驱动装置、显示装置
CN104348465B (zh) * 2013-07-26 2018-08-14 华为技术有限公司 一种控制方法和控制电路
CN103944546A (zh) * 2014-03-28 2014-07-23 山东华芯半导体有限公司 一种避免芯片内部复位信号失效的装置和方法
CN104461985B (zh) * 2014-12-31 2017-06-20 哈尔滨工业大学 基于节点级联的主从同步串行通讯总线及其实现方法
CN105096879B (zh) * 2015-08-20 2018-03-20 京东方科技集团股份有限公司 移位寄存器单元及其驱动方法、栅极驱动装置和显示装置
CN107179801B (zh) * 2017-05-31 2023-10-10 北京集创北方科技股份有限公司 数模集成电路及其控制方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1588639A (zh) * 2004-08-18 2005-03-02 大唐微电子技术有限公司 集成电路复位方法及复位***
CN101021739A (zh) * 2007-03-28 2007-08-22 威盛电子股份有限公司 复位***及复位方法
TW201020745A (en) * 2008-11-20 2010-06-01 Holtek Semiconductor Inc Control circuit for power-on-reset and its operating method
CN102156899A (zh) * 2011-04-25 2011-08-17 广州中大微电子有限公司 Rfid标签芯片时钟管理单元
US20160164532A1 (en) * 2014-12-05 2016-06-09 Texas Instruments Incorporated Clock conditioner circuitry with improved holdover exit transient performance
CN109799870A (zh) * 2018-12-29 2019-05-24 深圳云天励飞技术有限公司 一种时钟控制电路及控制方法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114417760A (zh) * 2022-01-28 2022-04-29 杭州士兰微电子股份有限公司 包含时钟门控电路的触发单元

Also Published As

Publication number Publication date
CN109799870B (zh) 2021-03-05
CN109799870A (zh) 2019-05-24
US20210149434A1 (en) 2021-05-20
US11016525B1 (en) 2021-05-25

Similar Documents

Publication Publication Date Title
WO2020134531A1 (zh) 一种时钟控制电路及控制方法
US10430372B2 (en) System on chip including clock management unit and method of operating the system on chip
US8214668B2 (en) Synchronizing circuit
US10572406B2 (en) Memory controller for receiving differential data strobe signals and application processor having the memory controller
US11768607B1 (en) Flash controller for ASIC and control method therefor
US8531893B2 (en) Semiconductor device and data processor
US20090150706A1 (en) Wrapper circuit for globally asynchronous locally synchronous system and method for operating the same
US8352794B2 (en) Control of clock gating
US10331592B2 (en) Communication apparatus with direct control and associated methods
US8176352B2 (en) Clock domain data transfer device and methods thereof
CN113342718A (zh) 一种rtc的硬件架构及其读写控制方法
CN111143122B (zh) 一种可靠的交换芯片复位结构及其复位方法
US6424179B1 (en) Logic unit and integrated circuit for clearing interrupts
CN105306022A (zh) 一种用于异步电路四相位握手协议的非对称延时装置
WO2022037638A1 (zh) 集成电路复位的方法和集成电路
US7031421B2 (en) Method and device for initializing an asynchronous latch chain
US6519664B1 (en) Parallel terminated bus system
WO2023283886A1 (zh) 一种寄存器阵列电路和访问寄存器阵列的方法
CN114371876A (zh) 一种寄存器的配置电路以及一种集成电路芯片
US11693461B1 (en) Module reset circuit, reset unit and SoC reset architecture
CN205304755U (zh) 一种用于异步电路四相位握手协议的非对称延时装置
TWI751796B (zh) 可由外部訊號直接啟動輸出的處理器
CN117991867B (zh) 一种onfi物理层的通路时钟控制电路
CN114545801B (zh) 可由外部信号直接启动输出的处理器
CN103840801B (zh) 延迟电路

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19905559

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19905559

Country of ref document: EP

Kind code of ref document: A1