JP2000029788A - Cache memory system, cache control method used therefor and recording medium control program therefor recorded therein - Google Patents

Cache memory system, cache control method used therefor and recording medium control program therefor recorded therein

Info

Publication number
JP2000029788A
JP2000029788A JP10199396A JP19939698A JP2000029788A JP 2000029788 A JP2000029788 A JP 2000029788A JP 10199396 A JP10199396 A JP 10199396A JP 19939698 A JP19939698 A JP 19939698A JP 2000029788 A JP2000029788 A JP 2000029788A
Authority
JP
Japan
Prior art keywords
data
address
cache
cache memory
write
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
JP10199396A
Other languages
Japanese (ja)
Inventor
Kouhei Nadehara
恒平 撫原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP10199396A priority Critical patent/JP2000029788A/en
Publication of JP2000029788A publication Critical patent/JP2000029788A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0804Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches with main memory updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/12Replacement control
    • G06F12/121Replacement control using replacement algorithms
    • G06F12/126Replacement control using replacement algorithms with special data handling, e.g. priority of data or instructions, handling errors or pinning
    • G06F12/127Replacement control using replacement algorithms with special data handling, e.g. priority of data or instructions, handling errors or pinning using additional replacement algorithms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0877Cache access modes
    • G06F12/0886Variable-length word access

Abstract

PROBLEM TO BE SOLVED: To provide a cache memory system, capable of accelerating a cache error processing at writing of the large amount of data to successive addresses and accelerating the execution speed of a software including the cache error processing. SOLUTION: A normal write instruction (write and storage) 11, corresponding to a conventional cache control method and the write instruction 12 for a cache error are respectively prepared as being different instructions in the instruction set 10 of a general purpose processor 1. When the processing of the cache error is required, the write instruction 12 for the cache error updates a cache line 27 by write data, without reading the data from the address of a main memory 21 equivalent to a write address and sets both of the V-bit 24 and M-bit 25 of the line 27 to '1'.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明はキャッシュメモリシ
ステム及びそれに用いるキャッシュ制御方法並びにその
制御プログラムを記録した記録媒体に関し、特にマイク
ロプロセッサ等のキャッシュメモリシステムにおけるラ
イト動作を高速化するためのキャッシュ制御方法に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a cache memory system, a cache control method used therefor, and a recording medium on which a control program is recorded. About.

【0002】[0002]

【従来の技術】現在、マルチメディア処理はテレビゲー
ム機やインタネット端末といった安価な民生用家電製品
から、カーナビゲーションシステムやパーソナルコンピ
ュータといった比較的高性能な製品まで、様々な情報機
器で必要とされている。これらの機器で用いられるマル
チメディア処理には音声、オーディオ、ビデオ信号各々
の圧縮や伸張、及び2次元や3次元のグラフィックス処
理等が含まれる。これらのマルチメディア処理では膨大
なデータに対し、多くの演算を行う必要がある。
2. Description of the Related Art At present, multimedia processing is required in various information devices, from inexpensive consumer electronics products such as video game consoles and Internet terminals to relatively high performance products such as car navigation systems and personal computers. I have. Multimedia processing used in these devices includes compression and decompression of audio, audio, and video signals, and two-dimensional and three-dimensional graphics processing. In such multimedia processing, it is necessary to perform many operations on a huge amount of data.

【0003】従来、上記のマルチメディア処理において
は、機器全体の制御やユーザインタフェースを行う汎用
プロセッサに加え、特定のマルチメディア処理を専用に
行うLSI(大規模集積回路)を機器へ組込むことで、
処理能力の要求を満たしてきている。
Conventionally, in the above multimedia processing, in addition to a general-purpose processor for controlling the entire apparatus and a user interface, an LSI (large-scale integrated circuit) dedicated to specific multimedia processing is incorporated in the apparatus.
It has met the demand for processing power.

【0004】しかしながら、最近では、汎用プロセッサ
の性能向上によって、専用LSIを組込まなくても、汎
用プロセッサ上のソフトウェアによって充分な速度でマ
ルチメディア処理が行えるようになりつつある。
However, recently, with the improvement in performance of general-purpose processors, multimedia processing can be performed at a sufficient speed by software on the general-purpose processor without incorporating a dedicated LSI.

【0005】専用LSIを汎用プロセッサ上のマルチメ
ディア処理ソフトウェアで代替すると、専用LSIとい
う付加ハードウェアが不要になるため、機器を安価に構
成することができ、その機能をソフトウェアの変更によ
って容易に実現することができる。例えば、ソフトウェ
アの変更によって、オーディオの伸張とビデオ信号の伸
張とを切替えることができる。
[0005] If the dedicated LSI is replaced with multimedia processing software on a general-purpose processor, additional hardware such as a dedicated LSI becomes unnecessary, so that the equipment can be configured at low cost and its function can be easily realized by changing the software. can do. For example, audio expansion and video signal expansion can be switched by changing software.

【0006】上記のように、ソフトウェアによるマルチ
メディア処理は利点が多いため、現在の汎用プロセッサ
では処理能力が不足する応用でもソフトウェア処理でカ
バーしようと、汎用プロセッサにマルチメディア処理専
用の演算命令を導入し、マルチメディア処理性能を向上
させることも一般的である。
As described above, multimedia processing by software has many advantages. Therefore, even if the current general-purpose processor has insufficient processing capability, an operation instruction dedicated to multimedia processing is introduced into the general-purpose processor in order to cover the application with software processing. However, it is also common to improve multimedia processing performance.

【0007】上記のようなマルチメディア処理命令につ
いては、“VIS SpeedsNew Media
Processing、”(Marc Trembla
yほか,IEEE Micro,pp.10〜20,A
ug.1996)、“Intel’s MMX Spe
eds Multimedia”(LinleyGwe
nnap,Microprocessor Repor
t,Vol.10,No.3,pp.1,6〜10,M
ar.5,1996)、“NEC V830R/AV
Handles Real−Time MPEG−2”
(JimTurley,Microprocessor
Report,Vol.11,No.12,pp.
5,Sep.15,1997)等に記載されている。
[0007] Regarding the multimedia processing instruction as described above, see "VIS Speeds New Media."
Processing, "(Marc Trembla
y, et al., IEEE Micro, pp. 10-26. 10-20, A
ug. 1996), “Intel's MMX Spe
eds Multimedia "(Linley Gwe
nnap, Microprocessor Reporter
t, Vol. 10, No. 3, pp. 1,6-10, M
ar. 5, 1996), “NEC V830R / AV
Handles Real-Time MPEG-2 "
(JimTurley, Microprocessor
Report, Vol. 11, No. 12, pp.
5, Sep. 15, 1997).

【0008】上記の論文に記載されたマルチメディア処
理専用の命令セットはレジスタを分割して複数のデータ
を格納し、1命令で並列に演算を行うことで、データ並
列性の高い処理における処理能力を向上させている。例
えば、64ビット長のレジスタに16ビット長のデータ
4個を格納し、1命令でこれらのデータに対して4並列
演算を行える。このようなデータ並列を利用する演算命
令を以下、SIMD(Single−Instruct
ion Multple−Data)命令と呼ぶ。
[0008] The instruction set dedicated to multimedia processing described in the above-mentioned paper divides a register and stores a plurality of data, and performs a parallel operation with one instruction, so that the processing capability in processing with high data parallelism is achieved. Has been improved. For example, four 16-bit data are stored in a 64-bit register, and four parallel operations can be performed on these data with one instruction. An operation instruction using such data parallelism is hereinafter referred to as SIMD (Single-Instruction).
It is called an “ion Multiple-Data” instruction.

【0009】汎用プロセッサで効率良くマルチメディア
処理を行うには、SIMD命令を導入して演算能力を強
化すると同時に、メモリシステムを強化し、演算能力に
見合ったレートでメモリシステム上のデータが演算器へ
供給されるように、また演算後のデータがメモリシステ
ムに格納されるようにすることが重要である。
In order to efficiently perform multimedia processing by a general-purpose processor, the SIMD instruction is introduced to enhance the computing capacity, and at the same time, the memory system is strengthened so that the data on the memory system can be processed at a rate corresponding to the computing capacity. It is important that the data after the calculation be stored in the memory system.

【0010】図4〜図6を参照して汎用プロセッサ5を
用いたシステムの典型的なメモリシステム2の構成及び
データアクセス時の動作について説明する。図4に示す
ように、汎用プロセッサ5に接続されるメモリシステム
2は大容量なメインメモリ21と、高速なキャッシュメ
モリ22とを組合わせて構成され、メインメモリ21及
びキャッシュメモリ22を制御するメモリ制御回路20
を備えている。
The configuration of a typical memory system 2 of a system using the general-purpose processor 5 and the operation at the time of data access will be described with reference to FIGS. As shown in FIG. 4, the memory system 2 connected to the general-purpose processor 5 is configured by combining a large-capacity main memory 21 and a high-speed cache memory 22, and a memory that controls the main memory 21 and the cache memory 22. Control circuit 20
It has.

【0011】メインメモリ21に格納されたデータのう
ち、頻繁にアクセスされる一部のデータのコピーがキャ
ッシュメモリ22に格納され、汎用プロセッサ5がデー
タアクセスを行う時に、キャッシュメモリ22上に目的
のデータが存在すれば、低速なメインメモリ21ではな
く、高速なキャッシュメモリ22をアクセスするよう制
御し、プログラムの実行速度を改善する。
[0011] Of the data stored in the main memory 21, a copy of some frequently accessed data is stored in the cache memory 22, and when the general-purpose processor 5 performs data access, the target data is stored in the cache memory 22. If data exists, control is performed so as to access the high-speed cache memory 22 instead of the low-speed main memory 21, thereby improving the execution speed of the program.

【0012】キャッシュメモリ22は通常、数百〜数千
個のライン27に分割され、ライン27毎に制御情報を
付加し、状態を管理する。1個のライン27が保持する
データのサイズは通常、16〜64バイトである。制御
情報としては1ライン27毎に、保持しているデータ2
6のメインメモリ21上のアドレスの上位ビットを示す
タグ23と、データ26が有効であることを示すバリッ
ド(V)ビット24と、データ26が更新されたことを
示すモディファイ(M)ビット25とが付加される。
The cache memory 22 is normally divided into several hundred to several thousand lines 27, and control information is added to each line 27 to manage the state. The size of data held by one line 27 is generally 16 to 64 bytes. As control information, data 2 held in each line 27
6, a tag 23 indicating upper bits of an address on the main memory 21, a valid (V) bit 24 indicating that the data 26 is valid, and a modify (M) bit 25 indicating that the data 26 has been updated. Is added.

