JPH08179998A - Multi-stage hardware timer - Google Patents

Multi-stage hardware timer

Info

Publication number
JPH08179998A
JPH08179998A JP6322472A JP32247294A JPH08179998A JP H08179998 A JPH08179998 A JP H08179998A JP 6322472 A JP6322472 A JP 6322472A JP 32247294 A JP32247294 A JP 32247294A JP H08179998 A JPH08179998 A JP H08179998A
Authority
JP
Japan
Prior art keywords
timer
ram
counter
memory
overflow
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.)
Pending
Application number
JP6322472A
Other languages
Japanese (ja)
Inventor
Yutaka Takeda
豊 竹田
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP6322472A priority Critical patent/JPH08179998A/en
Publication of JPH08179998A publication Critical patent/JPH08179998A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE: To provide a multi-stage hardware timer in which a timer is realized with a RAM and its control circuit and a circuit scale can be reduced in the case that many hardware timers are required to measure a time at each of many events generating independently. CONSTITUTION: This hardware timer is equipped with a RAM 21 provided at every event and in which a count value is stored, and a counter control part 20 which performs count-up control while the value of the RAM 21 is read and written in time division. Also, an adder 23, an address counter and an overflow flag 24, etc., for read data from the RAM 21 are provided in the counter control part 20. Therefore, load is applied to software processing in a software timer, however, in this case, since the timer is realized with hardware, the load on the software processing can be reduced, and also, the circuit scale can be reduced by constituting the multistage timer only of the RAM and its counter control part.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、複数の独立に発生する
イベントに対し、各イベント毎に多数のタイマを必要と
するシステムに用いられる多段ハードウエアタイマに関
するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a multi-stage hardware timer used in a system which requires a large number of timers for each event for a plurality of independently occurring events.

【0002】[0002]

【従来の技術】従来、複数の独立に発生するイベントに
対し各イベント毎にタイマを必要とする場合、ソフトウ
エアで各タイマを実現し処理する方式と、ハードウエア
でイベント毎にカウンタを設け、ハードウエアタイマを
実現する方式の2つの方式があった。
2. Description of the Related Art Conventionally, when a timer is required for each event for a plurality of independently occurring events, a method in which each timer is realized and processed by software, and a counter is provided for each event by hardware, There were two methods of realizing a hardware timer.

【0003】[0003]

【発明が解決しようとする課題】しかしながら独立に発
生するイベントの数が多くなると、前記ソフトウエアタ
イマ方式では、タイマ制御に要するソフトウエアの処理
が重くなり、結果的にシステム全体の処理能力が低下す
るという問題点を有していた。また、個々にハードウエ
アタイマを設ける方式では、カウンタの数が増えると、
回路規模が大きくなり、物理的実装スペースの問題、あ
るいは、それに伴うコストの増大が発生するという問題
点を有していた。
However, when the number of independently generated events increases, the software timer method requires heavy software processing for timer control, resulting in a decrease in the processing capacity of the entire system. There was a problem of doing. Also, in the method of individually providing a hardware timer, if the number of counters increases,
There has been a problem that the circuit scale becomes large and a physical mounting space problem occurs, or a cost increases accordingly.

【0004】そこで本発明は多数の独立に発生するイベ
ント毎に時間を測定するために、多数のハードウエアタ
イマが必要な場合に、回路規模の縮小を図れる多段ハー
ドウエアタイマを提供することを目的とする。
Therefore, an object of the present invention is to provide a multi-stage hardware timer capable of reducing the circuit scale when a large number of hardware timers are required to measure the time for each of a large number of independently occurring events. And

【0005】[0005]

【課題を解決するための手段】このために本発明は、複
数の独立に発生するイベントに対し、各イベント毎にタ
イマを必要とするシステムにおいて、各タイマーを実現
するカウンタの値を複数格納するメモリ、メモリアドレ
スカウンタ、このメモリから読みだしたカウント値に対
し1を加算する加算器、このカウント結果がタイムアウ
トであるオーバフロウを示すものかどうかを判定する比
較器、このオーバフロウが発生したことを外部へ通知す
るためのオーバフロウフラグ、メモリに対するアクセス
タイミング生成回路から構成されるカウンタ制御部を有
し、オーバフロウするまでのタイムアウト時間を決定す
る任意のカウンタロード値を、任意のメモリアドレスカ
ウンタに対して設定する手段を具備することにより、メ
モリが格納できる容量分の独立したタイマを実現するよ
うにしたものである。
To this end, the present invention stores a plurality of counter values for realizing each timer in a system which requires a timer for each event for a plurality of independently occurring events. Memory, memory address counter, adder that adds 1 to the count value read from this memory, comparator that determines whether or not this count result indicates an overflow, which is a timeout, externally indicates that this overflow has occurred. It has a counter control unit consisting of an overflow flag for notifying the user and an access timing generation circuit for the memory, and sets an arbitrary counter load value that determines the timeout time until the overflow to an arbitrary memory address counter. The memory can be stored by providing the setting means. It is obtained so as to achieve the amount content independent timers.

