JPH03273592A - Cache memory device - Google Patents

Cache memory device

Info

Publication number
JPH03273592A
JPH03273592A JP2075036A JP7503690A JPH03273592A JP H03273592 A JPH03273592 A JP H03273592A JP 2075036 A JP2075036 A JP 2075036A JP 7503690 A JP7503690 A JP 7503690A JP H03273592 A JPH03273592 A JP H03273592A
Authority
JP
Japan
Prior art keywords
data
memory
address
words
value
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
JP2075036A
Other languages
Japanese (ja)
Inventor
Tsutomu Maruyama
勉 丸山
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 JP2075036A priority Critical patent/JPH03273592A/en
Publication of JPH03273592A publication Critical patent/JPH03273592A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To accelerate the operations of saving/restoring a register to continuous areas or updating a cache by providing a data memory which can simultaneously read and write N-words of data, tag memory, comparator, address decoder, data exchange and controller. CONSTITUTION:An address register 10 is provided and a data memory 50 is provided to simultaneously read and write the N words of data which positions of addresses and columns are mutually different at all. Then, a tag memory 40 is provided to simultaneously read the N words at the same address, and comparators 61-64 are provided to compare the value read out from the tag memory 40 with one part of the value of the address register 10, and an address decoder 30 is provided. Further, a data exchange 80 is provided to exchange orders for the N words of data, and a controller 90 is execute entire control. Thus, the plural words can be simultaneously read and written and the operations can be accelerated for saving/restoring the register to the continuous areas and updating the cache or the like.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はキャッシュメモリ装置において、連続したアド
レスを持つ複数語の同時読み出しおよび同時書き込みを
行なうキャッシュメモリ装置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a cache memory device that performs simultaneous reading and simultaneous writing of a plurality of words having consecutive addresses.

〔従来の技術〕[Conventional technology]

従来のこの種のキャッシュメモリ装置は、プログラム実
行中の連続した複数語の読み出しと書き込み、およびキ
ャッシュ更新時の複数語の読み出しと書き込みにおいて
、多くの場合、キャッシュメモリに対して、−語ずつ読
み出しまたは書き込みが行なわれてきた。また、同時に
読み出しまたは書き込みが可能な場合でも、同時にアク
セスできるアドレスの組み合わせ、語数等が制限されて
いた。
In conventional cache memory devices of this type, when reading and writing multiple words consecutively during program execution and reading and writing multiple words when updating the cache, in many cases the cache memory is read -word by word. Or writing has been done. Furthermore, even if simultaneous reading or writing is possible, there are restrictions on the combination of addresses, number of words, etc. that can be accessed simultaneously.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上述したように従来のキャッシュメモリ装置では、−語
ずつ読み出しまたは書き込みが行なわれてきたため、連
続したアドレスを持つ複数語の読み出しまたは書き込み
において、読み・出しまたは書き込みを行なう語数用の
処理時間が必要であった。キャッシュの更新においても
一部ずつ読み出しおよび書き込みが行なわれてきた。ま
た、同時読み出し、書き込みが可能な場合でも、同時に
アクセスできるアドレスの値、語数等が°特定されてい
たため、自由なアクセスができなかった。
As mentioned above, in conventional cache memory devices, reading or writing has been performed word by word, so when reading or writing multiple words with consecutive addresses, processing time is required for the number of words to be read, read or written. Met. Even when updating the cache, reading and writing have been performed one by one. Furthermore, even if simultaneous reading and writing were possible, the address values, number of words, etc. that could be accessed simultaneously were specified, making it impossible to access freely.

〔課題を解決するための手段〕[Means to solve the problem]

本発明のキャッシュメモリ装置は、データの読み出しま
たは書き込みを行なうアドレスを保持するアドレスレジ
スタと、N列のメモリより構成され、各列の同一番地の
N語のデータおよび連続したN個の番地内において、番
地および列の位置が互いに全て異なるN語のデータの同
時読み出しおよび同時書き込みが可能なデータメモリと
、N列のメモリにより構成され同一番地のN語の同時読
み出しが可能であり、前記データメモリに格納されてい
るデータのアドレスの一部を保持するタグメモリと、前
記タグメモリより読み出された値と前記アドレスレジス
タの値の一部の比較を行なう比較器と、前記データメモ
リと前記タグメモリに対して前記アドレスレジスタの値
のデコードを行なうアドレスデコーダと、前記データメ
モリより同時に読み出されたN語のデータの順番の入れ
換ぇを行なうデータ交換器と、全体の制御を行なう制御
装置とを有している。
The cache memory device of the present invention is composed of an address register that holds an address for reading or writing data, and N columns of memory, and N words of data at the same address in each column and N words of data at the same address in each column. , a data memory that can simultaneously read and write N words of data whose addresses and column positions are all different from each other, and a memory of N columns that allows simultaneous reading of N words at the same address, the data memory a tag memory that holds a part of the address of data stored in the tag; a comparator that compares a value read from the tag memory with a part of the value of the address register; an address decoder that decodes the value of the address register with respect to the memory; a data exchanger that changes the order of N words of data read simultaneously from the data memory; and a control device that performs overall control. It has

