JP2003015955A - Cache controller and computer system - Google Patents

Cache controller and computer system

Info

Publication number
JP2003015955A
JP2003015955A JP2001198098A JP2001198098A JP2003015955A JP 2003015955 A JP2003015955 A JP 2003015955A JP 2001198098 A JP2001198098 A JP 2001198098A JP 2001198098 A JP2001198098 A JP 2001198098A JP 2003015955 A JP2003015955 A JP 2003015955A
Authority
JP
Japan
Prior art keywords
transaction
processor
prefetch
cache
main memory
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
JP2001198098A
Other languages
Japanese (ja)
Inventor
Masaru Koyanagi
勝 小柳
Yuji Tsushima
雄次 對馬
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2001198098A priority Critical patent/JP2003015955A/en
Publication of JP2003015955A publication Critical patent/JP2003015955A/en
Pending legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PROBLEM TO BE SOLVED: To reduce useless transactions in a computer system having a cache controller that generates a prefetch transaction by itself based on a processor- originated transaction. SOLUTION: The cache controller 102 is provided with: means 121, 125 for holding the processing state, the transaction type, the address or the like of the prefetch transaction generated from the processor-originated transaction; a means 123 for determining whether the access of subsequent processor- originated transaction regarding the address same with that for the advance prefetch transaction is to be retried or waited according to the transaction type of the both; and a means 124 for holding the subsequent processor- originated transaction to be waited until the processing of the advance prefetch transaction is completed.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、プロセッサと主記
憶の間にキャッシュメモリを有するコンピュータシステ
ムに係り、特にプロセッサからの主記憶に対するアクセ
ス要求(トランザクション)をもとに自律的にプリフェ
ッチ要求(プリフェッチトランザクション)を生成・発
行するキャッシュコントローラ及びそれを適用したコン
ピュータシステムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a computer system having a cache memory between a processor and a main memory, and particularly to a prefetch request (prefetch) autonomously based on an access request (transaction) from the processor to the main memory. The present invention relates to a cache controller for generating and issuing transactions) and a computer system to which the cache controller is applied.

【0002】[0002]

【従来の技術】近年、プロセッサと主記憶の間に性能格
差を埋める目的でキャッシュを設けるコンピュータシス
テムにおいては、キャッシュメモリを有効に利用し主記
憶からのデータ読み出しレイテンシを削減するために、
プロセッサのデータ読み出し要求を受ける前にプリフェ
ッチ要求を使って将来使用する可能性のあるデータを予
め主記憶からキャッシュメモリに読み込む改良がなされ
ている。
2. Description of the Related Art In recent years, in a computer system in which a cache is provided between a processor and a main memory for the purpose of filling a performance difference, in order to effectively use a cache memory and reduce a data read latency from the main memory,
Before the data read request of the processor is received, the prefetch request is used to improve the data that may be used in the future from the main memory to the cache memory in advance.

【0003】プリフェッチ要求の生成回路の従来技術と
しては、例えば特開昭62−192831号公報に記載
された技術が知られている。これは、プロセッサが自ら
将来使用する可能性のあるデータのプリフェッチ要求を
キャッシュコントローラ(キャッシュメモリチップ)に
発行し、このプリフェッチ要求を基にキャッシュコント
ローラがもう1つのプリフェッチ要求を生成するという
ものである。
As a conventional technique of a prefetch request generation circuit, for example, a technique described in Japanese Patent Laid-Open No. 62-192831 is known. This is that the processor issues a prefetch request for data that may be used in the future to the cache controller (cache memory chip), and the cache controller generates another prefetch request based on this prefetch request. .

【0004】図5に、この種の従来技術のキャッシュコ
ントローラを具備したコンピュータシステムの概略ブロ
ック図を示す。図5において、201はプロセッサ、2
02は、キャッシュコントローラ、205は主記憶、2
06はキャッシュメモリである。キャッシュコントロー
ラ202は、プリフェッチ要求の生成を行うプリフェッ
チ制御部203とキャッシュメモリ206と主記憶20
5からのデータ読み出しを行うキャッシュ制御部204
から構成される。
FIG. 5 is a schematic block diagram of a computer system including a cache controller of this type of prior art. In FIG. 5, 201 is a processor, 2
02 is a cache controller, 205 is main memory, 2
Reference numeral 06 is a cache memory. The cache controller 202 includes a prefetch control unit 203 that generates a prefetch request, a cache memory 206, and a main memory 20.
Cache control unit 204 for reading data from
Composed of.

【0005】プリフェッチ制御部203は、プロセッサ
201からパス250を介して出力されるアドレスデー
タをラッチするアドレスレジスタ209、キャッシュの
ライン幅(あるいはブロック幅)を格納するラインサイ
ズレジスタ207、パス256を介してアドレスレジス
タ209から受けるアドレスデータとパス251を介し
てラインサイズレジスタ207から受けるラインサイズ
を加算する加算器208、パス256とパス252を介
して受けるアドレスデータを、パス257を介して受け
るセレクト信号で選択し、パス253を介してキャッシ
ュ制御部204にアドレスデータを発行するトランザク
ション選択部210、及び、パス250を介してプロセ
ッサ201からアクセス要求あるいはプリフェッチ要求
を受け取り、トランザクション選択部210に対するセ
レクト信号を生成する制御部211から構成される。
The prefetch control section 203 receives an address register 209 for latching address data output from the processor 201 via a path 250, a line size register 207 for storing a cache line width (or block width), and a path 256. Address signal received from the address register 209 and the line size received from the line size register 207 via the path 251 and the select signal received via the path 257 to the address data received via the paths 256 and 252. And a transaction selection unit 210 that issues address data to the cache control unit 204 via the path 253, and an access request or prefetch request from the processor 201 via the path 250. And a control unit 211 which generates a select signal for-transactions selector 210.

