JPS59100926A - Timer circuit - Google Patents

Timer circuit

Info

Publication number
JPS59100926A
JPS59100926A JP57211135A JP21113582A JPS59100926A JP S59100926 A JPS59100926 A JP S59100926A JP 57211135 A JP57211135 A JP 57211135A JP 21113582 A JP21113582 A JP 21113582A JP S59100926 A JPS59100926 A JP S59100926A
Authority
JP
Japan
Prior art keywords
transfer
circuit
timer
time
dma
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
JP57211135A
Other languages
Japanese (ja)
Other versions
JPH0150927B2 (en
Inventor
Kenzo Nakabashi
中橋 兼三
Mitsuru Kuga
空閑 充
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP57211135A priority Critical patent/JPS59100926A/en
Publication of JPS59100926A publication Critical patent/JPS59100926A/en
Publication of JPH0150927B2 publication Critical patent/JPH0150927B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/04Generating or distributing clock signals or signals derived directly therefrom

Abstract

PURPOSE:To set exactly a short time value, as well by supplying a reference clock to a direct memory access (DMA) circuit at the time when a data transfer is not executed, making it execute a DMA operation, and obtaining an output showing a necessary elapsed time when a transfer operation of a prescribed byte number is ended. CONSTITUTION:A micro-processor (MPU) 13 sets an initial value of an address to an address generating circuit 22, and also sets a transfer byte number to a transfer byte number counter 21. When a time counting start signal is applied and a transfer request signal is received, a bus controlling circuit 23 sends a bus occupancy request signal to the MPU 13, and in accordance with a using state of a bus 16, an approval signal is received by the bus controlling circuit. A transfer address is set to a memory 14 and a data is transferred to the memory 14 from a peripheral circuit 15. When the data transfer is ended, the operation as a timer is ended. This data transfer is executed by a prescribed clock period, and a desired timer value can be set by setting a transfer byte number.

Description

【発明の詳細な説明】 発明の技術分野 本発明はマイクロプロセッサを用いた処理装置において
、処理のために必要なタイミングを設定するだめのタイ
マ回路に関するものである。
TECHNICAL FIELD OF THE INVENTION The present invention relates to a timer circuit for setting timing necessary for processing in a processing device using a microprocessor.

従来技術と問題点 マイクロプロセッサを用いた処理装置においては、その
処理を遂行するためにその処理内容によって異なるタイ
ミングを設定するための、種々のタイマを必要とするこ
とが多い。一般にはこのようなタイマは、マイクロプロ
セッサに対して一定時間ごとに割込みをかけ、これを時
間基準として用いてその回数をソフトウェアで計数する
ことによって、所定のタイミングを設定するようにして
いる。しかしながらこの場合の割込み時間としては、マ
イクロプロセッサの処理能力を低下させない程度の比較
的大きな値、例えば数十m8程度が選ばれ°ることか多
く、従ってこのようなタイマによって得られる時間値と
しては例えば秒単位というような値に限られる。そのた
め上記の基準時間゛より短いタイマや、基準時間の整数
倍にならない時間値を必要とするタイマ、および時間値
の上下限の許容範囲が狭いタイマを必要とする場合には
、この方式のタイマを使用することができず、別にハー
ドウェアによって構成したタイマを設けなければならな
い。
Prior Art and Problems Processing devices using microprocessors often require various timers to set different timings depending on the content of the processing in order to carry out the processing. Generally, such a timer sets a predetermined timing by interrupting a microprocessor at regular intervals and using this as a time reference to count the number of interrupts using software. However, in this case, the interrupt time is often chosen to be a relatively large value that does not reduce the processing capacity of the microprocessor, for example, about several tens of m8, and therefore the time value obtained by such a timer is For example, it is limited to values such as seconds. Therefore, if you need a timer shorter than the above reference time, a timer that requires a time value that is not an integral multiple of the reference time, or a timer with a narrow tolerance range for the upper and lower limits of the time value, use this method of timer. cannot be used, and a separate hardware-based timer must be provided.

第1図は従来から用いられているハードウェアによるタ
イマ回路の構成を示している。同図において、1は基準
クロック源、2は計数回路である。
FIG. 1 shows the configuration of a conventionally used hardware timer circuit. In the figure, 1 is a reference clock source, and 2 is a counting circuit.

第1図において、計数回路2はマイクロプロセッサから
与えられる計数開始信号に応じて、基準クロック源1の
一定周期の基準クロックを計数して、設定された計数値
に達したとき開数終了フラグをオンにしてマイクロプロ
セッサに通知する。
In FIG. 1, a counting circuit 2 counts a reference clock of a constant period from a reference clock source 1 in response to a counting start signal given from a microprocessor, and sets an open number end flag when a set count value is reached. Turn on and notify the microprocessor.

計数設定値はソフトウェアによって設定可能とすること
もでき、またマイクロプロセッサに対する通知は割込み
によってもよい。
The count setting value may be set by software, and the microprocessor may be notified by interrupt.

第1図に示された従来のタイマ回路は、計数回路と、計
数回路とマイクロプロセッサとの間で計数値の設定、計
数開始および計数終了の指示2通知等を行うだめのイン
タフェース回路が必要であり、ハードウェアの複雑化と
規模の増大を免れない。
The conventional timer circuit shown in Fig. 1 requires a counting circuit and an interface circuit between the counting circuit and the microprocessor to set the count value, and to notify the counting start and counting end instructions. However, it is inevitable that the hardware will become more complex and the scale will increase.

このように従来のタイマはソフトウェアによるとハード
ウェアk・よるとを問わず、いずれも欠点の多いもので
あった。
As described above, conventional timers, regardless of whether they are based on software or hardware, have many drawbacks.

発明の目的 本発明はこのような従来技術の問題点を解決しようとす
るものであって、その目的は、ダイレクトメモリアクセ
ス(以下DMAと略す)転送機能を持つ処理装置におい
て、短い時間値でも正確に設定することができ、また各
種の異々る時間値を設定する上で融通性に富んでおシ、
かつタイ々を構成するだめのハードウェアの増加を最小
限に抑えることができるタイマ回路を提供することにあ
る。
OBJECT OF THE INVENTION The present invention attempts to solve the problems of the prior art, and its purpose is to provide accurate processing even for short time values in a processing device having a direct memory access (hereinafter abbreviated as DMA) transfer function. It is very flexible in setting different time values.
It is also an object of the present invention to provide a timer circuit that can minimize the increase in the amount of hardware that constitutes each timer circuit.

発明の実施例 第2図は本発明のタイマ回路の原理的構成を示し、5は
DMA回路、6は切替スイッチ、7は基準クロック源、
8は周辺回路である。
Embodiment of the Invention FIG. 2 shows the basic configuration of a timer circuit of the present invention, in which 5 is a DMA circuit, 6 is a changeover switch, 7 is a reference clock source,
8 is a peripheral circuit.

DMA機能は通常、周辺回路とメモリとの間のデータ転
送をマイクロプロセッサ内のレジスタヲ介さずに直接行
うことによって、データ転送に要する時間を短縮するた
めに用いられるものである。
The DMA function is typically used to reduce the time required for data transfer by directly transferring data between peripheral circuitry and memory without going through registers within the microprocessor.

一方、マイクロプロセッサを用いた処理回路において必
要とするタイマは、通常、ある処理から次の処理までの
間の時間を規定するために用いられるものであp、従っ
てタイマが必要となる場合にはデータ転送を終了し動作
停止の状態であることが多い。このような点に着目して
、DAiA回路がデータ転送を行っていない期間にDM
A回路を利用してタイマとしての動作を行わせることが
できる。
On the other hand, a timer required in a processing circuit using a microprocessor is usually used to specify the time between one process and the next, so if a timer is required, It is often in a state where the data transfer has been completed and the operation has stopped. Focusing on these points, the DM
The A circuit can be used to operate as a timer.

第2図において切替スイッチ6は通常は周辺回路8の1
10に切替えられていて、I)HA回路5は周辺回路8
から送られる転送要求信号に応じて転送動作を行ってい
る。タイマとしての動作を行う場合は、例えは図示され
ないマイクロプロセッサから計数開始信号が与えられる
と、切替スイッチ6は基板クロック源7の側に切替えら
れて、基準クロックによって作られた一定周期(1)の
転送要求信号によって1バイトごと転送動作を行い、所
定バイト数の転送終了によって所定の時間経過を知るこ
とができる。
In FIG. 2, the selector switch 6 is normally one of the peripheral circuits 8.
I) HA circuit 5 is switched to peripheral circuit 8.
The transfer operation is performed in response to a transfer request signal sent from. When operating as a timer, for example, when a counting start signal is given from a microprocessor (not shown), the changeover switch 6 is switched to the board clock source 7 side, and the constant cycle (1) generated by the reference clock is switched. A transfer operation is performed byte by byte in response to a transfer request signal, and it is possible to know that a predetermined time has passed by completion of transfer of a predetermined number of bytes.