本発明の他のキャッシュメモリ装置は、データの読み出
しまたは書き込みを行なうアドレスを保持するアドレス
レジスタと、N列のメモリより構成され、各列の同一番
地のN語のデータおよび連続したN個の番地内において
、番地および列の位置が互いに全て異なるN語のデータ
の同時読み出しおよび同時書き込みが可能なデータ、メ
モリと、N列のメモリにより構成され同一番地のN語の
同時読み出しが可能であり、前記データメモリに格納さ
れているデータのアドレスの一部を保持スるタグメモリ
と、前記アドレスレジスタに格納されている値の加算を
行なう加算器と、前記タグメモリより読み出された値と
前記アドレスレジスタの値の一部の比較を行なう比較器
と、前記データメモリと前記タグメモリに対して前記ア
ドレスレジスタおよび前記加算器の値のデコードを行な
うアドレスデコーダと、前記データメモリより同時に読
み出されたN語のデータの順番の入れ換えを行なうデー
タ交換器と、全体の制御を行なう制御装置とを有してい
る。
Another cache memory device of the present invention is composed of an address register that holds an address for reading or writing data, and N columns of memory, and includes N words of data at the same address in each column and N consecutive addresses. a data memory in which N words of data whose addresses and column positions are all different from each other can be simultaneously read and written; a tag memory that holds part of the address of the data stored in the data memory; an adder that adds the values stored in the address register; a comparator that compares part of the values of the address register; an address decoder that decodes the values of the address register and the adder with respect to the data memory and the tag memory; It has a data exchanger that changes the order of N words of data, and a control device that performs overall control.

更に本発明の他のキャッシュメモリ11m1tは、デー
タの読み出しまたは書き込みを行なうアドレスを保持す
るアドレスレジスタと、N列のメモリより構成され、各
列の同一番地のN語のデータおよび連続したN個の番地
内において、番地および列の位置が互いに全て異なるN
語のデータの同時読み出しおよび同時書き込みが可能な
データメモリと、N列のM語同時読み出し可能なメモリ
により構成され、M種番地に格納されているM*N語の
データの同時読み出しが可能であり、前記データメモリ
に格納されているデータのアドレスの一部を保持するタ
グメモリと、前記アドレスレジスタに格納されている値
の加算を行なう加算器と、前記タグメモリより読み出さ
れた値と前記アドレスレジスタの値の一部の比較を行な
う比較器と、前記タグメモリより読み出された値と前記
加算器の値の比較を行なう比較器と、前記データメモリ
と前記タグメモリに対して前記アドレスレジスタおよび
前記加算器の値のデコードを行なうアドレスデコーダと
、前記データメモリより同時に読み出されたN語のデー
タの順番の入れ換えを行なうデータ交換器と、全体の制
御を行なう制御装置とを有している。
Furthermore, another cache memory 11m1t of the present invention is composed of an address register that holds addresses for reading or writing data, and N columns of memories, and N words of data at the same location in each column and N consecutive Within an address, the addresses and column positions are all different from each other.
It consists of a data memory that can read and write word data simultaneously, and a memory that can read M words in N columns simultaneously, and it is possible to read M*N words of data stored at M addresses simultaneously. A tag memory that holds part of the address of the data stored in the data memory, an adder that adds the value stored in the address register, and a value read from the tag memory. a comparator that compares a part of the value of the address register; a comparator that compares a value read from the tag memory with a value of the adder; It has an address decoder that decodes the values of the address register and the adder, a data exchanger that changes the order of N words of data read simultaneously from the data memory, and a control device that performs overall control. are doing.

更に又、本発明の他のキャッシュメモリ装置は、特許請
求範囲3項のキャッシュ装置において、データの更新を
行なう際に、新たに格納しようとする値と連続するアド
レスの値が既に格納されていた場合には、それらのアド
レスをタグメモリ中の同一の列に格納し、その列の位置
に応じてデータをデータメモリ中に格納することを優先
するキャッシュメモリ更新方式を有している。
Furthermore, in another cache memory device of the present invention, in the cache device according to claim 3, when updating data, a value at an address consecutive to a value to be newly stored has already been stored. In some cases, these addresses are stored in the same column in the tag memory, and the cache memory update method prioritizes storing data in the data memory according to the position of that column.

〔作用〕[Effect]

キャッシュメモリ装置においては、データはデータメモ
リに格納され、それに対応するアドレスはタグメモリに
格納される。この様子を第4図に示す。第4図において
、データメモリおよびタグメモリはそれぞれ4列のメモ
リより構成されており、4語の同時読み出しおよび同時
書き込みが可能であるとする。データメモリは各ブロッ
クに4語のデータを保持するものとする。タグメモリに
は同一ブロックに格納された4語に共通なアドレスの部
分が格納されている。
In a cache memory device, data is stored in a data memory and its corresponding address is stored in a tag memory. This situation is shown in FIG. In FIG. 4, it is assumed that the data memory and the tag memory each consist of four columns of memories, and four words can be read and written simultaneously. It is assumed that the data memory holds four words of data in each block. The tag memory stores an address portion common to four words stored in the same block.

