JPH06149670A - Methods for controlling cache memory and conversion table - Google Patents

Methods for controlling cache memory and conversion table

Info

Publication number
JPH06149670A
JPH06149670A JP4300189A JP30018992A JPH06149670A JP H06149670 A JPH06149670 A JP H06149670A JP 4300189 A JP4300189 A JP 4300189A JP 30018992 A JP30018992 A JP 30018992A JP H06149670 A JPH06149670 A JP H06149670A
Authority
JP
Japan
Prior art keywords
cache memory
buffer
data
memory
conversion table
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.)
Withdrawn
Application number
JP4300189A
Other languages
Japanese (ja)
Inventor
Takeshi Ibusuki
剛 指宿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP4300189A priority Critical patent/JPH06149670A/en
Publication of JPH06149670A publication Critical patent/JPH06149670A/en
Withdrawn legal-status Critical Current

Links

Abstract

PURPOSE:To improve the hit rate of a cache memory. CONSTITUTION:In a data processor provided with a cache memory 1 and a storage buffer 20 for temporarily storing data in order to purge a prescribed data block from the memory 1 to a main storage device 3 for instance, the data block purged to the buffer 20 are controlled so as to be entered into the memory 1 again in accordance with a new reference request (1). A purge buffer 21 for temporarily storing the data block purged from the memory 1 and not to be transferred to the device 3 is also prepared and controlled so that the data block purged to the buffer 21 after being registered in the memory 1 are entered into the memory 1 again in accordance with the request (1).

Description

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

【0001】[0001]

【産業上の利用分野】近年の、例えば、マイクロプロセ
ッサでは、処理速度をあげるため、主記憶装置へアクセ
スすることを避ける目的で、各種のキャッシュメモリ
(命令キャッシュ、データキャッシュ)、そして各種の
バッファ,テーブル{ストアバッファ、アドレス変換バ
ッファ(TLB) }を備えているのが一般的である。
BACKGROUND OF THE INVENTION In recent years, for example, in microprocessors, various cache memories (instruction cache, data cache) and various buffers are used in order to avoid access to a main memory device in order to increase processing speed. , A table {store buffer, address translation buffer (TLB)} is generally provided.

【0002】然しながら、現実には、これらの機構が十
分に活用されていない問題があり、これらの機構を十分
に活用し、さらにヒット率をあげることが必要である。
However, in reality, there is a problem that these mechanisms are not fully utilized, and it is necessary to fully utilize these mechanisms and further increase the hit rate.

【0003】[0003]

【従来の技術】図4は、従来のキャッシュメモリ制御方
法を説明する図である。キャッシュメモリ 1には、周知
のように、フル・アソシエイティブ方式、セット・アソ
シエイティブ方式があり、現在は、いくつかのセットを
装備したセット・アソシエイティブ方式が一般的であ
る。
2. Description of the Related Art FIG. 4 is a diagram for explaining a conventional cache memory control method. As is well known, the cache memory 1 includes a full associative system and a set associative system, and at present, a set associative system equipped with several sets is general.

【0004】このセット・アソシエイティブ方式では、
あるアドレスの一部をタグとして定義し、それに一致し
たエントリのブロックデータを、所定のラインに登録す
る。たまたま、同じタグを持つ異なるアドレスの要求が
あった場合は、同じ別のセットへ登録するという方式で
ある。
In this set associative system,
A part of a certain address is defined as a tag, and the block data of the entry that matches it is registered in a predetermined line. If there is a request for a different address with the same tag, it is registered in the same different set.

【0005】仮に、図4に示されているように、4つの
セットを具備するキャッシュメモリ1を考えると、同じ
タグを持つ異なる4つのアドレス(図4では、アドレス
1,5,9,249)を同時にキャッシングすることが
可能である。
Assuming a cache memory 1 having four sets as shown in FIG. 4, four different addresses having the same tag (addresses 1, 5, 9, 249 in FIG. 4). Can be cached at the same time.

【0006】この状態で、5つ目のアドレス253に対
するアクセス要求があると、該4つのアドレスの中から
最近使われていないアドレス、例えば、アドレス249
が選ばれて追い出される。このロジックをLRU方式と
呼んでいる。
In this state, when an access request is made to the fifth address 253, an address which has not been used recently among the four addresses, for example, the address 249.
Is selected and kicked out. This logic is called the LRU method.

【0007】該アドレス249のブロックデータが、以
前にストアアクセスのあったもので、その内容が、その
時点で主記憶装置に存在しているデータブロックと変更
されたものであると、該ブロックの内容を主記憶装置の
該当のアドレス領域に戻して、その内容を反映(一致)
させる必要があるが、通常は、即座に主記憶装置に反映
させることはしないで、図示されていない、上記LRU
ロジック回路において、該エントリのブロックデータ
が、ストアアクセスのあったブロックデータであること
が記憶しておいて、上記追い出し要求があったとき、主
記憶装置に反映する必要のあるデータをキューとして保
持しておくためのストアバッファ 20 に一時記憶され、
該ストアバッファ 20 への一時記憶によって、空いたキ
ャッシュメモリのエントリに、上記アクセス要求253
のブロックデータが格納される。
If the block data of the address 249 has been previously accessed for store and its contents have been changed from the data block existing in the main memory at that time, the block data of the block Return the contents to the corresponding address area of the main memory and reflect the contents (match)
However, it is usually not reflected in the main memory immediately, and the above-mentioned LRU not shown is shown.
In the logic circuit, it is stored that the block data of the entry is the block data that has been accessed for store, and when the eviction request is made, the data that needs to be reflected in the main memory is held as a queue. It is temporarily stored in store buffer 20 for
Due to the temporary storage in the store buffer 20, the access request 253 is made to the empty cache memory entry.
The block data of is stored.