この揚台、DMA回路に設定する転送バイト数をNとす
れは、転送開始から転送終了までの時間はNtであり、
転送バイト数Nを任意に設定することによって任意の時
間値を設定可能なタイマ回路を実現できる。まだ転送要
求信号の周期tは1バイトのデータを転送可能な時間で
あって、通常十分短い時間である。
If the number of transfer bytes set in this platform and DMA circuit is N, then the time from the start of transfer to the end of transfer is Nt.
By arbitrarily setting the number N of transferred bytes, a timer circuit that can set an arbitrary time value can be realized. The period t of the transfer request signal is the time in which one byte of data can be transferred, and is usually a sufficiently short time.

このように第2図のタイマ回路によれば、短い時間値を
設定できるとともに、時間値の設定上融通性に富んだタ
イマが得られ、またタイマを構成するためのハードウェ
アの増加も僅がである。この際必要とする基準クロック
源は処理装置内にある他のクロックで代用でき、省略す
ることも可能である。
In this way, according to the timer circuit shown in Fig. 2, a short time value can be set, a timer with great flexibility in setting the time value can be obtained, and there is only a slight increase in the amount of hardware required to configure the timer. It is. The reference clock source required at this time can be replaced by another clock in the processing device, or can be omitted.

第6図は本発明のタイマ回路の一実施例の構成を示して
いる。同図において11はDMA回路、12は切替ゲー
ト、16はマイクロプロセッサ(MPIJ)、14はメ
モリ、15は周辺回路、16はバスである。
FIG. 6 shows the configuration of one embodiment of the timer circuit of the present invention. In the figure, 11 is a DMA circuit, 12 is a switching gate, 16 is a microprocessor (MPIJ), 14 is a memory, 15 is a peripheral circuit, and 16 is a bus.

