JPS62100023A - Counter control circuit - Google Patents

Counter control circuit

Info

Publication number
JPS62100023A
JPS62100023A JP23940585A JP23940585A JPS62100023A JP S62100023 A JPS62100023 A JP S62100023A JP 23940585 A JP23940585 A JP 23940585A JP 23940585 A JP23940585 A JP 23940585A JP S62100023 A JPS62100023 A JP S62100023A
Authority
JP
Japan
Prior art keywords
counter
count
read
turned
system clock
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
JP23940585A
Other languages
Japanese (ja)
Inventor
Masashi Nemoto
雅司 根本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP23940585A priority Critical patent/JPS62100023A/en
Publication of JPS62100023A publication Critical patent/JPS62100023A/en
Pending legal-status Critical Current

Links

Landscapes

  • Communication Control (AREA)

Abstract

PURPOSE:To ensure the accuracy by stopping the count tentatively only when a counter read request exists and correcting the count of the stopped counter after a time required to read the count. CONSTITUTION:When a counter read request exists, a counter read request signal is turned of for one system clock. Then a non-inverting output of a FF1 is turned on and the inverting output is turned off by the next system clock. Since the inverting output of the FF1 is turned off, a binary counter 2 executes no count and the output of the FF1 is turned on, a read register 4 reads the count of the binary counter 2. Then an update logic circuit 3 applies control to add '2' to the count of the binary counter 2 by the next system clock to correct the error by the count stop.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は電子計算機のカウンタ制御回路に関する。[Detailed description of the invention] [Industrial application field] The present invention relates to a counter control circuit for an electronic computer.

〔従来の技術〕[Conventional technology]

電子計算機には各種のカウンタが使用されており、通常
ある時間毎にカウントアツプ又はカウントダウンされる
2進カウンタで実現される。カウントアツプまたはカウ
ントダウンされる時間間隔はその使用目的に応じて種々
の値をとるが、システムクロックカウンタは、最もカウ
ント時間間隔が短いものの一例である。
Various types of counters are used in electronic computers, and are usually implemented as binary counters that count up or down at certain intervals. The time interval for counting up or down takes various values depending on the purpose of use, but the system clock counter is an example of one with the shortest counting time interval.

カウンタ値が必要となった場合、カウンタ読み取り要求
を受は取ったカウンタ制御回路は、カウンタ値をカウン
タ読み出しレジスタに読み取り、外部回路に出力する。
When a counter value is required, the counter control circuit that has received the counter read request reads the counter value into a counter read register and outputs it to an external circuit.

