JPH04308945A - Cache memory device - Google Patents

Cache memory device

Info

Publication number
JPH04308945A
JPH04308945A JP3073328A JP7332891A JPH04308945A JP H04308945 A JPH04308945 A JP H04308945A JP 3073328 A JP3073328 A JP 3073328A JP 7332891 A JP7332891 A JP 7332891A JP H04308945 A JPH04308945 A JP H04308945A
Authority
JP
Japan
Prior art keywords
port
way
cache
cache memory
selecting
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
JP3073328A
Other languages
Japanese (ja)
Inventor
Kenji Takeda
武田 謙治
Mitsuo Saito
光男 斎藤
Takeshi Aikawa
健 相川
Kenji Minagawa
皆川 健二
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP3073328A priority Critical patent/JPH04308945A/en
Publication of JPH04308945A publication Critical patent/JPH04308945A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To simultaneously process plural refiles by providing a selecting means which selects a way to be refiled according to selection information outputted from an updating means. CONSTITUTION:At the time of the refine of a cache memory, an updating circuit 5 updates information for selecting the way to be refiled from among the plural ways set at each cache memory of the plural cache memories by a way selecting circuit 3, during the pertinent refile. Then, the way to be refiled is selected by the way selecting circuit 3 according to this selection information. For example, at a port O side, a port 0 side reference way code being a way code in the case that an access at the port 0 side is cache-hit, and a replacement way code outputted from a decode circuit 7A, and replaced with an LRU algorithm in the case the access is cache-missed, are inputted to the port 0 side way selecting circuit 3A. Then, the way is selected by a hit signal at the port 0 side and a miss signal at the port 0 side.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】[発明の目的][Object of the invention]

【0002】0002

【産業上の利用分野】本発明はキャッシュメモリ装置に
関し、特に複数のリフィル要求を同時に処理するキャッ
シュメモリ装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a cache memory device, and more particularly to a cache memory device that simultaneously processes a plurality of refill requests.

【0003】0003

【従来の技術】近年、コンピュータシステムにおいては
、主記憶装置のアクセス時間の短縮を目的として、CP
Uと主記憶装置との間に設けられるキャッシュメモリ装
置が広く用いられるに至っている。このキャッシュメモ
リ装置は主記憶装置よりもアクセス時間が短く、小容量
のキャッシュメモリを複数用いて構成されており、主記
憶装置の内容の一部をキャッシュメモリ装置中に保持す
ることにより、主記憶装置へのアクセスをキャッシュメ
モリ装置へのアクセスで置き換え、主記憶中のデータへ
のアクセス時間の短縮を図るものである。
[Prior Art] In recent years, in computer systems, CP
A cache memory device provided between the U and the main storage device has come to be widely used. This cache memory device has a shorter access time than the main memory device, and is configured using multiple small-capacity cache memories.By retaining part of the contents of the main memory device in the cache memory device, the main memory Access to the device is replaced with access to the cache memory device, thereby reducing the time required to access data in main memory.

【0004】0004

【発明が解決しようとする課題】しかしながら、上述し
た従来のキャッシュメモリ装置は、リフィル要求が同時
に複数発生するコンピュータシステム等に導入した場合
、不具合が発生することがある。例えば、同時に発生す
るリフィル要求のうち、任意の2つのリフィル要求が同
じセットアドレスを持ち、リフィル時に置換すべきウェ
イを決定するアルゴリズムとして、LRU(Least
  Recently  Used)アルゴリズムが用