【0006】[0006]

【作用】上記構成により、多数のタイマを一括してメモ
リとカウンタ制御部に集約することで、物理的実装スペ
ースの縮小が可能となり、また、全てハードウエア制御
であるためソフトウエア処理の負荷を低減することが可
能となる。
With the above structure, a large number of timers can be centralized in a memory and a counter control unit to reduce the physical mounting space. In addition, all hardware control can reduce the load of software processing. It becomes possible to reduce.

【0007】[0007]

【実施例】次に、図面を参照しながら本発明の一実施例
を説明する。図1は本発明の一実施例の多段ハードウエ
アタイマを用いたLANフレーム交換システムの例図、
図2は同多段ハードウエアタイマの詳細ブロック図であ
る。図中、1はシステム内部の高速バスであり、フレー
ム交換制御部3を介して送信バッファメモリ2が接続さ
れている。CPU4はトランシーバ5、多段ハードタイ
マ6などをCPUバス8を通じて制御する。トランシー
バ5は多数個あり、それぞれLAN端末7に接続されて
いる。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will now be described with reference to the drawings. FIG. 1 is a diagram showing an example of a LAN frame exchange system using a multi-stage hardware timer according to an embodiment of the present invention,
FIG. 2 is a detailed block diagram of the multistage hardware timer. In the figure, 1 is a high-speed bus inside the system, to which a transmission buffer memory 2 is connected via a frame exchange control unit 3. The CPU 4 controls the transceiver 5, the multi-stage hard timer 6, etc. through the CPU bus 8. There are many transceivers 5, which are connected to the LAN terminal 7, respectively.

【0008】上記構成において、図1において、システ
ム内部の高速バス1から受信されたLANフレームは、
一旦256フレーム分の容量をもつ送信バッファアメモ
リ2へ蓄積され、このときフレーム交換制御部3はフレ
ームがもつ宛先アドレスから判断された送信すべきポー
ト番号と、送信バッファメモリ2に書き込んだアドレス
をCPU4へ通知する。CPU4は送信すべきポートの
トランシーバ5に対してフレームの送信要求を行い、多
段ハードタイマ6の、フレーム交換制御部3から得た送
信バッファメモリ2に書き込んだアドレスに対応するタ
イマを起動する。トランシーバ5のLAN端末7への送
信が正常に完了すると、CPU4は起動したタイマをリ
セットし、フレーム交換制御部3に対し、使用した送信
バッファメモリ2の解放を行う。LAN端末7への送信
が障害等で完了しない場合、多段ハードタイマ6でタイ
ムアウト(オーバフロウ)が発生する。CPU4はこの
タイムアウトに対する障害処理を実行し、フレーム交換
制御部3に対し、使用した送信バッファメモリ2の解放
を行う。
In the above configuration, in FIG. 1, the LAN frame received from the high speed bus 1 inside the system is
The data is temporarily stored in the transmission buffer memory 2 having a capacity of 256 frames, and at this time, the frame exchange control unit 3 stores the port number to be transmitted judged from the destination address of the frame and the address written in the transmission buffer memory 2. Notify the CPU 4. The CPU 4 makes a frame transmission request to the transceiver 5 of the port to be transmitted, and activates the timer of the multi-stage hard timer 6 corresponding to the address written in the transmission buffer memory 2 obtained from the frame exchange control unit 3. When the transmission of the transceiver 5 to the LAN terminal 7 is completed normally, the CPU 4 resets the started timer and releases the used transmission buffer memory 2 to the frame exchange control unit 3. If the transmission to the LAN terminal 7 is not completed due to a failure or the like, a timeout (overflow) occurs in the multistage hardware timer 6. The CPU 4 executes a failure process for this time-out, and releases the used transmission buffer memory 2 to the frame exchange control unit 3.

