JPH05175829A - Method and device for data input/output - Google Patents

Method and device for data input/output

Info

Publication number
JPH05175829A
JPH05175829A JP33897591A JP33897591A JPH05175829A JP H05175829 A JPH05175829 A JP H05175829A JP 33897591 A JP33897591 A JP 33897591A JP 33897591 A JP33897591 A JP 33897591A JP H05175829 A JPH05175829 A JP H05175829A
Authority
JP
Japan
Prior art keywords
flip
data
value
counter
flop
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
JP33897591A
Other languages
Japanese (ja)
Inventor
Shinji Nakamura
眞次 中村
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.)
Nissan Motor Co Ltd
Original Assignee
Nissan Motor 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 Nissan Motor Co Ltd filed Critical Nissan Motor Co Ltd
Priority to JP33897591A priority Critical patent/JPH05175829A/en
Publication of JPH05175829A publication Critical patent/JPH05175829A/en
Pending legal-status Critical Current

Links

Landscapes

  • Dram (AREA)

Abstract

PURPOSE:To provide the method and the device for input and output which can read and write data at a high speed. CONSTITUTION:The high-speed operation is possible if a counter 1 is used where D flip flops are inserted to the series carry line of AND gates of synchronous counters at intervals of m bits, but a value which cannot be unequivocally determined is generated in the counter 1, therefore, arbitrary one of values larger than n-1 belonging to an OK set is set as the initial value of the counter 1 when the value collected for every m bits is denoted as (n), thereby using all addresses of a memory 2 corresponding to all bits and performing the high- speed operation.

Description

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

【0001】[0001]

【産業上の利用分野】この発明は、メモリへのデータの
読み出し、書き込みを行なうデータ入出力方法および装
置に関し、特に高速読み書きを可能にする技術に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data input / output method and device for reading / writing data from / to a memory, and more particularly to a technique enabling high-speed reading / writing.

【0002】[0002]

【従来の技術】メモリへのデータの読み出し、書き込み
を行なう場合には、一般に、クロック信号を計数器(カ
ウンタ)で計数し、メモリ内で上記計数値に対応した番
地を指定してデータの読み書きを行なうようになってい
る。以下、上記の入出力装置に用いられる計数器につい
て説明する。
2. Description of the Related Art Generally, when reading or writing data to or from a memory, a clock signal is counted by a counter (counter), and an address corresponding to the counted value is designated in the memory to read or write the data. To do. The counter used in the above input / output device will be described below.

【0003】図8は、従来の一般的な非同期型カウンタ
の一例図であり、JKフリップフロップを使用した4ビ
ットの2進カウンタを示す。図8において、FF0〜F
3はそれぞれJKフリップフロップ、CLKは計数す
べき入力パルス信号(クロックパルス)、b0〜b3はそ
れぞれ各ビットの出力を示す。
FIG. 8 is an example of a conventional general asynchronous counter, showing a 4-bit binary counter using a JK flip-flop. In FIG. 8, FF 0 to F
F 3 is a JK flip-flop, CLK is an input pulse signal (clock pulse) to be counted, and b 0 to b 3 are outputs of respective bits.

【0004】また、図10は従来の一般的な同期型カウ
ンタの一例図であり、JKフリップフロップとANDゲ
ートを使用した4ビットの2進カウンタを示す。図10
において、A0〜A3はそれぞれANDゲートを示し、そ
の他、図8と同符号は同じものを示す。図10の回路に
おいて、各ビットのJi、Ki入力は、前段のJKフリッ
プフロップからの出力および最下位ビットの入力によっ
て以下のように決定される。 J0=K0=1 J1=K1=b02=K2=b103=K3=b21
FIG. 10 is an example of a conventional general synchronous counter, showing a 4-bit binary counter using a JK flip-flop and an AND gate. Figure 10
In FIG. 8, A 0 to A 3 respectively represent AND gates, and other parts have the same reference numerals as those in FIG. In the circuit of FIG. 10, the J i and K i inputs of each bit are determined as follows by the output from the preceding JK flip-flop and the input of the least significant bit. J 0 = K 0 = 1 J 1 = K 1 = b 0 J 2 = K 2 = b 1 b 0 J 3 = K 3 = b 2 b 1 b 0

【0005】[0005]

【発明が解決しようとする課題】しかし、上記のような
従来の計数器においては、第nビットの値を決める入力
の一般項J、Knが、 Jn=Kn=bn-1n-2……b210 となっているため、計数器の桁数が増加すると、中間結
果の伝播に時間がかかって作動周波数を高めることが出
来ない、という問題点があった。以下、非同期型と同期
型について上記の問題点を詳細に説明する。
However, in the conventional counter as described above, the general terms J n and K n of the input for determining the value of the nth bit are J n = K n = b n-1. Since b n-2 ...... b 2 b 1 b 0 , there is a problem that if the number of digits of the counter increases, it takes time for the intermediate result to propagate and the operating frequency cannot be increased. It was Hereinafter, the above-mentioned problems regarding the asynchronous type and the synchronous type will be described in detail.

【0006】非同期型計数器における問題点 前記図8の回路においては、各JKフリップフロップの
J入力とK入力を共に1とし、最下位のJKフリップフ
ロップFF0のクロック入力端子に計数すべき入力(C
LK)を接続し、以後各JKフリップフロップの出力を
一段上のJKフリップフロップのクロック入力端子に入
力するように構成している。上記の構成において、各J
Kフリップフロップには動作が完結するまでに遅れがあ
るため、計数すべき入力信号の周波数が上記の遅れに対
して相対的に高くなると、計数値に遅れが出て、出力さ
れる2進数の値が、実際の計数値より小さくなるという
問題点がある。例えば、図9は上記の非同期型計数器の
タイミングチャートである。図9においては、各JKフ
リップフロップの遅れτがクロックパルスCLKの半波
長と等しい場合を例示している。この場合、(A)点は
第5番目のパルスが入った時点であり、従って計数値
“b3210”は“0100”(10進数で4)でな
ければならない。しかし、図から判るように、上記の遅
れによって実際には、“0010”(10進数で2)ま
たは“0000”(10進数で0)となっている。従っ
て、非同期型計数器を使う場合には、クロックパルスの
周波数が連続したJKフリップフロップの遅れに対して
充分に低くなければならない。
Problems in Asynchronous Counter In the circuit of FIG. 8, the J input and the K input of each JK flip-flop are both set to 1, and the input to be counted to the clock input terminal of the lowest JK flip-flop FF 0. (C
LK), and thereafter, the outputs of the respective JK flip-flops are input to the clock input terminals of the JK flip-flops one stage higher. In the above configuration, each J
Since the K flip-flop has a delay until the operation is completed, when the frequency of the input signal to be counted becomes relatively high with respect to the above delay, the count value is delayed and the output binary number is delayed. There is a problem that the value becomes smaller than the actual count value. For example, FIG. 9 is a timing chart of the asynchronous counter. FIG. 9 illustrates the case where the delay τ of each JK flip-flop is equal to the half wavelength of the clock pulse CLK. In this case, (A) a point is a point that contains the fifth pulse, therefore the count value "b 3 b 2 b 1 b 0" must be "0100" (decimal 4). However, as can be seen from the figure, the actual delay is "0010" (2 in decimal) or "0000" (0 in decimal). Therefore, when using the asynchronous counter, the frequency of the clock pulse must be sufficiently low with respect to the delay of the continuous JK flip-flops.