第4図において、アドレスA−A+3までのデータがデ
ータメモリの第1ブロツクの各列に一部ずつ格納されて
いる。一般のキャッシュメモリ装置では、A−A+3の
4語は同一の列に格納されるが、本方式では、これらの
4語を第4図に示すように異なる列に置くことによって
、これら4語の同時読み出しおよび同時書き込みを可能
としている。このデータメモリは同一行の4つの1(例
えば第4図におけるA、B、C,D) 、および連続し
た4つの行の各列に1語ずつ格納されている4つの値(
例えば第4図におけるA、A+1.A+2.A+3の4
語、A+2.A+3.A+4゜A+5の4語、B、B+
1.B+2.B+3の4語等)の同時読み出しおよび書
き込みが可能である。
In FIG. 4, a portion of data up to address A-A+3 is stored in each column of the first block of the data memory. In a general cache memory device, the four words A-A+3 are stored in the same column, but in this method, these four words are stored in different columns as shown in Figure 4. Simultaneous reading and writing are possible. This data memory stores four 1's in the same row (for example, A, B, C, D in Figure 4), and four values (one word in each column of four consecutive rows) (
For example, A, A+1. A+2. A+3 of 4
word, A+2. A+3. A+4゜A+5 4 words, B, B+
1. B+2. B+3 (4 words, etc.) can be read and written simultaneously.

第4図においてB+1番地のI語の読み出しは以下のよ
うに行なわれる。まず、B+1番地に対応するタグメモ
リの行(第1ブロツク)が読み出され、B+1と比較さ
れる。その結果、第1列の値がB+1に対応しているこ
とがわかる。これと同時にB+1番地に対応するデータ
メモリ中の各列の値(第4図においてデータメモリ中の
A+1゜B+1.C+1.B+1)が読み出される。そ
れらの値の内から上記の比較結果およびアドレスの下位
の値により、第2列の値(B+1)が選択される。
In FIG. 4, the I word at address B+1 is read out as follows. First, the row (first block) of the tag memory corresponding to address B+1 is read out and compared with B+1. As a result, it can be seen that the value in the first column corresponds to B+1. At the same time, the values of each column in the data memory corresponding to address B+1 (A+1°B+1.C+1.B+1 in the data memory in FIG. 4) are read out. Among these values, the value (B+1) in the second column is selected based on the above comparison result and the lower value of the address.

1語の書き込みを行なう場合には、基本的には1語の読
み出しと同様にして行なわれるが、まず、タグメモリの
値が読み出され、次いでその比較結果と書き込みを行な
うデータのアドレスの下位の値によってデータメモリ中
の特定の位置が選択されデータの書き込みが行なわれる
・。・連続したアドレスを持つ複数語の読み出しにおい
ては、まず、タグメモリの値が比較され、その比較結果
によって、データメモリが読み出される。例えばアドレ
スCから4語のデータの読み出しを行なう場合には、ま
ず、タグメモリ上第1行の値が読み出されアドレスとの
比較が行なわれる。その結果、第2列にアドレスCに対
応するデータが格納されていることがわかる。ついで、
複数語のデータの読み出しの場合には、同一行の4語の
データではなく、連続した行の異なる列に置かれたC、
C+1.C+2.C+3の4語が読み出される。ブロッ
ク間にまたがる読み出しおよび書き込みは、上記の操作
を2回に分けて行なうことにより実現できる。
When writing one word, it is basically done in the same way as reading one word, but first the value of the tag memory is read, and then the comparison result and the lower address of the data to be written are read. A specific location in the data memory is selected depending on the value of and data is written. - When reading multiple words with consecutive addresses, first, the values in the tag memory are compared, and the data memory is read based on the comparison result. For example, when reading four words of data from address C, first, the value in the first row of the tag memory is read and compared with the address. As a result, it can be seen that data corresponding to address C is stored in the second column. Then,
In the case of reading data of multiple words, instead of reading data of four words in the same row, C, placed in different columns of consecutive rows,
C+1. C+2. Four words of C+3 are read out. Reading and writing across blocks can be achieved by performing the above operation twice.

連続したアドレスを持つ複数語の書き込みも読み出しと
同様にして行なわれる。
Writing of multiple words with consecutive addresses is performed in the same way as reading.

さらに、ブロック間にまたがる複数語の読み出しは、タ
グメモリの読み出しを多重化することによって、実現す
ることができる。例えば、アドレスA+2からの4語の
読み出しを行なう場合には、アドレスA+2に対応する
タグメモリ中のブロック1とその次のブロック2の値を
同時に読み出し、アドレスA+2とその次のブロックに
対応するアドレスA+E3 (A+2+4 (列の数)
)と比較することにより、データメモリ中、のブロック
1と2が読み出したい値を持つブロックであることが確
認できる。この場合には、それらの比較結果およびアド
レスの下位ビットの値によって、6行2列、7行3列、
8行0列、9行1列の4つのデータを同時に読み出すこ
とによってA+2からの4語のデータを同時に読み出す
ことができる。
Furthermore, reading multiple words across blocks can be achieved by multiplexing tag memory reading. For example, when reading four words from address A+2, the values of block 1 and the next block 2 in the tag memory corresponding to address A+2 are read simultaneously, and the values of block 1 and the next block 2 in the tag memory corresponding to address A+2 are read, and the values of block 1 and block 2 corresponding to address A+2 and the next block are read simultaneously. A+E3 (A+2+4 (number of columns)
), it can be confirmed that blocks 1 and 2 in the data memory are the blocks having the values to be read. In this case, depending on the comparison results and the value of the lower bit of the address, the 6th row and 2nd column, the 7th row and 3rd column,
By simultaneously reading four pieces of data in the 8th row, 0th column and 9th row, 1st column, it is possible to read out 4 words of data from A+2 at the same time.

連続したアドレスを持ちブロック間にまたがる複数語の
書き込みも同様にして行なわれる。
Writing of multiple words having consecutive addresses and extending between blocks is performed in the same manner.

