JPS62152044A - Control method for hardware timer - Google Patents

Control method for hardware timer

Info

Publication number
JPS62152044A
JPS62152044A JP60291976A JP29197685A JPS62152044A JP S62152044 A JPS62152044 A JP S62152044A JP 60291976 A JP60291976 A JP 60291976A JP 29197685 A JP29197685 A JP 29197685A JP S62152044 A JPS62152044 A JP S62152044A
Authority
JP
Japan
Prior art keywords
timer
value
counter
register
count
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.)
Granted
Application number
JP60291976A
Other languages
Japanese (ja)
Other versions
JPH0467656B2 (en
Inventor
Susumu Nanba
難波 進
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.)
Toshiba Corp
Toshiba Computer Engineering Corp
Original Assignee
Toshiba Corp
Toshiba Computer Engineering 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 Toshiba Corp, Toshiba Computer Engineering Corp filed Critical Toshiba Corp
Priority to JP60291976A priority Critical patent/JPS62152044A/en
Publication of JPS62152044A publication Critical patent/JPS62152044A/en
Publication of JPH0467656B2 publication Critical patent/JPH0467656B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To improve the throughput of a system by using the hardware function to perform the request for start of a timer, the control of the timer and the management of the timer and therefore omitting a fixed interruption for control of the timer and also decreasing the generating frequency of instructions. CONSTITUTION:The set value of a timer is set to a register 12 with the first timer start request and a counter 11 starts its action. If no timer start request is received while the counter 11 is working, an interruption request is produced from a comparator 14 when the count value of the counter 11 reaches the set value. While the count value is subtracted from the set value of the register 12 and the remaining time value is obtained when a timer start request is received during the working of the timer 11. Then the obtained time value is compared with the timer set value obtained by a new timer start request. If the new set value is smaller than the old set value, the timer set value stored in the register 12 is saved temporarily, and the count value of the timer 11 is added to the value set newly by a timer start request. Thus the new set value is set to the register 12.

Description

【発明の詳細な説明】 し産業上の利用分野コ 本発明は、情報処理装置に・於いて、単一のハードウェ
アタイマを論理的に多重化して用いるタイマ機構の制御
方法に係り、特にタイマカウント制御の割込み発生頻度
を大幅に低減してシステムスルーブツトの向上が計れる
ハードウェアタイマの制御方法に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a method for controlling a timer mechanism in an information processing device that logically multiplexes a single hardware timer, and particularly relates to a method for controlling a timer mechanism that logically multiplexes a single hardware timer in an information processing device. This invention relates to a hardware timer control method that can significantly reduce the frequency of count control interrupts and improve system throughput.

[従来の技術] 単一のハードウェアタイマを論理的に多重化して用いる
タイマ機構の制御手法として、従来では、タイマの設定
時間に拘らず一定の時間間隔で割込みを発生させて、制
御テーブル上に登録された各ソフトウェアタイマの設定
時間を減算してゆき、その値が[0]になったものがタ
イムアウトであると検知する。
[Prior Art] Conventionally, as a control method for a timer mechanism that logically multiplexes a single hardware timer, interrupts are generated at fixed time intervals regardless of the set time of the timer, and the information on the control table is The set time of each software timer registered in is subtracted, and when the value becomes [0], a timeout is detected.

しかしながら、上記したような従来のタイマ制御手段に
於いては次のような欠点をかあった。
However, the conventional timer control means as described above suffers from the following drawbacks.

即ち、上記したタイマ制御手段に於いては、一定時間@
陽で割込みを発生させて制御テーブル上に置かれたソフ
トウェアタイマの設定時間を減算してゆく構成であるこ
とから、一定時間毎の定期的な割込みが必要であり、従
って設定時間の単位を小さくとればとるほど割込みの発
生回数が増加し、これに伴ってシステムスループットの
低下を18 <という欠点を有していた。
That is, in the above-mentioned timer control means, the fixed time @
Since the configuration is such that an interrupt is explicitly generated and the set time of the software timer placed on the control table is subtracted, regular interrupts are required at fixed time intervals, and therefore the set time unit is made smaller. The more interrupts are taken, the more interrupts occur, resulting in a decrease in system throughput.