【0007】さらに第二の問題点として、各JKフリッ
プフロップの遅れτがすべて等しいわけではないことに
よる非同期性の問題がある。すなわち、この計数器を含
む全体のシステムを特定のクロックに同期させて動作さ
せる場合、非同期型計数器では、その値の確定時が、各
々一様ではない遅れを有する全てのフリップフロップの
遅れの和によって規定されるため、同期的に値を参照し
ようとすると、その値が不確定となってしまう。例え
ば、前記図9の(A)点において、その値が“001
0”になるか“0000”になるかの違いが生じるの
は、二番目のJKフリップフロップFF1の動作速度が
僅かに速いか遅いかによるものである。上記と同様の現
象は、図示のように第8番目と第9番目のパルスが入力
した時点でも生じる。
A second problem is that the delay τ of each JK flip-flop is not all equal, which causes a problem of non-synchronization. That is, when operating the entire system including this counter in synchronization with a specific clock, the asynchronous counter has delays of all flip-flops that have non-uniform delays when the value is determined. Since the value is defined by the sum, if the value is referred to synchronously, the value becomes uncertain. For example, at the point (A) in FIG. 9, the value is “001
0 "or become" 0000 becomes "of differences from occurring is due to the second JK flip-flop or the operating speed of the FF 1 is slightly faster or slower. Similar to the above phenomenon, illustrated As described above, it also occurs at the time when the 8th and 9th pulses are input.

【0008】同期型計数器における問題点 前記図10の回路においては、各JKフリップフロップ
の出力がそれぞれ一つのANDゲートを介して次ビット
のJKフリップフロップの入力に接続され、かつ各AN
Dゲートの出力が次ビットのANDゲートの一方の入力
に接続されてANDゲートの直列キャリーラインを形成
している。図11は、上記の同期型計数器のタイミング
チャートである。図11においては、入力するクロック
パルスはパルス幅nsecが2で周期が6nsecであり、ま
た各ANDゲートは1nsecの遅れを有し、各JKフリ
ップフロップは3nsecの遅れを有するものとしてい
る。すなわち、(A)点における1nsecの遅れは、図
10のANDゲートA0における動作遅れによって発生
したものである。同様に(B)点における遅れは、AN
DゲートA0によって遅れた遷移がさらにANDゲート
1によって1nsec遅れたものであり、JKフリップフ
ロップFF2の入力信号としては合計2nsecの遅れが出
ている。この(B)点における“0”から“1”への遷
移の後、1nsec後のクロックパルスの立下がりに対応
してJKフリップフロップFF2が動作し、(C)点に
示すようにJKフリップフロップの持つ3nsecの遅れ
の後に、JKフリップフロップFF2の出力は“0”か
ら“1”へと遷移している。上記の一連の動作と同様な
動作の系列が図11中の(D)、(E)、(F)に示さ
れている。(F)点の遅れは図10の回路におけるAN
DゲートA2の遅れに対応しており、JKフリップフロ
ップFF3の入力の遅れは合計1nsec増加して3nsec
になっている。このためJKフリップフロップFF3
の入力信号が“0”から“1”へと遷移するのは、クロ
ックパルスが立下がる時点と重なっており、クロックパ
ルスが立下がった時には安定した“1”とはならない。
従ってJKフリップフロップFF3の正常な遷移は期待
できず、(G)の点線で示されるように、たまたまクロ
ックの立下がりが遅れるか、たまたまANDゲート
0、A1、A2の遅れが少し小さくなるか、あるいはこ
れらの逆が起こることによってJKフリップフロップF
3の出力が“1”となったり、あるいは“0”のまま
であったりすることになる。上記のような不安定な現象
は、各ANDゲートA0、A1、A2における遅れの総和
がクロックパルスの周期に対して相対的に大きくなり過
ぎたために起こるものであって、図11の例では、各A
NDゲートの遅れの総和がクロックパルスの周期の1/
2に達すると正確な計数が出来なくなる。したがって図
11のタイムチャートに示すごとき遅れの特性とクロッ
クパルスの周期の関係では、高々3ビットまでの計数器
しか構成できないことが判る。上記のように、従来の計
数器においては、桁数が大きくなるとクロックパルスの
周波数を高くした高速の計数器は実現が困難であり、そ
のためメモリからのデータの読み出し、書き込みも高速
化が困難であるという問題があった。
Problems with Synchronous Counter In the circuit of FIG. 10, the output of each JK flip-flop is connected to the input of the JK flip-flop of the next bit through one AND gate, and each AN is connected.
The output of the D gate is connected to one input of the AND gate of the next bit to form a serial carry line of the AND gate. FIG. 11 is a timing chart of the synchronous counter. In FIG. 11, the input clock pulse has a pulse width nsec of 2 and a period of 6 nsec, each AND gate has a delay of 1 nsec, and each JK flip-flop has a delay of 3 nsec. That is, the delay of 1 nsec at the point (A) is caused by the operation delay in the AND gate A 0 of FIG. Similarly, the delay at point (B) is AN
The transition delayed by the D gate A 0 is further delayed by 1 nsec by the AND gate A 1 , and the input signal of the JK flip-flop FF 2 is delayed by a total of 2 nsec. After the transition from "0" to "1" at the point (B), the JK flip-flop FF 2 operates corresponding to the falling edge of the clock pulse 1 nsec later, and the JK flip-flop is operated as shown at the point (C). The output of the JK flip-flop FF 2 transits from “0” to “1” after the delay of 3 nsec which the loop has. A series of operations similar to the above series of operations is shown in (D), (E), and (F) of FIG. The delay at point (F) is AN in the circuit of FIG.
Corresponding to the delay of the D gate A 2, the total delay of the input of the JK flip-flop FF 3 is increased by 1 nsec to 3 nsec.
It has become. Therefore, the input signal to the JK flip-flop FF 3 transits from “0” to “1” at the time when the clock pulse falls, and when the clock pulse falls, it is stable “1”. Don't
Therefore, the normal transition of the JK flip-flop FF 3 cannot be expected, and as shown by the dotted line in (G), the fall of the clock happens to be delayed, or the AND gates A 0 , A 1 and A 2 happen to be slightly delayed. JK flip-flop F becomes smaller or
The output of F 3 will be or remain "1" or a, or "0". The above-mentioned unstable phenomenon occurs because the sum of delays in the AND gates A 0 , A 1 , and A 2 becomes relatively large with respect to the cycle of the clock pulse. In the example, each A
The sum of the delays of the ND gates is 1 / the cycle of the clock pulse.
When it reaches 2, accurate counting becomes impossible. Therefore, from the relationship between the delay characteristic and the clock pulse period as shown in the time chart of FIG. 11, it can be understood that only a counter having up to 3 bits can be configured. As described above, in the conventional counter, when the number of digits becomes large, it is difficult to realize a high-speed counter in which the frequency of the clock pulse is increased, and therefore it is difficult to read and write data from the memory at high speed. There was a problem that there was.

【0009】本発明は、上記のごとき従来技術の問題点
を解決するためになされたものであり、データの高速読
み書きを可能にした入出力方法および装置を提供するこ
とを目的とする。
The present invention has been made to solve the above-mentioned problems of the prior art, and an object of the present invention is to provide an input / output method and apparatus capable of high-speed reading / writing of data.

【0010】[0010]