第4図において、例えばアドレスB+2から4、語の読
み出しを行なう場合には、タグメモリにおいて、アドレ
スB−B+3とアドレスB+4〜B+7がタグメモリ上
で同一列に格納されていないため、データメモリ上での
データの格納位置がブロック1とブロック2で同様でな
い。このため、アドレスB+2 (5行3列)とアドレ
スB+5(8行3列)のデータがデータメモリ上の同一
列に格納されており、同時に4語を読み出すことができ
ない。このような場合には、上記の読み出しの操作を各
ブロックごとに1回ずつ計2回行なうことにより、実現
される。
In FIG. 4, for example, when reading words from address B+2 to 4, since address B-B+3 and addresses B+4 to B+7 are not stored in the same column on the tag memory, the data memory The data storage locations in block 1 and block 2 are not the same. Therefore, data at address B+2 (5th row, 3rd column) and address B+5 (8th row, 3rd column) are stored in the same column on the data memory, and four words cannot be read out at the same time. In such a case, this can be achieved by performing the above read operation twice, once for each block.

このような事態を避けるために、タグメモリおよびデー
タメモリの更新時において、タグメモリを調べ、連続す
るアドレスが既に登録されている場合には、A ””’
 A + 3とA+4〜A+7の場合のように、アドレ
スをタグメモリ上の同一の列に置き、その列に位置に応
じてデータをデータメモリ上に置くことによって、同時
読み出しおよび同時書き込みをより高い確率で実現する
ことができるようになる。
To avoid this situation, when updating the tag memory and data memory, check the tag memory, and if consecutive addresses have already been registered, A ""'
By putting the addresses in the same column on the tag memory and placing the data on the data memory according to their position in that column, as in the case of A+3 and A+4 to A+7, simultaneous reads and writes can be made higher. It can be achieved with probability.

〔実施例〕〔Example〕

以下、本発明の装置について図面を用いて詳細に説明す
る。
Hereinafter, the apparatus of the present invention will be explained in detail using the drawings.

第1図は第1の発明の一実施例を示す。第1図において
、第1の発明はアドレスレジスタ10、デコーダ20お
よび30.4列のメモリ列により構成されるタグメモリ
40.4列のメモリ列により構成されるデータメモリ6
0、比較器61〜64、ラッチ70〜73、データ交換
器801および全体の制御を行なう制御装置90を含む
FIG. 1 shows an embodiment of the first invention. In FIG. 1, the first invention includes an address register 10, a decoder 20, and a tag memory 40, which is made up of 30.4 memory columns.A data memory 6, which is made up of 40.4 memory columns.
0, comparators 61 to 64, latches 70 to 73, a data exchanger 801, and a control device 90 for overall control.

第1の発明の一実施例であるキャッシュ装置は、同一ブ
ロック内のデータに限り、複数データの同時読み出しお
よび同時書き込みを行なうことができる。
A cache device that is an embodiment of the first invention can simultaneously read and write multiple pieces of data only within the same block.

1語のデータの読み出しは次のように行なわれる。アド
レスB+1のデータの値を読み出すとすると、まずアド
レスレジスタ10の値B+1がデコーダ20に与えられ
、ブロック1の各列の内容が読み出され比較器81,6
2.63.84によりアドレスレジスタ10の値と比較
される。これと同時にアドレスレジスタlOの値がデコ
ーダ30に与えられ、ブロック1の5行の値が読み出さ
れる。比較器et、82.63,84の比較結果および
アドレスレジスタ10の値が制御装置に渡され、それに
よってデータ交換器80が制御され、データメモリ50
のB+1の値がラッチ70に、C+1の値がラッチ71
に、B+1の値がラッチ72に、A+1の値がラッチ7
3へとシフトされ格納される。そして、ラッチ70の値
が、演算装置に与えられる。
Reading of one word of data is performed as follows. When reading out the value of data at address B+1, the value B+1 of the address register 10 is first given to the decoder 20, the contents of each column of block 1 are read out, and the comparators 81, 6
It is compared with the value of address register 10 by 2.63.84. At the same time, the value of the address register IO is given to the decoder 30, and the value of the 5th row of block 1 is read out. The comparison results of the comparators et, 82, 63, 84 and the value of the address register 10 are passed to the control device, thereby controlling the data exchanger 80 and the data memory 50.
The value of B+1 is sent to latch 70, and the value of C+1 is sent to latch 71.
, the value of B+1 is sent to latch 72, and the value of A+1 is sent to latch 7.
3 and stored. The value of latch 70 is then provided to the arithmetic unit.

1語の書き込みは、演算装置より書き込むデータがラッ
チ70に、アドレスがアドレスレジスタ110に与えら
れ行なわれる。書き込みでは、まずアドレスB+1がア
ドレスレジスタ10に与えられ、タグメモリ40からア
ドレスB+1に対応するブロック1の値が読み出され、
比較器61162.83.84によってアドレスレジス
タ10の値と比較される。その比較結果とデ゛コーダ3
0によるアドレスレジスタ10のデコード結果と制御装
置90によって、ラッチ70の値がデータメモリ50の
第2列第5行に書き込まれる。
Writing of one word is performed by applying the data to be written from the arithmetic unit to the latch 70 and the address to the address register 110. In writing, address B+1 is first given to address register 10, and the value of block 1 corresponding to address B+1 is read from tag memory 40.
It is compared with the value of address register 10 by comparators 61162.83.84. The comparison result and decoder 3
The value of the latch 70 is written to the second column and fifth row of the data memory 50 by the decoding result of the address register 10 by 0 and the controller 90 .