いられている場合を仮定する。このLRUアルゴリズム
の場合には、最も古くに参照されたウェイが置換すべき
ウェイとして選択されため、従来の先のリフィル終了後
に当該データを参照してLRU情報を変更する方式では
、リフィルが同時に発生した場合に、参照されるLRU
情報が変更されるまでに後続するリフィルが行われる事
になる。
However, when the above-described conventional cache memory device is introduced into a computer system or the like in which a plurality of refill requests occur simultaneously, problems may occur. For example, among refill requests that occur simultaneously, if any two refill requests have the same set address, LRU (Least
Assume that the ``Recently Used'' algorithm is used. In the case of this LRU algorithm, the oldest referenced way is selected as the way to be replaced, so in the conventional method of changing the LRU information by referring to the data after the previous refill is completed, the refill occurs at the same time. The referenced LRU when
Subsequent refills will be performed before the information is changed.

【0005】したがって、上記のように同時に発生する
リフィル要求が、同じセットアドレスを持つ場合には、
同一のウェイが選択され、その結果として、先にリフィ
ルされたデータがキャッシュ中に残らなかったり、ある
いは2つのリフィルの結果、共にキャッシュメモリ中に
データが残るようにするためにリフィルを無限に繰り返
すことになる。
[0005] Therefore, if refill requests that occur simultaneously as described above have the same set address,
The same way is selected, so that the previously refilled data does not remain in the cache, or two refills result in both refills being repeated indefinitely so that the data remains in the cache memory. It turns out.

【0006】本発明は上記課題に鑑みて成されたもので
、同時に発生したリフィル要求に対して、同じセットア
ドレスが要求されるような場合であっても、異なったウ
ェイにリフィルされるキャッシュメモリ装置を提供する
ことを目的とする。
The present invention has been made in view of the above problems, and provides cache memory that is refilled in different ways even when the same set address is requested for refill requests that occur simultaneously. The purpose is to provide equipment.

【0007】[発明の構成][Configuration of the invention]

【0008】[0008]

【課題を解決するための手段】上記目的を達成するため
に、本発明のキャッシュメモリ装置は、複数のキャッシ
ュメモリと、このキャッシュメモリ毎に設定される複数
のウェイと、キャッシュメモリのリフィルに際して、こ
の複数のウェイの内からリフィルすべきウェイを選択す
る情報の更新を当該リフィル中に行う更新手段と、この
更新手段から出力される選択情報に従ってリフィルすべ
きウェイを選択する選択手段とを有することを要旨とす
る。
[Means for Solving the Problems] In order to achieve the above object, the cache memory device of the present invention includes a plurality of cache memories, a plurality of ways set for each cache memory, and when refilling the cache memory, It has an updating means for updating information for selecting a way to be refilled from among the plurality of ways during the refilling, and a selection means for selecting a way to be refilled according to selection information output from the updating means. The gist is:

【0009】[0009]

【作用】本発明のキャッシュメモリ装置は、キャッシュ
メモリのリフィルに際して、この複数のウェイの内から
リフィルすべきウェイを選択する情報の更新を当該リフ
ィル中に行い、リフィルすべきウェイの選択に係る優先
順位を変更する。従って同じセットアドレスを持つ後続
のリフィルに対しては、先に行われたウェイとは異なっ
たウェイが選択されことになる。
[Operation] When refilling the cache memory, the cache memory device of the present invention updates information for selecting a way to be refilled from among the plurality of ways during the refilling, and gives priority to the selection of the way to be refilled. Change the ranking. Therefore, for subsequent refills having the same set address, a way different from the previously performed way will be selected.

【0010】0010

【実施例】以下、本発明に係る一実施例を図面を参照し
て詳細に説明する。図1は、本発明に係るキャッシュメ
モリ装置を用いた装置の構成例を示す図である。なお、
本実施例では置換アルゴリズムとしてLRUアルゴリズ
ムを用いている。
DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below in detail with reference to the drawings. FIG. 1 is a diagram showing an example of the configuration of a device using a cache memory device according to the present invention. In addition,
In this embodiment, the LRU algorithm is used as the replacement algorithm.

【0011】図1において、本実施例のキャッシュメモ
リ装置は、キャッシュアクセスをポート0側とポート1
側の2つのポートで同時に行い得るように構成されてお
り、まずポート0側について説明する。
In FIG. 1, the cache memory device of this embodiment performs cache access on port 0 side and port 1 side.
It is configured so that it can be performed simultaneously on two ports on the side, and the port 0 side will be explained first.

【0012】選択手段としてのポート0側ウェイ選択回
路3Aは、ポート0側のアクセスがキャッシュヒットし
た場合のウェイコードであるポート0側参照ウェイコー
ドと、デコード回路7Aから出力され、キャッシュミス
した場合にLRUアルゴリズムによって置換される置換
ウェイコードがそれぞれ入力され、ポート0側のヒット
信号とポート0側のミス信号によってウェイを選択する
。ポート0側のウェイ選択回路3Aでは、ポート0側ヒ
ット信号がオンの時は出力としてポート0側の参照ウェ
イコードが出力され、ポート0側ミス信号がオンの時は
置換ウェイコードが出力される。ポート0側ウェイ選択
回路3Aの出力は更新手段としてのポート0側更新回路
5Aに入力されLRUメモリ1の更新を行う。
The port 0 side way selection circuit 3A as a selection means outputs the port 0 side reference way code which is the way code when the port 0 side access results in a cache hit, and the port 0 side reference way code which is the way code when the access on the port 0 side results in a cache miss. Replacement way codes to be replaced by the LRU algorithm are input to each of the input terminals, and a way is selected by a hit signal on the port 0 side and a miss signal on the port 0 side. In the way selection circuit 3A on the port 0 side, when the port 0 side hit signal is on, the reference way code of the port 0 side is outputted, and when the port 0 side miss signal is on, the replacement way code is outputted. . The output of the port 0 side way selection circuit 3A is input to the port 0 side update circuit 5A as an update means, and the LRU memory 1 is updated.

【0013】LRUメモリ1に格納された参照経歴の更
新はポート0側更新回路5Aによって行われ、ポート0
側ウェイ選択回路3Aによって選択されたウェイコード
によりポート0側参照セットアドレスに対応したLRU
メモリ1に記録される参照経歴を更新する。
The reference history stored in the LRU memory 1 is updated by the port 0 side update circuit 5A.
The LRU corresponding to the port 0 side reference set address according to the way code selected by the side way selection circuit 3A.
The reference history recorded in memory 1 is updated.

【0014】一方、LRUメモリ1の出力にはデコード
回路7Aが接続されている。LRUメモリ1はポート0
側ミス信号がオンの時には、ポート0側参照セットアド
レスに対応したLRUメモリ1の内容が出力される。ポ
ート0側デコード回路7AではLRUメモリ1に記録さ
れている参照経歴をデコードして最も古くに参照された
ウェイのコードを出力する。この出力はポート0側置換
ウェイコードである。ポート0側置換ウェイコードはポ
ート0側ウェイ選択回路3Aの入力に接続されており、
置換されるウェイが最も最近に参照されたウェイになる
様にLRUメモリ1に登録される。
On the other hand, a decoding circuit 7A is connected to the output of the LRU memory 1. LRU memory 1 is port 0
When the side miss signal is on, the contents of the LRU memory 1 corresponding to the port 0 side reference set address are output. The port 0 side decoding circuit 7A decodes the reference history recorded in the LRU memory 1 and outputs the code of the way that was referenced the oldest. This output is the port 0 side replacement way code. The port 0 side replacement way code is connected to the input of the port 0 side way selection circuit 3A,
The way to be replaced is registered in the LRU memory 1 so that it becomes the most recently referenced way.

【0015】なお本実施例ではメモリポートが2つあり
,ポート1側もポート0側と同様の回路構成を持つので
、詳細な説明は省略する。但しLRUメモリ1はポート
0側とポート1側で共有する。
In this embodiment, there are two memory ports, and the port 1 side has the same circuit configuration as the port 0 side, so a detailed explanation will be omitted. However, the LRU memory 1 is shared between the port 0 side and the port 1 side.

【0016】次に図2を参照して本実施例の動作を説明
する。
Next, the operation of this embodiment will be explained with reference to FIG.

【0017】この図1に示すキャッシュメモリ装置にお
いて、キャッシュアクセスがポート0側とポート1側の
2つのポートで同時に行われるものとする。このキャッ
シュメモリ装置は同時に2つのメモリアクセスが生じる
図示しないCPUに接続され、それぞれのメモリアクセ
スがポート0側とポート1側に接続される。CPUはス
テップS1でメモリアクセスが発生すると、まずステッ
プS5でヒットチェックを行い、キャッシュヒットした
場合には、ステップS25でキャッシュメモリからデー
タが読み込まれると同時にLRUが更新され、終了する
In the cache memory device shown in FIG. 1, it is assumed that cache access is performed simultaneously on two ports, port 0 side and port 1 side. This cache memory device is connected to a CPU (not shown) that simultaneously performs two memory accesses, and each memory access is connected to the port 0 side and the port 1 side. When a memory access occurs in step S1, the CPU first performs a hit check in step S5, and if there is a cache hit, data is read from the cache memory in step S25 and the LRU is updated at the same time, and the process ends.

【0018】また、どちらか一方のポートまたは両方の
ポートがキャッシュミスした場合には、ステップS7に
進み、CPUにはストールがかけられ、CPUは停止す
る。CPUが停止している間に当該キャッシュメモリの
リフィルが行われる。
[0018] If one or both ports has a cache miss, the process proceeds to step S7, where the CPU is stalled and the CPU is stopped. The cache memory is refilled while the CPU is stopped.

【0019】以下、このリフィルの手順に付いて説明す
る。リフィルをする際には予め置換するウェイを求めて
から、そのウェイに対して行われる。リフィルはポート
0側のリフィルを行ってから、ポート1側のリフィルが
行われる。リフィルの最中もヒットチェックは各マシン
サイクルで行われ、必要なアドレスに対するデータがリ
フィルされるまで、リフィル要求が発生し続ける。
The refilling procedure will be explained below. When refilling, a way to be replaced is determined in advance, and then refilling is performed for that way. Refilling is performed first on the port 0 side, and then on the port 1 side. Even during refilling, a hit check is performed at each machine cycle, and refill requests continue to occur until the data for the required address is refilled.

【0020】また、ポート0側およびポート1側が共に
キャッシュヒットすると(ステップS11、S17)、
それぞれステップS13、S15及びステップS19、
S21を経ることなくステップS23に進み、CPUの
ストールが解除されたのちにステップS3に戻り、CP
UはステップS5で再度ヒットチェックを行う。その後
に、要求したアドレスに対するデータがアクセスされ、
キャッシュヒットした場合には、ステップS25でキャ
ッシュメモリからデータが読み込まれると同時にLRU
が更新され、終了する。
[0020] Furthermore, if both the port 0 side and the port 1 side have a cache hit (steps S11 and S17),
Steps S13, S15 and Step S19, respectively.
The process proceeds to step S23 without going through S21, and after the CPU stall is released, the process returns to step S3 and the CPU
U performs a hit check again in step S5. The data for the requested address is then accessed and
If there is a cache hit, the data is read from the cache memory in step S25 and at the same time the LRU
is updated and exits.

【0021】また、ここでキャッシュヒットしていなけ
れば、ステップS7に進み、更にリフィルが行われる。
[0021] If there is no cache hit here, the process advances to step S7 and further refilling is performed.

【0022】いま、ポート0側を通してキャッシュメモ
リの参照が行われたとするとウェイ選択回路3Aによっ
てポート0側参照ウェイコードが選択される。これによ
りポート0側更新回路5AによってLRUメモリ1の内
容を変更する。
Now, if the cache memory is referenced through the port 0 side, the way selection circuit 3A selects the port 0 side reference way code. As a result, the contents of the LRU memory 1 are changed by the port 0 side update circuit 5A.

【0023】ポート1からのキャッシュが参照された場
合も同様である。
The same applies when the cache from port 1 is referenced.

【0024】ポート0とポート1の双方からキャッシュ
が参照された場合はLRUメモリ1の変更が同時に2組
行われる。
[0024] When the cache is referenced from both port 0 and port 1, two sets of changes to the LRU memory 1 are performed at the same time.

【0025】ポート0側がキャッシュミスを起こした場
合には、ステップS13に進み、LRUメモリ1がポー
ト0側セットアドレスにおける最も古くにアクセスされ
た置換ウェイコードを出力する。このウェイコードはリ
フィルするポートを決定する。
If a cache miss occurs on the port 0 side, the process advances to step S13, where the LRU memory 1 outputs the oldest accessed replacement way code at the port 0 side set address. This waycode determines the refill port.

【0026】ポート0側とポート1側で同時にキャッシ
ュミスが起こった場合には、最も優先順位の高いデータ
要求に対するリフィル、すなわちポート0側のリフィル
がポート1側のリフィルより先に行われる。すなわち、
ステップS11からステップS13、S15へ進み、先
ずポート0側の置換ウェイを求め、そこにリフィルして
後、ステップS5及びステップS11で再度ヒットチェ
ックを行う。するとポート0側はキャッシュヒットする
。そしてポート1側がキャッシュミスが発生したらポー
ト1側のリフィルを行う。このとき置換するウェイはポ
ート0側のリフィルによりLRUメモリ1が変更されて
いるので、ポート0側とポート1側で同じセットアドレ
スを持っていても異なったウェイにリフィルされる。
If a cache miss occurs simultaneously on the port 0 side and the port 1 side, the refill for the data request with the highest priority, that is, the refill on the port 0 side is performed before the refill on the port 1 side. That is,
Proceeding from step S11 to steps S13 and S15, first, a replacement way on the port 0 side is found, and after refilling there, a hit check is performed again in steps S5 and S11. Then, a cache hit occurs on the port 0 side. If a cache miss occurs on the port 1 side, the port 1 side is refilled. Since the LRU memory 1 of the way to be replaced at this time has been changed by refilling on the port 0 side, different ways are refilled even if the port 0 side and port 1 side have the same set address.

【0027】以上、説明してきたように、本実施例によ
れば、同時に発生したリフィル要求に対して、同じセッ
トアドレスが要求されるような場合であっても、異なっ
たウェイにリフィルされる。
As described above, according to this embodiment, even if the same set address is requested for refill requests that occur simultaneously, refills are performed in different ways.

【0028】[0028]

【発明の効果】以上、説明したように本発明によれば、
リフィル中にウェイの選択に係る優先順位情報が変更さ
れるので、同時に行われるリフィルが同じセットアドレ
スを持っている場合にも、異なったウェイにリフィルさ
れる。
[Effects of the Invention] As explained above, according to the present invention,
Since the priority information related to way selection is changed during refilling, even if refills performed at the same time have the same set address, different ways will be refilled.

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

【図1】本発明にかかるキャッシュメモリ装置の構成例
を示すブロック図である。
FIG. 1 is a block diagram showing a configuration example of a cache memory device according to the present invention.

【図2】図1に示すキャッシュメモリ装置の処理手順を
示すフローチャートである。
FIG. 2 is a flowchart showing a processing procedure of the cache memory device shown in FIG. 1;

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

1  LRUメモリ 3A  ポート0側ウェイ選択回路 5A  ポート0側更新回路 7A  ポート0側デコード回路 3B  ポート1側ウェイ選択回路 5B  ポート1側更新回路 7B  ポート1側デコード回路 1 LRU memory 3A Port 0 side way selection circuit 5A Port 0 side update circuit 7A Port 0 side decoding circuit 3B Port 1 side way selection circuit 5B Port 1 side update circuit 7B Port 1 side decoding circuit

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】  複数のキャッシュメモリと、このキャ
ッシュメモリ毎に設定される複数のウェイと、キャッシ
ュメモリのリフィルに際して、この複数のウェイの内か
らリフィルすべきウェイを選択する情報の更新を当該リ
フィル中に行う更新手段と、この更新手段から出力され
る選択情報に従ってリフィルすべきウェイを選択する選
択手段とを有することを特徴とするキャッシュメモリ装
置。
Claim 1: A plurality of cache memories, a plurality of ways set for each cache memory, and updating of information for selecting a way to be refilled from among the plurality of ways when refilling the cache memory. What is claimed is: 1. A cache memory device comprising: updating means for performing internal updating; and selecting means for selecting a way to be refilled according to selection information output from the updating means.
【請求項2】  要求されるアドレスのデータが当該キ
ャッシュメモリに存在することをリフィルの終了時に確
認することを特徴とする請求項1記載のキャッシュメモ
リ装置。
2. The cache memory device according to claim 1, further comprising the step of confirming that data at a requested address exists in the cache memory at the end of refilling.
JP3073328A 1991-04-05 1991-04-05 Cache memory device Pending JPH04308945A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3073328A JPH04308945A (en) 1991-04-05 1991-04-05 Cache memory device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3073328A JPH04308945A (en) 1991-04-05 1991-04-05 Cache memory device

Publications (1)

Publication Number Publication Date
JPH04308945A true JPH04308945A (en) 1992-10-30

Family

ID=13514993

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3073328A Pending JPH04308945A (en) 1991-04-05 1991-04-05 Cache memory device

Country Status (1)

Country Link
JP (1) JPH04308945A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007249914A (en) * 2006-03-20 2007-09-27 Nec Corp Data loading method and data processor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007249914A (en) * 2006-03-20 2007-09-27 Nec Corp Data loading method and data processor

Similar Documents

Publication Publication Date Title
US6961820B2 (en) System and method for identifying and accessing streaming data in a locked portion of a cache
EP0695996B1 (en) Multi-level cache system
JP2516300B2 (en) Apparatus and method for optimizing the performance of a multi-processor system
TW573252B (en) Shared cache structure for temporal and non-temporal instructions
US6353876B1 (en) Cache memory exchange optimized memory organization for a computer system
US5535361A (en) Cache block replacement scheme based on directory control bit set/reset and hit/miss basis in a multiheading multiprocessor environment
JP4006436B2 (en) Multi-level cache with overlapping sets of associative sets at different cache levels
EP0409415A2 (en) Fast multiple-word accesses from a multi-way set-associative cache memory
JP2509766B2 (en) Cache memory exchange protocol
JPH0340046A (en) Cache memory control system and information processor
JP4875981B2 (en) Prefetch control in data processing system
US20030236947A1 (en) Prevention of conflicting cache hits without an attendant increase in hardware
JPS6111865A (en) Memory access control system
US6862663B1 (en) Cache having a prioritized replacement technique and method therefor
JP2918531B1 (en) Cache memory controller
KR20010032199A (en) Method and system to achieve zero cycle penalty for access crossing a cache line
JPS638851A (en) Cache memory control system
JPH04308945A (en) Cache memory device
JP2001290704A (en) Device and method for controlling multiprocess
JPH04369061A (en) Control system for cache memory
JPS63201850A (en) On chip cash memory
US20120102271A1 (en) Cache memory system and cache memory control method
CA1309509C (en) Cache memory with variable fetch and replacement schemes
JPS59217284A (en) System controllr of data processor
JPH06149673A (en) Cache control system