【0006】以下に、キャッシュコントローラ202に
ついてその動作を説明する。プロセッサ201はパス2
50を介して、データ読み出し要求と共にプリフェッチ
要求をキャッシュコントローラ202に発行する。キャ
ッシュコントローラ202のプリフェッチ制御部203
では、制御部211がプロセッサ201からの要求を受
け取り、また、そのアドレスがアドレスレジスタ209
に設定される。加算器252は、該アドレスレジスタ2
09のアドレスにラインサイズレジスタ205のライン
サイズを加算する。制御部211は、まず、トランザク
ション選択部210がアドレスレジスタ209からのア
ドレスを選択するようにパス257を介してセレクト信
号を生成する。同時に制御部211は、パス254を介
してキャッシュ制御部204に対してデータ読み出し要
求を発行する。トランザクション選択部210は、アド
レスレジスタ209のアドレスを選択し、パス253を
介してキャッシュ制御部204に送る。
The operation of the cache controller 202 will be described below. Processor 201 is pass 2
A prefetch request is issued to the cache controller 202 along with a data read request via 50. Prefetch control unit 203 of cache controller 202
Then, the control unit 211 receives the request from the processor 201, and its address is the address register 209.
Is set to. The adder 252 uses the address register 2
The line size of the line size register 205 is added to the address of 09. The control unit 211 first generates a select signal via the path 257 so that the transaction selection unit 210 selects the address from the address register 209. At the same time, the control unit 211 issues a data read request to the cache control unit 204 via the path 254. The transaction selection unit 210 selects the address of the address register 209 and sends it to the cache control unit 204 via the path 253.

【0007】キャッシュ制御部204は、読み出し要求
に対するデータが既にキャッシュメモリ206に格納さ
れているか判定し、格納されていれば、パス258を介
してキャッシュメモリ206から当該データを読み出
し、パス259を介してプロセッサ201に送り、制御
部211に対してパス254を介してデータの読み出し
完了を通知して処理を終了とする。一方、読み出し要求
に対するデータがキャッシュメモリ206に格納されて
いない場合、キャッシュ制御部204はパス257を介
して主記憶205からデータを読み出し、パス258を
介してキャッシュメモリ206に書き込むと同時にパス
259を介してプロセッサ201に主記憶205からの
読み出しデータを送り、制御部211に対してパス25
4を介してデータの読み出し完了を通知する。この時点
で、制御部211は次のプリフェッチアドレスを選択す
るようにパス257を介してトランザクション選択部2
10にセレクト信号を送る。トランザクション選択部2
10は加算器208からのアドレスデータをパス252
を介して選択し、パス253を介してキャッシュ制御部
204に出力する。キャッシュ制御部204は、パス2
57を介して主記憶257から先の読み出し要求に対す
るデータの次のデータを読み出し、パス258を介して
キャッシュメモリ206へ書き込み、それが完了した時
点で、制御部211にデータ読み出しの完了報告する。
制御部211はパス255を介してプロセッサ201に
プリフェッチ動作の完了を報告する。
The cache control unit 204 determines whether the data corresponding to the read request is already stored in the cache memory 206. If the data is stored, the cache control unit 204 reads the data from the cache memory 206 via the path 258, and the path 259. To the processor 201, the control unit 211 is notified of the completion of data reading via the path 254, and the processing is ended. On the other hand, when the data corresponding to the read request is not stored in the cache memory 206, the cache control unit 204 reads the data from the main memory 205 via the path 257, writes the data in the cache memory 206 via the path 258, and simultaneously writes the path 259. The read data from the main memory 205 is sent to the processor 201 via the
The completion of data reading is notified via 4. At this point, the control unit 211 selects the next prefetch address via the path 257 so as to select the next prefetch address.
Send a select signal to 10. Transaction selection part 2
10 passes the address data from the adder 208 to the path 252
Via the path 253 and output to the cache control unit 204. The cache control unit 204 uses the path 2
The data next to the previous read request is read from the main memory 257 via 57, written to the cache memory 206 via the path 258, and when the data is completed, the control unit 211 is notified of the completion of the data read.
The control unit 211 reports the completion of the prefetch operation to the processor 201 via the path 255.

【0008】[0008]

【発明が解決しようとする課題】前述した従来技術で
は、プリフェッチ要求があった場合に、キャッシュメモ
リに読み込まれるデータは、キャッシュミスを条件にプ
ロセッサの要求するデータと次のデータの2ラインのみ
であり、この2ラインデータ以外のデータをプリフェッ
チするためには、プロセッサが頻繁にプリフェッチ要求
の発行を繰り返さなければならない欠点があった。更
に、プロセッサにプリフェッチ要求を発行する機能がな
い場合には、キャッシュコントローラは自らプリフェッ
チ要求を生成しないため、プリフェッチが発生せずキャ
ッシュメモリを有効に活用できないという欠点があっ
た。
In the above-mentioned prior art, when there is a prefetch request, the data read into the cache memory is only two lines of the data requested by the processor and the next data on condition of a cache miss. However, in order to prefetch data other than the 2-line data, there is a drawback that the processor must repeatedly issue the prefetch request. Further, when the processor does not have a function of issuing a prefetch request, the cache controller does not generate the prefetch request by itself, so that the prefetch does not occur and the cache memory cannot be effectively used.

【0009】これに対し、例えば特開2001−601
69号公報では、プロセッサから発行されるプリフェッ
チ要求、または主記憶に対するプリフェッチ以外の要求
に対して、複数のプリフェッチ要求(プリフェッチトラ
ンザクション)をキャッシュコントローラが自ら生成し
て、より多くのデータをキャッシュメモリに書き込むこ
とで、キャッシュメモリの有効活用を可能にしている。
しかしながら、ここではプロセッサ発のトランザクショ
ンとプリフェッチトランザクションが同一アドレスにア
クセスする(競合する)場合に無駄なトランザクション
がシステムに発行されることについて考慮されていな
い。
On the other hand, for example, Japanese Patent Laid-Open No. 2001-601
In Japanese Patent Laid-Open No. 69, the cache controller itself generates a plurality of prefetch requests (prefetch transactions) in response to a prefetch request issued from the processor or a request other than the prefetch to the main memory, and more data is stored in the cache memory. Writing enables effective use of cache memory.
However, here, it is not taken into consideration that a wasteful transaction is issued to the system when a processor-originated transaction and a prefetch transaction access (compete with) the same address.