【課題を解決するための手段】上記の目的を達成するた
め、本発明においては、特許請求の範囲に記載するよう
に構成している。すなわち、請求項1に記載のデータ入
出力方法においては、メモリの番地を指定するための計
数器として、ビット数に対応した数のフリップフロップ
と、それと同数のアンドゲートとを有し、各フリップフ
ロップの出力がそれぞれ一つのアンドゲートを介して次
ビットのフリップフロップの入力に接続され、かつ各ア
ンドゲートの出力が次ビットのアンドゲートの一方の入
力に接続されてアンドゲートの直列キャリーラインを形
成している同期型計数器における上記アンドゲートの直
列キャリーラインに、m(mは正の整数)ビット毎にD
フリップフロップを直列に挿入した構成を有し、予め定
まった複数の所定の値において正常な計数値を出力する
同期型計数器を用い、その計数器で正常な値を出力しな
い数の部分を補うため、請求項1の(1)〜(5)に示
すごとき手順でメモリの番地を指定するように構成して
いる。なお、請求項1に記載の“2↑(m+n)−1”に
おける“↑(m+n)”は2の(m+n)乗を示す。すな
わち2↑(m+n)−1は下記(数1)式で示す内容を有
する。以下同様に、↑( )の符号は括弧内が羃数を示
す。ただし、添字として用いる場合には、2↑(m+n)
−1をXとして表示している。
In order to achieve the above object, the present invention is constructed as described in the claims. That is, in the data input / output method according to the first aspect, as a counter for designating the address of the memory, there are provided flip-flops of a number corresponding to the number of bits and AND gates of the same number, and each flip-flop is The output of each AND gate is connected to the input of the flip-flop of the next bit through one AND gate, and the output of each AND gate is connected to one input of the AND gate of the next bit to connect the serial carry line of the AND gate. In the serial carry line of the AND gate in the synchronous counter being formed, D (m is a positive integer) every D bits
Uses a synchronous counter that has a configuration in which flip-flops are inserted in series and that outputs a normal count value at a plurality of predetermined values, and compensates for the part of the counter that does not output a normal value. Therefore, the address of the memory is specified by the procedure as described in (1) to (5) of claim 1. In addition, "↑ (m + n)" in "2 ↑ (m + n) -1" described in claim 1 indicates 2 to the power of (m + n). That is, 2 ↑ (m + n) −1 has the content shown in the following (Equation 1). Similarly, in the same manner, the sign of ↑ () indicates a power in parentheses. However, when used as a subscript, 2 ↑ (m + n)
-1 is displayed as X.

【0011】[0011]

【数1】 [Equation 1]

【0012】また、請求項2の入出力装置においては、
請求項1に記載の方法を実現するための構成、すなわ
ち、メモリと、上記の特殊な同期型計数器と、初期値設
定手段と、制御手段と、を備えている。なお、上記の初
期値設定手段および制御手段は、例えば、コンピュータ
(例えば後記図1の中央処理装置3)の機能で構成する
ことが出来る。
Further, in the input / output device of claim 2,
A structure for realizing the method according to claim 1, that is, a memory, the above-mentioned special synchronous counter, an initial value setting means, and a control means are provided. The initial value setting means and the control means described above can be configured by, for example, the functions of a computer (for example, the central processing unit 3 in FIG. 1 described later).

【0013】[0013]

【作用】上記のごとく本発明においては、メモリの番地
を指定するための計数器として、上記のごとき特殊な高
速計数器を用いている。上記の同期型計数器において
は、ANDゲートの直列キャリーラインに、mビット毎
にDフリップフロップを挿入したことにより、中間結果
の伝播距離を短くすることが出来るので、作動周波数の
高い高速計数器を実現することが出来る。すなわち、上
記のmビット毎にまとめた部分をステージと名付けれ
ば、Dフリップフロップを各ステージ毎に挿入すると、
Dフリップフロップ間に存在するANDゲートのキャリ
ー長は高々mゲートとなる。つまり、各ステージ毎にD
フリップフロップを挿入して、各ANDゲートにおける
遅れをその点で0にするように構成しているので、直列
キャリーライン上のANDゲートの全体の数が多くて
も、動作に影響する遅れは各ステージ内の遅れのみに押
さえられる。したがって、ステージ内のビット数がmの
場合には、全体のビット数が如何に大きい場合でも、動
作に影響する遅れはANDゲートm個分の遅れになるの
で、クロックパルスの周期を高速にすることが出来る。
As described above, in the present invention, the special high-speed counter as described above is used as the counter for designating the address of the memory. In the above-mentioned synchronous counter, by inserting the D flip-flop every m bits in the serial carry line of the AND gate, the propagation distance of the intermediate result can be shortened, so that the high-speed counter with a high operating frequency is provided. Can be realized. In other words, if the above-mentioned part for each m bits is named a stage, and a D flip-flop is inserted for each stage,
The carry length of the AND gate existing between the D flip-flops is at most m gates. That is, D for each stage
Since a flip-flop is inserted so that the delay in each AND gate becomes 0 at that point, even if the total number of AND gates on the serial carry line is large, the delay that affects the operation is different. Only the delay within the stage can be suppressed. Therefore, when the number of bits in the stage is m, no matter how large the total number of bits is, the delay affecting the operation is the delay of m AND gates, so that the cycle of the clock pulse is made faster. You can

【0014】ただし、上記のように構成すると、直列キ
ャリーライン上にDフリップフロップを挿入したことに
より、真の値と異なる計数値を示す場合が生じる。例え
ばm=2、n=2の場合、すなわち2ビット毎にまとめ
たステージ2個からなる4ビットカウンタの場合には、
0、1、2、3、5、6、7、9、10、11、13、
14、15については正確に計数することが出来るが、
4、8、12については計数値が正常値と異なってい
る。したがって上記のごとき計数器をデータ入出力装置
に用いる場合には、特別な番地指定方法を用いる必要が
ある。すなわち、正常な計数値となる所定の値をOK値
とし、上記Dフリップフロップによって区分けられた段
数をnとした場合に、0から最大Xまで番地付けられた
メモリを使用し、該メモリに書き込みまたは読み出され
るデータの系列をD0、D1、D2、…、Di、…、DX
した場合に、まず、n−1以上の任意のOK値(上記の
例では、2、3、5、6、7、9、10、11、13、
14、15)の一つを選び、上記同期型計数器の各フリ
ップフロップをセットまたはリセットして上記同期型計
数器の初期値を上記の選択したOK値にセットする。ま
た上記同期型計数器のDフリップフロップは全てリセッ
トする。なお、上記のOK値は予め選択し、その値を初
期設定するように構成しておけばよい。次に、最初のデ
ータD0を上記同期型計数器の値、すなわち上記の初期
値で示される番地に書き込む。
However, with the above configuration, the D flip-flop may be inserted on the serial carry line to cause a count value different from the true value. For example, in the case of m = 2 and n = 2, that is, in the case of a 4-bit counter consisting of two stages that are grouped every 2 bits,
0, 1, 2, 3, 5, 6, 7, 9, 10, 11, 13,
It is possible to accurately count 14 and 15, but
The count values of 4, 8, and 12 are different from the normal values. Therefore, when the counter as described above is used in the data input / output device, it is necessary to use a special address designating method. That is, when a predetermined value that is a normal count value is an OK value and the number of stages divided by the D flip-flop is n, a memory numbered from 0 to a maximum X is used and written in the memory. Alternatively, when the series of data to be read is D 0 , D 1 , D 2 , ..., D i , ..., D X , first, an arbitrary OK value of n−1 or more (in the above example, 2, 3 5, 6, 7, 9, 10, 11, 13,
14, 15) and sets or resets each flip-flop of the synchronous counter to set the initial value of the synchronous counter to the selected OK value. Further, all the D flip-flops of the synchronous counter are reset. The above-mentioned OK value may be selected in advance and the value may be initialized. Next, the first data D 0 is written in the value of the synchronous counter, that is, the address indicated by the initial value.

【0015】次に、上記同期型計数器が入力パルス信号
を計数して現在の状態から次の状態へ遷移すると、次の
データを上記同期型計数器の計数値で示される番地へ書
き込む。そして、全てのデータ、すなわち最大でDX
での書き込みが終わるまで、上記の操作を繰り返す。ま
た、データ読み出しの場合も上記と同様の手順でメモリ
の番地を指定し、当該番地のデータを読み出す。例え
ば、後記図2に示す同期型計数器のように、m=2、n
=3で5ビットの計数器を構成した場合において、上記
の初期値として2を選択した場合には、D0〜D31の各
データと書き込まれる番地の関係は図3に示すようにな
る。図3から判るように、0番地には3番目のデータD
2が、1番地には16番目のデータD15が、2番地には
1番目のデータD0が書き込まれるというように、番地
の順序とそこに書き込まれるデータ番号とは順序が異な
っているが、書き込みと読み出しの際に同じ番地を指定
すれば、何ら問題を生じることがない。
Next, when the synchronous counter counts the input pulse signal and transitions from the current state to the next state, the next data is written in the address indicated by the count value of the synchronous counter. Then, the above operation is repeated until writing of all data, that is, up to D X is completed. Also, in the case of data reading, the address of the memory is specified and the data of the address is read by the same procedure as above. For example, as in the synchronous counter shown in FIG. 2 described later, m = 2, n
In = 3 in case where the 5-bit counter, if you select 2 as the initial value of the above relation of the address to be written and the data D 0 to D 31 are as shown in FIG. As can be seen from FIG. 3, the third data D is at address 0.
2 , the 16th data D 15 is written in the 1st address and the 1st data D 0 is written in the 2nd address, so that the order of the addresses and the data number written therein are different. If the same address is specified for writing and reading, no problem will occur.