【0013】Vビット24はそのライン27のデータ2
6が有効か無効かを示す。以下、Vビット24が“1”
の時にはそのライン27のデータ26を有効とし、
“0”の時にはデータ26を無効とする。
The V bit 24 is the data 2 of the line 27
6 indicates valid or invalid. Hereinafter, the V bit 24 is set to "1".
, The data 26 of the line 27 is made valid,
When it is “0”, the data 26 is invalidated.

【0014】Mビット25はそのライン27のデータ2
6が更新されており、キャッシュメモリ22上のデータ
26がメインメモリ21上のデータより新しいか、更新
されておらず、キャッシュメモリ22上のデータ26と
メインメモリ21上のデータとが等しいかを示す。以
下、Mビットが“1”の時にはキャッシュメモリ22上
のデータ26がメインメモリ21上のデータより新しい
とし、“0”の時にはキャッシュメモリ22上のデータ
26とメインメモリ21上のデータとが等しいものとす
る。
The M bit 25 is the data 2 of the line 27.
6 has been updated and whether the data 26 in the cache memory 22 is newer than the data in the main memory 21 or not updated and the data 26 in the cache memory 22 is equal to the data in the main memory 21. Show. Hereinafter, when the M bit is "1", the data 26 in the cache memory 22 is assumed to be newer than the data in the main memory 21. When the M bit is "0", the data 26 in the cache memory 22 is equal to the data in the main memory 21. Shall be.

【0015】図4に示すように、汎用プロセッサ5とキ
ャッシュメモリ22とは論理的に独立した機能を持って
いるが、物理的には同一のLSIチップ上に集積されて
いる場合、別チップだが同一のマルチチップモジュール
やカートリッジ内に組込まれている場合等がある。
As shown in FIG. 4, the general-purpose processor 5 and the cache memory 22 have logically independent functions, but when physically integrated on the same LSI chip, they are separate chips. There are cases in which they are incorporated in the same multichip module or cartridge.

【0016】また、図4に示す例では汎用プロセッサ5
とメインメモリ21との間に存在するキャッシュメモリ
22は1段だが、より高性能なメモリシステム2を構成
するためにはキャッシュメモリ22を多段にすることも
ある。
In the example shown in FIG.
The cache memory 22 existing between the main memory 21 and the main memory 21 has one stage, but the cache memory 22 may have multiple stages in order to configure a higher-performance memory system 2.

【0017】データリード時のキャッシュメモリ22の
制御について、図5を参照しながら説明する。汎用プロ
セッサ5からキャッシュメモリ22にアドレスArのデ
ータのリード要求があったとする。メモリ制御回路20
はアドレスArの上位ビットと同じタグ23の値を持つ
ライン27を検索する(図5ステップS11)。
The control of the cache memory 22 during data reading will be described with reference to FIG. It is assumed that the general-purpose processor 5 requests the cache memory 22 to read the data at the address Ar. Memory control circuit 20
Searches the line 27 having the same value of the tag 23 as the upper bit of the address Ar (step S11 in FIG. 5).

【0018】アドレスArの上位ビットと同じタグ23
の値を持つライン27が存在し、このラインをラインi
とすると、メモリ制御回路20はラインiのVビット2
4を調べ(図5ステップS12)、Vビット24が
“1”ならば、ラインiが目的のデータを含んでいるた
め(キャッシュ・ヒット)、ラインiのデータ26のう
ち必要とされる部分を汎用プロセッサ5に返す(図5ス
テップS13)。
Tag 23 which is the same as the upper bit of address Ar
And a line 27 having the value of
Then, the memory control circuit 20 calculates the V bit 2 of the line i.
4 (step S12 in FIG. 5). If the V bit 24 is "1", since the line i contains the target data (cache hit), the required portion of the data 26 of the line i is It returns to the general-purpose processor 5 (step S13 in FIG. 5).

【0019】キャッシュメモリ22中に、アドレスAr
の上位ビットと同じタグ23の値を持つラインが存在し
ない時、または存在してもVビット24が“0”の時、
キャッシュメモリ22中に目的のデータが存在しない
(キャッシュ・ミス)ので、メモリ制御回路20は適当
なライン(ラインjとする)を選択し(図5ステップS
14)、メインメモリ21上のアドレスArのデータを
ラインjにコピーする(図5ステップS18)。
The address Ar is stored in the cache memory 22.
When there is no line having the same value of the tag 23 as the upper bit of, or when the V bit 24 is “0” even if it exists,
Since the target data does not exist in the cache memory 22 (cache miss), the memory control circuit 20 selects an appropriate line (referred to as line j) (step S5 in FIG. 5).
14) The data at the address Ar on the main memory 21 is copied to the line j (step S18 in FIG. 5).

【0020】但し、メモリ制御回路20は選択したライ
ンjのVビット24及びMビット25を調べ(図5ステ
ップS15,S16)、それらがともに“1”の時には
ラインjがメインメモリ21よりも新しいデータを保持
しているので、ラインjのデータをメインメモリ21の
対応するアドレスへ書き戻した後(図5ステップS1
7)、アドレスArのデータをラインjにコピーする
(図5ステップS18)。
However, the memory control circuit 20 checks the V bit 24 and the M bit 25 of the selected line j (steps S15 and S16 in FIG. 5), and when both are "1", the line j is newer than the main memory 21. Since the data is held, the data on line j is written back to the corresponding address in the main memory 21 (step S1 in FIG. 5).
7) The data at address Ar is copied to line j (step S18 in FIG. 5).

【0021】その後、メモリ制御回路20はVビット2
4を“1”に、Mビット25を“0”に夫々設定し(図
5ステップS19)、ラインjがメインメモリ21のデ
ータの有効なコピーを保持していることを示し、ライン
jのデータのうち必要な部分を汎用プロセッサ5へ返す
(図5ステップS20)。このとき、ライン27の値j
は通常、アドレスArの値や各ラインの使用状況によっ
て適切に選ばれるが、その手法については公知であるの
で、その詳細な説明は省略する。
Thereafter, the memory control circuit 20 sets the V bit 2
4 is set to "1" and the M bit 25 is set to "0" (step S19 in FIG. 5), indicating that the line j holds a valid copy of the data in the main memory 21, and the data of the line j Is returned to the general-purpose processor 5 (step S20 in FIG. 5). At this time, the value j of the line 27
Usually, is appropriately selected depending on the value of the address Ar and the usage status of each line. However, since the method is known, detailed description thereof will be omitted.

【0022】次に、データライト時のキャッシュメモリ
22の制御について、図6を参照しながら説明する。こ
こでは、特にライト・バック方式と呼ばれるキャッシュ
制御方式について説明する。尚、このデータライトは汎
用プロセッサ5内の命令セット50に含まれるライト命
令(書込み、ストア)51によって実行される。
Next, control of the cache memory 22 during data write will be described with reference to FIG. Here, a cache control method called a write-back method will be particularly described. This data write is executed by a write instruction (write, store) 51 included in the instruction set 50 in the general-purpose processor 5.

【0023】汎用プロセッサ5からキャッシュメモリ2
2にアドレスAwのデータのライト要求があったとす
る。メモリ制御回路20はアドレスAwの上位ビットと
同じタグ23の値を持つライン27を検索する(図6ス
テップS31)。
From the general-purpose processor 5 to the cache memory 2
Assume that there is a write request for the data of the address Aw in No. 2. The memory control circuit 20 searches for the line 27 having the same value of the tag 23 as the upper bit of the address Aw (step S31 in FIG. 6).

【0024】アドレスAwの上位ビットと同じタグ23
の値を持つライン27がキャッシュメモリ22上に存在
し、そのラインをラインiとすると、メモリ制御回路2
0はラインiのVビット24を調べ(図6ステップS3
2)、Vビット24が“1”ならば、ラインiが目的の
データを含んでいるため(キャッシュ・ヒット)、ライ
ンi上のデータを書換える(図6ステップS33)。さ
らに、メモリ制御回路20はラインiのMビットを
“1”にし(図6ステップS34)、メインメモリ21
上のデータよりキャッシュ・ラインi上のデータが新し
いことを示す。
Tag 23 same as upper bits of address Aw
Is present in the cache memory 22 and the line is a line i, the memory control circuit 2
0 checks the V bit 24 of the line i (step S3 in FIG. 6).
2) If the V bit 24 is "1", since the line i contains the target data (cache hit), the data on the line i is rewritten (step S33 in FIG. 6). Further, the memory control circuit 20 sets the M bit of the line i to "1" (step S34 in FIG. 6), and the main memory 21
This indicates that the data on the cache line i is newer than the above data.

【0025】キャッシュメモリ22中に、アドレスAw
の上位ビットと同じタグ値を持つラインが存在しない
時、または存在してもVビット24が“0”の時、キャ
ッシュメモリ22中に目的のデータは存在しない(キャ
ッシュ・ミス)ので、メモリ制御回路20は適当なライ
ン(ラインjとする)を選択し(図6ステップS3
5)、メインメモリ21上のアドレスAwのデータをラ
インjにコピーする(図6ステップS39)。
The address Aw is stored in the cache memory 22.
When there is no line having the same tag value as the upper bit of, or when the V bit 24 is "0", the target data does not exist in the cache memory 22 (cache miss). The circuit 20 selects an appropriate line (line j) (step S3 in FIG. 6).
5) The data at the address Aw on the main memory 21 is copied to the line j (step S39 in FIG. 6).

【0026】但し、メモリ制御回路20は選択したライ
ンjのVビット24及びMビット25を調べ(図6ステ
ップS36,S37)、それらがともに“1”の時には
ラインjがメインメモリ21よりも新しいデータを保持
しているので、ラインjのデータをメインメモリ21の
対応するアドレスへ書戻した後(図6ステップS3
8)、アドレスAwのデータをラインjにコピーする
(図6ステップS39)。
However, the memory control circuit 20 checks the V bit 24 and the M bit 25 of the selected line j (steps S36 and S37 in FIG. 6). When both are "1", the line j is newer than the main memory 21. Since the data is held, the data of the line j is written back to the corresponding address of the main memory 21 (step S3 in FIG. 6).
8) Copy the data at address Aw to line j (step S39 in FIG. 6).

