WO2014114146A1 - 时钟产生电路自校正***及其校正方法 - Google Patents

时钟产生电路自校正***及其校正方法 Download PDF

Info

Publication number
WO2014114146A1
WO2014114146A1 PCT/CN2013/088846 CN2013088846W WO2014114146A1 WO 2014114146 A1 WO2014114146 A1 WO 2014114146A1 CN 2013088846 W CN2013088846 W CN 2013088846W WO 2014114146 A1 WO2014114146 A1 WO 2014114146A1
Authority
WO
WIPO (PCT)
Prior art keywords
module
clock signal
generation circuit
hardware logic
register
Prior art date
Application number
PCT/CN2013/088846
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 深圳市汇顶科技股份有限公司
Publication of WO2014114146A1 publication Critical patent/WO2014114146A1/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/14Time supervision arrangements, e.g. real time clock

Definitions

  • This invention relates to the field of integrated circuits, and more particularly to a clock generation circuit self-correcting system that automatically reduces the error of a clock generating circuit in an electronic system to within a desired error range and a method of correcting the same.
  • the existing clock generation circuit correction technology such as the Chinese patent of the patent number CN200410086408.1, mainly uses a counting algorithm to implement the correction, and generally requires a control unit such as a CPU or an MCU to perform the correction operation.
  • the existing clock generation circuit correction technology has the following defects: First, the lack of verification mechanism, it is impossible to verify whether the corrected clock accuracy meets the system requirements; Second, the lack of data control and storage, resulting in correction data may be easily lost, Poor reliability; Third, as long as the lack of CPU or MCU intervention, the correction cannot be completed, that is, the system does not have self-correction capability. Summary of the invention
  • an object of the present invention is to provide a clock generating circuit self-correcting system which can automatically reduce the error of the clock generating circuit in the electronic system to a desired error range and a correcting method thereof.
  • a clock generation circuit self-calibration system comprising:
  • the hardware logic module generates search data and transmits the data to the register module as a configuration parameter of the oscillator in the clock generation circuit module.
  • the register module outputs the register data according to the search data to the clock generation circuit module, and the clock generation circuit module generates the system clock signal and transmits the signal to the hardware logic.
  • the module, the hardware logic module compares the system clock signal with the external reference clock signal. When the clock frequency of the oscillator output does not meet the accuracy requirement, the hardware logic module corrects the search data to generate new search data and performs the next round of correction. Until the clock frequency of the oscillator output meets the accuracy requirement, the hardware logic module stops the calibration and the search data is stored in the memory module.
  • the hardware logic module correcting the search data includes increasing the value of the search data and decreasing the value of the search data.
  • the register module is a variable bit width register that registers search data at different times.
  • the storage module is a non-volatile memory.
  • the clock generation circuit self-correction system further includes a data transmission module, the data transmission module is disposed between the register module and the storage module, and is connected to the register module and the storage module in two directions, and the storage module transmits the data through the data.
  • the module and register module are connected in both directions.
  • the external reference clock signal is input to the hardware logic module by an external clock generator.
  • the present invention further provides a method for correcting a clock generation circuit self-correction system, comprising the steps of:
  • the search data is generated by the hardware logic module and transmitted to the register module as a configuration parameter for the oscillator in the clock generation circuit module.
  • the correction data is a value of the search data that satisfies the accuracy requirement of the frequency of the system clock signal output from the oscillator in the clock generation circuit module with respect to the frequency of the external reference clock signal.
  • the external reference clock signal is input to the hardware logic module by an external clock generator.
  • the clock generation circuit self-correction system can automatically reduce the error of the clock generation circuit in the corresponding electronic system to the electronic system through the hardware logic module, the register module and the clock generation circuit module. Within the required error accuracy range, and storing the correction value in the memory module, the clock generation circuit can provide the clock generation circuit after each power-on after the clock generation circuit self-calibration system completes the correction. High precision clock signal.
  • FIG. 1 is a structural diagram of a clock generation circuit self-correction system according to a first embodiment of the present invention.
  • FIG. 2 is a diagram showing the composition of a clock generation circuit self-correction system according to a second embodiment of the present invention.
  • FIG. 3 is a calibration side of a clock generation circuit self-correction system according to a third embodiment of the present invention.
  • the working flow chart of the law The working flow chart of the law. detailed description
  • a first embodiment of the present invention provides a clock generation circuit self-correction system 100, which includes a hardware logic module (search reg) 10, a register module (reg) 20, a clock generation circuit module (OSC) 30, and storage. Module (mem) 40.
  • search reg hardware logic module
  • register module register module
  • OSC clock generation circuit module
  • the input signal of the hardware logic module 10 is the external reference clock signal ref_clk and the system clock signal OSC_clk output by the clock generation circuit module 30, the output signal is the search data nxt_reg, and the search data nxt_reg is transmitted to the register module 20.
  • the hardware logic module 10 outputs the search data nxt_reg to the register module 20 as a configuration parameter of the oscillator (not shown) of the clock generation circuit module 30 by using a certain search algorithm, and then monitors the system generated by the oscillator.
  • this search data nxt_reg is the correction data, which is transmitted to the storage module 40 and stored in the storage module 40.
  • the hardware logic module 10 cyclically corrects the search data nxt_reg to correct the system clock signal osc_clk outputted by the clock generation circuit module 30, so that the frequency error of the system clock signal osc_clk satisfies the accuracy requirement, and acquires correction data (result).
  • the hardware logic module 10 relates to the search algorithm and the frequency precision comparison algorithm of the search data nxt_reg.
  • the search algorithm of the search data nxt_reg generates an initial value, and then judges whether it is necessary to increase or decrease the value of the search data nxt_reg by comparing the external reference clock signal ref_clk with the clock frequency of the system clock signal osc_clk, if If the result does not meet the accuracy requirement, the next correction is performed, that is, the search data nxt_reg is increased or decreased to generate a new search number.
  • a new round of searching is performed according to nxt_reg until the comparison result of the system clock signal ref_clk and the external reference clock signal ref_clk satisfies the accuracy requirement.
  • increasing or decreasing the value of the search data nxt_reg may be performed by a dichotomy or a sequential addition or subtraction operation, and may be selected as needed.
  • Frequency accuracy is relatively comparison algorithm ref_clk the external reference clock signal and a clock frequency method osc_ C lk system clock signal may be utilized to pick a high frequency clock rising or falling edge of the low frequency clock to count plus one, through known after the time counting is stopped, and the counter value comparing pre-computed values is determined whether good standards required accuracy; another method is to compare the counter were used ref_clk external reference clock signal and a system clock signal osc_ C lk counts over time after stopping the count value of the counter meets two comparison precision, the external reference clock signal and a system clock signal ref_clk 0SC _clk asynchronous clock signal, so a direct comparison of the values of the two counters, often use Gray code conversion, Then, the Gray coded value is synchronized in two rows, and then inversely encoded into a binary code, and then the size comparison is performed to determine whether the comparison result satisfies the requirement.
  • the register module 20 is connected to the hardware logic module 10, and the input signal is the search data nxt_reg generated by the hardware logic module 10 and the data mem2re transmitted from the storage module 40.
  • the output signals are the register data new_reg and the data re2mem.
  • the register data new_reg is input to the clock generation circuit module 30, and the data re2mem is input to the storage module 40.
  • the register module 20 is a register, and its bit width can be changed as needed.
  • the values of the search data nxt_reg and the data mem2re are registered at different times, and the register data new_reg is output to the clock generation circuit module 30, and the output data re2mem is stored. Module 40.
  • the register data ne W _reg is generated by the register module 20 according to the received search data nxt_reg.
  • the clock generation circuit module 30 is connected to both the hardware logic module 10 and the register module 20, and forms a one-way loop with the hardware logic module 10 and the register module 20.
  • the input signal of the clock generation circuit module 30 is the register data ne W _reg outputted by the register module 20, and the output signal is the system clock signal osc_clk generated by the oscillator.
  • System clock signal osc_clk Enter the hardware logic module 10.
  • the clock generation circuit module 30 generates system clock signals osc_clk of different frequencies according to different register data new_reg.
  • the storage module 40 and the register module 20 are bidirectionally connected, and the input signal is the data re2mem outputted by the register module 20, and the output signal is the data mem2re.
  • the storage module 40 is a non-volatile memory, which can store data stably for a long time. When the storage module 40 is powered off, the stored data is not lost.
  • the data re2mem outputted by the register module 20 to the storage module 40 is the correction data result, and thus the correction data result can be stored in the storage module 40. That is, the correction data result can be transferred between the storage module 40 and the register module 20.
  • the correction data result needs to be transmitted from the register module 20 to the storage module 40, and the correction data result needs to be transmitted from the storage module 40 to the register module 20 each time the power is turned on.
  • the transmission of the correction data result between the register module 20 and the storage module 40 is implemented by software.
  • the transmission of the data signal between the register module 20 and the storage module 40 can also be implemented by hardware.
  • the clock generation circuit self-correction system 200 provided by the second embodiment of the present invention further includes A data transfer module 50 is disposed between the register module 20 and the memory module 40, and is connected bidirectionally with the register module 20 and the memory module 40, respectively.
  • the register module 20 outputs the data re2mc to the data transmission module 50.
  • the input signal of the data transmission module 50 is the data re2mc and the data me2mc output from the storage module 40, and the output signal is the data mc2re transmitted to the register module 20 and The data mc2me transmitted to the storage module 40.
  • the clock generation circuit self-correction system 200 realizes the transmission of the correction data result between the storage module 40 and the register module 20 through the data transmission module 50.
  • the first correction pass after correction data result is transmitted from the register module 20 to the storage module 40 through the data transfer module 50, and the correction data is taken every time after power-on.
  • the result is transmitted from the storage module 40 to the register module 20 through the data transfer module 50.
  • a third embodiment of the present invention provides a method for correcting the clock generation circuit self-correction system 100, which includes the following steps:
  • the hardware logic module 10 generates search data nxt_reg and outputs it to the register module 20 as a configuration parameter of the oscillator in the clock generation circuit module 30, and then the register module 20 forms the register data ne W according to the search data nxt_reg.
  • the _reg signal is transmitted to the clock generation circuit module 30, and the oscillator of the clock generation circuit module 30 outputs the system clock signal osc_clk and is transmitted to the hardware logic module 10.
  • the hardware logic module 10 compares the frequency of the system clock signal osc_clk and the external reference clock signal ref_clk.
  • step S105A If the frequency error of the system clock signal osc_clk and the external reference clock signal ref_clk satisfies the accuracy requirement, the process proceeds to step S105A, otherwise, the process proceeds to step S105B.
  • the external reference clock signal ref_clk is input to the hardware logic module 10 by an external clock generator.
  • the value of the system clock signal osc_dk outputted by the oscillator with respect to the frequency of the external reference clock signal ref_clk satisfies the accuracy requirement.
  • the value of the search data nxt_reg is the correction data result, and the correction data result is transmitted to the storage module 40 for storage.
  • S105B Determine whether the system clock signal is too fast or too slow relative to the external reference clock signal.
  • the clock generation circuit module 30 obtains the new register data new_reg value, it takes a period of time to stabilize, and thus, after obtaining the new register data new _reg value, it needs to wait for a period of time, that is, delay.
  • the nxt_r e g signal is then generated.
  • the clock generation circuit self-correction system 200 provided by the second embodiment of the present invention can also adopt a correction method.
  • the clock generation circuit self-correction system 100 (and the clock generation circuit self-correction system 200) provided by the present invention passes the hardware logic module 10, the register module 20 and the clock generation circuit module 30 therein, and uses the correction method.
  • the error of the clock generation circuit in the corresponding electronic system can be automatically reduced to the error precision required by the electronic system, and the correction value is saved in the storage module 40, thereby being completed by the clock generation circuit self-correction system 100.
  • the electronic system provides a high-precision clock signal after each power-on.
  • the clock generation circuit self-correction system of the embodiment of the invention can automatically reduce the error of the clock generation circuit in the corresponding electronic system to the electronic system by using the hardware logic module, the register module and the clock generation circuit module. Within the required error accuracy range, and storing the correction value in the memory module, the clock generation circuit can provide the clock generation circuit after each power-on after the clock generation circuit self-calibration system completes the correction. High precision clock signal.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stabilization Of Oscillater, Synchronisation, Frequency Synthesizers (AREA)