カウンタとは別にカウンタ読み出しレジスタを設けて、
カウンタ値を一旦カウンタ読み出しレジスタに読み取る
理由は、常に変化するカウンタに関係な(、カウンタ読
み取り要求時のカウンタ値を外部回路に出力出来るよう
にする目的からである。
A counter read register is provided separately from the counter.
The reason why the counter value is once read into the counter read register is related to the constantly changing counter (i.e., the purpose is to enable the counter value to be output to an external circuit when a counter read request is made).

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

しかし、回路実装上の制約から、カウンタとカウンタ読
み出しレジスタを接近して実装出来ない場合がある。一
方、電子計算機が高速化されるに従ってシステムクロッ
クも高速化される傾向にあり、上に述べたシステムクロ
ックカウンタのようにカウンタ値が高速に変化する場合
、1カウンタクロツク内ではカウンタ値をカウンタ読み
出ししジスタに読み取れないという問題が発生する。
However, due to circuit implementation constraints, it may not be possible to mount the counter and the counter read register close to each other. On the other hand, as electronic computers become faster, system clocks also tend to become faster, and when the counter value changes rapidly like the system clock counter mentioned above, the counter value cannot be changed within one counter clock. A problem arises in that the data cannot be read and read into registers.

本発明の目的は、このような問題点を解決したカウンタ
制御回路を提供することにある。
An object of the present invention is to provide a counter control circuit that solves these problems.

〔問題点を解決するための手段〕[Means for solving problems]

本発明のカウンタ制御回路は、カウンタ読み取り要求時
、カウンタ値を読み取るのに必要な時間分のカウントク
ロック数分、カウントを停止する手段と、 カウント再開に先立ち、前記カウンタ値を読み取るのに
必要な時間分のカウントクロック数を前記カウンタに加
算する手段と、 を有することを特徴としている。
The counter control circuit of the present invention includes means for stopping counting for a number of count clocks corresponding to the time required to read the counter value when a counter reading is requested, and a means for stopping counting for a number of count clocks corresponding to the time required to read the counter value, and a means for stopping counting for the number of count clocks necessary for reading the counter value before restarting counting. The present invention is characterized by comprising means for adding a count clock number corresponding to the time to the counter.

〔実施例〕〔Example〕

次に、本発明の実施例について、図面を参照して説明す
る。第1図は、本発明の一実施例であるシステムクロッ
クカウンタ制御回路であり、フリップフロップ1と、2
進カウンタ2と、この2進カウンタを制御する更新論理
回路3と、読み出しレジスタ4とから構成される。フリ
ップフロップ1の非反転出力端子5は読み出しレジスタ
4の制御入力端子7および更新論理回路3の制御入力端
子13に接続され、反転出力端子6は2進カウンタ2の
各制御用ANDゲート8の一方の入力端子にそれぞれ接
続されている。各A N Dゲート8の他方の入力端子
は更新論理回路3の各出力端子9にそれぞれ接続され、
2進カウンタ2の各出力端子10は更新論理回路3の各
入力端子11および読み出しレジスタ4の各入力端子1
2にそれぞれ接続されている。なお、カウンタ読み取り
要求信号はフリップフロップ1に入力される。
Next, embodiments of the present invention will be described with reference to the drawings. FIG. 1 shows a system clock counter control circuit which is an embodiment of the present invention, and shows flip-flops 1 and 2.
It consists of a binary counter 2, an update logic circuit 3 for controlling this binary counter, and a read register 4. The non-inverting output terminal 5 of the flip-flop 1 is connected to the control input terminal 7 of the read register 4 and the control input terminal 13 of the update logic circuit 3, and the inverting output terminal 6 is connected to one of the control AND gates 8 of the binary counter 2. are connected to the respective input terminals. The other input terminal of each A N D gate 8 is connected to each output terminal 9 of the update logic circuit 3,
Each output terminal 10 of the binary counter 2 is connected to each input terminal 11 of the update logic circuit 3 and to each input terminal 1 of the read register 4.
2 are connected to each other. Note that the counter reading request signal is input to the flip-flop 1.

次に、本実施例の動作を説明する。Next, the operation of this embodiment will be explained.

カウンタ読み取り要求がない場合、カウンタ読み取り要
求信号はオフであり、フリップフロップ1の非反転出力
はオフ、反転出力はオンとなっ2ている。この時、フリ
ップフロ・ノブ10反転出力がオフであることにより、
更新論理回路3は2進カウンタ2の値に1を加えるよう
制御出力を出力し、2進カウンタ2は更新論理回路3の
制御に従ってシステムクロックをカウントする。又、フ
リップフロップ1の非反転出力がオフであることにより
、読み出しレジスタ4は以前に読み取ったカウンタ値を
保持する。
When there is no counter read request, the counter read request signal is off, the non-inverted output of the flip-flop 1 is off, and the inverted output is on (2). At this time, since the flip-flow knob 10 inversion output is off,
The update logic circuit 3 outputs a control output to add 1 to the value of the binary counter 2, and the binary counter 2 counts the system clock under the control of the update logic circuit 3. Also, since the non-inverting output of the flip-flop 1 is off, the read register 4 retains the previously read counter value.

カウンタ読み取り要求がある場合、カウンタ読み取り要
求信号はlシステムクロック間オンとなる。すると、次
のシステムクロックにおいて、フリップフロップ1の非
反転出力はオン、反転出力はオフとなる。この時、フリ
ップフロップ1の反転出力がオフとなることにより2進
カウンタ2はカウントを行わず、更に、読み出しレジス
タ4はフリップフロップ1の出力がオンとなるので、2
進カウンタ2の値を読み取る。又、フリップフロップ1
の非反転出力がオンであることにより、更新論理回路3
は2進カウンタ2の値に2を加えるよう制御出力を出力
する。
If there is a counter read request, the counter read request signal is on for l system clocks. Then, at the next system clock, the non-inverted output of flip-flop 1 is turned on and the inverted output is turned off. At this time, since the inverted output of flip-flop 1 is turned off, the binary counter 2 does not count, and furthermore, the read register 4 is set to 2 because the output of flip-flop 1 is turned on.
Read the value of decimal counter 2. Also, flip-flop 1
Since the non-inverting output of the update logic circuit 3 is on, the update logic circuit 3
outputs a control output to add 2 to the value of binary counter 2.

次のシステムクロックでは、カウンタ読み取り要求信号
は既にオフとなっており、フリップフロップ1の非反転
出力はオフ、反転出力はオンとなる。加えて、更新論理
回路3は2進カウンタ2の値に2を加えるよう制御出力
を出力しているので、2進カウンタ2はカウント値に2
を加え、先のシステムクロック時に発生した2進カウン
タ2のカウント停止によるカウント誤差を修正する。又
、読み出しレジスタ4には先のカウンタ読み取り要求時
点のカウンタ値が保持される。
At the next system clock, the counter read request signal is already off, the non-inverted output of flip-flop 1 is turned off, and the inverted output is turned on. In addition, since the update logic circuit 3 outputs a control output to add 2 to the value of the binary counter 2, the binary counter 2 adds 2 to the count value.
is added to correct the counting error caused by the stoppage of the binary counter 2 that occurred during the previous system clock. Further, the read register 4 holds the counter value at the time of the previous counter read request.

更に次のシステムクロック以降では、先に説明したカウ
ンタ読み取り要求がない状態になり、2進カウンタ2は
システムクロックのカウントを継続し、読み出しレジス
タ4は以前に読み取ったカウンタ値を保持し続ける。
Furthermore, after the next system clock, there is no counter read request as described above, the binary counter 2 continues counting the system clock, and the read register 4 continues to hold the previously read counter value.

本実施例では、簡単のため読み取り要求パルスが1シス
テムクロック分の例をあげたが、複数システムクロック
分のカウント停止を行うには、カウンタ読み取り要求信
号を複数システムクロック分のパルスとし、このパルス
の後縁微分パルスで2進カウンタ2の出力を読み出しレ
ジスタ4にサンプリングすることと、カウント再開時に
2進カウンク2に加える値を、停止したシステムクロッ
ク数に1加えた値とすることで、容易に実現可能である
In this embodiment, for simplicity, an example is given in which the read request pulse is equivalent to one system clock, but in order to stop counting for multiple system clocks, the counter read request signal is made into a pulse equivalent to multiple system clocks, and this pulse This can be easily done by sampling the output of the binary counter 2 into the readout register 4 using the trailing edge differential pulse, and by setting the value added to the binary counter 2 at the time of restarting counting as the value added by 1 to the number of stopped system clocks. This is possible.

また、上記実施例ではシステムクロソクカウン夕を例に
して説明したが、その他のカウンタ、例えば、命令実行
数カウンタ、タイマカウンタなどについても適用出来る
ことは明白である。
Further, although the above embodiment has been explained using a system cross counter as an example, it is obvious that the present invention can also be applied to other counters, such as an instruction execution number counter, a timer counter, etc.

〔発明の効果〕〔Effect of the invention〕

以上説明したように本発明は、カウンタ読み取り要求が
あったときだけ一時的にカウントを停止し、カウンタの
値を読み取るのに必要な時間経過した後、停止したカウ
ンタの値を補正し、カウントを再開出来るという効果が
ある。
As explained above, the present invention temporarily stops counting only when a counter reading request is made, and after the time required to read the counter value has elapsed, the stopped counter value is corrected and the counting is resumed. The effect is that it can be restarted.

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

第1図は本発明の一実施例を朱す構成図である。 1・・・・ ・フリップフロップ 2・・・・・2進カウンタ 3・・・・・更新論理回路 4・・・・・読み出しレジスタ 8・・・・・ANDゲート FIG. 1 is a block diagram showing an embodiment of the present invention in red. 1...Flip-flop 2...Binary counter 3...Update logic circuit 4...Read register 8...AND gate

Claims (1)

【特許請求の範囲】[Claims] (1)カウンタ読み取り要求時、カウンタ値を読み取る
のに必要な時間分のカウントクロック数分、カウントを
停止する手段と、 カウント再開に先立ち、前記カウンタ値を読み取るのに
必要な時間分のカウントクロック数を前記カウンタに加
算する手段と、 を有することを特徴とするカウンタ制御回路。
(1) When a counter reading request is made, a means for stopping counting for the number of count clocks necessary to read the counter value, and a count clock for the time necessary for reading the counter value before restarting counting. A counter control circuit comprising: means for adding a number to the counter.
JP23940585A 1985-10-28 1985-10-28 Counter control circuit Pending JPS62100023A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP23940585A JPS62100023A (en) 1985-10-28 1985-10-28 Counter control circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP23940585A JPS62100023A (en) 1985-10-28 1985-10-28 Counter control circuit

Publications (1)

Publication Number Publication Date
JPS62100023A true JPS62100023A (en) 1987-05-09

Family

ID=17044284

Family Applications (1)

Application Number Title Priority Date Filing Date
JP23940585A Pending JPS62100023A (en) 1985-10-28 1985-10-28 Counter control circuit

Country Status (1)

Country Link
JP (1) JPS62100023A (en)

Similar Documents

Publication Publication Date Title
US5630172A (en) Data transfer control apparatus wherein an externally set value is compared to a transfer count with a comparison of the count values causing a transfer of bus use right
EP0212636B1 (en) Bus state control circuit
US4802089A (en) Status flag handling in a digital data processing system
JPS62100023A (en) Counter control circuit
JPS62100022A (en) Counter control circuit
JPH0736821A (en) Dma transfer controller
JPS61267858A (en) Microcomputer
JPS63187913A (en) Pulse duty detecting circuit
JPH0753312Y2 (en) Pulse counting device
SU970367A1 (en) Microprogram control device
JPS63830B2 (en)
JPS58181154A (en) Microprogram tracing device
JPS6010355A (en) Measuring system of activity ratio of central processing unit
SU1005062A1 (en) Failure consequence correction device
JPS6114531B2 (en)
JPH0423021A (en) Timer circuit
JPS621027A (en) Cassette type magnetic tape reading controller
JPH0369224A (en) Communicating system for data between cpus
JPH03119449A (en) Calculating device
JPH0531775B2 (en)
JPS6246017B2 (en)
JPS62197839A (en) Control system for central processing unit
JPS63131724A (en) Counter input gate circuit
JPH0343842A (en) Tracer memory
JPS62166463A (en) Data transfer system