【0016】なお、本発明においては、前記のごとく一
部に計数値が正常値と異なる値となる特殊な高速計数器
を使用し、計数器で計数できる全ての数(例えば4ビッ
トなら16個)に対応した番地を全て指定するために、
前記のごとき特別な番地指定方法を用いているが、正常
値と異なる値に相当する番地を欠番とするのであれば、
通常と同様の番地指定方法を用いることが出来る。例え
ば、上記のm=2、n=2の4ビットカウンタの場合
に、0、1、2、3、5、6、7、9、10、11、1
3、14、15の13個の番地のみを使用し、4、8、
12の3個の番地は欠番としてメモリを使用しないので
あれば、通常通りに0番地には1番目のデータD0、1
番地には2番目のデータD1というように指定すればよ
い。
In the present invention, as described above, a special high-speed counter whose count value is a value different from the normal value is used in part, and all the numbers that can be counted by the counter (for example, 16 bits for 4 bits) are used. ) To specify all the addresses corresponding to
Although the special address designation method as described above is used, if the address corresponding to a value different from the normal value is to be omitted,
The same address designation method as usual can be used. For example, in the case of the above 4-bit counter with m = 2 and n = 2, 0, 1, 2, 3, 5, 6, 7, 9, 10, 11, 1
Use only 13 addresses of 3, 14, 15 and 4, 8,
If the memory is not used for the three addresses 12 and the memory is not used, the first data D 0 , 1 is assigned to the address 0 as usual.
The address may be designated as the second data D 1 .

【0017】[0017]

【実施例】本発明のデータ入出力装置について説明する
前に、まず、本発明に用いる特殊な同期型計数器につい
て説明する。図5は、本発明者等が発明した同期型計数
器の一例のブロック図である。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Before explaining the data input / output device of the present invention, first, a special synchronous counter used in the present invention will be explained. FIG. 5 is a block diagram of an example of a synchronous counter invented by the present inventors.

【0018】図5において、FF0〜FF3はそれぞれJ
Kフリップフロップ、A0〜A3はそれぞれANDゲー
ト、DF0及びDF1はDフリップフロップ(Delayまた
はDataフリップフロップ)、CLKは計数すべき入力パ
ルス信号(クロックパルス)、b0〜b3はそれぞれ各ビ
ットの出力を示す。図5の回路は、ANDゲートA0
3とJKフリップフロップFF0〜FF3からなる4ビ
ットの同期型計数器において、2ビット毎にまとめた部
分をそれぞれステージと名付ければ、ANDゲートの直
列キャリーライン上の各ステージから次のステージへ移
る出力へDフリップフロップを挿入し、そのDフリップ
フロップの出力を次のステージのキャリー入力とするよ
うに構成したものである。この場合、m=2であり、か
つ、ステージ数をnとすれば、n=2であり、全体のビ
ット数はm×n=4となる。
In FIG. 5, FF 0 to FF 3 are J, respectively.
K flip-flops, A 0 to A 3 are AND gates, DF 0 and DF 1 are D flip-flops (Delay or Data flip-flops), CLK is an input pulse signal (clock pulse) to be counted, and b 0 to b 3 are The output of each bit is shown. The circuit of FIG. 5 has AND gates A 0 to
In a 4-bit synchronous counter composed of A 3 and JK flip-flops FF 0 to FF 3 , if the portions that are grouped every 2 bits are named stages, each stage on the serial carry line of the AND gate is In this configuration, a D flip-flop is inserted into the output that moves to the stage, and the output of the D flip-flop is used as the carry input of the next stage. In this case, if m = 2 and the number of stages is n, then n = 2 and the total number of bits is m × n = 4.

【0019】次に作用を説明する。図6は、図5の回路
のタイミングチャートである。図6においては、図5の
回路における各JKフリップフロップの遅れを3nse
c、各ANDゲートの遅れを1nsec、各Dフリップフロ
ップの遅れを2nsecとし、クロックパルスCLKの周
期を6nsecとし、各JKフリップフロップをリセット
した状態から計数を開始した場合における特性を、各出
力の値を縦軸に、時間を横軸に取ったグラフで示してい
る。また、図5の各素子はクロックパルスの立下がりで
起動するものであり、この時の各JKフリップフロップ
FF0〜FF3の値が計数値である。この実施例において
は、Dフリップフロップが2ビット毎に挿入されている
ため、Dフリップフロップ間に存在するANDゲートの
キャリー長は高々2ゲートとなっている。すなわち、各
ステージ毎にDフリップフロップを挿入して、各AND
ゲートにおける遅れをその点で0にするように構成して
いるので、直列キャリーライン上のANDゲートの全体
の数が多くても、動作に影響する遅れは各ステージ内の
遅れのみに押さえられる。したがって図5の例のごと
く、ステージ内のビット数mが2の場合には、全体のビ
ット数が如何に大きい場合でも、動作に影響する遅れは
ANDゲート2個分の遅れになるので、クロックパルス
の周期を図示のごとく6nsecと高速にすることが出来
る。
Next, the operation will be described. FIG. 6 is a timing chart of the circuit of FIG. In FIG. 6, the delay of each JK flip-flop in the circuit of FIG.
c, the delay of each AND gate is 1 nsec, the delay of each D flip-flop is 2 nsec, the cycle of the clock pulse CLK is 6 nsec, and the characteristics when counting is started from the state of resetting each JK flip-flop, The value is plotted on the vertical axis and the time on the horizontal axis. Further, each element in FIG. 5 is activated at the falling edge of the clock pulse, and the values of the respective JK flip-flops FF 0 to FF 3 at this time are count values. In this embodiment, since the D flip-flops are inserted every 2 bits, the carry length of the AND gates existing between the D flip-flops is at most 2 gates. That is, a D flip-flop is inserted for each stage, and each AND
Since the delay in the gate is set to 0 at that point, even if the total number of AND gates on the series carry line is large, the delay that affects the operation is suppressed only to the delay in each stage. Therefore, when the number of bits m in the stage is 2, as in the example of FIG. 5, the delay that affects the operation is a delay of two AND gates, no matter how large the total number of bits is. The pulse cycle can be as high as 6 nsec as shown in the figure.

【0020】ただし、図5の構成では、直列キャリーラ
イン上にDフリップフロップを挿入したことにより、計
数値に次のごとき問題を生じる。図7は、図5の回路に
おける各ビット出力と10進数との対応を示す図表であ
る。図7において、破線で囲んだ部分、つまり、10進
数で4、8、12の点では、Dフリップフロップの値D
Fが“1”となっており、この部分では計数値が誤って
いる。すなわち、本来4=“0100”となるべき値が
“0000”となり、8=“1000”が“0100”
となり、12=“1100”が“1000”となってい
る。上記のように、この4ビット計数器においては、
0、1、2、3、5、6、7、9、10、11、13、
14、15は正確に計数することが出来るが、4、8、
12は計数することが出来ない。上記の正常に計数でき
る数、すなわち計数可能な数の集合をOK集合と名付け
た場合、一般的には、OK集合は下記(数1)式で示さ
れる。
However, in the configuration of FIG. 5, the D flip-flop is inserted on the serial carry line, which causes the following problems in the count value. FIG. 7 is a table showing the correspondence between each bit output and the decimal number in the circuit of FIG. In FIG. 7, at the portion surrounded by the broken line, that is, at decimal points 4, 8, and 12, the value D of the D flip-flop
F is "1", and the count value is incorrect in this part. That is, the value that should originally be 4 = “0100” is “0000”, and 8 = “1000” is “0100”.
Therefore, 12 = “1100” becomes “1000”. As mentioned above, in this 4-bit counter,
0, 1, 2, 3, 5, 6, 7, 9, 10, 11, 13,
14 and 15 can be counted accurately, but 4, 8 and
12 cannot be counted. When the above-mentioned number that can be normally counted, that is, a set that can be counted is named an OK set, the OK set is generally represented by the following (Equation 1).