Abstract

本发明提出一种时钟产生电路自校正***和方法,其中,***包括硬件逻辑模块、和硬件逻辑模块连接的寄存器模块、和硬件逻辑模块及寄存器模块连接的时钟产生电路模块及和寄存器模块双向连接的存储模块,其中硬件逻辑模块产生搜索数据并传输至寄存器模块作为时钟产生电路模块的配置参数,寄存器模块输出寄存器数据至时钟产生电路模块,产生***时钟信号并传输至硬件逻辑模块,***时钟信号和外部参考时钟信号进行比较,当不满足精度要求时,对搜索数据进行校正产生新的搜索数据并进行下一轮校正,直至满足精度要求时,硬件逻辑模块停止校正,且此时搜索数据存储于存储模块。本发明可自动将电子***中的时钟产生电路的误差降低到所要求的误差范围内。

Description

时钟产生电路自校正***及其校正方法 技术领域
本发明涉及集成电路领域, 尤其涉及可自动将电子***中的时钟产 生电路的误差降低到所要求的误差范围内的时钟产生电路自校正*** 及其校正方法。 背景技术
在集成电路领域中所使用的时钟信号通常需要非常高的精确度, 才能确 保通讯正常。 现有时钟产生电路校正技术, 如专利号为 CN200410086408.1 的中国专利,主要采用计数的算法来实现校正,一般需要借助控制单元如 CPU 或 MCU来完成校正操作。
现有时钟产生电路校正技术存在的缺陷主要有: 第一、 缺乏验算机制, 导致无法验证其校正后的时钟精度是否满足***要求; 第二、 缺乏数据控制 和存储, 导致校正数据可能容易丢失, 可靠性差; 第三、 只要缺乏 CPU 或 MCU的介入, 则无法完成校正, 即***不具备自校正能力。 发明内容
针对上述问题, 本发明的目的是提供一种可自动将电子***中的时 钟产生电路的误差降低到所要求的误差范围内的时钟产生电路自校正 ***及其校正方法。
一种时钟产生电路自校正***, 其包括:
硬件逻辑模块, 其接收外部参考时钟信号;
寄存器模块, 其和硬件逻辑模块连接;
时钟产生电路模块, 其和硬件逻辑模块及寄存器模块连接; 及 存储模块, 其和寄存器模块双向连接; 硬件逻辑模块产生搜索数据并传输至寄存器模块作为时钟产生电 路模块中振荡器的配置参数, 寄存器模块根据搜索数据输出寄存器数据 至时钟产生电路模块, 时钟产生电路模块产生***时钟信号并传输至硬 件逻辑模块, 硬件逻辑模块将***时钟信号和外部参考时钟信号进行比 较, 当振荡器输出的时钟频率不满足精度要求时, 硬件逻辑模块对搜索 数据进行校正产生新的搜索数据并进行下一轮校正, 直至振荡器输出的 时钟频率满足精度要求时, 硬件逻辑模块停止校正, 且此时搜索数据存 储于存储模块。
本发明一较佳实施方式中, 硬件逻辑模块对搜索数据进行校正包括 增加搜索数据的值和减少搜索数据的值。
本发明一较佳实施方式中, 寄存器模块为可变位宽的寄存器, 其在 不同的时刻寄存搜索数据。
本发明一较佳实施方式中, 存储模块为非易失性存储器。
本发明一较佳实施方式中, 时钟产生电路自校正***进一步包括数 据传输模块, 数据传输模块设置于寄存器模块和存储模块之间, 其和寄 存器模块及存储模块分别双向连接, 存储模块通过数据传输模块和寄存 器模块双向连接。
本发明一较佳实施方式中, 外部参考时钟信号由外部时钟产生器输入 至硬件逻辑模块。
本发明另外提供一种时钟产生电路自校正***的校正方法, 其包括 以下步骤:
产生搜索数据;
比较***时钟信号和外部参考时钟信号的频率大小, 如果频率误差满足 精度要求则停止校正并存储校正数据, 否则判断***时钟信号相对于外部参 考时钟信号太快还是太慢;
如果***时钟信号相对于外部参考时钟信号太快, 则减小搜索数据, 如 果***时钟信号相对于外部参考时钟信号太慢, 则增加搜索数据;
延时后进入下一轮的校正。
本发明一较佳实施方式中, 搜索数据由硬件逻辑模块产生并传输至 寄存器模块作为时钟产生电路模块中振荡器的配置参数。
本发明一较佳实施方式中, 校正数据为使时钟产生电路模块中振荡 器输出的***时钟信号的频率相对于外部参考时钟信号的频率满足精 度要求的搜索数据的值。
本发明一较佳实施方式中, 外部参考时钟信号由外部时钟产生器输入 至硬件逻辑模块。
相对于现有技术, 时钟产生电路自校正***通过其中的硬件逻辑模 块、 寄存器模块和时钟产生电路模块, 利用校正方法, 可以自动将相应 电子***中的时钟产生电路的误差降低到该电子***所要求的误差精 度范围内, 并将校正值保存在其中的存储模块中, 由此, 可在时钟产生 电路自校正***完成校正之后, 该电子***在每次上电后其时钟产生电 路都能提供高精度的时钟信号。
上述说明仅是本发明技术方案的概述, 为了能够更清楚了解本发明 的技术手段, 而可依照说明书的内容予以实施, 并且为了让本发明的上 述和其它目的、 特征和优点能够更明显易懂, 以下特举实施例, 并配合 附图, 详细说明如下。 附图说明
图 1 为本发明第一实施例提供的时钟产生电路自校正***的组成 图。
图 2 为本发明第二实施例提供的时钟产生电路自校正***的组成 图。
图 3为本发明第三实施例提供的时钟产生电路自校正***的校正方 法的工作流程图。 具体实施方式
下面结合附图及具体实施例对本发明作进一步详细的说明。
请参阅图 1, 本发明第一实施例提供一种时钟产生电路自校正*** 100, 其包括硬件逻辑模块 (search reg)10、 寄存器模块 (reg) 20、 时钟产 生电路模块 (osc)30及存储模块 (mem)40。
硬件逻辑模块 10的输入信号为外部参考时钟信号 ref_clk和时钟产 生电路模块 30 输出的***时钟信号 0SC_clk, 输出信号为搜索数据 nxt_reg , 搜索数据 nxt_reg传输到所述寄存器模块 20。 本实施例中, 硬 件逻辑模块 10利用一定的搜索算法, 把搜索数据 nxt_reg输出至寄存器 模块 20, 作为时钟产生电路模块 30的振荡器 (图未标示) 的配置参数, 然后监测振荡器产生的***时钟信号 osc_Clk,并通过一定的方法将*** 时钟信号 osc_clk和外部参考时钟信号 ref_clk进行比较, 直到某一个搜 索数据 nxt_reg使振荡器输出的***时钟信号 osc_Clk的频率误差满足精 度要求为止, 此时, 这个搜索数据 nxt_reg的值为校正数据 (result) , 其 传输至存储模块 40并存储于存储模块 40。即硬件逻辑模块 10循环修正 搜索数据 nxt_reg, 以校正时钟产生电路模块 30 输出的***时钟信号 osc_clk, 使***时钟信号 osc_clk 的频率误差满足精度要求, 并获取校 正数据 ( result )。
可以理解的是, 获取校正数据 (result ) 的过程中, 硬件逻辑模块 10涉及搜索数据 nxt_reg的搜索算法和频率精度比较算法。 其中, 搜索 数据 nxt_reg 的搜索算法会产生一个初始值, 然后通过外部参考时钟信 号 ref_clk和***时钟信号 osc_clk的时钟频率的比较结果, 来判断是否 需要增大或者减小搜索数据 nxt_reg 的值, 如果比较结果不满足精度要 求则进行下一次校正, 即增加或减小搜索数据 nxt_reg 产生新的搜索数 据 nxt_reg进行新一轮的搜索, 直到***时钟信号 ref_clk和外部参考时 钟信号 ref_clk的比较结果满足精度要求为止。此处, 增大或者减小搜索 数据 nxt_reg 的值可以采用二分法或者逐次加一减一操作, 具体可根据 需要进行选择。频率精度比较算法是比较外部参考时钟信号 ref_clk和系 统时钟信号 osc_Clk 的时钟频率的方法, 可以利用高频率的时钟来采低 频率时钟的上升沿或者下降沿来加一计数, 经过已知的时间后停止计 数, 比较计数器的值和预先计算好的标准值判断精度是否满足要求; 另 外一种比较方法是分别采用计数器对外部参考时钟信号 ref_clk 和*** 时钟信号 osc_Clk进行计数, 经过一段时间后停止计数, 比较两个计数 器的值是否满足精度要求,由于外部参考时钟信号 ref_clk和***时钟信 号 0SC_clk 是异步时钟信号, 所以不能直接比较两个计数器的值, 通常 会利用格雷码进行转换, 然后对格雷编码后的值进行打两排同步, 再反 编码为二进制码,然后再做大小比较,进而判断比较结果是否满足要求。
寄存器模块 20和硬件逻辑模块 10连接, 其输入信号为硬件逻辑模 块 10产生的搜索数据 nxt_reg和来自存储模块 40传输的数据 mem2re, 输出信号为寄存器数据 new_reg 和数据 re2mem。 寄存器数据 new_reg 输入到时钟产生电路模块 30, 数据 re2mem输入到存储模块 40。 本实施 例中, 寄存器模块 20 为寄存器, 其位宽可以根据需要变化, 在不同的 时刻寄存搜索数据 nxt_reg 和数据 mem2re 的值, 并输出寄存器数据 new_reg到时钟产生电路模块 30, 输出数据 re2mem到存储模块 40。
可以理解的是,寄存器数据 neW_reg为寄存器模块 20根据接收的搜 索数据 nxt_reg而产生的。
时钟产生电路模块 30和硬件逻辑模块 10及寄存器模块 20均连接, 其和硬件逻辑模块 10及寄存器模块 20构成单向循环。 时钟产生电路模 块 30的输入信号为寄存器模块 20输出的寄存器数据 neW_reg, 输出信 号为其中振荡器产生的***时钟信号 osc_clk。 ***时钟信号 osc_clk输 入至硬件逻辑模块 10。 时钟产生电路模块 30 根据不同的寄存器数据 new_reg来产生频率不同的***时钟信号 osc_clk。
存储模块 40和寄存器模块 20双向连接, 其输入信号为寄存器模块 20输出的数据 re2mem, 输出信号为数据 mem2re。 本实施例中, 所述存 储模块 40 为非易失性存储器, 可长期稳定地存储数据, 当所述存储模 块 40掉电时, 其存储的数据也不会丢失。
可以理解的是, 寄存器模块 20输出至存储模块 40的数据 re2mem 即为校正数据 result, 由此, 校正数据 result可以存储于存储模块 40。 即校正数据 result可以在存储模块 40和寄存器模块 20之间进行传输。 首次校正通过后需要把校正数据 result通过从寄存器模块 20传输到存储 模块 40, 以后每次上电时需要把校正数据 result通过从存储模块 40传 输到寄存器模块 20。 本实施例中, 校正数据 result在寄存器模块 20和 存储模块 40 之间的传输通过软件来实现。 当然, 并局限于此, 寄存器 模块 20和存储模块 40之间数据信号的传输也可以通过硬件来实现, 如 图 2所示, 本发明第二实施例提供的时钟产生电路自校正*** 200进一 步包括数据传输模块 (move control ) 50, 数据传输模块 50设置于寄存 器模块 20和存储模块 40之间, 其和寄存器模块 20及存储模块 40分别 双向连接。
本实施例中, 寄存器模块 20输出数据 re2mc到数据传输模块 50, 数据传输模块 50的输入信号即为数据 re2mc和从存储模块 40输出的数 据 me2mc, 输出信号为传输至寄存器模块 20的数据 mc2re和传输至存 储模块 40的数据 mc2me。
可以理解的是, 本实施例中, 时钟产生电路自校正*** 200通过数 据传输模块 50实现校正数据 result在存储模块 40和寄存器模块 20之间 的传输。 此时, 首次校正通过后校正数据 result通过数据传输模块 50从 寄存器模块 20 传输到存储模块 40, 并在其后每次上电时把校正数据 result通过数据传输模块 50从存储模块 40传输到寄存器模块 20。
请参阅图 3, 本发明第三实施例提供时钟产生电路自校正*** 100 的校正方法, 其包括以下步骤:
S101、 产生搜索数据。
本实施例中, 硬件逻辑模块 10产生搜索数据 nxt_reg, 并输出至寄存 器模块 20, 作为时钟产生电路模块 30中振荡器的配置参数, 再由所述寄 存器模块 20根据搜索数据 nxt_reg形成寄存器数据 neW_reg信号, 并传输给 时钟产生电路模块 30, 时钟产生电路模块 30 的振荡器输出***时钟信号 osc_clk, 并传输至硬件逻辑模块 10。
5103、 比较***时钟信号和外部参考时钟信号的频率大小。
本实施例中, 硬件逻辑模块 10比较***时钟信号 osc_clk和外部参考时 钟信号 ref_clk的频率大小。
5104、 判断频率误差是否满足精度要求。
如果***时钟信号 osc_clk和外部参考时钟信号 ref_clk的频率误差满足 精度要求则进入步骤 S105A, 否则进入步骤 S105B。
可以理解的是, 外部参考时钟信号 ref_clk由外部时钟产生器输入至硬件 逻辑模块 10。
S105A、 停止校正, 并存储校正数据。
本实施例中, 使振荡器输出的***时钟信号 osc_dk的频率相对于外 部参考时钟信号 ref_clk的频率满足精度要求的搜索数据 nxt_reg的值为校 正数据 result, 校正数据 result传输至存储模块 40进行存储。
S105B、 判断***时钟信号相对于外部参考时钟信号太快还是太慢。 本实施例中, 根据***时钟信号 osc_clk和外部参考时钟信号 ref_clk的 频率误差, 来判断***时钟信号 osc_clk相对于外部参考时钟信号 ref_clk是 太快还是太慢, 并相应地修正搜索数据 nxt_reg 的值, 如果***时钟信号 osc_clk相对于外部参考时钟信号 ref_clk太快,则进入步骤 S107A,如果*** 时钟信号 osc_clk相对于外部参考时钟信号 ref_clk太慢, 则进入步骤 S107B。 S107A、 减小搜索数据。
可以理解的是, 减小搜索数据 nxt_reg所产生的新的搜索数据 nxt_reg将 使时钟产生电路模块 30产生的***时钟信号 osc_dk接近外部参考时钟信号 ref_clk, 由此, 可以减小***时钟信号 osc_clk和外部参考时钟信号 ref_clk 的频率误差, 进而满足精度要求。
S107B、 增加搜索数据 reg。
可以理解的是, 增加搜索数据 nxt_reg所产生的新的搜索数据 nxt_reg将 使时钟产生电路模块 30产生的***时钟信号 osc_dk接近外部参考时钟信号 ref_clk, 由此, 可以减小***时钟信号 osc_clk和外部参考时钟信号 ref_clk 的频率误差, 进而满足精度要求。
S109、 延时后进入下一轮的校正。
可以理解的是, 由于时钟产生电路模块 30 在得到新的寄存器数据 new_reg 值后, 需要一段时间才能稳定下来, 由此, 在得到新的寄存器数据 new_reg值后, 需要等待一段时间, 即延时后再开始产生 nxt_reg信号。
可以理解的是, 具体的延迟时间对不同的时钟产生电路存在不同, 需要 通过仿真来确定。
可以理解的是,本发明第二实施例提供的时钟产生电路自校正*** 200 同样可以采用校正方法。
相较于现有技术, 本发明提供的时钟产生电路自校正*** 100 (和 时钟产生电路自校正*** 200 ) 通过其中的硬件逻辑模块 10、 寄存器模 块 20和时钟产生电路模块 30, 利用校正方法, 可以自动将相应电子系 统中的时钟产生电路的误差降低到该电子***所要求的误差精度范围 内, 并将校正值保存在存储模块 40 中, 由此, 可在时钟产生电路自校 正*** 100完成校正之后, 该电子***在每次上电后时钟产生电路都能 提供高精度的时钟信号。 以上所述, 仅是本发明的实施例而已, 并非对本发明作任何形式上 的限制, 虽然本发明已以实施例揭露如上, 然而并非用以限定本发明, 任何熟悉本专业的技术人员, 在不脱离本发明技术方案范围内, 当可利 用上述揭示的技术内容作出些许更动或修饰为等同变化的等效实施例, 但凡是未脱离本发明技术方案内容, 依据本发明的技术实质对以上实施 例所作的任何简单修改、 等同变化与修饰, 均仍属于本发明技术方案的 范围内。 工业实用性
本发明实施例的时钟产生电路自校正***, 通过其中的硬件逻辑模 块、 寄存器模块和时钟产生电路模块, 利用校正方法, 可以自动将相应 电子***中的时钟产生电路的误差降低到该电子***所要求的误差精 度范围内, 并将校正值保存在其中的存储模块中, 由此, 可在时钟产生 电路自校正***完成校正之后, 该电子***在每次上电后其时钟产生电 路都能提供高精度的时钟信号。