【0027】その後、メモリ制御回路20はラインjの
データを更新し(図6ステップS40)、ラインjのV
ビット24及びMビット25をともに“1”にし(図6
ステップS41)、キャッシュメモリ22のラインj上
に有効なデータがあり、メインメモリ21上のデータよ
りキャッシュメモリ22のラインj上のデータが新しい
ことを示す。リードキャッシュ・ミスの時と同様に、ラ
イン27の値jは通常、アドレスAwの値や各ラインの
使用状況によって適切に選ばれるが、その手法について
は公知であるので、その詳細な説明は省略する。
Thereafter, the memory control circuit 20 updates the data of the line j (step S40 in FIG. 6) and
Bit 24 and M bit 25 are both set to "1" (FIG. 6
Step S41) indicates that valid data exists on line j of the cache memory 22, and that the data on line j of the cache memory 22 is newer than the data on the main memory 21. As in the case of a read cache miss, the value j of the line 27 is usually appropriately selected depending on the value of the address Aw and the usage status of each line. However, since the method is known, detailed description thereof is omitted. I do.

【0028】ライトキャッシュ・ミスの時、アドレスA
wにある値をいったんキャッシュメモリ22に読込むの
は、一度に書換えられるデータがキャッシュ・ラインj
の一部のみだからである。キャッシュの1ラインは通
常、16〜64バイトのデータを保持するが、1個のデ
ータ書込み命令は通常、1〜8バイトのデータを書込
む。キャッシュ・ラインjのデータのうち、データ書込
みによって更新されなかったデータは、メインメモリ2
1上で対応するデータの値と一致していなくては整合性
が保たれない。
When a write cache miss occurs, address A
Reading the value in w into the cache memory 22 once means that the data to be rewritten at one time is
Because it is only part of it. One line of the cache typically holds 16-64 bytes of data, while a single data write instruction typically writes 1-8 bytes of data. Of the data of the cache line j, the data not updated by the data write is stored in the main memory 2
If it does not match the value of the corresponding data on 1, the consistency cannot be maintained.

【0029】[0029]

【発明が解決しようとする課題】一般的に、マルチメデ
ィア処理では大量の演算結果を連続したアドレスへ書込
むことが多い。例えば、ビデオ画像の圧縮規格であるI
TU−T勧告H.261,H.262,H.263,M
PEG(Moving Picture Expert
s Group)−1ビデオ(ISO/IEC1117
2、”Information Technology
−Coding of Moving Picture
s and Associated Audio fo
r Digital Storage Media u
p to1.5Mbit/s”),MPEG−2ビデオ
(ISO/IEC13818−2、”Informat
ion Technology−Generic Co
ding of of Moving Picture
s and Associated Audio”)に
従って圧縮されたビットストリームを伸張し、ビデオ画
像を再生する場合、再生画像はメインメモリ上に確保し
たフレームバッファに書込まれる。
Generally, in multimedia processing, a large amount of calculation results are often written to consecutive addresses. For example, a video image compression standard I
TU-T Recommendation H. 261, H .; 262, H .; 263, M
PEG (Moving Picture Expert)
s Group) -1 video (ISO / IEC1117)
2. “Information Technology”
-Coding of Moving Picture
s and Associated Audio fo
r Digital Storage Media u
p to 1.5 Mbit / s ”), MPEG-2 video (ISO / IEC13818-2,“ Informat
ion Technology-Generic Co
ding of of Moving Picture
When a video image is reproduced by expanding a bit stream compressed according to “s and Associated Audio”), the reproduced image is written into a frame buffer secured on a main memory.

【0030】例えば、MPEG−2 Main Lev
elで一般的に用いられる解像度である720×480
画素の画像を伸張した場合、1ピクチャあたり輝度信号
に345,600バイトの連続した領域を、色差信号2
枚に各86,400バイトの連続した領域をメインメモ
リ上に確保する。
For example, MPEG-2 Main Lev
720 × 480 which is a resolution generally used for EL
When a pixel image is expanded, a continuous area of 345,600 bytes is included in a luminance signal per picture by a color difference signal 2.
A continuous area of 86,400 bytes for each sheet is secured on the main memory.

【0031】すなわち、1ピクチャあたり506Kバイ
トのメモリ量が必要である。MPEG−2で用いられる
双方向動き予測を実現するには最低でも3枚のピクチャ
を保持する必要があるため、MPEG−2ビデオ伸張ソ
フトウェアの作業領域は最低でも1.5Mバイト必要に
なる。キャッシュメモリの容量は通常数十〜数百Kバイ
トであり、これだけの量のデータをすべて保持すること
はできない。したがって、フレームバッファアクセスで
はデータキャッシュ・ミスが頻発し、高速なMPEG−
2ビデオ伸張ソフトウェア作成のための障害となってい
る。
That is, a memory amount of 506 Kbytes per picture is required. To implement the bidirectional motion prediction used in MPEG-2, it is necessary to hold at least three pictures, so that the working area of the MPEG-2 video decompression software requires at least 1.5 Mbytes. The capacity of the cache memory is usually several tens to several hundreds of Kbytes, and it is not possible to hold all of this amount of data. Therefore, data cache misses frequently occur in frame buffer access, and high-speed MPEG-
2 It is an obstacle for creating video decompression software.

【0032】さらに、1秒間に30枚の画像をリアルタ
イム再生するには、毎秒14.8Mバイトのデータをメ
インメモリに書込む必要がある。この書込みがデータキ
ャッシュ・ミスを引き起こしていると考えると、キャッ
シュメモリとメインメモリとの整合性を保つために、伸
張データの書込みの前に、メインメモリからキャッシュ
メモリへ同じ量のデータを読込んでいるため、この2
倍、毎秒29.6Mバイトのデータアクセスがメインメ
モリに対して発生していることになる。この量は、例え
ば、32bit幅66MHz動作のバスのバンド幅の1
1.5%にも達し、その処理性能上無視することができ
ない。
Further, in order to reproduce 30 images per second in real time, it is necessary to write 14.8 Mbytes of data per second to the main memory. Considering that this writing causes a data cache miss, in order to maintain consistency between the cache memory and the main memory, the same amount of data is read from the main memory to the cache memory before writing the decompressed data. Because this 2
That is, data access of 29.6 Mbytes / sec occurs to the main memory. This amount is, for example, one of the bandwidth of the bus operating at 32 bits and 66 MHz.
It reaches 1.5% and cannot be ignored due to its processing performance.

【0033】図7に連続したアドレスへデータをライト
した時のキャッシュメモリとメインメモリとの間のデー
タのやり取りと、キャッシュメモリ及びメインメモリ上
のデータの変化とを示す。
FIG. 7 shows the exchange of data between the cache memory and the main memory when data is written to consecutive addresses, and changes in data on the cache memory and the main memory.

【0034】典型的な例として、キャッシュの1ライン
のデータサイズを16バイト、ライトするデータのサイ
ズを4バイトと仮定する。ここで、メインメモリのアド
レスAwから4個の4バイト・データN0,N1,N
2,N3を1個ずつライトした場合を考える。
As a typical example, assume that the data size of one line of the cache is 16 bytes and the size of data to be written is 4 bytes. Here, four 4-byte data N0, N1, N from the address Aw of the main memory
Consider a case where 2 and N3 are written one by one.

【0035】さらに、キャッシュメモリ上にはアドレス
Awのデータが最初存在しないものとし、アドレスAw
のデータを保持するキャッシュ・ラインiは不定値U
0,U1,U2,U3を格納しているものとする。
Further, it is assumed that the data of the address Aw does not initially exist in the cache memory, and the address Aw
The cache line i holding the data of
It is assumed that 0, U1, U2, and U3 are stored.

【0036】最初に、アドレスAwに値N0をライトし
た場合の動作を考える。アドレスAwへの値N0のライ
ト要求が発生した時[図7の(11)参照]、アドレス
Awのデータはキャッシュメモリ上に存在しないために
キャッシュ・ミスが発生し、メインメモリ上のアドレス
Awから1ライン16バイト分のデータM0,M1,M
2,M3[図7の47参照]がキャッシュ・ラインiに
読込まれる[図7の(17)及び42参照]。その後、
ラインiのデータのうちアドレスAwからの4バイト分
のデータに相当するM0がN0によって上書きされる
[図7の(12)及び43参照]。
First, the operation when the value N0 is written to the address Aw will be considered. When a write request of the value N0 to the address Aw occurs (see (11) in FIG. 7), a cache miss occurs because the data of the address Aw does not exist in the cache memory, and the address Aw on the main memory starts. Data M0, M1, M for 16 bytes per line
2, M3 (see 47 in FIG. 7) is read into cache line i [see (17) and 42 in FIG. 7]. afterwards,
M0 corresponding to the data of 4 bytes from the address Aw in the data of the line i is overwritten by N0 [see (12) and 43 in FIG. 7].

【0037】次に、隣接するアドレスAw+4に4バイ
トのデータN1がライトされる[図7の(13)参
照]。アドレスAwから1ライン16バイト分のデータ
はキャッシュメモリ上に存在するため、このライトはキ
ャッシュにヒットし、ラインi上のアドレスAw+4に
相当するデータをN1に更新する[図7の44参照]。
Next, 4-byte data N1 is written to the adjacent address Aw + 4 [see (13) in FIG. 7]. Since data of 16 bytes per line from the address Aw exists in the cache memory, this write hits the cache, and updates the data corresponding to the address Aw + 4 on the line i to N1 (see 44 in FIG. 7).

【0038】三番目に、隣接するアドレスAw+8に、
4バイトのデータN2がライトされる[図7の(14)
参照]。アドレスAwから1ライン16バイト分のデー
タはキャッシュメモリ上に存在するため、このライトは
キャッシュにヒットし、ラインi上のアドレスAw+8
に相当するデータをN2に更新する[図7の45参
照]。
Third, at the adjacent address Aw + 8,
The 4-byte data N2 is written [(14) in FIG.
reference]. Since data of 16 bytes per line from the address Aw exists in the cache memory, this write hits the cache and the address Aw + 8 on the line i
Is updated to N2 [see 45 in FIG. 7].

【0039】最後に、隣接するアドレスAw+12に、
4バイトのデータN3がライトされる[図7の(15)
参照]。アドレスAwから1ライン16バイト分のデー
タはキャッシュメモリ上に存在するため、このライトは
キャッシュにヒットし、ラインi上のアドレスAw+1
2に相当するデータをN3に更新する[図7の46参
照]。
Finally, at the adjacent address Aw + 12,
The 4-byte data N3 is written [(15) in FIG.
reference]. Since data of 16 bytes per line from the address Aw exists in the cache memory, this write hits the cache and the address Aw + 1 on the line i
The data corresponding to 2 is updated to N3 [see 46 in FIG. 7].

