JP6500550B2 - Timer correction device, timer correction method and timer correction program - Google Patents

Timer correction device, timer correction method and timer correction program Download PDF

Info

Publication number
JP6500550B2
JP6500550B2 JP2015065386A JP2015065386A JP6500550B2 JP 6500550 B2 JP6500550 B2 JP 6500550B2 JP 2015065386 A JP2015065386 A JP 2015065386A JP 2015065386 A JP2015065386 A JP 2015065386A JP 6500550 B2 JP6500550 B2 JP 6500550B2
Authority
JP
Japan
Prior art keywords
clock
value
timer
unit
measurement
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
JP2015065386A
Other languages
Japanese (ja)
Other versions
JP2016184366A (en
Inventor
祐樹 丹野
祐樹 丹野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP2015065386A priority Critical patent/JP6500550B2/en
Publication of JP2016184366A publication Critical patent/JP2016184366A/en
Application granted granted Critical
Publication of JP6500550B2 publication Critical patent/JP6500550B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Electric Clocks (AREA)

Description

本発明は、タイマ補正装置、タイマ補正方法及びタイマ補正プログラムに関する。   The present invention relates to a timer correction device, a timer correction method, and a timer correction program.

情報機器内の時計の機能は情報処理を行う基本の動作、オペレーティングシステム内のさまざまな定期処理に使用されている。また、ファイルの日時管理、マルチタスクやタイムシェアリングシステムのプロセスを切り換える起点としてこの時計が用いられている。さらに、周辺機器等のデバイスのドライバなどが当該機器の故障により処理要求がタイムアウトしたと判断するために、この時計が用いられている。したがって、時計の時刻を正確に保つことが求められる。   The function of the clock in the information device is used for basic operations to process information and various periodic processes in the operating system. In addition, this clock is used as a starting point to switch processes of file date and time management, multitasking and time sharing system. Furthermore, this clock is used to determine that the processing request has timed out due to a failure of the device or the like of a device such as a peripheral device. Therefore, it is required to keep the clock time accurate.

例えば、特許文献1には、システムのクロックの周波数を変更できる情報処理装置において、システムのクロックの周波数を切り替える前のパルスの計数値と周波数を切り替えた後のパルスの計数値との比を求め、これに或る定数を乗算してクロック周波数を変更した後の計数値を補正することで時計を補正する技術が記載されている。   For example, in Patent Document 1, in an information processing apparatus capable of changing the clock frequency of the system, the ratio of the pulse count value before switching the system clock frequency to the pulse count value after switching the frequency is obtained There has been described a technique for correcting a clock by correcting the count value after changing the clock frequency by multiplying this by a certain constant.

特許文献2には、第1のクロックのカウントし、クロックパルス数を測定し、入力クロックが第1のクロックから第2のクロックに変更された際、第1のクロックのパルス数と第2のクロックのパルス数との比を基にしてタイマカウンタの閾値を補正する。そして、次回のタイマ割込みからは、補正された新タイマカウンタの閾値を用いることで、タイマ割込みが発生する頻度を入力クロック変更前と等しくし、タイマ割込み発生頻度を入力クロックの切替え前と同一になるよう調整する技術が記載されている。   In Patent Document 2, the first clock is counted, the number of clock pulses is measured, and when the input clock is changed from the first clock to the second clock, the number of pulses of the first clock and the second clock The threshold value of the timer counter is corrected based on the ratio of the number of pulses of the clock. Then, from the next timer interrupt, by using the corrected threshold value of the new timer counter, the frequency at which the timer interrupt occurs is made equal to that before the input clock change, and the timer interrupt occurrence frequency is the same as before the input clock switching. Techniques to make adjustments are described.

特許文献3には、システムにクロックを供給する第1のクロックの周期を、第1のクロックに比較してより精度の高い第2のクロックを用いて予め測定し、得られた測定値を用いて第1のクロックで動作させた時計の時間を調整する技術が記載されている。   In Patent Document 3, the period of a first clock that supplies a clock to a system is measured in advance using a second clock that is more accurate than the first clock, and the obtained measurement value is used. A technique for adjusting the time of a clock operated by a first clock is described.

特許文献4には、実クロックを受け取って稼働するタイマを、所定のクロック変換係数に比例させた仮想タイマに変換し、変換された仮想タイマのクロックによりアプリケーションを実行させることで、供給するクロックの変更による時間が乱れる影響をソフト的に吸収する技術が記載されている。   According to Patent Document 4, a timer that receives and operates an actual clock is converted into a virtual timer proportional to a predetermined clock conversion coefficient, and an application is executed by using the clock of the converted virtual timer to supply A technique is described that softly absorbs the time-varying effects of changes.

特開平08−292822号公報Unexamined-Japanese-Patent No. 08-292822 gazette 特開2013−117785号公報JP, 2013-117785, A 特開平10−049251号公報Japanese Patent Application Laid-Open No. 10-049251 特開2007−034672号公報Japanese Patent Application Publication No. 2007-034672

特許文献1に記載の技術は、 クロック周波数の変更に伴ってその都度適切なソフトウェアタイマ値に設定することができるがクロック周波数を変更する過程でパルス数を増減することで生じるカウントアップ過不足、すなわち時刻がずれることを考慮していない。その為、特許文献1の技術は、タイマ値を調整することでインテリジェントタイマの発生間隔はクロック周波数変更前と等しくできるが、カウント過不足数の累積値を保存する手段が無く、インテリジェントタイマの発生タイミング、すなわち時刻をクロック周波数切り替え前と等しくする手段が無い。その為、特許文献1の技術はタイマ発生タイミングをクロック周波数変更前と等しくすることが出来ないという問題がある。   The technology described in Patent Document 1 can set an appropriate software timer value each time the clock frequency is changed, but the count-up excess / shortage that occurs by increasing or decreasing the number of pulses in the process of changing the clock frequency, That is, it does not consider that time shifts. Therefore, in the technology of Patent Document 1, although the generation interval of the intelligent timer can be made equal to that before the clock frequency change by adjusting the timer value, there is no means for storing the accumulated value of the count excess and deficiency, and the generation of the intelligent timer There is no means to equalize the timing, i.e. the time, before the clock frequency switch. Therefore, the technique of Patent Document 1 has a problem that the timer generation timing can not be equal to that before changing the clock frequency.

特許文献2に記載の技術は、タイマ割込み発生頻度を入力クロック切り替え前と同一になるよう調整できる。この時、入力クロックが高速になった場合はタイマ閾値が増加し、逆に入力クロックが低速になった場合にタイマ閾値が減少する。しかし特許文献2の技術においては、タイマ閾値補正によってタイマ割込み発生頻度はクロック切り替え前と同一頻度に調整されるが、タイマ割込み発生タイミングがクロックを切り替える前のタイマ割込み発生タイミングと一致しないという問題がある。   The technique described in Patent Document 2 can adjust the timer interrupt occurrence frequency to be the same as before input clock switching. At this time, the timer threshold increases when the input clock speed increases, and the timer threshold decreases when the input clock speed decreases. However, in the technique of Patent Document 2, although the timer interrupt frequency adjusts the timer interrupt occurrence frequency to the same frequency as before the clock switching by timer threshold correction, there is a problem that the timer interrupt occurrence timing does not coincide with the timer interrupt occurrence timing before switching the clock. is there.

特許文献3及び特許文献4に記載の技術には、クロック周期の精度を高める技術が記載されているが、クロックを切り替える前と後のタイマ割込み発生タイミングを一致させることが出来ないという問題がある。   Although the techniques described in Patent Document 3 and Patent Document 4 describe techniques for increasing the accuracy of the clock cycle, there is a problem that the timer interrupt generation timings before and after switching the clock can not be matched. .

本発明の目的は、上述した問題点を解決するタイマ補正装置、タイマ補正方法及びタイマ補正プログラムを提供することにある。   An object of the present invention is to provide a timer correction device, a timer correction method and a timer correction program which solve the above-mentioned problems.

具体的に、本発明は、システムクロックの周波数変更の影響で乱れてしまう時計が出力するパルスの周期及びそのタイミングを、予め定めた基準タイミングに一致させることを主たる目的とする。   Specifically, the main object of the present invention is to make the period of the pulse output from the timepiece disturbed by the change of the system clock frequency and the timing thereof coincide with a predetermined reference timing.

本発明による一形態のタイマ補正装置は、基準となる周波数のクロックを出力する第1のクロック発振手段と、前記第1のクロック発振手段とは異なる周波数を出力する第2のクロック発振手段と、第1のクロックと第2のクロックのいずれか一つを選択して、選択したクロックをタイマ発生部に出力する入力クロック選択部と、基準クロックでカウントするパルス数を測定する入力クロック測定部と、前記クロック測定部がカウントする各周期のパルス数を比較して、前記パルス数の過不足の累積を行うクロック過不足累積部と、前記入力クロック測定部が測定したパルス数の比と差を算出するパルス数比率算出部と、前記パルス数の比と前記差とからカウンタが割り込み信号を出力する条件の閾値を与えるタイマ閾値補正部と、前記入力クロック選択部からのクロックでカウントし、前記閾値による前記割り込み信号を出力するタイマ発生部と、を備える。   According to one aspect of the present invention, there is provided a timer correction apparatus comprising: first clock oscillation means for outputting a clock having a reference frequency; and second clock oscillation means for outputting a frequency different from the first clock oscillation means. An input clock selection unit that selects one of the first clock and the second clock and outputs the selected clock to the timer generation unit; and an input clock measurement unit that measures the number of pulses counted by the reference clock And comparing the number of pulses in each cycle counted by the clock measurement unit and calculating the ratio of the number of pulses measured by the input clock measurement unit to the difference between the number of pulses measured by the input clock measurement unit. A pulse number ratio calculation unit to be calculated; a timer threshold correction unit to give a threshold of a condition under which the counter outputs an interrupt signal from the ratio of the pulse number and the difference; Counting the clock from the lock selector, and a timer generating unit which outputs the interrupt signal by the threshold.

入力クロック測定部は、第1のクロックを受け取り、前記タイマ発生部が出力した第1の割り込み信号と次の周期である第2の記割り込み信号との間に受け取った前記第1のクロックのパルス数を計側して第1の測定値とし、前記第1の測定値を測定した後の測定値を第2の測定値として、前記第1の測定値と前記第2の測定値とをパルス数比率算出部に出力し、前記クロック過不足累積部は、前記第1の測定値と前記第2の測定値との差に前の周期で得られた第1の累積値とを加算して第2の累積値を求め、次の周期の加算で、前記第1の累積値に前記第2の累積値を代入して再帰的に算出した前記第2の累積値をクロック過不足数として前記タイマ閾値補正部に出力し、前記パルス数比率算出部は、前記第1の測定値を記憶する第1の記憶部と、前記第2の測定値を記憶する第2の記憶部と、前記第1の測定値と前記第2の測定値が一致するか否かの判断情報と、前記第1の測定値と前記第2の測定値との比と、をタイマ閾値補正部に出力する判断部と、を含み、前記タイマ閾値補正部は、前記パルス数比率算出部の前記判断部から、前記判断情報と前記比の情報を受け取り、タイマ発生部のカウンタの前記閾値を算出して当該閾値を記憶し、当該閾値をタイマ発生部に出力し、前記タイマ発生部は、前記入力クロック選択部が出力するクロックでカウントを行い、カウント値を前記タイマ閾値補正部が出力した閾値に設定して当該カウンタをカウントダウンさせて、カウンタが0になった時に、前記タイマ発生部から、前記第1の割り込み信号及び前記第2の割り込み信号と、を前記クロック測定部及び外部装置に出力する。   The input clock measurement unit receives the first clock, and pulses of the first clock received between the first interrupt signal output from the timer generation unit and the second interrupt signal that is the next cycle. The number is used as a first measurement value, and the measurement value after measuring the first measurement value is used as a second measurement value to pulse the first measurement value and the second measurement value. The clock excess / loss accumulating unit adds the first accumulated value obtained in the previous cycle to the difference between the first measured value and the second measured value. A second cumulative value is obtained, and the second cumulative value recursively calculated by substituting the second cumulative value into the first cumulative value by addition of the next cycle is used as the clock excess / shortage number. A timer threshold correction unit outputs the first measurement value, and the pulse number ratio calculation unit outputs the first measurement value. A second storage unit for storing the second measured value, determination information as to whether the first measured value matches the second measured value, the first measured value, and A determination unit that outputs a ratio to the second measurement value to a timer threshold value correction unit, the timer threshold value correction unit including the determination information from the determination unit of the pulse number ratio calculation unit; Information of the ratio is received, the threshold of the counter of the timer generation unit is calculated, the threshold is stored, and the threshold is output to the timer generation unit, the timer generation unit being a clock output by the input clock selection unit The count value is set to the threshold value output by the timer threshold value correction unit to count down the counter, and when the counter reaches 0, the timer generation unit generates the first interrupt signal and the first interrupt signal. With 2 interrupt signals Is output to the clock measuring unit and an external device.

本発明による一形態のタイマ補正方法は、基準となる周波数である第1のクロックを発振し、前記第1のクロックとは異なる周波数の第2のクロックを発振させ、第1のクロックを受け取り、第1の割り込み信号と次の周期である第2の記割り込み信号との間に受け取った前記第1のクロックのパルス数を測定して第1の測定値とし、前記第1の測定値を測定した後の測定値を第2の測定値として、前記第1の測定値と前記第2の測定値とをパルス数比率算出部に出力し、前記第1の測定値と前記第2の測定値との差に前の周期で得られた第1の累積値とを加算して第2の累積値を求め、次の周期の加算で、前記第1の累積値に前記第2の累積値を代入して再帰的に算出した前記第2の累積値を出力し、前記第1の測定値と前記第2の測定値が一致するか否かの判断情報と、前記第1の測定値と前記第2の測定値との比を出力し、前記判断情報と前記比の情報を受け取り、カウンタの前記閾値を算出して当該閾値を記憶し、当該閾値を出力し、前記入力クロック選択部が出力するクロックでカウントを行い、カウント値を閾値に設定して当該カウンタをカウントダウンさせて、カウンタが0になった時に、前記タイマ発生部から、前記第1の割り込み信号及び前記第2の割り込み信号と、を前記クロック測定部及び外部装置に出力する。   The timer correction method according to one aspect of the present invention oscillates a first clock which is a reference frequency, oscillates a second clock of a frequency different from the first clock, and receives the first clock. The number of pulses of the first clock received between the first interrupt signal and the second interrupt signal which is the next cycle is measured to be a first measured value, and the first measured value is measured. The first measured value and the second measured value are output to the pulse number ratio calculation unit as the second measured value after the measurement, and the first measured value and the second measured value are output. The second accumulated value is obtained by adding the first accumulated value obtained in the previous cycle to the difference between and the second accumulated value, and the second accumulated value is added to the first accumulated value by the addition of the next cycle. Outputting the second accumulated value recursively calculated by substitution, and outputting the first measured value and the second measured value The determination information as to whether they match and the ratio of the first measurement value to the second measurement value is output, the determination information and the information of the ratio are received, and the threshold value of the counter is calculated The threshold is stored, the threshold is output, the clock is output from the input clock selection unit, counting is performed, the count value is set as the threshold, the counter is counted down, and the timer becomes zero. The generation unit outputs the first interrupt signal and the second interrupt signal to the clock measurement unit and the external device.

本発明による一形態のタイマ補正プログラムは、基準となる周波数である第1のクロックを発振させ、前記第1のクロックとは異なる周波数の第2のクロックを発振させ、第1のクロックを受け取り、第1の割り込み信号と次の周期である第2の記割り込み信号との間に受け取った前記第1のクロックのパルス数を測定して第1の測定値とし、前記第1の測定値を測定した後の測定値を第2の測定値として、前記第1の測定値と前記第2の測定値とをパルス数比率算出部に出力し、前記第1の測定値と前記第2の測定値との差に前の周期で得られた第1の累積値とを加算して第2の累積値を求め、次の周期の加算で、前記第1の累積値に前記第2の累積値を代入して再帰的に算出した前記第2の累積値を出力し、前記第1の測定値と前記第2の測定値が一致するか否かの判断情報と、前記第1の測定値と前記第2の測定値との比を出力し、前記判断情報と前記比の情報を受け取り、カウンタの前記閾値を算出して当該閾値を記憶し、当該閾値を出力し、前記入力クロック選択部が出力するクロックでカウントを行い、カウント値を閾値に設定して当該カウンタをカウントダウンさせて、カウンタが0になった時に、前記タイマ発生部から、前記第1の割り込み信号及び前記第2の割り込み信号と、を前記クロック測定部及び外部装置に出力する処理をコンピュータに実行させる。   According to one aspect of the present invention, a timer correction program oscillates a first clock which is a reference frequency, oscillates a second clock of a frequency different from the first clock, and receives the first clock. The number of pulses of the first clock received between the first interrupt signal and the second interrupt signal which is the next cycle is measured to be a first measured value, and the first measured value is measured. The first measured value and the second measured value are output to the pulse number ratio calculation unit as the second measured value after the measurement, and the first measured value and the second measured value are output. The second accumulated value is obtained by adding the first accumulated value obtained in the previous cycle to the difference between and the second accumulated value, and the second accumulated value is added to the first accumulated value by the addition of the next cycle. Outputting the second accumulated value recursively calculated by substitution, and outputting the first measured value and the second measured value The determination information as to whether the measured values match or not and the ratio of the first measured value to the second measured value are output, the determination information and the information of the ratio are received, and the threshold value of the counter is calculated. Stores the threshold, outputs the threshold, counts with the clock output from the input clock selector, sets the count value as the threshold, counts down the counter, and the counter reaches 0. And causing the computer to execute a process of outputting the first interrupt signal and the second interrupt signal from the timer generation unit to the clock measurement unit and an external device.

本発明は、周波数の異なる複数のクロック発振装置を搭載し、その何れか1つを選択してタイマに供給する場合に、クロックの周波数が任意に切替わっても、タイマが出力する信号を、基準となるクロックにより生成したタイマの周期及び信号が変化するタイミングを一致させることが出来る。   According to the present invention, when a plurality of clock oscillators having different frequencies are mounted and one of them is selected and supplied to the timer, the signal output by the timer is obtained even if the clock frequency is arbitrarily switched. The period of the timer generated by the reference clock and the timing at which the signal changes can be matched.

本発明の第1の実施の形態におけるタイマ補正装置1のブロック図である。It is a block diagram of timer correction device 1 in a 1st embodiment of the present invention. 本発明のタイマ補正装置1の動作を示すフロー図である。It is a flowchart which shows operation | movement of the timer correction apparatus 1 of this invention. 本発明のタイマ補正装置1の動作のタイミングチャート図である。It is a timing chart figure of operation of timer amendment device 1 of the present invention. 本発明のタイマ補正装置1の動作のタイミングチャート図である。It is a timing chart figure of operation of timer amendment device 1 of the present invention. 本発明のタイマ補正装置1の状態を規定する数値の計算式を示す図である。It is a figure which shows the calculation formula of the numerical value which prescribes | regulates the state of the timer correction apparatus 1 of this invention. 本発明のタイマ補正装置1の状態を規定する数値の計算式を示す図である。It is a figure which shows the calculation formula of the numerical value which prescribes | regulates the state of the timer correction apparatus 1 of this invention.

[第1の実施の形態]
本発明の第1の実施の形態について図面を参照して説明する。
図1は、本発明の第1の実施の形態のタイマ補正装置1を示す図である。
First Embodiment
A first embodiment of the present invention will be described with reference to the drawings.
FIG. 1 is a diagram showing a timer correction device 1 according to a first embodiment of this invention.

タイマ補正装置1は、第1のクロック発振部10と、第2のクロック発振部11と、クロック測定部13と、入力クロック選択部12と、パルス数比率算出部14と、クロック過不足累積部15と、タイマ閾値補正部16と、タイマ発生部17と、を備えている。   The timer correction device 1 includes a first clock oscillation unit 10, a second clock oscillation unit 11, a clock measurement unit 13, an input clock selection unit 12, a pulse number ratio calculation unit 14, and a clock excess / deficiency accumulation unit A timer threshold correction unit 16 and a timer generation unit 17 are provided.

パルス数比率算出部14は、第1の記憶部3と第2の記憶部4と判断部5を含む。   The pulse number ratio calculation unit 14 includes a first storage unit 3, a second storage unit 4, and a determination unit 5.

第1のクロック発振部10は、クロック測定部13と入力クロック選択部12に接続される。第2のクロック発振部11は、入力クロック選択部12に接続される。第1のクロック発振器10及び第2のクロック発振器11は、2以上の任意の個数を搭載することが可能である。また、第1のクロック発振器10及び第2のクロック発振器11の周波数が可変できることでもよい。   The first clock oscillation unit 10 is connected to the clock measurement unit 13 and the input clock selection unit 12. The second clock oscillator 11 is connected to the input clock selector 12. The first clock oscillator 10 and the second clock oscillator 11 can be mounted with any number of two or more. Further, the frequencies of the first clock oscillator 10 and the second clock oscillator 11 may be variable.

入力クロック選択部12は、第1のクロック発振部10あるいは第2のクロック発振部11のいずれかのパルスを選択して、タイマ発生部17に供給する。タイマ補正装置1の初期状態では第1のクロック発振部10が選択されているとする。   The input clock selection unit 12 selects either the pulse of the first clock oscillation unit 10 or the second clock oscillation unit 11 and supplies the pulse to the timer generation unit 17. In the initial state of the timer correction device 1, it is assumed that the first clock oscillation unit 10 is selected.

パルス数比率算出部14およびクロック過不足累積部15は、タイマ閾値補正部16に接続される。パルス数比率算出部14はクロック過不足累積部15に接続される。クロック測定部13はパルス数比率算出部14に接続される。   The pulse number ratio calculation unit 14 and the clock excess / deficiency accumulation unit 15 are connected to the timer threshold correction unit 16. The pulse number ratio calculation unit 14 is connected to the clock excess / deficiency accumulation unit 15. The clock measurement unit 13 is connected to the pulse number ratio calculation unit 14.

タイマ閾値補正部16はタイマ発生部17に接続される。タイマ閾値補正部16が補正タイマ閾値110をタイマ発生部17に出力する。タイマ発生部17は、入力クロック選択部12から受け取ったクロックをカウントして、予め定めた閾値に等しくなると割り込み信号100を出力する。タイマ発生部17から出力された割り込み信号100は、クロック測定部13及び外部装置に供給される。外部装置は、コンピュータ等の情報処理装置である。本発明は、図1の構成に限定されるものではない。   The timer threshold correction unit 16 is connected to the timer generation unit 17. The timer threshold correction unit 16 outputs the correction timer threshold 110 to the timer generation unit 17. The timer generation unit 17 counts the clock received from the input clock selection unit 12 and outputs an interrupt signal 100 when it is equal to a predetermined threshold. The interrupt signal 100 output from the timer generation unit 17 is supplied to the clock measurement unit 13 and an external device. The external device is an information processing device such as a computer. The present invention is not limited to the configuration of FIG.

タイマ補正装置1の動作を図2に示すフローチャートを用いて説明する。   The operation of the timer correction device 1 will be described using the flowchart shown in FIG.

第1のクロック発振部10及び第2のクロック発振部11が電源の投入やオペレータ等の操作により起動されて各々の周波数で発振を開始する(S10)。   The first clock oscillator 10 and the second clock oscillator 11 are activated by turning on the power or by the operation of the operator or the like to start oscillation at each frequency (S10).

第1のクロック発振部10及び第2のクロック発振部11の信号は、入力クロック選択部12に出力される。入力クロック選択部12は、いずれか1つの信号を選択し、タイマ発生部17に供給する(S20)。   The signals of the first clock oscillator 10 and the second clock oscillator 11 are output to the input clock selector 12. The input clock selection unit 12 selects any one signal and supplies it to the timer generation unit 17 (S20).

クロック測定部13が第1のクロック発振部10からのクロックの測定を開始する(S30)。   The clock measurement unit 13 starts measurement of the clock from the first clock oscillation unit 10 (S30).

一方タイマ発生部17は、入力クロック選択部12が選択したクロックを基にカウントを行う。タイマ発生部17は、タイマ発生部17のカウント数が、予め設定したタイマ閾値に達した時、タイマ割込み信号100を出力する(S40)。   On the other hand, the timer generation unit 17 performs counting based on the clock selected by the input clock selection unit 12. The timer generation unit 17 outputs a timer interrupt signal 100 when the count number of the timer generation unit 17 reaches a preset timer threshold (S40).

ここで、本発明の第1の実施の形態のタイマ補正装置1において電源投入後に行われる初期化段階を経て定常作状態になった時点のクロック測定部13によるパルス数の測定値をX0とする。X0はパルス数比率算出部14に備えられた第1の記憶部3に記憶される。また、X0の観測が終了し、第1の記憶部3にX0が記憶された後に、同じくクロック測定部13により測定したパルス数の測定値をXnとする。第2の記憶部4がXnを記憶する。また、Xnは、判断部5およびクロック過不足部15に伝達されて、さらにクロック過不足部15からタイマ閾値補正部16に伝達される。なお引数nは割り込み信号100と次に発生する割り込み信号100との間の状態を一意に区別する為に付与した整数である。例えば、タイマ補正装置が動作中のある時点を状態0と定めた場合、この状態において、クロック測定部13のパルス数の測定値はX0である。同様に、状態0から状態1に当該タイマ補正装置の動作が遷移した場合のクロック測定部13のパルス数の測定値はX1である。したがって、状態が順次遷移して状態nにおける測定値はXnになる。   Here, in the timer correction device 1 according to the first embodiment of the present invention, the measured value of the number of pulses by the clock measurement unit 13 at the time of steady state after the initialization step performed after power on is taken as X0. . X 0 is stored in the first storage unit 3 provided in the pulse number ratio calculation unit 14. Further, after the observation of X0 is completed and X0 is stored in the first storage unit 3, the measured value of the number of pulses similarly measured by the clock measurement unit 13 is set as Xn. The second storage unit 4 stores Xn. Further, Xn is transmitted to the determination unit 5 and the clock excess / shortage unit 15, and is further transmitted from the clock excess / shortage unit 15 to the timer threshold correction unit 16. The argument n is an integer given to uniquely distinguish the state between the interrupt signal 100 and the interrupt signal 100 generated next. For example, when a certain point in time when the timer correction device is operating is defined as state 0, in this state, the measured value of the number of pulses of the clock measurement unit 13 is X0. Similarly, the measured value of the number of pulses of the clock measurement unit 13 when the operation of the timer correction device transitions from state 0 to state 1 is X1. Therefore, the states sequentially transition and the measured value in the state n becomes Xn.

タイマ発生部17のカウント数が予め設定した閾値に達した時点で、タイマ発生部17が割り込み信号100を出力し、クロック測定部13に伝達する(S50)。   When the count number of the timer generation unit 17 reaches a preset threshold value, the timer generation unit 17 outputs the interrupt signal 100 and transmits it to the clock measurement unit 13 (S50).

クロック測定部13が割り込み信号100を受け付けるまでにカウントした数値Xnを読出してパルス数比率算出部14に出力する(S60)。パルス数比率算出部16が受け取ったXnを第2の記憶部4に記憶する。   The numerical value Xn counted until the clock measurement unit 13 receives the interrupt signal 100 is read and output to the pulse number ratio calculation unit 14 (S60). The pulse number ratio calculation unit 16 stores the received Xn in the second storage unit 4.

判断部5は、第1の記憶部3からX0と、第2の記憶部4からXnと、を読み出す。判断部5は、X0=Xnであるか否かの判断結果をタイマ閾値補正部16に出力する。判断部5が、X0とXnとの比を算出して、タイマ閾値補正部16に出力する(S70)。   The determination unit 5 reads X0 from the first storage unit 3 and Xn from the second storage unit 4. Determination unit 5 outputs the determination result as to whether or not X0 = Xn to timer threshold value correction unit 16. The determination unit 5 calculates the ratio between X0 and Xn, and outputs the ratio to the timer threshold value correction unit 16 (S70).

X0=Xnである場合(S70=Yes)、タイマ閾値補正部16は、閾値を算出する為の(2)式(後述)に従って、補正タイマ閾値110を算出する(S80)。   If X0 = Xn (S70 = Yes), the timer threshold correction unit 16 calculates the correction timer threshold 110 according to equation (2) (described later) for calculating the threshold (S80).

X0≠Xnである場合(S70=No)、タイマ閾値補正部16は、閾値を算出する為の(1)式(後述)に従って、補正タイマ閾値110を算出する(S90)。   If X0 ≠ Xn (S70 = No), the timer threshold correction unit 16 calculates the correction timer threshold 110 according to equation (1) (described later) for calculating the threshold (S90).

補正タイマ閾値110は、タイマ発生部17によって、割り込み信号100を発行する判断に用いられ、前述のタイマ閾値に上書きされる(S100)。   The correction timer threshold 110 is used by the timer generation unit 17 to determine whether to issue the interrupt signal 100 and overwrites the timer threshold described above (S100).

クロック過不足累積部15はX0とXnとの数値の差異を算出してクロック過不足累積値(Anと呼ぶ)を一時記憶する。Anの記憶は2世代であり、Anと次の状態であるAn+1を記憶する(S110)。   The clock excess / deficiency accumulation unit 15 calculates the difference between the numerical values of X0 and Xn, and temporarily stores the clock excess / deficiency cumulative value (referred to as An). The storage of An is for two generations, and An and the next state An + 1 are stored (S110).

その後、フローはS30に戻り、クロック測定部13の動作から、フローが繰り返される。   Thereafter, the flow returns to S30, and the flow is repeated from the operation of the clock measurement unit 13.

ここで、タイマ閾値補正部16が行う計算について説明する。   Here, the calculation performed by the timer threshold correction unit 16 will be described.

まず、タイマ補正装置1が動作し、継続的にタイマ発生部17から割り込み信号110が出力されている場合とする。割り込み信号110が出力された時点から次の割り込み信号110が出力されるまでの期間を状態と表現する。この状態にそれぞれ識別子としてn(整数)を付与し、n番目の状態を状態nと呼ぶ。さらに状態nの期間が終了して、次に動作している状態を状態n+1と呼ぶ。本例の説明における状態の番号は、状態nと次の状態n+1、さらにその次の状態n+2、の様に、状態が連続していることを示す。   First, it is assumed that the timer correction device 1 operates and the timer generation unit 17 continuously outputs the interrupt signal 110. A period from when the interrupt signal 110 is output until the next interrupt signal 110 is output is referred to as a state. In this state, n (integer) is assigned as an identifier, and the n-th state is called a state n. Further, when the period of state n ends, the next operating state is referred to as state n + 1. The state numbers in the description of the present example indicate that the states are continuous, such as the state n, the next state n + 1, and the next state n + 2.

次に、算出に必要なパラメータとその内容を説明する。まず、状態0、すなわち0番目の状態におけるパルス数測定値の基準値となるX0と、状態n、すなわち状態がn番目のパルス数測定値であるXnがある。ここで、状態0から状態Xnに至るまでの、X0と各々のXn(n=1からnまでの全て)との差をそれぞれ加算してその累積値を得る。この累積値がクロック過不足数Anとする。また、閾値を算出する式は2種類あり、X0とXnとが一致するか否かの違いによりいずれか一つの式を選択する。式の詳細は後述する。なお、本説明における、Xn、An、後述するYnの引数nは、状態nにおけるそれぞれの値であることを示す。   Next, parameters necessary for calculation and the contents thereof will be described. First, there is X0, which is a reference value of the pulse number measurement value in the state 0, that is, the 0th state, and Xn, which is the state n, that is, the nth pulse number measurement value in the state. Here, the difference between X0 and each Xn (all from n = 1 to n) from the state 0 to the state Xn is respectively added to obtain an accumulated value. This accumulated value is assumed to be the clock excess / shortage number An. Further, there are two types of formulas for calculating the threshold value, and any one formula is selected depending on whether X0 matches Xn or not. The details of the equation will be described later. In the present description, Xn, An, and an argument n of Yn described later indicate that they are the respective values in the state n.

まず、X0の値とXnとの値が不一致の場合の算出について説明する。この条件は、状態0の割り込み信号100が発生する周期と状態nで割り込み信号100が発生する周期とが異なることを意味する。そこで、まず周期を一致させる為に補正タイマ閾値110の計算を行う。状態nにおける補正タイマ閾値110の値をYnとして、次の状態n+1における補正タイマ閾値110の値をYn+1とすると、Yn+1は下記の(1)式で算出する。
Yn+1=Yn*X0/Xn・・・・(1)
この新たな閾値により、以後のタイマ発生部17のカウント数が補正される。この(1)式は、基準となるカウント数であるX0と状態nにおけるカウント数であるXnとの比を求めて、状態nの時の補正タイマ閾値110の値に前述の比を割かけることで、クロックの周波数が変化したことによるカウント数の増減を基準値となるX0に割かけることで、カウント数が一致することになる。従って、最終的にはX0=Xnに調整される。
First, calculation in the case where the value of X0 and the value of Xn do not match will be described. This condition means that the cycle in which the interrupt signal 100 of state 0 is generated is different from the cycle in which the interrupt signal 100 is generated in the state n. Therefore, first, calculation of the correction timer threshold 110 is performed to make the periods coincide. Assuming that the value of the correction timer threshold 110 in the state n is Yn, and the value of the correction timer threshold 110 in the next state n + 1 is Yn + 1, Yn + 1 is calculated by the following equation (1).
Yn + 1 = Yn * X0 / Xn (1)
The count number of the timer generation unit 17 thereafter is corrected by the new threshold value. This equation (1) obtains the ratio of X0, which is the reference count number, to Xn, which is the count number in the state n, and divides the above ratio by the value of the correction timer threshold 110 in the state n. Then, by dividing the increase or decrease of the count number due to the change of the clock frequency by X0 which is the reference value, the count numbers will match. Therefore, finally, it is adjusted to X0 = Xn.

また、クロック過不足数の累積値An+1は、下記(3)式で算出する。
An+1=An+X0−Xn・・・・(3)
次に、X0とXnとが一致している場合の算出について説明する。
Further, the cumulative value An + 1 of the clock excess / deficiency number is calculated by the following equation (3).
An + 1 = An + X0-Xn (3)
Next, calculation in the case where X0 matches Xn will be described.

この条件は、状態0の割り込み信号100が発生する周期と状態nで割り込み信号100が発生する周期とが一致していることを意味している。しかし、周期を一致させる為タイマの閾値を変更した結果、割り込み信号100が出力されるタイミングが、状態0と状態nでは異なっている状態が存在する。それはクロック過不足数Anが0ではない状態である。そこで、状態0の場合に割り込み信号100が出力したタイミングと状態nの割り込み信号100とのタイミングを一致させる為に補正タイマ閾値110の計算を行う。   This condition means that the cycle in which the interrupt signal 100 in the state 0 is generated matches the cycle in which the interrupt signal 100 is generated in the state n. However, as a result of changing the threshold value of the timer in order to make the periods coincide, there is a state in which the timing at which the interrupt signal 100 is output differs between state 0 and state n. That is a state in which the clock excess or deficiency number An is not zero. Therefore, in order to make the timing of the interrupt signal 100 output in the case of the state 0 coincide with the timing of the interrupt signal 100 of the state n, the correction timer threshold 110 is calculated.

状態nにおける補正タイマ閾値110の値をYnとして、次の状態n+1におけるタイマの時計動作に対する補正タイマ閾値110の値をYn+1とすると、はYn+1は下記(2)式で算出する。
Yn+1=Yn*(X0+An)/Xn・・・・(2)
この(2)式は、X0=Xnに至った後、X0の切り替えタイミングとXnの切り替えタイミングとの差を補正する為にクロック過不足数AnがX0に加算されることでパルス数の補正が行われて、Xnに切替わった後にずれたタイミングの補正を考慮したタイミング補正値を算出する式である。
Assuming that the value of the correction timer threshold 110 in the state n is Yn, and the value of the correction timer threshold 110 for the clock operation of the timer in the next state n + 1 is Yn + 1, Yn + 1 is calculated by the following equation (2).
Yn + 1 = Yn * (X0 + An) / Xn (2)
In this equation (2), after X0 = Xn, the number of excess or deficiency of clock An is added to X0 to correct the difference between the switching timing of X0 and the switching timing of Xn, thereby correcting the number of pulses. It is an equation that is performed to calculate a timing correction value taking into account the correction of the shifted timing after switching to Xn.

また、クロック過不足数の累積値An+1は、下記の(4)式で算出する。
An+1=An+X0−Xn・・・・(4)
ここでさらに、図1に示したタイマ補正装置1の動作例を、図3A及び図3Bのタイミングチャート図及び図4A及び図4Bのタイマ補正装置1の状態を規定する数値の計算式を示す表を用いてより具体的に説明する。
Further, the cumulative value An + 1 of the clock excess / deficiency number is calculated by the following equation (4).
An + 1 = An + X0-Xn (4)
Here, further, an operation example of the timer correction device 1 shown in FIG. 1 will be described with reference to timing charts of FIG. 3A and FIG. 3B and a numerical expression formula defining the state of the timer correction device 1 of FIG. This will be described more specifically using

図3A及び図3Bは、第1のクロック発振部10のクロック波形、第2のクロック発振部11のクロック発振波形、補正タイマ閾値110、クロックパルスの過不足数、割り込み信号100が発生するタイミング、本来期待される割り込み信号100のタイミングの小各々の関係を図に表したものである。   3A and 3B show the clock waveform of the first clock oscillator 10, the clock oscillation waveform of the second clock oscillator 11, the correction timer threshold 110, the number of excess and deficiency of clock pulses, and the timing at which the interrupt signal 100 is generated. The relationship between each of the timings of the interrupt signal 100 originally expected is shown in the figure.

図4A及び図4Bは、クロック測定部13が測定するクロックパルス数(X0,Xn)とクロック過不足数(An、An+1)を算出する式とその値と、補正タイマ閾値110(Yn、Yn+1)を算出する式とその値と、を図にしたものである。図3A、図3B、に記載した状態0から状態6は図4A及び図4Bの記載した状態0から状態6にそれぞれ対応する。   FIG. 4A and FIG. 4B show the formula for calculating the number of clock pulses (X0, Xn) and the number of clock excess / deficiency (An, An + 1) measured by the clock measurement unit 13, their values, and the correction timer threshold 110 (Yn, Yn + 1). The figure which calculates the formula which calculates, and its value. States 0 to 6 described in FIGS. 3A and 3B correspond to the described states 0 to 6 in FIGS. 4A and 4B, respectively.

次に、図3A、図3B、図4A及び図4Bを用いて、割り込み信号100の周期の補正及びタイミングを基準のタイミングと一致させる動作について、説明1から説明6の段階にわけて説明する。   Next, with reference to FIG. 3A, FIG. 3B, FIG. 4A and FIG. 4B, the correction of the cycle of the interrupt signal 100 and the operation of matching the timing with the timing of the reference will be described in stages of explanation 1 to explanation 6.

ここで、本例の定常状態の定義について説明する。定常状態とは、タイマ補正装置1の電源が投入され、タイマ発生部17及びクロック測定部13に対して初期値を設定して、動作が開始されて、その後、クロック測定部13が測定したパルス数の過渡的な変動が収束して、特定の値を連続して出力する状態に至った状態を言う。   Here, the definition of the steady state of this example will be described. In the steady state, the timer correction device 1 is powered on, an initial value is set to the timer generation unit 17 and the clock measurement unit 13 and operation is started, and then the pulse measured by the clock measurement unit 13 It refers to a state in which the transitional fluctuation of the number converges and reaches a state in which specific values are continuously output.

(説明1)
定常状態において、タイマ発生部17の入力クロックには、低速の第1のクロック発振部10のクロックが選択されているとする(図3A_状態0、図4A_状態0)。この時、タイマ発生部17が出力する割込み信号100と次に割り込み信号100との間に測定される第1のクロック発振部10からのパルス数をクロック測定部13が測定し、その値をX0とする。この低速の第1のクロック発振部10のクロックによりタイマ発生部17のカウントが実行されて割り込み信号100を出力し、タイマ閾値補正部16が、次回の補正タイマ閾値Ynを計算する(図3A_状態1、図4A_状態1)。定常状態(本例では状態0及び状態0以前の状態が相当する)においては、第1のクロック発振部10のパルスとタイマ発生部17に入力するクロックは同一であり、クロック測定部13が測定する割込み信号100と次に割り込み信号100との間のクロックパルス数は、変化しない。また、定常状態ではクロック過不足は存在せず、クロック過不足数A0は0である。次の状態1における補正タイマ閾値Y1は、X0=Xnの条件を成立することから前述の(2)式を適用する。したがって、前の状態0における補正タイマ閾値Y0に対し、Y1=Y0*(X0+A0)/X0=Y0=5となり、前回の補正タイマ閾値と等しい。つまり、定常状態においては、タイマ割込みは第1のクロックパルス数X0の間隔で発生する。なお、クロック過不足累積部15が、クロック過不足数A1を計算して、A1=A0+X0−X0=0を得る。クロック過不足累積部15がA1を記憶する。
(Description 1)
In the steady state, it is assumed that the clock of the low-speed first clock oscillator 10 is selected as the input clock of the timer generator 17 (FIG. 3A_state 0, FIG. 4A_state 0). At this time, the clock measurement unit 13 measures the number of pulses from the first clock oscillation unit 10 measured between the interrupt signal 100 output from the timer generation unit 17 and the interrupt signal 100 next, and the value thereof is X0. I assume. The count of the timer generation unit 17 is executed by the clock of the low-speed first clock oscillation unit 10 to output the interrupt signal 100, and the timer threshold correction unit 16 calculates the next correction timer threshold Yn (FIG. 1, FIG. 4A _ state 1). In the steady state (in this example, the state 0 and the state prior to the state 0 correspond), the pulse of the first clock oscillator 10 and the clock input to the timer generator 17 are the same, and the clock measurement unit 13 measures The number of clock pulses between the interrupt signal 100 and the next interrupt signal 100 does not change. Also, in the steady state, there is no excess or deficiency of clock, and the number A0 of excess or deficiency of clocks is zero. The correction timer threshold value Y1 in the next state 1 applies the above-mentioned equation (2) because the condition of X0 = Xn is satisfied. Therefore, Y1 = Y0 * (X0 + A0) / X0 = Y0 = 5 with respect to the correction timer threshold Y0 in the previous state 0, which is equal to the previous correction timer threshold. That is, in the steady state, the timer interrupt occurs at intervals of the first clock pulse number X0. In addition, the clock excess / deficiency accumulation unit 15 calculates the clock excess / deficiency number A1 to obtain A1 = A0 + X0−X0 = 0. The clock excess / deficiency accumulation unit 15 stores A1.

(説明2)
状態1の動作を説明する。前述の状態0で計算したタイマ閾値であるY1=5がタイマ発生部17の閾値に設定され、カウントが実行される。
(Description 2)
The operation of state 1 will be described. The timer threshold value Y1 = 5 calculated in the above-mentioned state 0 is set as the threshold value of the timer generation unit 17, and the count is executed.

タイマ割込み信号100が発生までの間に、低速の第1のクロック発振部10のクロックから高速の第2のクロック発振部11のクロックに切替わったとする(図3A_状態1、図4A_状態1)。   It is assumed that the clock of the low speed first clock oscillating unit 10 is switched to the clock of the high speed second clock oscillating unit 11 until the timer interrupt signal 100 is generated (FIG. 3A_state 1, FIG. 4A_state 1). .

高速の第2のクロック発振部11にクロックに切替わったことでタイマ発生部17のカウント速度が上がるが、補正タイマ閾値110が定常状態と等しいY0が適用されたままである為、定常時よりも短い時間で補正タイマ割込み信号100が発生する(図3A_状態1の後端部分、図4A_状態1)。   Although the count speed of the timer generation unit 17 is increased by switching to the high speed second clock oscillation unit 11, the Y0 which is equal to that in the steady state is still applied to the correction timer threshold 110, so The correction timer interrupt signal 100 is generated in a short time (FIG. 3A_state 1 rear end portion, FIG. 4A_state 1).

状態1の期間にクロック測定部13が測定した第1のクロック発振部10のクロックパルス数をX1とする。タイマ発生部17に供給される第2のクロック11のクロックの周波数が第1のクロック10のクロック周波数より高い為、定常時よりも早くタイマ割込みが発生する。X1<X0である。したがって、タイマ発生部17の入力クロックが高速のクロックに切替わった後も、タイマ発生部17の割込み信号100の発生頻度を定常状態と同一に維持する為には、次の状態2におけるタイマ発生部17に対する補正タイマ閾値110は、現在の状態1に適用した補正タイマ閾値であるY1に対して増加させる必要がある。   The number of clock pulses of the first clock oscillation unit 10 measured by the clock measurement unit 13 in the period of state 1 is X1. Since the frequency of the clock of the second clock 11 supplied to the timer generator 17 is higher than the clock frequency of the first clock 10, a timer interrupt occurs earlier than in the steady state. It is X1 <X0. Therefore, even after the input clock of timer generation unit 17 is switched to a high-speed clock, the timer generation in the next state 2 is performed to maintain the occurrence frequency of interrupt signal 100 of timer generation unit 17 the same as in the steady state. The correction timer threshold 110 for the unit 17 needs to be increased with respect to Y1, which is the correction timer threshold applied to the current state 1.

ここで、X0≠X1の条件(図3Aの状態1を参照するとX0=5、X1=4である。)が成立することから前述の(1)式を適用して次の状態2の補正タイマ閾値Y2を算出する。タイマ閾値補正部16が、Y2=Y1*X0/X1≒6を得る。   Here, since the condition of X0 ≠ X1 (X0 = 5 and X1 = 4 with reference to state 1 of FIG. 3A) is satisfied, the correction timer of the next state 2 is applied by applying the above-mentioned equation (1) The threshold Y2 is calculated. The timer threshold value correction unit 16 obtains Y2 = Y1 * X0 / X1 ≒ 6.

また、タイマ割込み信号100が発生する間に本来測定すべき第1のクロック発振部10のクロックパルス数はX0だが、実際に測定されたクロックパルス数はX1である為、タイマ割込みが発生したタイミングは、定常時と比べてX0−X1分のずれが生じている。さらに、X0≠X1の条件となることから、クロック過不足累積部15が前述の(3)式を適用してクロック過不足数A2を計算して、A2=A1+X0−X1=1を得る。クロック過不足累積部15がA2を記憶する。   Also, although the clock pulse number of the first clock oscillator 10 to be measured during the occurrence of the timer interrupt signal 100 is X0, the clock pulse number actually measured is X1, so the timing at which the timer interrupt is generated There is a shift of X0-X1 compared to the steady state. Further, since X0XX1, the clock excess / loss accumulating unit 15 applies the above-mentioned equation (3) to calculate the clock excess / lack number A2 to obtain A2 = A1 + X0−X1 = 1. The clock excess / deficiency accumulation unit 15 stores A2.

(説明3)
次に、状態2を説明する。入力クロックは高速の第2のクロックが供給されたままであったとする(図3A_状態2〜状態3、図4A_状態2〜状態3)。補正タイマ閾値Y2を基に、割り込み信号100が発生するが、前回はタイマ発生部17の入力クロックが途中から第2のクロック発振部11のクロックに切替わったのに対し、今回は初めから第2のクロック発振部11のクロックで動作している為、前回よりも短い間隔でタイマ割込みが発生する(図3A_状態2の後端の部分、図4A_状態2)。この時に、状態2の期間でクロック測定部13が測定したクロックパルス数をX2とする。前回よりも早く割り込み信号100が発生した為、X2<X1<X0である。X0≠X2の条件である。よって、タイマ閾値補正部16が、前述の(1)式を適用して、次の状態3の補正タイマ閾値Y3を計算して,Y3=Y2*X0/X2=10を得る。これにより、タイマ発生部17に入力するクロックが、第2のクロック11が出力するクロックのままであれば、次の状態3の期間で測定される第1のクロック発振部10からのクロックパルス数は、定常時と同じ値になる。なお、X0≠X2の条件が成立することから、クロック過不足部累積部15が前述の(3)式を適用して、クロック過不足数A3を計算して、A3=A2+X0−X2=3を得る。クロック過不足累積部15がA3を記憶する。
(Description 3)
Next, state 2 will be described. It is assumed that the input clock remains supplied with the high-speed second clock (FIG. 3A_state 2 to state 3, FIG. 4A _state 2 to state 3). The interrupt signal 100 is generated based on the correction timer threshold value Y2, but the input clock of the timer generation unit 17 was switched to the clock of the second clock oscillation unit 11 in the middle last time. Since the operation is performed by the clock of the clock oscillation unit 11 of 2, the timer interrupt occurs at an interval shorter than the previous time (the rear end portion of FIG. 3A_state 2, FIG. 4A_state 2). At this time, the number of clock pulses measured by the clock measurement unit 13 in the period of state 2 is X2. Since the interrupt signal 100 is generated earlier than the previous one, X2 <X1 <X0. It is the condition of X0 で あ る X2. Therefore, the timer threshold correction unit 16 applies the above-mentioned equation (1) to calculate the correction timer threshold Y3 of the next state 3 to obtain Y3 = Y2 * X0 / X2 = 10. Thereby, if the clock input to timer generation unit 17 remains the clock output from second clock 11, the number of clock pulses from first clock oscillation unit 10 measured in the period of the next state 3 Is the same value as in steady state. Since the condition of X0 ≠ X2 is satisfied, the clock excess / deficiency part accumulation unit 15 applies the above-mentioned equation (3) to calculate the clock excess / deficiency number A3, and A3 = A2 + X0−X2 = 3 obtain. The clock excess / deficiency accumulation unit 15 stores A3.

(説明4)
次の状態3も、入力クロックは高速の第2のクロック11からの供給のままであったとする(図3A_状態3、図4A_状態3)。状態3で算出した補正タイマ閾値Y3はY2より大きく、かつ入力クロックに変化がないため、前回よりも長い間隔でタイマ割込みが発生し、定常時と間隔は等しくなる(図3B_状態3の後端の部分、図4B_状態3)。この時にクロック測定部13が測定した、第1のクロック発振部10のクロックパルス数をX3とする。定常時と割り込み信号100が発生する間隔が等しい為、X3=X0である。X3=X0の条件が成立することから、補正タイマ閾値Y4の計算には前述の(2)式を適用する。タイマ閾値補正部16が、次の状態4の補正タイマ閾値Y4を計算して、Y4=Y3*(X0+A3)/X3=16を得る。なお、X3=X0であるため、Y4=Y3*(X0+A3)/X0とも言える。また、X3=X0の条件が成立することから、クロック過不足数A4の計算には前述の(4)式を適用する。クロック過不足累積部15が、クロック過不足数A4を計算して、A4=A3+X0−X3=3を得る。クロック過不足累積部15がA4を記憶する(この場合の過不足数は変化しない)。
(Description 4)
Also in the next state 3, it is assumed that the input clock remains supplied from the high-speed second clock 11 (FIG. 3A_state 3, FIG. 4A_state 3). Since the correction timer threshold value Y3 calculated in state 3 is larger than Y2 and there is no change in the input clock, a timer interrupt occurs at an interval longer than the previous time, and the interval becomes equal to that in steady state (FIG. Part of FIG. 4B _ state 3). At this time, the clock pulse number of the first clock oscillating unit 10 measured by the clock measuring unit 13 is X3. Since the constant and the interval at which the interrupt signal 100 is generated are equal, X3 = X0. Since the condition of X3 = X0 is satisfied, the above-mentioned equation (2) is applied to the calculation of the correction timer threshold value Y4. The timer threshold correction unit 16 calculates the correction timer threshold Y4 of the next state 4 to obtain Y4 = Y3 * (X0 + A3) / X3 = 16. Since X3 = X0, it can be said that Y4 = Y3 * (X0 + A3) / X0. Further, since the condition of X3 = X0 is satisfied, the above equation (4) is applied to the calculation of the clock excess / deficit number A4. The clock excess / deficiency accumulation unit 15 calculates the clock excess / deficiency number A4 to obtain A4 = A3 + X0−X3 = 3. The clock excess / deficiency accumulation unit 15 stores A4 (in this case, the number of excess / deficiency does not change).

(説明5)
次の状態4も、タイマ発生部17に入力するクロックが、高速の第2のクロック11が出力するクロックのままであったとする(図3B_状態4、図4B_状態4)。補正タイマ閾値Y4はY3より大きく、かつ入力クロックに変化がないため、前回よりも長い間隔でタイマ割込みが発生する(図3B_状態4の後端の部分、図4B_状態4)。この時にクロック測定部13が測定した、第1のクロック発振部10のクロックパルス数をX4とする。入力クロックの周波数は前回から変化がなく、また、前回補正された補正タイマ閾値は、クロック過不足数の分のみ増えている為、X4=X3+A3である。X4≠X0の条件が成立することから補正タイマ閾値Y5の計算には前述の(1)式を適用する。タイマ閾値補正部16が、次の状態5の補正タイマ閾値Y5を計算して、Y5=Y4*X0/X4=10を得る。なお、(説明4)で述べたようにY4=Y3*(X0+A3)/X3、X3=X0である為、次回の補正タイマ閾値Y5は前々回の補正タイマ閾値Y3と等しくなる。前々回の補正タイマ閾値Y3は、入力クロックが第2のクロック発振部11のクロックの時、定常時のタイマ割込み発生間隔と等しくなる値である。また、X4≠X0の条件が成立することから、クロック過不足数A5の計算には前述の(3)式を適用する。クロック過不足累積部15が、クロック過不足数A5を計算して、A5=A4+X0−X4=0を得る。クロック過不足累積部15がA5を記憶する。
(Description 5)
Also in the next state 4, it is assumed that the clock input to the timer generation unit 17 remains the clock output by the high-speed second clock 11 (FIG. 3B_state 4 and FIG. 4B_state 4). Since the correction timer threshold Y4 is larger than Y3 and there is no change in the input clock, a timer interrupt is generated at an interval longer than the previous time (a rear end portion of state 4 in FIG. 4B, state 4). At this time, the clock pulse number of the first clock oscillation unit 10 measured by the clock measurement unit 13 is X4. The frequency of the input clock has not changed since the previous time, and the correction timer threshold value corrected last time is X4 = X3 + A3 because it is increased by the number of clock excess / deficit. Since the condition of X4 ≠ X0 is satisfied, the above-mentioned equation (1) is applied to the calculation of the correction timer threshold value Y5. The timer threshold correction unit 16 calculates the correction timer threshold Y5 of the next state 5 to obtain Y5 = Y4 * X0 / X4 = 10. Since Y4 = Y3 * (X0 + A3) / X3 and X3 = X0 as described in (Description 4), the next correction timer threshold value Y5 is equal to the correction timer threshold value Y3 of the previous second. When the input clock is the clock of the second clock oscillation unit 11, the correction timer threshold value Y3 of the last two times is a value equal to the timer interrupt occurrence interval in the steady state. Further, since the condition of X4 ≠ X0 is satisfied, the above equation (3) is applied to the calculation of the clock excess / deficit number A5. The clock excess / deficiency accumulation unit 15 calculates the clock excess / deficiency number A5 to obtain A5 = A4 + X0−X4 = 0. The clock excess / deficiency accumulation unit 15 stores A5.

(説明6)
次の状態5の期間も、入力クロックは高速の第2のクロックのままであったとする(図3B_状態5、図4B_状態5)。前回補正された補正タイマ閾値Y5はY4より小さく、かつ入力クロックに変化がないため、前回よりも短い間隔でタイマ割込みが発生する(図3B_状態5の最後の部分、図4B_状態5)。この時に測定された、クロック測定部13が測定した、第1のクロック発振部10のクロックパルス数をX5とする。入力クロック周波数に変化がなく、また、補正タイマ閾値Y5は前々回の補正タイマ閾値Y3と等しい値であった為、X5=X3=X0となる。X5=X0の条件が成立することから補正タイマ閾値Y6の計算には前述の(2)式を適用する。タイマ閾値補正部16が、次の状態6の補正タイマ閾値Y6を、Y6=Y5*(X0+A5)/X5の式で計算するが、X5=X0、Y5=Y3、A5=0であるため、補正タイマ閾値Y6は補正タイマ閾値Y3と等しく10になる。よって、入力クロック周波数が変更されない限り、タイマ割込み発生間隔は、定常状態のタイマ割込み発生間隔と等しくなる。また、X5=X0の条件が成立することから、クロック過不足数A6の計算には前述の(4)式を適用する。クロック過不足累積部15が、クロック過不足数A6を計算して、A6=A5+X0−X5=0を得る。クロック過不足累積部1がA6を記憶する。
(Description 6)
Also in the period of the next state 5, it is assumed that the input clock remains the high-speed second clock (FIG. 3B_state 5; FIG. 4B_state 5). Since the correction timer threshold value Y5 corrected last time is smaller than Y4 and there is no change in the input clock, a timer interrupt is generated at an interval shorter than the previous time (last part of FIG. 3B_state 5, FIG. 4B_state 5). The number of clock pulses of the first clock oscillation unit 10 measured by the clock measurement unit 13 measured at this time is X5. Since there is no change in the input clock frequency, and the correction timer threshold value Y5 has a value equal to the correction timer threshold value Y3 of the previous second time, X5 = X3 = X0. Since the condition of X5 = X0 is satisfied, the above-mentioned equation (2) is applied to the calculation of the correction timer threshold value Y6. Although the timer threshold value correction unit 16 calculates the correction timer threshold value Y6 of the next state 6 by the equation Y6 = Y5 * (X0 + A5) / X5, since X5 = X0, Y5 = Y3, A5 = 0, the correction is performed. The timer threshold Y6 is equal to 10 and the correction timer threshold Y3. Therefore, as long as the input clock frequency is not changed, the timer interrupt occurrence interval is equal to the steady state timer interrupt occurrence interval. Further, since the condition of X5 = X0 is satisfied, the above-mentioned equation (4) is applied to the calculation of the clock excess / deficit number A6. The clock excess / deficiency accumulation unit 15 calculates the clock excess / deficiency number A6 to obtain A6 = A5 + X0−X5 = 0. The clock excess / deficiency accumulation unit 1 stores A6.

以上により、入力クロックを切り替えた後の割り込み信号100が発生する間隔が入力クロック切り替え前と等しく、かつ入力クロック切り替えた後のタイマ割込み発生タイミングも、入力クロック切り替え前と一致する。なお、入力クロックを高速クロックから低速クロックに変更する場合も同様である。   As described above, the interval at which the interrupt signal 100 occurs after switching the input clock is equal to that before the input clock switching, and the timer interrupt generation timing after switching the input clock also matches the timing before the input clock switching. The same applies to changing the input clock from the high speed clock to the low speed clock.

以上の様に、本発明の第1の実施の形態におけるタイマ補正装置1は、周波数の異なるクロックに切り替えても、切り替える前の割り込み信号の周期と位相とを一致させることが出来る。その理由は、周期を合わせる補正に加えて位相を合わせる補正を行うことが出来るからである。   As described above, the timer correction device 1 according to the first embodiment of the present invention can match the period and the phase of the interrupt signal before switching even when switching to a clock having a different frequency. The reason is that in addition to the correction for adjusting the period, the correction for adjusting the phase can be performed.

1 タイマ補正装置
3 第1の記憶部
4 第2の記憶部
5 判断部
10 第1のクロック発振部
11 第2のクロック発振部
12 入力クロック選択部
13 クロック測定部
14 パルス数比率算出部
15 クロック過不足累積部
16 タイマ閾値補正部
17 タイマ発生部
100 割り込み信号
110 補正タイマ閾値
DESCRIPTION OF SYMBOLS 1 timer correction device 3 first storage unit 4 second storage unit 5 determination unit 10 first clock oscillation unit 11 second clock oscillation unit 12 input clock selection unit 13 clock measurement unit 14 pulse number ratio calculation unit 15 clock Over / under accumulation unit 16 timer threshold correction unit 17 timer generation unit 100 interrupt signal 110 correction timer threshold

Claims (9)

基準となる第1のクロックを出力する第1のクロック発振手段と、
前記第1のクロック発振手段とは異なる基準となる第2のクロックを出力する第2のクロック発振手段と、
自装置の動作中に、前記第1のクロックと前記第2のクロックのいずれかのクロックに切替えて切替えた前記クロックをタイマ発生部に出力する入力クロック選択部と、
前記クロックでカウントするパルス数を測定する入力クロック測定部と、
前記クロックの切替え前および前記クロックが切替えられた際のそれぞれで、前記入力クロック測定部が、割り込み信号を受け付けた時点から次の割り込み信号を受け付けるまでの期間にカウントする前記クロックの前記パルス数を比較して、前記パルス数の過不足の累積を行うクロック過不足累積部と、
前記入力クロック測定部が測定した各前記期間中の前記パルス数の比と前記過不足を示すを算出するパルス数比率算出部と、
記比と前記差とから前記割り込み信号を出力する条件の閾値を与えるタイマ閾値補正部と、
前記入力クロック選択部からのクロックでカウントするカウンタを有し、前記閾値による前記期間ごとに前記割り込み信号を出力するタイマ発生部と、
を備え、
前記入力クロック測定部は、前記クロックを受け取り、前記タイマ発生部が出力した第1の割り込み信号と次の周期である第2の割り込み信号との前記期間に受け取った前記クロックのパルス数を計側して第1の測定値とし、前記第1の測定値を測定した後の次の期間の測定値を第2の測定値として、前記第1の測定値と前記第2の測定値とを前記パルス数比率算出部に出力し、
前記クロック過不足累積部は、前記第1の測定値と前記第2の測定値との差に前の期間で得られた第1の累積値を加算して第2の累積値を求め、次の前記期間の加算で、前記第1の累積値に前記第2の累積値を代入して再帰的に算出した前記第2の累積値をクロック過不足数として前記タイマ閾値補正部に出力し
前記パルス数比率算出部は、さらに前記第1の測定値と前記第2の測定値が一致するか否かの判断情報と、前記第1の測定値と前記第2の測定値との前記比と、を前記タイマ閾値補正部に出力する判断
含み、
前記タイマ閾値補正部は、前記判断部から、前記判断情報と前記比の情報を受け取り、前記カウンタの前記閾値を算出して当該閾値を記憶し、当該閾値を前記タイマ発生部に出力し、
前記タイマ発生部は、前記カウンタのカウント値を前記タイマ閾値補正部が出力した前記閾値に設定して前記カウンタを、前記クロックでカウントダウンさせて、前記カウント値が0になった時に、前記タイマ発生部から、前記第1の割り込み信号及び前記第2の割り込み信号を前記入力クロック測定部に出力する、
タイマ補正装置。
First clock oscillation means for outputting a first clock as a reference;
Second clock oscillation means for outputting a second clock which becomes a reference different from the first clock oscillation means;
During operation of the apparatus, is switched to one of the clocks of the first clock and the second clock, the input clock selection unit for outputting the clock to the timer generator is switched,
The input clock measuring unit that measures the number of pulses counted by said clock,
The number of pulses of the clock to be counted during a period from when the input clock measurement unit receives an interrupt signal to when it receives a next interrupt signal before switching the clock and when the clock is switched A clock excess / deficiency accumulation unit that performs accumulation of excess / deficiency of the number of pulses by comparison
A pulse number ratio calculating unit for calculating a difference indicating the excess and deficiency with the pulse number ratio in each said period of said input clock measuring unit is measured,
A timer threshold correction section that gives a threshold condition for outputting said difference Toka et the interrupt signal from the previous SL ratio,
A timer generating unit have a counter for counting the clock from the input clock selection unit, and outputs the interrupt signal for each of the periods by said threshold,
Equipped with
The input clock measuring unit, the receive clock, chrysanthemum lock before received between the phase of the first interrupt signal and the second interrupt signal the next period the timer generating unit has output The first measurement value and the second measurement value are used as the first measurement value, and the measurement value of the next period after the first measurement value is measured as the second measurement value. outputs of the measurement value to the pulse count ratio calculation unit,
The clock deficiency accumulation unit, a difference between the first measurement and the second measurement value, obtains a second cumulative value by adding the first accumulated value obtained in the previous period, The second accumulated value recursively calculated by substituting the second accumulated value for the first accumulated value in the addition of the next period is output to the timer threshold value correction unit as a clock excess / shortage number. ,
The pulse number ratio calculating section further wherein prior Symbol the first measurement and the determination of whether information second measurement values match, the first measurement value and the second measured value determination unit for outputting the ratio of the timer threshold correction unit
It includes,
The timer threshold correction unit, from the front SL judgment unit receives information of the ratio between the determination information, and calculates the threshold value before asked counter stores the threshold value, outputs the threshold to the timer generating unit And
The timer generating unit, the counter to set the count value of said counter to said threshold timer threshold correction unit is outputted, by counting down at the clock, when the count value becomes 0, the the timer generating unit, and outputs a first interrupt signal and the second interrupt signal to said input clock measuring unit,
Timer correction device.
ソフトウエアにより、前記比を求める複数の計算式の中から、何れか一つの計算式を選択して計算する請求項1に記載のタイマ補正装置。 More Sofutoue A, from among a plurality of calculation formulas for determining the pre-Symbol ratio, timer correction apparatus according to Motomeko 1 you calculated by selecting any one of the formulas. 前記第2のクロック発振手段は、プログラムにより、周波数を任意に変更することを特徴とした請求項1または請求項2に記載のタイマ補正装置。 The second clock oscillating means is more programs, timer correction apparatus according to claim 1 or請 Motomeko 2 was characterized by arbitrarily changing the frequency. 基準となる第1のクロックを発振させ、
前記第1のクロックとは異なる基準となる第2のクロックを発振させ、
自装置の動作中に、前記第1のクロックと前記第2のクロックのいずれかのクロックに切替えて、切替えた前記クロックをカウントするカウンタを有するタイマ発生部に出力し、
前記クロックを受け取り、第1の割り込み信号と次の周期である第2の割り込み信号との間に受け取った前記クロックのパルス数を測定して第1の測定値とし、前記第1の測定値を測定した後の次の期間の測定値を第2の測定値として、前記第1の測定値と前記第2の測定値とを出力し、
前記第1の測定値と前記第2の測定値との差に前の期間で得られた第1の累積値を加算して第2の累積値を求め、次の前記期間の加算で、前記第1の累積値に前記第2の累積値を代入して再帰的に算出した前記第2の累積値を出力し、
前記第1の測定値と前記第2の測定値が一致するか否かの判断情報と、前記第1の測定値と前記第2の測定値との比を出力し、
前記判断情報と前記比の情報を受け取り、前記カウンタの閾値を算出して当該閾値を記憶し、当該閾値を出力し、
前記カウンタのカウント値を前記出力した前記閾値に設定して前記カウンタを、前記クロックでカウントダウンさせて、カウント値が0になった時に、前記タイマ発生部から、前記第1の割り込み信号及び前記第2の割り込み信号を出力する、タイマ補正方法。
A first clock reference that Do is oscillated,
Oscillating a second clock which is a reference different from the first clock;
During operation of the own device, the clock is switched to any one of the first clock and the second clock, and is output to a timer generation unit having a counter that counts the switched clock.
Receiving said clock, a first interrupt signal and the first measured value by measuring the number of pulses of chrysanthemum prelocked received on the period of the second interrupt signal the next cycle, the the measurement value of the next period after measuring the first measurement as a second measurement value, Outputs and said second measured value and the first measured value,
The difference between the first measurement and the second measurement value, obtains a second cumulative value by adding the first accumulated value obtained in the previous period, in addition of the next said period, Substituting the second accumulated value for the first accumulated value to output the second accumulated value calculated recursively;
Outputting determination information as to whether or not the first measurement value matches the second measurement value, and a ratio of the first measurement value to the second measurement value;
It receives information of the ratio between the determination information, and stores the threshold value to calculate the threshold value of the counter, and outputs the threshold value,
The counter sets the count value of the counter to the threshold value which is the output, by counting down at the clock, when the count value becomes 0, from the timer generator, said first interrupt signal and to output the said second interrupt signal, the timer correction method.
記比を求める複数の計算式の中から、何れか一つの前記計算式を選択する請求項4に記載のタイマ補正方法。 From among the plurality of total formula for obtaining the previous SL ratio, timer correction method according to Motomeko 4 select any one of the formulas. 前記第2のクロックの周波数を任意に変更することを特徴とした請求項4または請求項5に記載のタイマ補正方法。 Timer correction method according to claim 4 or請 Motomeko 5 was characterized by arbitrarily changing the frequency of said second clock. 基準となる第1のクロックを発振させ、
前記第1のクロックとは異なる基準となる第2のクロックを発振させ、
自装置の動作中に、前記第1のクロックと前記第2のクロックのいずれかのクロックに切替えて、切替えた前記クロックをカウントするカウンタを有するタイマ発生部に出力し、
前記クロックを受け取り、第1の割り込み信号と次の周期である第2の割り込み信号との間に受け取った前記クロックのパルス数を測定して第1の測定値とし、前記第1の測定値を測定した後の次の期間の測定値を第2の測定値として、前記第1の測定値と前記第2の測定値とを出力し、
前記第1の測定値と前記第2の測定値との差に前の期間で得られた第1の累積値を加算して第2の累積値を求め、次の前記期間の加算で、前記第1の累積値に前記第2の累積値を代入して再帰的に算出した前記第2の累積値を出力し、
前記第1の測定値と前記第2の測定値が一致するか否かの判断情報と、前記第1の測定値と前記第2の測定値との比を出力し、
前記判断情報と前記比の情報を受け取り、前記カウンタの閾値を算出して当該閾値を記憶し、当該閾値を出力し、
前記カウンタのカウント値を前記出力した前記閾値に設定して前記カウンタを、前記クロックでカウントダウンさせて、カウント値が0になった時に、タイマ発生部から、前記第1の割り込み信号及び前記第2の割り込み信号を出力する処理をコンピュータに実行させるタイマ補正プログラム。
A first clock reference that Do is oscillated,
Oscillating a second clock which is a reference different from the first clock;
During operation of the own device, the clock is switched to any one of the first clock and the second clock, and is output to a timer generation unit having a counter that counts the switched clock.
Receiving said clock, a first measurement by measuring the number of pulses before Chrysanthemum lock received during the first interrupt signal and the second interrupt signal the next cycle, the first the measurement value of the next period after measuring the first measurement value as a second measurement value, Outputs said first measurement and said second measurement,
The difference between the first measurement and the second measurement value, obtains a second cumulative value by adding the first accumulated value obtained in the previous period, in addition of the next said period, Substituting the second accumulated value for the first accumulated value to output the second accumulated value calculated recursively;
Outputting determination information as to whether or not the first measurement value matches the second measurement value, and a ratio of the first measurement value to the second measurement value;
It receives information of the ratio between the determination information, and stores the threshold value to calculate the threshold value of the counter, and outputs the threshold value,
Said counter, by counting down at the clock to set the count value of the counter to the threshold value which is the output, when the count value becomes 0, the timer generating unit, the first interrupt signal and timer correction program for executing a process of outputting the second interrupt signal to the computer.
記比を求める複数の計算式の中から、何れか一つの前記計算式を選択する処理を行う請求項7に記載のタイマ補正プログラム。 From among the plurality of total formula for obtaining the previous SL ratio, timer correction program according to claim 7 to perform the process of selecting any one of the formulas. 前記第2のクロックの周波数を任意に変更する処理を行う請求項7または請求項8に記載のタイマ補正プログラム。 Timer correction program according to claim 7 or請 Motomeko 8 performs processing to arbitrarily change the frequency of the second clock.
JP2015065386A 2015-03-27 2015-03-27 Timer correction device, timer correction method and timer correction program Active JP6500550B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015065386A JP6500550B2 (en) 2015-03-27 2015-03-27 Timer correction device, timer correction method and timer correction program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015065386A JP6500550B2 (en) 2015-03-27 2015-03-27 Timer correction device, timer correction method and timer correction program

Publications (2)

Publication Number Publication Date
JP2016184366A JP2016184366A (en) 2016-10-20
JP6500550B2 true JP6500550B2 (en) 2019-04-17

Family

ID=57243046

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015065386A Active JP6500550B2 (en) 2015-03-27 2015-03-27 Timer correction device, timer correction method and timer correction program

Country Status (1)

Country Link
JP (1) JP6500550B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7289244B2 (en) * 2019-09-02 2023-06-09 花王株式会社 Method and apparatus for processing workpiece, and method and apparatus for manufacturing sheet fused body

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08292822A (en) * 1995-04-20 1996-11-05 Nec Eng Ltd Intelligent timer
JPH1020052A (en) * 1996-07-01 1998-01-23 Yazaki Corp Time correction method and device therefor
JP2006309479A (en) * 2005-04-28 2006-11-09 Nec Electronics Corp Clock correction circuit, clock correction method, and microcontroller
JP5573867B2 (en) * 2012-03-05 2014-08-20 日本電気株式会社 Clock phase synchronization apparatus and clock phase synchronization method
JP5965223B2 (en) * 2012-06-29 2016-08-03 ルネサスエレクトロニクス株式会社 Clock correction circuit and clock correction method

Also Published As

Publication number Publication date
JP2016184366A (en) 2016-10-20

Similar Documents

Publication Publication Date Title
JP5886015B2 (en) Time measuring device, microcontroller, program, and time measuring method
JP6268020B2 (en) Clock generation method and semiconductor device
EP2369438A1 (en) Calibration method of a real time clock signal
JP6481533B2 (en) Digitally controlled oscillator circuit
JP2005190482A (en) Dds circuit with arbitrary frequency control clock
JP5114218B2 (en) Frequency correction circuit and clock device using the same
CN104518759B (en) temperature compensated timing signal generator
JP5931152B2 (en) Timing signal generator with temperature compensation function
JP6500550B2 (en) Timer correction device, timer correction method and timer correction program
JP2004125574A (en) Testing apparatus and testing process
JP4487937B2 (en) Microcomputer
JP5914718B2 (en) Time base with oscillator, frequency division circuit and clock pulse suppression circuit
JP2001013179A (en) Measurement method for ring oscillator clock frequency, measurement circuit for ring oscillator clock frequency, and microcomputer
JP5294718B2 (en) Frequency converter
JP6274638B2 (en) Frequency adjustment circuit and frequency adjustment method
JP2022006391A (en) Frequency measuring device, microcontroller and electronic device
JP2014002105A (en) Physical quantity measurement device, physical quantity measurement method
JP4036114B2 (en) Clock generation circuit
JP7173833B2 (en) Semiconductor integrated circuits and devices equipped with the semiconductor integrated circuits
JP5212317B2 (en) Analog electronic clock
JP2012191684A (en) Pulse generating circuit and motor device
JP6284727B2 (en) Clock phase shift circuit
JP5037285B2 (en) Pulse signal time measuring device
JP2006053008A (en) Timepiece and timepiece error adjustment method
JP2005037269A (en) Shift clock generation device, timing generator and testing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180215

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180831

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180918

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181102

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20190219

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190304

R150 Certificate of patent or registration of utility model

Ref document number: 6500550

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150