JPS605021B2 - buffer memory device - Google Patents

buffer memory device

Info

Publication number
JPS605021B2
JPS605021B2 JP55092204A JP9220480A JPS605021B2 JP S605021 B2 JPS605021 B2 JP S605021B2 JP 55092204 A JP55092204 A JP 55092204A JP 9220480 A JP9220480 A JP 9220480A JP S605021 B2 JPS605021 B2 JP S605021B2
Authority
JP
Japan
Prior art keywords
data
block
memory
priority
priority order
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.)
Expired
Application number
JP55092204A
Other languages
Japanese (ja)
Other versions
JPS5718074A (en
Inventor
政信 井上
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
Nippon Electric 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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP55092204A priority Critical patent/JPS605021B2/en
Publication of JPS5718074A publication Critical patent/JPS5718074A/en
Publication of JPS605021B2 publication Critical patent/JPS605021B2/en
Expired legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/12Replacement control

Description

【発明の詳細な説明】 本発明はデータ処理装置に於けるバッファメモリ装置に
関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a buffer memory device in a data processing device.

一般に、複数個のブロック単位の記憶領域からなるバッ
ファにおいて新規のデータをそのバッフア上に登録しよ
うとするときは、以前バッファ内に格納されていたデー
タの1つを置換対象として追い出さなければなら.ない
Generally, when trying to register new data in a buffer consisting of a storage area in units of multiple blocks, one of the data previously stored in the buffer must be removed as a replacement target. do not have.

このとき、どのデータを追い出すかを決定する方法とし
て、1つの方法はバッファのいずれかを何の規則性もな
くランダムに決定して追い出す方法があり、他の方法と
して一般にFIF○(FirstlnFirstOut
)方式と呼ばれる方法があり、この方法では最初に登録
されたデータを追い出すようにしている。
At this time, as a method for determining which data to flush out, one method is to randomly determine one of the buffers without any regularity and flush it out, and another method is generally to use FIF○ (FirstlnFirstOut).
) method, in which the first registered data is purged.