【0040】以上、N0,N1,N2,N3のライトに
よって、キャッシュ・ラインi上のデータはすべて書換
えられており、メインメモリ上のアドレスAwから1ラ
イン16バイト分のデータ47よりも新しい。したがっ
て、ラインiに別のアドレスのデータを格納する時に
は、まずラインiのデータをメインメモリに書戻す必要
がある[図7の(16)及び48参照]。
As described above, all the data on the cache line i has been rewritten by the writing of N0, N1, N2, and N3, and are newer than the data 47 of 16 bytes per line from the address Aw on the main memory. Therefore, when data of another address is stored in the line i, it is necessary to first write the data of the line i back to the main memory [see (16) and 48 in FIG. 7].

【0041】そこで、本発明の目的は上記の問題点を解
消し、連続したアドレスへ大量のデータを書込む時のキ
ャッシュ・ミス処理を高速化することができ、そのキャ
ッシュ・ミス処理を含むソフトウェアの実行速度を改善
することができるキャッシュメモリシステム及びそれに
用いるキャッシュ制御方法並びにその制御プログラムを
記録した記録媒体を提供することにある。
Therefore, an object of the present invention is to solve the above-mentioned problems and to speed up a cache miss process when writing a large amount of data to a continuous address. The present invention provides a cache memory system capable of improving the execution speed of a cache memory, a cache control method used for the same, and a recording medium recording the control program.

【0042】[0042]

【課題を解決するための手段】本発明によるキャッシュ
メモリシステムは、メインメモリと、前記メインメモリ
に格納されたデータの一部を保持するキャッシュメモリ
とを含むキャッシュメモリシステムであって、前記キャ
ッシュメモリに対するライトキャッシュ・ミスが発生し
た際に当該ライトキャッシュのデータを格納する前記キ
ャッシュメモリのアドレスを選択する選択手段と、前記
選択手段で選択されたアドレスに対応する前記キャッシ
ュメモリのデータが有効か無効かを判定する判定手段
と、前記判定手段が当該データを無効と判定した時に当
該データに対応する前記メインメモリのデータを前記キ
ャッシュメモリに読込むことなく前記ライトキャッシュ
時のデータを前記選択手段で選択されたアドレスに書込
む書込み手段とを備えている。
A cache memory system according to the present invention is a cache memory system including a main memory and a cache memory for holding a part of data stored in the main memory. Selecting means for selecting an address of the cache memory for storing data of the write cache when a write cache miss occurs, and validity or invalidity of the data of the cache memory corresponding to the address selected by the selection means Determining means for determining whether or not the data at the time of the write cache is read by the selecting means without reading data of the main memory corresponding to the data into the cache memory when the determining means determines that the data is invalid. Writing means for writing to the selected address. To have.

【0043】本発明によるキャッシュ制御方法は、メイ
ンメモリと、前記メインメモリに格納されたデータの一
部を保持するキャッシュメモリとを含むキャッシュメモ
リシステムのキャッシュ制御方法であって、前記キャッ
シュメモリに対するライトキャッシュ・ミスが発生した
際に当該ライトキャッシュのデータを格納する前記キャ
ッシュメモリのアドレスを選択するステップと、その選
択されたアドレスに対応する前記キャッシュメモリのデ
ータが有効か無効かを判定するステップと、当該データ
が無効と判定された時に当該データに対応する前記メイ
ンメモリのデータを前記キャッシュメモリに読込むこと
なく前記ライトキャッシュ時のデータを前記選択手段で
選択されたアドレスに書込むステップとを備えている。
A cache control method according to the present invention is a cache control method for a cache memory system including a main memory and a cache memory for holding a part of data stored in the main memory, wherein the write to the cache memory is performed. Selecting an address of the cache memory for storing the data of the write cache when a cache miss occurs; and determining whether the data of the cache memory corresponding to the selected address is valid or invalid. Writing the data at the time of the write cache to an address selected by the selection means without reading the data of the main memory corresponding to the data into the cache memory when the data is determined to be invalid. Have.

【0044】本発明によるキャッシュ制御プログラムを
記録した記録媒体は、コンピュータに、メインメモリに
格納されたデータの一部を保持するキャッシュメモリを
制御させるためのキャッシュ制御プログラムを記録した
記録媒体であって、前記キャッシュ制御プログラムは前
記コンピュータに、前記キャッシュメモリに対するライ
トキャッシュ・ミスが発生した際に当該ライトキャッシ
ュのデータを格納する前記キャッシュメモリのアドレス
を選択させ、その選択されたアドレスに対応する前記キ
ャッシュメモリのデータが有効か無効かを判定させ、当
該データが無効と判定された時に当該データに対応する
前記メインメモリのデータを前記キャッシュメモリに読
込むことなく前記ライトキャッシュ時のデータを前記選
択手段で選択されたアドレスに書込ませている。
A recording medium on which the cache control program according to the present invention is recorded is a recording medium on which a cache control program for causing a computer to control a cache memory that holds a part of data stored in a main memory is recorded. The cache control program causes the computer to select an address of the cache memory for storing data of the write cache when a write cache miss occurs in the cache memory, and the cache corresponding to the selected address Determining whether the data in the memory is valid or invalid; and when the data is determined to be invalid, selecting the data in the write cache without reading the data in the main memory corresponding to the data into the cache memory. Selected by And then written to the address.

【0045】すなわち、本発明のキャッシュメモリシス
テムは、データと、保持しているデータのメインメモリ
上のアドレスの上位ビットを示すタグと、データが有効
であることを示すバリッド(V)ビットと、データが更
新されたことを示すモディファイ(M)ビットとを含む
複数のキャッシュ・ラインから構成されている。
That is, the cache memory system of the present invention comprises: a data; a tag indicating the upper bit of an address of the retained data in the main memory; a valid (V) bit indicating that the data is valid; And a plurality of cache lines including a modify (M) bit indicating that the data has been updated.

【0046】本発明のキャッシュメモリシステムは、キ
ャッシュメモリへの書込み時、キャッシュ中に書込みア
ドレスの上位ビットと一致するタグを持ち、かつVビッ
トが“1”であるラインが存在せず、キャッシュ・ミス
の処理を行う必要がある時、書込みアドレスに相当する
メインメモリのアドレスからデータを読込むことなく、
キャッシュ・ラインを書込みデータで更新し、Vビット
及びMビットの双方を“1”にセットしている。
In the cache memory system of the present invention, at the time of writing to the cache memory, there is no line in the cache that has a tag that matches the upper bit of the write address and the V bit is "1". When it is necessary to process a miss, without reading data from the main memory address corresponding to the write address,
The cache line is updated with the write data, and both the V bit and the M bit are set to "1".

【0047】このため、メインメモリのアドレスからデ
ータを読込む時間を削減できる。よって、連続したアド
レスへ大量のデータを書込む時のキャッシュ・ミス処理
を高速化することが可能となり、そのキャッシュ・ミス
処理を含むソフトウェアの実行速度を改善することが可
能となる。
Therefore, the time for reading data from the address of the main memory can be reduced. Therefore, it is possible to speed up cache miss processing when writing a large amount of data to consecutive addresses, and to improve the execution speed of software including the cache miss processing.

【0048】[0048]

【発明の実施の形態】次に、本発明の一実施例について
図面を参照して説明する。図1は本発明の一実施例によ
るキャッシュメモリシステムの構成を示すブロック図で
ある。図において、本発明の一実施例によるキャッシュ
メモリシステムは汎用プロセッサ1と、汎用プロセッサ
1に接続されるメモリ・システム2とから構成されてい
る。
Next, an embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing a configuration of a cache memory system according to one embodiment of the present invention. In the figure, a cache memory system according to one embodiment of the present invention includes a general-purpose processor 1 and a memory system 2 connected to the general-purpose processor 1.

【0049】汎用プロセッサ1はライト命令(書込み、
ストア)11とキャッシュミス用ライト命令12とを含
む命令セット10を持ち、ソフトウェア実行時、メモリ
システム2に格納されたデータをリード・ライトする。
尚、命令セット10はROM(リードオンリメモリ)や
IC(集積回路)メモリ等に格納可能である。
The general-purpose processor 1 issues a write instruction (write,
It has an instruction set 10 including a (store) 11 and a write instruction 12 for cache miss, and reads / writes data stored in the memory system 2 when executing software.
The instruction set 10 can be stored in a ROM (Read Only Memory), an IC (Integrated Circuit) memory, or the like.

【0050】メモリシステム2は大容量なメインメモリ
21と、高速なキャッシュメモリ22とを組合わせて構
成され、メインメモリ21及びキャッシュメモリ22を
制御するメモリ制御回路20を備えている。
The memory system 2 is configured by combining a large-capacity main memory 21 and a high-speed cache memory 22, and includes a memory control circuit 20 for controlling the main memory 21 and the cache memory 22.

【0051】キャッシュメモリ22は数百〜数千個のラ
イン27に分割され、ライン27毎に制御情報を付加
し、状態を管理する。1個のライン27が保持するデー
タのサイズは16〜64バイトである。
The cache memory 22 is divided into several hundred to several thousand lines 27, and control information is added to each line 27 to manage the state. The size of data held by one line 27 is 16 to 64 bytes.

【0052】制御情報としては1ライン27毎に、保持
しているデータ26のメインメモリ21上のアドレスの
上位ビットを示すタグ23と、データ26が有効である
ことを示すバリッド(V)ビット24と、データ26が
更新されたことを示すモディファイ(M)ビット25と
が付加される。
As the control information, a tag 23 indicating an upper bit of an address of the held data 26 on the main memory 21 and a valid (V) bit 24 indicating that the data 26 is valid for each line 27. And a modify (M) bit 25 indicating that the data 26 has been updated.

【0053】Vビット24はそのライン27のデータ2
6が有効か無効かを示す。以下、Vビット24が“1”
の時にはそのライン27のデータ26を有効とし、
“0”の時にはデータ26を無効とする。
The V bit 24 is the data 2 of the line 27
6 indicates valid or invalid. Hereinafter, the V bit 24 is set to "1".
, The data 26 of the line 27 is made valid,
When it is “0”, the data 26 is invalidated.

【0054】Mビット25はそのライン27のデータ2
6が更新されており、キャッシュメモリ22上のデータ
26がメインメモリ21上のデータより新しいか、更新
されておらず、キャッシュメモリ22上のデータ26と
メインメモリ21上のデータとが等しいかを示す。以
下、Mビットが“1”の時にはキャッシュメモリ22上
のデータ26がメインメモリ21上のデータより新しい
とし、“0”の時にはキャッシュメモリ22上のデータ
26とメインメモリ21上のデータとが等しいものとす
る。
The M bit 25 is the data 2 of the line 27.
6 has been updated and whether the data 26 in the cache memory 22 is newer than the data in the main memory 21 or not updated and the data 26 in the cache memory 22 is equal to the data in the main memory 21. Show. Hereinafter, when the M bit is "1", the data 26 in the cache memory 22 is assumed to be newer than the data in the main memory 21. When the M bit is "0", the data 26 in the cache memory 22 is equal to the data in the main memory 21. Shall be.

【0055】本発明の一実施例においても、データリー
ド時の動作は図5に示す従来の技術と同様である。すな
わち、汎用プロセッサ1からキャッシュメモリ22にア
ドレスArのデータのリード要求があったとする。メモ
リ制御回路20はアドレスArの上位ビットと同じタグ
23の値を持つライン27を検索する(図5ステップS
11)。
In the embodiment of the present invention, the operation at the time of data reading is the same as that of the prior art shown in FIG. That is, it is assumed that the general processor 1 requests the cache memory 22 to read the data at the address Ar. The memory control circuit 20 searches for the line 27 having the same value of the tag 23 as the upper bit of the address Ar (Step S in FIG. 5).
11).