【0021】[0021]

【数1】 [Equation 1]

【0022】ただし、上記(数1)式において、Vは下
記(数2)式で示される値である。
However, in the above equation (1), V is a value represented by the following equation (2).

【0023】[0023]

【数2】 [Equation 2]

【0024】上記のOKにおけるVの条件は、直列キャ
リーライン上のDフリップフロップの値が全て0である
ことに相当する。上記のように、図5のごとき計数器に
おいては、高速動作が可能である代わりに、OK集合に
属する数以外の数は正常に計数することが出来ない。し
たがって、このような計数器を入出力装置におけるアド
レス計数用のカウンタとして用いる場合には、正常値と
異なる値に相当する番地を欠番とするのであれば、通常
と同様の番地指定方法を用いることが出来る。例えば、
上記の4ビットカウンタの場合に、0、1、2、3、
5、6、7、9、10、11、13、14、15の13
個の番地のみを使用し、4、8、12の3個の番地は欠
番としてメモリを使用しないのであれば、通常通りに0
番地には1番目のデータD0、1番地には2番目のデー
タD1というように指定すればよい。なお、図5の回路
において、計数値がOK集合に属している場合は全ての
Dフリップフロップの出力が“0”であるから、各Dフ
リップフロップの出力からNOT回路(否定回路)を介
してANDゲートに接続すれば、そのANDゲートの出
力が“1”の場合には、そのときの計数値がOK集合に
属していることを示す。したがって、上記のように欠番
を含む入出力方法の場合には、上記ANDゲートの出力
が“1”のときにのみ、計数値で番地を指定するように
構成すればよい。
The condition of V in the above OK corresponds to that all the values of the D flip-flops on the serial carry line are zero. As described above, in the counter as shown in FIG. 5, although the high speed operation is possible, the numbers other than the numbers belonging to the OK set cannot be normally counted. Therefore, when using such a counter as a counter for counting addresses in an input / output device, if the address corresponding to a value different from the normal value is to be omitted, use the same address designation method as usual. Can be done. For example,
In the case of the above 4-bit counter, 0, 1, 2, 3,
13 of 5, 6, 7, 9, 10, 11, 13, 14, 15
If only one address is used and three addresses 4, 8, and 12 are omitted and the memory is not used, 0 is used as usual.
The first data D 0 may be designated as the address and the second data D 1 may be designated as the address. In the circuit of FIG. 5, when the count value belongs to the OK set, the outputs of all the D flip-flops are “0”. Therefore, the output of each D flip-flop is passed through the NOT circuit (negative circuit). If it is connected to an AND gate, the output value of the AND gate being "1" indicates that the count value at that time belongs to the OK set. Therefore, in the case of the input / output method including the missing number as described above, the address may be designated by the count value only when the output of the AND gate is "1".

【0025】しかし、上記の入出力方法では、メモリ内
に使用出来ない番地が出来るので、不経済である。その
ため、上記のごとき特殊な高速計数器を用い、かつメモ
リの全ての番地を有効に活用することが出来るようにし
たのが本発明の入出力方法である。以下、詳細に説明す
る。図1は、本発明のデータ入出力装置の一実施例のブ
ロック図であり、計数値をアドレスとして用いるマイク
ロプログラムのプログラム・カウンタとして前記のごと
き特殊な高速計数器を用いた例を示す。図1において、
1は前記のごとき特殊な計数器であり、例えば図2に示
すごときm=2、n=3の計数器である。また、2はメ
モリ、3は中央処理装置(CPU)、4はアドレスバ
ス、5はデータバスである。また、S1およびS2は計数
器1内の各フリップフロップをセットするセット信号、
1およびR2は同じくリセット信号(詳細後述)であ
る。また、CLKはクロック信号、WRはメモリの書き
込み信号である。この書き込み信号WRが“1”の時、
アドレスバス4の値で示される番地にデータバス5上の
値が書き込まれる。また、計数器1の各JKフリップフ
ロップはメモリ2のアドレスバス4に直接接続されてお
り、各JKフリップフロップの計数値が番地を指定する
ものとなる。
However, the above-mentioned input / output method is uneconomical because some addresses cannot be used in the memory. Therefore, it is the input / output method of the present invention that the special high-speed counter as described above is used and all the addresses of the memory can be effectively utilized. The details will be described below. FIG. 1 is a block diagram of an embodiment of a data input / output device of the present invention, showing an example in which the special high-speed counter as described above is used as a program counter of a microprogram which uses a count value as an address. In FIG.
1 is a special counter as described above, for example, a counter with m = 2 and n = 3 as shown in FIG. Further, 2 is a memory, 3 is a central processing unit (CPU), 4 is an address bus, and 5 is a data bus. Further, S 1 and S 2 are set signals for setting each flip-flop in the counter 1,
R 1 and R 2 are also reset signals (details will be described later). CLK is a clock signal and WR is a memory write signal. When the write signal WR is “1”,
The value on the data bus 5 is written at the address indicated by the value on the address bus 4. Further, each JK flip-flop of the counter 1 is directly connected to the address bus 4 of the memory 2, and the count value of each JK flip-flop specifies the address.

【0026】次に、図2は、上記の計数器1の詳細を示
すブロック図である。図2において、FF0〜FF4はJ
Kフリップフロップ、DF0、DF1はDフリップフロッ
プ、A0〜A3はANDゲート、b0〜b4は各JKフリッ
プフロップの出力である。各JKフリップフロップFF
0〜FF4は、セット端子setとリセット端子resetとを有
し、また各DフリップフロップDF0、DF1はリセット
端子resetを有し、後述するごとく初期値を2とする場
合には、中央処理装置3から出力されるセット信号S1
は、JKフリップフロップFF0、FF2、FF3、FF4
のセット端子に与えられ、リセット信号R1はJKフリ
ップフロップFF0、FF2、FF3、FF4のリセット端
子およびDフリップフロップDF0、DF1のリセット端
子に与えられる。一方、セット信号S2はJKフリップ
フロップFF1のセット端子に与えられ、リセット信号
2はJKフリップフロップFF1のリセット端子に与え
られる。上記のJKフリップフロップおよびDフリップ
フロップにおけるセット機能とリセット機能は非同期で
動作するようになっており、計数器の初期状態を非同期
で任意の値に設定することが出来る。なお、図4は、図
1の回路における信号波形のタイミングチャートであ
る。
Next, FIG. 2 is a block diagram showing the details of the counter 1 described above. In FIG. 2, FF 0 to FF 4 are J
K flip-flops, DF 0 and DF 1 are D flip-flops, A 0 to A 3 are AND gates, and b 0 to b 4 are outputs of each JK flip-flop. Each JK flip-flop FF
0 to FF 4 have a set terminal set and a reset terminal reset, and each D flip-flop DF 0 , DF 1 has a reset terminal reset. The set signal S 1 output from the processing device 3
Is a JK flip-flop FF 0 , FF 2 , FF 3 , FF 4
And the reset signal R 1 is applied to the reset terminals of the JK flip-flops FF 0 , FF 2 , FF 3 and FF 4 and the reset terminals of the D flip-flops DF 0 and DF 1 . On the other hand, the set signal S 2 is given to the set terminal of the JK flip-flop FF 1 , and the reset signal R 2 is given to the reset terminal of the JK flip-flop FF 1 . The set function and the reset function in the above JK flip-flop and D flip-flop operate asynchronously, and the initial state of the counter can be asynchronously set to an arbitrary value. Note that FIG. 4 is a timing chart of signal waveforms in the circuit of FIG.