さらに他の方法として一般にLRU(LeastRec
entryUsed)方式と呼ばれる方法があり、この
方法ではバッファ内のデータの参照された状況により、
最も長い間使用されなかったデータを追い出す方法等が
用いられている。バッファに登録されていても長い間使
用されなかったデー外きど今後も使用される確率が低い
という点からLRU方式が最も有効である。一方、デー
タ処理装置において、その性能を向上させるための手段
として読出し書込みメモリを使用し、主記憶装置のデー
タの写しを保持するキャッシュメモリまたは仮想記憶計
算機における仮想アドレスと実アドレスとの変換テーブ
ルの写しを中央処理装置内に有するTLB(Trans
lation功oKasideB山fer)等のバッ
ファメモリが用いられているが、これらのバッファメモ
リにおいてその追い出し制御方式としてLRU方式を採
用する場合、LRU制御ビットを格納するLRUメモリ
を持ち、バッファメモリ上のデータを参照した時、LR
Uメモリの参照されたデ−夕の格納位置を最高の優先度
を持つように設定し、バッファメモ川こ新規のデータを
登録しようとする場合はLRUメモリの内容により最も
優先度の低い、すなわち、最も長く参照されなかったデ
ータ位置を決定し、そのデータを追い出すことを行なっ
ている。
Furthermore, as another method, LRU (Least Rec
There is a method called the entryUsed) method, in which the data in the buffer is referenced,
A method is used to delete data that has not been used for the longest time. The LRU method is most effective since even if data is registered in the buffer but has not been used for a long time, there is a low probability that it will be used in the future. On the other hand, in a data processing device, a read/write memory is used as a means to improve its performance, and a cache memory that holds a copy of data in the main memory or a conversion table between virtual addresses and real addresses in a virtual memory computer is used. A TLB (Trans
However, when these buffer memories adopt the LRU method as the eviction control method, they have an LRU memory that stores LRU control bits, and the data on the buffer memory When referring to LR
The storage location of the referenced data in the U memory is set to have the highest priority, and when attempting to register new data in the buffer memo, it is set to the storage location of the referenced data in the LRU memory with the lowest priority, i.e. , determines the data location that has not been referenced for the longest time, and purges that data.

また複数の中央処理装置からなるマルチプロセッサシス
テムにおいて、たとえばキヤツシユメモリにおいては一
方の中央処理装置が主記憶装置上のデータを書替えた時
、他方の中央処理装置上のキャッシュメモリ内にそのデ
ータが登録されていると、そのデータも新デー外こ暦換
えるか、またはキャッシュメモリ上のそのデータを無効
とする処理を行なう必要がある。
Furthermore, in a multiprocessor system consisting of multiple central processing units, for example, in a cache memory, when one central processing unit rewrites data on the main memory, that data is stored in the cache memory of the other central processing unit. If the data is registered, it is necessary to change the data to new data or to invalidate the data in the cache memory.

本処理は一般には各中央処理装置間で主記憶のアドレス
を送信する通信手段を設け、中央処理装置が主記憶装置
に書込みアクセスを行なった時、他の中央処理装置にそ
のアドレスを送り、それを受取った中央処理装置はキャ
ッシュメモリを調べそのアドレスのブロックデータが登
録されているとそのブロックの有効性を示す有効ビット
をリセットすることにより実現している。
This process generally involves providing communication means for transmitting main memory addresses between each central processing unit, and when a central processing unit performs write access to the main memory, it transmits the address to another central processing unit, and The central processing unit that receives the address checks the cache memory and, if the block data at that address is registered, resets the valid bit indicating the validity of the block.

このとき、キャッシュメモリ上にはデータの登録されて
いない空ブロックが生じることになる。このキャッシュ
メモリに新規にデータを登録しようとする場合、LRU
メモリの内容だけにより追い出すべきブロックを決定す
るのでは無く、まず有効ビットの状態を調べ、もしデー
タの登録されていない空ブロックが有る場合には、その
ブロックに優先的にデータを登録する方法が有利となる
At this time, an empty block in which no data is registered will be created on the cache memory. When trying to register new data in this cache memory, LRU
Instead of deciding which blocks should be evicted based only on the memory contents, we first check the status of the valid bits, and if there is an empty block with no data registered, we can preferentially register data in that block. It will be advantageous.

したがって追い出すべきブロック位置を決定する論理と
しては、まず第1に有効ビットの状態により空ブロック
の有無を調べもし空ブロックが有る場合にはそのブロッ
クに優先的に割り付け、もし空ブロックが無い場合、L
RUメモリの内容を調べ、その内容により最も低い優先
度をもつブロックを追い出すという手順が必要となり、
追い出し決定用の論理を複雑にすると共にそれを実現す
るハードウェア量が増加するという欠点があった。
Therefore, the logic for determining the position of a block to be evicted is to first check whether there is an empty block based on the state of the valid bit, and if there is an empty block, it will be allocated preferentially to that block, and if there is no empty block, then L
It is necessary to examine the contents of the RU memory and evict the block with the lowest priority based on the contents.
This method has the drawback of complicating the logic for determining eviction and increasing the amount of hardware needed to implement it.

本発明の目的は、あるブロック上のデータを無効とする
時、有効ビットをリセットするとともに、無効としたブ
ロックを最も優先度が低くなるようにLRUメモリの内
容を書替えることにより、上記欠点を解決し、追い出す
べきブロックを決定する時に、LRUメモリの内容だけ
で従来と同じ機能を少ないハードウェア量で実現したL
RU方式を用いたバッファメモリ装置を提供することに
ある。
An object of the present invention is to eliminate the above drawbacks by rewriting the contents of the LRU memory so that when data on a certain block is invalidated, the valid bit is reset and the invalidated block has the lowest priority. When determining the block to be solved and evicted, LRU realizes the same function as before using only the contents of LRU memory with less hardware.
An object of the present invention is to provide a buffer memory device using the RU method.

本発明によれば、ブロック単位の記憶領域を有するデー
タ記憶用のデータ記憶手段と、このデータ記憶手段の各
ブロックに対応してデータが前記データ記憶手段に格納
されている場合を示す有効情報を記憶する有効情報記憶
手段と、前記データ記憶手段の記憶位置に対応した前記
ブロック単位の優先順位を示す優先順位指示情報を記憶
する優先順位指示情報記憶手段と、データがアクセスさ
れた時に前記データ記憶手段内のアクセスされた記憶ブ
ロックに対応する前記優先順位指示情報を最優先順位と
するように前記優先順位指示情報記憶手段の内容を更新
する更新手段と、前記有効情報記憶手段の任意の有効情
報をリセットする手段と、そのリセット時にリセットさ
れた有効情報に対応する記憶ブロックの前記優先順位指
示情報を最も低い優先順位とするように前記優先順位指
示情報記憶手段の内容を更新する更新手段と、前記デー
タ記憶手段に記憶されたデータを他のデータと入れ換え
るために前記優先順位指示情報記憶手段に記憶された優
先順位指示情報だけにより最も低い優先順位の記憶ブロ
ックをデータの入れ換えを行なうべき記憶ブロックとし
て決定する手段とを備えたことを特徴とするバッファメ
モリ装置が得られる。
According to the present invention, there is provided a data storage means for storing data having a storage area in units of blocks, and valid information indicating a case where data is stored in the data storage means corresponding to each block of the data storage means. effective information storage means for storing, priority order instruction information storage means for storing priority order instruction information indicating the priority order of the block unit corresponding to the storage position of the data storage means, and the data storage means when the data is accessed. updating means for updating the contents of the priority order instruction information storage means so that the priority order instruction information corresponding to the accessed storage block in the means is given the highest priority; and any valid information in the valid information storage means. and updating means for updating the contents of the priority order instruction information storage means so that the priority order instruction information of the storage block corresponding to the valid information reset at the time of the reset is set to the lowest priority; In order to replace the data stored in the data storage means with other data, a storage block whose data should be replaced with the lowest priority storage block based only on the priority order instruction information stored in the priority order instruction information storage means. A buffer memory device characterized in that it is provided with means for determining .

次に本発明について図面を参照しながら詳細に説明する
Next, the present invention will be explained in detail with reference to the drawings.

まず、本発明で用いられる置換アルゴIJズムについて
、4個のブロックからなるバッファの場合について説明
する。
First, regarding the replacement algorithm IJ system used in the present invention, a case of a buffer consisting of four blocks will be explained.

第1図におけるメモリ1は256×4のブロックを持つ
データ記憶用のメモリで、メモリ2は256の各ワード
に対して6ビットのLRU制御ビット(すなわちブロッ
ク単位の優先順位を示す優先順位指示情報)を記憶する
メモリである。LRU制御ビットは4個の各ブロック内
データがアクセスされた時間的な関係を示すビットで、
ある制御ビットlij(ここでiおよびiはブロック番
号を意味する)についてみると、制御ビットlij=論
理い1″のとき、フロツクiのデータがブロックiのデ
ータよりも後にアクセスされたことを示し、制御ビット
lij=論理”0″のとき、ブロックiのデータがブロ
ックiのデータよりも以前にアクセスされたことを示す
Memory 1 in FIG. 1 is a data storage memory having 256×4 blocks, and memory 2 has 6 LRU control bits for each of the 256 words (i.e. priority instruction information indicating the priority of each block). ). The LRU control bit is a bit that indicates the temporal relationship in which the data within each block is accessed.
For a certain control bit lij (where i and i represent block numbers), when control bit lij = logic 1'', it indicates that the data in block i was accessed after the data in block i. , control bit lij=logic "0" indicates that the data in block i was accessed earlier than the data in block i.