【0056】アドレスArの上位ビットと同じタグ23
の値を持つライン27が存在し、このラインをラインi
とすると、メモリ制御回路20はラインiのVビット2
4を調べ(図5ステップS12)、Vビット24が
“1”ならば、ラインiが目的のデータを含んでいるた
め(キャッシュ・ヒット)、ラインiのデータ26のう
ち必要とされる部分を汎用プロセッサ1に返す(図5ス
テップS13)。
Tag 23 same as upper bit of address Ar
And a line 27 having the value of
Then, the memory control circuit 20 calculates the V bit 2 of the line i.
4 (step S12 in FIG. 5). If the V bit 24 is "1", since the line i contains the target data (cache hit), the required portion of the data 26 of the line i is This is returned to the general-purpose processor 1 (step S13 in FIG. 5).

【0057】キャッシュメモリ22中に、アドレスAr
の上位ビットと同じタグ23の値を持つラインが存在し
ない時、または存在してもVビット24が“0”の時、
キャッシュメモリ22中に目的のデータが存在しない
(キャッシュ・ミス)ので、メモリ制御回路20は適当
なライン(ラインjとする)を選択し(図5ステップS
14)、メインメモリ21上のアドレスArのデータを
ラインjにコピーする(図5ステップS18)。
The address Ar is stored in the cache memory 22.
When there is no line having the same value of the tag 23 as the upper bit of, or when the V bit 24 is “0” even if it exists,
Since the target data does not exist in the cache memory 22 (cache miss), the memory control circuit 20 selects an appropriate line (referred to as line j) (step S5 in FIG. 5).
14) The data at the address Ar on the main memory 21 is copied to the line j (step S18 in FIG. 5).

【0058】但し、メモリ制御回路20は選択したライ
ンjのVビット24及びMビット25を調べ(図5ステ
ップS15,S16)、それらがともに“1”の時には
ラインjがメインメモリ21よりも新しいデータを保持
しているので、ラインjのデータをメインメモリ21の
対応するアドレスへ書き戻した後(図5ステップS1
7)、アドレスArのデータをラインjにコピーする
(図5ステップS18)。
However, the memory control circuit 20 checks the V bit 24 and the M bit 25 of the selected line j (steps S15 and S16 in FIG. 5). When both are "1", the line j is newer than the main memory 21. Since the data is held, the data on line j is written back to the corresponding address in the main memory 21 (step S1 in FIG. 5).
7) The data at address Ar is copied to line j (step S18 in FIG. 5).

【0059】その後、メモリ制御回路20はVビット2
4を“1”に、Mビット25を“0”に夫々設定し(図
5ステップS19)、ラインjがメインメモリ21のデ
ータの有効なコピーを保持していることを示し、ライン
jのデータのうち必要な部分を汎用プロセッサ1へ返す
(図5ステップS20)。このとき、ライン27の値j
は通常、アドレスArの値や各ラインの使用状況によっ
て適切に選ばれるが、その手法については公知であるの
で、その詳細な説明は省略する。
Thereafter, the memory control circuit 20 sets the V bit 2
4 is set to "1" and the M bit 25 is set to "0" (step S19 in FIG. 5), indicating that the line j holds a valid copy of the data in the main memory 21, and the data of the line j Is returned to the general-purpose processor 1 (step S20 in FIG. 5). At this time, the value j of the line 27
Usually, is appropriately selected depending on the value of the address Ar and the usage status of each line. However, since the method is known, detailed description thereof will be omitted.

【0060】図2は本発明の一実施例によるデータライ
ト時の動作を示すフローチャートである。これら図1及
び図2を参照して本発明の一実施例によるデータライト
時の動作について説明する。
FIG. 2 is a flowchart showing the operation at the time of data writing according to one embodiment of the present invention. The operation at the time of data write according to one embodiment of the present invention will be described with reference to FIGS.

【0061】汎用プロセッサ1からキャッシュメモリ2
2にアドレスAwのデータのライト要求があったとす
る。メモリ制御回路20はアドレスAwの上位ビットと
同じタグ23の値を持つライン27を検索する(図2ス
テップS1)。
From the general-purpose processor 1 to the cache memory 2
Assume that there is a write request for the data of the address Aw in No. 2. The memory control circuit 20 searches for a line 27 having the same value of the tag 23 as the upper bit of the address Aw (step S1 in FIG. 2).

【0062】アドレスAwの上位ビットと同じタグ23
の値を持つライン27が存在し、このラインをラインi
とすると、メモリ制御回路20はラインiのVビット2
4を調べ(図2ステップS2)、Vビット24が“1”
ならば、ラインiが目的のデータを含んでいるため(キ
ャッシュ・ヒット)、ラインi上のデータを書換える
(図2ステップS3)。さらに、メモリ制御回路20は
ラインiのMビットを“1”にし(図2ステップS
4)、メインメモリ21上のデータよりキャッシュ・ラ
インi上のデータが新しいことを示す。
Tag 23 same as upper bit of address Aw
And a line 27 having the value of
Then, the memory control circuit 20 calculates the V bit 2 of the line i.
4 (step S2 in FIG. 2), and the V bit 24 is "1".
If so, since the line i contains the target data (cache hit), the data on the line i is rewritten (step S3 in FIG. 2). Further, the memory control circuit 20 sets the M bit of the line i to "1" (step S2 in FIG. 2).
4) indicates that the data on the cache line i is newer than the data on the main memory 21.

【0063】キャッシュメモリ22中に、アドレスAw
の上位ビットと同じタグ23の値を持つラインが存在し
ない時、または存在してもVビット24が“0”の時、
キャッシュメモリ22中に目的のデータは存在しない
(キャッシュ・ミス)ので、メモリ制御回路20は適当
なライン(ラインjとする)を選択し(図2ステップS
5)、その後、ラインjにデータをライトする(図2ス
テップS9)。
The address Aw is stored in the cache memory 22.
When there is no line having the same value of the tag 23 as the upper bit of, or when the V bit 24 is “0” even if it exists,
Since the target data does not exist in the cache memory 22 (cache miss), the memory control circuit 20 selects an appropriate line (line j) (step S2 in FIG. 2).
5) Then, data is written to line j (step S9 in FIG. 2).

【0064】但し、メモリ制御回路20は選択したライ
ンjのVビット24及びMビット25を調べ(図2ステ
ップS6,S7)、それらがともに“1”の時にはライ
ンjがメインメモリ21よりも新しいデータを保持して
いるので、ラインjのデータをメインメモリ21の対応
するアドレスへ書き戻した後(図2ステップS8)、ラ
インjにデータをライトする(図2ステップS9)。
However, the memory control circuit 20 checks the V bit 24 and the M bit 25 of the selected line j (steps S6 and S7 in FIG. 2). When both are "1", the line j is newer than the main memory 21. Since the data is held, the data on line j is written back to the corresponding address in the main memory 21 (step S8 in FIG. 2), and then the data is written on line j (step S9 in FIG. 2).

【0065】その後、メモリ制御回路20はラインjの
Vビット24及びMビット25をともに“1”にし(図
2ステップS10)、メインメモリ21上のデータより
キャッシュ・ラインi上のデータが新しいことを示す。
リードキャッシュ・ミス時と同様に、ライン27の値j
は通常、アドレスAwの値や各ラインの使用状況によっ
て適切に選ばれるが、その手法については公知であるの
で、その詳細な説明は省略する。
Thereafter, the memory control circuit 20 sets both the V bit 24 and the M bit 25 of the line j to "1" (step S10 in FIG. 2), and confirms that the data on the cache line i is newer than the data on the main memory 21. Is shown.
As in the case of a read cache miss, the value j of line 27
Normally, is appropriately selected depending on the value of the address Aw and the use status of each line. However, since the method is known, detailed description thereof will be omitted.

【0066】図3は本発明の一実施例によるデータライ
ト時の動作を示す図である。この図3を参照して本発明
の一実施例によってキャッシュ・ミス時の処理がどのよ
うに高速化されるのかを説明する。
FIG. 3 is a diagram showing an operation at the time of data write according to one embodiment of the present invention. With reference to FIG. 3, how the processing at the time of a cache miss is accelerated by the embodiment of the present invention will be described.

【0067】図3は図7に示す動作と同様に、連続した
アドレスへデータをライトした時のキャッシュメモリ制
御手法で制御されるキャッシュメモリ22とメインメモ
リ21との間のデータのやり取りと、キャッシュメモリ
22及びメインメモリ21上のデータの変化とを示す。
FIG. 3 shows the exchange of data between the cache memory 22 and the main memory 21 controlled by the cache memory control method when data is written to consecutive addresses, and the cache operation, similarly to the operation shown in FIG. 5 shows changes in data on the memory 22 and the main memory 21.

【0068】この場合、図7と同様に、キャッシュの1
ラインのデータサイズを16バイト、ライトするデータ
のサイズを4バイトと仮定し、メインメモリ21のアド
レスAwから4個の4バイトのデータN0,N1,N
2,N3を1個ずつライトした場合を考える。さらに、
これも図7と同様に、開始時にキャッシュメモリ22上
にはアドレスAwのデータが存在しないものとし、アド
レスAwのデータを保持する予定のキャッシュ・ライン
iは不定値U0,U1,U2,U3を格納しているもの
とする[図3の31参照]。
In this case, as in FIG.
Assuming that the data size of the line is 16 bytes and the size of the data to be written is 4 bytes, four 4-byte data N0, N1, N
Consider a case where 2 and N3 are written one by one. further,
Similarly to FIG. 7, it is assumed that the data of the address Aw does not exist in the cache memory 22 at the time of the start, and the cache line i that holds the data of the address Aw has the indefinite values U0, U1, U2, and U3. It is assumed to be stored [see 31 in FIG. 3].