[発明が解決しようする問題点] 本発明は、単一のハードウェアタイマを論理的に多重化
して用いるタイマ機構に於いて、タイマカウント制御の
ための割込みの発生頻度を大幅に低減させ、これによっ
てシステムのスルーブツトを向上させることのできるハ
ードウェアタイマの制御方法を提供するものである。
[Problems to be Solved by the Invention] The present invention significantly reduces the frequency of occurrence of interrupts for timer count control in a timer mechanism that logically multiplexes a single hardware timer. The present invention provides a hardware timer control method that can improve system throughput.

[問題点を解決するための手段及び作用]本発明は、タ
イマ設定値を貯えるレジスタと、一定タイミングの時刻
信号を受けて計時カウントを行なうカウンタと、このカ
ウンタのカウント値が上記レジスタの設定値に達した際
に割込み要求を発生する比較器とでなるタイマハードウ
ェアを用意するとともに、上記カウンタがカウント動作
を実行しているとき、タイマ起動要求が発生すると、上
記レジスタに貯えられた設定値から上記カウンタの現カ
ウント値を差し引いたカウント残り時間の値と上記要求
による新たな設定値とを比較し、上記新たな設定値が゛
上記残り時間の値よりも小さいとき、上記レジスタに貯
えられている設定値をタイマカウント待ち状態として退
避させ、−上記新たな設定値に上記カウンタのカウント
値を加えた値を新たな比較対象として上記レジスタにセ
ットする制御手段と、上記新たな設定値が上記残り時間
の値よりも大きいとき、その新たな設定値をタイマカウ
ント待ち状態として退避させ、上記カウンタのカウント
値を変更せずにそのまま比較対象とする判面手段と、上
記比較器より割込み要求が発生した際、上記カウンタを
初期化し、上記タイマカウント待ち状態にある各タイマ
設定値から最小のタイマ設定値を検索し、同タイマ設定
値を新たな比較対象として上記レジスタにセットする手
段とを有して、タイマ起動要求それぞれのタイマ制御並
びにタイマ管理を実行するもので、これにより、上記ハ
ードウェア機能を有効活用し、タイマ制御のための一定
の割込みを必要とせずに、割込み発生傾度を大幅に低減
でき、これに伴ってシステムのスルーブツトを向上でき
る。
[Means and effects for solving the problems] The present invention includes a register for storing timer setting values, a counter for performing time counting in response to a time signal at a constant timing, and a count value of this counter that is equal to the setting value of the register. In addition to preparing timer hardware consisting of a comparator that generates an interrupt request when the above-mentioned counter is performing counting operation, when a timer start request occurs, the setting value stored in the above-mentioned register is The value of the remaining count time obtained by subtracting the current count value of the counter from the above is compared with the new setting value according to the above request, and if the new setting value is smaller than the remaining time value, it is stored in the register. a control means that saves the current set value as a timer count wait state, and sets a value obtained by adding the count value of the counter to the new set value in the register as a new comparison target; When the value of the remaining time is greater than the value of the remaining time, the new set value is saved as a timer count waiting state, and the count value of the counter is used as a comparison target without being changed; and an interrupt request is made from the comparator. means for initializing the counter, searching for the minimum timer setting value from among the timer setting values in the timer count waiting state, and setting the same timer setting value in the register as a new comparison target when the timer setting value occurs. This system performs timer control and timer management for each timer activation request, thereby making effective use of the above hardware functions and controlling the interrupt occurrence tendency without requiring constant interrupts for timer control. This can be significantly reduced, and the system throughput can be improved accordingly.

[実施例] 以下図面を参照して本発明の一実施例を説明する。[Example] An embodiment of the present invention will be described below with reference to the drawings.

第1図は本発明の一実施例を実現するためのハードウェ
ア構成を示すブロック図である。
FIG. 1 is a block diagram showing a hardware configuration for realizing an embodiment of the present invention.