【0008】このようにして、該データブロック249
が追い出された空きエントリに、上記5番目の要求アド
レス253のブロックデータがキャッシングされること
になる。
In this way, the data block 249
Thus, the block data of the fifth request address 253 is cached in the empty entry that has been evicted.

【0009】このストアバッファ 20 への書き込みは、
FIFO(First In First out)方式であり、この書き
込みキュー (ストアバッファ) 20から追い出される時
に、初めて、主記憶装置 3に書き込まれる。
Writing to the store buffer 20
It is a FIFO (First In First Out) method, and when it is ejected from the write queue (store buffer) 20, it is written into the main storage device 3 for the first time.

【0010】あるブロックデータが、上記書き込みキュ
ー (ストアバッファ) 20にある間に、中央処理装置(CP
U) 4 が、このブロックデータ(249)のアドレスを
参照した場合、キャッシュメモリ 1のミス・ヒットを経
た後に、該書き込みキュー (ストアバッファ) 20を参照
することで、より高速なデータ・アクセスを実現してい
る。
While a certain block data is in the write queue (store buffer) 20, the central processing unit (CP
When U) 4 refers to the address of this block data (249), a faster data access is possible by referring to the write queue (store buffer) 20 after the miss hit of the cache memory 1. Has been realized.

【0011】[0011]

【発明が解決しようとする課題】然して、かかる、従来
のキャッシュメモリ制御方法では、一旦書き込みキュー
(ストアバッファ) に追い出されたブロックデータは、
その書き込みキュー (ストアバッファ) が一杯になる
と、主記憶装置に追い出される。
However, in such a conventional cache memory control method, once the write queue is
The block data flushed to (Store Buffer) is
When its write queue (store buffer) is full, it is flushed to main memory.

【0012】従って、中央処理装置(CPU) 4 からの参照
要求があると分かった後も、該書き込みキュー (ストア
バッファ) 20がFIFO方式であるため、いずれ主記憶
装置3に追い出されることになる。
Therefore, even after it is found that there is a reference request from the central processing unit (CPU) 4, since the write queue (store buffer) 20 is of the FIFO type, it will eventually be evicted to the main storage unit 3. .

【0013】主記憶装置 3に追い出された後に、中央処
理装置(CPU) 4 がそのアドレスを参照すると、再度、該
主記憶装置 3をアクセスしキャッシングしなければなら
ないため、データ・アクセスに余分な時間がかかること
になる。
When the central processing unit (CPU) 4 refers to the address after the data is evicted to the main storage device 3, the main storage device 3 must be accessed and cached again. It will take time.

【0014】本発明は上記従来の欠点に鑑み、キャッシ
ュメモリから追い出されたブロックデータが、ストアバ
ッファ等に一時蓄積されていることに着目し、該ストア
バッファに、追い出されて一時蓄積されているブロック
データを、再度、キャッシュメモリにキャッシングする
ことで、キャッシュメモリのヒット率を向上させること
ができるキャッシュメモリ制御方法を提供することを目
的とするものである。
In view of the above-mentioned conventional drawbacks, the present invention focuses on the fact that the block data expelled from the cache memory is temporarily stored in the store buffer or the like, and is expelled and temporarily stored in the store buffer. An object of the present invention is to provide a cache memory control method capable of improving the hit rate of the cache memory by caching the block data again in the cache memory.

【0015】[0015]

【課題を解決するための手段】図1は、本発明の原理説
明図である。上記の問題点は下記の如くに構成したキャ
ッシュメモリ制御方法によって解決される。
FIG. 1 is a diagram for explaining the principle of the present invention. The above problems can be solved by the cache memory control method configured as follows.

【0016】(1) キャッシュメモリ 1と、該キャッシュ
メモリ 1から主記憶装置 3に、所定のデータブロックを
追い出すための一時記憶を行うストアバッファ 20 とを
備えたデータ処理装置において、一旦、キャッシュメモ
リ 1に登録された後、上記ストアバッファ 20 に追い出
されたデータブロックを、新たな参照要求に応じて、
再度、キャッシュメモリ1に取り込むように制御する。
(1) In a data processing device provided with a cache memory 1 and a store buffer 20 for temporarily storing a predetermined data block from the cache memory 1 to the main storage device 3, After being registered in 1, the data block evicted in the store buffer 20 above is
The control is again performed so that the cache memory 1 is loaded.