【0027】以下、作用を説明する。m×nビットの計
数器1によってメモリ2の番地を指定するには、メモリ
2として0から最大2↑(m+n)−1まで番地付けられ
たメモリを使用する。このメモリに記憶されるデータの
系列をD0、D1、D2、…、Di、…、DXとすると、こ
れらのデータのメモリへの書き込みは以下の手順で行な
う。 (1)n−1以上の任意のOK値を一つ選び、計数器1
の各JKフリップフロップをセットまたはリセットして
計数器1の初期値を上記の選択したOK値にセットす
る。また計数器1のDフリップフロップは全てリセット
する。 (2)最初のデータD0を計数器1の値、すなわち上記
の初期値で示される番地に書き込む。 (3)計数器1が入力パルス信号を計数して現在の状態
から次の状態へ遷移すると、次のデータを計数器1の計
数値で示される番地へ書き込む。 (4)全てのデータ、すなわち最大でDXまでの書き込
みが終わるまで、上記(3)を繰り返す。 (5)データ読み出しの場合も上記と同様の手順でメモ
リの番地を指定し、当該番地のデータを読み出す。
The operation will be described below. In order to specify the address of the memory 2 by the m × n bit counter 1, the memory numbered from 0 to 2 ↑ (m + n) −1 is used as the memory 2. If the series of data stored in this memory is D 0 , D 1 , D 2 , ..., D i , ..., D X , writing of these data to the memory is performed by the following procedure. (1) Select an arbitrary OK value of n-1 or more, and use the counter 1
Each JK flip-flop is set or reset to set the initial value of the counter 1 to the selected OK value. Further, all the D flip-flops of the counter 1 are reset. (2) The first data D 0 is written in the value of the counter 1, that is, the address indicated by the above initial value. (3) When the counter 1 counts the input pulse signal and transitions from the current state to the next state, the next data is written in the address indicated by the count value of the counter 1. (4) The above (3) is repeated until writing of all data, that is, up to D X is completed. (5) In the case of data reading, the address of the memory is specified and the data of the address is read by the same procedure as above.