【0069】最初に、アドレスAwに値N0をライトす
る要求が発生した場合[図3の(1)参照]の動作を考
える。このとき、アドレスAwのデータはキャッシュ上
に存在しないため、キャッシュ・ミスが発生するが、本
発明の一実施例では従来例とは異なり、メインメモリ2
1上のアドレスAwから1ライン分のデータM0,M
1,M2,M3をキャッシュ・ラインiに読込むことが
行われず、ラインiのデータのうちアドレスAwからの
4バイト分のデータに相当するU0がN0によって上書
きされるのみである[図3の(2)及び32参照]。
First, consider the operation when a request to write the value N0 to the address Aw occurs (see (1) in FIG. 3). At this time, since the data at the address Aw does not exist in the cache, a cache miss occurs. However, in one embodiment of the present invention, unlike the conventional example,
1 line of data M0, M from address Aw on
1, M2, and M3 are not read into the cache line i, and U0 corresponding to the data of 4 bytes from the address Aw in the data of the line i is only overwritten by N0 [FIG. (2) and 32].

【0070】ラインiのデータのうちアドレスAw+
4、Aw+8、Aw+12に相当するデータは不定値U
1,U2,U3であり、メインメモリ21の値M1,M
2,M3を反映しない。しかしながら、キャッシュのヒ
ット・ミス判定時にはラインiがメインメモリ21上の
アドレスAwから1ライン16バイト分のデータを保持
しているとみなされる。
Address Aw + of the data on line i
4, data corresponding to Aw + 8 and Aw + 12 are indefinite values U
1, U2, U3 and the values M1, M in the main memory 21
2, M3 is not reflected. However, at the time of the cache hit / miss determination, it is considered that the line i holds 16 bytes of data per line from the address Aw on the main memory 21.

【0071】次に、隣接するアドレスAw+4に4バイ
トのデータN1がライトされる[図3の(3)参照]。
ヒット・ミス判定時にはアドレスAwから1ライン16
バイト分のデータがキャッシュメモリ22上に存在する
と扱われるため、このデータN1のライトはキャッシュ
にヒットし、ラインi上のアドレスAw+4に相当する
データがN1に更新される[図3の33参照]。
Next, 4-byte data N1 is written to the adjacent address Aw + 4 [see (3) in FIG. 3].
At the time of hit / miss determination, one line 16 from address Aw
Since the data for the byte is treated as existing in the cache memory 22, the write of the data N1 hits the cache, and the data corresponding to the address Aw + 4 on the line i is updated to N1 [see 33 in FIG. 3]. .

【0072】三番目に、隣接するアドレスAw+8に4
バイトのデータN2がライトされる[図3の(4)参
照]。ヒット・ミス判定時にはアドレスAwから1ライ
ン16バイト分のデータがキャッシュメモリ22上に存
在すると扱われるため、このデータN2のライトはキャ
ッシュにヒットし、ラインi上のアドレスAw+8に相
当するデータがN2に更新される[図3の34参照]。
Third, 4 is assigned to the adjacent address Aw + 8.
The byte data N2 is written [see (4) in FIG. 3]. At the time of the hit / miss determination, since data of 16 bytes per line from the address Aw is treated as existing in the cache memory 22, the write of the data N2 hits the cache, and the data corresponding to the address Aw + 8 on the line i becomes N2. [See 34 in FIG. 3].

【0073】最後に、隣接するアドレスAw+12に4
バイトのデータN3がライトされる[図3の(5)参
照]。ヒット・ミス判定時にはアドレスAwから1ライ
ン16バイト分のデータがキャッシュメモリ22上に存
在すると扱われるため、このライトはキャッシュにヒッ
トし、ラインi上のアドレスAw+12に相当するデー
タがN3に更新される[図3の35参照]。
Finally, 4 is added to the adjacent address Aw + 12.
The byte data N3 is written [see (5) in FIG. 3]. At the time of the hit / miss determination, since data of 16 bytes per line from the address Aw is treated as existing in the cache memory 22, this write hits the cache, and the data corresponding to the address Aw + 12 on the line i is updated to N3. [See 35 in FIG. 3].

【0074】以上、N0,N1,N2,N3のライトに
よってキャッシュ・ラインi上のデータがすべて書き換
えられており、メインメモリ21上のアドレスAwから
1ライン16バイト分のデータ36よりも新しい。した
がって、ラインiに別のアドレスのデータを格納する時
には、まずラインiのデータをメインメモリ21に書き
戻す必要がある[図3の(6)及び37参照]。
As described above, all the data on the cache line i has been rewritten by the writing of N0, N1, N2, and N3, and are newer than the data 36 for 16 bytes per line from the address Aw on the main memory 21. Therefore, when data of another address is stored in the line i, it is necessary to first write the data of the line i back to the main memory 21 (see (6) and 37 in FIG. 3).

【0075】図3に示す本発明の一実施例による動作例
と図7に示す従来の動作例とを比較すると、アドレスA
wに値N3をライトした後には同一の結果が得られてい
る。すなわち、キャッシュ・ラインiは値N0,N1,
N2,N3を保持している[図3の35及び図7の4
6]。
A comparison between the operation example according to the embodiment of the present invention shown in FIG. 3 and the conventional operation example shown in FIG.
The same result is obtained after writing the value N3 to w. That is, cache line i has values N0, N1,
N2 and N3 [35 in FIG. 3 and 4 in FIG.
6].

【0076】しかしながら、従来例ではこの結果を得る
ためにメインメモリ21からキャッシュ・ラインiへの
リード[図7の(17)]を行っているのに対し、本発
明の一実施例ではこのリードを行っていない。したがっ
て、本発明の一実施例では従来例よりも高速に結果を得
ることができる。
However, in the conventional example, reading from the main memory 21 to the cache line i [(17) in FIG. 7] is performed in order to obtain this result. In one embodiment of the present invention, this reading is performed. Did not go. Therefore, in one embodiment of the present invention, the result can be obtained faster than in the conventional example.

【0077】図3において、キャッシュ・ミス時にメイ
ンメモリ21からキャッシュ・ラインへのデータリード
が不要な理由を説明する。あるキャッシュ・ラインi上
のデータが複数のライト動作ですべて更新される場合、
最初のライトが起こしたキャッシュ・ミスでメインメモ
リ21からキャッシュ・ラインiへデータを転送して
も、メインメモリ21から転送されたデータは複数のラ
イト動作ですべて上書きされてしまうため、キャッシュ
・ラインiが保持する最終結果はライトデータの値のみ
に依存し、メインメモリ21の内容には依存しない。し
たがって、メインメモリ21からキャッシュ・ラインへ
のデータリードは不要である。
Referring to FIG. 3, the reason why it is unnecessary to read data from main memory 21 to a cache line at the time of a cache miss will be described. When data on a certain cache line i is all updated by a plurality of write operations,
Even if data is transferred from the main memory 21 to the cache line i due to a cache miss in which the first write has occurred, the data transferred from the main memory 21 is all overwritten by a plurality of write operations. The final result held by i depends only on the value of the write data, not on the contents of the main memory 21. Therefore, there is no need to read data from the main memory 21 to the cache line.

【0078】一般的には、あるキャッシュ・ライン上の
データが複数のライト動作ですべて更新される保証はな
いため、メインメモリ21の内容と対応するキャッシュ
・ラインのデータの内容との整合性を保つにはキャッシ
ュ・ミス時にメインメモリ21の内容をキャッシュ・ラ
インにリードする必要がある。しかしながら、マルチメ
ディアアプリケーション等ではしばしばキャッシュ・ラ
イン上のデータが複数のライト動作ですべて更新される
ことが保証される。
Generally, there is no guarantee that all data on a certain cache line will be updated by a plurality of write operations. Therefore, the consistency between the contents of the main memory 21 and the contents of the corresponding cache line data must be checked. In order to maintain the contents, it is necessary to read the contents of the main memory 21 to a cache line at the time of a cache miss. However, in a multimedia application or the like, it is often guaranteed that all data on a cache line is updated by a plurality of write operations.

【0079】例えば、圧縮されたビデオ画像をソフトウ
ェアで伸張することを考える。伸張されたビデオ画像は
数百キロバイト程度のフレームバッファに連続して書込
まれるため、フレームバッファ領域に対応するキャッシ
ュ・ラインはすべての内容が更新される。マルチメディ
アアプリケーション、特にビデオ画像を扱うアプリケー
ションでは大量のデータをフレームバッファに書込むこ
とが多く、不要なリード動作を省略することによる高速
化の効果も大きい。
For example, consider expanding a compressed video image by software. Since the decompressed video image is continuously written into a frame buffer of about several hundred kilobytes, all contents of the cache line corresponding to the frame buffer area are updated. Multimedia applications, especially applications that handle video images, often write a large amount of data to the frame buffer, and the elimination of unnecessary read operations has a significant effect of speeding up.

【0080】図6に示す従来のキャッシュ制御手法に従
う通常のライト命令(書込み、ストア)と、図2に示す
本発明の一実施例によるキャッシュ制御手法に従うライ
ト命令とは汎用プロセッサ1の命令セット10中に夫々
別の命令として用意し、アプリケーションソフトウェア
のプログラマが使い分ける。
A general write instruction (write, store) according to the conventional cache control method shown in FIG. 6 and a write instruction according to the cache control method according to one embodiment of the present invention shown in FIG. Each of them is prepared as a separate instruction, and the application software programmer uses it properly.

【0081】なぜなら、あるキャッシュ・ライン上のデ
ータが複数のライト動作ですべて更新されるかどうかを
汎用プロセッサ1上の何らかのハードウェア機構で判断
することは不可能だからである。また、高級言語コンパ
イラが同様の判断を下すことも困難だからである。
The reason is that it is impossible to determine whether or not all the data on a certain cache line is updated by a plurality of write operations by any hardware mechanism on the general-purpose processor 1. It is also difficult for a high-level language compiler to make the same judgment.