【0017】(2) 上記データ処理装置に、上記キャッシ
ュメモリ 1から追い出され、主記憶装置 3にも転送しな
いデータブロック、例えば、ストアアクセスもなく、且
つ、最近使用されていなくて、上記LRU論理に基づい
て、追い出されるブロックデータを一時記憶する追い出
しバッファ 21 を備えて、一旦、該キャッシュメモリ 1
に登録された後、上記追い出しバッファ 21 に追い出さ
れたデータブロックを、新たな参照要求に応じて、再
度、キャッシュメモリ 1に取り込むように制御する。
(2) The data processing device has a data block evicted from the cache memory 1 and not transferred to the main memory device 3, for example, there is no store access and it is not recently used, and the LRU logic is not used. Equipped with a flush buffer 21 for temporarily storing the block data to be flushed based on
After being registered in the cache memory 1, the data block flushed to the flush buffer 21 is controlled to be fetched again in the cache memory 1 in response to a new reference request.

【0018】(3) 所定の変換テーブルを備えたデータ処
理装置において、該変換テーブルから追い出された変換
テーブルを一時記憶しておく、ストアバッファ, 又は、
追い出しバッファを備えて、一旦、該変換テーブルに登
録された後、上記ストアバッファ, 又は、追い出しバッ
ファに追い出された変換データを、新たな参照要求に応
じて、再度、該変換テーブルに取り込むように制御す
る。
(3) In a data processing device equipped with a predetermined conversion table, the conversion table expelled from the conversion table is temporarily stored, a store buffer, or
With the eviction buffer, once registered in the conversion table, the store buffer or the eviction buffer converted data is fetched into the conversion table again in response to a new reference request. Control.

【0019】[0019]

【作用】即ち、本発明においては、前述の問題点を解決
するために、書き込みキュー (ストアバッファ) にある
ブロックデータに、中央処理装置(CPU) が、新たに参照
要求を出した場合、再度、キャッシュメモリにキャッ
シングするという制御方法を取る。
That is, in the present invention, in order to solve the above-mentioned problems, when the central processing unit (CPU) issues a new reference request to block data in the write queue (store buffer), , Take a control method of caching in the cache memory.

【0020】本発明の原理を説明するための機構を、図
1を使用して説明する。ここで、キャッシュメモリは4
つのセットを持ち、それがフルになった状態で、さらに
同じタグをもつエントリの登録要求があると、周知のL
RU(Least Recently Used)ロジックでリプレースを起
こすことを前提とする。
A mechanism for explaining the principle of the present invention will be described with reference to FIG. Here, the cache memory is 4
If there is a request to register an entry that has two sets and is full, and has the same tag, the well-known L
It is premised that replacement is caused by RU (Least Recently Used) logic.

【0021】図示されていない中央処理装置(CPU) か
ら、主記憶装置の、例えば、アドレス249,1,5,
9の順で、各アドレスのブロックデータが参照され、ア
ドレス249のブロックデータに書き込みアクセスがあ
って、該アドレス249のブロックデータが、図示され
ていないLRU論理回路に記憶された後、ある時点で、
アドレス253に対するアクセスがあって、ミスヒット
し、上記LRUロジックにより、該アドレス249のブ
ロックデータが、最近、最も使用されていないブロック
として、追い出され、ストアバッファ 20 にキューイン
グされた時の、該キャッシュメモリの状態を、図1のキ
ャッシュメモリのライン 10a,10bと、ストアバッファ 2
0 で表現している。
From a central processing unit (CPU) (not shown), for example, addresses 249, 1, 5, and 5 in the main storage device.
In the order of 9, the block data of each address is referred to, the block data of the address 249 is accessed for writing, and the block data of the address 249 is stored in an LRU logic circuit (not shown). ,
When there is an access to the address 253 and there is a mishit, the LRU logic causes the block data of the address 249 to be ejected as the least recently used block and queued in the store buffer 20. The state of the cache memory is shown in FIG. 1 with lines 10a and 10b of the cache memory and the store buffer 2
It is expressed as 0.

【0022】該ブロックデータ249は、書き込みバッ
ファのエントリ数にも依存するが、いずれ追い出され、
主記憶装置に書き込まれる運命にある。この状態で、中
央処理装置(CPU) が、該ブロックデータ249を参照
すると、一旦、キャッシュメモリ 1を検索し、ミス・ヒ
ットを確認する。
The block data 249 depends on the number of entries in the write buffer, but is eventually ejected.
Destined to be written to main memory. In this state, when the central processing unit (CPU) refers to the block data 249, it once searches the cache memory 1 and confirms a miss hit.