Claims

WO 2014/114146 权 利 要 求 书 PCT/CN2013/088846
1. 一种时钟产生电路自校正***, 包括:
硬件逻辑模块, 其接收外部参考时钟信号;
寄存器模块, 其和所述硬件逻辑模块连接;
时钟产生电路模块, 其和所述硬件逻辑模块及所述寄存器模块连 接; 及
存储模块, 其和所述寄存器模块双向连接;
所述硬件逻辑模块产生搜索数据并传输至所述寄存器模块作为所 述时钟产生电路模块中振荡器的配置参数, 所述寄存器模块根据所述搜 索数据输出寄存器数据至所述时钟产生电路模块, 所述时钟产生电路模 块产生***时钟信号并传输至所述硬件逻辑模块, 所述硬件逻辑模块将 所述***时钟信号和所述外部参考时钟信号进行比较, 当所述振荡器输 出的时钟频率不满足精度要求时, 所述硬件逻辑模块对所述搜索数据进 行校正产生新的搜索数据并进行下一轮校正, 直至所述振荡器输出的时 钟频率满足精度要求时, 所述硬件逻辑模块停止校正, 且此时搜索数据 存储于所述存储模块。
2. 如权利要求 1所述的时钟产生电路自校正***, 其中, 所述硬件 逻辑模块对所述搜索数据进行校正包括增加所述搜索数据的值和减少 所述搜索数据的值。
3. 如权利要求 1所述的时钟产生电路自校正***, 其中, 所述寄存 器模块为可变位宽的寄存器, 其在不同的时刻寄存所述搜索数据。
4. 如权利要求 1所述的时钟产生电路自校正***, 其中, 所述存储 模块为非易失性存储器。
5. 如权利要求 1所述的时钟产生电路自校正***, 其中, 所述时钟 产生电路自校正***包括数据传输模块, 所述数据传输模块设置于所述 寄存器模块和所述存储模块之间, 其和所述寄存器模块及所述存储模块 分别双向连接, 所述存储模块通过所述数据传输模块和所述寄存器模块 双向连接。
6. 如权利要求 1所述的时钟产生电路自校正***, 其中, 所述外部 参考时钟信号由外部时钟产生器输入至所述硬件逻辑模块。
7. 一种时钟产生电路自校正***的校正方法, 包括以下步骤: 产生搜索数据;
比较***时钟信号和外部参考时钟信号的频率大小, 如果频率误差满足 精度要求则停止校正并存储校正数据, 否则判断所述***时钟信号相对于所 述外部参考时钟信号太快还是太慢;
如果所述***时钟信号相对于所述外部参考时钟信号太快, 则减小所述 搜索数据, 如果所述***时钟信号相对于所述外部参考时钟信号太慢, 则增 加所述搜索数据;
延时后进入下一轮的校正。
8. 如权利要求 7 所述的时钟产生电路自校正***的校正方法, 其 中, 所述搜索数据由硬件逻辑模块产生并传输至寄存器模块作为时钟产 生电路模块中振荡器的配置参数。
9. 如权利要求 7 所述的时钟产生电路自校正***的校正方法, 其 中, 所述校正数据为使时钟产生电路模块中振荡器输出的***时钟信号 的频率相对于所述外部参考时钟信号的频率满足精度要求的搜索数据 的值。
10. 如权利要求 7所述的时钟产生电路自校正***的校正方法, 其 中, 所述外部参考时钟信号由外部时钟产生器输入至所述硬件逻辑模块。
PCT/CN2013/088846 2013-01-28 2013-12-09 时钟产生电路自校正***及其校正方法 WO2014114146A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310032839.9 2013-01-28
CN201310032839.9A CN103092258B (zh) 2013-01-28 2013-01-28 时钟产生电路自校正***及其校正方法