この6ビットのLRU制御ビット、lo,,lo2,ち
3,1,2,1,3および1豹により4個のブロックの
参照された順序を表わすことができるが、あるブロック
を他のブロックよりも後でアクセスされたことを示す、
すなわち最高位の優先度を示すように書替える方法、お
よび逆にあるブロックを最も低い優先度を示すように書
替える方法を第2図を参照しながら説明する。
These 6 LRU control bits, lo,, lo2, 3, 1, 2, 1, 3, and 1, can represent the referenced order of the 4 blocks, making it possible to express one block more than another. indicates that it was also accessed later,
That is, a method of rewriting a block to indicate the highest priority and a method of rewriting a block to indicate the lowest priority will be explained with reference to FIG.

第2図において、4個のブロックのうち、ある*ブロッ
クを最も高い優先度を持つように設定するには、そのブ
ロック番号の行方向のビットを論理”1″に、列方向の
ビットを論理け0″に書替えることにより実現できる。
In Figure 2, to set a block among the four blocks to have the highest priority, set the bit in the row direction of that block number to logic "1" and the bit in the column direction to logic "1". This can be achieved by rewriting the value to 0''.

たとえば、ブロック1を最高位の優先度に設定するには
、行方向のビット1,2および1,3を論理”1″に、
列方向のビットL,を論理ぃ0″に書替える。反対に、
あるブロックを最も低い優先度を持つように設定するに
は上記とは逆に、そのブロック番号の行方向のビットを
論理”0″に、列方向のビットを論理”1″に書替える
ことにより実現できる。
For example, to set block 1 to the highest priority, set row bits 1, 2 and 1, 3 to logic "1".
Rewrite the bit L in the column direction to logic 0''.On the contrary,
To set a certain block to have the lowest priority, contrary to the above, rewrite the bits in the row direction of the block number to logic "0" and the bits in the column direction to logic "1". realizable.

各ブロックに対して、そのブロックを最高位に設定する
場合、および最低位に設定する場合に更新すべきLRU
制御ビットの関係を以下に示す。
For each block, the LRU to be updated when setting the block to the highest rank and when setting it to the lowest rank.
The relationship between the control bits is shown below.

次に新規データを本バッファに登録するとき、4個のブ
ロックのいずれかのデータを追い出さなければならない
が、その追い出し優先度の最も高いブロック、すなわち
、最も低い優先度を持つブロックを検出する論理式を以
下に示す。フロツク0=L.・1の・1。
Next, when new data is registered in this buffer, the data in one of the four blocks must be evicted, but the logic that detects the block with the highest priority for evicting, that is, the block with the lowest priority. The formula is shown below. Flock 0=L.・1 of 1.

3 ブロック1=L.・18・1,3 フロツク2=し2・1,2・123 フロツク3=L3・1,3.123 第3図は本発明の一実施例を示す図である。3 Block 1=L.・18・1,3 Flock 2=shi2・1,2・123 Flock 3 = L3・1, 3.123 FIG. 3 is a diagram showing an embodiment of the present invention.

本実施例は4レベルのセットアソシェィティブ方式のキ
ャッシュメモ川こついて示している。第3図において、
メモリ32は主記憶装置6上のデータをブロック単位で
記憶するデータ記憶メモリで256セット×4コンバー
トメントのエントリを持っている。メモリー4はメモリ
32の各ェントリに対応して、そのブロックデータの有
効性(すなわちブロックデータがメモリ32に格納され
ているかどうか)を示す有効ビットとブロックデータの
主記憶装置上のアドレスを記憶するためのメモリで、有
効ビットが論理ul″の時に、データ記億メモリ32の
対応するブロックにデータが格納されていることを示す
。メモリ23はメモリ14および32の各セットに対応
して4個のブロック間の優先順位を示す6ビットのLR
Uビットを記憶するメモリである。中央処理装置4から
のキャッシュメモリのアクセスはパス1001こよるア
ドレス情報と書込みアクセスの場合はパス101による
書込みデータとにより行なわれる。
This embodiment shows a four-level set-associative cache memo system. In Figure 3,
The memory 32 is a data storage memory that stores data on the main storage device 6 in blocks, and has entries of 256 sets x 4 conversions. The memory 4 stores, corresponding to each entry in the memory 32, a valid bit indicating the validity of the block data (that is, whether the block data is stored in the memory 32) and an address on the main memory of the block data. When the valid bit is logic ul'', it indicates that data is stored in the corresponding block of the data storage memory 32.The memory 23 has four memory blocks corresponding to each set of the memories 14 and 32. 6-bit LR indicating priority between blocks of
This is a memory that stores U bits. Access to the cache memory from the central processing unit 4 is performed using address information via path 1001 and write data via path 101 in the case of write access.