第1図において、複数語の同時読み出しは以下のように
して行なわれる。アドレスBから4語の読み出しを行な
らものとすると、まず、アドレスレジスタ10の値Bが
、デコーダ20に与えられ、ブロック1の値が読み出さ
れ比較器61゜62、Et3.84によりアドレスレジ
スタ10の値と比較される。
In FIG. 1, simultaneous reading of multiple words is performed as follows. Assuming that four words are read from address B in a row, first, value B of address register 10 is given to decoder 20, value of block 1 is read out, and comparator 61°62, Et3. It is compared with a value of 10.

次いで、各比較器の比較結果、デコーダ3oによるアド
レスレジスタ1oのデコード結果、および制御装置90
からの制御によってデータメモリ50中のブロック1の
B、B+1.8+2.8十3の4語が読み出され、制御
装置θOの制御によりデータ交換器によりシフトされ、
Bの値がラッチ70に、B+1の値がラッチ71に、B
+2の値がラッチ72に、B+3の値がラッチ73に格
納され、演算装置またはメモリ装置に読み出される。
Next, the comparison results of each comparator, the decoding result of the address register 1o by the decoder 3o, and the control device 90
The four words B, B+1.8+2.813 of block 1 in the data memory 50 are read out under the control of the controller θO, and shifted by the data exchanger under the control of the controller θO.
The value of B is sent to latch 70, the value of B+1 is sent to latch 71, and B
The value +2 is stored in the latch 72 and the value B+3 is stored in the latch 73, and read out to the arithmetic unit or memory device.

複数語の同時書き込みも同様にしてデータメモリが選択
され、演算装置またはメモリ装置によりラッチ70,7
1.72.73に与えられたデータがデータメモリ50
に書き込まれる。
For simultaneous writing of multiple words, the data memory is selected in the same way, and the latches 70 and 7 are selected by the arithmetic unit or memory device.
1.72.73 The data given to data memory 50
will be written to.

上記のようにデータ交換器80はデータの入れ換えを行
なうものであり、クロスバスイッチ、シフタ等により実
現することができる。。
As mentioned above, the data exchanger 80 is for exchanging data, and can be realized by a crossbar switch, a shifter, or the like. .

次に第2の発明の一実施例を示す。第2図において、第
2の発明の一実施例はアドレスレジスタ10、デコーダ
20および3014列のメモリ列により構成されるタグ
メモリ4014列のメモリ列により構成されるデータメ
モリ50.比較器61〜84、ラッチ70〜73、デー
タ交換器80、全体の制御を行なう制御装置90、ラッ
チ1001加算器110およびセレクタ120である。
Next, an embodiment of the second invention will be described. In FIG. 2, an embodiment of the second invention includes an address register 10, a decoder 20, a tag memory 40 consisting of 3014 memory columns, and a data memory 50 consisting of 4014 memory columns. These are comparators 61 to 84, latches 70 to 73, data exchanger 80, control device 90 for overall control, latch 1001 adder 110, and selector 120.

1語の読み出しおよび書き込み、データメモリ50中の
同一ブロック内のデータの同時読み出しおよび同時書き
込みの処理は第1図と同様にして行なわれる。
The processing of reading and writing one word and simultaneously reading and writing data in the same block in the data memory 50 is performed in the same manner as in FIG.

データメモリ50のブロック間にまたがる複数語の同時
読み出し、同時書き込みは以下のように行なわれる。
Simultaneous reading and simultaneous writing of a plurality of words across blocks of the data memory 50 is performed as follows.

複数語の同時読み出しにおいては、アドレスA+2から
4語のデータの読み出しを行なうものとすると、まず、
演算装置よりアドレスA+2がアドレスレジスタ10に
与えられ、第1図の場合と同様にして、データメモリ5
0のブロック1のA、A+1.A+2.A+3の値が読
み出される。この時、制御装置90からの指示によりデ
ータA+2がラッチ70に、データA+3がラッチ71
に格納される。
In simultaneous reading of multiple words, assuming that four words of data are to be read from address A+2, first,
The address A+2 is given to the address register 10 from the arithmetic unit, and the data memory 5 is sent in the same manner as in the case of FIG.
A of block 1 of 0, A+1. A+2. The value of A+3 is read. At this time, data A+2 is placed in the latch 70 and data A+3 is placed in the latch 71 according to instructions from the control device 90.
is stored in

次いで、加算器110によってアドレスレジスタ10の
値が加算され、制御装置90によってセレクタ120が
切替えられ、加算器の出力(A+8)がタグメモリ40
に与えられ、上記と同様にして、データメモリ50から
データA+4゜A+5.A+6.A+7の値が読み出さ
れ、制御袋wt90の指示によりA+4がラッチ72に
、A+5がラッチ73に格納される。
Next, the value of the address register 10 is added by the adder 110, the selector 120 is switched by the control device 90, and the output (A+8) of the adder is added to the tag memory 40.
, and in the same manner as above, data A+4°A+5 . A+6. The value of A+7 is read out, and A+4 is stored in the latch 72 and A+5 is stored in the latch 73 according to instructions from the control bag wt90.

そして、最後にラッチ70.71,72.73の値が演
算装置に渡される。このようにして、ブロック間にまた
がる複数語の読み出しは2つのサイクルで行なわれる。
Finally, the values of latches 70.71 and 72.73 are passed to the arithmetic unit. In this way, reading out multiple words spanning blocks is done in two cycles.