【0009】図2は、図1の実施例で使用する256個
の8ビットタイマを実現する多段ハードウエアタイマの
詳細ブロック図である。本実施例の多段ハードウエアタ
イマは、全てのタイマのカウント値を格納するRAM2
1と、RAM21内の値を時分割で読み書きしながら、
カウントアップ制御を行うカウンタ制御部20の2つ分
けられる。カウンタ制御部20は、外部回路又はCPU
19等に接続されている。カウンタ制御部20は、RA
M21から読みだした値をカウントアップすべきかどう
か、あるいはオーバーフロウ発生かどうかを判定するた
めの比較器22を有し、カウントアップすべき値(例え
ば読みだし値=1〜255)であれば加算器23で1を
加え、再び同じアドレスへ加算結果をRAM21へ書き
込み、オーバーフロウ発生(読みだし値=255)であ
れば、加算器23で1を加算した結果の0をRAM21
へ書込みながら、読みだした時のアドレスカウンタの値
(=RAMアドレス)に対応するオーバフロウフラグ2
4をセットし、タイムアウトが発生したことを外部へ通
知する。
FIG. 2 is a detailed block diagram of a multi-stage hardware timer which realizes the 256 8-bit timers used in the embodiment of FIG. The multi-stage hardware timer of this embodiment is a RAM 2 that stores the count values of all timers.
While reading and writing 1 and the value in the RAM 21 in a time division manner,
It is divided into two, a counter control unit 20 that performs count-up control. The counter control unit 20 is an external circuit or a CPU.
It is connected to 19th grade. The counter control unit 20 uses the RA
It has a comparator 22 for judging whether the value read from M21 should be counted up or whether an overflow has occurred, and if the value to be counted up (for example, read value = 1 to 255) is added. The adder 23 adds 1 and the addition result is again written to the same address in the RAM 21, and if an overflow occurs (read value = 255), the adder 23 adds 1 to the RAM 0
Overflow flag 2 corresponding to the value (= RAM address) of the address counter when reading while writing to
Set 4 to notify the outside that a timeout has occurred.

【0010】RAM21へ値を書き込む(ロードする)
場合、まず外部から書込みたいRAMアドレスをロード
アドレスレジスタ25に書き込み、書き込む値をロード
データレジスタ26に設定し書き込み起動がかかると、
決められた外部からのRAM書き込みタイミング時に、
セレクタ27,28によってロードアドレスレジスタ2
5とロードデータレジスタ26が選択され、RAM21
へ書き込まれる。
Write (load) values to RAM 21
In this case, first, the RAM address to be written from the outside is written in the load address register 25, the value to be written is set in the load data register 26, and the writing is started,
At the determined external RAM write timing,
Load address register 2 by selectors 27 and 28
5 and the load data register 26 are selected, the RAM 21
Is written to.

【0011】図中、29はレジスタであり、RAM21
から読み出したデータを一時的に保持する。30はデー
タ出力バッファであり、RAM21に対する書き込み用
である。また31はデータ入力バッファであり、RAM
21から読み出したデータ入力用である。32はタイミ
ング生成部であり、RAM21に対する読み出し、書き
込みタイミング信号を生成する。また33はアドレスカ
ウンタであり、RAM21に対するアドレス値を、読み
出し書き込みの終了の度にインクリメントする。
In the figure, 29 is a register, which is a RAM 21.
The data read from is temporarily retained. A data output buffer 30 is for writing to the RAM 21. Further, 31 is a data input buffer, RAM
It is for inputting the data read from 21. A timing generation unit 32 generates a read / write timing signal for the RAM 21. Further, 33 is an address counter, which increments the address value for the RAM 21 each time the reading and writing are completed.

【0012】[0012]

【発明の効果】以上のように本発明によれば、従来のソ
フトウエアによる多数のタイマ処理にかかる負荷をなく
し、例えば上記実施例の場合CPUはLANフレームの
ハンドリングやその他の障害処理に専念することが可能
となって、処理能力の向上を図ることができる。また従
来の個別のハードウエアカウンタでタイマを実現しよう
とすると、多数のカウンタを設けるのは物理的実装スペ
ースの問題点があり現実的ではないが、メモリ1個とカ
ウンタ制御部だけで済み、回路規模を縮小して実装上の
問題点も解決できる。
As described above, according to the present invention, the load on a large number of timer processes by conventional software is eliminated, and for example, in the case of the above embodiment, the CPU concentrates on LAN frame handling and other fault processing. This makes it possible to improve the processing capacity. Further, if it is attempted to realize a timer by a conventional individual hardware counter, it is not realistic to provide a large number of counters due to the problem of physical mounting space, but only one memory and a counter control unit are required. The problem can be solved by reducing the scale.

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

【図1】本発明の一実施例の多段ハードウエアタイマを
用いたLANフレーム交換システムの例図
FIG. 1 is an example diagram of a LAN frame switching system using a multi-stage hardware timer according to an embodiment of the present invention.