第1図に於いて、11は図示しないハードウェア回路か
らの時刻信号(Tp)により+1ずつ増加するカウント
レジスタであり以下単にカウンタと称す。12はタイマ
起動要求に従うタイマ設定値(即ちカウンタ11が到達
すべき最大値)を貯える最大値レジスタであり、以下単
にレジスタと称す。
In FIG. 1, numeral 11 is a count register that increases by +1 in response to a time signal (Tp) from a hardware circuit (not shown), and is hereinafter simply referred to as a counter. Reference numeral 12 denotes a maximum value register that stores a timer setting value (that is, the maximum value that the counter 11 should reach) in accordance with a timer activation request, and is hereinafter simply referred to as a register.

13は上記カウンタ11の起動/停止副部を行なう制御
レジスタである614は上記カウンタ11のカウント値
とレジスタ12の設定値とを比較し、カウンタ11のカ
ウント値がレジスタ12の設定値に達することによって
割込み要求(IRQ)を発生する比較器である。
Reference numeral 13 denotes a control register for starting/stopping the counter 11. Reference numeral 614 compares the count value of the counter 11 with the set value of the register 12, and determines whether the count value of the counter 11 reaches the set value of the register 12. This is a comparator that generates an interrupt request (IRQ) based on the IRQ.

第2図乃至第7図はそれぞれ上記実施例の動作を説明す
るためのもので、第2図乃至第5図は各タイマ要素間の
時間関係を説明するための図、第6図及び第7図はそれ
ぞれ動作処理フローを示すフローチャートである。この
うち、第2図及び第3図はそれぞれ上記カウンタ11が
上記レジスタ12に貯えられた設定値を最終カウント値
としてカウント動作を実行している際に、新たなタイマ
起動要求が発生した場合の各時間値を示したもので、第
2図は新たなタイマ起動要求による設定fa(設定時間
)T2が、レジスタ12の設定値からメインメモリ11
のカウント値を差し引いた残りの時間値TLよりも灼い
(TL >T2 )場合であり、第3図は新たなタイマ
起動要求による設定値(設定時間)T2が、レジスタ1
2の設定値からメインメモリ11のカウント値を差し引
いた残りの時間値TLよりも長い(TL <T2 )場
合である。ここで、第2図の場合(即ちTL>T2の場
合)は通信チャネル12のタイマ設定1aが変更され、
第3図の場合(即ちTL≦T2の場合)はタイマ設定値
が変更されない。
FIGS. 2 to 7 are for explaining the operation of the above embodiment, respectively. FIGS. 2 to 5 are for explaining the time relationship between each timer element, and FIGS. Each figure is a flowchart showing the operation processing flow. Of these, FIGS. 2 and 3 show cases in which a new timer activation request occurs while the counter 11 is executing a counting operation using the set value stored in the register 12 as the final count value. Each time value is shown in FIG.
This is a case where the remaining time value TL after subtracting the count value of TL is longer than the remaining time value TL (TL > T2), and in FIG.
This is a case where the time is longer than the remaining time value TL obtained by subtracting the count value of the main memory 11 from the set value of 2 (TL<T2). Here, in the case of FIG. 2 (that is, when TL>T2), the timer setting 1a of the communication channel 12 is changed,
In the case of FIG. 3 (ie, TL≦T2), the timer setting value is not changed.