ブロック間にまたがる複数語の書き込みも、読み出しと
同様に、同一ブロック内の書き込みを2回実行すること
によって、行なわれる。
Writing of multiple words across blocks is also performed by writing within the same block twice, similar to reading.

次に、第3の発明の一実施例を示す。第3図において、
第3の発明の一実施例はアドレスレジスタ101デコー
ダ20および3014列の2語同時読み出し可能なメモ
リ列により構成されるタグメモリ4014列のメモリ列
により構成されるデータメモリ50.比較器61〜68
、ラッチ70〜73、データ交換器80.全体の制御を
行ナウ制at装置90、ラッチ1001加算器110お
よび115、およびセレクタ120である。
Next, an embodiment of the third invention will be described. In Figure 3,
An embodiment of the third invention includes an address register 101, a decoder 20, a tag memory 40, which is composed of 3014 memory columns that can read two words simultaneously, and a data memory 50, which is composed of 2014 memory columns. Comparators 61-68
, latches 70-73, data exchanger 80. The entire control is performed by the row now control AT device 90, the latch 1001, the adders 110 and 115, and the selector 120.

1語の読み出しと書き込み、およびデータメモ1J50
の同一ブロック内のデータの同時読み出しおよび同時書
き込みの処理は第1図と同様にして行なわれる。
1 word reading and writing and data memo 1J50
The processing of simultaneous reading and writing of data in the same block is performed in the same manner as in FIG.

データメモリ50のブロック間にまたがる複数語の同時
読み出し、同時書き込みは以下のように行なわれる。
Simultaneous reading and simultaneous writing of a plurality of words across blocks of the data memory 50 is performed as follows.

A+2から4語のデータの読み出しを行なうとすると、
まず、演算装置よりアドレスA+2がアドレスレジスタ
10に与えられる。この時、デコーダ20は、制御装置
90からの指示により、アドレスA+2に対応するブロ
ック1と、その次のブロック2の読み出しを同時に行な
う(アドレスの値によりブロックn−1が選択された場
合には、次のブロックとしてはブロック0が選ばれる)
。タグメモリ40のブロック1より読み出された値は比
較器81,82,63.84によってアドレスレジスタ
10の値と比較され、ブロック2から読み出された値は
、加算器115の加算結果(A+8)と比較器85.8
8.67.68により比較される。
If you want to read 4 words of data from A+2,
First, the address A+2 is given to the address register 10 by the arithmetic unit. At this time, the decoder 20 simultaneously reads block 1 corresponding to address A+2 and the next block 2 according to an instruction from the control device 90 (if block n-1 is selected by the address value, , block 0 is selected as the next block)
. The value read from block 1 of the tag memory 40 is compared with the value of the address register 10 by comparators 81, 82, 63.84, and the value read from block 2 is the addition result (A+8 ) and comparator 85.8
Compare by 8.67.68.

次いで、比較器61,62,83.64の比較結果およ
び、デコーダ30によるアドレスレジスタ10の値のデ
コード結果、および制御装置90からの指示によりデー
タメモリ50のA+2゜A+3.A+4.A+5の値が
読み出され、データ交換器80によってシフトされ、A
+2のデータがラッチ70に、A+3のデータがラッチ
71に、A+4のデータがラッチ72に、A+5のデー
タがラッチ73に格納され、演算装置に渡される。ラッ
チ72.73に格納された値が正し値であるかどうかは
、比較器65の比較結果が一致していることかられかる
Next, A+2°A+3 . A+4. The value of A+5 is read and shifted by the data exchanger 80,
The data of +2 is stored in the latch 70, the data of A+3 is stored in the latch 71, the data of A+4 is stored in the latch 72, and the data of A+5 is stored in the latch 73, and then passed to the arithmetic unit. Whether the values stored in the latches 72 and 73 are correct values can be determined from the fact that the comparison results of the comparator 65 match.

与えられたアドレスがB+2である場合には、上記と同
様の処理が行なわれるが、アドレスB〜B+3とアドレ
スB+4〜B+7がタグメモリ40中の同一列およびそ
れらのデータがそれに対応するデータメモリ50中の位
置に格納されていないため、ラッチ70,71,72.
73に読み出される値は、それぞれB+2.B+3.X
If the given address is B+2, the same process as above is performed, but addresses B to B+3 and addresses B+4 to B+7 are in the same column in the tag memory 40 and their data corresponds to the data memory 50. Since the latches 70, 71, 72 .
The values read in 73 are B+2. B+3. X
.

X+1となる。ラッチ72.73に格納された値X、X
+1が正しくない偵であることは、比較器66の比較結
果が不一致であることかられかる。
It becomes X+1. Values X, X stored in latches 72.73
+1 is an incorrect value because the comparison result of the comparator 66 does not match.

この場合には、第2図と同様にして、もう−度読み出し
の処理が行なわれ、ラッチ72.73にそれぞれA+4
、A+5の値が読み出される。
In this case, similar to FIG. 2, the readout process is performed again, and the latches 72 and 73 are respectively
, A+5 are read.

複数語の同時書き込みも同様にしてデータメモリが選択
され、演算装置によりラッチ70゜71.72.73に
与えられたデータがデータメモリ50に書き込まれる。
For simultaneous writing of a plurality of words, the data memory is selected in the same manner, and the data given to the latches 70° 71, 72, 73 by the arithmetic unit is written into the data memory 50.