Publications (1)

Publication Number Publication Date
WO2014114146A1 true WO2014114146A1 (zh) 2014-07-31

Family

ID=48204951

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/088846 WO2014114146A1 (zh) 2013-01-28 2013-12-09 时钟产生电路自校正***及其校正方法

Country Status (2)

Country Link
CN (1) CN103092258B (zh)
WO (1) WO2014114146A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103092258B (zh) * 2013-01-28 2016-08-24 深圳市汇顶科技股份有限公司 时钟产生电路自校正***及其校正方法
CN104184470B (zh) * 2014-09-01 2017-04-19 福州瑞芯微电子股份有限公司 Pll修改自动复位装置及方法
WO2019061077A1 (zh) * 2017-09-27 2019-04-04 深圳市汇顶科技股份有限公司 脉宽修正电路、脉宽修正方法及电子设备
CN110729984B (zh) * 2018-07-17 2023-12-22 中芯国际集成电路制造(北京)有限公司 一种时钟信号生成电路及电子设备
CN110729985B (zh) * 2018-07-17 2023-04-25 中芯国际集成电路制造(北京)有限公司 一种时钟信号生成电路及电子设备
CN109394193B (zh) * 2018-11-27 2021-04-23 西安交大辰方科技有限公司 一种动态血压记录器实时时钟校准的方法
CN110492848A (zh) * 2019-08-15 2019-11-22 成都锐成芯微科技股份有限公司 Rc振荡器的数字调整装置及其调整方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101170349A (zh) * 2006-10-23 2008-04-30 大唐移动通信设备有限公司 实时时钟的校准电路
CN101436086A (zh) * 2008-11-20 2009-05-20 四川登巅微电子有限公司 一种初始化产生稳定片内时钟的***
CN102195646A (zh) * 2010-03-18 2011-09-21 上海华虹Nec电子有限公司 时钟振荡器自动校准方法及电路
CN103092258A (zh) * 2013-01-28 2013-05-08 深圳市汇顶科技股份有限公司 时钟产生电路自校正***及其校正方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI273367B (en) * 2004-10-01 2007-02-11 Fortune Semiconductor Corp Method and device for calibrating monitor clocks

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101170349A (zh) * 2006-10-23 2008-04-30 大唐移动通信设备有限公司 实时时钟的校准电路
CN101436086A (zh) * 2008-11-20 2009-05-20 四川登巅微电子有限公司 一种初始化产生稳定片内时钟的***
CN102195646A (zh) * 2010-03-18 2011-09-21 上海华虹Nec电子有限公司 时钟振荡器自动校准方法及电路
CN103092258A (zh) * 2013-01-28 2013-05-08 深圳市汇顶科技股份有限公司 时钟产生电路自校正***及其校正方法