DMA回路11は転送バイト数カウンタ21.アドレス
発生回路22およびバス制御回路26からなっている。
The DMA circuit 11 has a transfer byte number counter 21. It consists of an address generation circuit 22 and a bus control circuit 26.

第3図において、タイマとしての動作開始に先立ってマ
イクロプロセッサ131dアドレス発生回路22にアド
レスの初期値を設定するとともに、転送バイト数カウン
タ21に転送バイト数を設定する。計時開始信号を与え
られ転送要求信号を受信すると、バス制御回路23はマ
イクロプロセッサ16に対してバス占有要求信号を送シ
、マイクロプロセッサ131d、バス16の使用状態に
応じて許可信号をバス制御回路26に返送する。基準ク
ロック源からの転送要求信号に応じてバス制御回路26
はゲート12を制御し、これによってアドレス発生回路
22からメモリ14に転送アドレスが設定され、周辺回
路15からメモリ14に対してデータが転送される。転
送バイト数カウンタ 21は1バイト転送ごとに減酸、
シ、同時にアドレス発生回路22は1バイト転送ごとに
加算してメモリ14におけるアドレスを順次変更し、こ
のようにしてデータの転送が設定バイト数行われる。バ
イト数設定カウンタ21 の設定値が0になると、計時
終了を示す11号を発生し、これによってデータ転送動
作が終了するとともにタイマとしての動作が終了する。
In FIG. 3, prior to starting operation as a timer, a microprocessor 131d sets an initial value of an address in an address generation circuit 22, and sets the number of transferred bytes in a transferred byte number counter 21. When the time measurement start signal is given and the transfer request signal is received, the bus control circuit 23 sends a bus occupancy request signal to the microprocessor 16, and the microprocessor 131d sends a permission signal to the bus control circuit according to the usage state of the bus 16. Return it to 26. The bus control circuit 26 responds to the transfer request signal from the reference clock source.
controls the gate 12, whereby a transfer address is set from the address generation circuit 22 to the memory 14, and data is transferred from the peripheral circuit 15 to the memory 14. Transfer byte number counter 21 reduces acidity for each byte transfer.
At the same time, the address generation circuit 22 sequentially changes the address in the memory 14 by adding up every byte transferred, and in this way, data is transferred for the set number of bytes. When the setting value of the byte number setting counter 21 becomes 0, a signal No. 11 indicating the end of time measurement is generated, thereby ending the data transfer operation and the operation as a timer.

