WO2011023030A1 - Integrated circuit and method for acquiring reference clock in integrated circuit - Google Patents

Integrated circuit and method for acquiring reference clock in integrated circuit Download PDF

Info

Publication number
WO2011023030A1
WO2011023030A1 PCT/CN2010/074530 CN2010074530W WO2011023030A1 WO 2011023030 A1 WO2011023030 A1 WO 2011023030A1 CN 2010074530 W CN2010074530 W CN 2010074530W WO 2011023030 A1 WO2011023030 A1 WO 2011023030A1
Authority
WO
WIPO (PCT)
Prior art keywords
frequency
signal
reference clock
clock
integrated circuit
Prior art date
Application number
PCT/CN2010/074530
Other languages
French (fr)
Chinese (zh)
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 炬力集成电路设计有限公司
Publication of WO2011023030A1 publication Critical patent/WO2011023030A1/en

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

Definitions

  • the present invention relates to the field of integrated circuit technology, and more particularly to an integrated circuit and a method of obtaining a reference clock in an integrated circuit. Background of the invention
  • FIG. 1 is a schematic block diagram of a clock device of a prior art system in the prior art. As shown in FIG. 1, the high frequency crystal oscillator 12 is used as a clock source of a phase-locked loop (PLL) group 111 in the SOC 11, and generates high voltages required for various high frequency circuits in the SOC 11. Frequency clock.
  • PLL phase-locked loop
  • the low frequency crystal oscillator 13 has two main purposes: one is to generate an operating clock when the SOC 11 is in standby; the other is used as a clock source of the low frequency frequency divider 112 in the SOC 11 to generate a precision timing circuit.
  • the timing reference clock is typically a clock with a frequency of 1 Hz.
  • the precision timing circuit in the SOC is mainly used to implement timing functions in seconds, such as perpetual calendar and Digital Right Management (DRM).
  • DRM Digital Right Management
  • the reference clock required for accurate timing can be generated by frequency division of the high-frequency crystal oscillator, the power consumption of the SOC in the standby state is unacceptable due to the large current during oscillation of the high-frequency crystal oscillator. Therefore, in the existing SOC, a lower power crystal oscillator with lower power consumption is generally used to generate a reference clock required for precise timing.
  • the disadvantage of the prior art is that the SOC not only needs to be equipped with two pins for the high frequency crystal oscillator, but also has two pins for the low frequency crystal oscillator, which leads to the most rare in the SOC. Lack of resources - pins, more intense, scarce. Moreover, because the Bill of Material (BOM) of the SOC application product needs to increase the resistance and capacitance required for the low-frequency crystal oscillator and its application circuit, thereby increasing the BOM cost of the SOC application product and reducing the market competitiveness of the SOC.
  • BOM Bill of Material
  • the present invention proposes an integrated circuit and a method of obtaining a reference clock in an integrated circuit to conserve resources of the integrated circuit.
  • An integrated circuit includes: a first frequency dividing unit, a counter, an oscillating signal generating circuit, and a second frequency dividing unit; wherein:
  • the first frequency dividing unit is configured to obtain a first reference clock by dividing an external clock signal from outside the integrated circuit
  • the oscillation signal generating circuit is configured to generate an oscillating signal
  • the counter is configured to obtain frequency information of the oscillating signal by counting the oscillating signal by using the first reference clock;
  • the second frequency dividing unit is configured to divide the oscillating signal according to a frequency dividing factor obtained according to the frequency information to obtain a second reference clock.
  • the embodiment of the invention further provides a method for obtaining a reference clock in an integrated circuit, the method comprising:
  • a first reference clock is obtained by dividing an external clock signal from outside the integrated circuit
  • Frequency information of the oscillating signal is obtained by counting the oscillating signal by using the first reference clock; and And dividing the oscillating signal according to a frequency dividing factor obtained according to the frequency information to obtain a second reference clock.
  • FIG. 1 is a schematic block diagram of a clock device of a system on chip in the prior art
  • FIG. 2 is a block diagram of a system on chip using the solution of the present invention
  • FIG. 3 is a block diagram of an implementation of a reference clock generating apparatus according to an embodiment of the present invention
  • FIG. 4 is a block diagram of another implementation of a reference clock generating apparatus according to an embodiment of the present invention
  • FIG. a processing flowchart for generating a reference clock by the device and,
  • FIG. 6 is a flowchart of implementing a reference clock according to an embodiment of the present invention.
  • FIG. 2 shows a block diagram of a system on a chip employing an embodiment of the present invention.
  • the low frequency crystal oscillator is no longer required at the periphery of the SOC 21, but the reference clock generating means 212 in the system on chip generates a reference clock signal in accordance with the high frequency clock signal from the high frequency crystal oscillator 22. And once the reference clock signal can be output, the reference clock generating means 212 can generate a stable reference clock signal by itself without relying on the high frequency clock signal. The low power requirement of the soc in the standby state.
  • An integrated circuit includes: a first frequency dividing unit, a counter, an oscillating signal generating circuit, and a second frequency dividing unit; wherein:
  • the first frequency dividing unit is configured to obtain a first reference clock by dividing an external clock signal input from the external circuit
  • the oscillating signal generating circuit is configured to generate an oscillating signal
  • the counter is configured to obtain the frequency information of the oscillating signal by counting the oscillating signal by using the first reference clock; wherein the frequency information may be a frequency value of the oscillating signal, or any one of the oscillating signal frequency values Frequency or multiplier value, etc.
  • the method for counting the oscillating signal by using the first reference clock to obtain the frequency information of the oscillating signal may be, for example, after the first frequency dividing unit obtains the first reference clock of 0.5 Hz, and is at the first reference.
  • the oscillation signal is counted during the period corresponding to the high level or low level portion of one cycle of the clock (the duration is 1 second), thereby obtaining the frequency value of the oscillating signal; it can be understood that there may be more in the specific implementation.
  • the oscillating signal is counted in one cycle of the first reference clock to obtain a double frequency value of the oscillating signal, etc., and the first obtained by the first frequency dividing unit is obtained.
  • the reference clock is also not limited to 0.5 Hz.
  • the second frequency dividing unit is configured to divide the oscillating signal according to the frequency dividing factor obtained according to the frequency information to obtain a second reference clock; wherein the frequency dividing factor obtained according to the frequency information may be the frequency information itself, or Any frequency value or multiplication value of the frequency information.
  • the second frequency dividing unit may include a frequency divider.
  • the first frequency dividing unit may include a first frequency divider and a second frequency divider; wherein the first frequency divider is configured to use the first clock input from the outside of the integrated circuit by using a frequency dividing factor (ie: The aforementioned external clock signal is divided to obtain a clock signal; the second frequency divider is configured to obtain a first reference by dividing a clock signal obtained by the first frequency divider by two. Clock signal.
  • a frequency dividing factor ie: The aforementioned external clock signal is divided to obtain a clock signal; the second frequency divider is configured to obtain a first reference by dividing a clock signal obtained by the first frequency divider by two. Clock signal.
  • the first frequency dividing unit may further include a frequency divider, configured to divide the first clock input from the external circuit by using a frequency dividing factor to obtain a first reference clock. .
  • the integrated circuit may further include a control unit, configured to control the first frequency dividing unit, the counter, and any one of the devices external to the integrated circuit for generating the first clock after the counter obtains the counting result. Or any combination into a non-working state.
  • the device for generating the first clock may be referred to as a clock generating unit for generating an external clock signal. This can save power consumption; and after that, the second frequency dividing unit can still divide the oscillating signal according to the counting result to obtain the second reference clock.
  • the integrated circuit further includes: an automatic calibration unit for controlling the first frequency dividing unit, the counter, and the device for generating the first clock to enter an operating state according to a predetermined calibration interval time.
  • the first clock may be a high frequency clock, and the oscillating signal may be a low frequency oscillating signal.
  • the frequency dividing factor for dividing the first clock may be the nominal frequency of the first clock or the frequency dividing frequency or frequency multiplication frequency of the nominal frequency.
  • FIG. 3 is a block diagram showing an implementation of a reference clock generating device 212 in a system-on-chip according to a second embodiment of the present invention, including a first frequency divider 31, a second frequency divider 32, a counter 33, a low frequency RC oscillator 34, and The third frequency divider 35.
  • the first frequency divider 31 divides the high frequency clock (which may be a high frequency crystal oscillation clock generated by a high frequency crystal oscillator, which is called a high frequency crystal oscillator clock) input from the outside of the integrated circuit. , produces a 1 Hz clock.
  • the input of the first frequency divider 31 includes a start signal, a first frequency dividing factor, and a high frequency clock input from the outside of the integrated circuit, and outputs a clock signal having a frequency of 1 Hz.
  • the first frequency dividing factor is a constant, and the value is a high frequency crystal oscillator
  • the frequency of the high frequency clock generated by the sigma that is, the nominal frequency of the high frequency crystal oscillator.
  • the input of the second frequency divider 32 includes a start signal and a 1 Hz clock generated by the first frequency divider 31, and an output duty cycle of 1, a first reference clock signal having a frequency of 0.5 Hz.
  • the division factor of the second frequency divider 32 is referred to as a second frequency division factor, and its value is 2.
  • the second frequency divider 32 can be implemented by a divide-by-2 circuit, for example, "T. "Type edge triggers are implemented.
  • the first reference clock signal can also be generated by a frequency divider that uses a nominal frequency of twice the high frequency crystal oscillator as a frequency division factor pair.
  • the high frequency clock input from the outside of the integrated circuit is divided, and the first reference clock of 0.5 Hz with a duty ratio of 1 can also be output.
  • the input of the counter 33 includes an enable signal, a 0.5 Hz clock signal generated by the second frequency divider 32, and a low frequency oscillation clock generated by the low frequency RC oscillator 34, and the output is a count completion signal fed back to the SOC and sent to the third frequency divider 35.
  • Frequency information (such as the third division factor in Figure 3).
  • the counter 33 obtains the frequency information of the low frequency oscillation by counting the oscillation signal using the first reference clock, and inputs the frequency information of the low frequency oscillation clock to the third frequency divider 35.
  • One of the operating modes of the counter 33 is: after receiving the start signal, the low frequency oscillation clock generated by the low frequency RC oscillator 34 is counted at a high level portion of one cycle of the first reference clock, and the counting is completed after the counting is completed. Signal, and save the count results.
  • rst_n is the enable signal
  • clk_i is the low frequency oscillation clock generated by the low frequency RC oscillator 34
  • enable is the frequency generated by the second frequency divider 32. Hertz clock signal.
  • Enable_p ⁇ #UDLY 2'bOO;
  • Enable_p ⁇ #UDLY ⁇ enable_p[0], enable ⁇ ;
  • Pointer ⁇ #UDLY pointer + l'bl;
  • circuit implementation shown above is only one possible implementation of the counter 33 in the solution of the present invention and is not intended to limit the present invention.
  • the low frequency RC oscillator 34 produces a low frequency oscillation clock, where R represents the resistance and C represents the capacitance.
  • the low frequency oscillation clock can be used as an operating clock for SOC standby on the one hand, and the other The face can be used as a clock source to generate the reference clock.
  • the low frequency RC oscillator is a very mature basic circuit, and the low frequency RC oscillator 34 of the present embodiment can be a low frequency RC oscillator in the prior art. The choice of its oscillation frequency depends on the accuracy requirements of the timing reference clock.
  • the frequency of the low frequency RC oscillator can be chosen to be 50 kHz.
  • the function of the third frequency divider 35 is to divide the low frequency oscillation clock generated by the low frequency RC oscillator 34 by a third frequency dividing factor after starting, to generate a second reference clock of 1 Hz required for accurate timing.
  • the third division factor may be the frequency information of the counter 33 itself.
  • the third frequency divider 35 can adopt the same circuit design as the first frequency divider 31.
  • the frequency dividing factor and the output clock of the first frequency divider 31, the second frequency divider 32, and the third frequency divider 35 may adopt other design forms that meet the requirements of the present invention, and are not limited to the values mentioned in the above embodiments. .
  • the third frequency dividing factor may also be any frequency dividing value or multiplication value of the frequency information obtained by the counter.
  • a frequency divider may be configured between the counter and the third frequency divider to divide the frequency information to obtain a third frequency dividing factor, or may be obtained by the processing unit having processing capability according to the data output by the counter.
  • the third frequency dividing factor is directly supplied to the third frequency divider for use.
  • the SOC of this embodiment may further include: a control unit, configured to: after the counter obtains the counting result, control the first frequency dividing unit (which may include a first frequency divider and a second frequency divider, Either include a divider, a counter, and any one or any combination of clock generation units (such as high-frequency crystal oscillators) on the periphery of the SOC to enter an inactive state (ie, stop working).
  • a control unit configured to: after the counter obtains the counting result, control the first frequency dividing unit (which may include a first frequency divider and a second frequency divider, Either include a divider, a counter, and any one or any combination of clock generation units (such as high-frequency crystal oscillators) on the periphery of the SOC to enter an inactive state (ie, stop working).
  • the third frequency divider can still divide the oscillating signal by using the third frequency dividing factor to obtain the second reference clock.
  • the SOC of the embodiment of the present invention may further include: an automatic calibration unit, configured to control any one or any combination of the first frequency dividing unit, the counter, and the clock generating unit to enter a working state after a predetermined calibration interval time.
  • This automatic calibration unit may include a frequency divider (hereinafter referred to as a fourth frequency divider) and an automatic calibration start controller. among them:
  • the fourth frequency divider uses the count completion signal from the counter as an enable signal for receiving the second frequency dividing unit (which may include a frequency divider, after receiving the enable signal).
  • the second reference clock signal referred to as the third frequency divider
  • the second reference clock signal is divided by a frequency dividing factor preset or received from the outside, and a time interval signal is generated and output to The above automatic calibration starts the controller.
  • the above-mentioned automatic calibration start controller uses the count completion signal from the counter as an enable signal for receiving the time interval signal from the fourth frequency divider after receiving the enable signal.
  • the second reference clock signal of the frequency dividing unit generates a hardware enable signal of the clock generating unit, and/or generates an operation enable signal of the first frequency dividing unit with an external clock signal from the clock generating unit and outputs the same To the first frequency division unit.
  • any one or any combination of the first frequency dividing unit, the counter, and the clock generating unit is brought from the non-working state to the operating state.
  • FIG. 4 A specific implementation block diagram of the SOC according to the third embodiment of the present invention is shown in FIG. 4.
  • an automatic calibration unit is further added, which is used to implement a timely automatic calibration of the third frequency division factor, and the automatic calibration unit includes A fourth frequency divider 36 and an automatic calibration start controller 37, wherein:
  • the fourth frequency divider 36 can be implemented by the same structure as the first to third frequency dividers, and the division factor (hereinafter referred to as the fourth frequency division factor) can be preset or received from the outside. The value can be determined by the maximum calibration interval. For example, if the maximum calibration interval is 64 seconds, the fourth division factor can be selected as 128.
  • the calibration time interval selection signal (select ) shown in Fig. 4 is the fourth frequency dividing factor received from the outside.
  • the fourth frequency divider 36 functions as a timer that receives the 1 Hz reference clock from the third frequency divider 35 after receiving the enable signal enable from the counter 33 (i.e., the count completion indicator signal of the counter 33). The signal is divided by the fourth division factor to the 1 Hz reference clock signal, and the obtained frequency division result is output to the automatic calibration start controller 37 as a time interval signal (timer).
  • the input signals of the automatic calibration start controller 37 include rst_n, enable, timer, clk_i and clk_o, wherein the rst_n connection start signal, the count completion signal of the enable connection counter 33, the timer connection time interval signal output by the fourth frequency divider 36, Clk_i is connected to the high-frequency crystal oscillator clock signal (called the high-frequency crystal clock), and clk_o is connected to the 1 Hz reference clock signal.
  • the output signals are enable_osc and enable_divl2, where enable_osc is used as the hardware enable signal of the high-frequency crystal oscillator (the high-frequency crystal oscillator hardware is started), and enable_divl2 is used as the first frequency divider 31 and the second frequency divider 32.
  • the work enable signal The working principle is as follows: The automatic calibration start controller 37 takes the count completion signal from the counter 33 as an enable signal, and the automatic calibration start controller 37 receives the enable signal from the fourth frequency divider 36 after receiving the enable signal.
  • the hardware start signal of the high frequency crystal oscillator is generated by the 1 Hz reference clock signal from the third frequency divider 35, and is sent to the high frequency crystal oscillator, and the high frequency crystal oscillator from the high frequency crystal oscillator is used to oscillate.
  • the clock signal generates a first frequency divider 31, a second frequency divider 32, a working enable signal output to the first frequency divider 31 and the second frequency divider 32, such that the first frequency divider 31 and the second frequency divider The device 32 transitions to a working state.
  • the implementation of the reference clock shown in Figure 4 is based on Figure 3, and further includes a fourth frequency divider and an auto-calibration start controller;
  • the fourth frequency divider uses the count completion signal from the counter as an enable signal, and the fourth frequency division After receiving the enable signal, the receiver receives the reference clock signal with a frequency of 1 Hz from the third frequency divider, and divides the reference clock signal of 1 Hz with a fourth frequency division factor preset or externally received. , generating a time interval signal output to the automatic calibration start controller;
  • the auto-calibration start controller will use the count completion signal from the counter as an enable signal.
  • the auto-calibration start controller will receive the time interval signal from the fourth divider after receiving the enable signal.
  • the 1 Hz reference clock signal of the frequency generator generates a hardware start signal of the high frequency crystal oscillator and transmits it to the high frequency crystal oscillator; the high frequency crystal oscillator clock signal from the high frequency crystal oscillator generates the first,
  • the duty enable signal of the divide-by-2 is output to the first frequency divider and the second frequency divider, so that the first frequency divider and the second frequency divider are turned into an active state.
  • the first to fourth frequency dividers are designed to have the same structure.
  • the following is a circuit of the first to fourth frequency dividers designed by Verilog hardware description language, where rst_n is the start signal, enable is the enable signal, divisor is the division factor, clk_i is the input clock, and clk_o is the frequency division.
  • the output clock, pointer is the count pointer in the process of dividing or counting.
  • Module divider (rst_n, enable, divisor, clk_i, clk_o, pointer);
  • Parameter UDLY 1; input rst_n;
  • Pointer ⁇ #UDLY pointer + l'bl;
  • circuit implementation shown above is only one possible implementation of the first frequency divider 31 to the fourth frequency divider 36 in the solution of the present invention, and is not intended to limit the present invention.
  • the processing flow for generating the reference clock by the reference clock generating means 212 shown in FIG. 4 is as shown in FIG. 5, and includes the following steps:
  • Step 501 Power on the SOC.
  • Step 502 Start the low frequency RC oscillator 34.
  • Step 503 Start the high frequency crystal oscillator.
  • Step 504 Start the first frequency divider 31, the second frequency divider 32, and the counter 33 by software, and they start to work, calculate the frequency division factor required by the second frequency divider 32, and feed back the calculation completion signal to the SOC. .
  • Step 505 After receiving the counting completion signal fed back by the counter 33, the SOC starts the first The three-way divider 35, the third frequency divider 35 saves the division factor sent from the counter 33 and produces a 1 Hz reference clock required for accurate timing.
  • the SOC can place the first frequency divider 31, the second frequency dividing circuit 32, and the counter 33 and the high frequency crystal oscillator in an inoperative state, preventing them from operating to generate unnecessary power consumption.
  • the low frequency oscillation clock generated by the low frequency RC oscillator 34 is output to the third frequency divider 35, and the third frequency divider 35 oscillates the low frequency according to the divided frequency factor of the counter 33.
  • the clock is divided to obtain a reference clock, so that the reference clock generating device 212 can still perform accurate timing, so that the high-frequency crystal oscillator oscillation operation is not required when the SOC standby state is reached, and the power consumption during the SOC standby operation is small.
  • step 505 may further include: Step 506: After the fourth frequency divider 36 is enabled, the timing is determined according to the frequency dividing factor determined according to the maximum calibration time interval, and the automatic calibration start controller 37 is based on the calibration time. The interval selection signal is turned on to turn on the high frequency crystal oscillator and the first frequency divider 31 and the second frequency divider 32 are enabled, and the process proceeds to step 503, and steps 503 to 505 are repeatedly executed to automatically calibrate the frequency dividing factor at intervals.
  • the first frequency dividing unit, the counter, and/or the clock generating unit outside the integrated circuit can be controlled to enter a non-operating state as needed (ie, Stop working), and at this time, the reference clock required for the application of the accurate timing can be divided according to the frequency division factor obtained by the frequency signal, and the low-power requirement of the standby state can be satisfied;
  • the first frequency dividing unit, the counter, and the clock generating unit are controlled to enter an operating state at a predetermined calibration time interval to regain the frequency information of the oscillating signal, thereby functioning as a timely calibration of the reference clock.
  • the reference clock generating means 212 shown in FIG. 3 can implement steps other than step 506. Steps 501 to 505.
  • the method includes the following steps:
  • Step 601 Multiplying the nominal frequency of the high frequency clock generated by the high frequency crystal oscillator by 2 and then dividing the frequency into a frequency division factor, and dividing the high frequency clock to output a clock signal having a duty ratio of 1. 0.5 Hz. ;
  • Step 602 Count the low frequency oscillation clock generated by the low frequency RC oscillator at a high level portion of the clock signal whose duty ratio is 1 frequency of 0.5 Hz, and count when the high level portion ends. After completion, the counting result is saved as the third frequency dividing factor; Step 603: The low frequency oscillation clock generated by the low frequency RC oscillator is divided according to the third frequency dividing factor, and a reference clock of 1 Hz is generated and output.
  • step 601 can be divided into:
  • Step 601a receiving a high frequency clock generated by the high frequency crystal oscillator and a nominal frequency of the high frequency clock, and dividing the high frequency clock by the nominal frequency, and outputting a clock signal having a frequency of 1 Hz;
  • Step 601b Divide the above 1 Hz clock signal by two, and output a clock signal with a duty ratio of 1, and a frequency of 0.5 Hz.
  • the method further includes:
  • Step 604 Divide a 1 Hz reference clock signal by using a fourth frequency division factor to generate a time interval signal
  • Step 605 When receiving the time interval signal, generate a hardware start signal of the high frequency crystal oscillator with a reference clock signal of 1 Hz and send it to the high frequency crystal oscillator, and then go to the above step 601.
  • the technical scheme of the present invention utilizes a high frequency clock generated by a high frequency crystal oscillator, and obtains a frequency division factor of a reference clock of 1 Hz frequency through an internal hardware circuit of the SOC, thereby not requiring low
  • a frequency crystal oscillator a precise 1 Hz frequency reference clock is obtained, and a timely calibration can be achieved as needed.
  • the beneficial effect of the invention is that the two ⁇ frequency crystal oscillator pins provided for the low frequency crystal oscillator in the SOC can be omitted, which provides the possibility that the SOC realizes a package with fewer pins, and on the other hand, the SOC can have More functions are implemented with the same number of pins.
  • an external low-frequency crystal oscillator and its application circuit components can be saved, which can effectively reduce the BOM cost of the multimedia processor SOC application product and improve the market competitiveness of the SOC product.

Abstract

An integrated circuit is disclosed in present invention, which includes: a first frequency division unit, a counter, an oscillation signal generation circuit and a second frequency division unit; wherein: the first frequency division unit is used for dividing the frequency of an external clock signal from exterior of the integrated circuit to acquire a first reference clock; the oscillation signal generation circuit is used for generating the oscillation signal; the counter is used for taking count of the oscillation signal using the first reference clock to acquire frequency information of the oscillation signal; and, the second frequency division unit is used for dividing the frequency of the oscillation signal according to a frequency division factor obtained on the basis of the frequency information to acquire a second reference clock. A method for acquiring a reference clock in the integrated circuit is also disclosed in the invention. The solution of the invention can acquire an accurate reference clock under the condition of without a low-frequency crystal oscillator, and save precious pin resources.

Description

集成电路及在集成电路中获得基准时钟的方法  Integrated circuit and method for obtaining a reference clock in an integrated circuit
技术领域 Technical field
本发明涉及集成电路技术领域, 特别涉及集成电路及在集成电路中 获得基准时钟的方法。 发明背景  The present invention relates to the field of integrated circuit technology, and more particularly to an integrated circuit and a method of obtaining a reference clock in an integrated circuit. Background of the invention
在现有片上系统(System-On-a-Chip, SOC )的设计和应用中, 普遍 需要采用两个晶体振荡器作为 SOC的时钟源,一个是振荡频率为几十兆 赫兹的高频晶体振荡器, 另外一个是振荡频率为几十千赫兹的低频晶体 振荡器。 图 1为现有技术中片上系统的时钟装置的示意框图。 如图 1所 示, 高频晶体振荡器 12用来作为 SOC 11 中的锁相环(Phase-Locked Loop, PLL )组 111的时钟源, 产生出 SOC 11中各种高频电路所需的 高频时钟。低频晶体振荡器 13主要有两个用途:一个是用来产生 SOC 11 待机时的工作时钟; 另外一个是作为 SOC 11中的低频分频器 112的时 钟源, 以产生出精准计时电路所需的计时基准时钟, 一般为频率为 1赫 兹的时钟。 SOC 中的精准计时电路主要用来实现以秒为单位的计时功 能, 如万年历和数字版权管理(Digital Right Management, DRM )等功 能。  In the design and application of the existing System-On-a-Chip (SOC), it is generally required to use two crystal oscillators as the clock source of the SOC, and one is the high-frequency crystal oscillation with an oscillation frequency of several tens of megahertz. The other is a low frequency crystal oscillator with an oscillation frequency of several tens of kilohertz. 1 is a schematic block diagram of a clock device of a prior art system in the prior art. As shown in FIG. 1, the high frequency crystal oscillator 12 is used as a clock source of a phase-locked loop (PLL) group 111 in the SOC 11, and generates high voltages required for various high frequency circuits in the SOC 11. Frequency clock. The low frequency crystal oscillator 13 has two main purposes: one is to generate an operating clock when the SOC 11 is in standby; the other is used as a clock source of the low frequency frequency divider 112 in the SOC 11 to generate a precision timing circuit. The timing reference clock is typically a clock with a frequency of 1 Hz. The precision timing circuit in the SOC is mainly used to implement timing functions in seconds, such as perpetual calendar and Digital Right Management (DRM).
虽然通过高频晶体振荡器分频也可以产生精准计时所需的基准时 钟,但由于高频晶体振荡器振荡时电流较大,导致 SOC在待机状态下精 准计时的功耗无法接受。 因此现有 SOC中,普遍采用功耗更低的低频晶 体振荡器来产生精准计时所需的基准时钟。  Although the reference clock required for accurate timing can be generated by frequency division of the high-frequency crystal oscillator, the power consumption of the SOC in the standby state is unacceptable due to the large current during oscillation of the high-frequency crystal oscillator. Therefore, in the existing SOC, a lower power crystal oscillator with lower power consumption is generally used to generate a reference clock required for precise timing.
现有技术的缺点在于, SOC不仅需要为高频晶体振荡器配备两个引 脚, 而且还要为低频晶体振荡器专门配备两个引脚,这导致 SOC中最稀 缺的资源——引脚, 更为紧张、 稀缺。 而且, 由于生产 SOC应用产品的 物料清单 (Bill of Material, BOM )需要增加低频晶体振荡器及其应用 电路所需电阻和电容,从而增加 SOC应用产品的 BOM成本, 降低 SOC 的市场竟争力。 发明内容 The disadvantage of the prior art is that the SOC not only needs to be equipped with two pins for the high frequency crystal oscillator, but also has two pins for the low frequency crystal oscillator, which leads to the most rare in the SOC. Lack of resources - pins, more intense, scarce. Moreover, because the Bill of Material (BOM) of the SOC application product needs to increase the resistance and capacitance required for the low-frequency crystal oscillator and its application circuit, thereby increasing the BOM cost of the SOC application product and reducing the market competitiveness of the SOC. Summary of the invention
本发明提出了一种集成电路及一种在集成电路中获得基准时钟的方 法, 以节约集成电路的资源。  The present invention proposes an integrated circuit and a method of obtaining a reference clock in an integrated circuit to conserve resources of the integrated circuit.
本发明实施例提出的一种集成电路包括: 第一分频单元、 计数器、 振荡信号产生电路和第二分频单元; 其中:  An integrated circuit according to an embodiment of the present invention includes: a first frequency dividing unit, a counter, an oscillating signal generating circuit, and a second frequency dividing unit; wherein:
所述第一分频单元用于通过对来自所述集成电路外部的外部时钟信 号进行分频得到第一基准时钟;  The first frequency dividing unit is configured to obtain a first reference clock by dividing an external clock signal from outside the integrated circuit;
所述振荡信号产生电路用于产生振荡信号;  The oscillation signal generating circuit is configured to generate an oscillating signal;
所述计数器用于通过使用所述第一基准时钟对所述振荡信号进行计 数得到所述振荡信号的频率信息; 及,  The counter is configured to obtain frequency information of the oscillating signal by counting the oscillating signal by using the first reference clock; and
所述第二分频单元用于根据依据所述频率信息得到的分频因子对所 述振荡信号进行分频得到第二基准时钟。 本发明实施例还提出一种在集成电路中获得基准时钟的方法, 所述 方法包括:  The second frequency dividing unit is configured to divide the oscillating signal according to a frequency dividing factor obtained according to the frequency information to obtain a second reference clock. The embodiment of the invention further provides a method for obtaining a reference clock in an integrated circuit, the method comprising:
通过对来自所述集成电路外部的外部时钟信号进行分频得到第一基 准时钟;  A first reference clock is obtained by dividing an external clock signal from outside the integrated circuit;
产生振荡信号;  Generating an oscillating signal;
通过使用所述第一基准时钟对所述振荡信号进行计数得到所述振荡 信号的频率信息; 及, 根据依据所述频率信息得到的分频因子对所述振荡信号进行分频得 到第二基准时钟。 从以上技术方案可以看出, 本发明实施例可以在不需要低频晶体振 荡器的情况下, 得到精准的基准时钟, 从而使集成电路上无需连接低频 晶体振荡器的两个引脚, 进而可以节约宝贵的引脚资源。 附图简要说明 Frequency information of the oscillating signal is obtained by counting the oscillating signal by using the first reference clock; and And dividing the oscillating signal according to a frequency dividing factor obtained according to the frequency information to obtain a second reference clock. It can be seen from the above technical solution that the embodiment of the present invention can obtain a precise reference clock without requiring a low-frequency crystal oscillator, so that the two pins of the low-frequency crystal oscillator need not be connected on the integrated circuit, thereby saving Valuable pin resources. BRIEF DESCRIPTION OF THE DRAWINGS
图 1为现有技术中片上系统的时钟装置的示意框图;  1 is a schematic block diagram of a clock device of a system on chip in the prior art;
图 2为采用本发明方案的一种片上系统的框图;  2 is a block diagram of a system on chip using the solution of the present invention;
图 3为本发明实施例提出的一种基准时钟产生装置的实现框图; 图 4为本发明实施例提出的另一种基准时钟产生装置的实现框图; 图 5为图 4所示的基准时钟产生装置生成基准时钟的处理流程图; 及,  3 is a block diagram of an implementation of a reference clock generating apparatus according to an embodiment of the present invention; FIG. 4 is a block diagram of another implementation of a reference clock generating apparatus according to an embodiment of the present invention; FIG. a processing flowchart for generating a reference clock by the device; and,
图 6为本发明实施例提出的基准时钟的实现流程图。  FIG. 6 is a flowchart of implementing a reference clock according to an embodiment of the present invention.
以下结合实施例及其附图作进一步的详细说明。 实施本发明的方式  Further details are described below in conjunction with the embodiments and the accompanying drawings. Mode for carrying out the invention
为使本发明的目的和优点更加清楚, 下面结合附图和实施例对本发 明作进一步的详细说明。  The present invention will be further described in detail below with reference to the drawings and embodiments.
图 2示出了采用本发明实施例的一种片上系统的框图。 由图 2可以 看出, SOC 21的外围不再需要低频晶体振荡器, 而是由片上系统中的基 准时钟产生装置 212依据来自高频晶体振荡器 22的高频时钟信号产生 基准时钟信号。 并且一旦可以输出基准时钟信号之后, 基准时钟产生装 置 212可以不再依赖高频时钟信号而自行生成稳定的基准时钟信号, 满 足 soc在待机状态下精准计时的低功耗要求。 2 shows a block diagram of a system on a chip employing an embodiment of the present invention. As can be seen from FIG. 2, the low frequency crystal oscillator is no longer required at the periphery of the SOC 21, but the reference clock generating means 212 in the system on chip generates a reference clock signal in accordance with the high frequency clock signal from the high frequency crystal oscillator 22. And once the reference clock signal can be output, the reference clock generating means 212 can generate a stable reference clock signal by itself without relying on the high frequency clock signal. The low power requirement of the soc in the standby state.
依据本发明实施例一的集成电路包括: 第一分频单元、 计数器、 振 荡信号产生电路和第二分频单元; 其中:  An integrated circuit according to the first embodiment of the present invention includes: a first frequency dividing unit, a counter, an oscillating signal generating circuit, and a second frequency dividing unit; wherein:
上述第一分频单元用于通过对从上述集成电路外部输入的外部时钟 信号进行分频得到第一基准时钟;  The first frequency dividing unit is configured to obtain a first reference clock by dividing an external clock signal input from the external circuit;
上述振荡信号产生电路用于产生一振荡信号;  The oscillating signal generating circuit is configured to generate an oscillating signal;
上述计数器用于通过使用上述第一基准时钟对上述振荡信号进行计 数得到此振荡信号的频率信息; 其中, 此频率信息可以是此振荡信号的 频率值, 或者是此振荡信号频率值的任一分频值或倍频值等。 其中, 使 用上述第一基准时钟对上述振荡信号进行计数得到此振荡信号的频率 信息的实现方式, 例如可以是: 在上述第一分频单元获得 0.5Hz的第一 基准时钟后, 在第一基准时钟的一个周期内的高电平或低电平部分对应 的期间内 (时长为 1秒钟)对振荡信号进行计数, 从而得到振荡信号的 频率值; 可以理解的, 在具体实现时可以有多种实现方式, 并不仅限于 此, 例如, 在第一基准时钟的一个周期内对振荡信号进行计数, 从而得 到振荡信号的 2倍频率值等, 另外, 上述第一分频单元所得到的第一基 准时钟也并不仅限于 0.5Hz。  The counter is configured to obtain the frequency information of the oscillating signal by counting the oscillating signal by using the first reference clock; wherein the frequency information may be a frequency value of the oscillating signal, or any one of the oscillating signal frequency values Frequency or multiplier value, etc. The method for counting the oscillating signal by using the first reference clock to obtain the frequency information of the oscillating signal may be, for example, after the first frequency dividing unit obtains the first reference clock of 0.5 Hz, and is at the first reference. The oscillation signal is counted during the period corresponding to the high level or low level portion of one cycle of the clock (the duration is 1 second), thereby obtaining the frequency value of the oscillating signal; it can be understood that there may be more in the specific implementation. The implementation manner is not limited thereto. For example, the oscillating signal is counted in one cycle of the first reference clock to obtain a double frequency value of the oscillating signal, etc., and the first obtained by the first frequency dividing unit is obtained. The reference clock is also not limited to 0.5 Hz.
上述第二分频单元用于根据依据频率信息得到的分频因子对振荡信 号进行分频得到第二基准时钟; 其中, 依据频率信息得到的分频因子, 可以是该频率信息本身, 或者是该频率信息的任一分频值或倍频值等。 具体地, 此第二分频单元可包括一个分频器。  The second frequency dividing unit is configured to divide the oscillating signal according to the frequency dividing factor obtained according to the frequency information to obtain a second reference clock; wherein the frequency dividing factor obtained according to the frequency information may be the frequency information itself, or Any frequency value or multiplication value of the frequency information. Specifically, the second frequency dividing unit may include a frequency divider.
具体地,上述第一分频单元可包括第一分频器和第二分频器; 其中, 第一分频器用于通过使用一个分频因子对从集成电路外部输入的第一 时钟(即: 前述的外部时钟信号)进行分频得到一时钟信号; 第二分频 器用于通过对此第一分频器得到的时钟信号进行二分频得到第一基准 时钟信号。 Specifically, the first frequency dividing unit may include a first frequency divider and a second frequency divider; wherein the first frequency divider is configured to use the first clock input from the outside of the integrated circuit by using a frequency dividing factor (ie: The aforementioned external clock signal is divided to obtain a clock signal; the second frequency divider is configured to obtain a first reference by dividing a clock signal obtained by the first frequency divider by two. Clock signal.
可选地, 所述第一分频单元也可以包括一个分频器, 此分频器用于 通过使用一个分频因子对从所述集成电路外部输入的第一时钟进行分 频得到第一基准时钟。  Optionally, the first frequency dividing unit may further include a frequency divider, configured to divide the first clock input from the external circuit by using a frequency dividing factor to obtain a first reference clock. .
具体地, 所述集成电路还可包括控制单元, 此控制单元用于在计数 器得到计数结果后, 控制第一分频单元、 计数器以及集成电路外部的用 于产生第一时钟的器件中的任一者或任意组合进入非工作状态。 这里, 用于产生第一时钟的器件可称为用于产生外部时钟信号的时钟产生单 元。 这样可以起到节约功耗的效果; 并且在这之后, 第二分频单元仍然 可以根据计数结果对振荡信号进行分频而得到第二基准时钟。  Specifically, the integrated circuit may further include a control unit, configured to control the first frequency dividing unit, the counter, and any one of the devices external to the integrated circuit for generating the first clock after the counter obtains the counting result. Or any combination into a non-working state. Here, the device for generating the first clock may be referred to as a clock generating unit for generating an external clock signal. This can save power consumption; and after that, the second frequency dividing unit can still divide the oscillating signal according to the counting result to obtain the second reference clock.
具体地, 该集成电路进一步包括: 自动校准单元, 此自动校准单元 用于按照预定的校准间隔时间控制上述第一分频单元、 计数器、 以及用 于产生第一时钟的器件进入工作状态。  Specifically, the integrated circuit further includes: an automatic calibration unit for controlling the first frequency dividing unit, the counter, and the device for generating the first clock to enter an operating state according to a predetermined calibration interval time.
其中, 上述第一时钟可以为高频时钟, 上述振荡信号可以为低频振 荡信号。  The first clock may be a high frequency clock, and the oscillating signal may be a low frequency oscillating signal.
其中, 上述对第一时钟进行分频的分频因子可以为此第一时钟的标 称频率或该标称频率的分频频率或倍频频率。  The frequency dividing factor for dividing the first clock may be the nominal frequency of the first clock or the frequency dividing frequency or frequency multiplication frequency of the nominal frequency.
图 3给出了本发明实施例二的一种片上系统中的基准时钟产生装置 212的实现框图, 包括第一分频器 31、 第二分频器 32、 计数器 33、 低 频 RC振荡器 34和第三分频器 35。  3 is a block diagram showing an implementation of a reference clock generating device 212 in a system-on-chip according to a second embodiment of the present invention, including a first frequency divider 31, a second frequency divider 32, a counter 33, a low frequency RC oscillator 34, and The third frequency divider 35.
第一分频器 31在收到启动信号后,将从集成电路外部输入的高频时 钟(可以是由高频晶体振荡器产生的高频晶体振荡时钟, 筒称高频晶振 时钟)进行分频, 产生出 1赫兹时钟。 第一分频器 31的输入包括启动 信号、 第一分频因子和从集成电路外部输入的高频时钟, 输出频率为 1 赫兹的时钟信号。 所述第一分频因子是一个常数, 其数值为高频晶体振 荡器产生的高频时钟的频率, 也就是高频晶体振荡器的标称频率。 After receiving the start signal, the first frequency divider 31 divides the high frequency clock (which may be a high frequency crystal oscillation clock generated by a high frequency crystal oscillator, which is called a high frequency crystal oscillator clock) input from the outside of the integrated circuit. , produces a 1 Hz clock. The input of the first frequency divider 31 includes a start signal, a first frequency dividing factor, and a high frequency clock input from the outside of the integrated circuit, and outputs a clock signal having a frequency of 1 Hz. The first frequency dividing factor is a constant, and the value is a high frequency crystal oscillator The frequency of the high frequency clock generated by the sigma, that is, the nominal frequency of the high frequency crystal oscillator.
第二分频器 32的输入包括启动信号和第一分频器 31产生的 1赫兹 时钟, 输出占空比为 1、 频率为 0.5赫兹的第一基准时钟信号。 第二分 频器 32的分频因子称为第二分频因子, 其数值为 2, 在一种具体实施方 式中第二分频器 32可以通过一个二分频电路来实现, 例如用 "T"型边沿 触发器来实现。  The input of the second frequency divider 32 includes a start signal and a 1 Hz clock generated by the first frequency divider 31, and an output duty cycle of 1, a first reference clock signal having a frequency of 0.5 Hz. The division factor of the second frequency divider 32 is referred to as a second frequency division factor, and its value is 2. In a specific embodiment, the second frequency divider 32 can be implemented by a divide-by-2 circuit, for example, "T. "Type edge triggers are implemented.
可以理解的, 在本发明的更多实施例中, 也可以由一个分频器产生 第一基准时钟信号, 该分频器以 2倍的高频晶体振荡器的标称频率作为 分频因子对从集成电路外部输入的高频时钟进行分频, 同样也可以输出 占空比为 1的 0.5赫兹的第一基准时钟。  It can be understood that, in a further embodiment of the present invention, the first reference clock signal can also be generated by a frequency divider that uses a nominal frequency of twice the high frequency crystal oscillator as a frequency division factor pair. The high frequency clock input from the outside of the integrated circuit is divided, and the first reference clock of 0.5 Hz with a duty ratio of 1 can also be output.
计数器 33的输入包括启动信号、 第二分频器 32产生的 0.5赫兹时 钟信号和低频 RC振荡器 34产生的低频振荡时钟, 输出为反馈给 SOC 的计数完成信号和送给第三分频器 35的频率信息 (如图 3 中的第三分 频因子)。 计数器 33通过使用所述第一基准时钟对所述振荡信号进行计 数获得低频振荡的频率信息, 并将低频振荡时钟的频率信息输入第三分 频器 35。 计数器 33的其中一种工作方式为: 在收到启动信号后, 在第 一基准时钟的一个周期的高电平部分对低频 RC振荡器 34产生的低频振 荡时钟进行计数, 计数完毕后产生计数完毕信号, 并将计数结果保存下 来。  The input of the counter 33 includes an enable signal, a 0.5 Hz clock signal generated by the second frequency divider 32, and a low frequency oscillation clock generated by the low frequency RC oscillator 34, and the output is a count completion signal fed back to the SOC and sent to the third frequency divider 35. Frequency information (such as the third division factor in Figure 3). The counter 33 obtains the frequency information of the low frequency oscillation by counting the oscillation signal using the first reference clock, and inputs the frequency information of the low frequency oscillation clock to the third frequency divider 35. One of the operating modes of the counter 33 is: after receiving the start signal, the low frequency oscillation clock generated by the low frequency RC oscillator 34 is counted at a high level portion of one cycle of the first reference clock, and the counting is completed after the counting is completed. Signal, and save the count results.
下面是采用 Verilog硬件描述语言设计的计数器 33的一种电路实现 方式, 其中 rst_n为启动信号, clk_i为低频 RC振荡器 34产生的低频振 荡时钟, enable为第二分频器 32产生的频率为 0.5赫兹的时钟信号。  The following is a circuit implementation of a counter 33 designed using Verilog hardware description language, where rst_n is the enable signal, clk_i is the low frequency oscillation clock generated by the low frequency RC oscillator 34, and enable is the frequency generated by the second frequency divider 32. Hertz clock signal.
module counter (rst_n, clk_i, enable, finish, result);  Module counter (rst_n, clk_i, enable, finish, result);
parameter WIDTH = 10;  Parameter WIDTH = 10;
parameter UDLY = 1;  Parameter UDLY = 1;
input rst_n;  Input rst_n;
input clk_i; input enable; Input clk_i; Input enable;
output finish;  Output finish;
output [WIDTH- 1:0] result; reg [1 :0] enable_p;  Output [WIDTH- 1:0] result; reg [1 :0] enable_p;
always @ (posedge clk_i or negedge rst_n)  Always @ (posedge clk_i or negedge rst_n)
begin  Begin
if (rst_n == 1'bO)  If (rst_n == 1'bO)
enable_p <= #UDLY 2'bOO;  Enable_p <= #UDLY 2'bOO;
else  Else
enable_p <= #UDLY {enable_p[0], enable};  Enable_p <= #UDLY {enable_p[0], enable};
end  End
reg finish;  Reg finish;
always @ (posedge clk_i or negedge rst_n)  Always @ (posedge clk_i or negedge rst_n)
begin  Begin
if (rst_n == 1'bO)  If (rst_n == 1'bO)
finish <= #UDLY l'b0;  Finish <= #UDLY l'b0;
else if (enable_p == 2'blO)  Else if (enable_p == 2'blO)
finish <= #UDLY l'bl;  Finish <= #UDLY l'bl;
end reg [WIDTH:0] pointer;  End reg [WIDTH:0] pointer;
always @ (posedge clk_i or negedge rst_n)  Always @ (posedge clk_i or negedge rst_n)
begin  Begin
if (rst_n == 1'bO)  If (rst_n == 1'bO)
pointer <= #UDLY 'h0;  Pointer <= #UDLY 'h0;
else if (enable_p[0] == l'bl)  Else if (enable_p[0] == l'bl)
pointer <= #UDLY pointer + l'bl;  Pointer <= #UDLY pointer + l'bl;
else  Else
pointer <= #UDLY 'h0;  Pointer <= #UDLY 'h0;
end  End
reg [WIDTH- 1:0] result;  Reg [WIDTH- 1:0] result;
always @ (posedge clk_i or negedge rst_n)  Always @ (posedge clk_i or negedge rst_n)
begin  Begin
if (rst_n == 1'bO)  If (rst_n == 1'bO)
result <= #UDLY 'h02;  Result <= #UDLY 'h02;
else if (enable_p == 2'blO)  Else if (enable_p == 2'blO)
result <= #UDLY pointer;  Result <= #UDLY pointer;
end  End
endmodule II counter  Endmodule II counter
以上所示的电路实现方式仅为本发明方案中计数器 33 的一种可能 的实现方式, 并不用以限制本发明。  The circuit implementation shown above is only one possible implementation of the counter 33 in the solution of the present invention and is not intended to limit the present invention.
低频 RC振荡器 34产生低频振荡时钟, 其中 R代表电阻, C代表电 容。该低频振荡时钟一方面可以用作 SOC待机时的工作时钟,另外一方 面可以用来作为产生基准时钟的时钟源。 低频 RC振荡器是一种很成熟 的基本电路,本实施例的低频 RC振荡器 34可以为公知技术中的一种低 频 RC振荡器。 其振荡频率的选择取决于计时基准时钟的精度要求。 例 如, 如果计时基准时钟的精度要求低于百万分之四十, 那么其频率要高 于百万分之四十的倒数, 即 25千赫兹,再考虑到低频 RC振荡器受半导 体加工工艺漂移的影响(一般频率漂移不会超过 ±50 % ) , 因此可以将低 频 RC振荡器的频率选择为 50千赫兹。 The low frequency RC oscillator 34 produces a low frequency oscillation clock, where R represents the resistance and C represents the capacitance. The low frequency oscillation clock can be used as an operating clock for SOC standby on the one hand, and the other The face can be used as a clock source to generate the reference clock. The low frequency RC oscillator is a very mature basic circuit, and the low frequency RC oscillator 34 of the present embodiment can be a low frequency RC oscillator in the prior art. The choice of its oscillation frequency depends on the accuracy requirements of the timing reference clock. For example, if the accuracy of the timing reference clock is less than 40 parts per million, then the frequency is higher than the reciprocal of 40 parts per million, that is, 25 kHz, and then the low frequency RC oscillator is drifted by the semiconductor processing process. The effect (typically the frequency drift does not exceed ±50%), so the frequency of the low frequency RC oscillator can be chosen to be 50 kHz.
第三分频器 35的功能就是在启动后, 将低频 RC振荡器 34产生的 低频振荡时钟以第三分频因子进行分频, 产生出精准计时所需的 1赫兹 的第二基准时钟。 其中的第三分频因子可以是计数器 33 的频率信息本 身。 第三分频器 35可以采用与第一分频器 31完全相同的电路设计。 第 一分频器 31、第二分频器 32及第三分频器 35的分频因子及输出时钟可 以采用其他符合本发明方案要求的设计形式, 并不仅限于上述实施例中 提到的数值。  The function of the third frequency divider 35 is to divide the low frequency oscillation clock generated by the low frequency RC oscillator 34 by a third frequency dividing factor after starting, to generate a second reference clock of 1 Hz required for accurate timing. The third division factor may be the frequency information of the counter 33 itself. The third frequency divider 35 can adopt the same circuit design as the first frequency divider 31. The frequency dividing factor and the output clock of the first frequency divider 31, the second frequency divider 32, and the third frequency divider 35 may adopt other design forms that meet the requirements of the present invention, and are not limited to the values mentioned in the above embodiments. .
可以理解的, 在本发明更多实施例中, 第三分频因子也可以是计数 器所得到的频率信息的任一分频值或倍频值等。 在具体实现时, 例如可 以在计数器与第三分频器之间配置一个分频器, 对频率信息进行分频得 到第三分频因子, 或者由具有处理能力的处理单元依据计数器输出的数 据得到第三分频因子后直接提供给第三分频器使用。  It can be understood that, in more embodiments of the present invention, the third frequency dividing factor may also be any frequency dividing value or multiplication value of the frequency information obtained by the counter. In a specific implementation, for example, a frequency divider may be configured between the counter and the third frequency divider to divide the frequency information to obtain a third frequency dividing factor, or may be obtained by the processing unit having processing capability according to the data output by the counter. The third frequency dividing factor is directly supplied to the third frequency divider for use.
进一步的, 本实施例的 SOC还可以包括控制单元,用于在所述计数 器得到所述计数结果后, 控制所述第一分频单元(可包括第一分频器和 第二分频器, 或者包括一个分频器)、 计数器以及 SOC外围的时钟产生 单元(如:高频晶体振荡器)中的任一者或任意组合进入非工作状态(即, 停止工作)。 这样可以起到节约功耗的效果; 并且此时, 第三分频器仍 然可以使用第三分频因子对振荡信号进行分频而得到第二基准时钟。 由于 SOC运行过程中低频 RC振荡器产生的低频振荡时钟是随 SOC 内部温度和电压漂移而漂移, 因此可以适时对第三分频器 35 的第三分 频因子进行校准以保证基准时钟稳定。此时,本发明实施例的 SOC还可 进一步包括: 自动校准单元, 用于在预定的校准间隔时间后控制第一分 频单元、 计数器以及时钟产生单元中的任一者或任意组合进入工作状 态。 此自动校准单元可包括一分频器(以下称为第四分频器)和自动校 准启动控制器。 其中: Further, the SOC of this embodiment may further include: a control unit, configured to: after the counter obtains the counting result, control the first frequency dividing unit (which may include a first frequency divider and a second frequency divider, Either include a divider, a counter, and any one or any combination of clock generation units (such as high-frequency crystal oscillators) on the periphery of the SOC to enter an inactive state (ie, stop working). This can save power consumption; and at this time, the third frequency divider can still divide the oscillating signal by using the third frequency dividing factor to obtain the second reference clock. Since the low frequency oscillation clock generated by the low frequency RC oscillator during the SOC operation drifts with the internal temperature and voltage drift of the SOC, the third frequency division factor of the third frequency divider 35 can be calibrated in time to ensure the stability of the reference clock. In this case, the SOC of the embodiment of the present invention may further include: an automatic calibration unit, configured to control any one or any combination of the first frequency dividing unit, the counter, and the clock generating unit to enter a working state after a predetermined calibration interval time. . This automatic calibration unit may include a frequency divider (hereinafter referred to as a fourth frequency divider) and an automatic calibration start controller. among them:
上述第四分频器将来自计数器的计数完成信号作为使能信号, 用于 在收到此使能信号后, 当接收到来自第二分频单元(其可包括一分频器, 本发明实施例中称为第三分频器) 的第二基准时钟信号时, 用预先设定 或从外部接收的分频因子对此第二基准时钟信号进行分频, 产生时间间 隔信号并将其输出至上述自动校准启动控制器。  The fourth frequency divider uses the count completion signal from the counter as an enable signal for receiving the second frequency dividing unit (which may include a frequency divider, after receiving the enable signal). In the case of the second reference clock signal referred to as the third frequency divider, the second reference clock signal is divided by a frequency dividing factor preset or received from the outside, and a time interval signal is generated and output to The above automatic calibration starts the controller.
上述自动校准启动控制器将来自计数器的计数完成信号作为使能信 号, 用于在收到此使能信号后, 当接收到来自第四分频器的所述时间间 隔信号时, 用来自第二分频单元的所述第二基准时钟信号产生出时钟产 生单元的硬件启动信号, 和 /或, 用来自时钟产生单元的外部时钟信号产 生出第一分频单元的工作使能信号并将其输出至第一分频单元。 这样, 使得第一分频单元、 计数器以及时钟产生单元中的任一者或任意组合从 非工作状态进入到工作状态。  The above-mentioned automatic calibration start controller uses the count completion signal from the counter as an enable signal for receiving the time interval signal from the fourth frequency divider after receiving the enable signal. The second reference clock signal of the frequency dividing unit generates a hardware enable signal of the clock generating unit, and/or generates an operation enable signal of the first frequency dividing unit with an external clock signal from the clock generating unit and outputs the same To the first frequency division unit. Thus, any one or any combination of the first frequency dividing unit, the counter, and the clock generating unit is brought from the non-working state to the operating state.
本发明实施例三提出的 SOC的具体实现框图如图 4所示,在实施例 二的基础上, 进一步增加了自动校准单元, 用于实现适时自动校准第三 分频因子, 该自动校准单元包括第四分频器 36和自动校准启动控制器 37, 其中:  A specific implementation block diagram of the SOC according to the third embodiment of the present invention is shown in FIG. 4. On the basis of the second embodiment, an automatic calibration unit is further added, which is used to implement a timely automatic calibration of the third frequency division factor, and the automatic calibration unit includes A fourth frequency divider 36 and an automatic calibration start controller 37, wherein:
第四分频器 36可以采用与第一至第三分频器相同的结构来实现,其 分频因子(以下称为第四分频因子)可以是预先设定或从外部接收的常 数, 其数值可由最大的校准时间间隔决定, 比如如果最大校准时间间隔 为 64秒, 则第四分频因子可选为 128。 图 4中示出的校准时间间隔选择 信号 (select )就是从外部接收的第四分频因子。 第四分频器 36的作用 就是一个计时器, 在收到来自计数器 33 的使能信号 enable (即计数器 33的计数完成指示信号 finish )后,接收来自第三分频器 35的 1赫兹基 准时钟信号, 用第四分频因子对此 1赫兹基准时钟信号进行分频, 得到 的分频结果(pointer )作为时间间隔信号 (timer )输出至自动校准启动 控制器 37。 The fourth frequency divider 36 can be implemented by the same structure as the first to third frequency dividers, and the division factor (hereinafter referred to as the fourth frequency division factor) can be preset or received from the outside. The value can be determined by the maximum calibration interval. For example, if the maximum calibration interval is 64 seconds, the fourth division factor can be selected as 128. The calibration time interval selection signal (select ) shown in Fig. 4 is the fourth frequency dividing factor received from the outside. The fourth frequency divider 36 functions as a timer that receives the 1 Hz reference clock from the third frequency divider 35 after receiving the enable signal enable from the counter 33 (i.e., the count completion indicator signal of the counter 33). The signal is divided by the fourth division factor to the 1 Hz reference clock signal, and the obtained frequency division result is output to the automatic calibration start controller 37 as a time interval signal (timer).
自动校准启动控制器 37的输入信号包括 rst_n、 enable, timer, clk_i 和 clk_o, 其中, rst_n连接启动信号、 enable连接计数器 33的计数完成 信号、 timer连接第四分频器 36输出的时间间隔信号、 clk_i连接高频晶 体振荡时钟信号(筒称高频晶振时钟 ) , clk_o连接 1赫兹基准时钟信号。 输出信号为 enable_osc和 enable_divl2, 其中, enable_osc用来作为高频 晶体振荡器的硬件启动信号 (筒称, 高频晶振硬件启动), enable_divl2 用来作为第一分频器 31和第二分频器 32的工作使能信号。 其工作原理 如下: 自动校准启动控制器 37将来自计数器 33的计数完成信号作为使 能信号, 自动校准启动控制器 37在收到此使能信号后, 当接收到来自 第四分频器 36的时间间隔信号时, 用来自第三分频器 35的 1赫兹基准 时钟信号产生出高频晶体振荡器的硬件启动信号发送至高频晶体振荡 器, 用来自高频晶体振荡器的高频晶体振荡时钟信号产生出第一分频器 31、 第二分频器 32的工作使能信号输出至第一分频器 31以及第二分频 器 32, 使得第一分频器 31以及第二分频器 32转变为工作状态。  The input signals of the automatic calibration start controller 37 include rst_n, enable, timer, clk_i and clk_o, wherein the rst_n connection start signal, the count completion signal of the enable connection counter 33, the timer connection time interval signal output by the fourth frequency divider 36, Clk_i is connected to the high-frequency crystal oscillator clock signal (called the high-frequency crystal clock), and clk_o is connected to the 1 Hz reference clock signal. The output signals are enable_osc and enable_divl2, where enable_osc is used as the hardware enable signal of the high-frequency crystal oscillator (the high-frequency crystal oscillator hardware is started), and enable_divl2 is used as the first frequency divider 31 and the second frequency divider 32. The work enable signal. The working principle is as follows: The automatic calibration start controller 37 takes the count completion signal from the counter 33 as an enable signal, and the automatic calibration start controller 37 receives the enable signal from the fourth frequency divider 36 after receiving the enable signal. In the time interval signal, the hardware start signal of the high frequency crystal oscillator is generated by the 1 Hz reference clock signal from the third frequency divider 35, and is sent to the high frequency crystal oscillator, and the high frequency crystal oscillator from the high frequency crystal oscillator is used to oscillate. The clock signal generates a first frequency divider 31, a second frequency divider 32, a working enable signal output to the first frequency divider 31 and the second frequency divider 32, such that the first frequency divider 31 and the second frequency divider The device 32 transitions to a working state.
归纳起来, 图 4所示的基准时钟的实现装置就是在图 3的基础上, 进一步包括第四分频器和自动校准启动控制器; 其中:  To sum up, the implementation of the reference clock shown in Figure 4 is based on Figure 3, and further includes a fourth frequency divider and an auto-calibration start controller;
第四分频器将来自计数器的计数完成信号作为使能信号, 第四分频 器在收到使能信号后, 接收来自第三分频器的频率为 1赫兹的基准时钟 信号, 用预先设定或从外部接收的第四分频因子对 1赫兹的基准时钟信 号进行分频, 产生时间间隔信号输出至自动校准启动控制器; The fourth frequency divider uses the count completion signal from the counter as an enable signal, and the fourth frequency division After receiving the enable signal, the receiver receives the reference clock signal with a frequency of 1 Hz from the third frequency divider, and divides the reference clock signal of 1 Hz with a fourth frequency division factor preset or externally received. , generating a time interval signal output to the automatic calibration start controller;
自动校准启动控制器将来自计数器的计数完成信号作为使能信号, 自动校准启动控制器在收到使能信号后, 当接收到来自第四分频器的时 间间隔信号时, 用来自第三分频器的 1赫兹的基准时钟信号产生出高频 晶体振荡器的硬件启动信号并将其发送至高频晶体振荡器; 用来自高频 晶体振荡器的高频晶体振荡时钟信号产生出第一、 二分频器的工作使能 信号并将其输出至第一分频器以及第二分频器, 使得第一分频器以及第 二分频器转变为工作状态。  The auto-calibration start controller will use the count completion signal from the counter as an enable signal. The auto-calibration start controller will receive the time interval signal from the fourth divider after receiving the enable signal. The 1 Hz reference clock signal of the frequency generator generates a hardware start signal of the high frequency crystal oscillator and transmits it to the high frequency crystal oscillator; the high frequency crystal oscillator clock signal from the high frequency crystal oscillator generates the first, The duty enable signal of the divide-by-2 is output to the first frequency divider and the second frequency divider, so that the first frequency divider and the second frequency divider are turned into an active state.
为了设计的方便,第一至第四分频器在设计上采用完全相同的结构。 下面是采用 Verilog硬件描述语言设计的第一至第四分频器的一种电路, 其中 rst_n为启动信号, enable为使能信号, divisor为分频因子, clk_i 为输入时钟, clk_o 为除频后的输出时钟, pointer为分频或者计数过程 中的计数指针。  For the convenience of design, the first to fourth frequency dividers are designed to have the same structure. The following is a circuit of the first to fourth frequency dividers designed by Verilog hardware description language, where rst_n is the start signal, enable is the enable signal, divisor is the division factor, clk_i is the input clock, and clk_o is the frequency division. The output clock, pointer is the count pointer in the process of dividing or counting.
module divider (rst_n, enable, divisor, clk_i, clk_o, pointer);  Module divider (rst_n, enable, divisor, clk_i, clk_o, pointer);
parameter WIDTH = 10;  Parameter WIDTH = 10;
parameter UDLY = 1; input rst_n;  Parameter UDLY = 1; input rst_n;
input enable;  Input enable;
input clk_i;  Input clk_i;
output clk_o;  Output clk_o;
input [WIDTH- 1:0] divisor;  Input [WIDTH- 1:0] divisor;
output [WIDTH- 1 :0] pointer; wire [WIDTH-1 :0] divisor; reg [WIDTH- 1 :0] pointer;  Output [WIDTH-1:0] pointer; wire [WIDTH-1 :0] divisor; reg [WIDTH- 1 :0] pointer;
always @ (posedge clk_i or negedge rst_n) begin Always @ (posedge clk_i or negedge rst_n) Begin
if (rst_n == 1'bO)  If (rst_n == 1'bO)
pointer <= #UDLY 'hO;  Pointer <= #UDLY 'hO;
else if ((enable == l'bl) && (pointer < divisor - 1))  Else if ((enable == l'bl) && (pointer < divisor - 1))
pointer <= #UDLY pointer + l'bl;  Pointer <= #UDLY pointer + l'bl;
else  Else
pointer <= #UDLY 'hO;  Pointer <= #UDLY 'hO;
end reg clk_o;  End reg clk_o;
always @ (posedge clk_i or negedge rst_n)  Always @ (posedge clk_i or negedge rst_n)
begin  Begin
if (rst_n == 1'bO)  If (rst_n == 1'bO)
clk_o <= #UDLY l'bO;  Clk_o <= #UDLY l'bO;
else if (enable == l'bl)  Else if (enable == l'bl)
clk_o <= #UDLY pointer < divisor » 1;  Clk_o <= #UDLY pointer < divisor » 1;
else  Else
clk_o <= #UDLY l'bO;  Clk_o <= #UDLY l'bO;
end  End
endmodule II divider  Endmodule II divider
以上所示的电路实现方式仅为本发明方案中第一分频器 31 至第四 分频器 36的一种可能的实现方式, 并不用以限制本发明。  The circuit implementation shown above is only one possible implementation of the first frequency divider 31 to the fourth frequency divider 36 in the solution of the present invention, and is not intended to limit the present invention.
图 4所示的基准时钟产生装置 212生成基准时钟的处理流程如图 5 所示, 包括如下步骤:  The processing flow for generating the reference clock by the reference clock generating means 212 shown in FIG. 4 is as shown in FIG. 5, and includes the following steps:
步骤 501: 给 SOC上电。  Step 501: Power on the SOC.
步骤 502: 启动低频 RC振荡器 34。  Step 502: Start the low frequency RC oscillator 34.
步骤 503: 启动高频晶体振荡器。  Step 503: Start the high frequency crystal oscillator.
步骤 504: 通过软件启动第一分频器 31、 第二分频器 32和计数器 33 , 它们开始工作, 计算出第二分频器 32所需的分频因子, 并将计算 完成信号反馈给 SOC。  Step 504: Start the first frequency divider 31, the second frequency divider 32, and the counter 33 by software, and they start to work, calculate the frequency division factor required by the second frequency divider 32, and feed back the calculation completion signal to the SOC. .
步骤 505: SOC收到计数器 33反馈回来的计数完成信号后, 启动第 三分频器 35 , 第三分频器 35将计数器 33送过来的分频因子保存下来, 并产生出精准计时所需的 1赫兹基准时钟。 Step 505: After receiving the counting completion signal fed back by the counter 33, the SOC starts the first The three-way divider 35, the third frequency divider 35 saves the division factor sent from the counter 33 and produces a 1 Hz reference clock required for accurate timing.
在此之后, 为了减少功耗, SOC可以将第一分频器 31、 第二分频电 路 32和计数器 33和高频晶体振荡器置于非工作状态, 避免它们工作产 生不必要的耗电。这样,即便禁止掉高频晶体振荡器,低频 RC振荡器 34 产生的低频振荡时钟会输出至第三分频器 35 , 第三分频器 35会根据计 数器 33 已保存的分频因子对低频振荡时钟进行分频得到基准时钟, 这 样基准时钟产生装置 212依然可以进行精准计时,从而达到 SOC待机状 态时无需高频晶体振荡器振荡工作, 实现 SOC待机工作时耗电小的目 的。  After that, in order to reduce power consumption, the SOC can place the first frequency divider 31, the second frequency dividing circuit 32, and the counter 33 and the high frequency crystal oscillator in an inoperative state, preventing them from operating to generate unnecessary power consumption. Thus, even if the high frequency crystal oscillator is disabled, the low frequency oscillation clock generated by the low frequency RC oscillator 34 is output to the third frequency divider 35, and the third frequency divider 35 oscillates the low frequency according to the divided frequency factor of the counter 33. The clock is divided to obtain a reference clock, so that the reference clock generating device 212 can still perform accurate timing, so that the high-frequency crystal oscillator oscillation operation is not required when the SOC standby state is reached, and the power consumption during the SOC standby operation is small.
为了实现适时校准的功能, 步骤 505之后还可以进一步包括: 步骤 506: 第四分频器 36使能后按照根据最大校准时间间隔确定的 分频因子进行计时, 自动校准启动控制器 37根据校准时间间隔选择信 号去打开高频晶体振荡器和使能第一分频器 31、 第二分频器 32, 并转 至步骤 503 , 重复执行步骤 503至 505 , 实现间隔一段时间自动校准分 频因子。  In order to implement the function of timely calibration, step 505 may further include: Step 506: After the fourth frequency divider 36 is enabled, the timing is determined according to the frequency dividing factor determined according to the maximum calibration time interval, and the automatic calibration start controller 37 is based on the calibration time. The interval selection signal is turned on to turn on the high frequency crystal oscillator and the first frequency divider 31 and the second frequency divider 32 are enabled, and the process proceeds to step 503, and steps 503 to 505 are repeatedly executed to automatically calibrate the frequency dividing factor at intervals.
在上述实施例中, 在获得集成电路内部产生的振荡信号的频率信息 后, 即可以根据需要控制第一分频单元、 计数器、 和 /或集成电路外部的 时钟产生单元进入非工作状态 (即, 停止工作), 而此时仍然可以根据 依据频率信, 得到的分频因子对振荡信号分频继续输出精准计时的应 用所需的基准时钟, 满足了待机状态的低功耗需求; 此外, 还可以根据 需要以预定的校准时间间隔控制第一分频单元、 计数器、 和时钟产生单 元进入工作状态以重新获得振荡信号的频率信息, 从而可以起到对基准 时钟进行适时校准的作用。  In the above embodiment, after the frequency information of the oscillating signal generated inside the integrated circuit is obtained, the first frequency dividing unit, the counter, and/or the clock generating unit outside the integrated circuit can be controlled to enter a non-operating state as needed (ie, Stop working), and at this time, the reference clock required for the application of the accurate timing can be divided according to the frequency division factor obtained by the frequency signal, and the low-power requirement of the standby state can be satisfied; The first frequency dividing unit, the counter, and the clock generating unit are controlled to enter an operating state at a predetermined calibration time interval to regain the frequency information of the oscillating signal, thereby functioning as a timely calibration of the reference clock.
图 3所示的基准时钟产生装置 212则可以实现除步骤 506之外的步 骤 501至 505。 The reference clock generating means 212 shown in FIG. 3 can implement steps other than step 506. Steps 501 to 505.
根据以上描述可以总结出本发明实施例三提出的基准时钟的实 现流程, 具体如图 6所示, 包括如下步骤:  The implementation process of the reference clock according to the third embodiment of the present invention can be summarized according to the above description. Specifically, as shown in FIG. 6, the method includes the following steps:
步骤 601 : 将高频晶体振荡器产生的高频时钟的标称频率乘以 2后 再作为分频因子, 对此高频时钟分频, 输出占空比为 1、 频率为 0.5赫 兹的时钟信号;  Step 601: Multiplying the nominal frequency of the high frequency clock generated by the high frequency crystal oscillator by 2 and then dividing the frequency into a frequency division factor, and dividing the high frequency clock to output a clock signal having a duty ratio of 1. 0.5 Hz. ;
步骤 602:在此占空比为 1频率为 0.5赫兹的时钟信号的一个周期内 的高电平部分, 对低频 RC振荡器产生的低频振荡时钟进行计数, 当此 高电平部分结束时则计数完成, 并将计数结果作为第三分频因子保存; 步骤 603: 根据此第三分频因子对低频 RC振荡器产生的低频振荡 时钟进行分频, 产生并输出 1赫兹的基准时钟。  Step 602: Count the low frequency oscillation clock generated by the low frequency RC oscillator at a high level portion of the clock signal whose duty ratio is 1 frequency of 0.5 Hz, and count when the high level portion ends. After completion, the counting result is saved as the third frequency dividing factor; Step 603: The low frequency oscillation clock generated by the low frequency RC oscillator is divided according to the third frequency dividing factor, and a reference clock of 1 Hz is generated and output.
较佳地, 上述步骤 601可以分为:  Preferably, the above step 601 can be divided into:
步骤 601a: 接收高频晶体振荡器产生的高频时钟以及此高频时钟的 标称频率, 用此标称频率对此高频时钟进行分频, 输出频率为 1赫兹的 时钟信号;  Step 601a: receiving a high frequency clock generated by the high frequency crystal oscillator and a nominal frequency of the high frequency clock, and dividing the high frequency clock by the nominal frequency, and outputting a clock signal having a frequency of 1 Hz;
步骤 601b:对上述 1赫兹的时钟信号进行二分频,输出占空比为 1、 频率为 0.5赫兹的时钟信号。  Step 601b: Divide the above 1 Hz clock signal by two, and output a clock signal with a duty ratio of 1, and a frequency of 0.5 Hz.
可选地, 上述步骤 603之后, 进一步包括:  Optionally, after the foregoing step 603, the method further includes:
步骤 604: 用第四分频因子对 1赫兹的基准时钟信号进行分频, 产 生时间间隔信号;  Step 604: Divide a 1 Hz reference clock signal by using a fourth frequency division factor to generate a time interval signal;
步骤 605: 接收到此时间间隔信号时用 1赫兹的基准时钟信号产生 出高频晶体振荡器的硬件启动信号并发送至高频晶体振荡器, 再转至上 述步骤 601。  Step 605: When receiving the time interval signal, generate a hardware start signal of the high frequency crystal oscillator with a reference clock signal of 1 Hz and send it to the high frequency crystal oscillator, and then go to the above step 601.
本发明的技术方案利用高频晶体振荡器产生的高频时钟, 通过 SOC 内部硬件电路得到 1赫兹频率的基准时钟的分频因子, 从而在不需要低 频晶体振荡器的情况下得到精准的 1赫兹频率基准时钟, 同时根据需要 可以实现适时校准的作用。 The technical scheme of the present invention utilizes a high frequency clock generated by a high frequency crystal oscillator, and obtains a frequency division factor of a reference clock of 1 Hz frequency through an internal hardware circuit of the SOC, thereby not requiring low In the case of a frequency crystal oscillator, a precise 1 Hz frequency reference clock is obtained, and a timely calibration can be achieved as needed.
本发明有益的效果就是可以省掉 SOC 中为低频晶体振荡器配备的 两个 ^氐频晶振引脚, 一方面为 SOC实现更少引脚的封装产品提供可能, 另外一方面可以使 SOC在具有同样数目引脚的情况下实现更多的功能。 同时,在多媒体处理器 SOC应用中可以节省一个外部低频晶体振荡器及 其应用电路所需元器件, 能够有效降低多媒体处理器 SOC应用产品的 BOM成本, 提高 SOC产品的市场竟争力。  The beneficial effect of the invention is that the two 氐 frequency crystal oscillator pins provided for the low frequency crystal oscillator in the SOC can be omitted, which provides the possibility that the SOC realizes a package with fewer pins, and on the other hand, the SOC can have More functions are implemented with the same number of pins. At the same time, in the multimedia processor SOC application, an external low-frequency crystal oscillator and its application circuit components can be saved, which can effectively reduce the BOM cost of the multimedia processor SOC application product and improve the market competitiveness of the SOC product.
综上所述, 以上仅为本发明的较佳实施例而已, 并非用于限定本发 明的保护范围。 凡在本发明的精神和原则之内, 所作的任何修改、 等同 替换、 改进等, 均应包含在本发明的保护范围之内。  In conclusion, the above is only the preferred embodiment of the present invention and is not intended to limit the scope of the present invention. Any modifications, equivalents, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.

Claims

权利要求书 Claim
1、 一种集成电路, 其特征在于, 包括: 第一分频单元、 计数器、 振 荡信号产生电路和第二分频单元; 其中: An integrated circuit, comprising: a first frequency dividing unit, a counter, an oscillating signal generating circuit, and a second frequency dividing unit; wherein:
所述第一分频单元用于通过对来自所述集成电路外部的外部时钟信 号进行分频得到第一基准时钟;  The first frequency dividing unit is configured to obtain a first reference clock by dividing an external clock signal from outside the integrated circuit;
所述振荡信号产生电路用于产生振荡信号;  The oscillation signal generating circuit is configured to generate an oscillating signal;
所述计数器用于通过使用所述第一基准时钟对所述振荡信号进行计 数得到所述振荡信号的频率信息; 及,  The counter is configured to obtain frequency information of the oscillating signal by counting the oscillating signal by using the first reference clock; and
所述第二分频单元用于根据依据所述频率信息得到的分频因子对所 述振荡信号进行分频得到第二基准时钟。  The second frequency dividing unit is configured to divide the oscillating signal according to a frequency dividing factor obtained according to the frequency information to obtain a second reference clock.
2、根据权利要求 1所述的集成电路, 其特征在于, 所述第一分频单 元包括第一分频器和第二分频器; 其中:  The integrated circuit according to claim 1, wherein said first frequency dividing unit comprises a first frequency divider and a second frequency divider; wherein:
所述第一分频器用于通过使用分频因子对所述外部时钟信号进行分 频得到时钟信号; 及,  The first frequency divider is configured to obtain a clock signal by dividing the external clock signal by using a frequency dividing factor; and
所述第二分频器用于通过对所述第一分频器得到的时钟信号进行二 分频得到所述第一基准时钟信号。  The second frequency divider is configured to obtain the first reference clock signal by dividing a clock signal obtained by the first frequency divider by a frequency division.
3、根据权利要求 1所述的集成电路, 其特征在于, 所述第一分频单 元包括: 一个分频器, 所述一个分频器用于通过使用分频因子对所述外 部时钟信号进行分频得到所述第一基准时钟。  The integrated circuit according to claim 1, wherein the first frequency dividing unit comprises: a frequency divider, wherein the one frequency divider is configured to divide the external clock signal by using a frequency dividing factor The frequency is obtained by the first reference clock.
4、根据权利要求 1所述的集成电路, 其特征在于, 所述集成电路进 一步包括: 控制单元, 用于当所述计数器得到所述频率信息时, 控制所 述第一分频单元、 所述计数器和所述集成电路外部的用于产生所述外部 时钟信号的时钟产生单元中的任一者或任意组合进入非工作状态。  The integrated circuit according to claim 1, wherein the integrated circuit further comprises: a control unit, configured to: when the counter obtains the frequency information, control the first frequency dividing unit, Any one or any combination of a counter and a clock generating unit external to the integrated circuit for generating the external clock signal enters an inactive state.
5、根据权利要求 4所述的集成电路, 其特征在于, 所述集成电路进 一步包括: 自动校准单元, 用于在预定的校准间隔时间后控制所述第一 分频单元、 所述计数器以及所述时钟产生单元中的任一者或任意组合进 入工作状态。 5. The integrated circuit of claim 4, wherein the integrated circuit The step includes: an automatic calibration unit, configured to control any one or any combination of the first frequency dividing unit, the counter, and the clock generating unit to enter an operating state after a predetermined calibration interval time.
6、根据权利要求 5所述的集成电路, 其特征在于, 所述自动校准单 元包括: 分频器和自动校准启动控制器; 其中:  The integrated circuit according to claim 5, wherein said automatic calibration unit comprises: a frequency divider and an automatic calibration start controller; wherein:
所述分频器将来自所述计数器的计数完成信号作为使能信号, 用于 在收到所述使能信号后, 当接收到来自所述第二分频单元的所述第二基 准时钟信号时, 用预先设定或从外部接收的分频因子对所述第二基准时 钟信号进行分频, 产生时间间隔信号并将其输出至所述自动校准启动控 制器; 及,  The frequency divider uses a count completion signal from the counter as an enable signal for receiving the second reference clock signal from the second frequency division unit after receiving the enable signal And dividing the second reference clock signal by a frequency dividing factor preset or received from the outside, generating a time interval signal and outputting the same to the automatic calibration start controller;
所述自动校准启动控制器将来自所述计数器的计数完成信号作为使 能信号, 用于在收到所述使能信号后, 当接收到来自所述分频器的所述 时间间隔信号时, 用来自所述第二分频单元的所述第二基准时钟信号产 生出所述时钟产生单元的硬件启动信号, 和 /或, 用所述外部时钟信号产 生出所述第一分频单元的工作使能信号并将其输出至所述第一分频单 元。  The automatic calibration start controller uses a count completion signal from the counter as an enable signal for receiving the time interval signal from the frequency divider after receiving the enable signal, Generating a hardware enable signal of the clock generating unit with the second reference clock signal from the second frequency dividing unit, and/or generating the operation of the first frequency dividing unit with the external clock signal The enable signal is output to the first frequency division unit.
7、根据权利要求 1至 6任一项所述的集成电路, 其特征在于, 所述 外部时钟信号为高频时钟信号, 所述振荡信号为低频振荡信号。  The integrated circuit according to any one of claims 1 to 6, wherein the external clock signal is a high frequency clock signal, and the oscillating signal is a low frequency oscillating signal.
8、 一种在集成电路中获得基准时钟的方法, 其特征在于,, 所述方 法包括:  8. A method of obtaining a reference clock in an integrated circuit, the method comprising:
通过对来自所述集成电路外部的外部时钟信号进行分频得到第一基 准时钟;  A first reference clock is obtained by dividing an external clock signal from outside the integrated circuit;
产生振荡信号;  Generating an oscillating signal;
通过使用所述第一基准时钟对所述振荡信号进行计数得到所述振荡 信号的频率信息; 及, 根据依据所述频率信息得到的分频因子对所述振荡信号进行分频得 到第二基准时钟。 Frequency information of the oscillating signal is obtained by counting the oscillating signal by using the first reference clock; and And dividing the oscillating signal according to a frequency dividing factor obtained according to the frequency information to obtain a second reference clock.
9、根据权利要求 8所述的方法, 其特征在于, 所述通过对来自所述 集成电路外部的外部时钟信号进行分频得到第一基准时钟, 包括:  The method according to claim 8, wherein the obtaining the first reference clock by dividing an external clock signal from the outside of the integrated circuit comprises:
通过使用分频因子对所述外部时钟信号进行分频得到所述第一基准 时钟。  The first reference clock is obtained by dividing the external clock signal by using a division factor.
10、 根据权利要求 8所述的方法, 其特征在于, 所述通过对来自所 述集成电路外部的外部时钟信号进行分频得到第一基准时钟, 包括: 通过使用分频因子对所述外部时钟信号进行分频得到时钟信号;及, 通过对所述分频得到的时钟信号进行二分频得到所述第一基准时钟 信号。  10. The method according to claim 8, wherein the dividing the external reference clock signal from the external clock signal to obtain the first reference clock comprises: using the frequency dividing factor to the external clock The signal is divided to obtain a clock signal; and the first reference clock signal is obtained by dividing the clock signal obtained by the frequency division by two.
11、 根据权利要求 8所述的方法, 其特征在于, 在得到所述振荡信 号的频率信息之后, 进一步包括: 控制用于分频得到所述第一基准时钟 的分频单元、 用于对所述振荡信号进行计数得到所述频率信息的计数器 以及用于产生所述外部时钟信号的时钟产生单元中的任一者或任意组 合进入非工作状态。  The method according to claim 8, wherein after obtaining the frequency information of the oscillating signal, the method further comprises: controlling a frequency dividing unit for dividing the frequency to obtain the first reference clock, The oscillating signal is counted to obtain a counter of the frequency information and any one or any combination of clock generating units for generating the external clock signal to enter a non-operating state.
12、根据权利要求 11所述的方法, 其特征在于, 在控制所述分频单 元、 所述计数器以及所述时钟产生单元中的任一者或任意组合进入非工 作状态之后,进一步包括:在预定的校准间隔时间后控制所述分频单元、 所述计数器以及所述时钟产生单元中的任一者或任意组合进入工作状 态。  The method according to claim 11, wherein after controlling any one or any combination of the frequency dividing unit, the counter, and the clock generating unit to enter a non-working state, the method further includes: Controlling any one or any combination of the frequency dividing unit, the counter, and the clock generating unit to enter an operational state after a predetermined calibration interval.
13、根据权利要求 12所述的方法, 其特征在于, 所述在预定的校准 间隔时间后控制所述分频单元、 所述计数器以及所述时钟产生单元中的 任一者或任意组合进入工作状态, 包括:  The method according to claim 12, wherein the controlling any one or any combination of the frequency dividing unit, the counter, and the clock generating unit to enter a work after a predetermined calibration interval time Status, including:
在所述计数器的计数完成之后、且接收到所述第二基准时钟信号时, 用预先设定或从外部接收的分频因子对所述第二基准时钟信号进行分 频, 产生时间间隔信号; 及, After the counting of the counter is completed and the second reference clock signal is received, The second reference clock signal is divided by a frequency dividing factor preset or received from the outside to generate a time interval signal;
在所述计数器的计数完成之后、 且接收到所述时间间隔信号时, 用 所述第二基准时钟信号产生出所述时钟产生单元的硬件启动信号, 和 / 或, 用所述外部时钟信号产生出所述分频单元的工作使能信号。  Generating, by the second reference clock signal, a hardware enable signal of the clock generating unit after the counting of the counter is completed, and receiving the time interval signal, and/or generating the external clock signal The working enable signal of the frequency dividing unit is output.
PCT/CN2010/074530 2009-08-28 2010-06-25 Integrated circuit and method for acquiring reference clock in integrated circuit WO2011023030A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2009101715392A CN102006056A (en) 2009-08-28 2009-08-28 Integrated circuit and method for obtaining reference clock in integrated circuit
CN200910171539.2 2009-08-28

Publications (1)

Publication Number Publication Date
WO2011023030A1 true WO2011023030A1 (en) 2011-03-03

Family

ID=43627226

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/074530 WO2011023030A1 (en) 2009-08-28 2010-06-25 Integrated circuit and method for acquiring reference clock in integrated circuit

Country Status (2)

Country Link
CN (1) CN102006056A (en)
WO (1) WO2011023030A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105117200A (en) * 2015-06-30 2015-12-02 广西科技大学 Counter IP core connected with 16-bit microprocessor application system, and counter counting control realization method thereof

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8848858B2 (en) * 2012-08-01 2014-09-30 Intel Corporation Integrated non-volatile monotonic counters
CN109061265B (en) * 2018-08-31 2024-03-26 华润微集成电路(无锡)有限公司 Universal meter control circuit with controllable shutdown time

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1215266A (en) * 1997-09-27 1999-04-28 日本电气株式会社 High-resolution clock reconstruction used in mobile communication equipment
CN1436402A (en) * 2000-06-15 2003-08-13 因芬尼昂技术股份公司 Calibration device and method for generating clock pulse in integrated circuit
CN1787645A (en) * 2005-11-11 2006-06-14 北京中星微电子有限公司 System for clock recovery of multi media system
JP2006215618A (en) * 2005-02-01 2006-08-17 Seiko Epson Corp Clock generating circuit

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1215266A (en) * 1997-09-27 1999-04-28 日本电气株式会社 High-resolution clock reconstruction used in mobile communication equipment
CN1436402A (en) * 2000-06-15 2003-08-13 因芬尼昂技术股份公司 Calibration device and method for generating clock pulse in integrated circuit
JP2006215618A (en) * 2005-02-01 2006-08-17 Seiko Epson Corp Clock generating circuit
CN1787645A (en) * 2005-11-11 2006-06-14 北京中星微电子有限公司 System for clock recovery of multi media system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105117200A (en) * 2015-06-30 2015-12-02 广西科技大学 Counter IP core connected with 16-bit microprocessor application system, and counter counting control realization method thereof

Also Published As

Publication number Publication date
CN102006056A (en) 2011-04-06

Similar Documents

Publication Publication Date Title
EP3332302B1 (en) Power distribution network (pdn) droop/overshoot mitigation
CN109067394B (en) On-chip clock calibration device and calibration method
CN102739248A (en) Clock signal generation circuit
TW201236360A (en) Low-power oscillator
JP2002026723A (en) Method and system for generating clock signal
CN106716390A (en) Frequency and power management
WO2011023030A1 (en) Integrated circuit and method for acquiring reference clock in integrated circuit
TWI395409B (en) Tri-stating a phase locked loop to conserve power
JP2001014056A (en) Semiconductor integrated circuit and spread spectrum clock oscillator
US7315489B2 (en) Method and apparatus for time measurement
JP2000174615A (en) Method and device for automatically correcting internal clock frequency of integrated circuit
JP2002261591A (en) Accurate time delay system and method using innacurate oscillator
JP2001013179A (en) Measurement method for ring oscillator clock frequency, measurement circuit for ring oscillator clock frequency, and microcomputer
JP3523362B2 (en) Clock circuit and processor using the same
US6618456B1 (en) Asynchronous timing oscillator re-synchronizer and method
CN113900478B (en) Clock module design method suitable for SoC chip
US11895588B2 (en) Timing precision maintenance with reduced power during system sleep
JP2011197910A (en) Clock control circuit and microcomputer
JP4445677B2 (en) Semiconductor integrated circuit
JPH10143272A (en) Oscillation circuit
CN114785342A (en) Low-frequency high-precision oscillator for system-on-chip SOC and system-on-chip SOC
JPH1090370A (en) Ic circuit with pulse generation function and lsi testing apparatus using it
US6496078B1 (en) Activating on-chip oscillator using ring oscillator
JP2006215618A (en) Clock generating circuit
US9941865B2 (en) Method and circuitry for generating trigger signal and associated non-transitory computer program product

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: 10811190

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: 10811190

Country of ref document: EP

Kind code of ref document: A1