【0028】次に、実例として、図2に示すごときm=
2、n=3の計数器によって5ビット、すなわちD0
1、…、D31までの32個のデータをメモリ2に書き
込む場合について説明する。なお、この例においては5
ビットとして用いるため、図2においては、第3段目は
JKフリップフロップがFF4の1個だけ接続されてい
るが、第3段目もJKフリップフロップを2個接続すれ
ば、m×n=2×3=6ビットで、最大64個までのデ
ータに用いることが出来る。 (1)n=3、n−1=2であり、2はOK値であるの
で、この値を初期値とする。この初期値を設定するため
に、図4の信号波形におけるS1、R1、S2、R2に示す
ごときセット信号とリセット信号を与える。すなわち、
JKフリップフロップFF0、FF2、FF3、FF4のセ
ット端子には“0”(S1)、JKフリップフロップF
0、FF2、FF3、FF4のリセット端子およびDフリ
ップフロップDF0、DF1のリセット端子には“1”
(R1)、JKフリップフロップFF1のセット端子には
“1”(S2)、JKフリップフロップFF1のリセット
端子には“0”(R2)を与える。これにより、計数器
1の初期値は“00010”(=2)となる。 (2)計数器1の計数値で示される番地、すなわち2番
地へ最初のデータD0を書き込む。 (3)計数器1がクロック信号CLKを計数して現在の
状態から次の状態へ遷移すると、次のデータを計数器1
の値で示される番地に書き込む。 (4)データが尽きるまで、すなわち32番目のデータ
31を書き込み終わるまで上記(3)を繰り返す。 初期値を2に設定して計数すると、図2の計数器におけ
るJKフリップフロップの計数値の系列は、2、3、
0、5、6、7、4、9、10、11、8、13、1
4、15、12、1、18、19、16、21、22、
23、20、25、26、27、24、29、30、3
1、28、17となる。したがって、この系列で示され
る番地にD0、D1、D2、…、D31の順でデータが格納
されることになる。図3は、上記の指定番地と入力され
るデータ番号との対応を示す図である。以下、上記のよ
うに初期値を設定することによって5ビット32個の番
地を全て指定することが出来る理由について説明する。
図2の計数器においては、OK集合に属する数は、0、
1、2、3、5、6、7、9、10、11、13、1
4、15、18、19、21、22、23、25、2
6、27、29、30、31の24個であり、OK集合
に属さない数は、4、8、12、16、17、20、2
4、28の8個である。上記のOK集合の24個のう
ち、0と1とを除いた残りの22個は値が一意に決定さ
れるため、それらの値をそのまま番地として用いて支障
を来さない。また、OK集合に属さない8個のうち、
8、12、16、20、24、28の6個に関しては、
その計数値が8は4に相当(すなわち、図2の計数器で
は8のときに4の計数値“00100”となる)し、1
2は8に、16は12に、20は16に、24は20
に、28は24に、それぞれ相当することになり、真の
値とはずれているがそれぞれ一意に決定されるので、番
地の内容を計数値に合わせて変更しておくことによって
支障なく使用することが出来る。例えば、値8は計数値
が4となるため、番地の系列としては3番地の次に8番
地が続き、その後は9、10、11番地となって次に8
番地が来るように内容を入れ換えておけばよい。しか
し、OK集合の0と1およびOK集合に属さない4と1
7に関しては、0と4が同じ計数値0(“0000
0”)となり、1と17が同じ計数値1(“0000
1”)となるので、特別な処置が必要となる。そのた
め、本実施例においては、計数器の初期値を0とせずに
2と設定し、4を0番地、17を1番地に対応させたも
のである。このようにすることにより、図2の計数器に
おけるJKフリップフロップの計数値の系列は、2、
3、0、5、6、7、4、9、10、11、8、13、
14、15、12、1、18、19、16、21、2
2、23、20、25、26、27、24、29、3
0、31、28、17の順序で周回することになる。し
たがって上記の順序で番地を指定すれば、図2のごとき
特殊な高速計数器を用いて、メモリの全ての番地を一意
に指定することが可能となる。上記のように、本実施例
においては、2番地に1番目のデータD0が、3番地に
2番目のデータD1が、0番地に3番目のデータD2が書
き込まれるというように、番地の順序とそこに書き込ま
れるデータ番号とは順序が異なっているが、書き込みと
読み出しの際に同じ番地を指定すれば、何ら問題を生じ
ることがない。なお、前記(1)〜(4)の手順を用い
ることにより、図2の計数器に限らず他のmやnの値お
よび他のビット数の計数器においても、上記と同様に、
メモリの全ての番地を一意に指定することが可能とな
る。
Next, as an example, as shown in FIG. 2, m =
2, with a counter of n = 3, 5 bits, ie D 0 ,
A case where 32 pieces of data up to D 1 , ..., D 31 are written in the memory 2 will be described. In this example, 5
Since it is used as a bit, only one JK flip-flop is connected to FF 4 in the third stage in FIG. 2, but if two JK flip-flops are connected in the third stage, m × n = 2 × 3 = 6 bits, which can be used for up to 64 data. (1) Since n = 3 and n-1 = 2 and 2 is an OK value, this value is used as an initial value. In order to set this initial value, set signals and reset signals such as S 1 , R 1 , S 2 , and R 2 in the signal waveform of FIG. 4 are given. That is,
The set terminals of the JK flip-flops FF 0 , FF 2 , FF 3 and FF 4 are “0” (S 1 ), the JK flip-flop F
The reset terminals of F 0 , FF 2 , FF 3 , and FF 4 and the reset terminals of the D flip-flops DF 0 and DF 1 are “1”.
(R 1), JK to the set terminal of the flip-flop FF 1 "1" (S 2 ), the reset terminal JK flip-flop FF 1 gives a "0" (R 2). As a result, the initial value of the counter 1 becomes "00010" (= 2). (2) The first data D 0 is written to the address indicated by the count value of the counter 1, that is, the address 2. (3) When the counter 1 counts the clock signal CLK and transitions from the current state to the next state, the next data is counted by the counter 1
Write to the address indicated by the value of. (4) The above (3) is repeated until the data is exhausted, that is, until the 32nd data D 31 is written. When the initial value is set to 2 and counting is performed, the series of count values of the JK flip-flop in the counter of FIG.
0, 5, 6, 7, 4, 9, 10, 11, 8, 13, 1
4, 15, 12, 1, 18, 19, 16, 21, 22,
23, 20, 25, 26, 27, 24, 29, 30, 3
It becomes 1, 28 and 17. Therefore, data is stored in the order of D 0 , D 1 , D 2 , ..., D 31 at the addresses shown in this sequence. FIG. 3 is a diagram showing the correspondence between the specified address and the data number to be input. Hereinafter, the reason why all the addresses of 5 bits and 32 bits can be specified by setting the initial value as described above will be described.
In the counter of FIG. 2, the number belonging to the OK set is 0,
1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 1
4, 15, 18, 19, 21, 22, 23, 25, 2
There are 24 of 6, 27, 29, 30, 31 and the numbers that do not belong to the OK set are 4, 8, 12, 16, 17, 20, 2.
There are 8 of 4, 28. Of the 24 pieces of the above-mentioned OK set, the values of the remaining 22 pieces except 0 and 1 are uniquely determined, so that these values are used as the addresses as they are without causing any trouble. Also, of the eight that do not belong to the OK set,
For six of 8, 12, 16, 20, 24, 28,
The count value of 8 corresponds to 4 (that is, when the counter of FIG. 2 is 8, the count value of 4 becomes “00100”), and 1
2 to 8; 16 to 12; 20 to 16; 24 to 20
Therefore, 28 corresponds to 24, which is different from the true value, but is uniquely determined. Therefore, by changing the contents of the address according to the count value, it can be used without trouble. Can be done. For example, the value 8 has a count value of 4, so that the series of addresses is the third address, followed by the eighth address, and then the ninth, tenth, and eleventh addresses.
Just change the contents so that the address will come. However, 0 and 1 of the OK set and 4 and 1 that do not belong to the OK set
For 7, 0 and 4 are the same count value 0 (“0000
0 ") and 1 and 17 are the same count value 1 (" 0000
Therefore, in this embodiment, the initial value of the counter is set to 2 instead of 0, 4 corresponds to 0 address, and 17 corresponds to 1 address. By doing so, the sequence of count values of the JK flip-flop in the counter of FIG.
3, 0, 5, 6, 7, 4, 9, 10, 11, 8, 13,
14, 15, 12, 1, 18, 19, 16, 21, 2
2, 23, 20, 25, 26, 27, 24, 29, 3
It will orbit in the order of 0, 31, 28, 17. Therefore, if the addresses are specified in the above order, it becomes possible to uniquely specify all the addresses of the memory by using the special high-speed counter as shown in FIG. As described above, in the present embodiment, the first data D 0 to address 2, so that the second data D 1 to address 3, the third data D 2 are written into address 0, address Although the order of is different from the order of the data number written therein, if the same address is designated at the time of writing and reading, no problem will occur. By using the procedures of (1) to (4), not only the counter of FIG. 2 but also other values of m and n and counters of other bit numbers, similar to the above,
It becomes possible to uniquely specify all addresses in the memory.

【0029】[0029]

【発明の効果】以上説明したように、この発明によれ
ば、ANDゲートの直列キャリーラインに、mビット毎
にDフリップフロップを挿入した特殊な計数器を用い、
かつ前記(1)〜(4)のごとき手順を用いることによ
り、データ入出力装置の読み出し書き込み速度を大幅に
向上させることが出来る、という優れた効果が得られ
る。
As described above, according to the present invention, a special counter in which a D flip-flop is inserted every m bits is used in the serial carry line of the AND gate,
Further, by using the procedures such as the above (1) to (4), the excellent effect that the read / write speed of the data input / output device can be greatly improved can be obtained.

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

【図1】本発明のデータ入出力装置の一実施例のブロッ
ク図。
FIG. 1 is a block diagram of an embodiment of a data input / output device of the present invention.

【図2】図1の装置に用いる同期型計数器の一例のブロ
ック図。
2 is a block diagram of an example of a synchronous counter used in the apparatus of FIG.

【図3】図1に装置における指定番地とデータ番号との
対照を示す図表。
FIG. 3 is a chart showing a comparison between designated addresses and data numbers in the apparatus.

【図4】図1の回路における動作波形を示すタイミング
チャート。
FIG. 4 is a timing chart showing operation waveforms in the circuit of FIG.

【図5】同期型計数器の一例のブロック図。FIG. 5 is a block diagram of an example of a synchronous counter.

【図6】図5の回路における動作波形を示すタイミング
チャート。
6 is a timing chart showing operation waveforms in the circuit of FIG.

【図7】図5の回路における計数値を示す図表。FIG. 7 is a chart showing count values in the circuit of FIG.

【図8】従来の非同期型計数器の一例のブロック図。FIG. 8 is a block diagram of an example of a conventional asynchronous counter.

【図9】図8の回路における信号波形を示すタイミング
チャート。
9 is a timing chart showing signal waveforms in the circuit of FIG.

【10】従来の同期型計数器の一例のブロック図。FIG. 10 is a block diagram of an example of a conventional synchronous counter.

【図11】図10の回路における信号波形を示すタイミ
ングチャート。
11 is a timing chart showing signal waveforms in the circuit of FIG.

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

1…同期型計数器 2…メモリ 3…中央処理装置 4…アドレスバス 5…データバス FF0〜FF4…JKフリップフロップ A0〜A3…ANDゲート DF0、DF1…Dフリップフロップ CLK…計数すべき入力パルス信号(クロックパルス) b0〜b4…各ビットの出力 WR…書き込み信号 S1…FF0、FF2、FF3、FF4、DF0およびDF1
のセット信号 S2…FF1のセット信号 R1…FF0、FF2、FF3、FF4、DF0およびDF1
のリセット信号 R2…FF1のリセット信号
1 ... synchronous counter 2 ... memory 3 ... central processing unit 4 ... address bus 5 ... data bus FF 0 to ff 4 ... JK flip-flop A 0 to A 3 ... the AND gate DF 0, DF 1 ... D flip-flop CLK ... Input pulse signal (clock pulse) to be counted b 0 to b 4 ... Output of each bit WR ... Write signal S 1 ... FF 0 , FF 2 , FF 3 , FF 4 , DF 0 and DF 1
Set signal S 2 ... FF 1 set signal R 1 ... FF 0 , FF 2 , FF 3 , FF 4 , DF 0 and DF 1
Reset signal R 2 ... FF 1 reset signal

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】入力パルス信号を計数器で計数し、メモリ
内の上記計数値に対応した番地を指定してデータの入出
力を行なうデータ入出力方法において、 上記計数器として、ビット数に対応した数のフリップフ
ロップと、それと同数のアンドゲートとを有し、各フリ
ップフロップの出力がそれぞれ一つのアンドゲートを介
して次ビットのフリップフロップの入力に接続され、か
つ各アンドゲートの出力が次ビットのアンドゲートの一
方の入力に接続されてアンドゲートの直列キャリーライ
ンを形成している同期型計数器における上記アンドゲー
トの直列キャリーラインに、m(mは正の整数)ビット
毎にDフリップフロップを直列に挿入した構成を有し、
予め定まった複数の所定の値において正常な計数値を出
力する同期型計数器を用い、 上記正常な計数値となる所定の値をOK値とし、上記D
フリップフロップによって区分けられた段数をnとした
場合に、0から最大2↑(m+n)−1(以下この値をX
と表示)まで番地付けられたメモリを使用し、該メモリ
に書き込みまたは読み出されるデータの系列をD0
1、D2、…、Di、…、DXとし、これらのデータのメ
モリへの書き込みまたは読み出しを下記の順序で行なう
ことを特徴とするデータ入出力方法。 (1)n−1以上の任意のOK値を一つ選び、上記同期
型計数器の各フリップフロップをセットまたはリセット
して上記同期型計数器の初期値を上記の選択したOK値
にセットし、かつ上記同期型計数器のDフリップフロッ
プは全てリセットする。 (2)最初のデータD0を上記同期型計数器の値、すな
わち上記の初期値で示される番地に書き込む。 (3)上記同期型計数器が入力パルス信号を計数して現
在の状態から次の状態へ遷移すると、次のデータを上記
同期型計数器の計数値で示される番地へ書き込む。 (4)全てのデータ、すなわち最大でDXまでの書き込
みが終わるまで、上記(3)を繰り返す。 (5)データ読み出しの場合も上記と同様の手順でメモ
リの番地を指定し、当該番地のデータを読み出す。
1. A data input / output method in which an input pulse signal is counted by a counter and data is input / output by designating an address corresponding to the counted value in a memory, wherein the counter corresponds to the number of bits. The number of flip-flops and the same number of AND gates, the output of each flip-flop is connected to the input of the flip-flop of the next bit via one AND gate, and the output of each AND gate is The serial carry line of the AND gate in the synchronous counter, which is connected to one input of the AND gate of the bit to form the serial carry line of the AND gate, has a D flip-flop every m (m is a positive integer) bits. Have a configuration in which
A synchronous counter that outputs a normal count value at a plurality of predetermined values determined in advance is used, and the predetermined value which becomes the normal count value is set as an OK value, and the D
When n is the number of stages divided by flip-flops, 0 to a maximum of 2 ↑ (m + n) -1 (hereinafter, this value is X
Is displayed), and a series of data written to or read from the memory is D 0 ,
D 1, D 2, ..., D i, ..., and D X, the data output wherein the writing or reading of the memory of these data in the following order. (1) Select an arbitrary OK value of n-1 or more, set or reset each flip-flop of the synchronous counter, and set the initial value of the synchronous counter to the selected OK value. , And all the D flip-flops of the synchronous counter are reset. (2) The first data D 0 is written in the value of the synchronous counter, that is, the address indicated by the initial value. (3) When the synchronous counter counts the input pulse signal and transitions from the current state to the next state, the next data is written in the address indicated by the count value of the synchronous counter. (4) The above (3) is repeated until writing of all data, that is, up to D X is completed. (5) In the case of data reading, the address of the memory is specified and the data of the address is read by the same procedure as above.
【請求項2】データを記憶するメモリと、 ビット数に対応した数のフリップフロップと、それと同
数のアンドゲートとを有し、各フリップフロップの出力
がそれぞれ一つのアンドゲートを介して次ビットのフリ
ップフロップの入力に接続され、かつ各アンドゲートの
出力が次ビットのアンドゲートの一方の入力に接続され
てアンドゲートの直列キャリーラインを形成している同
期型計数器における上記アンドゲートの直列キャリーラ
インに、m(mは正の整数)ビット毎にDフリップフロ
ップを直列に挿入した構成を有し、予め定まった複数の
所定の値において正常な計数値を出力する同期型計数器
と、 上記正常な計数値となる所定の値をOK値とし、上記D
フリップフロップによって区分けられた段数をnとした
場合に、上記同期型計数器の各フリップフロップをセッ
トまたはリセットすることにより、上記同期型計数器の
初期値をn−1以上の予め選択された一つのOK値にセ
ットし、かつ上記同期型計数器のDフリップフロップは
全てリセットする初期値設定手段と、 最初のデータD0を上記同期型計数器の値、すなわち上
記の初期値で示される番地に書き込み、上記同期型計数
器が入力パルス信号を計数して現在の状態から次の状態
へ遷移すると、次のデータを上記同期型計数器の計数値
で示される番地へ書き込み、上記の操作をデータが尽き
るまで繰り返し、またデータ読み出しの場合も上記と同
様の手順でメモリの番地を指定して当該番地のデータを
読み出す制御手段と、 を備えたことを特徴とするデータ入出力装置。
2. A memory for storing data, a number of flip-flops corresponding to the number of bits, and the same number of AND gates, and the output of each flip-flop outputs the next bit through one AND gate. A serial carry of the AND gate in a synchronous counter which is connected to the input of a flip-flop and the output of each AND gate is connected to one input of the AND gate of the next bit to form a serial carry line of the AND gate. A synchronous counter having a configuration in which a D flip-flop is inserted in series for each m (m is a positive integer) bit, and which outputs a normal count value at a plurality of predetermined values; A predetermined value that is a normal count value is an OK value, and the above D
When the number of stages divided by the flip-flops is n, each flip-flop of the synchronous counter is set or reset so that the initial value of the synchronous counter is n-1 or more, which is a preselected one. Initial value setting means for setting one OK value and resetting all the D flip-flops of the synchronous counter, and the first data D 0 is the value of the synchronous counter, that is, the address indicated by the initial value. When the synchronous counter counts the input pulse signal and transitions from the current state to the next state, the next data is written to the address indicated by the count value of the synchronous counter, and the above operation is performed. Repeated until the data is exhausted, and also in the case of data reading, the control means for specifying the memory address and reading the data at the address is provided. A data input / output device characterized by.
JP33897591A 1991-12-20 1991-12-20 Method and device for data input/output Pending JPH05175829A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP33897591A JPH05175829A (en) 1991-12-20 1991-12-20 Method and device for data input/output

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP33897591A JPH05175829A (en) 1991-12-20 1991-12-20 Method and device for data input/output

Publications (1)

Publication Number Publication Date
JPH05175829A true JPH05175829A (en) 1993-07-13

Family

ID=18323095

Family Applications (1)

Application Number Title Priority Date Filing Date
JP33897591A Pending JPH05175829A (en) 1991-12-20 1991-12-20 Method and device for data input/output

Country Status (1)

Country Link
JP (1) JPH05175829A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006191530A (en) * 2004-12-30 2006-07-20 Hynix Semiconductor Inc Counter circuit for controlling off-chip driver, and output current value changing method for the off-chip driver using the same

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006191530A (en) * 2004-12-30 2006-07-20 Hynix Semiconductor Inc Counter circuit for controlling off-chip driver, and output current value changing method for the off-chip driver using the same
JP4632920B2 (en) * 2004-12-30 2011-02-16 株式会社ハイニックスセミコンダクター Off-chip driver control counter circuit and off-chip driver output current value changing method using the same

Similar Documents

Publication Publication Date Title
US5459855A (en) Frequency ratio detector for determining fixed frequency ratios in a computer system
US3893033A (en) Apparatus for producing timing signals that are synchronized with asynchronous data signals
US4160154A (en) High speed multiple event timer
EP0416513A2 (en) Fifo memory device
US3308434A (en) Synchronization circuit for signal generators using comparison of a specific data message
JP2641276B2 (en) Two-stage synchronizer
JPH02301269A (en) Key signal delay equipment
US5142651A (en) Uninterrupted, enhanced-rate, event-time recorder with mixed-speed counter modules
JPH05175829A (en) Method and device for data input/output
KR200155054Y1 (en) Counter circuit
US6633966B1 (en) FIFO memory having reduced scale
JP4189729B2 (en) Asynchronous readout method of timer count value and timer
JPH0683066B2 (en) Counter circuit
JP3513399B2 (en) Variable timing device using serial data
JP2783495B2 (en) Clock transfer circuit
JPH08102658A (en) Counter circuit with loading function
JPH05175831A (en) Synchronous counter and its method of use
JP2984429B2 (en) Semiconductor integrated circuit
JP2973613B2 (en) Programmable counter
JP3471275B2 (en) Synchronization circuit
JP3115756B2 (en) Demultiplexer circuit
JP2757714B2 (en) Frame pulse generation circuit
JPH0316054B2 (en)
JPS6111803Y2 (en)
JPH118549A (en) Counter circuit