【0023】この時に、すべてのセットが使用状態{例
えば、各エントリのバリッドビットが“オン”}である
ことを確認すると、該LRUロジックで、次に置き換え
るべきエントリの番号(本例では、“2”)を、例え
ば、リプレースレジスタ 11 に記憶しておく。
At this time, when it is confirmed that all the sets are in use (eg, the valid bit of each entry is "on"), the LRU logic determines the number of the entry to be replaced next (in this example, " 2 ″) is stored in the replace register 11, for example.

【0024】従来技法では、本LRUロジックは、主記
憶装置から新たなブロックデータをキャッシュメモリに
キャッシングする際にのみ働いていたが、上記ロジック
{リプレースレジスタ 11 に、次の置き換えエントリの
番号を記憶するロジック}を、上記ミス・ヒットを確認
した時点に導入することで、後で発生するキャッシング
処理での置き換えプロセスが簡単になる。
In the conventional technique, this LRU logic worked only when caching new block data from the main storage device into the cache memory. However, the above logic {replacement register 11 stores the number of the next replacement entry. Introducing the logic to perform a mistake hit at the time when the above-mentioned miss hit is confirmed, the replacement process in the caching process that occurs later becomes simple.

【0025】キャッシュ・ミスが起きると、次に、書き
込みキュー (ストアバッファ) 20を検索にいくが、ここ
に目的のブロックデータのアドレスを見付けると(従来
は、このデータを、主記憶装置に伝えるだけであった)
、本発明では、上記の処理でリプレースレジスタ 11
に記憶しておいたエントリの内容と、該書き込みキュー
(ストアバッファ) 20に記憶されている目的のブロック
データとを置き換える (リプレースする) ように動作す
る。
When a cache miss occurs, the write queue (store buffer) 20 is searched next, but when the address of the target block data is found here (in the past, this data is transmitted to the main storage device). Was only)
In the present invention, the replacement register 11
The contents of the entry stored in
(Store buffer) Operates to replace (replace) the target block data stored in 20.

【0026】上記の例は、書き込みキュー (ストアバッ
ファ) に追い出されたブロックデータを、次の中央処理
装置(CPU) からの参照時に、キャッシュメモリに、再
度、キャッシングする例で説明したが、該書き込みのあ
ったブロックデータではなくて、最近使用されてなく、
上記LRUロジックで、該キャッシュメモリから追い出
されるブロックデータを、例えば、キュー構造の追い出
しバッファに記憶しておき、中央処理装置(CPU) から
の、該新たな参照で、ミス・ヒットとなり、該追い出
しバッファを検索して、目的のブロックデータが検出さ
れたとき、該追い出しバッファに一時記憶されている、
該目的のブロックデータを、再度、キャッシュメモリに
キャッシングするようにしてもよいことはいう迄もない
ことである。
In the above example, the block data expelled to the write queue (store buffer) is cached again in the cache memory when the next central processing unit (CPU) refers to it. Not the block data that was written, not recently used,
In the LRU logic, block data to be evicted from the cache memory is stored in, for example, an evacuation buffer having a queue structure, and a new reference from the central processing unit (CPU) causes a miss hit, and the evicting is performed. When the target block data is detected by searching the buffer, it is temporarily stored in the eviction buffer,
It goes without saying that the target block data may be cached in the cache memory again.

【0027】上記はキャッシュメモリを例にして説明し
ているが、アドレス変換バッファ(TLB) 等に見られる変
換テーブルといった記憶バッファにも適用できることは
明らかである。
Although the above description has been made by taking a cache memory as an example, it is obvious that the present invention can be applied to a storage buffer such as a translation table found in an address translation buffer (TLB).

【0028】従って、ある一時期に不要になり、キャッ
シュメモリから追い出したアドレスのブロックデータ
を、再びキャッシングすることで、中央処理装置(CPU)
からのアクセス要求に対して、高速に応答できる効果が
得られ、ヒット率を向上させることができる。
Therefore, the central processing unit (CPU) is re-cached by re-caching the block data of the address which becomes unnecessary in a certain period of time and is flushed from the cache memory.
It is possible to obtain a high-speed response to an access request from the device and improve the hit rate.

【0029】[0029]

【実施例】以下本発明の実施例を図面によって詳述す
る。前述の図1が、本発明の原理説明図であり、図2は
本発明の一実施例を模式的に示した図であり、図3は、
本発明の一実施例を流れ図で示した図である。
Embodiments of the present invention will be described in detail below with reference to the drawings. FIG. 1 described above is a diagram for explaining the principle of the present invention, FIG. 2 is a diagram schematically showing an embodiment of the present invention, and FIG.
It is the figure which showed one Example of this invention with the flowchart.

【0030】本発明においては、キャッシュメモリ 1
と、該キャッシュメモリ 1から主記憶装置 3に、所定の
データブロックを追い出すための一時記憶を行うストア
バッファ 20 とを備えたデータ処理装置において、一
旦、キャッシュメモリ 1に登録された後、上記ストアバ
ッファ 20 に追い出されたデータブロックを、新たな参
照要求に応じて、再度、キャッシュメモリ 1に取り込
むように制御する。又、該キャッシュメモリ 1から追い
出され、主記憶装置 3にも返送しないデータブロックを
一時記憶する追い出しバッファ 21 を備えて、一旦、キ
ャッシュメモリ 1に登録された後、上記追い出しバッフ
ァ 21 に追い出されたデータブロックを、新たな参照要
求に応じて、再度、キャッシュメモリ 1に取り込むよ
うに制御する手段が、本発明を実施するのに必要な手段
である。尚、全図を通して同じ符号は同じ対象物を示し
ている。
In the present invention, the cache memory 1
And a store buffer 20 for temporarily storing a predetermined data block from the cache memory 1 to the main memory device 3, the data processing device is temporarily stored in the cache memory 1 and then stored. The data block evicted in the buffer 20 is controlled to be fetched again in the cache memory 1 in response to a new reference request. Further, it is equipped with a eviction buffer 21 for temporarily storing a data block that is evicted from the cache memory 1 and is not returned to the main memory device 3. A means for controlling the data block to be fetched again in the cache memory 1 in response to a new reference request is a means necessary for implementing the present invention. The same reference numerals indicate the same objects throughout the drawings.

【0031】以下、図1を参照しながら、図2,図3に
よって、本発明のキャッシュメモリ制御方法を説明す
る。図2において、4 は中央処理装置(CPU) 、15はキャ
ッシュメモリ 1, および、ストアバッファ 20 から目的
のブロックデータを検索する比較器、1 は、上記キャッ
シュメモリ、20は上記ストアバッファ、11は、キャッシ
ュメモリ 1の置き換え先のエントリ番号を格納するレジ
スタ(リプレースレジスタと呼ぶ)、3 は主記憶装置で
ある。
The cache memory control method of the present invention will be described below with reference to FIGS. 2 and 3 with reference to FIG. In FIG. 2, 4 is a central processing unit (CPU), 15 is a cache memory 1, and a comparator that retrieves target block data from a store buffer 20, 1 is the cache memory, 20 is the store buffer, and 11 is the store buffer. , A register that stores the entry number of the replacement destination of the cache memory 1 (called a replace register), and 3 is a main memory device.

【0032】リプレースレジスタ 11 には、キャッシュ
のエントリ番号{図4に示すキャッシュメモリの各ライ
ンに対して、同じタグアドレスを持つ、異なるアドレス
の各ブロックデータのアドレス1、2..256が格納
されているエントリのアドレスを意味し、キャッシュメ
モリのエントリ・アドレスと言換えることが出来る。)
を格納する。
The replace register 11 has a cache entry number (for each line of the cache memory shown in FIG. 4, addresses 1, 2 ,. . 256 means the address of the stored entry, which can be translated into the entry address of the cache memory. )
To store.

【0033】1) 図1に示すように、既に、中央処理装
置(CPU) 4 が、同じタグを持つアドレス249、1、
5、9、253を順にアクセスしたところから話をすす
める。この時点では、従来技術の欄で説明したように、
アドレス249のブロックデータは書き込みキュー (ス
トアバッファ) 20に追い出されている。
1) As shown in FIG. 1, the central processing unit (CPU) 4 already has addresses 249, 1,
I will begin the discussion by accessing 5, 9, and 253 in order. At this point, as explained in the prior art section,
The block data at the address 249 has been pushed out to the write queue (store buffer) 20.