中央処理装置4からのアクセス動作について説明する。
中央処理装置4からの議出しアクセスの場合、パス10
0上のアドレス情報はしジスタ10‘こセットされ、そ
の下位ビット202が選択回路12により選択され、パ
ス205によりメモリ14のアドレスとして与えられ、
メモリ14の議出しを行なう。メモリ14から読出され
た4個の各ブロックに対する有効ビットとアドレス情報
はパス210,211,212および213は比較回路
15,16,17および18に入力される。各比較回路
の他方の入力にはしジスタ10の上位ビットがパス20
1により入力されており、両データが比較される。メモ
IJ14からの議出しデータの有効ビットが論理い1″
で、かつ、そのアドレス情報とパス201の内容が等し
いとき、そのブロックに中央処理装置4からアクセスさ
れたデータが記憶されている(キャッシュヒットと称す
る)ことを意味し、比較回路の出力214〜217の対
応する信号が論理ぃ1″となる。
The access operation from the central processing unit 4 will be explained.
For discussion access from central processing unit 4, pass 10
The address information on 0 is set in the register 10', its lower bit 202 is selected by the selection circuit 12, and given as the address of the memory 14 by the path 205,
The memory 14 is proposed. Valid bits and address information for each of the four blocks read from memory 14 are input to comparison circuits 15, 16, 17 and 18 via paths 210, 211, 212 and 213. The upper bit of register 10 is passed to the other input of each comparison circuit.
1, and both data are compared. The valid bit of the proposal data from memo IJ14 is logical 1''
, and when the address information and the contents of the path 201 are equal, it means that the data accessed from the central processing unit 4 is stored in that block (referred to as a cache hit), and the outputs 214 to 214 of the comparison circuit The corresponding signal of 217 becomes logic 1''.

すべての比較回路で上記一致がとれないとき(キャッシ
ュミスヒットと称する)はメモリ32に目的のデータが
記憶されていないことを示し、主記憶装置6に対する読
出しアクセスを行なう。
When all comparison circuits cannot find the above-mentioned match (referred to as a cache miss), it indicates that the target data is not stored in the memory 32, and a read access to the main memory 6 is performed.

メモリ32のアクセスは/ぐス202のアドレスにより
上記動作とは並行して行なわれ、各ブロックの出力デー
タはパス232〜235により選択回路33に入力され
ている。キャッシュヒットの場合、パス214〜217
のデータは選択回路19により選択され、レジス夕20
もこセットされると共に、選択回路33においてパス2
32〜235のデータのうちヒットしたブロックデータ
を選択し、パス236によりレジスタ34にセットする
Access to the memory 32 is performed in parallel with the above operation using the address of the /path 202, and the output data of each block is input to the selection circuit 33 via paths 232-235. In case of cache hit, paths 214-217
The data is selected by the selection circuit 19 and stored in the register 20.
At the same time, the selection circuit 33 selects path 2.
The hit block data is selected from among the data 32 to 235 and set in the register 34 through path 236.

レジスタ34のデータはパス102により中央処理装置
4に送られる。キャッシュヒットの場合、4ビットのレ
ジスタ20‘こはヒットしたブロックに対するビットの
み論理い1″で、他のビットは論理い0″のデータがセ
ットされており、そのヒットしたブロックを最も最近に
参照されたことを示すための最高位の優先度を持つよう
にメモリ23のLRUビットの更新処理を行なう。そこ
で、LRUメモリ制御回路22においてはしジスタ20
の内容により論理い1″のブロックを最高位優先度とな
るよう先に述べたアルゴリズムにしたがってメモリ23
の書込みデータを発生し、レジスタ21のアドレス情報
で示されるメモリ23のアドレス位置に書込む。
The data in register 34 is sent to central processing unit 4 via path 102. In the case of a cache hit, in the 4-bit register 20', only the bit for the hit block is set to logic 1'', and the other bits are set to logic 0'', and the most recent reference to the hit block is set. The LRU bit of the memory 23 is updated so that it has the highest priority to indicate that it has been updated. Therefore, in the LRU memory control circuit 22, the register 20
According to the algorithm described above, the block with logic 1" is given the highest priority according to the contents of the memory 23.
write data is generated and written to the address location of the memory 23 indicated by the address information of the register 21.

中央処理装置4からの読出しアクセスによりキャッシュ
ヒットとなった場合は常に上記動作により参照されたブ
When a cache hit occurs due to a read access from the central processing unit 4, the block referenced by the above operation is always used.

ックを最高位の優先度となるように設定する。キャッシ
ュミスヒットの場合はしジスタ10のアドレス情報を選
択回路35により選択し、レジスタ36を介して主記憶
装置6に送り、主記憶装置に対する議出しアクセスを行
なう。
set the highest priority. In the case of a cache mishit, the address information in the register 10 is selected by the selection circuit 35 and sent to the main memory device 6 via the register 36, thereby making a proposed access to the main memory device.

本アクセスにより主記憶装置6からの議出しデータがバ
ス105により送られてくると、選択回路30により選
択し、レジスタ31にセットするとともに、パス230
から選択回路33を介してレジスタ34にセットし、パ
ス102により中央処理装置4に送る。
When the input data from the main storage device 6 is sent via the bus 105 by this access, it is selected by the selection circuit 30 and set in the register 31, and
is set in the register 34 via the selection circuit 33 and sent to the central processing unit 4 via the path 102.