【0010】本発明の目的は、プロセッサと主記憶の間
にキャッシュメモリを有するコンピュータシステムにお
いて、プリフェッチトランザクションをキャッシュコン
トローラ自体で発生してキャッシュメモリの有効利用を
実現するにあたり、プロセッサ発のトランザクションと
プリフェッチトランザクションの競合を回避し、システ
ム内の無駄なトランザクションを減らすことにある。
It is an object of the present invention, in a computer system having a cache memory between a processor and a main memory, to generate a prefetch transaction in the cache controller itself and realize effective use of the cache memory, in order to effectively utilize the cache memory. Avoiding transaction conflicts and reducing wasted transactions in the system.

【0011】[0011]

【課題を解決するための手段】本発明は、上記目的を達
成するため、プロセッサから発行される主記憶に対する
アクセス要求(プロセッサ発トランザクション)からキ
ャッシュコントローラが自ら生成するプリフェッチトラ
ンザクションの処理状態、トランザクション種、アドレ
ス等を保持する手段、先発プリフェッチトランザクショ
ンと同一ラインに対する、後発のプロセッサ発トランザ
クションのアクセスをリトライするかウェイトするかの
判定手段を設ける。更に、ウェイトすることに決まった
後発のプロセッサ発トランザクションを先発プリフェッ
チトランザクションの処理が完了するまで保持する手段
を設ける。
In order to achieve the above object, the present invention has a processing state and a transaction type of a prefetch transaction which the cache controller itself generates from an access request (processor originating transaction) to a main memory issued from a processor. , A means for holding an address, etc., and a means for judging whether to retry or wait the access of a subsequent processor-originated transaction to the same line as the preceding prefetch transaction. Further, a means is provided for holding a subsequent processor-originated transaction that is decided to wait until the processing of the predecessor prefetch transaction is completed.

【0012】[0012]

【発明の実施の形態】以下、本発明の一実施の形態につ
いて図1乃至図4を用いて具体的に説明する。図1は本
発明のキャッシュコントローラ及びそれを適用したコン
ピュータシステムの一実施例を示すブロック図である。
図1において、101はプロセッサ、102は本発明に
よるキャッシュコントローラ、103は主記憶、104
はキャッシュメモリである。キャッシュコントローラ1
02はプリフェッチトランザクションを生成・制御する
プリフェッチ制御部105と、キャッシュメモリ104
と、主記憶103へのアクセスを制御するキャッシュ制
御部106から構成される。キャッシュ制御部106
は、基本的に従来と同様の構成である。
BEST MODE FOR CARRYING OUT THE INVENTION An embodiment of the present invention will be specifically described below with reference to FIGS. FIG. 1 is a block diagram showing an embodiment of a cache controller of the present invention and a computer system to which the cache controller is applied.
In FIG. 1, 101 is a processor, 102 is a cache controller according to the present invention, 103 is main memory, 104
Is a cache memory. Cache controller 1
Reference numeral 02 denotes a prefetch control unit 105 that generates and controls a prefetch transaction, and a cache memory 104.
And a cache control unit 106 that controls access to the main memory 103. Cache control unit 106
Is basically the same as the conventional one.

【0013】プリフェッチ制御部105は、プロセッサ
101から発行された主記憶103宛てのトランザクシ
ョン(アクセス要求)からプリフェッチトランザクショ
ン(プリフェッチ要求)を生成するプリフェッチ生成部
122、プリフェッチ生成部122が生成したプリフェ
ッチトランザクションの種類とアドレスを格納する複数
エントリのプリフェッチトランザクション種&アドレス
レジスタ121、該プリフェッチトランザクション種&
アドレスレジスタ121の各エントリに対応したプリフ
ェッチトランザクションの処理状態(未処理、処理完了
等)を保持する複数エントリのプリフェッチトランザク
ション処理状態レジスタ125、プリフェッチトランザ
クション処理状態レジスタ124とプリフェッチトラン
ザクション種&アドレスレジスタ121の情報を元にプ
ロセッサ101発の主記憶103宛てトランザクション
をWaitさせるかリトライさせるかの判定をするWa
it判定部123、該Wait判定部123の判定結果
によりWaitすることに決まったプロセッサ101発
の主記憶103宛てトランザクション(NTHITトラ
ンザクション)を一時保持する複数エントリのNTHI
TトランザクションWaitレジスタ124、NTHI
TトランザクションWaitレジスタ124とプリフェ
ッチトランザクション種&アドレスレジスタ121とプ
ロセッサ101発の主記憶103宛てトランザクション
を調停して、トランザクションをキャッシュ制御部10
6へ発行するトランザクション発行部126から構成さ
れる。レジスタ類121、124、125には、例え
ば、FIFOのスタックメモリが使用される。また、プ
リフェッチトランザクション種&アドレスレジスタ12
1の各エントリに処理状態フラグを付加するなどして、
プリフェッチトランザクション処理状態レジスタ125
を省略することでもよい。
The prefetch control unit 105 generates a prefetch transaction (prefetch request) from a transaction (access request) addressed to the main memory 103 issued from the processor 101, and a prefetch transaction generated by the prefetch generation unit 122. Multiple-entry prefetch transaction type & address register 121 for storing types and addresses, the prefetch transaction type &
The prefetch transaction processing status register 125, the prefetch transaction processing status register 124, the prefetch transaction processing status register 124, and the prefetch transaction type & address register 121 that hold the processing status (unprocessed, processing completed, etc.) of the prefetch transaction corresponding to each entry of the address register 121. Wa that determines whether to wait or retry a transaction addressed to the main memory 103 originating from the processor 101 based on the information Wa
It determination unit 123, a plurality of entries of NTHI for temporarily holding a transaction (NTHIT transaction) destined for the main memory 103 from the processor 101, which has been decided to wait according to the determination result of the Wait determination unit 123.
T transaction Wait register 124, NTHI
T transaction Wait register 124, prefetch transaction type & address register 121, and arbitration of a transaction from processor 101 addressed to main memory 103, and the transaction is cache control unit 10.
6 is included in the transaction issuing unit 126. For the registers 121, 124, and 125, for example, a FIFO stack memory is used. Also, the prefetch transaction type & address register 12
By adding a processing state flag to each entry of 1,
Prefetch transaction processing status register 125
May be omitted.