【0034】2) 図2の中央処理装置(CPU) 4 が、再
度、アドレス249を参照にいくと、図2の上記比較
器 15 は、先ず、最初に、キャッシュメモリ 1を検索に
行く。この時、同時に、空のエントリを検出したなら、
そのエントリ番号を、上記リプレースレジスタ 11 に登
録しておく。
2) When the central processing unit (CPU) 4 of FIG. 2 again refers to the address 249, the comparator 15 of FIG. 2 first searches the cache memory 1. At this time, if an empty entry is detected at the same time,
Register the entry number in the replace register 11 above.

【0035】空がない場合は、LRUロジックで、次に
追い出すエントリ番号を決定し、同様に、該リプレース
レジスタ 11 に登録する。{図3の処理ステップ 100,1
01参照} キャッシュメモリ 1に、目的のアドレス249のブロッ
クデータが見つかった場合は、中央処理装置(CPU) 4 に
通知して処理を終える。{図3の処理ステップ100,104
参照} 3) キャッシュメモリ 1に目的のアドレス249のブロ
ックデータが見つからないない場合は、引き続き書き込
みバッファ(ストアバッファ)20を検索する。{図3の
処理ステップ 102参照} 4) 書き込みバッファ (ストアバッファ) 20にも、目的
のアドレス249のブロックデータが見つからないない
場合は、主記憶装置 3から、目的のアドレスのブロック
データを読込み、上記リプレースレジスタ 11 が指すキ
ャッシュメモリ1内のエントリを、例えば、書き込みバ
ッフア (ストアバッファ) 20に追い出し{もし、そのエ
ントリ内のブロックデータが、上記LRUロジックで、
書き換えのあったブロックデータであることが記憶され
ていなければ、該書き込みバッファへの追い出しは必要
ない}、主記憶装置 3から獲得したブロックデータを、
該キャッシュメモリ 1に登録し処理を終える。
If there is no empty space, the LRU logic determines the entry number to be ejected next, and similarly registers it in the replace register 11. {Processing steps 100,1 in FIG. 3
When the block data of the target address 249 is found in the cache memory 1, the central processing unit (CPU) 4 is notified and the processing is terminated. {Processing steps 100 and 104 in FIG.
Reference} 3) If the target block data of the address 249 is not found in the cache memory 1, the write buffer (store buffer) 20 is continuously searched. {Refer to processing step 102 in FIG. 3} 4) If the block data of the target address 249 is not found in the write buffer (store buffer) 20, the block data of the target address is read from the main memory 3, The entry in the cache memory 1 pointed to by the replace register 11 is evicted to, for example, the write buffer (store buffer) 20 {if the block data in the entry is the LRU logic,
If it is not stored that the block data has been rewritten, it is not necessary to flush it to the write buffer}.
Register in the cache memory 1 and finish the process.