主記憶装置6からの議出しデータは中央処理装置4に送
ると共に、メモリ32にも格納する。このとき、データ
の格納は4個のフロツクのうちメモリ23内のLRUビ
ットにより最も低い優先度を持つブロックすなわち最も
以前に参照されたブロック位置に対して行なう。中央処
理装置4からのアクセス要求のアドレスはしジスタ10
およびレジスタ21に保持されており、パス225のア
ドレスにより読出されたメモリ23のLRUビットはし
ジスタ24にセットされ、その内容により追い出しブロ
ック検出回路25で最も低い優先度のブロックを決定す
る。追い出しブロック検出回路の出力は迫に出すブロッ
ク位置に対するビットのみ論理”1″となっており、パ
ス224により選択回路19を介してレジスタ2川こセ
ットされる。レジセタ20の内容はパス220によりメ
モリ14、メモリ32およびLRUメモリ制御回路22
に入力されており、各メモリの更新処理に用いられる。
まずメモリ32においてはパス202のアドレスとパス
220のブロック位置状報で示されるブロックに対して
レジスタ31の主記憶装置6からの議出しデータを書込
む。
The meeting data from the main storage device 6 is sent to the central processing unit 4 and also stored in the memory 32. At this time, data is stored in the block having the lowest priority according to the LRU bit in the memory 23 among the four blocks, that is, the most previously referenced block position. Address register 10 for access request from central processing unit 4
The LRU bit of the memory 23 held in the register 21 and read by the address on the path 225 is set in the register 24, and based on its contents, the eviction block detection circuit 25 determines the block with the lowest priority. In the output of the expelled block detection circuit, only the bit corresponding to the next block position is set to logic "1", and the register 2 is set via the selection circuit 19 by the path 224. The contents of register 20 are transferred to memory 14, memory 32 and LRU memory control circuit 22 by path 220.
The data is input to the memory and used for update processing of each memory.
First, in the memory 32, the output data from the main storage device 6 of the register 31 is written to the block indicated by the address of the path 202 and the block position information of the path 220.

メモリ14ではパス205のアドレスとパス220で示
されるブロックに対してパス201の上位アドレス情報
を書込み、有効ビットは論理”1″を書込む。
In the memory 14, upper address information of the path 201 is written to the block indicated by the address of the path 205 and the path 220, and logic "1" is written to the valid bit.

メモリ23に対しては、上記データを登録したフロック
を最高位の優先度を持つように設定するため、キャッシ
ュヒットの場合と同様に、LRUメモリ制御回路22に
より設定データを発生し、メモリ23に書込む。
As for the memory 23, in order to set the block in which the above data is registered to have the highest priority, the LRU memory control circuit 22 generates setting data and stores it in the memory 23, as in the case of a cache hit. Write.

中央処理装置4からのアクセスに対しては以上に示した
ごとく、キャッシュメモリの最も最近に参照したブロッ
クに対するLRUビットの優先度を最高位に設定し、新
たにデータを登録する場合には最も優先度の低いブロッ
クのデータを追い出して新データを登録している。
As shown above, for access from the central processing unit 4, the LRU bit priority for the most recently referenced block in the cache memory is set to the highest priority, and when new data is registered, the LRU bit is given the highest priority. New data is registered by expelling data from blocks with low levels.

次にブロック無効化制御部5からの要求に対する動作を
示す。
Next, the operation in response to a request from the block invalidation control section 5 will be described.

ブロック無効化制御部5はメモリ14と構造が等しく、
その内容の写しを記憶するメモリを持っており、両メモ
リは常に内容が一致するように制御されている。
The block invalidation control unit 5 has the same structure as the memory 14,
It has a memory that stores a copy of its contents, and both memories are controlled so that the contents always match.

またブロック無効化制御部5はマルチプロセッサを構成
する他の中央処理装置が主記憶装置6に書込みアクセス
を行なった時に送ってくる主記憶アドレスを受取り、制
御部5内のメモリを検索し、もし、その主記憶アドレス
で示されるブロックが登録されていると、そのブロック
を無効とするための要求をパス103によりバッファメ
モリ装置3に対して送ってくる。フロック無効化制御部
5の動作は本発明とは関係が無いため省略する。
In addition, the block invalidation control unit 5 receives the main memory address sent when another central processing unit making up the multiprocessor performs write access to the main memory 6, searches the memory within the control unit 5, and searches the memory in the control unit 5, , if the block indicated by the main memory address is registered, a request to invalidate the block is sent to the buffer memory device 3 via path 103. The operation of the flock invalidation control unit 5 is omitted because it has no relation to the present invention.

パス103には無効とすべきブロック位置を示すアドレ
ス情報と、そのブロック位置に対するビットだけ論理ぃ
1″となっている4ビットのデータを含んでおり、レジ
スタ11にセットされる。
The path 103 includes address information indicating the block position to be invalidated and 4-bit data in which only the bit corresponding to the block position is logical 1'', and is set in the register 11.

レジスタ11のアドレス情報部303は選択回路j2で
選択されパス205によりメモリ14のアドレスを指定
すると共に、レジスタ21にセットされ、パス225に
よりメモリ23のアドレスを指定する。ブロック位置情
報はパス204により有効ビット制御回路13に入力さ
れ、かつ、選択回路19を介してレジスタ201こセッ
トされる。メモリ14においては制御回路13において
パス204の論理ぃ1″のブロック位置に対する入力デ
ータとして論理”0′′のデータを発生し、書込み処理
を行なうことにより、指定されたブロック位置の有効ビ
ットをリセットする。LRUメモリ制御回路22におい
てはしジスタ20の内容により論理、、1″のビット位
置のブロックを最も低い優先度に設定するためのデ−夕
を先に示したアルゴリズムにより発生し、メモリ23の
更新処理を行なう。
Address information section 303 of register 11 is selected by selection circuit j2 and specifies the address of memory 14 through path 205, and is set in register 21 and specifies the address of memory 23 through path 225. The block position information is input to the valid bit control circuit 13 via a path 204 and set in the register 201 via the selection circuit 19. In the memory 14, the control circuit 13 generates logic ``0'' data as input data for the block position of logic 1'' of the path 204, and by performing a write process, resets the valid bit of the specified block position. do. In the LRU memory control circuit 22, the data for setting the block at the bit position 1'' to the lowest priority is generated according to the contents of the register 20, and the memory 23 is updated. Process.