又、第4図、及び第5図は割込み発生時と割込み発生後
のカウンタ11及びレジスタ12の設定状態の変化を示
したもので、第4図は割込み発生時(即ちカウンタ11
のカウント値がレジスタ12の設定値に達した際の比較
器14からの割込み要求(IRQ>出力時)、第5図は
その割込み発生後であり、Tr 、T2 、T3はそれ
ぞれタイマ起動要求によるタイマ設定値を示している。
4 and 5 show changes in the setting states of the counter 11 and the register 12 when an interrupt occurs and after the interrupt occurs.
An interrupt request from the comparator 14 when the count value reaches the set value of the register 12 (when IRQ>output), Figure 5 shows the result after the interrupt has occurred, and Tr, T2, and T3 are each caused by a timer activation request. Indicates the timer setting value.

又、第6図は上記実施例に於ける新たなタイマ起動要求
時の処理フロー、第7図は割込み要求(I RQ)発生
時の処理フローをそれぞれ示している。図中、Tcは現
時点におけるタイマカウントの比較対象となってる(カ
ウンタ11に貯えられている)タイマ設定値、TNは新
たなタイマ起動要求によるタイマ設定値、Toはタイマ
カウント持ちとして一時退避されるタイマ設定値、Cは
カウンタ11のカウント値、Rはレジスタ12の設定値
である。
Further, FIG. 6 shows the processing flow when a new timer activation request is made in the above embodiment, and FIG. 7 shows the processing flow when an interrupt request (IRQ) is generated. In the figure, Tc is the timer setting value (stored in counter 11) that is compared with the current timer count, TN is the timer setting value due to a new timer activation request, and To is temporarily saved as having the timer count. The timer setting value, C is the count value of the counter 11, and R is the setting value of the register 12.

ここで上記各図を参照しなから一実施例の動作を説明す
る。
Here, the operation of one embodiment will be explained without reference to the above figures.

初期状態に於いて、カウンタ11は制御レジスタ13の
制御によりカウント動作を停止している。従って比較器
14からは割込み要求(IRQ>が発生されない。
In the initial state, the counter 11 stops counting under the control of the control register 13. Therefore, the comparator 14 does not generate an interrupt request (IRQ>).

最初のタイマ起動要求でそのタイマ設定値がレジスタ1
2に設定され、カウンタ11がカウント動作を開始する
At the first timer activation request, the timer setting value is registered in register 1.
2, and the counter 11 starts counting.

ここで、上記カウンタ11がカウント動作を実行中にタ
イマ起動要求がなければ、カウンタ11のカウント値が
レジスタ12の設定値に達することによって、比較器1
4より割込み要求(IRQ>が発生する。
Here, if there is no timer activation request while the counter 11 is executing the counting operation, the count value of the counter 11 reaches the set value of the register 12, and the comparator 1
An interrupt request (IRQ> is generated from 4).

又、上記カウンタ11がカウント動作を実行中にタイマ
起動要求があると、第6図に示す処理が実行される。
Further, when a timer activation request is received while the counter 11 is performing a counting operation, the process shown in FIG. 6 is executed.

この処理は、先ず、レジスタ12の設定値<Tcからカ
ウンタ11のカウント値(C)を差し引いたカウント残
りの時間値(TL )を求め、この残りの時間1ifl
 (TL )と新たなタイマ起動要求によるタイマ設定
値(TN )とを比較する。
This process first calculates the remaining time value (TL) by subtracting the count value (C) of the counter 11 from the set value of the register 12<Tc, and then calculates the remaining time value (TL).
(TL) and the timer setting value (TN) based on the new timer activation request.

ここで、新たなタイマ起動要求によるタイマ設定値(T
N)が残りの@闇値(TL)よりも小さい(TN<TL
)ときは、レジスタ12に貯えられているタイマ設定[
(Tc )をタイマカウント待ち状態として一時退避さ
せ(To +Tc ) 、新たなタイマ起動要求による
タイマ設定l1a(TN)にカウンタ11のカウントm
 (C)を加えた新たなタイマ設定値をレジスタ12に
セット(R4−TN 十〇)する。
Here, the timer setting value (T
N) is smaller than the remaining @darkness value (TL) (TN<TL
), the timer setting stored in register 12 [
(Tc) is temporarily saved as a timer count waiting state (To +Tc), and the count m of the counter 11 is set to the timer setting l1a (TN) by a new timer activation request.
A new timer setting value including (C) is set in register 12 (R4-TN 10).

これにより、以後は新たなタイマ起動要求によるタイマ
設定値(TN )を対象にタイマカウントが開始される
As a result, from now on, timer counting is started using the timer setting value (TN) based on a new timer activation request.

この際の各タイマ要素の時間関係を第2図に示している
。ここでは新たなタイマ起動要求によるタイマ設定1i
fi(TN)をT2で示している。
The time relationship of each timer element at this time is shown in FIG. Here, timer setting 1i by new timer start request
fi(TN) is indicated by T2.

又、上記析たなタイマ起動要求によるタイマ設定値(T
N)が残りの時fi!III(TL)よりも大きい(T
N >TL )ときは、新たなタイマ起動要求によるタ
イマ設定値(TN )をタイマカウント待ち状態として
一時退避させ(To 4−TN ) 、現行のタイマ設
定1ifl (Tc )を対象にタイマカウントを継続
する。
Also, the timer setting value (T
N) remains fi! III (TL) is larger (T
When N > TL), the timer setting value (TN) due to a new timer activation request is temporarily saved as a timer count wait state (To 4-TN), and the timer count continues with the current timer setting 1ifl (Tc). do.

この際の各タイマ要素の時間関係を第3図に示している
The time relationship of each timer element at this time is shown in FIG.

次に、カウンタ11のカウント値がレジスタ12の設定
直に達して比較器14より割込み要求(IRQ>が発生
されると第7図に示す処理が実行される。
Next, when the count value of the counter 11 reaches the setting of the register 12 and an interrupt request (IRQ> is generated from the comparator 14), the processing shown in FIG. 7 is executed.

この処理は、先ず、一時退避されたタイマ設定fi1(
To)がそれぞれ上記カウンタ11のカウント値(C)
だけ差し引かれ(To←To−C)、その後、カウンタ
11が初期化(クリア)される。
This process begins with the temporarily saved timer setting fi1 (
To) is the count value (C) of the counter 11, respectively.
(To←To−C), and then the counter 11 is initialized (cleared).

そして一時退避された各タイマ設定値(To 。Then, each timer setting value (To) is temporarily saved.

To、・・・)のうちから、最も小さな設定値を検索し
、これを新たなタイマ設定値としてレジスタ12にセッ
トする。
), the smallest setting value is searched and set in the register 12 as a new timer setting value.

これにより、以後は一時退避されたタイマ設定値を対象
に再び新たなタイマカウントが開始される。
As a result, a new timer count is started again using the temporarily saved timer setting value.

この際の割込み要求(IRQ)発生時のカウンタ11、
及びレジスタ12の各状態を第4図に示し、同側込み発
生後の同状態を第5図に示している。
The counter 11 when an interrupt request (IRQ) is generated at this time,
FIG. 4 shows the states of the register 12 and the register 12, and FIG. 5 shows the same state after the occurrence of the same side interference.

尚、ここでは一時退避された各タイマ設定値(To 、
 To 、・・・)をT1.T2 、T3として示して
いる。
Note that each timer setting value (To,
To,...) to T1. They are shown as T2 and T3.

上記したような処理が各事象発生毎に繰返し実行され、
単一のハードウェアタイマを論理的に多重化して用いた
タイマが機能する。
The above-mentioned process is repeatedly executed for each event occurrence,
The timer functions by logically multiplexing a single hardware timer.

上述の如くしてタイマ処理が実行されることから、一定
時間毎の割込みを必要とせず、割込みの発生頻度を低減
してシステムのスルーブツトを向上できる。
Since the timer processing is executed as described above, it is not necessary to interrupt at regular intervals, and the frequency of occurrence of interrupts can be reduced to improve the throughput of the system.

尚、上記した実施例は、カウンタ11を時刻信号(Tp
)に従いカウントアツプする動作を例にとったが、例え
ばタイマ起動に際して、設定値をカウンタにセットし、
タイマ起動時に上記カウンタ11を時刻信号(Tp )
に従い減算カウントしてゆく構成としても上記実施例と
同様のタイマ動(ヤを実現できる。
Incidentally, in the embodiment described above, the counter 11 is connected to the time signal (Tp
), but for example, when starting a timer, a set value is set in the counter,
When the timer starts, the counter 11 is sent to the time signal (Tp).
The same timer operation as in the above embodiment can also be realized by using a configuration in which the count is subtracted according to the number of seconds.

[発明の効果] 以上詳記したように本発明によるハードウェアタイマの
制御方法によれば、単一のハードウェアタイマを論理的
に多重化して用いるタイマ機構に於いて、タイマ設定値
を貯えるレジスタと、一定タイミングの時刻信号を受け
て計時カウントを行なうカウンタと、このカウンタのカ
ウント値が上記レジスタの設定値に達した際に割込み要
求を発生する比較器とでなるタイマハードウェアを用意
するとともに、上記カウンタがカウント動作を実行して
いるとき、タイマ起動要求が発生すると、上記レジスタ
に貯えられた設定値から上記カウンタの現カウント値を
差し引いたカウント残り時間の値と上記要求による新た
な設定値とを比較し、上記新たな設定値が上記残り時間
の値よりも小さいとき、上記レジスタに貯えられている
設定値をタイマカウント待ち状態として退避させ、上記
新たな設定値に上記カウンタのカウント値を加えた値を
新たな比較対象として上記レジスタにセットする制御手
段と、上記新たな設定値が上記残り時間の値よりも大き
いとき、その新たな設定値をタイマカウント待ち状態と
して退避させ、上記カウンタのカウント値を変更せずに
そのまま比較対象とする制御手段と、上記比較器より割
込み要求が発生した際、上記カウンタを初期化し、上記
タイマカウント待ち状態にある各タイマ設定値から最小
のタイマ設定値を検索し、同タイマ設定値を新たな比較
対象として上記レジスタにセットする手段とを有して、
タイマ起動要求それぞれのタイマ制御並びにタイマ管理
を実行することにより、上記ハードウェア機能を有効活
用し、タイマ制御のための一定の割込みを必要とせずに
、割込み発生@度を大幅に低減でき、これに伴ってシス
テムのスルーブツトを向上できる。
[Effects of the Invention] As detailed above, according to the hardware timer control method of the present invention, in a timer mechanism that logically multiplexes a single hardware timer, a register for storing timer setting values is used. In addition, we prepare timer hardware consisting of a counter that performs time counting in response to a time signal at a fixed timing, and a comparator that generates an interrupt request when the count value of this counter reaches the set value of the above register. , When a timer start request is generated while the above counter is executing a counting operation, the value of the remaining count time obtained by subtracting the current count value of the above counter from the set value stored in the above register and the new setting according to the above request. If the new set value is smaller than the remaining time value, the set value stored in the register is saved as a timer count wait state, and the counter is set to the new set value. a control means for setting the added value in the register as a new comparison target; and when the new set value is larger than the remaining time value, the new set value is saved as a timer count waiting state; A control means that uses the count value of the counter as it is for comparison without changing it, and when an interrupt request is generated from the comparator, initializes the counter and calculates the minimum value from each timer setting value in the timer count waiting state. means for searching for a timer setting value and setting the same timer setting value in the register as a new comparison target;
By executing timer control and timer management for each timer activation request, the above hardware functions can be effectively used, and the frequency of interrupts can be significantly reduced without the need for constant interrupts for timer control. Accordingly, the system throughput can be improved.

【図面の簡単な説明】[Brief explanation of drawings]

図は本発明の一実施例を説明するためのもので、第1図
はハードウェア構成を示すブロック図、第2図乃至第5
図はそれぞれ各タイマ要素相互に於ける時間関係を説明
するための図、第6図及び第7図はそれぞれ処理フ0−
を示すフローチャー1・である。 11・・・カウンタ(カウントレジスタ)、12・・・
レジスタ(最大値レジスタ)、13・・・制御レジスタ
、14・・・比較器。 出願人代理人 弁理士 鈴 江 武 彦第4図    
 第5図 第6図      第7図
The figures are for explaining one embodiment of the present invention, and FIG. 1 is a block diagram showing the hardware configuration, and FIGS.
Each figure is a diagram for explaining the time relationship between each timer element, and FIGS.
This is flowchart 1. 11... Counter (count register), 12...
Register (maximum value register), 13... control register, 14... comparator. Applicant's agent Patent attorney Takehiko Suzue Figure 4
Figure 5 Figure 6 Figure 7

Claims (1)

【特許請求の範囲】 単一のハードウェアタイマを論理的に多重化して用いる
タイマ機構に於いて、 タイマ設定値を貯えるレジスタと、一定タイミングの時
刻信号を受けて計時カウントを行なうカウンタと、この
カウンタのカウント値が上記レジスタの設定値に達した
際に割込み要求を発生する比較器とをもち、 上記カウンタがカウント動作を実行しているとき、タイ
マ起動要求が生じると、上記レジスタに貯えられた設定
値から上記カウンタの現カウント値を差し引いたカウン
ト残り時間の値を求めて、そのカウント残り時間の値と
上記要求による新たな設定値とを比較し、 上記新たな設定値が上記残り時間の値よりも小さいとき
、上記レジスタに貯えられている設定値をタイマカウン
ト待ち状態として退避させ、上記新たな設定値に上記カ
ウンタのカウント値を加えた値を新たな比較対象として
上記レジスタにセットし、 上記新たな設定値が上記残り時間の値よりも大きいとき
、その新たな設定値をタイマカウント待ち状態として退
避させ、上記カウンタのカウント値を変更せずにそのま
ま比較対象とし、 上記比較器より割込み要求が発生することにより、上記
カウンタを初期化し、上記タイマカウント待ち状態にあ
る各タイマ設定値から最小のタイマ設定値を検索し、同
タイマ設定値を新たな比較対象として上記レジスタにセ
ットするハードウェアタイマの制御方法。
[Claims] A timer mechanism that logically multiplexes a single hardware timer includes a register that stores timer setting values, a counter that performs time counting in response to a time signal at a fixed timing, and a register that stores timer setting values. It has a comparator that generates an interrupt request when the count value of the counter reaches the set value of the above register, and when a timer start request occurs while the above counter is performing counting operation, the timer start request is stored in the above register. The value of the remaining count time is calculated by subtracting the current count value of the counter from the set value, and the value of the remaining count time is compared with the new set value based on the above request, and the new set value is determined as the remaining time. When the value is smaller than the value, the set value stored in the above register is saved as a timer count wait state, and the value obtained by adding the count value of the above counter to the new set value is set in the above register as a new comparison target. However, when the new set value is greater than the remaining time value, the new set value is saved as a timer count wait state, and the count value of the counter is used as a comparison target without changing, and the comparator When an interrupt request is generated, the above counter is initialized, the minimum timer setting value is searched from among the timer setting values waiting for the timer count, and the same timer setting value is set in the above register as a new comparison target. How to control the hardware timer.
JP60291976A 1985-12-26 1985-12-26 Control method for hardware timer Granted JPS62152044A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60291976A JPS62152044A (en) 1985-12-26 1985-12-26 Control method for hardware timer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60291976A JPS62152044A (en) 1985-12-26 1985-12-26 Control method for hardware timer

Publications (2)

Publication Number Publication Date
JPS62152044A true JPS62152044A (en) 1987-07-07
JPH0467656B2 JPH0467656B2 (en) 1992-10-29

Family

ID=17775898

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60291976A Granted JPS62152044A (en) 1985-12-26 1985-12-26 Control method for hardware timer

Country Status (1)

Country Link
JP (1) JPS62152044A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012003611A (en) * 2010-06-18 2012-01-05 Denso Corp Time monitoring apparatus and method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012003611A (en) * 2010-06-18 2012-01-05 Denso Corp Time monitoring apparatus and method

Also Published As

Publication number Publication date
JPH0467656B2 (en) 1992-10-29

Similar Documents

Publication Publication Date Title
EP1786146B1 (en) Method and apparatus for saving power by controlling listening periods in wireless telecommunication device having a plurality of power-saving modes
EP0695987B1 (en) Improved timer for a data processor
JPS62152044A (en) Control method for hardware timer
JP2002207691A (en) Data transfer controller
JPS629418A (en) Timer control system
SU1709313A1 (en) Device for foregrounding calls
JPH0644086A (en) System for controlling time-out event output
JPH04205243A (en) Timer control method
JP2689778B2 (en) Runaway detection device for electronic control unit
JP2985180B2 (en) Wireless communication device
JP2002182930A (en) Interruption controller
JP2566002B2 (en) Task dispatching method
JPH05158710A (en) Timer managing system
US6674846B1 (en) Method and system for modem pulse dialing in a telecommunication system
JP2000312244A (en) Network interface switching method, its system and its recording medium
JPS60183659A (en) Information transfer control system
JPH09134294A (en) Interruption control circuit
JP2508277B2 (en) Method for determining the number of buffers that can be held
JPH06138984A (en) Information processor
JPH01228007A (en) Oscillation control device
JPH02159633A (en) Waiting queue controller
JPH0520102A (en) Priority changing system for resources acquisition waiting processing
JPS59111493A (en) Load control system
JPH02114360A (en) Clock synchronizing method for multiprocessor system
JPS63137314A (en) Timer control system