【0014】まず、キャッシュコントローラ102のプ
リフェッチ動作について説明する。プリフェッチ制御部
105のトランザクション発行部126は、パス159
を介してプリフェッチトランザクション処理状態レジス
タ125を監視し、未処理のプリフェッチトランザクシ
ョンが存在すれば、プリフェッチトランザクション種&
アドレスレジスタ121の該当エントリのプリフェッチ
トランザクションをパス160、161を介してキャッ
シュ制御部106に発行する。キャッシュ制御部106
は、プリフェッチトランザクションに対するデータが既
にキャッシュメモリ104に存在するか判定し(キャッ
シュヒット判定)、既に存在する場合(キャッシュヒッ
ト)は何もせずに、そのまま処理完了通知をパス163
を介してプリフェッチトランザクション処理状態レジス
タ125に送り、該レジスタの該当エントリの状態を処
理完了に更新する。一方、プリフェッチトランザクショ
ンに対するデータがキャッシュメモリ104に存在しな
い場合(キャッシュミス)には、キャッシュ制御部10
6は、パス164を介して主記憶103から該当データ
を読み出し、パス162を介してキャッシュメモリ10
4に登録し、パス163を介してプリフェッチトランザ
クション処理状態レジスタ125の該当エントリの状態
を処理完了に更新する。このプリフェッチ動作は、通
常、プロセッサ101発の主記憶103宛てトランザク
ションの処理に続いて実施される。
First, the prefetch operation of the cache controller 102 will be described. The transaction issuing unit 126 of the prefetch control unit 105 uses the path 159.
The prefetch transaction processing status register 125 is monitored via, and if there is an unprocessed prefetch transaction, the prefetch transaction type &
The prefetch transaction of the corresponding entry of the address register 121 is issued to the cache control unit 106 via the paths 160 and 161. Cache control unit 106
Determines whether the data for the prefetch transaction already exists in the cache memory 104 (cache hit determination), and if it already exists (cache hit), does nothing and sends the processing completion notification directly to the path 163.
To the prefetch transaction processing status register 125, and the status of the corresponding entry in the register is updated to processing completion. On the other hand, when the data for the prefetch transaction does not exist in the cache memory 104 (cache miss), the cache control unit 10
6 reads the corresponding data from the main memory 103 via the path 164, and the cache memory 10 via the path 162.
4, and updates the status of the corresponding entry of the prefetch transaction processing status register 125 to the processing completion via the path 163. This prefetch operation is normally performed subsequent to the processing of a transaction from the processor 101 addressed to the main memory 103.

【0015】次に、本発明にかかるプロセッサ101か
ら主記憶103宛てトランザクションが発行された場合
のキャッシュコントローラ102の動作について説明す
る。図2に、この場合の特にプリフェッチ制御部105
の処理フローチャートを示す。
Next, the operation of the cache controller 102 when a transaction is issued from the processor 101 according to the present invention to the main memory 103 will be described. FIG. 2 particularly illustrates the prefetch control unit 105 in this case.
The processing flowchart of is shown.

【0016】プロセッサ101がパス155を介してキ
ャッシュコントローラ102に対し、主記憶103宛て
トランザクションを発行したとする。キャッシュコント
ローラ102では、プリフェッチ制御部105のプリフ
ェッチ生成部122とWait判定部123にて該プロ
セッサ101発の主記憶103宛てトランザクションを
受信する(ステップ11)。プリフェッチ生成部122
は、プロセッサ101発の主記憶103宛てトランザク
ションがReadの場合、該プロセッサ101発のトラ
ンザクション種と同じ種類のトランザクションでアドレ
スの異なるプリフェッチトランザクションを生成し、パ
ス154を介してプリフェッチトランザクション種&ア
ドレスレジスタ121とプリフェッチトランザクション
処理状態レジスタ125に登録する(ステップ12)。
同時に、プリフェッチトランザクション処理状態レジス
タ125の該当エントリの処理状態は未処理とする。プ
リフェッチアドレスは、例えば、特開2001−601
69号公報に記載のように、プロセッサ101発のトラ
ンザクションのアドレスとあらかじめ定められた変数
(ブロックサイズ、ストライト値等)をもとにして一つ
あるいは複数のアドレスを生成する。
It is assumed that the processor 101 issues a transaction addressed to the main memory 103 to the cache controller 102 via the path 155. In the cache controller 102, the prefetch generation unit 122 and the Wait determination unit 123 of the prefetch control unit 105 receive the transaction from the processor 101 addressed to the main memory 103 (step 11). Prefetch generation unit 122
When the transaction addressed to the main memory 103 originating from the processor 101 is Read, a prefetch transaction with a different address is generated by the same transaction type as the transaction originating from the processor 101, and the prefetch transaction type & address register 121 via the path 154. And the prefetch transaction processing status register 125 (step 12).
At the same time, the processing status of the corresponding entry of the prefetch transaction processing status register 125 is unprocessed. The prefetch address is, for example, Japanese Patent Laid-Open No. 2001-601.
As described in Japanese Patent Publication No. 69, one or more addresses are generated based on the address of a transaction issued by the processor 101 and a predetermined variable (block size, strite value, etc.).