本処理によりデータが無効となった、すなわちデータの
登録されていないブロックは他のブロックに比べて最も
優先度が低くなり、中央処理装置からのアクセスにより
主記憶装置6からのデータを登録するときはデータの登
録されていない空のブロックが優先的に使用されること
になる。
A block whose data has become invalid due to this process, that is, a block in which no data is registered, has the lowest priority compared to other blocks, and when data from the main storage device 6 is registered by access from the central processing unit. In this case, empty blocks with no data registered will be used preferentially.

次にLRUメモリ制御回路22によるメモリ23の更新
動作および追い出しブロック検出回路25の構成を第4
図を参照しながら説明する。第4図において、メモリ2
3は各LRUビット単位に書込み動作が行なえるメモリ
セル2301,2302,2303,2312,231
3および2323により構成され、各メモリセルはLR
Uビットlo,,lo2,lo3,1,2,1,3およ
び123をそれぞれ記憶している。各メモリセルはパス
225のアドレス情報とパス2216の書込み制御信号
と各メモリセル毎に入力される入力データ信号221×
1(×=0〜5)と書込み有効信号221×2とにより
制御される。たとえばメモリセル2301についてみる
と、書込み制御信号2216が論理リ1″で、かつ書込
み有効信号22102が論理”1″だとパス225のア
ドレス位置に入力データ信号22101の内容が書込ま
れる。
Next, the update operation of the memory 23 by the LRU memory control circuit 22 and the configuration of the evicted block detection circuit 25 will be described in the fourth section.
This will be explained with reference to the figures. In Figure 4, memory 2
3 is a memory cell 2301, 2302, 2303, 2312, 231 that can perform a write operation for each LRU bit.
3 and 2323, each memory cell is LR
U bits lo,, lo2, lo3, 1, 2, 1, 3 and 123 are stored respectively. Each memory cell receives address information on a path 225, a write control signal on a path 2216, and an input data signal 221x input for each memory cell.
1 (x=0 to 5) and a write enable signal 221x2. For example, regarding the memory cell 2301, if the write control signal 2216 is a logic 1'' and the write enable signal 22102 is a logic 1'', the contents of the input data signal 22101 are written to the address position of the path 225.

書込み制御信号2216は書込み信号L22601と書
込み信号日22602のいずれかが論理い1″になった
時、書込みパルス22603が論理ぃ1″のタイミング
で発生する。
The write control signal 2216 is generated at the timing when either the write signal L22601 or the write signal date 22602 becomes a logic 1", and the write pulse 22603 becomes a logic 1".

信号L22601はしジスタ20で示すブロック位置を
最も低い優先度に設定することを指定する制御信号でブ
ロック無効化制御部5からの要求により発生し、信号日
22602はしジスタ20で示すブロック位置を最高位
の優先度を持つように設定することを指定する制御信号
で中央処理装置4からのアクセスにより発生する。レジ
スタ2川こは優先度を変更するブロックに対するビット
だけが論理い1″であるブロック指定ビットが設定され
ており、信号L22601または信号日22602によ
り書込み制御信号2216が論理い1″となった時、レ
ジスタ20の内容によりゲート22×1(×=0〜5)
および22×2部で入力データと書込み有効信号が決定
され対応する書込み動作が行なわれる。
Signal L22601 is a control signal that specifies that the block position indicated by the first register 20 is set to the lowest priority, and is generated in response to a request from the block invalidation control unit 5. This is a control signal that designates setting to have the highest priority and is generated by access from the central processing unit 4. In register 2, only the bit for the block whose priority is to be changed is set to a block designation bit of logic 1", and when the write control signal 2216 becomes logic 1" by signal L22601 or signal date 22602. , gate 22×1 (×=0 to 5) depending on the contents of register 20
The input data and write valid signal are determined in the 22.times.2 section, and the corresponding write operation is performed.

いま信号L22601による書込み動作についてみると
、この時レジスタ20の内容が”0100″であると、
ゲート2202,2232および2242の出力221
02,22132および22142が論理い1″となり
メモリセル2301,2312および2313に対して
書込み動作が行なわれる。
Now looking at the write operation using the signal L22601, if the contents of the register 20 at this time are "0100",
Output 221 of gates 2202, 2232 and 2242
02, 22132, and 22142 become logic 1'', and a write operation is performed on memory cells 2301, 2312, and 2313.

このとき、各メモリセルの入力データはゲート2201
,2231および2241で信号L22601との排他
的ORが取られるため20からのデータの負論理が各メ
モリセルの入力データとなる。
At this time, the input data of each memory cell is input to the gate 2201.
, 2231 and 2241 are exclusive ORed with the signal L22601, so the negative logic of the data from 20 becomes input data to each memory cell.

すなわち信号22101は論理い1″に、信号2213
1と22141は論理い0″になりメモリセル2301
,2312および2313に論理い1″,”0″,い0
″がそれぞれ書込まれ、本パターンは先に示したごと〈
ブロック1を最も低い優先度を持つように設定するもの
である。
That is, the signal 22101 becomes logic 1'', and the signal 2213
1 and 22141 become logic 0'' and memory cell 2301
, 2312 and 2313 have logic 1'', ``0'', 0
” is written respectively, and this pattern is as shown above.
Block 1 is set to have the lowest priority.

レジスタ20が他のブロックを指定した場合も上記同様
に、そのブロックを最も低い優先度を持つようにLRU
メモリの書込み動作を行なう。
If the register 20 specifies another block, in the same way as above, that block is assigned the LRU so that it has the lowest priority.
Performs memory write operation.