【0036】5) 書き込みバッファ (ストアバッファ)
20に、目的のアドレスのブロックデータを見つけた場合
は、本発明においては、上記リプレースレジスタ 11 が
指すキャッシュメモリ 1内のエントリデータと、上記書
き込みバッフア (ストアバッファ) 20内エントリのデー
タを置き換える (リプレースする) 。{図3の処理ステ
ップ 103参照} 6) 上記 2) の処理において、リプレースレジスタ 11
に登録されるエントリのブロックデータが、中央処理装
置(CPU) 1 から書き換えられていなくて、上記LRUロ
ジックで、書き換えのあったブロックデータであること
が記憶されていない場合、本発明においては、上記書き
込みバッファ (ストアバッファ) 20ではなくて、追い出
しバッファ 21 に追い出して記憶しておく。
5) Write buffer (store buffer)
If the block data of the target address is found in 20, the entry data in the cache memory 1 pointed to by the replace register 11 and the entry data in the write buffer (store buffer) 20 are replaced in the present invention ( Replace). {Refer to processing step 103 in FIG. 3} 6) In the processing of 2) above, the replace register 11
In the present invention, when the block data of the entry registered in is not rewritten from the central processing unit (CPU) 1 and it is not stored in the LRU logic as the rewritten block data, Instead of using the write buffer (store buffer) 20 described above, the data is evicted and stored in the ejection buffer 21.

【0037】7) そして、中央処理装置(CPU) 4 からの
アクセスで参照されたアドレスのブロックデータが、
キャッシュメモリ 1には存在しなくて (即ち、ミスヒッ
ト)、該追い出しバッファ 21 に記憶されていることが
検出された場合、上記、書き込みバッファ (ストアバッ
ファ) 20の場合と同様にして、再度、リプレースレジス
タ 11 が指すキャッシュメモリ 1内のエントリデータ
と、上記追い出しバッファ 21 内のエントリデータとを
置き換えるようにすることで、書き込みバッファ(スト
アバッファ) 20の場合と同様の効果をあげることができ
る。
7) Then, the block data of the address referred to by the access from the central processing unit (CPU) 4 is
When it is detected that the cache memory 1 does not exist (that is, a mishit) and is stored in the eviction buffer 21, it is re-executed in the same manner as the case of the write buffer (store buffer) 20. By replacing the entry data in the cache memory 1 pointed to by the replace register 11 with the entry data in the eviction buffer 21, the same effect as that of the write buffer (store buffer) 20 can be obtained.

【0038】尚、上記の実施例では、中央処理装置(CP
U) 4 からのアクセス要求があって、キャッシュメモリ
の図示されていないタグメモリを検索して、ミスヒット
で、空きのエントリが見つかったとき、或いは、空きが
なくて、上記LRUロジックで、最近、最も使用されて
いないブロックデータがキャッシングされているエント
リが検知されたとき、該エントリ番号をリプレースレジ
スタ 11 に登録しておき、実際に、主記憶装置 3からの
ムーブインされたブロックデータとリプレースすると
き、該リプレースレジスタ 11 に登録されているエント
リと置き換えることで、該リプレース処理を簡単に行う
例で説明しているが、これに限るものではなく、周知の
ように、実際に主記憶装置 3にムーブイン要求を出した
時点で、該リプレースエントリを検知して、主記憶装置
3からのムーブインされたブロックデータとリプレース
する方法 (即ち、リプレースレジスタ 11 を備えていな
い方法) のものであってもよいことはいう迄もないこと
である。
In the above embodiment, the central processing unit (CP
U) When there is an access request from 4, the tag memory (not shown) in the cache memory is searched, and when a free entry is found due to a mishit, or when there is no free space, the LRU logic described above , When an entry in which the least used block data is cached is detected, the entry number is registered in the replace register 11 and is actually replaced with the move-in block data from the main memory 3. At this time, an example in which the replacement process is simply performed by replacing the entry registered in the replacement register 11 has been described, but the present invention is not limited to this, and as is well known, the main storage device 3 is actually used. When a move-in request is issued to the main memory device, the replace entry is detected and
It goes without saying that it may be the method of replacing the block data moved in from 3 (that is, the method without the replace register 11).

【0039】尚、本実施例では、キャッシュメモリを引
用したが、他にも、例えば、アドレス変換バッファ (T
LB) に見られる変換テーブルの記憶バッファにも適用
可能である。
In this embodiment, the cache memory is cited, but in addition, for example, the address translation buffer (T
It is also applicable to the storage buffer of the conversion table found in LB).