Also Published As

Publication number Publication date
CN103092258A (zh) 2013-05-08
CN103092258B (zh) 2016-08-24

Similar Documents

Publication Publication Date Title
WO2014114146A1 (zh) 时钟产生电路自校正***及其校正方法
US10853304B2 (en) System on chip including clock management unit and method of operating the system on chip
TWI445315B (zh) 自動校正頻率之頻率校正電路及其方法
WO2021129689A1 (zh) 数据位宽转换方法和装置
US8782300B2 (en) Electronic apparatus
JP5541234B2 (ja) トランシーバ
WO2019136595A1 (zh) 处理i2c总线死锁的方法、电子设备和通信***
TW201710921A (zh) 在共同實體介面上之動態資料鏈結選擇
CN103116322B (zh) 微调可调振荡器以匹配can总线的方法及can总线通信控制器
US20090150706A1 (en) Wrapper circuit for globally asynchronous locally synchronous system and method for operating the same
TWI727075B (zh) 半導體裝置
CN103577378B (zh) 一种全双工异步串行通信方法
CN109687867A (zh) 一种无晶振usb设备时钟校准方法及校准电路
WO2019165954A1 (zh) 一种数据位宽转换的方法及装置、计算机可读存储介质
TWI586107B (zh) Timing Error Detection and Correction Device and Its Normal Timing Design Method
TW201227320A (en) Throttling integrated link
CN105340223A (zh) 确定can总线连接单元的内部延迟时间的设备和测量方法
US11275708B2 (en) System on chip including clock management unit and method of operating the system on chip
CN115202496A (zh) 导航***及其时钟校准方法
CN111262559B (zh) 具有校正功能的延迟线电路及其校正方法
US8283983B2 (en) Frequency calibration device and method for programmable oscillator
CN103561008A (zh) 一种传输协议解码方法、装置及传输协议解码芯片
CN204065907U (zh) 一种mcu芯片分频时钟校正装置
US10181353B2 (en) Memory control circuit and method thereof
US8907730B2 (en) Frequency calibration device and method for programmable oscillator

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 06/10/2015)

122 Ep: pct application non-entry in european phase

Ref document number: 13872507

Country of ref document: EP

Kind code of ref document: A1