以上第1〜3の発明の一実施例について述べたが、本発
明はこの実施例にのみ限定されるものではなく、列の数
、ブロック内のデータ数、ラッチの有無、データメモリ
中におけるデータの配置順等の実現手段等が異なってい
ても基本的実施方法は変わらない。
Although one embodiment of the first to third inventions has been described above, the present invention is not limited only to this embodiment, and includes the number of columns, the number of data in a block, the presence or absence of latches, and the data in the data memory. Even if the implementation means, such as the arrangement order, etc., are different, the basic implementation method remains the same.

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

本発明によれば、連続したアドレスを持つ複数語の読み
出し、書き込みを同時に行なうことができるため、連続
領域へのレジスタの退避/復旧、キャッシュの更新操作
等を高速化することができる。
According to the present invention, reading and writing of multiple words having consecutive addresses can be performed simultaneously, so it is possible to speed up operations such as saving/restoring registers to consecutive areas and updating caches.

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

第1図は第1の発明の一実施例を示すブロック図、第2
図は第2の発明の一実施例を示すブロック図、第3図は
第3の発明の一実施例を示すブロック図、第4図はタグ
メモリおよびデータメモリの内部状態の一例を示す図で
ある。 10・・・アドレスレジスタ、20.3.0・・・デコ
ーダ、40・・・タグメモリ、50・・・データメモリ
、61.62.63,64,66.66.87゜68・
・・比較器、?0.71,72.73・・・ラッチ、8
0・・・データ交換器、90・・・制御装置、100・
・・ラッチ、ito、115・・・加算器、120・・
・セレクタ。
FIG. 1 is a block diagram showing an embodiment of the first invention;
FIG. 3 is a block diagram showing an embodiment of the second invention, FIG. 3 is a block diagram showing an embodiment of the third invention, and FIG. 4 is a diagram showing an example of the internal states of the tag memory and data memory. be. 10... Address register, 20.3.0... Decoder, 40... Tag memory, 50... Data memory, 61.62.63, 64, 66.66.87°68.
...Comparator? 0.71, 72.73...Latch, 8
0...Data exchanger, 90...Control device, 100.
...Latch, ito, 115...Adder, 120...
·selector.

Claims (1)

【特許請求の範囲】 1、データの読み出しまたは書き込みを行なうアドレス
を保持するアドレスレジスタと、N列のメモリより構成
され、各列の同一番地のN語のデータおよび連続したN
個の番地内において、番地および列の位置が互いに全て
異なるN語のデータの同時読み出しおよび同時書き込み
が可能なデータメモリと、N列のメモリにより構成され
同一番地のN語の同時読み出しが可能であり、前記デー
タメモリに格納されているデータのアドレスの一部を保
持するタグメモリと、前記タグメモリより読み出された
値と前記アドレスレジスタの値の一部の比較を行なう比
較器と、前記データメモリと前記タグメモリに対して前
記アドレスレジスタの値のデコードを行なうアドレスデ
コーダと、前記データメモリより同時に読み出されたN
語のデータの順番の入れ換えを行なうデータ交換器と、
全体の制御を行なう制御装置とを含むことを特徴とする
キャッシュメモリ装置。 2、データの読み出しまたは書き込みを行なうアドレス
を保持するアドレスレジスタと、N列のメモリより構成
され、各列の同一番地のN語のデータおよび連続したN
個の番地内において、番地および列の位置が互いに全て
異なるN語のデータの同時読み出しおよび同時書き込み
が可能なデータメモリと、N列のメモリにより構成され
同一番地のN語の同時読み出しが可能であり、前記デー
タメモリに格納されているデータのアドレスの一部を保
持するタグメモリと、前記アドレスレジスタに格納され
ている値の加算を行なう加算器と、前記タグメモリより
読み出された値と前記アドレスレジスタの値の一部の比
較を行なう比較器と、前記データメモリと前記タグメモ
リに対して前記アドレスレジスタおよび前記加算器の値
のデコードを行なうアドレスデコーダと、前記データメ
モリより同時に読み出されたN語のデータの順番の入れ
換えを行なうデータ交換器と、全体の制御を行なう制御
装置とを含むことを特徴とするキャッシュメモリ装置。 3、データの読み出しまたは書き込みを行なうアドレス
を保持するアドレスレジスタと、N列のメモリより構成
され、各列の同一番地のN語のデータおよび連続したN
個の番地内において、番地および列の位置が互いに全て
異なるN語のデータの同時読み出しおよび同時書き込み
が可能なデータメモリと、N列のM語同時読み出し可能
なメモリにより構成され、M種番地に格納されているM
*N語のデータの同時読み出しが可能であり、前記デー
タメモリに格納されているデータのアドレスの一部を保
持するタグメモリと、前記アドレスレジスタに格納され
ている値の加算を行なう加算器と、前記タグメモリより
読み出された値と前記アドレスレジスタの値の一部の比
較を行なう比較器と、前記タグメモリより読み出された
値と前記加算器の値の比較を行なう比較器と、前記デー
タメモリと前記タグメモリに対して前記アドレスレジス
タおよび前記加算器の値のデコードを行なうアドレスデ
コーダと、前記データメモリより同時に読み出されたN
語のデータの順番の入れ換えを行なうデータ交換器と、
全体の制御を行なう制御装置を含むことを特徴とするキ
ャッシュメモリ装置。 4、請求項3のキャッシュ装置において、データの更新
を行なう際に、新たに格納しようとする値と連続するア
ドレスの値が既に格納されていた場合には、それらのア
ドレスをタグメモリ中の同一の列に格納し、その列の位
置に応じてデータをデータメモリ中に格納することを優
先するキャッシュメモリ更新方式を持つことを特徴とす
るキャッシュメモリ装置。
[Claims] 1. Consisting of an address register that holds addresses for reading or writing data, and N columns of memory, N words of data at the same location in each column and N consecutive
A data memory that can simultaneously read and write N words of data whose addresses and column positions are all different from each other within a single address, and a memory with N columns that allows simultaneous reading of N words at the same address. a tag memory that holds a part of the address of data stored in the data memory; a comparator that compares a value read from the tag memory with a part of the value of the address register; an address decoder that decodes the value of the address register with respect to the data memory and the tag memory; and an address decoder that decodes the value of the address register for the data memory and the tag memory;
a data exchanger for changing the order of word data;
1. A cache memory device comprising: a control device that performs overall control. 2. Consists of an address register that holds addresses for reading or writing data, and N columns of memory, including N words of data at the same location in each column and N consecutive
A data memory that can simultaneously read and write N words of data whose addresses and column positions are all different from each other within a single address, and a memory with N columns that allows simultaneous reading of N words at the same address. A tag memory that holds part of the address of the data stored in the data memory, an adder that adds the value stored in the address register, and a value read from the tag memory. a comparator that compares part of the values of the address register; an address decoder that decodes the values of the address register and the adder with respect to the data memory and the tag memory; and a comparator that performs simultaneous reading from the data memory. 1. A cache memory device comprising: a data exchanger for changing the order of data of N words; and a control device for controlling the entire cache memory device. 3. Consists of an address register that holds addresses for reading or writing data, and N columns of memory, including N words of data at the same location in each column and N consecutive
It consists of a data memory that can simultaneously read and write N words of data whose addresses and column positions are all different from each other within an address, and a memory that can read M words of N columns at the same time. Stored M
* A tag memory that can read N words of data simultaneously and holds a part of the address of the data stored in the data memory, and an adder that adds the values stored in the address register. , a comparator that compares a value read from the tag memory and a part of the value of the address register; a comparator that compares the value read from the tag memory and the value of the adder; an address decoder that decodes the values of the address register and the adder for the data memory and the tag memory;
a data exchanger for changing the order of word data;
A cache memory device characterized by including a control device that performs overall control. 4. In the cache device according to claim 3, when updating data, if values at addresses consecutive to the value to be newly stored are already stored, those addresses are stored in the same address in the tag memory. A cache memory device characterized by having a cache memory update method that prioritizes storing data in a data memory column according to the position of the column.
JP2075036A 1990-03-22 1990-03-22 Cache memory device Pending JPH03273592A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2075036A JPH03273592A (en) 1990-03-22 1990-03-22 Cache memory device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2075036A JPH03273592A (en) 1990-03-22 1990-03-22 Cache memory device