なおデータの転送はメモリ14から周辺回路15に対し
て行ってもよい。
Note that data may be transferred from the memory 14 to the peripheral circuit 15.

このようなデータ転送は、所定の周期を有するクロック
によって行われ、従って転送バイト数カウンタに設定さ
れたバイト数の転送終了によって、所望のタイマ値を設
定できる。転送終了をマイクロプロセッサ16に通知す
る方法としては、バス制御回路26からマイクロプロセ
ッサ13に割込みをかけてもよく、または転送バイト数
カウンタに設定値が0になったことを示すフラグを立て
て、マイクロプロセッサ16がこれを定期的に読み取る
ことによって知るようにしてもよい。なお上述の動作に
おけるデータ転送はDMA回路におけるカウンタを動作
させるのが目的であるから、必ずしも実際のデータを転
送する必要がないことは言うまでもない。
Such data transfer is performed by a clock having a predetermined period, and therefore, a desired timer value can be set upon completion of transfer of the number of bytes set in the transfer byte number counter. As a method of notifying the microprocessor 16 of the completion of the transfer, the bus control circuit 26 may issue an interrupt to the microprocessor 13, or set a flag in the transfer byte number counter indicating that the set value has become 0. The microprocessor 16 may learn this by periodically reading it. Note that since the purpose of data transfer in the above-described operation is to operate the counter in the DMA circuit, it goes without saying that it is not necessarily necessary to transfer actual data.

発明の詳細 な説明したように本発明のタイマ回路によれば、DMA
転送機能を持つ処理装置において、データ転送を行わな
い時期に、DMA回路に基準クロックを供給してDMA
動作を行わせ、所定バイト数の転送動作終了によって所
要の時10J経過を示す出力を得ることかできるように
したので、短い時間値でも正確に設定することができる
とともに、各種の異なる時間110−を設定する上の融
通性に富んでおり、かつタイマを構成するために既存の
回路に対して必要とするノ・−ドウエアの増加を最小限
に抑えることができる。
According to the timer circuit of the present invention as described in detail, the DMA
In a processing device with a transfer function, when data is not transferred, a reference clock is supplied to the DMA circuit to perform DMA processing.
As a result, it is possible to obtain an output indicating the elapse of 10J at the required time when the transfer operation of a predetermined number of bytes is completed, so even a short time value can be set accurately, and various different times 110- It provides great flexibility in setting the timer and minimizes the increase in hardware required for existing circuitry to configure the timer.

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

第1図は従来のタイマ回路の構成を示す図、第2図は本
発明のタイマ回路の原理的構成を示す図、第6図は本発
明のタイマ回路の一実施例の構成を示す図である。 1・・・基準クロック源、2・・・計数回路、5・・・
ダイレクトメモリアクセス(DMA)回路、6・・・基
準クロック源、7・・・周辺回路、11・・・ダイレク
トメモリアクセス(DMA)回路、12・・・切替ゲー
ト、13・・・マイクロプロセッサCMPU )、14
・・・メモリ、15・・・周辺回路、16・・・バス、
21・・・転送パイ)?カウンタ、22・・・アドレス
発生回路、23・・・バス制御回路。 特許出願人 富士通株式会社 代理人 弁理士玉蟲久五部(外5名)
FIG. 1 is a diagram showing the configuration of a conventional timer circuit, FIG. 2 is a diagram showing the principle configuration of the timer circuit of the present invention, and FIG. 6 is a diagram showing the configuration of an embodiment of the timer circuit of the present invention. be. 1... Reference clock source, 2... Counting circuit, 5...
Direct memory access (DMA) circuit, 6... Reference clock source, 7... Peripheral circuit, 11... Direct memory access (DMA) circuit, 12... Switching gate, 13... Microprocessor CMPU) , 14
...Memory, 15...Peripheral circuit, 16...Bus,
21...transfer pie)? Counter, 22... Address generation circuit, 23... Bus control circuit. Patent applicant Fujitsu Limited agent Patent attorney Gobe Tamamushi (5 others)