【0040】この場合には、例えば、アドレス変換バッ
ファ(TLB) を備えたデータ処理装置において、該アドレ
ス変換バッファ(TLB) から追い出されたアドレス変換デ
ータを一時記憶しておく、ストアバッファ, 又は、追い
出しバッファを備えて、一旦、該アドレス変換バッファ
登録された後、上記ストアバッファ, 又は、追い出しバ
ッファに追い出された変換データを、新たな参照要求に
応じて、再度、該アドレス変換バッファに取り込むよう
に制御することになる。
In this case, for example, in a data processing device having an address translation buffer (TLB), the address translation data expelled from the address translation buffer (TLB) is temporarily stored, a store buffer, or With the eviction buffer, once the address translation buffer is registered, the conversion data evicted in the store buffer or the eviction buffer is fetched again in the address translation buffer in response to a new reference request. Will be controlled.

【0041】このように、本発明は、キャッシュメモリ
と、該キャッシュメモリから主記憶装置に、所定のデー
タブロックを追い出すための一時記憶を行うストアバッ
ファとを備えたデータ処理装置において、一旦、キャッ
シュメモリに登録された後、上記ストアバッファに追い
出されたデータブロックを、新たな参照要求に応じ
て、再度、キャッシュメモリに取り込むように制御す
る。又、該キャッシュメモリから追い出され、主記憶装
置にも返送しないデータブロックを一時記憶する追い出
しバッファを備えて、一旦、キャッシュメモリに登録さ
れた後、上記追い出しバッファに追い出されたデータブ
ロックを、新たな参照要求に応じて、再度、キャッシ
ュメモリに取り込むように制御するようにしたところに
特徴がある。
As described above, according to the present invention, the cache is temporarily stored in the data processor provided with the cache memory and the store buffer for temporarily storing a predetermined data block from the cache memory to the main memory. After the data block is registered in the memory, the data block flushed to the store buffer is controlled to be fetched again in the cache memory in response to a new reference request. In addition, a data buffer that is temporarily stored in the cache memory and that is not stored in the main memory is stored in the cache memory. It is characterized in that it is controlled so that the cache memory is loaded again in response to such a reference request.

【0042】[0042]

【発明の効果】以上、詳細に説明したように、本発明
の、例えば、キャッシュメモリ制御方法によれば、同一
タグで、かつ異なるアドレスへのアクセスが実装セット
数を超えても、書き込みバッファ, 或いは、追い出しバ
ッファからの再登録を可能とすることで、該キャッシュ
メモリのヒット率を高めることができる。
As described above in detail, according to the cache memory control method of the present invention, for example, even when the number of accesses to the same tag and different addresses exceeds the number of mounted sets, the write buffer, Alternatively, by enabling re-registration from the eviction buffer, the hit rate of the cache memory can be increased.

【0043】又、前述のように、アドレス変換バッファ
(TLB) 等の変換テーブルから、一時追い出された変換デ
ータについても、本発明の構成をとっておくことによ
り、該アドレス変換バッファ(TLB) でのヒット率を向上
させることができる。
Further, as described above, the address translation buffer
By using the configuration of the present invention even for the conversion data temporarily displaced from the conversion table such as (TLB), the hit rate in the address conversion buffer (TLB) can be improved.

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

【図1】本発明の原理説明図FIG. 1 is an explanatory view of the principle of the present invention.

【図2】本発明の一実施例を模式的に示した図FIG. 2 is a diagram schematically showing an embodiment of the present invention.

【図3】本発明の一実施例を流れ図で示した図FIG. 3 is a flowchart showing an embodiment of the present invention.

【図4】従来のキャッシュメモリ制御方法を説明する図FIG. 4 is a diagram illustrating a conventional cache memory control method.

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