次に書込み信号日22602による書込み動作の場合に
は書込み有効信号発生用のゲートは上記同様に動作し、
入力データ発生用のゲ−ト22×1はその入力2260
1が論理ぃ0″であるため、レジス夕20の入力状態が
そのまま各メモリセルの入力データとなる。レジスタ2
0の内容が上記同様い0100″の場合についてみると
、メモリセル2301,2312および2313の入力
データはい011″となり、先に示したごとくブロック
ーを最も高い優先度を持つように設定する。
Next, in the case of a write operation using the write signal date 22602, the gate for generating the write valid signal operates in the same manner as above,
The gate 22x1 for generating input data has its input 2260.
Since 1 is logic 0'', the input state of register 20 becomes the input data of each memory cell as it is.Register 2
If the content of 0 is 0100'' as described above, the input data of memory cells 2301, 2312, and 2313 will be 011'', and the block is set to have the highest priority as described above.

追い出しブロック検出回路25の構成は第4図に示すご
とく、レジスタ24の内容だけで非常に簡単に構成され
る。第4図で信号2240が論理”1″の時はブロック
0が、信号2241が論理い1″の時はブロックーが、
信号2242が論理い1″の時はブロック2が、信号2
243が論理”1″の時はブロック3が追い出すべきブ
ロックであることを示す。
As shown in FIG. 4, the configuration of the eviction block detection circuit 25 is very simple, consisting only of the contents of the register 24. In FIG. 4, when the signal 2240 is logic ``1'', block 0 is activated, and when the signal 2241 is logic ``1'', block 0 is activated.
When signal 2242 is logic 1'', block 2
When 243 is logic "1", it indicates that block 3 is the block to be evicted.

以上示したごとく、あるブロックを最高位の優先度を持
つように設定するための回路と、最も低い優先度を持つ
ブロックを追い出しブロックとして検出する回路は非常
に簡単に、かつ、少ないハードウェア量により実現でき
る。
As shown above, the circuit for setting a certain block to have the highest priority and the circuit for detecting the block with the lowest priority as an evicted block are very simple and require only a small amount of hardware. This can be achieved by

本実施例ではキャッシュメモリの場合について示したが
、本発明はTLB等のバッファメモリにおいてLRUの
暦換えアルゴリズムを適用したバッファメモリ制御に対
して簡単に適用できる。
Although the case of a cache memory is shown in this embodiment, the present invention can be easily applied to buffer memory control to which an LRU calendar change algorithm is applied in a buffer memory such as a TLB.

本発明は以上説明したようにブロックデータを無効とし
たとき、そのブロック位置を最も低い優先度に優先順位
指示情報(LRUビット)を設定するように構成するこ
とにより、新規データを登録するときの追い出しブロッ
クを決定する手段を非常に簡単に、かつ少ないハードウ
ェアにより実現できるという効果がある。
As explained above, when block data is invalidated, the present invention is configured to set the priority instruction information (LRU bit) to the lowest priority for the block position, so that when registering new data, This has the effect that the means for determining the eviction block can be realized very simply and with less hardware.

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

第1図は4レベルのバッファメモリと対応するLRUメ
モリを示す図、第2図は4個のブロックから構成される
バッファに対するLRUビットのマトリクス図、第3図
は本発明の一実施例を示すキャッシュメモリの構成を示
すブロック図、第4図は第3図におけるLRUメモリ2
3、LRUメモリ制御回路22および追い出しブロック
検出回路25の詳細な構成を示す図である。 第1図から第4図において、1……バッファメモリ、2
……LRUメモリ、3…・・・バツフアメモリ装置、4
・・・・・・中央処理装置、5・・・・・・フロツク無
効化制御部、6・・・・・・主記憶装置、10,11,
20,21,24,31,34……レジスタ、32..
・..・キャッシュメモリ、14・・…・アドレス、有
効ビット格納用メモリ、23…・・・LRUメモリ、1
3・・・・・・有効ビット制御回路、12,19,30
,33,35・・・・・・選択回路、15,16,17
,18……比較回路、22……LRUメモリ制御回路、
25・・・…追い出しブロック検出回路、2201,2
202,2211,2212,2221,2222,2
231,2232,2241,2242,2251,2
252,2261,2262,250,251,252
,253・・…・論理ゲート、2301,2302,2
303,2312,2313,2323……メモリセル
、100,101,103〜105,200〜206,
210〜218,220〜225,230〜236,2
40,2200〜2203,221×1(x=0〜5)
,221×2,22600〜22603,2216,2
220〜2225,2230〜2235,2240〜2
243……接続ライン。 第1図 第2図 第3図 図 寸 鮭
FIG. 1 shows a four-level buffer memory and the corresponding LRU memory, FIG. 2 shows a matrix of LRU bits for a buffer consisting of four blocks, and FIG. 3 shows an embodiment of the present invention. A block diagram showing the configuration of the cache memory, FIG. 4 is the LRU memory 2 in FIG. 3.
3 is a diagram showing a detailed configuration of the LRU memory control circuit 22 and the eviction block detection circuit 25. FIG. In FIGS. 1 to 4, 1...buffer memory, 2
...LRU memory, 3 ...Buffer memory device, 4
... Central processing unit, 5 ... Flock invalidation control section, 6 ... Main storage device, 10, 11,
20, 21, 24, 31, 34... register, 32. ..
・.. ..・Cache memory, 14...Address, memory for storing valid bits, 23...LRU memory, 1
3... Valid bit control circuit, 12, 19, 30
, 33, 35... Selection circuit, 15, 16, 17
, 18... Comparison circuit, 22... LRU memory control circuit,
25... Evicted block detection circuit, 2201, 2
202, 2211, 2212, 2221, 2222, 2
231, 2232, 2241, 2242, 2251, 2
252, 2261, 2262, 250, 251, 252
,253...Logic gate, 2301,2302,2
303, 2312, 2313, 2323...memory cell, 100, 101, 103-105, 200-206,
210-218, 220-225, 230-236, 2
40,2200-2203,221×1 (x=0-5)
,221×2,22600~22603,2216,2
220-2225, 2230-2235, 2240-2
243... Connection line. Figure 1 Figure 2 Figure 3 Figure Salmon