【0082】このように、汎用プロセッサ1の命令セッ
ト10中に従来のキャッシュ制御手法に従う通常のライ
ト命令(書込み、ストア)11と、図2に示す本発明の
一実施例によるキャッシュ制御手法に従うキャッシュ・
ミス用ライト命令12とを夫々別の命令として用意し、
キャッシュ・ミスの処理を行う必要がある時にキャッシ
ュ・ミス用ライト命令12によって書込みアドレスに相
当するメインメモリ21のアドレスからデータを読込む
ことなく、キャッシュ・ラインを書込みデータで更新
し、そのラインのVビット及びMビットの双方を“1”
にセットすることによって、あるキャシュ・ライン上の
データをすべて更新する場合、ライト・ミス時のメイン
メモリ21からキャッシュ・ラインへのリードを省略し
てその処理を高速化することができる。
As described above, the general write instruction (write, store) 11 according to the conventional cache control method in the instruction set 10 of the general-purpose processor 1 and the cache according to the cache control method according to the embodiment of the present invention shown in FIG.・
Prepare the write instruction for miss 12 as a separate instruction,
When a cache miss process needs to be performed, the cache line is updated with the write data without reading data from the address of the main memory 21 corresponding to the write address by the cache miss write instruction 12, and the cache line is updated. "1" for both V and M bits
In the case where all data on a certain cache line is to be updated, the read from the main memory 21 to the cache line at the time of a write miss can be omitted to speed up the processing.

【0083】このため、メインメモリ21のアドレスか
らデータを読込む時間を削減することができる。よっ
て、連続したアドレスへ大量のデータを書込む時のキャ
ッシュ・ミス処理を高速化することができ、そのキャッ
シュ・ミス処理を含むソフトウェアの実行速度を改善す
ることができる。
Therefore, the time for reading data from the address of the main memory 21 can be reduced. Therefore, it is possible to speed up cache miss processing when writing a large amount of data to consecutive addresses, and improve the execution speed of software including the cache miss processing.

【0084】[0084]

【発明の効果】以上説明したように本発明によれば、メ
インメモリと、メインメモリに格納されたデータの一部
を保持するキャッシュメモリとを含むキャッシュメモリ
システムにおいて、キャッシュメモリに対するライトキ
ャッシュ・ミスが発生した際に当該ライトキャッシュの
データを格納するキャッシュメモリのアドレスを選択
し、その選択されたアドレスに対応するキャッシュメモ
リのデータが有効か無効かを判定し、当該データが無効
と判定された時に当該データに対応するメインメモリの
データをキャッシュメモリに読込むことなくライトキャ
ッシュ時のデータを選択されたアドレスに書込むことに
よって、連続したアドレスへ大量のデータを書込む時の
キャッシュ・ミス処理を高速化することができ、そのキ
ャッシュ・ミス処理を含むソフトウェアの実行速度を改
善することができるという効果がある。
As described above, according to the present invention, in a cache memory system including a main memory and a cache memory holding a part of data stored in the main memory, a write cache miss to the cache memory is performed. When an error occurs, the address of the cache memory that stores the data of the write cache is selected, and it is determined whether the data of the cache memory corresponding to the selected address is valid or invalid, and it is determined that the data is invalid. Cache miss processing when writing a large amount of data to consecutive addresses by writing the data at the time of write cache to the selected address without reading the data in the main memory corresponding to the data at times to the cache memory Can be speeded up and its cache miss handling There is an effect that it is possible to improve the execution speed of the software, including.

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

【図1】本発明の一実施例によるキャッシュメモリシス
テムの構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a cache memory system according to one embodiment of the present invention.

【図2】本発明の一実施例によるデータライト時の動作
を示すフローチャートである。
FIG. 2 is a flowchart showing an operation at the time of data writing according to one embodiment of the present invention.

【図3】本発明の一実施例によるデータライト時の動作
を示す図である。
FIG. 3 is a diagram showing an operation at the time of data writing according to an embodiment of the present invention.

【図4】従来例によるキャッシュメモリシステムの構成
を示すブロック図である。
FIG. 4 is a block diagram showing a configuration of a cache memory system according to a conventional example.

【図5】従来例によるデータリード時の動作を示すフロ
ーチャートである。
FIG. 5 is a flowchart showing an operation at the time of data reading according to a conventional example.

【図6】従来例によるデータライト時の動作を示すフロ
ーチャートである。
FIG. 6 is a flowchart showing an operation at the time of data writing according to a conventional example.

【図7】従来例によるデータライト時の動作を示す図で
ある。
FIG. 7 is a diagram showing an operation at the time of data writing according to a conventional example.

【符号の説明】 1 汎用プロセッサ 2 メモリシステム 10 命令セット 11 ライト命令(書込み、ストア) 12 キャッシュ・ミス用ライト命令 20 メモリ制御回路 21 メインメモリ 22 キャッシュメモリ 23 タグ 24 バリッドビット 25 モディファイビット 26 データ 27 キャッシュ・ライン[Description of Signs] 1 General-purpose processor 2 Memory system 10 Instruction set 11 Write instruction (write, store) 12 Write instruction for cache miss 20 Memory control circuit 21 Main memory 22 Cache memory 23 Tag 24 Valid bit 25 Modify bit 26 Data 27 Cache line

Claims (12)