1 キャッシュメモリ 10a,10b キャ
ッシュメモリの各ライン 20 ストアバッファ (書き込みキュー) 21 追い出しバッファ 3 主記憶装置 4 中央処理装
置(CPU) 中央処理装置(CPU) からの参照要求 100 〜105 処理ステップ
1 cache memory 10a, 10b each line of cache memory 20 store buffer (write queue) 21 eviction buffer 3 main memory 4 central processing unit (CPU) reference request from central processing unit (CPU) 100 to 105 processing steps

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】キャッシュメモリ(1) と、該キャッシュメ
モリ(1) から主記憶装置(3) に、所定のデータブロック
を追い出すための一時記憶を行うストアバッファ(20)と
を備えたデータ処理装置において、 一旦、キャッシュメモリ(1) に登録された後、上記スト
アバッファ(20)に追い出されたデータブロックを、新た
な参照要求 () に応じて、再度、キャッシュメモリ
(1) に取り込むように制御することを特徴とするキャッ
シュメモリ制御方法。
1. Data processing comprising: a cache memory (1); and a store buffer (20) for temporarily storing a predetermined data block from the cache memory (1) to a main storage device (3). In the device, the data block that was once registered in the cache memory (1) and then ejected to the store buffer (20) is re-registered in the cache memory in response to a new reference request ().
A method for controlling a cache memory, characterized in that the control is performed so as to be taken into (1).
【請求項2】上記データ処理装置に、上記キャッシュメ
モリ(1) から追い出され、主記憶装置(3) にも転送しな
いデータブロックを一時記憶する追い出しバッファ(21)
を備えて、 一旦、該キャッシュメモリ(1) に登録された後、上記追
い出しバッファ(21)に追い出されたデータブロックを、
新たな参照要求 () に応じて、再度、キャッシュメモ
リ(1) に取り込むように制御することを特徴とするキャ
ッシュメモリ制御方法。
2. A eviction buffer (21) for temporarily storing, in the data processing device, a data block that is evicted from the cache memory (1) and is not transferred to the main memory (3).
The data block that has been ejected to the evicting buffer (21) after being registered in the cache memory (1),
According to a new reference request (), the cache memory control method is characterized in that the cache memory (1) is controlled to be fetched again.
【請求項3】所定の変換テーブルを備えたデータ処理装
置において、該変換テーブルから追い出された変換テー
ブルを一時記憶しておく、ストアバッファ,又は、追い
出しバッファを備えて、 一旦、該変換テーブルに登録された後、上記ストアバッ
ファ,又は、追い出しバッファに追い出された変換デー
タを、新たな参照要求に応じて、再度、該変換テーブル
に取り込むように制御することを特徴とする変換テーブ
ル制御方法。
3. A data processing device provided with a predetermined conversion table, which is provided with a store buffer or an eviction buffer for temporarily storing the conversion table expelled from the conversion table. A conversion table control method, characterized in that the conversion data, which has been registered and then has been evicted in the evacuation buffer, is controlled so as to be fetched again in the conversion table in response to a new reference request.
JP4300189A 1992-11-11 1992-11-11 Methods for controlling cache memory and conversion table Withdrawn JPH06149670A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4300189A JPH06149670A (en) 1992-11-11 1992-11-11 Methods for controlling cache memory and conversion table

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4300189A JPH06149670A (en) 1992-11-11 1992-11-11 Methods for controlling cache memory and conversion table

Publications (1)

Publication Number Publication Date
JPH06149670A true JPH06149670A (en) 1994-05-31

Family

ID=17881809

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4300189A Withdrawn JPH06149670A (en) 1992-11-11 1992-11-11 Methods for controlling cache memory and conversion table

Country Status (1)

Country Link
JP (1) JPH06149670A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100460142B1 (en) * 2002-07-09 2004-12-03 삼성전자주식회사 Optimum Method for Reference of Cache Memory
WO2013108380A1 (en) * 2012-01-18 2013-07-25 株式会社日立製作所 Segment allocation management system and method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100460142B1 (en) * 2002-07-09 2004-12-03 삼성전자주식회사 Optimum Method for Reference of Cache Memory
WO2013108380A1 (en) * 2012-01-18 2013-07-25 株式会社日立製作所 Segment allocation management system and method

Similar Documents

Publication Publication Date Title
US5353426A (en) Cache miss buffer adapted to satisfy read requests to portions of a cache fill in progress without waiting for the cache fill to complete
US5577227A (en) Method for decreasing penalty resulting from a cache miss in multi-level cache system
US5339399A (en) Cache controller that alternately selects for presentation to a tag RAM a current address latch and a next address latch which hold addresses captured on an input bus
US5361391A (en) Intelligent cache memory and prefetch method based on CPU data fetching characteristics
US4853846A (en) Bus expander with logic for virtualizing single cache control into dual channels with separate directories and prefetch for different processors
US7167954B2 (en) System and method for caching
TWI393050B (en) Memory device and method with on-board cache system for facilitating interface with multiple processors, and computer system using same
KR20010101693A (en) Techniques for improving memory access in a virtual memory system
JPH06243039A (en) Method for operating order in cache memory system and microprocessor unit
JPH08202620A (en) High-speed data access system
US20100217937A1 (en) Data processing apparatus and method
US8621152B1 (en) Transparent level 2 cache that uses independent tag and valid random access memory arrays for cache access
US20100185831A1 (en) Semiconductor integrated circuit and address translation method
US5530823A (en) Hit enhancement circuit for page-table-look-aside-buffer
US5897651A (en) Information handling system including a direct access set associative cache and method for accessing same
US5367659A (en) Tag initialization in a controller for two-way set associative cache
JPH10214226A (en) Method and system for strengthening memory performance of processor by removing old line of second level cache
JPS6111865A (en) Memory access control system
US5737575A (en) Interleaved key memory with multi-page key cache
EP0543487B1 (en) Method and cache memory controller for fetching data for a CPU that further reduces CPU idle time
US5367657A (en) Method and apparatus for efficient read prefetching of instruction code data in computer memory subsystems
US20040024967A1 (en) Reducing tag-ram accesses and accelerating cache operation during cache miss
US6976130B2 (en) Cache controller unit architecture and applied method
JPH06149670A (en) Methods for controlling cache memory and conversion table
JPH0573415A (en) Hierarchized cache system

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20000201