Publications (1)

Publication Number Publication Date
JPH03273592A true JPH03273592A (en) 1991-12-04

Family

ID=13564573

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2075036A Pending JPH03273592A (en) 1990-03-22 1990-03-22 Cache memory device

Country Status (1)

Country Link
JP (1) JPH03273592A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07200404A (en) * 1993-12-03 1995-08-04 Internatl Business Mach Corp <Ibm> Cache memory using dram
JP2009043282A (en) * 2008-10-09 2009-02-26 Oki Electric Ind Co Ltd Cache memory, cache memory device and allocating method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07200404A (en) * 1993-12-03 1995-08-04 Internatl Business Mach Corp <Ibm> Cache memory using dram
JP2009043282A (en) * 2008-10-09 2009-02-26 Oki Electric Ind Co Ltd Cache memory, cache memory device and allocating method

Similar Documents

Publication Publication Date Title
JP3940269B2 (en) Arithmetic processing system, arithmetic processing method and program storage device thereof
US5239642A (en) Data processor with shared control and drive circuitry for both breakpoint and content addressable storage devices
US20060101231A1 (en) Semiconductor signal processing device
JP2776132B2 (en) Data processing system with static and dynamic masking of information in operands
US6732253B1 (en) Loop handling for single instruction multiple datapath processor architectures
US5299321A (en) Parallel processing device to operate with parallel execute instructions
JPH077260B2 (en) Image data rotation processing apparatus and method thereof
KR20130085042A (en) Memories and methods for performing atomic memory operations in accordance with configuration information
KR930006541A (en) Method and apparatus for a register providing atomic access to set and clear individual bits of a shared register without a software interlock
KR900016881A (en) Microprocessor, shape processing apparatus and shape processing method using same
JPH0282330A (en) Move out system
US7945760B1 (en) Methods and apparatus for address translation functions
JPH03273592A (en) Cache memory device
US5179682A (en) Method and apparatus for improved current window cache with switchable address in, out, and local cache registers
US5893928A (en) Data movement apparatus and method
JP2812292B2 (en) Image processing device
JPS599992B2 (en) associative memory device
US6594710B1 (en) Apparatus and method for a random access peripheral unit
JP2011192305A (en) Semiconductor signal processor
JP3107595B2 (en) Memory access control device and memory access control method
JPS61194566A (en) Vector data reference control system
JPH0542759B2 (en)
JPH04199238A (en) Memory access system
JPH031226A (en) Data processor
JPS62134754A (en) Cell array processor