【0017】一方、Wait判定部123は、プリフェ
ッチトランザクション種&アドレスレジスタ121とプ
リフェッチトランザクション処理状態レジスタ125を
パス152、153を介して参照して、プロセッサ10
1発の主記憶103宛てトランザクションのアドレスと
同一アドレスの未処理の先発プリフェッチトランザクシ
ョンがないか判定する(ステップ13)。そして、同一
アドレスの先発プリフェッチトランザクションがない場
合、Wait判定部123は、プロセッサ101発の主
記憶103宛てトランザクションをパス156を介して
トランザクション発行部126に送り、トランザクショ
ン発行部126は、該プロセッサ101発のトランザク
ションをパス161を介してキャッシュ制御部106に
発行する(ステップ14)。
On the other hand, the Wait determining unit 123 refers to the prefetch transaction type & address register 121 and the prefetch transaction processing status register 125 via the paths 152 and 153 to refer to the processor 10.
It is determined whether or not there is an unprocessed start prefetch transaction having the same address as the address of the transaction addressed to the main memory 103 (step 13). Then, when there is no advance prefetch transaction of the same address, the Wait determination unit 123 sends the transaction addressed to the main memory 103 from the processor 101 to the transaction issuing unit 126 via the path 156, and the transaction issuing unit 126 causes the processor 101 to issue the transaction. Is issued to the cache control unit 106 via the path 161 (step 14).

【0018】プロセッサ101発の主記憶103宛てト
ランザクションを受けたキャッシュ制御部106は、そ
のキャッシュヒット判定をして、キャッシュミスの場合
は、パス164を介して主記憶103からデータの読み
出し・書き込みを行う。また、キャッシュヒットの場合
は、パス162を介してキャッシュメモリ104からデ
ータの読み出し・書き込みを行う。プロセッサ101発
のトランザクションがReadの場合は、リターンデー
タをパス151を介してプロセッサ101に返し、キャ
ッシュミスの場合には、パス162を介してキャッシュ
メモリ104にも登録する。また、プロセッサ101発
のトランザクションがWriteの場合は、データ書き
込みの完了をパス151を介してプロセッサ101に報
告する。該プロセッサ101発の主記憶103宛てトラ
ンザクションの処理が終了すると、プリフェッチ動作が
開始することになる。
The cache control unit 106, which has received the transaction addressed to the main memory 103 from the processor 101, makes a cache hit determination, and in the case of a cache miss, reads / writes data from the main memory 103 via the path 164. To do. In the case of a cache hit, data is read / written from the cache memory 104 via the path 162. When the transaction issued by the processor 101 is Read, return data is returned to the processor 101 via the path 151, and in the case of a cache miss, it is also registered in the cache memory 104 via the path 162. If the transaction issued by the processor 101 is Write, the completion of data writing is reported to the processor 101 via the path 151. When the processing of the transaction originating from the processor 101 and addressed to the main memory 103 is completed, the prefetch operation is started.

【0019】プロセッサ101発の主記憶103宛てト
ランザクションのアドレスと同一アドレスの未処理の先
発プリフェッチトランザクションが存在した場合、Wa
it判定部123は、該後発のプロセッサ101発トラ
ンザクション(後発NTHITトランザクション)のト
ランザクション種と、該競合した先発プリフェッチトラ
ンザクションのトランザクション種を比較する(ステッ
プ15)。ここで、後発のプロセッサ101発のトラン
ザクションがRead&INVで、それと同一アドレス
の未処理の先発プリフェッチトランザクションがRea
dの場合(ケース1)、Wait判定部123は、該後
発Read&INVトランザクションについて、パス1
65を介してプロセッサ101へリトライ要求を発して
リトライさせる(ステップ19)。これ以外の組み合せ
の場合(ケース2)、Wait判定部123は、該後発
のプロセッサ101発トランザクション(後発NTHI
Tトランザクション)をNTHITトランザクションW
aitレジスタ124に登録し、競合した先発プリフェ
ッチトランザクションの処理が完了するまで該後発NT
HITトランザクションの発行を待ち合わせる(ステッ
プ16)。その後、NTHITトランザクションWai
tレジスタ124は、プリフェッチトランザクション処
理状態レジスタ125からパス157を介して先発プリ
フェッチトランザクションの処理完了を受けると、対応
する後発NTHITトランザクションをパス158を介
してトランザクション発行部126に送り、トランザク
ション発行部126は、該後発のプロセッサ発トランザ
クションのNTHITトランザクションをパス161を
介してキャッシュ制御部106に発行する(ステップ1
7、18)。
If there is an unprocessed prefetch transaction with the same address as the address of the transaction addressed to the main memory 103 issued by the processor 101, Wa
The it determining unit 123 compares the transaction type of the subsequent transaction issued by the processor 101 (latest NTHIT transaction) with the transaction type of the competing previous prefetch transaction (step 15). Here, the transaction issued by the later processor 101 is Read & INV, and the unprocessed earlier prefetch transaction of the same address as that of Read & INV is Rea.
In the case of d (Case 1), the Wait determination unit 123 determines the path 1 for the subsequent Read & INV transaction.
A retry request is issued to the processor 101 via 65 to retry (step 19). In the case of other combinations (case 2), the Wait determination unit 123 determines that the subsequent transaction from the processor 101 (the later NTHI
T transaction) to NTHIT transaction W
The subsequent NT is registered in the ait register 124 until the processing of the conflicting first prefetch transaction is completed.
The issuance of the HIT transaction is awaited (step 16). After that, NTHIT transaction Wai
When the t register 124 receives the processing completion of the predecessor prefetch transaction from the prefetch transaction processing status register 125 via the path 157, the t register 124 sends the corresponding late NTHIT transaction to the transaction issuing unit 126 via the path 158. , Issues a subsequent processor-originated NTHIT transaction to the cache control unit 106 via the path 161 (step 1
7, 18).

【0020】後発のプロセッサトランザクションのNT
HITトランザクションを受けたキャッシュ制御部10
6は、そのキャッシュヒットを判定するが、該当先発プ
リフェッチトランザクションは処理完了しているため、
キャッシュメモリ104から該当データを読み出し、パ
ス151を介してプロセッサ101に返すことになる。
その後、再びプリフェッチ動作が開始する。
NT of late processor transaction
The cache control unit 10 that has received the HIT transaction
6 judges the cache hit, but since the corresponding pre-fetch transaction has been completed,
The relevant data is read from the cache memory 104 and returned to the processor 101 via the path 151.
Then, the prefetch operation starts again.

【0021】後発プロセッサ発トランザクションと先発
プリフェッチトランザクションが競合する場合のトラン
ザクション種の組合せ、及びそのときの後発プロセッサ
発トランザクションの動作をまとめると、図3に示す通
りである。
The combination of transaction types in the case where the late processor-originated transaction and the predecessor prefetch transaction compete with each other and the operation of the late-origin processor-originated transaction at that time are summarized as shown in FIG.

【0022】本実施例では説明を簡単にするためにシン
グルプロセッサシステムの構成で説明をしているが、本
システムはマルチプロセッサシステムにも拡張可能であ
り、キャッシュ状態はMESIを使って動作させる。一
般にキャッシュメモリは、キャッシュコヒーレンシ制御
のために、キャッシュライン(ブロック)の状態を「M
odified」(変更済み)、「Exclusiv
e」(排他的)、「Shared」(共有)、「Inv
alid」(無効)の4状態(MESI)で管理され
る。「Invalid」(I)は、当該キャッシュライ
ンに有効なデータが入っていないことを示している。
「Sharad」(S)は、当該キャッシュラインに主
記憶と同じデータ(クリーンなデータ)が入っており、
このデータが他のキャッシュにも存在(共有)すること
を示している。「Exclusive」(E)は、当該
キャッシュラインに主記憶と同一データ(クリーンなデ
ータ)が入っており、かつ、このデータが他のキャッシ
ュに存在しないことを示している。「Modifie
d」(M)は、当該キャッシュラインに主記憶とは異な
る可能性があるデータ(ダーティなデータ)が格納さ
れ、このデータが他のキャッシュに存在しないことを示
している。すなわち、キャッシュラインにデータが書き
込まれた場合、主記憶とは異なる可能性のダーティなデ
ータとなる。なお、MESIアルゴリズムについては、
例えば特開平9−293060号公報に詳述されてい
る。
In this embodiment, a single processor system is used for simplicity of explanation, but the present system can be extended to a multiprocessor system, and the cache state is operated using MESI. Generally, the cache memory sets the state of the cache line (block) to "M" for cache coherency control.
"modified" (changed), "Exclusiv"
e ”(exclusive),“ Shared ”(shared),“ Inv ”
It is managed in four states (MESI) of "alid" (invalid). “Invalid” (I) indicates that the cache line does not contain valid data.
“Shared” (S) has the same data (clean data) as the main memory in the cache line,
It indicates that this data exists (is shared) in other caches. “Exclusive” (E) indicates that the cache line contains the same data (clean data) as the main memory and this data does not exist in another cache. "Modify
“D” (M) indicates that data (dirty data) that may be different from the main memory is stored in the cache line, and this data does not exist in another cache. That is, when the data is written in the cache line, the data becomes dirty and may be different from the main memory. For the MESI algorithm,
For example, it is described in detail in Japanese Patent Laid-Open No. 9-293060.

【0023】プロセッサ101発のReadトランザク
ションはキャッシュ状態をエクスクルーシブ(E)、シ
ェア(S)状態にするトランザクションである。プロセ
ッサ101発のRead & INVトランザクション
は、一般にWriteに先行して発行され、キャッシュ
状態をEにして他プロセッサのキャッシュ状態をインバ
リデート(I)するためのトランザクションである。キ
ャッシュコントローラ102では、プリフェッチトラン
ザクションを生成する場合にプロセッサ101発のトラ
ンザクションと同種のトランザクションを生成する。こ
のため、後発プロセッサ発トランザクションがRead
& INVで先発プリフェッチトランザクションがRe
adで未処理の場合、後発Read & INVトランザ
クションはパス165を介してリプロセッサ101にト
ライさせる。この他の組み合わせの場合はNTHITト
ランザクションWaitレジスタ124に格納して、該
当プリフェッチトランザクションが完了してから発行さ
せる。
The Read transaction originating from the processor 101 is a transaction for changing the cache state to the exclusive (E) or share (S) state. The Read & INV transaction issued from the processor 101 is generally issued prior to Write, and is a transaction for setting the cache state to E and invalidating (I) the cache state of another processor. The cache controller 102 generates the same kind of transaction as the transaction issued by the processor 101 when generating the prefetch transaction. Therefore, the transaction issued by the later processor is Read
& INV causes the prefetch transaction to be Re
If unprocessed in ad, the subsequent Read & INV transaction causes reprocessor 101 to try via path 165. In the case of other combinations, it is stored in the NTHIT transaction Wait register 124 and is issued after the corresponding prefetch transaction is completed.

【0024】次に、図4のマルチプロセッサシステムを
用いて、先発プリフェッチトランザクションがRead
で後発プロセッサ発トランザクションがRead & I
NVの場合にリトライする動作の詳細を説明する。
Next, using the multiprocessor system of FIG. 4, the pre-started prefetch transaction is read.
And the transaction issued by the processor is Read & I
Details of the retry operation in the case of NV will be described.

【0025】図4は、プロセッサ101、301がそれ
ぞれキャッシュコントローラ102、30を介して主記
憶103を共有しているマルチプロセッサシステムであ
る。キャッシュコントローラ102、302の構成は図
1のシステムと同じであるため説明は省略する。
FIG. 4 shows a multiprocessor system in which the processors 101 and 301 share the main memory 103 via the cache controllers 102 and 30, respectively. Since the configurations of the cache controllers 102 and 302 are the same as those of the system of FIG. 1, description thereof will be omitted.

【0026】プロセッサ301からRead & INV
トランザクションが発行された場合、主記憶103から
データを読み出し、キャッシュメモリ104のキャッシ
ュ状態をインバリデートし、キャッシュメモリ304の
キャッシュ状態をエクスクルーシブ(E)にしてデータ
をプロセッサ301に返す。本動作により、プロセッサ
301はデータをモディファイすることが可能になる。
この後、プロセッサ101から発行されたReadトラ
ンザクションに対して、キャッシュコントローラ102
がプリフェッチトランザクションを前述したプロセッサ
301発トランザクションと同じアドレスに対して発行
する。プリフェッチトランザクションはキャッシュメモ
リ104、304のキャッシュ状態をシェア状態に変更
し、データをキャッシュメモリ104に登録する。この
プリフェッチトランザクションが完了する前にプロセッ
サ101からRead & INVトランザクションが発
行された場合、キャッシュコントローラ102では、W
ait判定部123によりプロセッサ101にパス16
5を介してリトライ要求を返す。プリフェッチトランザ
クションはキャッシュ状態をシェアにするが、プロセッ
サ101からの後発Read & INVトランザクショ
ンはキャッシュメモリ304のキャッシュ状態をインバ
リデートしなければならない。このため、先発でプリフ
ェッチトランザクションが発行されていても、後発トラ
ンザクションを主記憶103、キャッシュメモリ304
に対して再度発行する必要があるため、パス165を介
してリトライしてプロセッサ101に返す。
From the processor 301 to Read & INV
When a transaction is issued, data is read from the main memory 103, the cache state of the cache memory 104 is invalidated, the cache state of the cache memory 304 is set to exclusive (E), and the data is returned to the processor 301. This operation enables the processor 301 to modify the data.
After that, the cache controller 102 responds to the Read transaction issued from the processor 101.
Issues a prefetch transaction to the same address as the transaction issued by the processor 301 described above. The prefetch transaction changes the cache state of the cache memories 104 and 304 to the shared state and registers the data in the cache memory 104. When the Read & INV transaction is issued from the processor 101 before the completion of this prefetch transaction, the cache controller 102 outputs W
The ait determination unit 123 sends a path 16 to the processor 101.
A retry request is returned via 5. The prefetch transaction shares the cache state, but the subsequent Read & INV transaction from the processor 101 has to invalidate the cache state of the cache memory 304. For this reason, even if the prefetch transaction is issued in advance, the subsequent transaction can be processed in the main memory 103 and the cache memory 304.
Is reissued to the processor 101, and is returned to the processor 101 via the path 165.

【0027】なお、先発プリフェッチトランザクション
のトランザクション種と後発プロセッサ発トランザクシ
ョン種を比べて先発プリフェッチトランザクション種が
Readで後発プロセッサ発トランザクションがRea
d & INVの場合に、キャッシュコントローラ102
がプロセッサ101に対してリトライを返すことで、N
THITトランザクションWaitレジスタ124から
発行するトランザクションは自キャッシュメモリ104
宛のみに限定することができる。
It should be noted that the transaction type of the predecessor prefetch transaction is compared with the transaction type of the late processor, and the prefetch transaction type of the predecessor is Read and the transaction of the late processor is Rea.
In the case of d & INV, the cache controller 102
Returns a retry to the processor 101, and N
The transaction issued from the THIT transaction Wait register 124 is the local cache memory 104.
It can be limited to only the address.

【0028】[0028]

【発明の効果】以上説明したように、本発明によれば、
先発プリフェッチトランザクションと同一アドレスに対
する後発プロセッサ発トランザクションが発生した場合
に、先発プリフェッチトランザクションが完了するまで
後発プロセッサ発トランザクションを待たせるかリトラ
イすることで、無駄なメモリ宛トランザクション数を削
減できる。
As described above, according to the present invention,
When a subsequent processor originating transaction for the same address as the preceding prefetch transaction occurs, the number of useless memory-addressed transactions can be reduced by making the latter processor originating transaction wait until the beginning prefetch transaction is completed or retrying.

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

【図1】本発明が適用されるコンピュータシステムの構
成例を示すブロック図である。
FIG. 1 is a block diagram showing a configuration example of a computer system to which the present invention is applied.

【図2】本発明によるキャッシュコントローラにおける
主要動作の処理フローチャートである。
FIG. 2 is a processing flowchart of main operations in the cache controller according to the present invention.

【図3】本発明による後発プロセッサ発トランザクショ
ンの動作の場合分けを示す図である。
FIG. 3 is a diagram showing case classification of an operation of a late-origin processor-originated transaction according to the present invention.

【図4】本発明をマルチプロセッサシステムに適用した
場合のコンピュータシステムの構成例を示すブロック図
である。
FIG. 4 is a block diagram showing a configuration example of a computer system when the present invention is applied to a multiprocessor system.

【図5】従来技術を適用したコンピュータシステムの構
成例を示す図である。
FIG. 5 is a diagram showing a configuration example of a computer system to which a conventional technique is applied.

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

101 プロセッサ 102 キャッシュコントローラ 103 主記憶 104 キャッシュメモリ 105 プリフェッチ制御部 106 キャッシュ制御部 121 プリフェッチトランザクション種&アドレスレ
ジスタ 122 プリフェッチ生成部 123 Wait判定部 124 NTHITトランザクションWaitレジスタ 125 プリフェッチトランザクション処理状況レジス
タ 126 トランザクション発行部
101 Processor 102 Cache Controller 103 Main Memory 104 Cache Memory 105 Prefetch Control Unit 106 Cache Control Unit 121 Prefetch Transaction Type & Address Register 122 Prefetch Generation Unit 123 Wait Determination Unit 124 NTHIT Transaction Wait Register 125 Prefetch Transaction Processing Status Register 126 Transaction Issuing Unit

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 5B005 JJ11 JJ13 KK12 MM02 NN22 NN75 UU12 5B013 AA05 EE03    ─────────────────────────────────────────────────── ─── Continued front page    F-term (reference) 5B005 JJ11 JJ13 KK12 MM02 NN22                       NN75 UU12                 5B013 AA05 EE03

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 主記憶とキャッシュメモリのアクセス制
御を行い、プロセッサからの主記憶に対するトランザク
ション(以下、プロセッサ発トランザクション)から自
律的にプリフェッチトランザクションを生成し、主記憶
からデータをキャッシュメモリにプリフェッチする手段
を備えたキャッシュコントローラにおいて、 後発のプロセッサ発トランザクションと先発プリフェッ
チトランザクションが同一アドレスにアクセスするか判
定し、同一アドレスにアクセスする場合に後発のプロセ
ッサ発トランザクションと先発プリフェッチトランザク
ションの種類に応じて後発のプロセッサ発トランザクシ
ョンを待ち合わせるかプロセッサにてリトライさせる手
段を有することを特徴とするキャッシュコントローラ。
1. A main memory and a cache memory are access-controlled, a prefetch transaction is autonomously generated from a transaction from a processor to the main memory (hereinafter, a processor-originated transaction), and data is prefetched from the main memory to a cache memory. In the cache controller equipped with the means, it is determined whether the subsequent processor-originated transaction and the predecessor prefetch transaction access the same address. A cache controller having means for waiting for a transaction originating from a processor or for retrying by the processor.
【請求項2】 請求項1記載のキャッシュコントローラ
において、後発のプロセッサ発トランザクション種がR
ead&INVで先発プリフェッチトランザクション種
がReadの場合に、後発のプロセッサ発トランザクシ
ョンをプロセッサにてリトライさせ、それ以外の場合に
は後発のプロセッサ発トランザクションを待ち合わせる
ことを特徴とするキャッシュコントローラ。
2. The cache controller according to claim 1, wherein a transaction type issued by a processor that is subsequently issued is R.
A cache controller characterized by causing a subsequent processor-initiated transaction to be retried by the processor when the predecessor prefetch transaction type is read in READ & INV, and waiting for the later-initiated processor-initiated transaction otherwise.
【請求項3】 プロセッサと、主記憶と、主記憶に記憶
されたデータの一部を格納するキャッシュメモリと、主
記憶とキャッシュメモリのアクセス制御を行うキャッシ
ュコントローラを備えたコンピュータシステムにおい
て、 キャッシュコントローラは、プロセッサからの主記憶に
対するトランザクション(プロセッサ発トランザクショ
ン)から自律的にプリフェッチトランザクションを生成
する手段と、該生成したプリフェッチトランザクション
をもとに主記憶からデータをキャッシュメモリにプリフ
ェッチする手段と、後発のプロセッサ発トランザクショ
ンと先発プリフェッチトランザクションが同一アドレス
にアクセスするか判定し、同一アドレスにアクセスする
場合に後発のプロセッサ発トランザクションと先発プリ
フェッチトランザクションの種類に応じて後発のプロセ
ッサ発トランザクションを待ち合わせるかプロセッサに
てリトライさせる手段を有することを特徴とするプロセ
ッサシステム。
3. A cache controller in a computer system comprising a processor, a main memory, a cache memory for storing a part of data stored in the main memory, and a cache controller for controlling access to the main memory and the cache memory. Is a means for autonomously generating a prefetch transaction from a transaction from the processor to the main memory (a transaction originating from the processor); a means for prefetching data from the main memory into the cache memory based on the generated prefetch transaction; It is determined whether the processor-originated transaction and the predecessor prefetch transaction access the same address. Processor system, characterized in that it comprises means for retry at the kind or wait for processor onset transaction late depending on the processor of transfection.
JP2001198098A 2001-06-29 2001-06-29 Cache controller and computer system Pending JP2003015955A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001198098A JP2003015955A (en) 2001-06-29 2001-06-29 Cache controller and computer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001198098A JP2003015955A (en) 2001-06-29 2001-06-29 Cache controller and computer system

Publications (1)

Publication Number Publication Date
JP2003015955A true JP2003015955A (en) 2003-01-17

Family

ID=19035597

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001198098A Pending JP2003015955A (en) 2001-06-29 2001-06-29 Cache controller and computer system

Country Status (1)

Country Link
JP (1) JP2003015955A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008046958A (en) * 2006-08-18 2008-02-28 Fujitsu Ltd System controller, prevention method of queuing same address requests, and information processor
JP2010277180A (en) * 2009-05-26 2010-12-09 Fujitsu Semiconductor Ltd Information processing system and data transfer method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008046958A (en) * 2006-08-18 2008-02-28 Fujitsu Ltd System controller, prevention method of queuing same address requests, and information processor
JP4680851B2 (en) * 2006-08-18 2011-05-11 富士通株式会社 System controller, same address request queuing prevention method, and information processing apparatus
JP2010277180A (en) * 2009-05-26 2010-12-09 Fujitsu Semiconductor Ltd Information processing system and data transfer method

Similar Documents

Publication Publication Date Title
US9405696B2 (en) Cache and method for cache bypass functionality
US5774700A (en) Method and apparatus for determining the timing of snoop windows in a pipelined bus
US6272602B1 (en) Multiprocessing system employing pending tags to maintain cache coherence
US7991928B2 (en) Retry mechanism
US6321296B1 (en) SDRAM L3 cache using speculative loads with command aborts to lower latency
EP0743601A2 (en) A system and method for improving cache performance in a multiprocessing system
EP1311956B1 (en) Method and apparatus for pipelining ordered input/output transactions in a cache coherent, multi-processor system
US11500797B2 (en) Computer memory expansion device and method of operation
US6260117B1 (en) Method for increasing efficiency in a multi-processor system and multi-processor system with increased efficiency
US7949832B2 (en) Latency reduction for cache coherent bus-based cache
US6345320B1 (en) DMA address buffer and cache-memory control system
US7165146B2 (en) Multiprocessing computer system employing capacity prefetching
US5987544A (en) System interface protocol with optional module cache
US6098115A (en) System for reducing storage access latency with accessing main storage and data bus simultaneously
JPH06318174A (en) Cache memory system and method for performing cache for subset of data stored in main memory
US20060179173A1 (en) Method and system for cache utilization by prefetching for multiple DMA reads
US6976128B1 (en) Cache flush system and method
JPH0467242A (en) Cache memory control system
JPH10501914A (en) Shared cache memory device
JP2000132531A (en) Multiprocessor
US7328310B2 (en) Method and system for cache utilization by limiting number of pending cache line requests
US7234028B2 (en) Power/performance optimized cache using memory write prevention through write snarfing
JP2003015955A (en) Cache controller and computer system
JP2000137646A (en) Cache memory control method in multiprocessor system and the same system
JPWO2007096978A1 (en) Snoop control method and information processing apparatus