【特許請求の範囲】[Claims] 【請求項1】 メインメモリと、前記メインメモリに格
納されたデータの一部を保持するキャッシュメモリとを
含むキャッシュメモリシステムであって、前記キャッシ
ュメモリに対するライトキャッシュ・ミスが発生した際
に当該ライトキャッシュのデータを格納する前記キャッ
シュメモリのアドレスを選択する選択手段と、前記選択
手段で選択されたアドレスに対応する前記キャッシュメ
モリのデータが有効か無効かを判定する判定手段と、前
記判定手段が当該データを無効と判定した時に当該デー
タに対応する前記メインメモリのデータを前記キャッシ
ュメモリに読込むことなく前記ライトキャッシュ時のデ
ータを前記選択手段で選択されたアドレスに書込む書込
み手段とを有することを特徴とするキャッシュメモリシ
ステム。
1. A cache memory system comprising: a main memory; and a cache memory for holding a part of data stored in the main memory, wherein when a write cache miss occurs in the cache memory, the write is performed. Selecting means for selecting an address of the cache memory for storing cache data; determining means for determining whether data in the cache memory corresponding to the address selected by the selecting means is valid or invalid; and Writing means for writing the data at the time of the write cache to the address selected by the selection means without reading the data of the main memory corresponding to the data into the cache memory when the data is determined to be invalid A cache memory system characterized by the above-mentioned.
【請求項2】 前記選択手段は、データのライト要求時
にそのライト対象のアドレスが前記キャッシュメモリの
アドレスと一致しない場合及びそのライト対象のアドレ
スが前記キャッシュメモリのアドレスと一致しても当該
アドレスのデータが無効である場合のいずれか一方の場
合に前記ライト対象のデータを格納するアドレスを選択
するよう構成したことを特徴とする請求項1記載のキャ
ッシュメモリシステム。
2. The method according to claim 1, wherein the selecting unit is configured to determine whether the write target address does not match the cache memory address at the time of the data write request, and that the write target address matches the cache memory address even if the write target address matches the cache memory address. 2. The cache memory system according to claim 1, wherein an address for storing the data to be written is selected in any one of cases where the data is invalid.
【請求項3】 前記判定手段は、前記選択手段で選択さ
れたアドレスに対応する前記キャッシュメモリのデータ
が有効か無効かを示すバリッドビットが無効を示す場合
と前記選択手段で選択されたアドレスに対応する前記キ
ャッシュメモリのデータが前記メインメモリ上のデータ
よりも新しいか否かを示すモデファイビットが新しくな
いことを示す場合とのうちのいずれかの場合に前記選択
手段で選択されたアドレスに対応する前記キャッシュメ
モリのデータを無効と判定するよう構成したことを特徴
とする請求項1または請求項2記載のキャッシュメモリ
システム。
3. The method according to claim 1, wherein the determining unit determines whether a valid bit indicating whether data in the cache memory corresponding to the address selected by the selecting unit is valid or invalid indicates invalid, and determines whether the address selected by the selecting unit is invalid. Corresponding to the address selected by the selecting means in either of the cases where the modify bit indicating whether the corresponding data in the cache memory is newer than the data in the main memory is not new or not. 3. The cache memory system according to claim 1, wherein data of the cache memory to be executed is determined to be invalid.
【請求項4】 前記書込み手段が前記ライトキャッシュ
時のデータを前記選択手段で選択されたアドレスに書込
んだ後に当該アドレスに対応する前記バリッドビットに
当該データが有効であることを示す値をセットしかつ前
記選択されたアドレスに対応する前記モデファイビット
に当該データが書換えられたことを示す値をセットする
手段を含むことを特徴とする請求項3記載のキャッシュ
メモリシステム。
4. After the writing means writes the data at the time of the write cache to the address selected by the selection means, a value indicating that the data is valid is set in the valid bit corresponding to the address. 4. The cache memory system according to claim 3, further comprising means for setting a value indicating that said data has been rewritten to said modify bit corresponding to said selected address.
【請求項5】 メインメモリと、前記メインメモリに格
納されたデータの一部を保持するキャッシュメモリとを
含むキャッシュメモリシステムのキャッシュ制御方法で
あって、前記キャッシュメモリに対するライトキャッシ
ュ・ミスが発生した際に当該ライトキャッシュのデータ
を格納する前記キャッシュメモリのアドレスを選択する
ステップと、その選択されたアドレスに対応する前記キ
ャッシュメモリのデータが有効か無効かを判定するステ
ップと、当該データが無効と判定された時に当該データ
に対応する前記メインメモリのデータを前記キャッシュ
メモリに読込むことなく前記ライトキャッシュ時のデー
タを前記選択手段で選択されたアドレスに書込むステッ
プとを有することを特徴とするキャッシュ制御方法。
5. A cache control method for a cache memory system including a main memory and a cache memory holding a part of data stored in the main memory, wherein a write cache miss occurs in the cache memory. Selecting the address of the cache memory for storing the data of the write cache, determining whether the data of the cache memory corresponding to the selected address is valid or invalid, and determining that the data is invalid. Writing the data at the time of the write cache to the address selected by the selection means without reading the data of the main memory corresponding to the data into the cache memory when the determination is made. Cache control method.
【請求項6】 前記キャッシュメモリのアドレスを選択
するステップは、データのライト要求時にそのライト対
象のアドレスが前記キャッシュメモリのアドレスと一致
しない場合及びそのライト対象のアドレスが前記キャッ
シュメモリのアドレスと一致しても当該アドレスのデー
タが無効である場合のいずれか一方の場合に前記ライト
対象のデータを格納するアドレスを選択するようにした
ことを特徴とする請求項5記載のキャッシュ制御方法。
6. The step of selecting an address of the cache memory includes: when a write request for data does not match an address of the cache memory with the address of the cache memory; 6. The cache control method according to claim 5, wherein an address for storing the data to be written is selected in any one of cases where the data at the address is invalid even if the address is invalid.
【請求項7】 前記前記キャッシュメモリのデータが有
効か無効かを判定するステップは、前記選択されたアド
レスに対応する前記キャッシュメモリのデータが有効か
無効かを示すバリッドビットが無効を示す場合と前記選
択手段で選択されたアドレスに対応する前記キャッシュ
メモリのデータが前記メインメモリ上のデータよりも新
しいか否かを示すモデファイビットが新しくないことを
示す場合とのうちのいずれかの場合に前記選択されたア
ドレスに対応する前記キャッシュメモリのデータを無効
と判定するようにしたことを特徴とする請求項5または
請求項6記載のキャッシュ制御方法。
7. The step of determining whether the data in the cache memory is valid or invalid is performed when the valid bit indicating whether the data in the cache memory corresponding to the selected address is valid or invalid indicates invalid. The cache memory data corresponding to the address selected by the selection means is newer than the data in the main memory, indicating whether the modify bit is not newer. 7. The cache control method according to claim 5, wherein data of the cache memory corresponding to the selected address is determined to be invalid.
【請求項8】 前記ライトキャッシュ時のデータが前記
選択手段で選択されたアドレスに書込まれた後に当該ア
ドレスに対応する前記バリッドビットに当該データが有
効であることを示す値をセットしかつ前記選択されたア
ドレスに対応する前記モデファイビットに当該データが
書換えられたことを示す値をセットするステップを含む
ことを特徴とする請求項7記載のキャッシュ制御方法。
8. After the data at the time of the write cache is written to the address selected by the selecting means, a value indicating that the data is valid is set to the valid bit corresponding to the address, and 8. The cache control method according to claim 7, further comprising the step of setting a value indicating that the data has been rewritten to the modify bit corresponding to the selected address.
【請求項9】 コンピュータに、メインメモリに格納さ
れたデータの一部を保持するキャッシュメモリを制御さ
せるためのキャッシュ制御プログラムを記録した記録媒
体であって、前記キャッシュ制御プログラムは前記コン
ピュータに、前記キャッシュメモリに対するライトキャ
ッシュ・ミスが発生した際に当該ライトキャッシュのデ
ータを格納する前記キャッシュメモリのアドレスを選択
させ、その選択されたアドレスに対応する前記キャッシ
ュメモリのデータが有効か無効かを判定させ、当該デー
タが無効と判定された時に当該データに対応する前記メ
インメモリのデータを前記キャッシュメモリに読込むこ
となく前記ライトキャッシュ時のデータを前記選択手段
で選択されたアドレスに書込ませることを特徴とするキ
ャッシュ制御プログラムを記録した記録媒体。
9. A recording medium storing a cache control program for causing a computer to control a cache memory that holds a part of data stored in a main memory, wherein the cache control program causes the computer to When a write cache miss occurs in the cache memory, an address of the cache memory for storing the data of the write cache is selected, and it is determined whether the data of the cache memory corresponding to the selected address is valid or invalid. Writing the data at the time of the write cache to the address selected by the selection means without reading the data of the main memory corresponding to the data into the cache memory when the data is determined to be invalid. Characteristic cache control program A recording medium on which a ram is recorded.
【請求項10】 前記キャッシュ制御プログラムは前記
コンピュータに、前記キャッシュメモリのアドレスを選
択させる際に、データのライト要求時にそのライト対象
のアドレスが前記キャッシュメモリのアドレスと一致し
ない場合及びそのライト対象のアドレスが前記キャッシ
ュメモリのアドレスと一致しても当該アドレスのデータ
が無効である場合のいずれか一方の場合に前記ライト対
象のデータを格納するアドレスを選択させることを特徴
とする請求項9記載のキャッシュ制御プログラムを記録
した記録媒体。
10. The cache control program, when causing the computer to select an address of the cache memory, when a write target address does not match an address of the cache memory at the time of a data write request, and 10. The method according to claim 9, further comprising: selecting an address for storing the data to be written in one of the cases where the data of the address is invalid even if the address matches the address of the cache memory. A recording medium on which a cache control program is recorded.
【請求項11】 前記キャッシュ制御プログラムは前記
コンピュータに、前記前記キャッシュメモリのデータが
有効か無効かを判定させる際に、前記選択されたアドレ
スに対応する前記キャッシュメモリのデータが有効か無
効かを示すバリッドビットが無効を示す場合と前記選択
手段で選択されたアドレスに対応する前記キャッシュメ
モリのデータが前記メインメモリ上のデータよりも新し
いか否かを示すモデファイビットが新しくないことを示
す場合とのうちのいずれかの場合に前記選択されたアド
レスに対応する前記キャッシュメモリのデータを無効と
判定させることを特徴とする請求項9または請求項10
記載のキャッシュ制御プログラムを記録した記録媒体。
11. The cache control program, when causing the computer to determine whether data in the cache memory is valid or invalid, determines whether data in the cache memory corresponding to the selected address is valid or invalid. When the valid bit indicates invalid, and when the modify bit indicating whether the data in the cache memory corresponding to the address selected by the selecting means is newer than the data in the main memory is not new. The data of the cache memory corresponding to the selected address is determined to be invalid in any one of the above cases.
A recording medium on which the cache control program described above is recorded.
【請求項12】 前記キャッシュ制御プログラムは前記
コンピュータに、前記ライトキャッシュ時のデータが前
記選択手段で選択されたアドレスに書込まれた後に当該
アドレスに対応する前記バリッドビットに当該データが
有効であることを示す値をセットさせかつ前記選択され
たアドレスに対応する前記モデファイビットに当該デー
タが書換えられたことを示す値をセットさせることを特
徴とする請求項11記載のキャッシュ制御プログラムを
記録した記録媒体。
12. The cache control program according to claim 1, wherein after the data at the time of said write cache is written to an address selected by said selection means, said data is valid for said valid bit corresponding to said address. 12. The recording according to claim 11, wherein a value indicating that the data has been rewritten is set in the modify bit corresponding to the selected address. Medium.
JP10199396A 1998-07-15 1998-07-15 Cache memory system, cache control method used therefor and recording medium control program therefor recorded therein Pending JP2000029788A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10199396A JP2000029788A (en) 1998-07-15 1998-07-15 Cache memory system, cache control method used therefor and recording medium control program therefor recorded therein

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10199396A JP2000029788A (en) 1998-07-15 1998-07-15 Cache memory system, cache control method used therefor and recording medium control program therefor recorded therein

Publications (1)

Publication Number Publication Date
JP2000029788A true JP2000029788A (en) 2000-01-28

Family

ID=16407099

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10199396A Pending JP2000029788A (en) 1998-07-15 1998-07-15 Cache memory system, cache control method used therefor and recording medium control program therefor recorded therein

Country Status (1)

Country Link
JP (1) JP2000029788A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2367591A (en) * 1999-06-18 2002-04-10 Rotech Holdings Ltd Improved pump
WO2005066796A1 (en) * 2003-12-22 2005-07-21 Matsushita Electric Industrial Co., Ltd. Cache memory and its controlling method
WO2005101035A1 (en) * 2004-04-02 2005-10-27 Murata Manufacturing Co.,Ltd. Method and instrument for measuring high-frequency electric characteristic of electronic component, and method for calibrating high-frequency electrical characteristic measuring instrument

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2367591A (en) * 1999-06-18 2002-04-10 Rotech Holdings Ltd Improved pump
GB2367591B (en) * 1999-06-18 2004-03-03 Rotech Holdings Ltd Improved pump
WO2005066796A1 (en) * 2003-12-22 2005-07-21 Matsushita Electric Industrial Co., Ltd. Cache memory and its controlling method
EP1698978A1 (en) * 2003-12-22 2006-09-06 Matsushita Electric Industries Co., Ltd. Cache memory and its controlling method
KR100837479B1 (en) * 2003-12-22 2008-06-12 마쯔시다덴기산교 가부시키가이샤 Cache memory and its controlling method
EP1698978A4 (en) * 2003-12-22 2008-11-05 Matsushita Electric Ind Co Ltd Cache memory and its controlling method
US7454575B2 (en) 2003-12-22 2008-11-18 Matsushita Electric Industrial Co., Ltd. Cache memory and its controlling method
WO2005101035A1 (en) * 2004-04-02 2005-10-27 Murata Manufacturing Co.,Ltd. Method and instrument for measuring high-frequency electric characteristic of electronic component, and method for calibrating high-frequency electrical characteristic measuring instrument

Similar Documents

Publication Publication Date Title
US7262776B1 (en) Incremental updating of animated displays using copy-on-write semantics
US5990902A (en) Apparatus and method for prefetching texture data in a video controller of graphic accelerators
JP3828184B2 (en) Frame buffer memory device controller
JP3519199B2 (en) Image generation device
US6393520B2 (en) Data processor and data processing system with internal memories
US7379068B2 (en) Memory system and method for improved utilization of read and write bandwidth of a graphics processing system
JP3645024B2 (en) Drawing apparatus and drawing method
JP2003126550A (en) Video game system and programmable graphics processor therefor
JPH0348370A (en) Memory access control circuit
JPH0679063A (en) Programmable graphic processor provided with image element to character transforming hardware for using in video game system, etc., and video game cartridge and external memory system applying it
US7170512B2 (en) Index processor
JPH10116346A (en) High speed down-loading method for texture
WO2005086096A2 (en) Embedded system with 3d graphics core and local pixel buffer
JPH0355832B2 (en)
US6952217B1 (en) Graphics processing unit self-programming
US8139073B1 (en) Early compression tag lookup for memory accesses
US6563505B1 (en) Method and apparatus for executing commands in a graphics controller chip
US6734865B1 (en) Method and system for mapping various length data regions
JP2000029788A (en) Cache memory system, cache control method used therefor and recording medium control program therefor recorded therein
US6201547B1 (en) Method and apparatus for sequencing texture updates in a video graphics system
US5999200A (en) Method and apparatus for automatically controlling the destination of a graphics command in a register file
JPH113324A (en) Data processor incorporating memory and its system
US6452599B1 (en) Method and apparatus for generating a specific computer hardware component exception handler
JP3006204B2 (en) Information processing device
KR0170665B1 (en) Ram for 3-dimensional graphics