【図2】本発明の一実施例の多段ハードウエアタイマの
詳細ブロック図
FIG. 2 is a detailed block diagram of a multi-stage hardware timer according to an embodiment of the present invention.

【符号の説明】[Explanation of symbols]

20 カウンタ制御部 21 RAM 23 +1加算器 24 オーバフロウフラグ 25 ロードアドレスレジスタ 26 ロードデータレジスタ 27,28 セレクタ 20 Counter Control Unit 21 RAM 23 +1 Adder 24 Overflow Flag 25 Load Address Register 26 Load Data Register 27, 28 Selector

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】複数の独立に発生するイベントに対し、各
イベント毎にタイマを必要とするシステムにおいて、各
タイマーを実現するカウンタの値を複数格納するメモ
リ、メモリアドレスカウンタ、このメモリから読みだし
たカウント値に対し1を加算する加算器、このカウント
結果がタイムアウトであるオーバフロウを示すものかど
うかを判定する比較器、このオーバフロウが発生したこ
とを外部へ通知するためのオーバフロウフラグ、前記メ
モリに対するアクセスタイミング生成回路から構成され
るカウンタ制御部を有し、オーバフロウするまでのタイ
ムアウト時間を決定する任意のカウンタロード値を、任
意の前記メモリアドレスカウンタに対して設定する手段
を具備することにより、前記メモリが格納できる容量分
の独立したタイマを実現することを特徴とする多段ハー
ドウエアタイマ。
1. In a system which requires a timer for each event for a plurality of independently occurring events, a memory for storing a plurality of counter values for realizing each timer, a memory address counter, and a read from this memory. An adder for adding 1 to the count value, a comparator for determining whether or not the count result indicates an overflow that is a timeout, an overflow flag for notifying the outside that this overflow has occurred, the memory By having a counter control unit composed of an access timing generation circuit for, and setting means for setting an arbitrary counter load value for determining a timeout time until overflow to an arbitrary memory address counter, Independent timer for the capacity that the memory can store Multi-stage hardware timer which is characterized in that current.
JP6322472A 1994-12-26 1994-12-26 Multi-stage hardware timer Pending JPH08179998A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6322472A JPH08179998A (en) 1994-12-26 1994-12-26 Multi-stage hardware timer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6322472A JPH08179998A (en) 1994-12-26 1994-12-26 Multi-stage hardware timer

Publications (1)

Publication Number Publication Date
JPH08179998A true JPH08179998A (en) 1996-07-12

Family

ID=18144026

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6322472A Pending JPH08179998A (en) 1994-12-26 1994-12-26 Multi-stage hardware timer

Country Status (1)

Country Link
JP (1) JPH08179998A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6895070B2 (en) 2001-12-28 2005-05-17 Sharp Kabushiki Kaisha Counter circuit
CN114280977A (en) * 2021-11-29 2022-04-05 苏州浪潮智能科技有限公司 Large-scale timing method and device based on FPGA

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6895070B2 (en) 2001-12-28 2005-05-17 Sharp Kabushiki Kaisha Counter circuit
CN114280977A (en) * 2021-11-29 2022-04-05 苏州浪潮智能科技有限公司 Large-scale timing method and device based on FPGA
CN114280977B (en) * 2021-11-29 2024-02-02 苏州浪潮智能科技有限公司 FPGA-based large-scale timing method and device

Similar Documents

Publication Publication Date Title
US4174537A (en) Time-shared, multi-phase memory accessing system having automatically updatable error logging means
US6604169B2 (en) Modulo addressing based on absolute offset
JPH08179998A (en) Multi-stage hardware timer
JPH09190378A (en) Memory address control circuit
JPH0551933B2 (en)
EP0753818A2 (en) Data processor having bus controller for controlling a plurality of buses independently of each other
JPH03147157A (en) Information processor
US20180088866A1 (en) Link management method and physical device
JP2908890B2 (en) Large-scale channel, access method to each control memory, and read access method to each channel memory
JPH0553920A (en) Structural address generator
JPS6014435B2 (en) Storage device
JPH06103026A (en) Memory system
JPH0528746A (en) Fifo memory circuit
JP2536721B2 (en) Alarm collection circuit
JP3009533B2 (en) Large-capacity counter using memory
JPH044631B2 (en)
JPS6222437B2 (en)
JPH04205044A (en) Buffer circuit
JPS5995587A (en) Display procesor
JPH0512114A (en) Cache memory
JPS63142446A (en) Address generating system
JPH0877064A (en) Data processor
JPH10228447A (en) Bus arbitration mechanism
JPH0784939A (en) Direct memory access controller
JPH04263332A (en) Information processor containing multi-port type random access memory