Claims (1)

【特許請求の範囲】[Claims] 1 ブロツク単位の記憶領域を有するデータ記憶用のデ
ータ記憶手段と、このデータ記憶手段の各ブロツクに対
応してデータが前記データ記憶手段に格納されている場
合を示す有効情報を記憶する有効情報記憶手段と、前記
データ記憶手段の記憶位置に対応した前記ブロツク単位
の優先順位を示す優先順位指示情報を記憶する優先順位
指示情報記憶手段と、データがアクセスされた時に前記
データ記憶手段内のアクセスされた記憶ブロツクに対応
する前記優先順位指示情報を最優先順位とするように前
記優先順位指示情報記憶手段の内容を更新する更新手段
と、前記有効情報記憶手段の任意の有効情報をリセツト
する手段と、そのリセツト時にリセツトされた有効情報
に対応する記憶ブロツクの前記優先順位指示情報を最も
低い優先順位とするように前記優先順位指示情報記憶手
段の内容を更新する更新手段と、前記データ記憶手段に
記憶されたデータを他のデータと入れ換えるために前記
優先順位指示情報記憶手段に記憶された優先順位指示情
報だけにより最も低い優先順位の記憶ブロツクをデータ
の入れ換えを行なうべき記憶ブロツクとして決定する手
段とを備えたことを特徴とするバツフアメモリ装置。
1. A data storage means for storing data having a storage area in blocks, and a valid information storage for storing valid information indicating when data is stored in the data storage means corresponding to each block of the data storage means. means, priority order instruction information storage means for storing priority order instruction information indicating the priority order of the block unit corresponding to the storage location of the data storage means; updating means for updating the contents of the priority order instruction information storage means so that the priority order instruction information corresponding to the stored memory block is given the highest priority; and means for resetting any valid information in the valid information storage means. , updating means for updating the contents of the priority order instruction information storage means so that the priority order instruction information of the storage block corresponding to the valid information reset at the time of the reset is set to the lowest priority; means for determining the lowest priority storage block as the storage block whose data is to be replaced, based only on the priority order instruction information stored in the priority order instruction information storage means, in order to replace the stored data with other data; A buffer memory device comprising:
JP55092204A 1980-07-08 1980-07-08 buffer memory device Expired JPS605021B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP55092204A JPS605021B2 (en) 1980-07-08 1980-07-08 buffer memory device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP55092204A JPS605021B2 (en) 1980-07-08 1980-07-08 buffer memory device

Publications (2)

Publication Number Publication Date
JPS5718074A JPS5718074A (en) 1982-01-29
JPS605021B2 true JPS605021B2 (en) 1985-02-07

Family

ID=14047911

Family Applications (1)

Application Number Title Priority Date Filing Date
JP55092204A Expired JPS605021B2 (en) 1980-07-08 1980-07-08 buffer memory device

Country Status (1)

Country Link
JP (1) JPS605021B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59140686A (en) * 1983-01-31 1984-08-13 Fujitsu Ltd Control system of buffer memory
JPS6043758A (en) * 1983-08-20 1985-03-08 Hitachi Ltd Replace control system of buffer storage

Also Published As

Publication number Publication date
JPS5718074A (en) 1982-01-29

Similar Documents

Publication Publication Date Title
US5369753A (en) Method and apparatus for achieving multilevel inclusion in multilevel cache hierarchies
US7698508B2 (en) System and method for reducing unnecessary cache operations
US7711902B2 (en) Area effective cache with pseudo associative memory
US5802572A (en) Write-back cache having sub-line size coherency granularity and method for maintaining coherency within a write-back cache
JP3281893B2 (en) Method and system for implementing a cache coherency mechanism utilized within a cache memory hierarchy
US6826651B2 (en) State-based allocation and replacement for improved hit ratio in directory caches
US7290094B2 (en) Processor, data processing system, and method for initializing a memory block to an initialization value without a cache first obtaining a data valid copy
EP0780769A1 (en) Hybrid numa coma caching system and methods for selecting between the caching modes
EP0780770A1 (en) Hybrid numa coma caching system and methods for selecting between the caching modes
EP0596636A2 (en) Cache tag memory
US10725923B1 (en) Cache access detection and prediction
US6915396B2 (en) Fast priority determination circuit with rotating priority
US8621152B1 (en) Transparent level 2 cache that uses independent tag and valid random access memory arrays for cache access
US6625694B2 (en) System and method for allocating a directory entry for use in multiprocessor-node data processing systems
US6378048B1 (en) “SLIME” cache coherency system for agents with multi-layer caches
US7117312B1 (en) Mechanism and method employing a plurality of hash functions for cache snoop filtering
US7325102B1 (en) Mechanism and method for cache snoop filtering
JP3463292B2 (en) Method and system for selecting an alternative cache entry for replacement in response to a conflict between cache operation requests
US8549227B2 (en) Multiprocessor system and operating method of multiprocessor system
JPS6111865A (en) Memory access control system
US5749087A (en) Method and apparatus for maintaining n-way associative directories utilizing a content addressable memory
US6049849A (en) Imprecise method and system for selecting an alternative cache entry for replacement in response to a conflict between cache operation requests
JP3009430B2 (en) Processor and cache memory control method thereof
US6311253B1 (en) Methods for caching cache tags
US20070168639A1 (en) Data processing system and method for selecting a scope of broadcast of an operation by reference to a translation table