Claims (1)

【特許請求の範囲】[Claims] 転送バイト数を計数する転送バイト数カウンタを有し該
転送バイト数カウンタに予め設定されたバイト数のデー
タを転送要求信号に応じて1バイトずつ転送するDMA
回路を具えた処理装置において、該DMA回路が計時開
始信号を与えられたとき基準クロックよシ作成された転
送要求信号ごとに1バイトの転送動作を行って前記転送
バイト数カウンタに設定されたバイト数の転送終了時計
時終了を示す信号を発生することによってタイマとして
の動作を行うことを特徴とするタイマ回路。
A DMA that has a transfer byte counter that counts the number of transfer bytes and transfers a preset number of bytes of data to the transfer byte counter one byte at a time in response to a transfer request signal.
In a processing device equipped with a circuit, when the DMA circuit is given a clock start signal, it performs a 1-byte transfer operation for each transfer request signal created by the reference clock, and transfers the byte set in the transfer byte number counter. 1. A timer circuit characterized in that it operates as a timer by generating a signal indicating the end of a clock time transfer.
JP57211135A 1982-11-30 1982-11-30 Timer circuit Granted JPS59100926A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP57211135A JPS59100926A (en) 1982-11-30 1982-11-30 Timer circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP57211135A JPS59100926A (en) 1982-11-30 1982-11-30 Timer circuit

Publications (2)

Publication Number Publication Date
JPS59100926A true JPS59100926A (en) 1984-06-11
JPH0150927B2 JPH0150927B2 (en) 1989-11-01

Family

ID=16600963

Family Applications (1)

Application Number Title Priority Date Filing Date
JP57211135A Granted JPS59100926A (en) 1982-11-30 1982-11-30 Timer circuit

Country Status (1)

Country Link
JP (1) JPS59100926A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080317119A1 (en) * 2005-12-23 2008-12-25 Nxp B.V. Av Renderer Peripheral with Dual Inerrupt Lines for Staggered Interrupts

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080317119A1 (en) * 2005-12-23 2008-12-25 Nxp B.V. Av Renderer Peripheral with Dual Inerrupt Lines for Staggered Interrupts
US8484389B2 (en) * 2005-12-23 2013-07-09 Entropic Communications, Inc. AV renderer peripheral with dual inerrupt lines for staggered interrupts

Also Published As

Publication number Publication date
JPH0150927B2 (en) 1989-11-01

Similar Documents

Publication Publication Date Title
US5640602A (en) Transferring digital data in units of 2 bytes to increase utilization of a 2-byte-wide bus
US5287486A (en) DMA controller using a programmable timer, a transfer counter and an or logic gate to control data transfer interrupts
JPS59100926A (en) Timer circuit
JPS61105486A (en) Timer device
EP0152094A2 (en) Multiple clock pulse generator
JPS5447443A (en) Semiconductor memory unit
JPS6316711A (en) Timing device
JPS6269352A (en) Microprocessor
JPH0240754A (en) Dma unit
JP2517943B2 (en) Timer device
JPH03188514A (en) Counting circuit
JP2557785Y2 (en) Single chip microcomputer
JPS5818727A (en) Method and apparatus for self-control of dispersion type priority competition
JPS6152725A (en) Timer counter
JPH0427730B2 (en)
JPS6010355A (en) Measuring system of activity ratio of central processing unit
JPS6277666A (en) Buffer circuit
JPH0341812A (en) Duty ratio variable pulse generating circuit
JPS6267653A (en) Bus control system
JPS59194230A (en) Input and output controller
JPS60222951A (en) Data transfer system
JPS6238919A (en) Data processor
JPH0451332A (en) Process/task execution time counting circuit
JPS63265349A (en) Data transfer controller
JPH02287658A (en) Microprocessor