JP6769662B2 - Hardware timers, control methods and programs - Google Patents
Hardware timers, control methods and programs Download PDFInfo
- Publication number
- JP6769662B2 JP6769662B2 JP2019063957A JP2019063957A JP6769662B2 JP 6769662 B2 JP6769662 B2 JP 6769662B2 JP 2019063957 A JP2019063957 A JP 2019063957A JP 2019063957 A JP2019063957 A JP 2019063957A JP 6769662 B2 JP6769662 B2 JP 6769662B2
- Authority
- JP
- Japan
- Prior art keywords
- timer
- memory
- cpu
- time
- access
- 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
Links
Images
Landscapes
- Bus Control (AREA)
- Microcomputers (AREA)
Description
本発明は、ハードウェアタイマ、制御方法及びプログラムに関する。 The present invention relates to hardware timers, control methods and programs.
特許文献1は、タイムアウトバッファがフル状態の場合に、タイムアウトしたタイマの通知漏れを防ぐとともに、そのタイマについて本来のタイムアウトになるべき時間の情報を取得する技術について開示している。
また、特許文献2は、CPU(Central Processing Unit)からメモリへのアクセス要求が発生した場合に、CPUからメモリへのアクセスが許可され、CPUがメモリに対して、タイマ値のリード(Read)やライト(Write)の処理を行う技術について開示している。
Further, in
また、特許文献3は、タイマバッファに記憶されているタイマ値が、タイムアウトとなった場合に、そのタイマバッファの情報を、所定のテーブルから削除して、タイマバッファを解放する技術について開示している。
また、特許文献4は、タイマメモリに記憶されている複数のタイマ値のカウント処理が、時分割で行われることについて開示している。
Further,
Further,
しかし、特許文献1〜4では、CPUがタイマメモリにアクセス可能な第1の時間と、タイマがタイマメモリにアクセス可能な第2の時間とが、割り当てられている場合において、第2の時間中は、タイマがオフの場合であっても、第2の時間が経過した後でなければ、CPUは、タイマメモリにアクセスすることができなかった。
そのため、タイマメモリへのアクセスが、CPUとタイマにより時分割で行われる場合おいて、タイマメモリへのアクセスが、タイマに割り当てられている時間には、タイマメモリがオフの状態であっても、CPUによるタイマメモリのアクセスを行うことができず、CPUのタイマメモリの使用時間を増やすことはできなかった。
However, in
Therefore, when the access to the timer memory is performed by the CPU and the timer on a time-division basis, even if the timer memory is off during the time allotted to the timer, the access to the timer memory is performed. The timer memory could not be accessed by the CPU, and the usage time of the timer memory of the CPU could not be increased.
そこで、この発明は、上述の課題を解決するハードウェアタイマ、制御方法及びプログラムを提供することを目的としている。 Therefore, an object of the present invention is to provide a hardware timer, a control method, and a program that solve the above-mentioned problems.
本発明のいくつかの態様は、上述の課題を解決すべくなされたもので、本発明の第1の態様によるハードウェアタイマは、
中央演算処理装置によるタイマメモリへのアクセスが可能な第1の状態と、タイマによる前記タイマメモリへのアクセスが可能な第2の状態のいずれかを選択する選択部と、
前記中央演算処理装置が前記タイマメモリにアクセス可能な時間として割り当てられた第1の時間と、前記タイマが前記タイマメモリにアクセス可能な時間として割り当てられた第2の時間のうち、前記第2の時間内であっても、前記タイマがオフである場合には、前記選択部に、前記第1の状態を選択させる制御部と、
を備える。
Some aspects of the present invention have been made to solve the above-mentioned problems, and the hardware timer according to the first aspect of the present invention is a device.
A selection unit that selects either a first state in which the central processing unit can access the timer memory and a second state in which the timer can access the timer memory.
Of the first time allocated as the time that the central processing unit can access the timer memory and the second time allocated as the time that the timer can access the timer memory, the second time. A control unit that causes the selection unit to select the first state when the timer is off even within the time period.
To be equipped.
また、本発明の第2の態様によるハードウェアタイマの制御方法は、
中央演算処理装置によるタイマメモリへのアクセスが可能な第1の状態と、タイマによる前記タイマメモリへのアクセスが可能な第2の状態のいずれかを選択し、
前記中央演算処理装置が前記タイマメモリにアクセス可能な時間として割り当てられた第1の時間と、前記タイマが前記タイマメモリにアクセス可能な時間として割り当てられた第2の時間のうち、前記第2の時間内であっても、前記タイマがオフである場合には、前記第1の状態を選択する。
Further, the method for controlling the hardware timer according to the second aspect of the present invention is as follows.
One of the first state in which the central processing unit can access the timer memory and the second state in which the timer can access the timer memory is selected.
Of the first time allocated as the time that the central processing unit can access the timer memory and the second time allocated as the time that the timer can access the timer memory, the second time. Even within the time, if the timer is off, the first state is selected.
また、本発明の第3の態様によるプログラムは、中央演算処理装置によるタイマメモリへのアクセスが可能な第1の状態と、タイマによる前記タイマメモリへのアクセスが可能な第2の状態のいずれかを選択する選択手段、
前記中央演算処理装置が前記タイマメモリにアクセス可能な時間として割り当てられた第1の時間と、前記タイマが前記タイマメモリにアクセス可能な時間として割り当てられた第2の時間のうち、前記第2の時間内であっても、前記タイマがオフである場合には、前記選択手段に、前記第1の状態を選択させる制御手段、
として機能させる。
Further, the program according to the third aspect of the present invention has either a first state in which the central processing unit can access the timer memory and a second state in which the timer can access the timer memory. Selection means to select,
Of the first time allocated as the time that the central processing unit can access the timer memory and the second time allocated as the time that the timer can access the timer memory, the second time. A control means that causes the selection means to select the first state even within the time when the timer is off.
To function as.
本発明によれば、タイマメモリへのアクセスが、CPUとタイマにより時分割で行われる場合おいて、CPUによるタイマメモリの使用時間を増やすことができる。 According to the present invention, when the timer memory is accessed by the CPU and the timer in a time-division manner, the usage time of the timer memory by the CPU can be increased.
[第1の実施形態]
始めに、本発明の第1の実施形態について説明する。
図1は、本発明の第1の実施形態によるCPU10、及び、ハードウェアタイマ20の構成を示すブロック図である。
例えば、ハードウェアタイマ20は、携帯電話の基地局装置であって、複数のユーザ(子機)との通信制御を行う上でユーザ毎に時間を管理する基地局装置が備えるタイマとして用いられる。
ハードウェアタイマ20は、タイマ21、タイムアウトバッファ22、バス選択部23(選択部とも称する)、タイマメモリ24、タイマオン制御部25a(制御部とも称する)、バス26を備える。
[First Embodiment]
First, the first embodiment of the present invention will be described.
FIG. 1 is a block diagram showing a configuration of a
For example, the
The
CPU10は、バス26を介して、RAM(Random Access Memory)であるタイマメモリ24の記憶領域に、タイマ初期値をライト(Write)する。
CPU10は、タイマ21によってデクリメント(Decrement)されたタイマ値を、バス26を介して、タイマメモリ24からリード(Read)する。CPU10は、アドレスx(x=0〜nの整数)にライトしたタイマ値と、アドレスxからリードしたタイマ値との差分から、時間経過を求める。
The
The
CPU10は、タイムアウトバッファ22からの割り込み信号がアクティブ(Active)になると、タイムアウトバッファ22をリードして、タイムアウトしたタイマ番号を取得する。
なお、1個のタイマがデクリメントする周期は、(クロック周期)×(タイマ数)×(タイマサイクル数)の値以上とするため、(クロック周期)×(n+1)×(r+1)の値以上となる。例えば、クロック周期が10ns(ナノ秒)、タイマ数が、4096(n=4095)、タイマサイクル数が10(r=9)の場合には、1個のタイマがデクリメントする周期は、10ns×4096×10=0.4096ms以上となる。
When the interrupt signal from the
Since the cycle of decrementing by one timer is equal to or greater than the value of (clock cycle) × (number of timers) × (number of timer cycles), it is equal to or greater than the value of (clock cycle) × (n + 1) × (r + 1). Become. For example, when the clock cycle is 10 ns (nanoseconds), the number of timers is 4096 (n = 4095), and the number of timer cycles is 10 (r = 9), the cycle in which one timer decrements is 10 ns × 4096. × 10 = 0.4096 ms or more.
タイマ21は、タイマメモリ24から、タイマ値をリードし、リードしたタイマ値に基づき、タイムアウト、タイマ未使用、デクリメントのいずれの状態にあるかについて判定する。具体的には、タイマ21は、タイマメモリ24からリードしたタイマ値が‘0’の場合は、タイマ未使用と判定し、タイマ値が‘1’である場合には、タイムアウトと判定し、タイマ値が、‘0’又は‘1’以外の値である場合には、デクリメントと判定する。
タイマ21は、タイマ未使用と判定した場合は、何も処理を行わない。
The
When the
タイマ21は、タイムアウトと判定し、かつ、タイムアウトバッファ22の記憶領域に空きがある場合は、タイムアウトしたタイマ番号を、タイムアウト番号として、タイムアウトバッファライト信号をアクティブにして、タイムアウトバッファ22に出力する。それとともに、タイマ21は、ライトデータを‘0’にして、タイムアウトバッファ22にライトする。
タイマ21は、タイムアウトと判定した場合であって、タイムアウトバッファ22の記憶領域に空きがない場合は、何も処理を行わない。
タイマ21は、デクリメントと判定した場合には、リードしたタイマ値と同じアドレスに、デクリメントした値をライトする。
If the
The
When the
タイムアウトバッファ22は、一般的に用いられるFIFO(First In First Out)である。タイマ21から出力されるライト信号がアクティブになった場合には、タイムアウトバッファ22は、タイムアウトしたタイマ番号を記憶し、エンプティ(Empty)信号をネゲート(Negate)して、CPU10に対して割り込み信号を出力する。
タイムアウトバッファ22は、タイムアウトしたタイマ番号を、m(mは、正の整数)個記憶でき、タイムアウトバッファ22の記憶領域に空きがない場合には、フル信号をアクティブにすることにより、タイマ21が、タイムアウトバッファ22にライトしないようにする。
The
The
タイムアウトバッファ22は、CPU10のみから、リードアクセスを受けることが可能である。タイムアウトバッファ22がCPU10からリードされると、タイムアウトバッファ22は、タイマ21からライトされた順番に、タイマ番号を、CPU10に出力する。
タイムアウトバッファ22は、CPU10からリードされて、タイムアウトバッファ22の記憶領域が空になった場合には、エンプティ信号をアクティブにして、CPU10に対する割り込みを停止する。
The
The
バス選択部23は、CPU10からのタイマメモリ24へのアクセス信号と、タイマ21からのタイマメモリ24へのアクセス信号を、タイマ21からのサイクルカウント信号と、タイマオン制御部25aからの選択タイマオン信号に基づいて選択して、タイマメモリ24に出力する。
バス選択部23は、選択タイマオン信号がアクティブの場合には、タイマ21からのサイクルカウント信号の値で、CPU10とタイマ21の使用割合を時分割して固定的に決定する。バス選択部23は、時分割された時間に基づいて、CPU10の出力信号と、タイマ21の出力信号を交互に選択して、タイマメモリ24に出力する。
The
When the selection timer on signal is active, the
バス選択部23は、選択タイマオン信号がノンアクティブ(Non−Active)の場合には、時分割された時間に関係なく、CPU10からのアクセス信号を、タイマメモリ24に出力するとともに、タイマメモリ24に対するリードデータを、タイマ未使用を表す‘0’でマスクして出力する。
バス選択部23は、CPU10に割り当てられた時間に、CPU10からのアクセスがあった場合は、CPUアック(Ack)信号を、すぐにCPU10に返信する。一方、バス選択部23は、CPU10に割り当てられた時間外に、CPU10からのアクセスがあった場合は、CPUアック信号をすぐには返信せずに、CPU10を待機させ、CPU10に割り当てられた時間になった場合に、CPUアック信号をCPU10に返信する。
When the selection timer on signal is non-active, the
When the
タイマメモリ24は、タイマ値を記憶する。タイマメモリ24は、バス選択部23を介して、CPU10とタイマ21により、ライトとリードの処理が行われる。
タイマメモリ24のアドレス‘0’番地は、タイマ番号‘0’と1対1で対応付けられており、タイマメモリ24のアドレスnが、タイマ番号nとなる。
The
The address '0' of the
タイマオン制御部25aは、CPU10がタイマメモリ24にアクセスする信号と、タイムアウトバッファ22へのタイムアウト番号と、タイムアウトバッファライト信号とを、スヌープ(Snoop)して、タイマ値のデクリメント動作が行われているか否かを判定する。なお、タイマ値のデクリメント動作が行われている場合を、タイマオンと定義する。
タイマオン制御部25aは、CPU10がタイマメモリ24のタイマ番号x(x=0〜nの整数)に対してライトする際に、ライトデータ値が‘0’の場合は、タイマ番号xはタイマオフであると判定する。
Whether the timer-on
When the
また、タイマオン制御部25aは、CPU10がタイマメモリ24のタイマ番号xに対してライトする場合に、ライトデータ値が‘0’以外の場合は、タイマ番号xはタイマオンであると判定する。
また、タイマオン制御部25aは、タイマ21がタイムアウトバッファ22にタイマ番号xをライトする場合に、タイマ番号xはタイマオフであると判定する。
また、タイマオン制御部25aは、タイマ個数分のタイマオン/オフ情報を保持する1ビットのレジスタを備えており、タイマオン/オフ判定結果を、各タイマ番号に割り当てられたレジスタに保持する。
また、タイマオン制御部25aは、タイマ21から出力されるタイマ番号よって、対応するタイマ番号のレジスタを選択して、選択されたレジスタの値を選択タイマオン信号として、バス選択部23に出力する。
Further, the timer-on
Further, the timer-on
Further, the timer-on
Further, the timer-on
バス26は、CPU10、タイマ21、タイムアウトバッファ22、バス選択部23、タイマオン制御部25aに接続され、それらの間でデータのやり取りをするための信号線である。
The bus 26 is a signal line connected to the
図2は、本発明の第1の実施形態によるバス選択部23の構成を示すブロック図である。バス選択部23は、タイマ選択信号生成部231、CPU制御部232、セレクタ233、マスク制御部234を備える。
FIG. 2 is a block diagram showing a configuration of a
タイマ選択信号生成部231は、タイマ21からのタイマサイクルカウント信号に基づいて、CPU10とタイマ21によるタイマメモリ24の使用割合を時分割して固定的に決定したタイマ選択信号を生成し、マスク制御部234に出力する。
The timer selection
CPU制御部232は、CPU10からのタイマメモリ234へのアクセスを検出し、マスクタイマ選択信号が‘0’の場合は、すぐにCPU10に、CPUアック信号を出力する。一方、マスクタイマ選択信号が‘1’の場合は、CPU制御部232は、マスクタイマ選択信号が‘0’になるまで待機してから、CPU10にCPUアック信号を出力する。
CPU制御部232は、CPU10からのタイマメモリ234へのライトアクセスを検出して、CPUアック信号にタイミングを合わせたCPUリタイミングライト(Retiming Write)信号をセレクタ233に出力する。
CPU制御部232は、CPU10からタイマメモリ24へのリードアクセスを検出して、入力されたRAMリードデータを、CPUアック信号にタイミングを合わせたCPUリードデータとして出力する。
The
The
The
セレクタ233は、マスクタイマ選択信号の値が‘0’の場合は、CPU10のアドレス、データとCPUリタイミングライト信号を、タイマメモリ24に出力する。
また、セレクタ233は、マスクタイマ選択信号の値が‘1’の場合は、タイマ21のタイマ番号、タイマライトデータ、タイマライト信号を、タイマメモリ24に出力する。
When the value of the mask timer selection signal is '0', the
When the value of the mask timer selection signal is '1', the
マスク制御部234は、タイマ選択信号と、タイマオン制御部25aからの選択タイマオン信号に基づいて、タイマ21に出力するタイマリードデータの‘0’マスク制御や、マスクタイマ選択信号のマスク制御を行い、その制御結果を、CPU制御部232とセレクタ233に出力する。
マスク制御部234は、選択タイマオン信号が‘0’の場合は、タイマリードデータを‘0’にする。また、マスク制御部234は、マスクタイマ選択信号を‘0’にする。
マスク制御部234は、選択タイマオン信号が‘1’の場合は、タイマリードデータとして、RAMリードデータを出力する。また、マスク制御部234は、マスクタイマ選択信号として、タイマ選択信号を出力する。
The
The
When the selection timer on signal is '1', the
図3は、本発明の第1の実施形態によるタイマオン制御部25aの構成を示すブロック図である。タイマオン制御部25aは、CPUセットパルス生成部251、CPUクリアパルス生成部252、レジスタ部253a、信号選択部254、タイムアウトクリアパルス生成部255、クリアパルス合成部256を備える。
FIG. 3 is a block diagram showing a configuration of a timer-on
CPUセットアップパルス生成部251は、CPU10からのCPUアドレス、CPUデータと、バス選択部23からのCPUリタイミングライト信号に基づき、タイマメモリ24のタイマ番号x(x=0〜nの整数)に対してライトデータが‘0’以外のライトを行った場合に、セットパルスxをアクティブにする。
The CPU setup
CPUクリアパルス生成部252は、CPU10からのCPUアドレス、CPUデータと、バス選択部23からのCPUリタイミングライト信号に基づき、タイマメモリ24のタイマ番号x(x=0〜nの整数)に対してライトデータが‘0’のライトを行った場合に、クリアパルスxをアクティブにする。
The CPU clear
レジスタ部253aは、タイマ個数分のレジスタ253a−0、・・・、253a−nで構成され、対応するクリアパルスがアクティブの場合は、レジスタ値を‘0’とする。一方、レジスタ部253aは、対応するセットパルスがアクティブの場合は、レジスタ値を‘1’にセットする。レジスタ部253aは、レジスタ値を、タイマオン信号として、信号選択部254に出力する。
The
信号選択部254は、タイマ21からのタイマ番号に基づき、レジスタ部253aからのタイマオン信号を選択して、選択タイマオン信号として、バス選択部23に出力する。
The
タイムアウトクリアパルス生成部255は、タイマ21からのタイムアウト番号と、タイムアウトバッファライト信号に基づき、タイマメモリ24のタイマ番号x(x=0〜nの整数)に対してライトを行った場合に、クリアパルスxをアクティブにする。
The timeout clear
クリアパルス合成部256は、CPUクリアパルス生成部252のクリアパルスxと、タイムアウトクリアパルス生成部255からのクリアパルスxとの論理和をとって、レジスタ部253aに出力する。
The clear
図4は、本発明の第1の実施形態によるハードウェアタイマ20の動作を示すタイミングチャートである。
図4の符号(a)の信号は、クロック信号を示している。ここでは、クロック周期は、10ns(ナノ秒)である。
図4の符号(b)の信号は、RAMアドレス(タイマ番号)を示している。ここでは、0〜nの合計n+1個のタイマ番号からなる。各タイマ番号には、1クロックが割り当てられ、タイマ番号が、nまで進むと、タイマ番号が、0に戻る。
図4の符号(c)の信号は、タイマ選択信号を示している。タイマ選択信号は、RAMアドレス(タイマ番号)に対応するタイマが、オン(ON)であるか、オフ(OFF)であるかを示す。ここでは、タイマ番号0のタイマが、オンとなり、タイマ番号1のタイマが、オフとなり、タイマ番号2〜nのタイマが、オンとなる場合を示している。
FIG. 4 is a timing chart showing the operation of the
The signal of reference numeral (a) in FIG. 4 indicates a clock signal. Here, the clock period is 10 ns (nanoseconds).
The signal of reference numeral (b) in FIG. 4 indicates a RAM address (timer number). Here, it consists of a total of n + 1 timer numbers from 0 to n. One clock is assigned to each timer number, and when the timer number advances to n, the timer number returns to 0.
The signal of reference numeral (c) in FIG. 4 indicates a timer selection signal. The timer selection signal indicates whether the timer corresponding to the RAM address (timer number) is ON (ON) or OFF (OFF). Here, the case where the timer with the
図4の符号(d)の信号は、RAMアドレス(タイマ番号)を示している。
図4の符号(e)の信号は、タイマ選択信号を示している。
図4の符号(f)の信号は、タイマサイクルカウント信号を示している。タイマサイクルカウント信号は、0からrまで増加した後、0からrまでカウントする処理を繰り返す。
図4の符号(g)の信号は、バス選択動作信号を示している。バス選択動作信号は、CPU10とタイマ(TIMER)21のいずれかを選択するための信号である。ここでは、RAMアドレス(タイマ番号)が、1の場合であって、タイマサイクルカウントが、1から4の間は、タイマ21が選択され、タイマサイクルカウントが、5からrの間は、CPU10が選択される場合について示している。
なお、図4の符号(d)〜(g)の信号は、主に、符号(b)の信号のRAMアドレス(タイマ番号)が、1の部分を、拡大して示している。
The signal of reference numeral (d) in FIG. 4 indicates a RAM address (timer number).
The signal of reference numeral (e) in FIG. 4 indicates a timer selection signal.
The signal of reference numeral (f) in FIG. 4 indicates a timer cycle count signal. The timer cycle count signal increases from 0 to r, and then repeats the process of counting from 0 to r.
The signal of reference numeral (g) in FIG. 4 indicates a bus selection operation signal. The bus selection operation signal is a signal for selecting either the
The signals of reference numerals (d) to (g) in FIG. 4 are mainly shown by enlarging the portion where the RAM address (timer number) of the signal of reference numeral (b) is 1.
図4の符号(h)の信号は、符号(d)のRAMアドレス(タイマ番号)が、1の場合であって、タイマサイクルカウントが、1から4の場合を示しており、タイマ21で行われる処理を示している。ここでは、RAMアドレス(タイマ番号)が、1の場合であって、タイマサイクルカウントが、1から4の場合に、タイマ21が、タイマ値リード、タイマ値判定、タイマ値デクリメント、デクリメント値ライト(タイムアウトバッファライト)の処理を行う。
The signal of reference numeral (h) in FIG. 4 indicates a case where the RAM address (timer number) of reference numeral (d) is 1 and the timer cycle count is 1 to 4, and the
図5は、本発明の第1の実施形態によるタイマ21の動作を示すフローチャートである。タイマ21は、CPU10から、タイマ動作のオン設定の指示を受けているか否かについて判定する(ステップS101)。タイマ21が、CPU10から、タイマ動作のオン設定の指示を受けていない場合には(ステップS101でNo)、タイマ21は、再度、ステップS101の処理を行う。
タイマ21が、CPU10から、タイマ動作のオン設定の指示を受けている場合には(ステップS101でYes)、タイマ21は、ステップS102の処理を行う。
つまり、タイマ21は、タイマ番号0から、タイマアクセスを開始する(ステップS102)。そして、タイマ21は、タイマ値を、タイマメモリ24からリードする(ステップS103)。なお、タイマ21は、タイマ番号に対応するタイマ動作を停止している場合には、タイマサイクルカウント信号として‘0’を出力して、タイマ21からタイマメモリ24へのアクセスを禁止する。
FIG. 5 is a flowchart showing the operation of the
When the
That is, the
次に、タイマ21は、タイマ値が、0であるか否かについて判定する(ステップS104)。つまり、タイマ21は、タイマ値が、未使用の状態であるか否かについて判定する。タイマ21が、タイマ値が、0であると判定した場合には(ステップS104でYes)、タイマ21は、ステップS105の処理を行う。
つまり、タイマ21は、タイマ番号に、1を加算(インクリメント)する(ステップS105)。
Next, the
That is, the
そして、タイマ21は、タイマ番号が、最大の番号であるnであるか否かについて判定する(ステップS106)。タイマ21が、タイマ番号が、nではないと判定した場合には(ステップS106でNo)、タイマ21は、上述したステップS103の処理を行う。一方、タイマ21が、タイマ番号が、nであると判定した場合には(ステップS106でYes)、タイマ21は、ステップS107の処理を行う。
つまり、タイマ21は、CPU10から、タイマ動作のオフ設定の指示を受けているか否かについて判定する(ステップS107)。タイマ21が、CPU10から、タイマ動作のオフ設定の指示を受けている場合には(ステップS107でYes)、タイマ21は、図5に示すフローチャートの処理を終了し、動作を停止する。この場合、タイマ21は、タイマサイクルカウント信号を、‘0’にする。
Then, the
That is, the
一方、タイマ21が、CPU10から、タイマ動作のオフ設定の指示を受けていない場合には(ステップS107でNo)、タイマ21は、ステップS108の処理を行う。
つまり、タイマ21は、タイマ更新周期になったか否かについて判定する(ステップS108)。タイマ21が、タイマ更新周期になっていないと判定した場合には(ステップS108でNo)、タイマ21は、再度、ステップS108の処理を行う。
一方、タイマ21が、タイマ更新周期となったと判定した場合には(ステップS108でYes)、タイマ21は、タイマ番号を‘0’にして、上述したステップS102の処理を行う。
On the other hand, when the
That is, the
On the other hand, when the
一方、タイマ21が、タイマ値が、0ではないと判定した場合には(ステップS104でNo)、タイマ21は、ステップS109の処理を行う。
つまり、タイマ21は、タイマ値が、1であるか否かについて判定する(ステップS109)。タイマ21が、タイマ値が、1であると判定した場合には(ステップS109でYes)、タイマ21は、ステップS110の処理を行う。
つまり、タイマ21は、タイムアウトバッファ22がフルであるか否かについて判定する(ステップS110)。タイマ21が、タイムアウトバッファ22がフルであると判定した場合には(ステップS110でYes)、タイマ21は、上述したステップS105の処理を行う。
On the other hand, when the
That is, the
That is, the
一方、タイマ21が、タイムアウトバッファ22がフルではないと判定した場合には(ステップS110でNo)、タイマ21は、ステップS111の処理を行う。
つまり、タイマ21は、タイマ値から1を減算(デクリメント)する(ステップS111)。
そして、タイマ21は、タイマ値を、タイマメモリ24にライトするとともに、タイムアウトバッファ22に、タイマ番号をライトし(ステップS112)、上述したステップS105の処理を行う。
On the other hand, when the
That is, the
Then, the
一方、タイマ21が、タイマ値が、1ではないと判定した場合には(ステップS109でNo)、タイマ21は、ステップS113の処理を行う。
つまり、タイマ21は、タイマ値から1を減算する(ステップS113)。
そして、タイマ21は、タイマ値を、タイマメモリ24にライトし(ステップS114)、上述したステップS105の処理を行う。
On the other hand, when the
That is, the
Then, the
図6は、本発明の第1の実施形態によるタイマオン制御部25aのレジスタ部253aの動作を示すフローチャートである。
始めに、レジスタ部253aは、タイマ番号が更新されたか否かについて判定する(ステップS201)。レジスタ部253aが、タイマ番号が更新されていないと判定した場合には(ステップS201でNo)、レジスタ部253aは、再度、ステップS201の処理を行う。
一方、レジスタ部253aが、タイマ番号が更新されたと判定した場合には(ステップS201でYes)、レジスタ部253aは、ステップS202の処理を行う。
FIG. 6 is a flowchart showing the operation of the
First, the
On the other hand, when the
つまり、レジスタ部253aは、CPU10から、タイマメモリ24への更新があったか否かについて判定する(ステップS202)。
レジスタ部253aが、CPU10から、タイマメモリ24への更新があったと判定した場合には(ステップS202でYes)、レジスタ部253aは、ステップS203の処理を行う。
That is, the
When the
つまり、レジスタ部253aは、CPU10から、ライトデータ値‘0’以外のライトがあったか否かについて判定する(ステップS203)。
レジスタ部253aが、CPU10から、ライトデータ値‘0’以外のライトがあったと判定した場合には(ステップS203でYes)、レジスタ部253aは、タイマ番号xのレジスタを、タイマオンに設定する(ステップS204)。
一方、レジスタ部253aが、CPU10から、ライトデータ値‘0’以外のライトがないと判定した場合には(ステップS203でNo)、レジスタ部253aは、タイマ番号xのレジスタを、タイマオフに設定する(ステップS206)。
That is, the
When the
On the other hand, when the
なお、レジスタ部253aが、CPU10から、タイマメモリ24への更新がないと判定した場合には(ステップS202でNo)、レジスタ部253aは、ステップS205の処理を行う。
つまり、レジスタ部253aは、タイマ21から、タイムアウトバッファ22への更新があったか否かについて判定する(ステップS205)。
レジスタ部253aが、タイマ21から、タイムアウトバッファ22への更新があったと判定した場合には(ステップS205でYes)、レジスタ部253aは、上述したステップS206の処理を行う。
一方、レジスタ部253aが、タイマ21から、タイムアウトバッファ22への更新がなかったと判定した場合には(ステップS205でNo)、レジスタ部253aは、上述したステップS201の処理を行う。
If the
That is, the
When the
On the other hand, when the
図7は、本発明の第1の実施形態によるタイマオン制御部25aの信号選択部254の動作を示すフローチャートである。
始めに、信号選択部254は、タイマ番号xが更新されたか否かについて判定する(ステップS301)。信号選択部254が、タイマ番号xが更新されていないと判定した場合には(ステップS301でNo)、信号選択部254は、再度、ステップS301の処理を行う。
一方、信号選択部254が、タイマ番号xが更新されたと判定した場合には(ステップS301でYes)、信号選択部254は、ステップS302の処理を行う。
FIG. 7 is a flowchart showing the operation of the
First, the
On the other hand, when the
つまり、信号選択部254は、タイマ番号xが示すレジスタ値が、オンとオフのいずれの状態であるかについて判定する(ステップS302)。
信号選択部254が、タイマ番号xが示すレジスタ値が、オンであると判定した場合には(ステップS302でオン)、信号選択部254は、タイマ21が、タイマメモリ24にアクセスできるように、バス選択部23を切り替え(ステップS303)、上述したステップS301の処理を行う。
一方、信号選択部254が、タイマ番号xが示すレジスタ値が、オフであると判定した場合には(ステップS302でオフ)、信号選択部254は、CPU10が、タイマメモリ24にアクセスできるように、バス選択部23を切り替え(ステップS304)、上述したステップS301の処理を行う。
That is, the
When the
On the other hand, when the
なお、本実施形態によるハードウェアタイマ20の動作について、以下に説明する。
最初に、CPU10は、タイマ数分のアドレスエリアを持つタイマメモリ24のタイマ番号xに、タイマ初期値を設定する。
タイマ値の最大値は、タイマメモリ24のデータ幅で決定される。例えば、タイマメモリ24のデータ幅が、16ビットの場合には、タイマ値の最大値は、65535なので、ハードウェアタイマ20は、(タイマ更新周期)×(65535)の値まで計数可能となる。
The operation of the
First, the
The maximum value of the timer value is determined by the data width of the
バス選択部23は、CPU10からタイマメモリ24へのライトアクセスを検出して、CPU10がタイマメモリ24にアクセス可能な時間のみ、CPUアック信号を生成し、タイマメモリ24にCPUアドレスと、CPUデータと、リタイミングしたライト信号とを出力する。バス選択部23から出力されるアドレス及びデータや、タイマ初期値は、タイマメモリ24にライトされる。
タイマ初期値のライトが終了した後、CPU10は、タイマ動作のオンを設定する(図5ステップS101でYes)。タイマ21は、CPU10からのタイマ動作オン設定を検出して、タイマサイクルカウントのインクリメントを開始する。タイマサイクルカウントでは、0〜rの値が繰り返される。
The
After the write of the initial value of the timer is finished, the
タイマサイクルカウントが0に戻るたびに、タイマ番号(RAMアドレス)はインクリメントされる。
タイマ更新周期毎に、タイマ0からタイマnまでのタイマ番号が出力される(図5のステップS103〜S106)。タイマ21は、図4の符号(f)及び(h)で示すように、タイマサイクルカウントの1〜4の4クロックの間に、タイマ値リード、タイマ値判定、タイマ値デクリメント、デクリメント値ライト(タイムアウトバッファライト)の処理を行う。
タイマオン制御部25aは、CPU10がタイマメモリ24にアクセスする信号と、タイムアウトバッファ22へのタイムアウト番号と、タイムアウトバッファライト信号とを、スヌープして、タイマ値のデクリメント動作が行われているか否かを判定する。ここでは、タイマ値のデクリメント動作が行われている場合を、タイマオンと定義する。また、タイマオン以外の場合を、タイマオフと定義する。
Every time the timer cycle count returns to 0, the timer number (RAM address) is incremented.
The timer numbers from
The timer-on
タイマオン制御部25aは、CPU10がタイマメモリ24のタイマ番号x(x=0〜n)に対してライトする場合に、ライトデータ値が‘0’の場合は、タイマ番号xはタイマオフの状態にあると判定する。
タイマオン制御部25aは、CPU10がタイマメモリ24のタイマ番号xに対してライトする場合、ライトデータ値が‘0’以外の場合には、タイマ番号xはタイマオンの状態にあると判定する。
タイマオン制御部25aは、タイマ21がタイムアウトバッファ22にタイマ番号xをライトする場合に、タイマ番号xはタイマオフの状態にあると判定する。
タイマオン制御部25aは、タイマ個数分のタイマオン/オフ情報を保持する1ビットのレジスタを備えており、タイマオン/オフ判定結果を、対応するタイマ番号のレジスタに記録する。
When the
When the
When the
The timer-on
タイマオン制御部25aは、タイマ21からのタイマ番号に基づき、対応するタイマ番号のレジスタを選択して、選択されたレジスタの値を選択タイマオン信号としてバス選択部23に出力する。
バス選択部23は、選択タイマオン信号が‘1’の場合は、タイマ21がオンの状態にあると判定し、タイマサイクルカウントの1〜4の時間で、タイマ21にタイマメモリ24へのアクセスを許可する。一方、バス選択部23は、選択タイマオン信号が‘0’の場合は、タイマ21がオフの状態にあると判定し、タイマサイクルカウントの1〜4の時間であっても、CPU10にタイマメモリ24へのアクセスを許可する(図4の符号(b)及び(d)のタイマ番号1の区間)。
この場合、CPU10にタイマメモリ24へのアクセスを許可している時間は、タイマ21には、タイマメモリ24をリードしているように見せるために、タイマメモリ24のリードデータを‘0’にマスクする。
The timer-on
When the selection timer on signal is '1', the
In this case, the time when the
タイマ21は、タイマ値をリードした後に、タイマ値が‘1’かつタイムアウトバッファ22がフルでない場合は、タイムアウトと判定して、タイマ値をデクリメントして、デクリメントしたタイマ値をタイマメモリ24にライトするとともに、タイムアウトバッファ22にタイマ番号をライトする。
タイマ21は、タイマ値をリードした後に、タイマ値が‘1’かつタイムアウトバッファ22がフルの場合は、何も処理を行わずに、次の同じタイマ番号のタイマ値をリードした場合に、タイムアウトバッファ22がフルの状態であるか否かを確認する。
After reading the timer value, if the timer value is '1' and the
After reading the timer value, the
タイムアウトバッファ22は、タイマ番号がライトされた場合に、CPU10に対して割り込みをアクティブにする。
CPU10は、タイムアウトの割り込みがアクティブになると、タイムアウトバッファ22をリードすることで、タイマ番号を取得することができる。
なお、ここでは、タイマ初期値を、タイマメモリ24にライトしてから、タイマ21に対してタイマ動作のオン設定を行う場合について説明したが、タイマ動作のオン設定を先に行って、タイマ動作が始まってから、タイマ初期値をライトするようにしても良い。
The
When the timeout interrupt becomes active, the
Here, the case where the timer initial value is written to the
タイマ21の他の使用方法として、タイムアウトさせることなく、時間経過を観測する方法について説明する。ここでは、CPU10が、時間計測する処理を処理yとする。
CPU10は、タイマ動作中に、タイマメモリ24のアドレスx(タイマ番号x)に初期値をライトして、処理yを行った後、タイマメモリ24のアドレスxをリードして、初期値と、リードしたタイマ値との差分をとることで、処理yの時間を、タイマ更新周期単位で計測することができる。
As another method of using the
During the timer operation, the
本発明の第1の実施形態によれば、タイマメモリ24へのアクセスが、CPU10とタイマ21により時分割で行われる場合であって、タイマメモリ24がオフの状態である場合に、CPU10は、タイマメモリ24に割り当てられた時間が経過するのを待つことなく、タイマメモリ24にアクセスすることができる。そのため、CPU10によるタイマメモリ24の使用時間を増やすことができる。
According to the first embodiment of the present invention, when the
また、タイマオン制御部25aとバス選択部23によりマスク制御を行うことで、タイマ値をライトしていないアドレスは、タイマ21からは‘0’がリードされるため、タイマメモリ24の初期化を不要とすることができる。
また、タイマ数が多い大規模なハードウェアタイマ20を用いる場合であって、CPU10が、タイマメモリ24からタイマ値をライトしたりリードしたりして、タイマ値のライトアクセスやリードアクセスに時間かかる場合であっても、CPU10によるタイマメモリ24の使用時間を増やすことができるため、バス26の性能低下を避けることができる。
Further, by performing mask control by the timer on
Further, when a large-
次に、本発明の第2の実施形態について説明する。なお、第2の実施形態が、第1の実施形態と同様である部分については、それらの処理を説明する。
第1の実施形態では、ハードウェアタイマ20は、タイマオン制御部25aを備えていたが、第2の実施形態によるハードウェアタイマ20は、タイマオン制御部25bを備える点で異なっている。
Next, a second embodiment of the present invention will be described. In addition, about the part where the 2nd Embodiment is the same as the 1st Embodiment, those processings will be described.
In the first embodiment, the
図8は、本発明の第2の実施形態によるタイマオン制御部25bの構成を示すブロック図である。タイマオン制御部25bは、CPUセットパルス生成部251、CPUクリアパルス生成部252、レジスタ部253a、信号選択部254を備えている。
タイマオン制御部25b(図8)では、第1の実施形態によるタイマオン制御部25a(図3)において、タイムアウトクリアパルス生成部255、クリアパルス合成部256が省略されている。第2の実施形態では、タイムアウトバッファ22からのタイムアウト番号と、タイムアウトバッファライト信号を使用しないようになっている。
FIG. 8 is a block diagram showing a configuration of a timer-on
In the timer-on
第2の実施形態によるハードウェアタイマ20では、CPU10がタイマメモリ24にアクセスできる時間は減るものの、タイムアウトしたタイマ番号のタイマオフを判定する構成を設ける必要が無いので、第1の実施形態と比較して、選択タイマオン信号のアクティブ区間が多くなる。そのため、第2の実施形態によるハードウェアタイマ20は、タイムアウトバッファ22を有さない回路にも適用することができる。
In the
次に、本発明の第3の実施形態について説明する。なお、第3の実施形態が、第1の実施形態と同様である部分については、それらの処理を説明する。
第1の実施形態では、ハードウェアタイマ20は、タイマオン制御部25aを備えていたが、第3の実施形態によるハードウェアタイマ20は、タイマオン制御部25cを備える点で異なっている。
Next, a third embodiment of the present invention will be described. In addition, about the part where the 3rd Embodiment is the same as the 1st Embodiment, those processings will be described.
In the first embodiment, the
図9は、本発明の第3の実施形態によるタイマオン制御部25cの構成を示すブロック図である。タイマオン制御部25cは、CPUセットパルス生成部251、レジスタ部253c、信号選択部254を備えている。
タイマオン制御部25c(図9)では、第2の実施形態によるタイマオン制御部25b(図8)において、CPUクリアパルス生成部252が省略されている。また、タイマオン制御部25c(図9)は、第2の実施形態によるレジスタ部253a(図8)の代わりに、レジスタ部253cを備えている。
FIG. 9 is a block diagram showing a configuration of a timer-on
In the timer-on
第3の実施形態によるタイマオン制御部25c(図9)は、CPU10からのライトアクセスによりタイマオン/オフ設定が可能な、タイマ個数分のレジスタ部253cを備える。レジスタ部253cは、タイマメモリ24以外のアドレスエリアに設けられ、CPUデータレジスタ設定が‘1’の場合は、タイマオンとされ、レジスタ設定が‘0’の場合は、タイマオフとされる。
The timer-on
第3の実施形態によるハードウェアタイマ20では、タイマ21とは別に、タイマ21と同じアドレス領域を設ける必要があるものの、タイマオフと設定したタイマ番号(アドレス)を、データスタック用に使用することができる。
In the
第3の実施形態において、CPUセットパルスは、タイマメモリ24以外のアドレスエリアにマップされたタイマ個数分のレジスタ部253cのセットパルスを生成する。CPUライトが‘1’の場合であって、CPUアドレスが任意のアドレスx(x=0〜nの整数)の場合に、セットパルスxをアクティブにする。
レジスタ部253cを構成するレジスタ253c−0〜253c−nは、セットパルスxがアクティブの場合に、CPUデータの1ビットをレジスタ253c−xに記録する。レジスタ253c−xの設定値は、タイマオン信号として信号選択部254に出力される。
信号選択部254は、タイマ21からのタイマ番号xの値に対応するタイマオン信号を選択して、選択タイマオン信号として、バス選択部23に出力する。
In the third embodiment, the CPU set pulse generates set pulses of the
The
The
次に、本発明の第4の実施形態について説明する。なお、第4の実施形態が、第1の実施形態と同様である部分については、それらの処理を説明する。
第1の実施形態では、ハードウェアタイマ20は、タイマオン制御部25aを備えていたが、第4の実施形態によるハードウェアタイマ20は、タイマオン制御部25dを備える点で異なっている。
Next, a fourth embodiment of the present invention will be described. In addition, about the part where the 4th Embodiment is the same as the 1st Embodiment, those processings will be described.
In the first embodiment, the
図10は、本発明の第4の実施形態によるタイマオン制御部25dの構成を示すブロック図である。タイマオン制御部25dは、CPUセットパルス生成部251、上限レジスタ301、下限レジスタ302、比較器303を備える。
なお、上限レジスタ301は、タイマ番号の上限値を記憶する。また、下限レジスタ302は、タイマ番号の下限値を記憶する。
FIG. 10 is a block diagram showing a configuration of a timer-on
The upper limit register 301 stores the upper limit of the timer number. Further, the
第1〜第3の実施形態では、タイマ個数分のレジスタが設けられていたが、第4の実施形態によるタイマオン制御部25dは、各タイマのオン/オフを保持するのではなく、タイマ番号の上限と下限を設定できる上限レジスタ301及び下限レジスタ302を、タイマメモリ24以外のアドレスエリアに設ける。そして、タイマオン制御部25dは、タイマ21からのタイマ番号が、下限から上限の範囲内にある場合は、選択タイマオン信号をアクティブにする。
第4の実施形態によれば、第1〜第3の実施形態と比較して、タイマ数分のレジスタを設ける必要がないので、ハードウェアタイマ20の回路規模を小さくすることができるとともに、タイマオフのエリアをデータスタック用に使用することができる。
なお、第4の実施形態では、タイマオンの領域は、初期化が必要になるが、タイマ21の動作中のCPU10からタイマメモリ24へのアクセスの効率を改善することができる。
In the first to third embodiments, registers corresponding to the number of timers are provided, but the timer on
According to the fourth embodiment, as compared with the first to third embodiments, it is not necessary to provide registers for the number of timers, so that the circuit scale of the
In the fourth embodiment, the timer-on area needs to be initialized, but the efficiency of access from the
なお、図10において、CPUセットパルス生成部251は、CPU10からのCPUアドレスとCPUライト信号に基づき、下限セットパルスのアドレスである場合に、下限セットパルスをアクティブにする。
CPUセットパルス生成部251は、CPU10からのCPUアドレスとCPUライト信号に基づき、上限セットパルスのアドレスである場合に、上限セットパルスをアクティブにする。
In FIG. 10, the CPU set
The CPU set
上限レジスタ301は、上限セットパルスがアクティブの場合に、CPU10からのCPUデータを取り込み保持する。
下限レジスタ302は、下限セットパルスがアクティブの場合に、CPU10からのCPUデータを取り込み保持する。
比較器303は、下限レジスタ302が保持する値を下限値とし、上限レジスタ301が保持する値を上限値とする。比較器303は、タイマ21からのタイマ番号が、下限値から上限値の範囲内にある場合は、選択タイマオン信号をアクティブにする。タイマ21からのタイマ番号が、下限値から上限値の範囲外の場合は、選択タイマオン信号をノンアクティブにする。
なお、第1の実施形態と、第4の実施形態とを組み合わせることで、タイマオンの領域の初期化が不要となり、タイマオンの領域の1つ1つのタイマの状態もスヌープすることで、CPU10からタイマメモリ24へのアクセスの効率を最大にすることができる。
The
The
The
By combining the first embodiment and the fourth embodiment, it is not necessary to initialize the timer-on area, and by snooping the state of each timer in the timer-on area, the timer can be started from the
図11は、最小構成を有するハードウェアタイマ400の構成を示すブロック図である。ハードウェアタイマ400は、選択部401、制御部402を備える。
FIG. 11 is a block diagram showing the configuration of the
図12は、ハードウェアタイマ400の処理を示すフローチャートである。
始めに、選択部401は、CPU(中央演算処理装置)10によるタイマメモリ24へのアクセスが可能な第1の状態と、タイマ21によるタイマメモリ24へのアクセスが可能な第2の状態のいずれかを選択する(ステップS401)。
そして、制御部402は、CPU10がタイマメモリ24にアクセス可能な時間として割り当てられた第1の時間と、タイマ21がタイマメモリ24にアクセス可能な時間として割り当てられた第2の時間のうち、第2の時間内であっても、タイマ21がオフである場合には、選択部401に、第1の状態を選択させる(ステップS402)。
FIG. 12 is a flowchart showing the processing of the
First, the
Then, the
なお、図1における各部の機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することにより各部の処理を行ってもよい。なお、ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムが送信された場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリ(RAM)のように、一定時間プログラムを保持しているものも含むものとする。 A program for realizing the functions of each part in FIG. 1 is recorded on a computer-readable recording medium, and the program recorded on the recording medium is read into a computer system and executed to process each part. You may. The term "computer system" as used herein includes hardware such as an OS and peripheral devices. Further, the "computer-readable recording medium" refers to a portable medium such as a flexible disk, a magneto-optical disk, a ROM, or a CD-ROM, or a storage device such as a hard disk built in a computer system. Furthermore, a "computer-readable recording medium" is a volatile memory (RAM) inside a computer system that serves as a server or client when a program is transmitted via a network such as the Internet or a communication line such as a telephone line. In addition, it shall include those that hold the program for a certain period of time.
本発明のいくつかの態様は、タイマメモリへのアクセスが、CPUとタイマにより時分割で行われる場合おいて、CPUによるタイマメモリの使用時間を増やすことが必要なハードウェアタイマ、制御方法及びプログラムなどに適用することができる。 In some aspects of the present invention, a hardware timer, a control method, and a program that require an increase in the usage time of the timer memory by the CPU when the timer memory is accessed by the CPU and the timer in a time-divided manner. It can be applied to.
10・・・CPU
20・・・ハードウェアタイマ
21・・・タイマ
22・・・タイムアウトバッファ
23・・・バス選択部
24・・・タイマメモリ
25a、25b、25c、25d・・・タイマオン制御部
26・・・バス
231・・・タイマ選択信号生成部
232・・・CPU制御部
233・・・セレクタ
234・・・マスク制御部
251・・・CPUセットパルス生成部
252・・・CPUクリアパルス生成部
253a・・・レジスタ部
253c・・・レジスタ部
253a−0〜253a−n・・・レジスタ
253c−0〜253c−n・・・レジスタ
254・・・信号選択部
255・・・タイムアウトクリアパルス生成部
256・・・クリアパルス合成部
301・・・上限レジスタ
302・・・下限レジスタ
303・・・比較器
400・・・ハードウェアタイマ
401・・・選択部
402・・・制御部
10 ... CPU
20 ...
Claims (10)
前記中央演算処理装置が前記タイマメモリにアクセス可能な時間として割り当てられた第1の時間と、前記タイマが前記タイマメモリにアクセス可能な時間として割り当てられた第2の時間のうち、前記第2の時間内であっても、前記タイマがオフである場合には、前記選択部に、前記第1の状態を選択させる制御部と、
を備えるハードウェアタイマ。 A selection unit that selects either a first state in which the central processing unit can access the timer memory and a second state in which the timer can access the timer memory.
Of the first time allocated as the time that the central processing unit can access the timer memory and the second time allocated as the time that the timer can access the timer memory, the second time. A control unit that causes the selection unit to select the first state when the timer is off even within the time period.
Hardware timer with.
請求項1に記載のハードウェアタイマ。 When the timer is on and the selection unit selects the second state, the control unit permits the timer to access the timer memory. The hardware timer according to claim 1, which does not allow access to the timer memory by the central processing unit.
請求項1又は2に記載のハードウェアタイマ。 The control unit determines whether or not the timer has timed out and whether or not the timer has been unused, and when the timer has timed out or the timer has not yet been used. The hardware timer according to claim 1 or 2, wherein the timer is determined to be off when it is in use.
請求項1又は2に記載のハードウェアタイマ。 The control unit determines whether or not the timer has timed out and whether or not the timer has not been used, and if the timer has not timed out or the timer has not yet been used. The hardware timer according to claim 1 or 2, wherein the timer is determined to be on when not in use.
請求項1から4のいずれかに記載のハードウェアタイマ。 The hardware timer according to any one of claims 1 to 4, wherein the selection unit alternately selects the first state and the second state in a time division manner.
請求項1から5のいずれかに記載のハードウェアタイマ。 When the timer is off, and the selection unit selects the first state, and the read process of the timer occurs, the selection unit uses the timer. The hardware timer according to any one of claims 1 to 5, which outputs a signal indicating that the timer is unused.
前記制御部は、前記タイムアウトとなったタイマ番号に割り当てられている時間については、前記選択部に、前記第1の状態を選択させる
請求項1から6のいずれかに記載のハードウェアタイマ。 Of the plurality of timer numbers stored in the timer memory, a timeout buffer for storing the timer number that has timed out is further provided.
The hardware timer according to any one of claims 1 to 6, wherein the control unit causes the selection unit to select the first state for the time allocated to the timer number that has timed out.
請求項1から7のいずれかに記載のハードウェアタイマ。 The present invention according to any one of claims 1 to 7, which is a register that stores a plurality of timer numbers in association with each other and whether the state is on or off, and further includes registers equal to or less than the number of the plurality of timer numbers. The described hardware timer.
前記中央演算処理装置が前記タイマメモリにアクセス可能な時間として割り当てられた第1の時間と、前記タイマが前記タイマメモリにアクセス可能な時間として割り当てられた第2の時間のうち、前記第2の時間内であっても、前記タイマがオフである場合には、前記第1の状態を選択する
ハードウェアタイマの制御方法。 One of the first state in which the central processing unit can access the timer memory and the second state in which the timer can access the timer memory is selected.
Of the first time allocated as the time that the central arithmetic processing device can access the timer memory and the second time allocated as the time that the timer can access the timer memory, the second time. A method of controlling a hardware timer that selects the first state when the timer is off even within a time period.
前記中央演算処理装置が前記タイマメモリにアクセス可能な時間として割り当てられた第1の時間と、前記タイマが前記タイマメモリにアクセス可能な時間として割り当てられた第2の時間のうち、前記第2の時間内であっても、前記タイマがオフである場合には、前記選択手段に、前記第1の状態を選択させる制御手段、
として機能させるプログラム。 A selection means for selecting either a first state in which the central processing unit can access the timer memory and a second state in which the timer can access the timer memory.
Of the first time allocated as the time that the central processing unit can access the timer memory and the second time allocated as the time that the timer can access the timer memory, the second time. A control means that causes the selection means to select the first state even within the time when the timer is off.
A program that functions as.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019063957A JP6769662B2 (en) | 2019-03-28 | 2019-03-28 | Hardware timers, control methods and programs |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019063957A JP6769662B2 (en) | 2019-03-28 | 2019-03-28 | Hardware timers, control methods and programs |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2020166355A JP2020166355A (en) | 2020-10-08 |
JP6769662B2 true JP6769662B2 (en) | 2020-10-14 |
Family
ID=72717361
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019063957A Active JP6769662B2 (en) | 2019-03-28 | 2019-03-28 | Hardware timers, control methods and programs |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6769662B2 (en) |
-
2019
- 2019-03-28 JP JP2019063957A patent/JP6769662B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2020166355A (en) | 2020-10-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4749657B2 (en) | DMA controller | |
JP5551512B2 (en) | COMMUNICATION CONTROL DEVICE, DATA COMMUNICATION METHOD, AND PROGRAM | |
CN111177025B (en) | Data storage method and device and terminal equipment | |
JP2009518753A (en) | Arbitration of memory access requests | |
CN113138802B (en) | Command distribution device, method, chip, computer device and storage medium | |
CN113312278B (en) | Device and method for statically allocating shared multi-queue cache | |
CN116249973B (en) | Adaptive memory transaction scheduling | |
JP6769662B2 (en) | Hardware timers, control methods and programs | |
WO2019127230A1 (en) | Network node wake-up method and device | |
US10031884B2 (en) | Storage apparatus and method for processing plurality of pieces of client data | |
CN110968538B (en) | Data buffering method and device | |
US6292853B1 (en) | DMA controller adapted for transferring data in two-dimensional mapped address space | |
CN106776393B (en) | uninterrupted serial port data receiving method and device | |
US20060047866A1 (en) | Computer system having direct memory access controller | |
CN111078598B (en) | Memory module data access control method, data access device and chip | |
JP2007156855A (en) | Information processor and information processing method | |
JP5907558B2 (en) | MULTI-INTERVAL TIMER AND ITS CONTROL DEVICE, CONTROL METHOD, AND CONTROL PROGRAM | |
KR100658918B1 (en) | Apparatus and method for initialization of system global variables using block input/output command | |
JP4514411B2 (en) | Inter-bus communication interface device | |
JP2586168B2 (en) | Semiconductor storage device and method | |
KR100578655B1 (en) | Wireless communication terminal notifying transmission time of packet and its method | |
JP4898527B2 (en) | RESOURCE USE MANAGEMENT DEVICE, RESOURCE USE MANAGEMENT SYSTEM, AND RESOURCE USE MANAGEMENT DEVICE CONTROL METHOD | |
JP2006091966A (en) | Memory controller | |
JP2006277363A (en) | Information transfer system, and image forming device | |
KR20230013828A (en) | A system on chip and a operating method of the semiconductor package |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20190328 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20200303 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20200430 |
|
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: 20200825 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20200917 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6769662 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |