JP2954178B1 - Variable cache method - Google Patents

Variable cache method

Info

Publication number
JP2954178B1
JP2954178B1 JP10181067A JP18106798A JP2954178B1 JP 2954178 B1 JP2954178 B1 JP 2954178B1 JP 10181067 A JP10181067 A JP 10181067A JP 18106798 A JP18106798 A JP 18106798A JP 2954178 B1 JP2954178 B1 JP 2954178B1
Authority
JP
Japan
Prior art keywords
data
memory
cache
address
entry
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP10181067A
Other languages
Japanese (ja)
Other versions
JP2000020396A (en
Inventor
洋子 磯部
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Computertechno Ltd
Original Assignee
NEC Computertechno 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 NEC Computertechno Ltd filed Critical NEC Computertechno Ltd
Priority to JP10181067A priority Critical patent/JP2954178B1/en
Application granted granted Critical
Publication of JP2954178B1 publication Critical patent/JP2954178B1/en
Publication of JP2000020396A publication Critical patent/JP2000020396A/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

【要約】 【課題】プログラムの性質に合わせて最適なキャッシュ
構成をとれるようにして、キャッシュメモリの性能を向
上させる。 【解決手段】基本ブロック(A)のエントリ数がB(B
≧2)である組をC(C≧2)レベル有する基本構成で
あるキャッシュメモリ10と、キャッシュメモリ10に
記憶するブロック単位として基本ブロックをn個使うこ
とを示す情報を格納するキャッシュ構成指示フィールド
31と、キャッシュ構成指示フィールド31に格納され
た内容にしたがって、n個の基本ブロック(A)がブロ
ック単位となり、そのときのウェイ数がC/nとなるよ
うに、キャッシュメモリ10の構成を変化させるキャッ
シュ構成変更手段33と、を設ける。
Abstract: PROBLEM TO BE SOLVED: To improve the performance of a cache memory so that an optimum cache configuration can be obtained according to the characteristics of a program. The number of entries in a basic block (A) is B (B
.Gtoreq.2), a cache memory 10 having a basic configuration having C (C.gtoreq.2) levels, and a cache configuration indication field for storing information indicating that n basic blocks are used as a block unit to be stored in the cache memory 10. 31 and the contents stored in the cache configuration instruction field 31, the configuration of the cache memory 10 is changed such that n basic blocks (A) are in block units and the number of ways at that time is C / n. And a cache configuration changing unit 33 for performing the setting.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、情報処理装置に使
用されるキャッシュメモリに関する。
[0001] The present invention relates to a cache memory used in an information processing apparatus.

【0002】[0002]

【従来の技術】計算機システムなどの情報処理装置で
は、相対的に処理速度が小さい主記憶装置と相対的に処
理速度が大きい演算処理装置との間に、主記憶装置より
は速いが記憶容量は小さいキャッシュメモリを配置し、
主記憶装置内の情報のコピーを一時的にキャッシュメモ
リに格納するようにして、演算処理装置からみた主記憶
装置の見かけ上の速度を高めるようにしている。主記憶
内のデータとキャッシュメモリ内のデータとをどのよう
に対応させ主記憶からどのようにキャッシュメモリにデ
ータブロックを転送するかの方式(マッピング方式)に
はいくつかあるが、いずれの方式であっても、従来、キ
ャッシュメモリに記憶するブロック単位、エントリ数及
びレベル数が固定的に決められている。
2. Description of the Related Art In an information processing apparatus such as a computer system, between a main storage device having a relatively low processing speed and an arithmetic processing device having a relatively high processing speed, the storage capacity is higher than that of the main storage device. Place a small cache memory,
A copy of the information in the main storage device is temporarily stored in the cache memory so as to increase the apparent speed of the main storage device as viewed from the arithmetic processing unit. There are several methods (mapping methods) for associating data in the main memory with data in the cache memory and transferring data blocks from the main memory to the cache memory. Even so, conventionally, the block unit, the number of entries, and the number of levels to be stored in the cache memory are fixedly determined.

【0003】しかしながら、キャッシュメモリに記憶す
るブロック単位、エントリ数及びレベル数が固定的に決
められていると、実行するプログラムの性質によって
は、ブロック単位でキャッシュに登録したデータを有効
に活用できないという問題点を生じる。例えば、科学技
術計算のように大きな配列を扱うような場合、キャッシ
ュメモリのブロック単位が大きい方が性能が向上するケ
ースと、ブロック単位は小さいがキャッシュメモリのウ
ェイ数が多い方が性能が向上するケースとが生じる。ど
ちらのケースとなるかは、プログラムやアルゴリズムに
依存する。
However, if the block unit, the number of entries and the number of levels to be stored in the cache memory are fixedly determined, the data registered in the cache in block units cannot be effectively used depending on the nature of the program to be executed. Create problems. For example, in the case of handling a large array as in the case of scientific and technical calculations, the performance is improved when the block unit of the cache memory is large, and the performance is improved when the block unit is small but the number of ways of the cache memory is large. A case arises. Which case depends on the program or algorithm.

【0004】さて、図5は従来のキャッシュ方式の構成
を示すブロック図である。ここでは、情報処理装置の演
算処理装置がスカラ命令の処理のみを行うスカラ処理装
置であるとして、主記憶装置とスカラ処理装置の間に、
キャッシュメモリ50が介在しているものとする。キャ
ッシュメモリ50は、タグメモリ51とデータメモリ5
2とによって構成されている。データメモリ52は、主
記憶装置内のデータのコピーをブロック単位で格納する
ものである。また、タグメモリ51は、データメモリ5
2の各ブロックに格納されているデータの実アドレス情
報を保持するものである。
FIG. 5 is a block diagram showing a configuration of a conventional cache system. Here, it is assumed that the arithmetic processing unit of the information processing device is a scalar processing device that performs only the processing of the scalar instruction.
It is assumed that the cache memory 50 is interposed. The cache memory 50 includes a tag memory 51 and a data memory 5.
And 2. The data memory 52 stores a copy of data in the main storage device in block units. Also, the tag memory 51 is
2 holds real address information of data stored in each block.

【0005】データをアクセスするために生成されたア
ドレスを保持するアドレスレジスタ60が設けられてお
り、このアドレスレジスタ60からは、ブロック内アド
レスがデータメモリ52に出力するとともに、セットア
ドレスがタグメモリ51に出力している。さらに、タグ
メモリ51から読み出されたアドレス情報とアクセスす
べきデータの実アドレスとを比較する比較器61と、比
較器61での比較結果にしたがってデータメモリ52か
ら読み出されるデータを選択する選択回路62とが設け
られている。
An address register 60 for holding an address generated for accessing data is provided. From this address register 60, an address in a block is output to a data memory 52, and a set address is stored in a tag memory 51. Output to Further, a comparator 61 for comparing the address information read from the tag memory 51 with the real address of the data to be accessed, and a selection circuit for selecting data read from the data memory 52 according to the result of the comparison by the comparator 61 62 are provided.

【0006】図6は、図5に示すキャッシュ方式におけ
るタグメモリ51とデータメモリ52のそれぞれの内容
の一例を示す図である。タグメモリ51とデータメモリ
52は、それぞれエントリを有する。タグメモリエント
リ100は、そのタグメモリエントリに対応するデータ
メモリエントリに格納されているデータのアドレス情報
を保持している。一方、データメモリエントリ200
は、複数のデータで構成されている。ここでは、各デー
タメモリエントリ200がそれぞれ8個のバイトデータ
からなるとともに、1つのデータメモリエントリは64
バイト構成であるものと仮定する。またデータメモリエ
ントリ200の8個のデータに対し、“000”〜“1
11”(2進表記)のブロック内アドレスがつけられて
いる。
FIG. 6 is a diagram showing an example of the contents of each of the tag memory 51 and the data memory 52 in the cache system shown in FIG. The tag memory 51 and the data memory 52 each have an entry. The tag memory entry 100 holds address information of data stored in a data memory entry corresponding to the tag memory entry. On the other hand, data memory entry 200
Is composed of a plurality of data. Here, each data memory entry 200 is composed of eight byte data, and one data memory entry is 64 bytes.
Assume the byte configuration. Also, “000” to “1” are assigned to the eight data of the data memory entry 200.
11 "(binary notation) in the block.

【0007】次に、この従来のキャッシュ方式の具体的
な動作について説明する。
Next, a specific operation of the conventional cache system will be described.

【0008】スカラ処理装置よりキャッシュメモリ50
上のデータをアクセスする場合、アクセスすべきアドレ
スをアドレスレジスタ60にセットして、タグメモリ5
1及びデータメモリ52をアクセスする。ここで述べた
例の場合、データメモリ52の縦方向のエントリ数が8
レベルであって、各データメモリエントリ内が8バイト
データを8個有しているので、アドレスレジスタ60が
仮に32ビット幅のアドレスレジスタであるとすると、
タグメモリ51へのセットは、アドレスの23ビット目
〜25ビット目(計3ビット)で指定され、またデータ
メモリ52のブロック内アドレスは、アドレスの26ビ
ット目〜28ビット目(計3ビット)で指定される。
[0008] The cache memory 50 from the scalar processing device
When accessing the above data, the address to be accessed is set in the address register 60 and the tag memory 5 is accessed.
1 and the data memory 52 are accessed. In the case of the example described here, the number of entries in the vertical direction of the data memory 52 is eight.
Level, and since each data memory entry has eight 8-byte data, if the address register 60 is an address register having a 32-bit width,
The setting in the tag memory 51 is specified by the 23rd to 25th bits (total 3 bits) of the address, and the address in the block of the data memory 52 is the 26th to 28th bits (total 3 bits) of the address. Is specified by

【0009】ここでは図示するようにタグメモリ51及
びデータメモリ50の横方向のレベル数が2ウェイ構成
(ウェイ1,ウェイ2)になっていると仮定すると、ア
ドレスが指定されたタグメモリ51とデータメモリ52
からは、2レベル分の情報が読み出され、タグメモリ5
1から読み出された2レベル分のアドレス情報と実アド
レスとを比較器61で比較する。比較器61は、どちら
のウェイと一致したかという比較結果を選択回路62に
送出する。選択回路62は、データメモリ52より読み
出した2レベル分の各8バイトデータのうち、比較器6
1からの比較結果に応じてどちらか片方のレベルの方の
8データを選択し、スカラ処理装置へデータを送出す
る。ここでもしタグメモリ51から読み出した2つのウ
ェイのアドレス情報と実アドレスが一致しない場合に
は、データメモリ52内にはアクセスしたいデータは登
録されていないことになり、その場合は、主記憶装置か
らデータを読み出し、指定されたタグメモリエントリ及
びデータメモリエントリに対し、それらのエントリでの
片方のウェイにデータを登録する。主記憶装置からは1
つのデータメモリエントリへ64バイトのデータを転送
する。データを登録すべきウェイの指定方法としては、
例えば、最後に使用されてから最も長い時間が経過した
ブロックに新たにデータを格納するというLRU(Leas
t Recently Used)法が知られている。
Here, assuming that the number of levels in the horizontal direction of the tag memory 51 and the data memory 50 is a two-way configuration (way 1 and way 2) as shown in the figure, the tag memory 51 having an address specified is Data memory 52
From the tag memory 5
The comparator 61 compares the address information of two levels read from 1 with the real address. The comparator 61 sends a comparison result indicating which way it matches to the selection circuit 62. The selection circuit 62 outputs the comparator 6 of the 8-byte data of two levels read from the data memory 52.
In accordance with the comparison result from 1, one of the eight levels is selected, and the data is sent to the scalar processing device. If the address information of the two ways read from the tag memory 51 does not match the actual address, the data to be accessed is not registered in the data memory 52. , And for the specified tag memory entry and data memory entry, the data is registered in one way of those entries. 1 from main storage
Transfer 64 bytes of data to one data memory entry. To specify the way to register the data,
For example, an LRU (Leas) in which data is newly stored in a block that has passed the longest time since it was last used.
t Recently Used) method is known.

【0010】さて、実際のプログラムを処理する場合を
例に挙げて、図5に示す従来のキャッシュ方式の動作を
説明する。ここでは、図7に示す、FORTRAN(フ
ォートラン)言語で書かれたプログラムを処理するもの
とする。このプログラムは、X(I)*Y(I)+Z(I)を
計算してそれをW(I)に代入することを、Iが1から3
2までの整数について順次繰り返すものである。ここ
で、X,Y,Zはそれぞれ配列を示し、各配列とも512
バイト境界にアライン(整合)されており、X(1),Y
(1)及びZ(1)が64バイト境界の先頭のアドレスであ
ると仮定する。またWも配列である。
Now, the operation of the conventional cache system shown in FIG. 5 will be described by taking as an example the case of processing an actual program. Here, it is assumed that a program written in the FORTRAN language shown in FIG. 7 is processed. This program computes X (I) * Y (I) + Z (I) and substitutes it for W (I), where I is 1 to 3
This is sequentially repeated for integers up to 2. Here, X, Y, and Z each indicate an array, and each array has 512
X (1), Y
Assume that (1) and Z (1) are the first address on a 64-byte boundary. W is also an array.

【0011】最初にI=1の時、スカラ処理装置がX
(1)を主記憶装置からロードするが、まずはキャッシュ
メモリ50をアクセスする。その際、X(1)のアドレス
情報がアドレスレジスタ60に保持されるが、配列が5
12バイト境界にアラインされているためこのときのア
ドレスレジスタ60のアドレスの23ビット目〜25ビ
ット目は“000”になっている。そして、タグメモリ
51のウェイ1のエントリ00とウェイのエントリ1
0を読み出して、比較器61により、これらのエントリ
とX(1)の実アドレスとを比較する。プログラム処理の
最初の時点ではデータはキャッシュメモリ50には登録
されていないので、タグメモリ51から読み出したアド
レスと実アドレスとは一致せず(キャッシュミスヒッ
ト)、主記憶装置からデータを読み出してデータメモリ
52のウェイ1のエントリ00に64バイトのデータ
(X(1)〜X(8)のデータ)を、タグメモリ51のウェ
イ1のエントリ00にアドレス情報を登録し、スカラ処
理装置にX(1)のデータを送る。
First, when I = 1, the scalar processing device
(1) is loaded from the main storage device, but the cache memory 50 is first accessed. At this time, the address information of X (1) is held in the address register 60, but the array is 5
Since the data is aligned on a 12-byte boundary, the 23rd to 25th bits of the address of the address register 60 at this time are "000". Then, entry 1 of way 1 of tag memory 51 and entry 1 of way 2
0 is read out, and the comparator 61 compares these entries with the real address of X (1). Since the data is not registered in the cache memory 50 at the beginning of the program processing, the address read from the tag memory 51 and the real address do not match (cache miss), and the data is read from the main storage device and read. The 64-byte data (X (1) to X (8) data) is registered in the way 1 entry 00 of the memory 52, the address information is registered in the way 1 entry 00 of the tag memory 51, and the X ( Send the data of 1).

【0012】次に、Y(1)のデータを同様にして主記憶
装置からロードする。この際に、Y(1)のアドレスの2
3ビット目〜25ビット目も“000”になっているの
で、タグメモリ51とデータメモリ52における先程と
は別のウェイ(ウェイ2)のエントリ10に、アドレス
情報と64バイトのデータ(Y(1)〜Y(8)のデータ)
が登録される。ここで、スカラ処理装置が、X(1)とY
(1)とを乗算する。この時点を時刻Aとすると、データ
メモリ5においては、図8(a)に示すようなデータが
各エントリに登録されている。
Next, the data of Y (1) is similarly loaded from the main storage device. At this time, the address of Y (1) 2
Since the third to 25th bits are also “000”, the address information and the 64-byte data (Y (Y ()) are stored in the entry 10 of a different way (way 2) in the tag memory 51 and the data memory 52. 1) to Y (8) data)
Is registered. Here, the scalar processing device is X (1) and Y
(1) is multiplied. When this point as the time A, the data memory 5 2, data as shown in FIG. 8 (a) is registered in each entry.

【0013】続いて、Z(1)のデータをロードする。こ
のとき、Z(1)のアドレスの23ビット目〜25ビット
目も“000”になっているから、タグメモリ51のウ
ェイ1のエントリ00とウェイ2のエントリ10のアド
レスが読み出され、比較器61においてZ(1)の実アド
レスと比較される。エントリ00にはX(1)のアドレス
情報が、エントリ10にはY(1)のアドレス情報が格納
されているため、比較器61の比較結果は不一致を示
し、その結果、主記憶装置側からZ(1)を含む64バイ
トのデータがデータメモリ52に転送されてこのデータ
メモリ52に格納され、さらに、Z(1)がスカラ処理装
置に送出される。主記憶装置側から転送されたデータ
は、エントリ00かエントリ10に格納されることにな
るが、ここでLRU法によって格納先を決めている仮定
すると、Z(1)を含む64バイトのデータは、エントリ
00に格納され、タグメモリ51のエントリ00にはZ
(1)のアドレス情報が格納される。スカラ処理装置は、
先程の乗算結果にZ(1)を加算し、結果を主記憶装置に
ストアする。ここではストアスルー方式で書き込みが行
われると仮定すると、ストアデータは、キャッシュメモ
リには登録されずに、主記憶装置上の配列Wに指定され
た領域のW(1)に格納される。この時点を時刻Bとする
と、データメモリ51においては、図8(b)に示すよう
なデータが各エントリに登録されている。
Subsequently, data of Z (1) is loaded. At this time, since the 23rd to 25th bits of the address of Z (1) are also “000”, the addresses of entry 00 of way 1 and entry 10 of way 2 of tag memory 51 are read out and compared. In the unit 61, the actual address of Z (1) is compared. Since the entry 00 stores the address information of X (1) and the entry 10 stores the address information of Y (1), the comparison result of the comparator 61 indicates a mismatch, and as a result, the main storage device 64-byte data including Z (1) is transferred to the data memory 52 and stored in the data memory 52, and Z (1) is sent to the scalar processing device. The data transferred from the main storage device is stored in the entry 00 or the entry 10. Assuming that the storage destination is determined by the LRU method, the 64-byte data including Z (1) is , And the entry 00 in the tag memory 51,
The address information of (1) is stored. The scalar processing device
Z (1) is added to the result of the previous multiplication, and the result is stored in the main storage device. Here, assuming that writing is performed by the store-through method, the store data is not registered in the cache memory, but is stored in W (1) of the area specified in the array W on the main storage device. This point is time B.
In the data memory 51, as shown in FIG.
Data is registered in each entry.

【0014】次に、Iが更新されI=2になると、X
(2)をロードするが、X(2)のアドレスはX(1)のアド
レスに8バイト加えた値であって、X(2)のアドレスの
23ビット目〜25ビット目は“000”になってい
る。このため、タグメモリ51とデータメモリ52で
は、ウェイ1のエントリ00、ウェイ2のエントリ10
が使用される。タグメモリ51のエントリ00とエント
リ10のアドレスを読み出し、比較器61によってX
(2)の実アドレスと比較を行うが、この時点でエントリ
00にはZ(1)のアドレス情報が、エントリ10にはY
(1)のアドレス情報が格納されているため、比較器61
の比較結果は不一致を示す。その結果、主記憶装置から
X(2)を含む64バイトのデータが読み出されてデータ
メモリ52に登録されるとともにX(2)がスカラ処理装
置に送出される。先にX(1)をデータメモリ52に格納
した際に、連続する64バイトのデータをエントリ00
に格納しているので、X(2)のデータもその時点で一度
はデータメモリ52に登録されている。しかしながら、
後続のZ(1)のロード処理の際に書きつぶされており、
実際にX(2)のデータを必要とする時点では既にキャッ
シュメモリには登録されていない状態となっており、キ
ャッシュミスヒットになる。したがって、X(2)のロー
ドに際しては、再度、主記憶装置をアクセスしなければ
ならない。主記憶装置から読み出されX(2)を含む64
バイトのデータは、データメモリ52のエントリ10に
格納され、タグメモリ51のエントリ10にはX(2)の
アドレス情報が格納される。この時点を時刻Cとする
と、データメモリ51においては、図8(c)に示すよう
なデータが各エントリに登録されていることになる。
Next, when I is updated and I = 2, X
(2) is loaded, but the address of X (2) is a value obtained by adding 8 bytes to the address of X (1), and the 23rd to 25th bits of the address of X (2) are set to “000”. Has become. Therefore, in the tag memory 51 and the data memory 52, the entry 00 of way 1 and the entry 10 of way 2
Is used. The addresses of the entry 00 and the entry 10 of the tag memory 51 are read out, and the X
The comparison with the real address of (2) is performed. At this point, the address information of Z (1) is stored in the entry 00, and the Y address is stored in the entry 10.
Since the address information of (1) is stored, the comparator 61
Indicates a mismatch. As a result, 64-byte data including X (2) is read from the main storage device, registered in the data memory 52, and X (2) is sent to the scalar processing device. First, when X (1) is stored in the data memory 52, the continuous 64-byte data is stored in the entry 00.
, The data of X (2) is once registered in the data memory 52 at that time. However,
During the subsequent loading of Z (1),
When the data of X (2) is actually required, it has not been registered in the cache memory, and a cache miss occurs. Therefore, when loading X (2), the main storage must be accessed again. 64 containing X (2) read from main storage
The byte data is stored in the entry 10 of the data memory 52, and the entry 10 of the tag memory 51 stores the address information of X (2). This point is time C.
In the data memory 51, as shown in FIG.
Data is registered in each entry.

【0015】続いて、Y(2)をロードすることになる
が、Y(2)についてもX(2)の場合と同様に、キャッシ
ュメモリにデータが登録されていないので、主記憶装置
をアクセスしてY(2)を含むデータをデータメモリ52
のウェイ1のエントリ10に格納し、Y(2)のアドレス
情報をタグメモリ51のウェイ1のエントリ00に格納
する
Subsequently, Y (2) is loaded. Since no data is registered in the cache memory for Y (2) as in X (2), the main memory is accessed. To store the data containing Y (2) in the data memory 52.
, And the address information of Y (2) is stored in way 00 entry 00 of the tag memory 51 .

【0016】以後、I=3,4,5,6,…,32とそれぞ
れ更新したときにおいても、同様にすべてキャッシュミ
スヒット処理を行う。
Thereafter, even when I = 3, 4, 5, 6,..., 32, respectively, cache miss processing is similarly performed.

【0017】このように従来の技術では、複数の配列の
先頭アドレスが全て同じエントリアドレスを使用するよ
うな場合や、エントリ方向(縦方向)に主記憶装置をア
クセスするようなプログラムを実行する場合に、キャッ
シュメモリにブロック単位(本例では64バイト)で登
録されたデータが後続処理によって書き換えられてしま
い、キャッシュメモリに一旦は登録したデータを有効に
使うことができなかった。
As described above, according to the conventional technique, when the head addresses of a plurality of arrays all use the same entry address, or when a program that accesses the main storage device in the entry direction (vertical direction) is executed. In addition, the data registered in the cache memory in block units (64 bytes in this example) is rewritten by the subsequent processing, and the data once registered in the cache memory cannot be used effectively.

【0018】このような従来のキャッシュメモリの問題
点を解決するために、特開平5−40694号公報は、
キャッシュメモリの構造を可変にすることによってプロ
グラムに対応してキャッシュメモリの構造を選択できる
ようにする技術を開示している。すなわち、この公報に
記載の技術では、ブロック単位以上の連続したデータを
アクセスする場合にエントリ方向の複数のエントリを1
つのブロックサイズとすることによって、一度のキャッ
シュミスヒットによりキャッシュメモリに登録するデー
タ量を多くすることができ、キャッシュミスヒット回数
を減らすことが可能となっている。しかしながら、特開
平5−40694号公報に記載の技術では、レベル方向
(横方向)の構成は変更できないため、同じエントリア
ドレスを使用する配列がレベル数以上あるようなプログ
ラムにおいては、上述したようにキャッシュメモリに一
旦は登録されたデータが後続処理によって書き換えられ
てキャッシュミスヒットが頻繁に発生するという欠点が
生じる。
In order to solve such a problem of the conventional cache memory, Japanese Patent Application Laid-Open No. H5-40694 discloses
A technique is disclosed in which the structure of a cache memory is made variable so that the structure of the cache memory can be selected in accordance with a program. That is, according to the technique described in this publication, a plurality of entries in the entry direction are stored in one entry when accessing continuous data of a block unit or more.
By using one block size, the amount of data registered in the cache memory by one cache miss can be increased, and the number of cache misses can be reduced. However, in the technique described in Japanese Patent Application Laid-Open No. 5-40694, the configuration in the level direction (horizontal direction) cannot be changed. Therefore, in a program in which an array using the same entry address is equal to or more than the number of levels, as described above. There is a drawback in that data once registered in the cache memory is rewritten by subsequent processing, and a cache miss occurs frequently.

【0019】[0019]

【発明が解決しようとする課題】データ処理装置では一
般に不特定多数の応用(アプリケーション)プログラム
が実行されるが、応用プログラムの処理の性質によっ
て、主記憶装置へのアクセスの仕方(パターン)が異な
っている。その一方で、従来のキャッシュメモリでは、
ブロック単位、エントリ数及びレベル数が固定してい
て、これらを柔軟には変更できないようになっている。
特開平5−40694号公報に示されるものであって
も、ブロック単位は可変であってもレベル数は一意に固
定されている。その結果、ブロック単位を大きくし、レ
ベル数を少なくするような構成のキャッシュメモリが設
けられている場合には、同じエントリアドレスを使用す
る配列が複数存在するようなプログラムを実行する際
に、後続処理によってキャッシュメモリに登録されたデ
ータが書き換えられてしまうため、キャッシュメモリに
登録したデータを有効に活用できずキャッシュミスヒッ
ト処理が多発し、スループットの低下がもたらされる。
逆に、ブロック単位を小さくしてレベル数を大きくする
ような構成のキャッシュメモリが設けられている場合に
は、主記憶装置上で連続した大量のデータをアクセスす
る際に、一度にキャッシュメモリに登録できるデータ量
が少ないためキャッシュメモリへの登録を何回も行う必
要が生じる。どちらのキャッシュ構成がよいのかはプロ
グラムに依存するので、従来のキャッシュ方式では、プ
ログラムの性質によっては不適切なキャッシュ構成とな
り、キャッシュメモリの性能が低下してしまうことがあ
る。
In general, an unspecified number of application programs are executed in a data processing apparatus, but the access method (pattern) to a main storage device differs depending on the processing characteristics of the application programs. ing. On the other hand, in the conventional cache memory,
The block unit, the number of entries and the number of levels are fixed and cannot be flexibly changed.
Even in Japanese Unexamined Patent Application Publication No. H5-40694, the number of levels is uniquely fixed even if the block unit is variable. As a result, when a cache memory configured to increase the block unit and reduce the number of levels is provided, when a program in which there are a plurality of arrays using the same entry address is executed, Since the data registered in the cache memory is rewritten by the processing, the data registered in the cache memory cannot be effectively used, and cache mishit processing occurs frequently, resulting in a decrease in throughput.
Conversely, when a cache memory is configured to reduce the block unit and increase the number of levels, when accessing a large amount of continuous data on the main storage device, Since the amount of data that can be registered is small, it is necessary to perform registration in the cache memory many times. Since which cache configuration is better depends on the program, the conventional cache system may have an inappropriate cache configuration depending on the characteristics of the program, and may degrade the performance of the cache memory.

【0020】本発明の目的は、プログラムの性質に合わ
せた最適なキャッシュ構成にすることができて、キャッ
シュメモリの性能を向上させることができる可変式キャ
ッシュ方式を提供することにある。
An object of the present invention is to provide a variable cache system which can have an optimal cache configuration according to the characteristics of a program and can improve the performance of a cache memory.

【0021】[0021]

【課題を解決するための手段】本発明の可変キャッシュ
方式は、実行するプログラムの性質に合わせてキャッシ
ュメモリの構成を変更できるようにしたものである。よ
り具体的には、本発明の可変式キャッシュ方式は、主記
憶装置と主記憶装置からデータをロードして処理する処
理装置との間に配置される可変式キャッシュ方式におい
て、処理装置がスカラ命令の処理を行うスカラ処理装置
であり、基本ブロック(A)のエントリ数がB(Bは2
以上の整数)である組をC(Cは2以上の整数)レベル
有する基本構成であって、主記憶装置に格納されている
データの写しをブロック単位で記憶することを可能とす
るキャッシュメモリと、キャッシュメモリに記憶するブ
ロック単位として基本ブロックをn個使うことを示す情
報を格納するキャッシュ構成指示フィールドと、キャッ
シュ構成指示フィールドに格納された内容にしたがっ
て、n個の基本ブロック(A)がブロック単位となり、
そのときのウェイ数がC/nとなるように、キャッシュ
メモリの構成を変化させるようキャッシュメモリに指示
するキャッシュ構成変更手段とを有し、プログラムのソ
ースコードをコンパイルして処理装置に実行すべき実行
コードを生成する際に、プログラムの性質に応じて最適
なキャッシュブロック単位を認識し、nの値が決定され
ることを特徴とする
According to the variable cache method of the present invention, the configuration of a cache memory can be changed according to the nature of a program to be executed. More specifically, variable cache system of the present invention, variable cache scheme odor which is disposed between the processing apparatus for processing loads the data from the main memory and the main memory
Scalar processing device where the processing device processes scalar instructions
And the number of entries in the basic block (A) is B (B is 2
A cache memory capable of storing a copy of data stored in the main storage unit in units of blocks, wherein the basic configuration has C (C is an integer of 2 or more) levels having a set of A cache configuration instruction field for storing information indicating that n basic blocks are used as a block unit to be stored in the cache memory, and n basic blocks (A) are divided into blocks according to the contents stored in the cache configuration instruction field. Unit
As the number of ways that time becomes C / n, and a cache configuration changing means for instructing the cache memory to vary the configuration of the cache memory, a program source
To compile source code and execute it on the processing unit
When generating code, optimal depending on the nature of the program
, The value of n is determined.
It is characterized by that .

【0022】本発明では、キャッシュメモリのブロック
単位を可変にし、それにあわせてレベル数も可変にする
ことによって、プログラムの性質に合わせた最適なキャ
ッシュ構成にすることを可能にしている。これによって
キャッシュメモリの性能を向上する。特に、あるプログ
ラムをコンパイルする際に、配列のアクセス方向や使用
配列数などのプログラムの性質によって、最適なキャッ
シュブロック単位を認識し、この認識結果からキャッシ
ュ構成をプログラムに応じた構成(ブロック単位×エン
トリ数×レベル数)に変更することによって、キャッシ
ュメモリに登録したブロック単位のデータを有効に使う
ことができ、キャッシュ性能を高めることが可能とな
る。
According to the present invention, the block configuration of the cache memory is made variable, and the number of levels is made variable in accordance with the block unit, thereby making it possible to obtain an optimum cache configuration according to the characteristics of the program. This improves the performance of the cache memory. In particular, when compiling a program, an optimum cache block unit is recognized according to the program properties such as the array access direction and the number of used arrays, and the cache configuration is determined based on the recognition result as a configuration (block unit × By changing to (the number of entries × the number of levels), data in block units registered in the cache memory can be used effectively, and the cache performance can be improved.

【0023】[0023]

【発明の実施の形態】次に、本発明の好ましい実施の形
態について図面を参照して説明する。
Next, preferred embodiments of the present invention will be described with reference to the drawings.

【0024】図1は、本発明の実施の一形態の可変式キ
ャッシュ方式の構成を示すブロック図である。ここで
は、情報処理装置の演算処理装置がスカラ命令の処理の
みを行うスカラ処理装置であるとして、主記憶装置とス
カラ処理装置の間に、キャッシュメモリ10が介在して
いるものとする。キャッシュメモリ10は、タグメモリ
11とデータメモリ12とによって構成されている。デ
ータメモリ12は、主記憶装置内のデータのコピーをブ
ロック単位で格納するものである。また、タグメモリ1
1は、データメモリ12の各ブロックに格納されている
データの実アドレス情報を保持するものである。ここ
で、タグメモリ11及びデータメモリ12は、それぞ
れ、基本ブロックA、エントリ数(縦方向)B、レベル
数(横方向のウェイの数)Cという構成になっており、
後述するキャッシュ構成変更手段33からの出力信号3
00にしたがって構成(A,B,Cの値)を変更できる
ようになっている。
FIG. 1 is a block diagram showing a configuration of a variable cache system according to an embodiment of the present invention. Here, it is assumed that the cache memory 10 is interposed between the main storage device and the scalar processing device, assuming that the arithmetic processing device of the information processing device is a scalar processing device that performs only scalar instruction processing. The cache memory 10 includes a tag memory 11 and a data memory 12. The data memory 12 stores a copy of data in the main storage device in block units. Also, tag memory 1
1 holds real address information of data stored in each block of the data memory 12. Here, the tag memory 11 and the data memory 12 have a configuration of a basic block A, the number of entries (vertical direction) B, and the number of levels (the number of ways in the horizontal direction) C, respectively.
Output signal 3 from the cache configuration changing means 33 described later
The configuration (values of A, B, and C) can be changed according to 00.

【0025】データをアクセスするために生成されたア
ドレスを保持するアドレスレジスタ20が設けられてお
り、このアドレスレジスタ20からは、ブロック内アド
レスがデータメモリ12に出力するとともに、セットア
ドレスがタグメモリ11に出力している。タグメモリ1
1から読み出されたアドレス情報とアクセスすべきデー
タの実アドレスとを比較する比較器21と、比較器21
での比較結果にしたがってデータメモリ12から読み出
されるデータを選択する選択回路22とが設けられてい
る。
An address register 20 for holding an address generated for accessing data is provided. From this address register 20, an address in the block is output to the data memory 12, and a set address is stored in the tag memory 11. Output to Tag memory 1
And a comparator 21 for comparing the address information read from No. 1 with the real address of the data to be accessed.
And a selection circuit 22 for selecting data to be read from the data memory 12 in accordance with the result of the comparison.

【0026】さらに、この可変式キャッシュ方式には、
レジスタなどとして実装されるプロセス状態語30と、
キャッシュ構成変更手段33が設けられている。プロセ
ス状態語30は、システムのプロセス状態を表わしたり
特定のプロセス状態への移行を指示するためにシステム
に備えられるものであって、ソフトウェアから見ること
ができるもの(すなわちソフトウェアビジブルである、
例えば、レジスタへのセーブ命令、レジスタからのロー
ド命令などとして値を入れたり値を読み取ったりするこ
とができるもの)である。このプロセス状態語30に
は、キャッシュメモリ10において、基本ブロック
(A)をいくつ使用して(n個)1つのブロック単位に
するかを決定するキャッシュ構成指示フィールド31が
含まれる。キャッシュ構成変更手段33は、キャッシュ
構成指示フィールド31からの出力信号にしたがって、
キャッシュ10をブロック単位A×n、エントリ数B、
レベル数C/nの構成にし、キャッシュ10へのデータ
登録及びデータ索引をこの構成に対応するよう制御す
る。ここで、ブロック単位×エントリ数のかたまりをウ
ェイと呼ぶことにすると、レベル数はウェイの数にな
る。図2は、タグメモリ11やデータメモリ12におけ
る、基本ブロック(A)、エントリ数(B)、レベル数
(C)、各ウェイの関係を示している。
Further, in this variable cache system,
A process status word 30 implemented as a register or the like;
A cache configuration changing unit 33 is provided. The process state word 30 is provided in the system to indicate the process state of the system or to indicate the transition to a specific process state, and is visible from software (ie, software visible,
For example, a value can be entered or a value can be read as a save instruction to a register, a load instruction from a register, and the like. The process state word 30 includes a cache configuration instruction field 31 for determining how many (n) basic blocks (A) are to be used as one block unit in the cache memory 10. The cache configuration changing means 33 responds to an output signal from the cache configuration
The cache 10 is divided into blocks A × n, the number of entries B,
The configuration is such that the number of levels is C / n, and the data registration and data index to the cache 10 are controlled to correspond to this configuration. Here, if a group of the block unit × the number of entries is called a way, the number of levels is the number of ways. FIG. 2 shows the relationship between the basic block (A), the number of entries (B), the number of levels (C), and each way in the tag memory 11 and the data memory 12.

【0027】アドレスレジスタ20も、キャッシュ構成
変更手段33からの出力信号301によって、データメ
モリ12内のブロック内アドレスの指定に使用するアド
レスビット数や、タグメモリ11、およびデータメモリ
12のレベル位置の指定に使用するアドレスビット位置
が変更されるように構成されている。タグメモリ11で
も、キャッシュ構成変更手段33からの出力信号302
にしたがって、タグメモリ11から比較器21に読み出
されるウェイが選択される。
The address register 20 also determines the number of address bits used for designating an address in a block in the data memory 12 and the level position of the tag memory 11 and the data memory 12 according to the output signal 301 from the cache configuration changing means 33. The address bit position used for designation is configured to be changed. In the tag memory 11, the output signal 302 from the cache
, The way read from the tag memory 11 to the comparator 21 is selected.

【0028】図3は、タグメモリ11及びデータメモリ
12の各エントリと、キャッシュ構成指示フィールド3
1の内容との関係を示す図であり、図3(a),(b),(c)
は、それぞれ、キャッシュ構成指示フィールド33が"
1","2","4"を示している場合を示している。また、
図3において、符号401〜407は、タグメモリエン
トリ、符号501〜507は、データメモリエントリを
示している。
FIG. 3 shows each entry of the tag memory 11 and the data memory 12 and the cache configuration instruction field 3
3 is a diagram showing the relationship with the contents of FIG.
Indicates that the cache configuration instruction field 33 is "
1 ”,“ 2 ”, and“ 4 ”are shown.
In FIG. 3, reference numerals 401 to 407 denote tag memory entries, and reference numerals 501 to 507 denote data memory entries.

【0029】タグメモリエントリ401〜407は、当
該タグメモリエントリに対応するデータメモリエントリ
に格納されているデータのアドレス情報を保持するもの
である。また、データメモリエントリ501〜507
は、複数のデータで構成されているが、ここでは、4個
の8バイトデータからなって1つのデータメモリエント
リの基本サイズが32バイト構成であると仮定する。デ
ータメモリエントリの4個のデータに対し、ブロック内
アドレスがつけられるが、このキャッシュ方式では、キ
ャッシュ構成変更手段33からの出力信号301によっ
てブロック内アドレスのビット数が変化するようになっ
ている。
The tag memory entries 401 to 407 hold the address information of the data stored in the data memory entry corresponding to the tag memory entry. Also, data memory entries 501 to 507
Is composed of a plurality of data. Here, it is assumed that the basic size of one data memory entry is a 32-byte configuration composed of four 8-byte data. An address in the block is assigned to the four data of the data memory entry. In this cache system, the number of bits of the address in the block changes according to an output signal 301 from the cache configuration changing unit 33.

【0030】データメモリ12の縦方向のエントリ数が
8レベル、アドレスレジスタ20のビット幅が仮に32
ビットであるとすると、キャッシュ構成指示フィールド
31がブロック単位として基本ブロックAを1つ使用す
るよう指定した場合(キャッシュ構成指示フィールド3
1の内容が"1")は、アドレスレジスタ20内に保持さ
れているアドレスの24ビット目〜26ビット目の3ビ
ットを使用してエントリアドレスが指定され、指定され
たエントリ(例えばエントリ00)に対応するタグメモ
リ11(タグメモリエントリ401)にはブロックアド
レスが格納され、そのブロックアドレスから32バイト
のデータ(図示、データ1〜データ4)がデータメモリ
12の対応するデータメモリエントリ501(例えばエ
ントリ00)に格納されていて、このデータには、2進
数で"00"〜"11"のブロック内アドレスがつけられて
いる。ブロック内アドレスを指定するためには、アドレ
スレジスタ20内に格納されているアドレスの27ビッ
ト目と28ビット目の2ビットを使用する。
The number of entries in the vertical direction of the data memory 12 is eight levels, and the bit width of the address register 20 is 32.
If the cache configuration instruction field 31 specifies that one basic block A is used as a block unit (the cache configuration instruction field 3
1 is "1"), the entry address is specified using three bits of the 24th to 26th bits of the address held in the address register 20, and the specified entry (for example, entry 00) , A block address is stored in the tag memory 11 (tag memory entry 401), and 32 bytes of data (illustrated, data 1 to data 4) in the corresponding data memory entry 501 (for example, Entry 00), and this data is given an address in the block of "00" to "11" in binary. In order to specify an address in a block, two bits of the 27th bit and the 28th bit of the address stored in the address register 20 are used.

【0031】キャッシュ構成指示フィールド31がブロ
ック単位として基本ブロックAを2つ使用するように指
定した場合(キャッシュ構成指示フィールド31の内容
が"2")は、アドレスレジスタ20内のアドレスの23
ビット目〜25ビット目の3ビットを使用して縦方向の
エントリのエントリアドレスが指定され、指定されたエ
ントリ(例えばエントリ00)に対応するタグメモリ1
1(タグメモリエントリ402)にはブロックアドレス
が格納されるともに、そのウェイ方向に隣接するタグメ
モリエントリ403(例えばエントリ10)は使用しな
いようにする。また、タグメモリエントリ402に格納
されているブロックアドレスから64バイトのデータ
(図示、データ1〜データ8)が、データメモリ12の
対応するデータメモリエントリ502(例えばエントリ
00)とその隣のデータメモリエントリ503(例えば
エントリ10)に格納されていて、2進数で"000"
〜"111"のブロック内アドレスがつけられている。ブ
ロック内アドレスを指定するためには、アドレスレジス
タ20内のアドレスの26ビット目〜28ビット目の3
ビットを使用する。
When the cache configuration instruction field 31 specifies that two basic blocks A are used as a block unit (the content of the cache configuration instruction field 31 is "2"), the address 23 in the address register 20 is used.
The entry address of the entry in the vertical direction is specified using the three bits from the bit to the 25th bit, and the tag memory 1 corresponding to the specified entry (for example, entry 00)
The block address is stored in 1 (tag memory entry 402), and the tag memory entry 403 (for example, entry 10) adjacent in the way direction is not used. Also, 64 bytes of data (illustrated, data 1 to data 8) from the block address stored in the tag memory entry 402 are stored in the corresponding data memory entry 502 (for example, entry 00) of the data memory 12 and the adjacent data memory. It is stored in the entry 503 (for example, entry 10) and is "000" in binary.
ア ド レ ス “111” in the block. In order to specify an address in a block, the address in the address register 20 must be set in the 3rd bit of the 26th to 28th bits.
Use bits.

【0032】キャッシュ構成指示フィールド31がブロ
ック単位として基本ブロックAを4つ使用するように指
定した場合(キャッシュ構成指示フィールド31の内容
が"4")は、アドレスレジスタ20内のアドレスの22
ビット目〜24ビット目までの3ビットを使用して縦方
向のエントリのエントリアドレスが指定され、指定され
たエントリ(例えばエントリ00)に対応するタグメモ
リ11(タグメモリエントリ404)にはブロックアド
レスが格納される。タグメモリエントリ404に引き続
く3つのウェイ(ウェイ2〜ウェイ4)のデータメモリ
エントリ405〜407(例えばエントリ10、エント
リ20、エントリ30)は使用しないようにする。ま
た、タグメモリエントリ404に格納されているブロッ
クアドレスから128バイトのデータ(図示、データ1
〜データ16)が、データメモリ12の対応するデータ
メモリエントリ504(例えばエントリ00)と、これ
に引き続く3つデータメモリエントリ505〜507
(例えばエントリ10、エントリ20、エントリ30)
に格納されていて、2進数で"0000"〜"1111"の
ブロック内アドレスがつけられている。ブロック内アド
レスを指定するためには、アドレスレジスタ20内のア
ドレスの25ビット目から28ビット目までの4ビット
を使用する。
When the cache configuration instruction field 31 specifies that four basic blocks A are used as a block unit (the content of the cache configuration instruction field 31 is “4”), the address 22 in the address register 20 is used.
The entry address of the vertical entry is specified using the three bits from the bit to the 24th bit, and the block address is assigned to the tag memory 11 (tag memory entry 404) corresponding to the specified entry (eg, entry 00). Is stored. The data memory entries 405 to 407 (for example, entry 10, entry 20, and entry 30) of three ways (way 2 to way 4) following the tag memory entry 404 are not used. Also, 128 bytes of data (shown in the figure, data 1) from the block address stored in the tag memory entry 404
To data 16) are the corresponding data memory entry 504 (for example, entry 00) of the data memory 12 and the following three data memory entries 505 to 507.
(For example, entry 10, entry 20, entry 30)
, And the addresses in the block from "0000" to "1111" are given in binary. In order to specify the address in the block, four bits from the 25th bit to the 28th bit of the address in the address register 20 are used.

【0033】次に、より具体的な動作について説明す
る。ここでは、タグメモリ11及びデータメモリ12の
基本ブロックAは32バイト構成、エントリ数(縦方向
のエントリ数)Bは8個、レベル数(横方向のウェイ
数)Cは4個と仮定する。
Next, a more specific operation will be described. Here, it is assumed that the basic block A of the tag memory 11 and the data memory 12 has a 32-byte configuration, the number of entries (the number of entries in the vertical direction) B is eight, and the number of levels (the number of ways in the horizontal direction) C is four.

【0034】ソフトウェアビジブルなプロセス状態語3
0において、そのキャッシュ構成指示フィールド31に
おいてブロック単位として基本ブロックを1つ使用する
ように指定されると、キャッシュ構成変更手段30は、
キャッシュメモリ10に対して出力信号300を送出し
て、タグメモリ11及びデータメモリ12を含むキャッ
シュメモリ10の構成を、ブロック単位がA(32バイ
ト)、エントリ数がB、レベル数がC(4ウェイ)とい
う構成に変更する。同時に、キャッシュメモリ10の構
成においてブロック単位がA(32バイト)であるとい
うことを示す出力信号301〜303を送出する。
Software-visible process state word 3
0, the cache configuration changing means 30 specifies that one basic block is used as a block unit in the cache configuration instruction field 31.
An output signal 300 is sent to the cache memory 10 to change the configuration of the cache memory 10 including the tag memory 11 and the data memory 12 into A (32 bytes) in block units, B entries, and C (4 Way). At the same time, output signals 301 to 303 indicating that the block unit is A (32 bytes) in the configuration of the cache memory 10 are transmitted.

【0035】キャッシュメモリ10上のデータにスカラ
処理装置からアクセスする場合、アクセスするデータの
アドレスをアドレスレジスタ20にセットし、出力信号
301にしたがって、アドレスの24ビット目〜26ビ
ット目の3ビットにより、タグメモリ11及びデータメ
モリ12の縦方向(エントリ方向)のアドレスを指定
し、アドレスが指定されたタグメモリ11及びデータメ
モリ12からは、Cレベル(4ウェイ)分の情報が読み
出される。このとき、タグメモリ11から4ウェイ分の
アドレス情報を読み出すことは、出力信号302によっ
て指定されている。タグメモリ11から読み出された4
ウェイ分のアドレス情報と実アドレスとを比較器21で
比較し、どのウェイと一致したかという比較結果が選択
回路22に送出される。
When accessing data in the cache memory 10 from the scalar processing device, the address of the data to be accessed is set in the address register 20, and according to the output signal 301, the three bits of the 24th to 26th bits of the address are used. , The address in the vertical direction (entry direction) of the tag memory 11 and the data memory 12 is designated, and information for the C level (4 ways) is read from the tag memory 11 and the data memory 12 to which the address is designated. At this time, reading of the address information for four ways from the tag memory 11 is specified by the output signal 302. 4 read from the tag memory 11
The address information of the way and the real address are compared by the comparator 21, and the comparison result indicating which way matches is sent to the selection circuit 22.

【0036】データメモリ12からは、アドレスレジス
タ20内のアドレスの27ビット目と28ビット目の2
ビットで指定されるブロック内アドレスに対応する8バ
イトデータが4ウェイ分読み出される。すると選択回路
22は、データメモリ12より読み出した4ウェイ分の
8バイトデータのうち、比較器21からの比較結果に応
じて1つのデータを選択し、この選択したデータをスカ
ラ処理装置へ送出する。ここでもしタグメモリ11より
読み出した4ウェイ分のアドレス情報と実アドレスとが
一致しない場合は、データメモリ12内にはアクセスし
たいデータは登録されていないことになり、主記憶装置
からデータを読み出し、指定されたタグメモリエントリ
及びデータメモリエントリの指定されたウェイにアドレ
ス情報及びデータをそれぞれ登録する。その際、キャッ
シュ構成変更手段33からの出力信号303にしたがっ
て、主記憶装置からは、1つのデータメモリエントリへ
32バイトのデータが転送される。
From the data memory 12, the 27th and 28th bits of the address in the address register 20
The 8-byte data corresponding to the address in the block specified by the bit is read for four ways. Then, the selection circuit 22 selects one of the four bytes of 8-byte data read from the data memory 12 according to the comparison result from the comparator 21, and sends the selected data to the scalar processing device. . If the address information of the four ways read from the tag memory 11 does not match the real address, the data to be accessed is not registered in the data memory 12, and the data is read from the main storage device. The address information and the data are registered in the designated way of the designated tag memory entry and the designated memory memory entry, respectively. At that time, according to the output signal 303 from the cache configuration changing unit 33, 32 bytes of data are transferred from the main storage device to one data memory entry.

【0037】キャッシュ構成指示フィールド31におい
て、ブロック単位として基本ブロックを2つ使用するよ
うに指定されていると、キャッシュ構成変更手段33
は、出力信号300を送出して、タグメモリ11及びデ
ータメモリ12を含むキャッシュメモリ10の構成を、
ブロック単位がA×2(64バイト)、エントリ数が
B、レベル数がC/2(2ウェイ)という構成に変更す
る。またキャッシュ構成変更手段33は、ブロック単位
がA×2(64バイト)であるということを示す出力信
号301〜303も送出する。
If it is specified in the cache configuration instruction field 31 that two basic blocks are used as a block unit, the cache configuration changing means 33
Sends out the output signal 300 to change the configuration of the cache memory 10 including the tag memory 11 and the data memory 12,
The configuration is changed so that the block unit is A × 2 (64 bytes), the number of entries is B, and the number of levels is C / 2 (2 ways). The cache configuration changing unit 33 also sends output signals 301 to 303 indicating that the block unit is A × 2 (64 bytes).

【0038】キャッシュメモリ10上のデータにスカラ
処理装置からアクセスする場合、アクセスするデータの
アドレスをアドレスレジスタ20にセットし、出力信号
301にしたがって、アドレスの23ビット目から25
ビット目までの3ビットにより、タグメモリ11及びデ
ータメモリ12の縦方向(エントリ方向)のアドレスを
指定し、アドレスが指定されたタグメモリ11及びデー
タメモリ12からは、C/2レベル(2ウェイ)分の情
報が読み出される。このとき、タグメモリ11から2ウ
ェイ分のアドレス情報を読み出すことは、出力信号30
2によって指定されており、アドレス情報が格納されて
いるウェイ(ウェイ1とウェイ)を読み出すよう指定
される。タグメモリ11から読み出された2ウェイ分の
アドレス情報と実アドレスとを比較器21で比較し、ど
のウェイと一致したかという比較結果が選択回路22に
送出される。
When accessing the data in the cache memory 10 from the scalar processing device, the address of the data to be accessed is set in the address register 20, and from the 23rd bit of the address to 25 th according to the output signal 301.
With the three bits up to the bit, the address in the vertical direction (entry direction) of the tag memory 11 and the data memory 12 is specified, and from the tag memory 11 and the data memory 12 to which the address is specified, the C / 2 level (2 way) is specified. ) Minute information is read. At this time, reading out the address information for two ways from the tag memory 11 is based on the output signal 30.
2, and the way (way 1 and way 2 ) in which the address information is stored is designated to be read. The comparator 21 compares the address information of the two ways read from the tag memory 11 with the real address, and a comparison result indicating which way it matches is sent to the selection circuit 22.

【0039】データメモリ12からは、アドレスレジス
タ20内のアドレスの26ビット目〜28ビット目の3
ビットで指定されるブロック内アドレスに対応する8バ
イトデータが2ウェイ分読み出される。すると選択回路
22は、データメモリ12より読み出した2ウェイ分の
8バイトデータのうち、比較器21からの比較結果に応
じて1つのデータを選択し、この選択したデータをスカ
ラ処理装置へ送出する。ここでもしタグメモリ11より
読み出した2ウェイ分のアドレス情報と実アドレスとが
一致しない場合は、データメモリ12内にはアクセスし
たいデータは登録されていないことになり、主記憶装置
からデータを読み出し、指定されたタグメモリエントリ
及びデータメモリエントリの指定されたウェイにアドレ
ス情報及びデータをそれぞれ登録する。その際、キャッ
シュ構成変更手段33からの出力信号303にしたがっ
て、主記憶装置からは、レベル方向に連続する2つのデ
ータメモリエントリへ64バイトのデータが転送され
る。
From the data memory 12, 3rd of the 26th to 28th bits of the address in the address register 20
The 8-byte data corresponding to the address in the block specified by the bit is read for two ways. Then, the selection circuit 22 selects one of the two-way 8-byte data read from the data memory 12 according to the comparison result from the comparator 21 and sends the selected data to the scalar processing device. . If the two-way address information read from the tag memory 11 does not match the real address, the data to be accessed is not registered in the data memory 12, and the data is read from the main storage device. The address information and the data are registered in the designated way of the designated tag memory entry and the designated memory memory entry, respectively. At that time, according to the output signal 303 from the cache configuration changing means 33, 64-byte data is transferred from the main storage device to two data memory entries that are continuous in the level direction.

【0040】キャッシュ構成指示フィールド31におい
て、ブロック単位として基本ブロックを4つ使用するよ
うに指定されていると、キャッシュ構成変更手段33
は、出力信号300を送出して、タグメモリ11及びデ
ータメモリ12を含むキャッシュメモリ10の構成を、
ブロック単位がA×4(128バイト)、エントリ数が
B、レベル数がC/4(1ウェイ)という構成に変更す
る。またキャッシュ構成変更手段33は、ブロック単位
がA×4(128バイト)であるということを示す出力
信号301〜303も送出する。
If it is specified in the cache configuration instruction field 31 that four basic blocks are used as a block unit, the cache configuration changing means 33
Sends out the output signal 300 to change the configuration of the cache memory 10 including the tag memory 11 and the data memory 12,
The configuration is changed so that the block unit is A × 4 (128 bytes), the number of entries is B, and the number of levels is C / 4 (1 way). The cache configuration changing unit 33 also sends output signals 301 to 303 indicating that the block unit is A × 4 (128 bytes).

【0041】キャッシュメモリ10上のデータにスカラ
処理装置からアクセスする場合、アクセスするデータの
アドレスをアドレスレジスタ20にセットし、出力信号
301にしたがって、アドレスの22ビット目〜24ビ
ット目の3ビットにより、タグメモリ11及びデータメ
モリ12の縦方向(エントリ方向)のアドレスを指定
し、アドレスが指定されたタグメモリ11及びデータメ
モリ12からは、C/4レベル(1ウェイ)分の情報が
読み出される。このとき、タグメモリ11から1ウェイ
分のアドレス情報を読み出すことは、出力信号302に
よって指定されており、アドレス情報が格納されている
ウェイ(ウェイ1)を読み出すよう指定される。タグメ
モリ11から読み出された1ウェイ分のアドレス情報と
実アドレスとを比較器21で比較し、アドレスが一致し
たかという比較結果が選択回路22に送出される。
When accessing the data in the cache memory 10 from the scalar processing device, the address of the data to be accessed is set in the address register 20 and, according to the output signal 301, the three bits of the 22nd to 24th bits of the address are used. , An address in the vertical direction (entry direction) of the tag memory 11 and the data memory 12 is specified, and information corresponding to the C / 4 level (one way) is read from the tag memory 11 and the data memory 12 to which the address is specified. . At this time, the reading of the address information for one way from the tag memory 11 is specified by the output signal 302, and the way (way 1) in which the address information is stored is specified to be read. One-way address information read from the tag memory 11 is compared with the real address by the comparator 21, and a comparison result indicating whether the addresses match is sent to the selection circuit 22.

【0042】データメモリ12からは、アドレスレジス
タ20内のアドレスの25ビット目〜28ビット目の4
ビットで指定されるブロック内アドレスに対応する8バ
イトデータが1ウェイ分読み出される。選択回路22
は、比較器21でアドレスが一致していた場合には、デ
ータメモリ12より読み出した8バイトデータをスカラ
処理装置へ送出する。ここでもしタグメモリ11より読
み出した1ウェイ分のアドレス情報と実アドレスとが一
致しない場合は、データメモリ12内にはアクセスした
いデータは登録されていないことになり、主記憶装置か
らデータを読み出し、指定されたタグメモリエントリ及
びデータメモリエントリの指定されたウェイにアドレス
情報及びデータをそれぞれ登録する。その際、キャッシ
ュ構成変更手段33からの出力信号303にしたがっ
て、主記憶装置からは、レベル方向に連続する4つのデ
ータメモリエントリへ128バイトのデータが転送され
る。
From the data memory 12, the address of the address in the address register 20 is stored in the fourth bit of the 25th to 28th bits.
The 8-byte data corresponding to the address in the block specified by the bit is read for one way. Selection circuit 22
Sends the 8-byte data read from the data memory 12 to the scalar processing device if the addresses match in the comparator 21. If the one-way address information read from the tag memory 11 does not match the real address, the data to be accessed is not registered in the data memory 12, and the data is read from the main storage device. The address information and the data are registered in the designated way of the designated tag memory entry and the designated memory memory entry, respectively. At this time, in accordance with the output signal 303 from the cache configuration changing means 33, 128 bytes of data are transferred from the main storage device to four data memory entries that are continuous in the level direction.

【0043】次に、実際のプログラムを処理する場合を
例に挙げて、本実施の形態のキャッシュ方式の動作を説
明する。ここでは、上述の従来の技術の欄での動作説明
でも使用した、図7に示すFORTRAN(フォートラ
ン)言語で書かれたプログラムを処理するものとする。
このプログラムは、X(I)*Y(I)+Z(I)を計算して
それをW(I)に代入することを、Iが1から32までの
整数について順次繰り返すものである。ここで、X,Y,
Zはそれぞれ配列を示し、各配列とも512バイト境界
にアライン(整合)されており、X(1),Y(1)及びZ
(1)が64バイト境界の先頭のアドレスであると仮定す
る。またWも配列である。
Next, the operation of the cache system according to the present embodiment will be described by taking as an example a case where an actual program is processed. Here, it is assumed that a program written in the FORTRAN language shown in FIG. 7 is used, which is also used in the description of the operation in the above-described conventional technique.
This program repeats the calculation of X (I) * Y (I) + Z (I) and substituting it for W (I) for integers from 1 to 32. Where X, Y,
Z indicates an array, and each array is aligned (aligned) on a 512-byte boundary, and X (1), Y (1), and Z
Assume that (1) is the start address of a 64-byte boundary. W is also an array.

【0044】まず、コンパイラソフトウェアを用いてこ
のプログラムのソースコードをコンパイルして実行コー
ドを生成する際に、各配列の特徴を調査するものする。
ここで扱うプログラムの場合、コンパイル時に配列のサ
イズやアライメントが確定している。コンパイラは、こ
のプログラムでは、各配列が512バイトにアラインさ
れているのでキャッシュ上同じエントリアドレスを使う
配列が複数あって、小さなブロック単位でウェイ数が多
い方がキャッシュ性能が高いことを認識し、ソフトウェ
アビジブルであるシステムのプロセス状態語30内のキ
ャッシュ構成指示フィールド31に"1"を格納するよう
に、実行コードを生成する。生成された実行コードを実
際に実行する際には、プロセス状態語30内のキャッシ
ュ構成指示フィールド31に"1"が格納され、このキャ
ッシュ構成指示フィールド31の情報を受けて、キャッ
シュ構成変更手段33は、出力信号300によって、キ
ャッシュメモリ10をブロック単位がA(32バイ
ト)、エントリ数がB(8)、レベル数がC(4ウェ
イ)の構成に変更する。
First, when compiling the source code of this program using compiler software to generate an execution code, the characteristics of each array are examined.
In the case of the program used here, the size and alignment of the array are determined at the time of compilation. The compiler recognizes that in this program, since each array is aligned to 512 bytes, there are a plurality of arrays that use the same entry address on the cache, and the larger the number of ways in small block units, the higher the cache performance. The execution code is generated so that "1" is stored in the cache configuration instruction field 31 in the process state word 30 of the system which is software visible. When the generated execution code is actually executed, “1” is stored in the cache configuration instruction field 31 in the process status word 30, and the information of the cache configuration instruction field 31 is received. Changes the cache memory 10 to a configuration in which the block unit is A (32 bytes), the number of entries is B (8), and the number of levels is C (4 ways), according to the output signal 300.

【0045】I=1の時には、スカラ処理装置は、X
(1)を主記憶装置からロードするが、まずはキャッシュ
メモリ10をアクセスする。X(1)のアドレス情報がア
ドレスレジスタ20に保持され、この時のアドレスレジ
スタ20のアドレスの24ビット目〜26ビット目は"
000"になっているので(配列が512バイト境界に
アラインされているため)、タグメモリ11のウェイ1
のエントリ00、ウェイ2のエントリ10、ウェイ3の
エントリ20、ウェイ4のエントリ30が読み出されて
比較器21においてX(1)の実アドレスと比較される。
プログラム実行の最初の時点では、データはキャッシュ
メモリ10には登録されていないので、タグメモリ11
から読み出したアドレスと実アドレスは一致しない(キ
ャッシュミスヒット)。このため、主記憶装置からデー
タが読み出されて、データメモリ12のウェイ1のエン
トリ00に32バイトのデータ(X(1)〜X(4)のデー
タ)に登録され、タグメモリ11のウェイ1のエントリ
00にアドレス情報が登録され、スカラ処理装置にX
(1)のデータが送られる。
When I = 1, the scalar processing device
(1) is loaded from the main storage device, but first accesses the cache memory 10. The address information of X (1) is held in the address register 20. At this time, the 24th to 26th bits of the address of the address register 20 are "
000 "(since the array is aligned on a 512-byte boundary), the way 1 of the tag memory 11
, The entry 10 of the way 2, the entry 20 of the way 3, and the entry 30 of the way 4 are read and compared by the comparator 21 with the real address of X (1).
Since data is not registered in the cache memory 10 at the first time of the program execution, the tag memory 11
And the real address do not match (cache miss). Therefore, the data is read from the main storage device, registered in the entry 00 of the way 1 of the data memory 12 as 32-byte data (data of X (1) to X (4)), and stored in the way of the tag memory 11. The address information is registered in the entry 00 of No. 1 and X is stored in the scalar processing device.
The data of (1) is sent.

【0046】次に、Y(1)のデータを同様にして主記憶
装置からロードする。この際に、Y(1)のアドレスの2
4ビット目〜26ビット目も"000"になっているの
で、タグメモリ11とデータメモリ12において、X
(1)のときとは別のウェイ(ウェイ2)のエントリ10
に、アドレス情報と32バイトのデータ(Y(1)〜Y
(4))のデータ)がそれぞれ登録される。スカラ処理装
置では、X(1)とY(1)を乗算する。
Next, the data of Y (1) is similarly loaded from the main storage device. At this time, the address of Y (1) 2
Since the fourth to 26th bits are also “000”, the X and X in the tag memory 11 and the data memory 12 are
Entry 10 of a different way (way 2) from the case of (1)
Address information and 32-byte data (Y (1) to Y (1) to Y
(4)) is registered. The scalar processing device multiplies X (1) by Y (1).

【0047】次に、Z(1)のデータを同様に主記憶装置
からロードする。この際、Z(1)のアドレスの24ビッ
ト目〜26ビット目も"000"になっているので、タグ
メモリ11とデータメモリ12において、X(1)やY
(1)とは別のウェイ(ウェイ3)のエントリ20に、ア
ドレス情報と32バイトのデータ(Z(1)〜Z(4)のデ
ータ)がそれぞれ登録される。この時点を時刻Aとする
と、データメモリ11には、図4(a)のようなデータが
各エントリに登録されている。スカラ処理装置は、先ほ
どの乗算結果とZ(1)を加算し、その結果(W(1))を
主記憶装置へストアする。ここで、キャッシュメモリの
動作方式がストアスルー方式であると仮定すると、スト
アデータは、キャッシュメモリ10には登録されず主記
憶装置の指定されたアドレスに直接格納される。
Next, the data of Z (1) is similarly loaded from the main storage device. At this time, since the 24th to 26th bits of the address of Z (1) are also “000”, X (1) and Y in the tag memory 11 and the data memory 12 are stored.
Address information and 32-byte data (data of Z (1) to Z (4)) are registered in an entry 20 of a way (way 3) different from (1). Assuming that this time is time A, data as shown in FIG. 4A is registered in each entry in the data memory 11. The scalar processing device adds the previous multiplication result and Z (1), and stores the result (W (1)) in the main storage device. Here, assuming that the operation mode of the cache memory is the store-through mode, the store data is not registered in the cache memory 10 but is stored directly at the specified address of the main storage device.

【0048】Iを更新してI=2になると、X(2)のデ
ータをロードすることになるが、このときのX(2)のア
ドレスは、X(1)のアドレスに8バイト加えた値になる
ので、X(2)のアドレスの24ビット目〜26ビット目
は"000"、ブロック内アドレス(27ビット目〜28
ビット目)が"01"となる。アドレスの24ビット目〜
26ビット目が"000"なので、タグメモリ11のエン
トリ00、エントリ10、エントリ20、エントリ30
のアドレスが読み出されて比較器21でX(2)の実アド
レスと比較されることになる。このとき、ウェイ1のエ
ントリ00のアドレスと一致するので、比較器21はそ
の比較結果を選択回路22に送出する。データメモリ1
2のエントリ00、エントリ10、エントリ20、エン
トリ30からは、ブロック内アドレス"01"が指定する
8バイトのデータが4ウェイ分読み出されるが、選択回
路22は、比較器21からの比較結果をもとに、ウェイ
1のエントリ00に格納されていた8バイトデータ、つ
まりX(2)を選択し、スカラ処理装置へ送出する。以後
同様に、Y(2)及びZ(2)もキャッシュメモリ10上に
データが登録されているので、主記憶装置にアクセスす
ることなくキャッシュメモリ10からスカラ処理装置へ
データが送出される。
When I = 2 after updating I, the data of X (2) is loaded. At this time, the address of X (2) is obtained by adding 8 bytes to the address of X (1). Since the value becomes the value, the 24th to 26th bits of the address of X (2) are “000”, and the in-block address (27th to 28th
Bit) becomes “01”. 24th bit of address
Since the 26th bit is “000”, the entry 00, the entry 10, the entry 20, and the entry 30 of the tag memory 11 are set.
Is read out and compared by the comparator 21 with the real address of X (2). At this time, since the address matches the address of entry 00 of way 1, comparator 21 sends the comparison result to selection circuit 22. Data memory 1
The 8-byte data specified by the in-block address “01” is read for four ways from the second entry 00, the entry 10, the entry 20, and the entry 30. The selection circuit 22 reads the comparison result from the comparator 21. Originally, the 8-byte data stored in the entry 00 of the way 1, that is, X (2) is selected and sent to the scalar processing device. Thereafter, similarly, since the data of Y (2) and Z (2) are registered in the cache memory 10, the data is transmitted from the cache memory 10 to the scalar processing device without accessing the main storage device.

【0049】その後、Iが更新されてI=5になると、
X(5),Y(5),Z(5)の各アドレスの24ビット目〜2
5ビット目は"001"となり、タグメモリ11及びデー
タメモリ12アクセスするエントリアドレスが変わっ
て、エントリ01、エントリ11、エントリ21及びエ
ントリ31になり、X(1),Y(1),Z(1)を処理した時
と同様に、キャッシュミスヒットが発生する。しかし、
さらに進んでI=6,7,8を処理する際には、キャッシ
ュヒットになる。I=32の処理が終了した時点を時刻
Bとすると、そのとき、データメモリ12には、図4
(b)に示すようなデータが各エントリに登録されている
ことになる。
Thereafter, when I is updated to become I = 5,
24th bit to 2 of each address of X (5), Y (5), Z (5)
The fifth bit becomes "001", and the entry addresses for accessing the tag memory 11 and the data memory 12 change to become entry 01, entry 11, entry 21 and entry 31, and X (1), Y (1), Z ( As in the case of processing (1), a cache miss occurs. But,
When processing I = 6, 7, and 8 further, a cache hit occurs. Assuming that the time when the process of I = 32 is completed is time B, at this time, the data memory 12
The data as shown in (b) is registered in each entry.

【0050】この実施の形態では、キャッシュメモリの
構成を実行するプログラムに応じて変更することによ
り、従来のキャッシュ方式ではIを更新する度にキャッ
シュミスヒット処理していたものが、4回に1回だけキ
ャッシュミスヒット処理を行えばよいことになり、キャ
ッシュ性能を高めることが可能となる。
In this embodiment, by changing the configuration of the cache memory according to the program to be executed, the cache mishit process is performed every time I is updated in the conventional cache system. The cache mishit process needs to be performed only once, and the cache performance can be improved.

【0051】[0051]

【発明の効果】以上説明したように本発明は、キャッシ
ュ構成指示フィールドに格納された内容にしたがって、
n個の基本ブロック(A)がブロック単位となり、その
ときのウェイ数がC/nとなるようにキャッシュメモリ
の構成を変化できるようにしたことにより、ソフトウェ
アでプログラムをコンパイルする際に配列の特徴や使用
配列数などから最適なキャッシュブロック単位を認識
し、キャッシュ構成をプログラムに最適な構成(ブロッ
ク単位×エントリ数×レベル数)に変更できるので、プ
ログラムの性質に応じて最適なキャッシュメモリ構成と
なってキャッシュメモリに登録したデータを有効に利用
することが可能となり、キャッシュメモリの性能を向上
するという効果がある。
As described above, according to the present invention, according to the contents stored in the cache configuration instruction field,
Since the configuration of the cache memory can be changed so that n basic blocks (A) are in block units and the number of ways at that time is C / n, the feature of the array when compiling a program by software is obtained. The optimal cache block unit is recognized based on the number of arrays and the number of used arrays, and the cache configuration can be changed to the optimal configuration for the program (block unit × number of entries × number of levels). As a result, the data registered in the cache memory can be used effectively, and the performance of the cache memory is improved.

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

【図1】本発明の実施の一形態のキャッシュ方式の構成
を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a cache system according to an embodiment of the present invention.

【図2】キャッシュメモリの基本ブロックA、エントリ
数B、レベル数C及び各ウェイを説明する図である。
FIG. 2 is a diagram illustrating a basic block A, the number of entries B, the number of levels C, and each way of a cache memory.

【図3】キャッシュメモリの内容の例を示す図であっ
て、(a),(b),(c)は、それぞれ、キャッシュ構成フィー
ルドが"1","2","4"を示している場合を示す図であ
る。
FIG. 3 is a diagram showing an example of the contents of a cache memory, where (a), (b), and (c) indicate that the cache configuration fields are “1”, “2”, and “4”, respectively. FIG.

【図4】図1に示すキャッシュ方式における処理経過を
説明する図であって、(a)は時刻Aでのデータメモリの
内容を示す図、(b)は時刻Bでのデータメモリの内容を
示す図である。
4A and 4B are diagrams for explaining the progress of processing in the cache system shown in FIG. 1, wherein FIG. 4A shows the contents of the data memory at time A, and FIG. 4B shows the contents of the data memory at time B; FIG.

【図5】従来のキャッシュ方式の構成を示すブロック図
である。
FIG. 5 is a block diagram showing a configuration of a conventional cache system.

【図6】図5に示すキャッシュ方式におけるキャッシュ
メモリの内容の一例を示す図である。
FIG. 6 is a diagram showing an example of the contents of a cache memory in the cache system shown in FIG.

【図7】配列への代入演算を行うプログラムの一例を示
すである。
FIG. 7 shows an example of a program for performing an assignment operation to an array.

【図8】図5に示すキャッシュ方式における処理経過を
説明する図であって、(a)は時刻Aでのデータメモリの
内容を示す図、(b)は時刻Bでのデータメモリの内容を
示す図、(c)は時刻Cでのデータメモリの内容を示す図
である。
8A and 8B are diagrams for explaining the processing progress in the cache method shown in FIG. 5, wherein FIG. 8A shows the contents of the data memory at time A, and FIG. 8B shows the contents of the data memory at time B; FIG. 3C is a diagram showing the contents of the data memory at time C.

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

10 キャッシュメモリ 11 タグメモリ 12 データメモリ 20 アドレスレジスタ 21 比較器 22 選択回路 30 プロセス状態語 31 キャッシュ構成指示フィールド 33 キャッシュ構成変更手段 300〜303 出力信号 401〜407 タグメモリエントリ 501〜507 データメモリエントリ DESCRIPTION OF SYMBOLS 10 Cache memory 11 Tag memory 12 Data memory 20 Address register 21 Comparator 22 Selection circuit 30 Process state word 31 Cache configuration instruction field 33 Cache configuration change means 300-303 Output signals 401-407 Tag memory entries 501-507 Data memory entries

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭55−157182(JP,A) 特開 平5−225060(JP,A) 特開 昭51−32241(JP,A) 特開 平4−217051(JP,A) 特開 平9−282225(JP,A) 清水悦子他,”可変構造を持つマルチ プロセッサキャッシュ評価環境ATTE MPT−1”,電子情報通信学会技術研 究報告,社団法人電子情報通信学会, 1996年4月26日,第96巻第23号,(CP SY96−14〜27),p.25−32 (58)調査した分野(Int.Cl.6,DB名) G06F 12/08 - 12/12 G06F 9/45 ──────────────────────────────────────────────────続 き Continuation of the front page (56) References JP-A-55-157182 (JP, A) JP-A-5-225060 (JP, A) JP-A-51-32241 (JP, A) JP-A-4- 217051 (JP, A) JP-A-9-282225 (JP, A) Etsuko Shimizu et al., "Multiprocessor Cache Evaluation Environment with Variable Structure ATTE MPT-1," IEICE Technical Report, IEICE Communication Society, April 26, 1996, Vol. 96, No. 23, (CP SY96-14-27), p. 25-32 (58) Field surveyed (Int.Cl. 6 , DB name) G06F 12/08-12/12 G06F 9/45

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 主記憶装置と前記主記憶装置からデータ
をロードして処理する処理装置との間に配置される可変
式キャッシュ方式において、 前記処理装置がスカラ命令の処理を行うスカラ処理装置
であり、 基本ブロック(A)のエントリ数がB(Bは2以上の整
数)である組をC(Cは2以上の整数)レベル有する基
本構成であって、前記主記憶装置に格納されているデー
タの写しをブロック単位で記憶することを可能とするキ
ャッシュメモリと、 前記キャッシュメモリに記憶するブロック単位として前
記基本ブロックをn個使うことを示す情報を格納するキ
ャッシュ構成指示フィールドと、 前記キャッシュ構成指示フィールドに格納された内容に
したがって、n個の基本ブロック(A)がブロック単位
となり、そのときのウェイ数がC/nとなるように、前
記キャッシュメモリの構成を変化させるよう前記キャッ
シュメモリに指示するキャッシュ構成変更手段とを有
プログラムのソースコードをコンパイルして前記処理装
置に実行すべき実行コードを生成する際に、前記プログ
ラムの性質に応じて最適なキャッシュブロック単位を認
識し、前記nの値が決定されることを特徴とする 可変式
キャッシュ方式。
1. A variable cache scheme which is disposed between the processing apparatus for processing and loading data from said main memory and the main memory, a scalar processor for the processing device performs the processing of scalar instructions
A basic configuration having a set of C (C is an integer of 2 or more) levels in which the number of entries of the basic block (A) is B (B is an integer of 2 or more) is stored in the main storage device. A cache memory capable of storing a copy of data in a block unit, a cache configuration instruction field storing information indicating that n basic blocks are used as a block unit to be stored in the cache memory, and the cache According to the contents stored in the configuration instruction field, the cache memory is configured to change the configuration of the cache memory so that n basic blocks (A) are in block units and the number of ways at that time is C / n. And a cache configuration changing means for instructing the processing device to compile the source code of the program and
When generating executable code to be executed in the
The optimum cache block unit is recognized according to the characteristics of the RAM.
And the value of n is determined .
JP10181067A 1998-06-26 1998-06-26 Variable cache method Expired - Lifetime JP2954178B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10181067A JP2954178B1 (en) 1998-06-26 1998-06-26 Variable cache method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10181067A JP2954178B1 (en) 1998-06-26 1998-06-26 Variable cache method

Publications (2)

Publication Number Publication Date
JP2954178B1 true JP2954178B1 (en) 1999-09-27
JP2000020396A JP2000020396A (en) 2000-01-21

Family

ID=16094228

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10181067A Expired - Lifetime JP2954178B1 (en) 1998-06-26 1998-06-26 Variable cache method

Country Status (1)

Country Link
JP (1) JP2954178B1 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3989312B2 (en) 2002-07-05 2007-10-10 富士通株式会社 Cache memory device and memory allocation method
AU2002360640A1 (en) * 2002-12-17 2004-07-29 International Business Machines Corporation Selectively changeable line width memory
JP3834323B2 (en) 2004-04-30 2006-10-18 日本電気株式会社 Cache memory and cache control method
JP5251689B2 (en) * 2009-04-02 2013-07-31 富士通株式会社 Compiler program and compiler device
JP6209689B2 (en) * 2014-12-14 2017-10-04 ヴィア アライアンス セミコンダクター カンパニー リミテッド Multi-mode set-associative cache memory dynamically configurable to selectively allocate to all or a subset of ways depending on the mode
EP3129886B1 (en) 2014-12-14 2019-10-02 VIA Alliance Semiconductor Co., Ltd. Dynamic cache replacement way selection based on address tag bits
US9798668B2 (en) 2014-12-14 2017-10-24 Via Alliance Semiconductor Co., Ltd. Multi-mode set associative cache memory dynamically configurable to selectively select one or a plurality of its sets depending upon the mode
US11360704B2 (en) 2018-12-21 2022-06-14 Micron Technology, Inc. Multiplexed signal development in a memory device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
清水悦子他,"可変構造を持つマルチプロセッサキャッシュ評価環境ATTEMPT−1",電子情報通信学会技術研究報告,社団法人電子情報通信学会,1996年4月26日,第96巻第23号,(CPSY96−14〜27),p.25−32

Also Published As

Publication number Publication date
JP2000020396A (en) 2000-01-21

Similar Documents

Publication Publication Date Title
US5870576A (en) Method and apparatus for storing and expanding variable-length program instructions upon detection of a miss condition within an instruction cache containing pointers to compressed instructions for wide instruction word processor architectures
US5546559A (en) Cache reuse control system having reuse information field in each cache entry to indicate whether data in the particular entry has higher or lower probability of reuse
US6779102B2 (en) Data processor capable of executing an instruction that makes a cache memory ineffective
US5896529A (en) Branch prediction based on correlation between sets of bunches of branch instructions
US5634027A (en) Cache memory system for multiple processors with collectively arranged cache tag memories
KR100335672B1 (en) Fast data retrieval from physical addressing data storage structures using memory page crossing prediction comments
US6668307B1 (en) System and method for a software controlled cache
US20060010304A1 (en) Systems for loading unaligned words and methods of operating the same
US5713001A (en) Circuit for converting address operands supplied by a program to hashed virtual address
US6687807B1 (en) Method for apparatus for prefetching linked data structures
US6560676B1 (en) Cache memory system having a replace way limitation circuit and a processor
US5226132A (en) Multiple virtual addressing using/comparing translation pairs of addresses comprising a space address and an origin address (sto) while using space registers as storage devices for a data processing system
JPH06236353A (en) Method and system for increase of parallelism of system memory of multiprocessor computer system
JPH05210593A (en) Memory partitioning device for microprocessor and method of loading segment descriptor to segment-register
US7219197B2 (en) Cache memory, processor and cache control method
JP2768503B2 (en) Virtual memory address space access control method
JP2000020396A (en) Variable cache system
US5761740A (en) Method of and apparatus for rapidly loading addressing registers
JPS623357A (en) Tlb control system
US5379392A (en) Method of and apparatus for rapidly loading addressing registers
KR960015231A (en) Enhanced Addressing Method and System
US5349672A (en) Data processor having logical address memories and purge capabilities
JPH0659977A (en) Cache memory capable of executing indicative line substituting operation and its control method
JP2621763B2 (en) Information processing device
JP3476376B2 (en) Virtual storage address space access control method and apparatus therefor

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070716

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080716

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090716

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100716

Year of fee payment: 11