JP2001134490A - Method for controlling cache memory and computer for realizing the method - Google Patents

Method for controlling cache memory and computer for realizing the method

Info

Publication number
JP2001134490A
JP2001134490A JP31145599A JP31145599A JP2001134490A JP 2001134490 A JP2001134490 A JP 2001134490A JP 31145599 A JP31145599 A JP 31145599A JP 31145599 A JP31145599 A JP 31145599A JP 2001134490 A JP2001134490 A JP 2001134490A
Authority
JP
Japan
Prior art keywords
cache
address
data
instruction
control unit
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
JP31145599A
Other languages
Japanese (ja)
Inventor
Teruhiko Kamigata
輝彦 上方
Atsuhiro Suga
敦浩 須賀
Hideo Miyake
英雄 三宅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP31145599A priority Critical patent/JP2001134490A/en
Priority to US09/671,117 priority patent/US6868472B1/en
Priority to EP20100179486 priority patent/EP2284712A3/en
Priority to EP00308633A priority patent/EP1089185A3/en
Priority to KR1020000057754A priority patent/KR100660951B1/en
Publication of JP2001134490A publication Critical patent/JP2001134490A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a method for controlling a cache memory for processing data having an address included in a designated address area in a batch in response to an instruction included in software and a computer for realizing the efficiency and quickening of the operation by realizing the method. SOLUTION: This computer is provided with a cache memory 10 including cache ways 15 and 17 constituted of cache blocks B1-B8 and a cache controlling part 30 for turning the cache blocks B1-B8 storing data having an address included in a designated address area into a state inhibiting replacement with other address data according to a supplied instruction, or for releasing the replacement inhibiting state.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、計算機とその制御
方法に関し、さらに詳しくはキャッシュメモリの制御方
法及び該方法を実現する計算機に関するものである。
The present invention relates to a computer and a control method thereof, and more particularly, to a control method of a cache memory and a computer for realizing the method.

【0002】[0002]

【従来の技術】従来におけるキャッシュメモリを備えた
計算機においては、該キャッシュメモリの制御の一部が
ソフトウェアによりなされないため、キャッシュメモリ
に記憶されたデータはメインメモリに書き戻す必要がな
い場合においても書き戻されることがあり、メインメモ
リに対するデータの読み書きの効率を悪化させていた。
2. Description of the Related Art In a conventional computer having a cache memory, a part of the control of the cache memory is not performed by software, so that the data stored in the cache memory does not need to be written back to the main memory. In some cases, the data may be written back, thereby deteriorating the efficiency of reading and writing data from and to the main memory.

【0003】また、キャッシュメモリに前もって情報を
ロードするプリロードを、一キャッシュブロック単位で
行うよう命令するフェッチ命令を実行するキャッシュメ
モリの制御方法は従来において実現されているが、この
ような制御方法では、フェッチした(メインメモリから
読み出した)情報が実際に必要になるまで、キャッシュ
メモリ上に記憶されていることを保証できなかった。
A cache memory control method for executing a fetch instruction for preloading information into the cache memory in advance in units of one cache block has been conventionally realized. In such a control method, However, it was not possible to guarantee that the fetched information (read from the main memory) was stored in the cache memory until it was actually needed.

【0004】また、キャッシュメモリの制御において、
ある一つのアドレスを格納するキャッシュブロックを見
出し、そのキャッシュブロックに記憶されたデータをメ
インメモリに複写する(このような動作を「フラッシ
ュ」という。)と共に、同一アドレスの旧データを無効
化する方法は従来において実現されているが、連続した
アドレス領域の情報を記憶する複数のキャッシュブロッ
クを、選択的にフラッシュし、無効化する制御方法は考
えられておらず、動作の効率をより向上させる必要があ
った。
In controlling a cache memory,
A method of finding a cache block storing a certain address, copying data stored in the cache block to a main memory (this operation is called “flash”), and invalidating old data at the same address. Has been realized in the past, but there is no control method for selectively flushing and invalidating a plurality of cache blocks storing information in a continuous address area, and it is necessary to further improve operation efficiency. was there.

【0005】[0005]

【発明が解決しようとする課題】本発明は、上述の点に
鑑みてなされたものであり、指定されたアドレス領域に
含まれるアドレスを持つデータを、ソフトウェアに含ま
れる命令によりまとめて処理するキャッシュメモリの制
御方法と、該方法を実現することにより動作の効率化及
び高速化を実現し得る計算機を提供することを目的とす
る。
SUMMARY OF THE INVENTION The present invention has been made in view of the above points, and has been made in consideration of the above-described problems. It is an object of the present invention to provide a memory control method and a computer capable of realizing operation efficiency and speedup by implementing the method.

【0006】[0006]

【課題を解決するための手段】上記の目的は、キャッシ
ュブロックから構成されるキャッシュメモリの制御方法
であって、指定されたアドレス領域に含まれるアドレス
を持つデータを記憶しているキャッシュブロックを、供
給される命令に応じて別アドレスデータへの置換禁止状
態とし、または禁止状態を解除することを特徴とするキ
ャッシュメモリの制御方法を提供することにより達成さ
れる。このような手段によれば、上記指定されたアドレ
ス領域に含まれるアドレスを持つデータへのキャッシュ
ミスを確実に回避して、キャッシュヒットを保証するこ
とができる。
An object of the present invention is to provide a method of controlling a cache memory composed of cache blocks, wherein a cache block storing data having an address included in a designated address area is stored in a cache block. This is attained by providing a control method of a cache memory, wherein the replacement state to another address data is prohibited or the prohibited state is released in accordance with the supplied instruction. According to such means, it is possible to reliably avoid a cache miss to data having an address included in the specified address area, and to guarantee a cache hit.

【0007】また、本発明の目的は、キャッシュブロッ
クから構成されたキャッシュメモリを含む計算機であっ
て、指定されたアドレス領域に含まれるアドレスを持つ
データを記憶しているキャッシュブロックを、供給され
る命令に応じて別アドレスデータへの置換禁止状態と
し、または該禁止状態を解除する制御部を備えたことを
特徴とする計算機を提供することにより達成される。こ
のような手段によれば、上記指定されたアドレス領域に
含まれるアドレスを持つデータへのキャッシュミスを確
実に回避して、キャッシュヒットを保証することができ
る。
It is another object of the present invention to provide a computer including a cache memory constituted by cache blocks, wherein a cache block storing data having an address included in a specified address area is supplied. The present invention is attained by providing a computer which is provided with a control unit which sets a state in which replacement with another address data is prohibited according to an instruction, or includes a control unit which cancels the prohibited state. According to such means, it is possible to reliably avoid a cache miss to data having an address included in the specified address area, and to guarantee a cache hit.

【0008】また、本発明の目的は、メインメモリに接
続されると共にキャッシュブロックから構成されたキャ
ッシュメモリを含む計算機であって、指定されたアドレ
ス領域に含まれるアドレスを持つと共にメインメモリに
記憶されたデータを、供給される命令に応じてキャッシ
ュブロックにロードする制御部を備えたことを特徴とす
る計算機を提供することにより達成される。
It is another object of the present invention to provide a computer including a cache memory connected to a main memory and configured from a cache block. The computer has an address included in a designated address area and is stored in the main memory. The present invention is attained by providing a computer characterized by comprising a control unit that loads the cached data into a cache block in accordance with a supplied instruction.

【0009】また、本発明の目的は、メインメモリに接
続されると共にキャッシュブロックから構成されたキャ
ッシュメモリを含む計算機であって、指定されたアドレ
ス領域に含まれるアドレスを持つと共にキャッシュブロ
ックに記憶されたデータを、供給される命令に応じてメ
インメモリにストアする制御部を備えたことを特徴とす
る計算機を提供することにより達成される。
It is another object of the present invention to provide a computer including a cache memory connected to a main memory and configured from a cache block, having an address included in a specified address area and being stored in the cache block. The present invention is attained by providing a computer having a control unit for storing data stored in a main memory in accordance with a supplied instruction.

【0010】また、本発明の目的は、メインメモリに接
続されると共にキャッシュブロックから構成されるキャ
ッシュメモリを含む計算機であって、指定されたアドレ
ス領域に含まれるアドレスを持つと共に、キャッシュブ
ロックに記憶されているデータを、供給される命令に応
じてメインメモリに複写する制御部を備えたことを特徴
とする計算機を提供することにより達成される。
It is another object of the present invention to provide a computer including a cache memory connected to a main memory and configured from a cache block. The computer has an address included in a designated address area and stores the address in a cache block. The present invention is attained by providing a computer having a control unit for copying data stored in a main memory according to a supplied instruction.

【0011】また、本発明の目的は、キャッシュブロッ
クから構成されるキャッシュメモリを含む計算機であっ
て、指定されたアドレス領域に含まれるアドレスを持つ
データを記憶しているキャッシュブロックを、供給され
る命令に応じて一律に無効化する制御部を備えたことを
特徴とする計算機を提供することにより達成される。
It is another object of the present invention to provide a computer including a cache memory constituted by cache blocks, wherein a cache block storing data having an address included in a specified address area is supplied. The present invention is attained by providing a computer having a control unit for invalidating uniformly according to a command.

【0012】[0012]

【発明の実施の形態】以下において、本発明の実施の形
態を図面を参照して詳しく説明する。なお、図中同一符
号は同一または相当部分を示す。図1は、本発明の実施
の形態に係る計算機の全体構成を示す図である。図1に
示されるように、この計算機はCPU1と、キャッシュ
部3と、バス制御装置5と、メインメモリ7と、周辺シ
ステム9とを備える。そして、CPU1はフェッチ部1
1と実行部13とを含む。また、キャッシュ部3はキャ
ッシュメモリ10と、キャッシュウェイ15,17と、
アドレスレジスタ19,21と、データレジスタ23,
25,27,29と、キャッシュ制御部30とを含む。
Embodiments of the present invention will be described below in detail with reference to the drawings. In the drawings, the same reference numerals indicate the same or corresponding parts. FIG. 1 is a diagram showing an overall configuration of a computer according to an embodiment of the present invention. As shown in FIG. 1, the computer includes a CPU 1, a cache unit 3, a bus control device 5, a main memory 7, and a peripheral system 9. Then, the CPU 1 executes the fetch unit 1
1 and an execution unit 13. The cache unit 3 includes a cache memory 10, cache ways 15 and 17,
Address registers 19, 21 and data registers 23,
25, 27, and 29, and a cache control unit 30.

【0013】ここで、CPU1は算術演算や論理演算等
を行う。また、キャッシュ部3はCPU1とバス制御装
置5及び周辺システム9との間に接続され、メインメモ
リ7又は周辺システム9の情報を一時的に記憶する。ま
た、キャッシュ制御部30はCPU1に含まれた実行部
13に接続され、CPU1または周辺システム9等から
の要求に応じてキャッシュメモリ10等を制御する。
Here, the CPU 1 performs an arithmetic operation, a logical operation and the like. The cache unit 3 is connected between the CPU 1 and the bus control device 5 and the peripheral system 9 and temporarily stores information of the main memory 7 or the peripheral system 9. The cache control unit 30 is connected to the execution unit 13 included in the CPU 1 and controls the cache memory 10 and the like in response to a request from the CPU 1 or the peripheral system 9 or the like.

【0014】また、バス制御装置5はメインメモリ7と
の間に設けられたメモリデータバス及びアドレスバスの
制御を行うと共に、周辺システム9との間のデータ転送
を制御する。そしてバス制御装置5に接続されたメイン
メモリ7は、命令又はデータを保持する。一方、キャッ
シュメモリ10は二つのキャッシュウェイ15,17か
らなり、各キャッシュウェイ15,17はキャッシュブ
ロックB1〜B8に分割される。ここで図1に示される
ように、それぞれのキャッシュブロックB1〜B8は有
効フラグVと、タグTAGと、ロックフラグLと、キャ
ッシュブロックデータDATAとを含み、ライトバック
形式のキャッシュメモリ10においてはさらに変更フラ
グMが含まれる。
The bus control device 5 controls a memory data bus and an address bus provided between the bus control device 5 and the main memory 7 and controls data transfer with the peripheral system 9. The main memory 7 connected to the bus control device 5 holds instructions or data. On the other hand, the cache memory 10 includes two cache ways 15 and 17, and each cache way 15, 17 is divided into cache blocks B1 to B8. As shown in FIG. 1, each of the cache blocks B1 to B8 includes a valid flag V, a tag TAG, a lock flag L, and cache block data DATA. A change flag M is included.

【0015】ここで、有効フラグVは、0の値が設定さ
れたとき(リセットされたとき)に該キャッシュブロッ
クが無効であり、1の値が設定されたとき(セットされ
たとき)にキャッシュブロックが有効であることを示す
ものである。なお、無効とされた該キャッシュブロック
へ格納されたデータは無いものと扱われる。また、タグ
TAGはキャッシュブロックデータDATAのアドレス
を保持する。また、ロックフラグLは、0の値が設定さ
れたときに該キャッシュブロックがタグTAGのアドレ
スの置換を許可する状態であり、1の値が設定されたと
きにアドレスの置換が禁止される状態であることを示
す。また変更フラグMは、0の値が設定されているとき
に該キャッシュブロックは未置換(未変更)であり、1
の値が設定されているときに該キャッシュブロックのデ
ータDATAが更新値に変更済みであることをそれぞれ
意味するものである。
Here, the valid flag V indicates that the cache block is invalid when a value of 0 is set (when reset), and the cache flag is invalid when a value of 1 is set (when set). Indicates that the block is valid. It is assumed that there is no data stored in the invalidated cache block. The tag TAG holds the address of the cache block data DATA. The lock flag L is a state in which the cache block permits the replacement of the address of the tag TAG when a value of 0 is set, and a state in which the replacement of the address is prohibited when the value of 1 is set. It is shown that. When the change flag M is set to 0, the cache block is not replaced (unchanged), and 1
Means that the data DATA of the cache block has been changed to the updated value.

【0016】なお、一般的にキャッシュメモリの書き込
み制御には、キャッシュメモリとメインメモリとを同時
に更新する「ライトスルー」形式と、一旦キャッシュメ
モリだけを更新し、キャッシュメモリの一部を置換する
際にメインメモリへ追い出されるデータによってメイン
メモリを更新する「ライトバック」形式とがある。以上
のような構成を有する本実施の形態に係る計算機は、キ
ャッシュメモリ10又はメインメモリ7に書き込まれて
いるロード命令、ストア命令、ロック命令、アンロック
命令、プリロード命令、ポストストア命令、フラッシュ
命令、無効化命令などを読み出し、指定されたアドレス
領域に含まれるアドレスを持つデータを、該命令に応じ
たキャッシュ制御部30による制御によりまとめて処理
するため、動作の効率化及び高速化を実現する。
In general, the write control of the cache memory includes a “write-through” format in which the cache memory and the main memory are updated simultaneously, and a method in which only the cache memory is updated once and a part of the cache memory is replaced. There is a “write-back” format in which the main memory is updated with data that is flushed to the main memory. The computer having the above-described configuration according to the present embodiment includes a load instruction, a store instruction, a lock instruction, an unlock instruction, a preload instruction, a post-store instruction, and a flash instruction written in the cache memory 10 or the main memory 7. , An invalidation instruction or the like is read, and data having an address included in the designated address area is collectively processed under the control of the cache control unit 30 in accordance with the instruction, thereby realizing efficient and high-speed operation. .

【0017】以下において、より具体的に説明する。図
2は、図1に示されたキャッシュ制御部30の構成及び
該キャッシュ制御部30とキャッシュメモリ10との接
続関係を示す図である。図2に示されるように、キャッ
シュ制御部30はロード制御部31と、ストア制御部3
2と、プリロード制御部33と、ポストストア制御部3
4と、フラッシュ制御部35と、無効化制御部36と、
ロック/アンロック制御部37と、デコード部38と、
アドレス領域制御部40と、アドレスレジスタ45と、
サイズレジスタ47とを備える。そして、アドレス領域
制御部40は、キャッシュブロックサイズ規定部41
と、比較器42と、加算部43と、減算部44とを含
む。
Hereinafter, a more specific description will be given. FIG. 2 is a diagram illustrating a configuration of the cache control unit 30 illustrated in FIG. 1 and a connection relationship between the cache control unit 30 and the cache memory 10. As shown in FIG. 2, the cache control unit 30 includes a load control unit 31 and a store control unit 3.
2, a preload control unit 33, and a post store control unit 3.
4, a flash control unit 35, an invalidation control unit 36,
A lock / unlock control unit 37, a decoding unit 38,
An address area control unit 40, an address register 45,
And a size register 47. Then, the address area control unit 40 sets the cache block size defining unit 41
, A comparator 42, an adder 43, and a subtractor 44.

【0018】なお図2においては、図1においては省略
されているが、キャッシュメモリ10に含まれると共に
アドレスレジスタ45から供給されたアドレスとタグT
AGに格納されているアドレスとを比較する比較器12
が示される。ここで、デコード部38は実行部13に接
続され、ロード制御部31とストア制御部32、プリロ
ード制御部33、ポストストア制御部34、フラッシュ
制御部35、無効化制御部36及びロック/アンロック
制御部37はそれぞれデコード部38に接続される。ま
た、アドレス領域制御部40は実行部13に接続され、
処理するデータのアドレスを管理する。以下において、
キャッシュ制御部30における従来のキャッシュ制御部
に対する構成上の相違点について説明する図3は従来の
キャッシュ制御部の構成を示す図である。図3に示され
るように、従来のキャッシュ制御部50はロード制御部
51と、ストア制御部52と、プリロード制御部53
と、フラッシュ制御部55と、無効化制御部56と、ロ
ック/アンロック制御部57と、デコード部58と、ア
ドレスレジスタ59とを備える。 従って、本実施の形
態に係るキャッシュ制御部30は、従来のキャッシュ制
御部50と比較してアドレス領域制御部40及びサイズ
レジスタ47と、ポストストア制御部34とをさらに備
える点で相違するものである。
In FIG. 2, although omitted in FIG. 1, the address and tag T included in the cache memory 10 and supplied from the address register 45 are included.
Comparator 12 for comparing with the address stored in AG
Is shown. Here, the decoding unit 38 is connected to the execution unit 13, and the load control unit 31, the store control unit 32, the preload control unit 33, the post store control unit 34, the flash control unit 35, the invalidation control unit 36, and the lock / unlock. The control units 37 are connected to the decoding unit 38, respectively. Further, the address area control unit 40 is connected to the execution unit 13,
Manage the address of the data to be processed. In the following:
FIG. 3 for explaining a difference in configuration between the cache control unit 30 and the conventional cache control unit is a diagram showing the configuration of the conventional cache control unit. As shown in FIG. 3, a conventional cache control unit 50 includes a load control unit 51, a store control unit 52, and a preload control unit 53.
, A flash control unit 55, an invalidation control unit 56, a lock / unlock control unit 57, a decode unit 58, and an address register 59. Therefore, the cache control unit 30 according to the present embodiment is different from the conventional cache control unit 50 in that the cache control unit 30 further includes the address area control unit 40, the size register 47, and the post store control unit 34. is there.

【0019】以下において、本実施の形態に係る計算機
の動作について説明する。まずフェッチ部11は、アド
レスレジスタ19を通して所望の命令(コード)に対す
るアドレスをキャッシュメモリ10に供給し、命令フェ
ッチ要求を行う。ここで、キャッシュメモリ10に該ア
ドレスの命令が格納されているキャッシュヒット時に
は、キャッシュメモリ10から該命令が読み出され、デ
ータレジスタ23を介してフェッチ部11に供給され
る。ただし、キャッシュメモリ10に該アドレスの命令
が格納されていないキャッシュミス時には、アドレスレ
ジスタ21を介して供給されるアドレスに応じて該命令
がメインメモリ7から読み出される。そして、メインメ
モリ7から読み出された命令は、データレジスタ25,
23を介してフェッチ部11に供給される。
The operation of the computer according to this embodiment will be described below. First, the fetch unit 11 supplies an address for a desired instruction (code) to the cache memory 10 through the address register 19, and issues an instruction fetch request. Here, at the time of a cache hit in which the instruction at the address is stored in the cache memory 10, the instruction is read from the cache memory 10 and supplied to the fetch unit 11 via the data register 23. However, at the time of a cache miss in which the instruction of the address is not stored in the cache memory 10, the instruction is read from the main memory 7 according to the address supplied via the address register 21. The instruction read from the main memory 7 is stored in the data register 25,
The data is supplied to the fetch unit 11 via the control unit 23.

【0020】次に、フェッチ部11はキャッシュメモリ
10又はメインメモリ7から読み出した命令を実行部1
3に供給し、実行部13は供給された命令を実行する。
そして、以下の動作は該命令の種類により異なるため、
各命令による動作について順次説明する。 (ロック/アンロック命令について)ロック/アンロッ
ク命令が実行部13で実行された場合には、キャッシュ
制御部30に含まれるアドレス領域制御部40へロック
又はアンロックの対象とする先頭アドレスと、ロック又
はアンロックの対象とするアドレス領域のサイズが供給
される。そして、この先頭アドレスはアドレスレジスタ
45を介して比較器12に供給されるが、先頭アドレス
は加算部43においてキャッシュブロックサイズ規定部
41が規定する1キャッシュブロック分のアドレスに順
次加算される。従って、比較器12は、ロック又はアン
ロックの対象とするアドレスを1キャッシュブロック毎
にスキャンし、順次タグTAGに格納されたアドレスと
比較する。
Next, the fetch unit 11 executes the instruction read from the cache memory 10 or the main memory 7 by the execution unit 1.
3 and the execution unit 13 executes the supplied instruction.
And since the following operations differ depending on the type of the instruction,
The operation of each instruction will be described sequentially. (Regarding the lock / unlock instruction) When the lock / unlock instruction is executed by the execution unit 13, the head address to be locked or unlocked to the address area control unit 40 included in the cache control unit 30; The size of the address area to be locked or unlocked is supplied. The head address is supplied to the comparator 12 via the address register 45. The head address is sequentially added to an address of one cache block defined by the cache block size defining part 41 in the adding part 43. Therefore, the comparator 12 scans the address to be locked or unlocked for each cache block and sequentially compares the address with the address stored in the tag TAG.

【0021】一方、ロック又はアンロックの対象とする
アドレス領域のサイズは、サイズレジスタ47及び比較
器42を介してロック/アンロック制御部37へ供給さ
れ、所定のアドレス領域をスキャンするときにおいての
み、ロック/アンロック制御部37が活性化される。な
お、サイズレジスタ47から出力されたアドレス領域の
サイズは、上記1キャッシュブロックのスキャン毎に、
1キャッシュブロックのサイズに応じて順次減算部44
で減算される。そして、ロックまたはアンロックするア
ドレス領域がまだ残っていると比較器42で判断される
場合に、ロック/アンロック制御部37が活性化され
る。なお、ロックまたはアンロックするアドレス領域の
上記スキャンが全て終了したと比較器42で判断された
場合には、比較器42は完了信号を実行部13に供給す
る。
On the other hand, the size of the address area to be locked or unlocked is supplied to the lock / unlock control unit 37 via the size register 47 and the comparator 42, and only when the predetermined address area is scanned. , The lock / unlock control unit 37 is activated. Note that the size of the address area output from the size register 47 is
Subtractor 44 sequentially according to the size of one cache block
Is subtracted. When the comparator 42 determines that the address area to be locked or unlocked still remains, the lock / unlock control unit 37 is activated. When the comparator 42 determines that the scanning of the address area to be locked or unlocked is completed, the comparator 42 supplies a completion signal to the execution unit 13.

【0022】このようにして、比較器12における比較
の結果、ロック又はアンロックの対象とするアドレスと
タグTAGに格納されたアドレスとが一致(キャッシュ
ヒット)した場合には、キャッシュヒットしたことを通
知する信号がロック/アンロック制御部37へ供給され
る。これにより、ロック/アンロック制御部37は該信
号に応じてキャッシュヒットしたキャッシュブロックを
ロック又はアンロックするため、該当するロックフラグ
Lにロックする場合には1を、アンロックする場合には
0をそれぞれ設定する。
As described above, when the address to be locked or unlocked matches the address stored in the tag TAG (cache hit) as a result of the comparison by the comparator 12, it is determined that the cache hit has occurred. The signal to be notified is supplied to the lock / unlock control unit 37. As a result, the lock / unlock control unit 37 locks or unlocks the cache block that has hit the cache according to the signal. Therefore, 1 is locked when locking to the corresponding lock flag L, and 0 when unlocking. Are set respectively.

【0023】以上のような動作により設定されたロック
フラグLの値は、ロード制御部31とストア制御部3
2、プリロード制御部33、ポストストア制御部34、
フラッシュ制御部35、無効化制御部36及びロック/
アンロック制御部37にそれぞれ供給され、ロックフラ
グLの値が0である場合には該キャッシュブロックが別
アドレスデータへの置換可能状態とされ、1である場合
には該キャッシュブロックが別アドレスデータへの置換
禁止状態とされる。
The value of the lock flag L set by the above operation is stored in the load control unit 31 and the store control unit 3.
2, preload control unit 33, post store control unit 34,
Flash control unit 35, invalidation control unit 36 and lock /
The cache block is supplied to the unlock controller 37, and when the value of the lock flag L is 0, the cache block can be replaced with another address data. When the value is 1, the cache block is replaced with another address data. Is prohibited.

【0024】従って、このようなロック/アンロック命
令を実行することにより、キャッシュメモリ10に格納
された所定のキャッシュブロックデータDATAについ
てキャッシュヒットを保証でき、全体としてのキャッシ
ュヒット率を向上させることができる。また、指定した
アドレス領域に含まれるアドレスに対応して所定のキャ
ッシュブロックを一括してロック又はアンロックするた
め、実行すべき命令の数を減少させ動作の効率を高める
ことができる。
Therefore, by executing such a lock / unlock instruction, a cache hit can be guaranteed for predetermined cache block data DATA stored in the cache memory 10, and the overall cache hit rate can be improved. it can. In addition, since a predetermined cache block is collectively locked or unlocked corresponding to the address included in the designated address area, the number of instructions to be executed can be reduced and the operation efficiency can be improved.

【0025】なお、図4はロック/アンロック命令の命
令形式を示す図である。図4に示されるように、ロック
/アンロック命令は、ロック命令またはアンロック命令
が規定される命令コードOP-CODE と、アドレスを指定す
るアドレス指定フィールドADと、アドレス領域のサイズ
を指定する領域サイズ指定フィールドSIZEとを含む。そ
して、このような命令形式は以下の命令においても採用
される。(ロード命令について)ロード命令が実行部1
3で実行された場合には、キャッシュ制御部30に含ま
れるロード制御部31へロードの対象とする先頭アドレ
スと、ロード対象とするアドレス領域のサイズが供給さ
れる。そして、この先頭アドレスはアドレスレジスタ4
5を介して比較器12に供給されるが、先頭アドレスは
加算部43においてキャッシュブロックサイズ規定部4
1が規定する1キャッシュブロック分のアドレスに順次
加算される。従って、比較器12は、ロード対象とする
アドレスを1キャッシュブロック毎にスキャンし、順次
タグTAGに格納されたアドレスと比較する。
FIG. 4 is a diagram showing an instruction format of a lock / unlock instruction. As shown in FIG. 4, the lock / unlock instruction includes an instruction code OP-CODE that defines a lock instruction or an unlock instruction, an address specification field AD for specifying an address, and an area for specifying the size of the address area. And a size specification field SIZE. Such an instruction format is also used in the following instructions. (About the load instruction) The load instruction is executed by the execution unit 1.
When the processing is executed in step 3, the load control unit 31 included in the cache control unit 30 is supplied with the head address to be loaded and the size of the address area to be loaded. The start address is stored in the address register 4
5 is supplied to the comparator 12 through the adder 43.
It is sequentially added to the address of one cache block defined by 1. Therefore, the comparator 12 scans the address to be loaded for each cache block and sequentially compares the address with the address stored in the tag TAG.

【0026】一方、ロード対象とするアドレス領域のサ
イズは、サイズレジスタ47及び比較器42を介してロ
ード制御部31へ供給され、所定のアドレス領域をスキ
ャンするときにおいてのみ、ロード制御部31が活性化
される。なお、サイズレジスタ47から出力されたアド
レス領域のサイズは、上記1キャッシュブロックのスキ
ャン毎に該1キャッシュブロック分のサイズに応じて順
次減算部44で減算される。そして、ロードするアドレ
ス領域がまだ残っていると比較器42で判断される場合
に、ロード制御部31が活性化される。なお、ロードす
るアドレス領域の上記スキャンが全て終了したと比較器
42で判断された場合には、比較器42は完了信号を実
行部13に供給する。
On the other hand, the size of the address area to be loaded is supplied to the load control section 31 via the size register 47 and the comparator 42, and the load control section 31 is activated only when scanning a predetermined address area. Be transformed into Note that the size of the address area output from the size register 47 is sequentially subtracted by the subtraction unit 44 in accordance with the size of one cache block each time the one cache block is scanned. When the comparator 42 determines that the address area to be loaded still remains, the load control unit 31 is activated. When the comparator 42 determines that all the scanning of the address area to be loaded is completed, the comparator 42 supplies a completion signal to the execution unit 13.

【0027】このようにして、比較器12における比較
の結果、ロード対象とするアドレスとタグTAGに格納
されたアドレスとが一致(キャッシュヒット)した場合
には、キャッシュヒットしたことを通知する信号がロー
ド制御部31へ供給される。これにより、ロード制御部
31は該信号に応じて、キャッシュヒットしたキャッシ
ュブロックに格納されているキャッシュブロックデータ
DATAをCPU1へ転送する。一方、ロード対象とす
るアドレスについて、いずれのキャッシュブロックにお
いてもキャッシュヒットが得られない場合には、ロード
制御部31はバス制御装置5を介してメインメモリ7か
ら該アドレスを有するデータを読み出し、CPU1へ転
送すると共に少なくとも一つのキャッシュブロックB1
〜B8に書き込む。
As described above, when the address to be loaded matches the address stored in the tag TAG (cache hit) as a result of the comparison by the comparator 12, a signal notifying of the cache hit is generated. It is supplied to the load control unit 31. Thus, the load control unit 31 transfers the cache block data DATA stored in the cache block having the cache hit to the CPU 1 according to the signal. On the other hand, when a cache hit is not obtained in any of the cache blocks for the address to be loaded, the load control unit 31 reads data having the address from the main memory 7 via the bus control device 5 and And at least one cache block B1
Write to B8.

【0028】従って、このような複数レジスタロード命
令を実行することにより、指定したアドレス領域に含ま
れるアドレスに対応したデータをキャッシュブロックや
メインメモリ7から一括してロードすることができるた
め、実行すべき命令の数を減少させ動作の効率を高める
ことができる。なお、ロード命令には単一レジスタロー
ド命令と複数レジスタロード命令とがある。ここで単一
レジスタロード命令は、指定したアドレス領域における
規定サイズのデータを、指定する一つのレジスタに読み
込むための命令である。一方、複数レジスタロード命令
は、指定したアドレス領域における指定サイズのデータ
を、規定された複数のレジスタに読み込むための命令で
ある。
Therefore, by executing such a multiple register load instruction, data corresponding to the address included in the designated address area can be loaded from the cache block or the main memory 7 at a time. The number of instructions to be reduced can be reduced, and the operation efficiency can be increased. The load instruction includes a single register load instruction and a multiple register load instruction. Here, the single register load instruction is an instruction for reading data of a specified size in a specified address area into one specified register. On the other hand, a multiple register load instruction is an instruction for reading data of a specified size in a specified address area into a specified plurality of registers.

【0029】そして、上記単一レジスタロード命令の命
令形式は、図7に示される。すなわち図7に示されるよ
うに、単一レジスタロード命令の命令形式は、単一レジ
スタへのロードが規定される命令コードOP-CODE と、ア
ドレスを指定するアドレス指定フィールドADと、読み出
したデータを格納するレジスタを指定するレジスタ指定
フィールドREG とを含む。
FIG. 7 shows the instruction format of the single register load instruction. That is, as shown in FIG. 7, the instruction format of the single register load instruction is such that an instruction code OP-CODE that specifies loading into a single register, an address specification field AD that specifies an address, and read data. And a register specification field REG for specifying a register to be stored.

【0030】一方、複数レジスタロード命令の命令形式
は、図4に示されるロック/アンロック命令の命令形式
と同様である。すなわち複数レジスタロード命令は、複
数のレジスタへのロード命令が規定される命令コードOP
-CODE と、アドレスを指定するアドレス指定フィールド
ADと、アドレス領域のサイズを指定する領域サイズ指定
フィールドSIZEとを含む。 (ストア命令について)ストア命令が実行部13で実行
された場合には、キャッシュ制御部30に含まれるスト
ア制御部32へストア対象とする先頭アドレスと、スト
ア対象とするアドレス領域のサイズが供給される。そし
て、この先頭アドレスはアドレスレジスタ45を介して
比較器12に供給されるが、先頭アドレスは加算部43
においてキャッシュブロックサイズ規定部41が規定す
る1キャッシュブロック分のアドレスへ順次加算され
る。従って、比較器12は、ストア対象とするアドレス
を1キャッシュブロック毎にスキャンし、順次タグTA
Gに格納されたアドレスと比較する。
On the other hand, the instruction format of the multiple register load instruction is the same as the instruction format of the lock / unlock instruction shown in FIG. That is, the multiple register load instruction is an instruction code OP that defines a load instruction for a plurality of registers.
-CODE and an addressing field to specify the address
An AD and an area size specification field SIZE for specifying the size of the address area are included. (About Store Instruction) When the store instruction is executed by the execution unit 13, the head address to be stored and the size of the address area to be stored are supplied to the store control unit 32 included in the cache control unit 30. You. The start address is supplied to the comparator 12 via the address register 45, but the start address is added to the adder 43.
Are sequentially added to the address of one cache block defined by the cache block size defining unit 41. Therefore, the comparator 12 scans the address to be stored for each cache block, and sequentially scans the tag TA.
Compare with the address stored in G.

【0031】一方、ストア対象とするアドレス領域のサ
イズは、サイズレジスタ47及び比較器42を介してス
トア制御部32へ供給され、所定のアドレス領域をスキ
ャンするときにおいてのみ、ストア制御部32が活性化
される。なお、サイズレジスタ47から出力されたアド
レス領域のサイズは、上記1キャッシュブロックのスキ
ャン毎に、1キャッシュブロック分のサイズに応じて順
次減算部44で減算される。そして、ストアするアドレ
ス領域がまだ残っていると比較器42で判断される場合
に、ストア制御部32が活性化される。なお、ストアす
るアドレス領域の上記スキャンが全て終了したと比較器
42で判断された場合には、比較器42は完了信号を実
行部13に供給する。
On the other hand, the size of the address area to be stored is supplied to the store control unit 32 via the size register 47 and the comparator 42, and the store control unit 32 is activated only when a predetermined address area is scanned. Be transformed into Note that the size of the address area output from the size register 47 is sequentially subtracted by the subtraction unit 44 in accordance with the size of one cache block for each scan of one cache block. When the comparator 42 determines that the address area to be stored still remains, the store control unit 32 is activated. When the comparator 42 determines that all the scanning of the address area to be stored has been completed, the comparator 42 supplies a completion signal to the execution unit 13.

【0032】このようにして、比較器12における比較
の結果、ストア対象とするアドレスとタグTAGに格納
されたアドレスとが一致(キャッシュヒット)した場合
には、キャッシュヒットしたことを通知する信号がスト
ア制御部32へ供給される。これによりストア制御部3
2は、キャッシュメモリ10がライトスルー動作の場合
には、実行部13から供給された書込データをメインメ
モリ7に書き込むと共に、上記キャッシュヒットしたこ
とを通知する信号に応じて、キャッシュヒットしたキャ
ッシュブロックのデータを更新する。一方、キャッシュ
メモリ10がライトバック動作の場合には上記キャッシ
ュヒットしたことを通知する信号に応じて、キャッシュ
ヒットしたキャッシュブロックのデータのみを更新す
る。
As described above, when the address to be stored matches the address stored in the tag TAG (cache hit) as a result of the comparison in the comparator 12, a signal notifying of the cache hit is generated. It is supplied to the store control unit 32. Thereby, the store control unit 3
2 writes the write data supplied from the execution unit 13 to the main memory 7 when the cache memory 10 is in the write-through operation, and, in response to the signal indicating that the cache hit has occurred, Update the data in the block. On the other hand, when the cache memory 10 performs the write-back operation, only the data of the cache block having the cache hit is updated according to the signal notifying that the cache hit has occurred.

【0033】従って、このような複数レジスタストア命
令を実行することにより、指定したアドレス領域に含ま
れるアドレスに対応した書込データをキャッシュブロッ
クやメインメモリ7へ一括してストアすることができる
ため、実行すべき命令の数を減少させ動作の効率を高め
ることができる。なお、ストア命令には単一レジスタス
トア命令と複数レジスタストア命令とがある。ここで単
一レジスタストア命令は、指定する一つのレジスタから
規定サイズのデータを、指定したアドレス領域へ書き込
むための命令である。一方、複数レジスタストア命令
は、規定の複数のレジスタから指定するサイズのデータ
を、指定したアドレス領域へ書き込むための命令であ
る。
Therefore, by executing such a multiple register store instruction, the write data corresponding to the address included in the designated address area can be stored collectively in the cache block or the main memory 7. The number of instructions to be executed can be reduced, and the efficiency of operation can be increased. The store instructions include a single register store instruction and a multiple register store instruction. Here, the single register store instruction is an instruction for writing data of a specified size from one designated register to a designated address area. On the other hand, a multiple register store instruction is an instruction for writing data of a specified size from a specified plurality of registers to a specified address area.

【0034】そして、上記単一レジスタストア命令の命
令形式は、図7に示される。すなわち図7に示されるよ
うに、単一レジスタストア命令の命令形式は、一つのレ
ジスタからのストアが規定される命令コードOP-CODE
と、アドレスを指定するアドレス指定フィールドADと、
書き込むデータが格納されているレジスタを指定するレ
ジスタ指定フィールドREG とを含む。
The instruction format of the single register store instruction is shown in FIG. That is, as shown in FIG. 7, the instruction format of the single register store instruction is an instruction code OP-CODE in which store from one register is specified.
And an address specification field AD for specifying an address;
And a register specification field REG for specifying a register in which data to be written is stored.

【0035】一方、複数レジスタストア命令の命令形式
は、図4に示されるロック/アンロック命令の命令形式
と同様である。すなわち複数レジスタストア命令は、複
数のレジスタからのストア命令が規定される命令コード
OP-CODE と、アドレスを指定するアドレス指定フィール
ドADと、アドレス領域のサイズを指定する領域サイズ指
定フィールドSIZEとを含む。 (プリロード命令について)プリロード命令が実行部1
3で実行された場合には、キャッシュ制御部30に含ま
れるプリロード制御部33へプリロードの対象とする先
頭アドレスと、プリロードの対象とするアドレス領域の
サイズが供給される。そして、この先頭アドレスはアド
レスレジスタ45を介して比較器12に供給されるが、
先頭アドレスは加算部43においてキャッシュブロック
サイズ規定部41が規定する1キャッシュブロックのア
ドレスへ順次加算される。従って、比較器12は、ロー
ド対象とするアドレスを1キャッシュブロック毎にスキ
ャンし、順次タグTAGに格納されたアドレスと比較す
る。
On the other hand, the instruction format of the multiple register store instruction is the same as the instruction format of the lock / unlock instruction shown in FIG. In other words, the multiple register store instruction is an instruction code that defines a store instruction from multiple registers.
An OP-CODE, an address specification field AD for specifying an address, and an area size specification field SIZE for specifying the size of an address area are included. (About the preload instruction) The preload instruction is executed by the execution unit 1.
When the processing is executed in step 3, the preload control unit 33 included in the cache control unit 30 is supplied with the head address to be preloaded and the size of the address area to be preloaded. The head address is supplied to the comparator 12 via the address register 45.
The start address is sequentially added to the address of one cache block defined by the cache block size defining unit 41 in the adding unit 43. Therefore, the comparator 12 scans the address to be loaded for each cache block and sequentially compares the address with the address stored in the tag TAG.

【0036】一方、プリロードの対象とするアドレス領
域のサイズは、サイズレジスタ47及び比較器42を介
してプリロード制御部33へ供給され、所定のアドレス
領域をスキャンするときにおいてのみ、プリロード制御
部33が活性化される。なお、サイズレジスタ47から
出力されたアドレス領域のサイズは、上記1キャッシュ
ブロックのスキャン毎に、1キャッシュブロックのサイ
ズに応じて順次減算部44で減算される。そして、プリ
ロードするアドレス領域がまだ残っていると比較器42
で判断される場合に、プリロード制御部33が活性化さ
れる。なお、プリロードするアドレス領域の上記スキャ
ンが全て終了したと比較器42で判断された場合には、
比較器42は完了信号を実行部13に供給する。
On the other hand, the size of the address area to be preloaded is supplied to the preload controller 33 via the size register 47 and the comparator 42, and the preload controller 33 only scans a predetermined address area. Be activated. Note that the size of the address area output from the size register 47 is sequentially subtracted by the subtraction unit 44 in accordance with the size of one cache block for each scan of one cache block. If the address area to be preloaded still remains, the comparator 42
When it is determined that the preload control unit 33 is activated, the preload control unit 33 is activated. If the comparator 42 determines that all the scans of the address area to be preloaded have been completed,
The comparator 42 supplies a completion signal to the execution unit 13.

【0037】このようにして、比較器12における比較
の結果、プリロードの対象とするアドレスとタグTAG
に格納されたアドレスとが一致(キャッシュヒット)し
た場合にはキャッシュヒットしたことを通知する信号
が、一致しない場合(キャッシュミス)にはキャッシュ
ミスであることを通知する信号が、それぞれプリロード
制御部33へ供給される。これにより、プリロード制御
部33はプリロードの対象とするアドレスについて、い
ずれのキャッシュブロックにおいてもキャッシュミスで
ある場合には、バス制御装置5を介してメインメモリ7
から該アドレスを有するデータを読み出して少なくとも
一つのキャッシュブロックB1〜B8に書き込み、該キ
ャッシュブロックの有効フラグVを1にする。
As a result of the comparison by the comparator 12, the address and tag TAG to be preloaded are
A signal notifying that a cache hit has occurred when the address stored in the cache memory matches (cache hit), and a signal notifying that a cache miss has occurred when the address does not match (cache miss), respectively. 33. Thus, the preload control unit 33, via the bus control unit 5, via the bus control unit 5, when there is a cache miss in any of the cache blocks for the address to be preloaded.
, The data having the address is read out and written into at least one of the cache blocks B1 to B8, and the valid flag V of the cache block is set to 1 .

【0038】従って、このようなプリロード命令を実行
することにより、指定したアドレス領域に含まれるアド
レスに対応したデータをメインメモリ7からキャッシュ
メモリ10へ一括してプリロードすることができるた
め、実行すべき命令の数を減少させ動作の効率を高める
ことができる。なお、上記プリロード命令は、上記ロッ
ク命令の動作を伴ってもよい。そしてこのとき、プリロ
ードの対象とするデータがキャッシュメモリ10内のい
ずれかのキャッシュブロックに格納されている場合に
は、該キャッシュブロックのロックフラグLを1にする
(ロックする)。一方、プリロードの対象とするデータ
がキャッシュメモリ10内に格納されていない場合に
は、該データをいずれかのキャッシュブロックに格納
し、該キャッシュブロックの有効フラグVを1にし、か
つ、ロックフラグLを1にする(ロックする)。
Therefore, by executing such a preload instruction, data corresponding to an address included in the specified address area can be preloaded from the main memory 7 to the cache memory 10 at a time, and thus should be executed. The number of instructions can be reduced and the efficiency of operation can be increased. Note that the preload instruction may accompany the operation of the lock instruction. At this time, if the data to be preloaded is stored in any of the cache blocks in the cache memory 10, the lock flag L of the cache block is set to 1 (locked). On the other hand, if the data to be preloaded is not stored in the cache memory 10, the data is stored in any of the cache blocks, the valid flag V of the cache block is set to 1, and the lock flag L To 1 (lock).

【0039】以上のような命令によれば、キャッシュブ
ロックへのデータのロードと該キャッシュブロックのロ
ックとが一命令の実行により実現されるため、動作の効
率を高めることができる。ここでさらに上記命令におい
ては、ロック指定が可能なものとすることもできる。す
なわち、図5に示されるように、命令形式の面において
はロック指定を行うか否かを記すロック指定フィールド
LOCKをさらに設け、プリロードの対象とするデータがキ
ャッシュメモリ10内のいずれかのキャッシュブロック
に格納されている場合には、ロック指定がある場合に限
って該キャッシュブロックのロックフラグLを1にする
(ロックする)。一方、プリロードの対象とするデータ
がキャッシュメモリ10内に格納されていない場合に
は、ロック指定がある場合において該データをいずれか
のキャッシュブロックに格納し、該キャッシュブロック
の有効フラグVを1にして、かつロックフラグLを1に
する(ロックする)。また、プリロードの対象とするデ
ータがキャッシュメモリ10内に格納されておらず、ロ
ック指定がない場合においては、該データをいずれかの
キャッシュブロックに格納し、該キャッシュブロックの
有効フラグVを1にする。 (ポストストア命令について)ポストストア命令が実行
部13で実行された場合には、キャッシュ制御部30に
含まれるポストストア制御部34へポストストア対象と
する先頭アドレスと、ポストストア対象とするアドレス
領域のサイズが供給される。そして、この先頭アドレス
はアドレスレジスタ45を介して比較器12に供給され
るが、先頭アドレスは加算部43においてキャッシュブ
ロックサイズ規定部41が規定する1キャッシュブロッ
ク分のアドレスへ順次加算される。従って比較器12
は、ポストストア対象とするアドレスを1キャッシュブ
ロック毎にスキャンし、順次タグTAGに格納されたア
ドレスと比較する。
According to the above instructions, the loading of data into the cache block and the locking of the cache block are realized by executing one instruction, so that the operation efficiency can be improved. Here, in the above-mentioned command, a lock can be designated. That is, as shown in FIG. 5, in the form of an instruction, a lock designation field indicating whether to designate a lock.
A LOCK is further provided, and when data to be preloaded is stored in any of the cache blocks in the cache memory 10, the lock flag L of the cache block is set to 1 only when a lock is specified. (Lock). On the other hand, if the data to be preloaded is not stored in the cache memory 10, the data is stored in any of the cache blocks when the lock is specified, and the valid flag V of the cache block is set to 1. And set the lock flag L to 1 (lock). If the data to be preloaded is not stored in the cache memory 10 and the lock is not specified, the data is stored in any of the cache blocks, and the valid flag V of the cache block is set to 1. I do. (Regarding the post-store instruction) When the post-store instruction is executed by the execution unit 13, the post-store target start address and the post-store target address area are sent to the post store control unit 34 included in the cache control unit 30. Size is supplied. The head address is supplied to the comparator 12 via the address register 45. The head address is sequentially added to the address of one cache block specified by the cache block size specifying unit 41 in the adding unit 43. Therefore, the comparator 12
Scans the address to be post-stored for each cache block and sequentially compares the address with the address stored in the tag TAG.

【0040】一方、ポストストア対象とするアドレス領
域のサイズは、サイズレジスタ47及び比較器42を介
してポストストア制御部34へ供給され、所定のアドレ
ス領域をスキャンするときにおいてのみ、ストア制御部
34が活性化される。なお、サイズレジスタ47から出
力されたアドレス領域のサイズは、上記1キャッシュブ
ロックのスキャン毎に、1キャッシュブロック分のサイ
ズに応じて順次減算部44で減算される。そして、ポス
トストアするアドレス領域がまだ残っていると比較器4
2で判断される場合に、ポストストア制御部34が活性
化される。なお、ポストストアするアドレス領域の上記
スキャンが全て終了したと比較器42で判断された場合
には、比較器42は完了信号を実行部13に供給する。
On the other hand, the size of the address area to be post-stored is supplied to the post-store control section 34 via the size register 47 and the comparator 42. Is activated. Note that the size of the address area output from the size register 47 is sequentially subtracted by the subtraction unit 44 in accordance with the size of one cache block for each scan of one cache block. If the address area to be post-stored still remains, the comparator 4
When it is determined in step 2, the post store control unit 34 is activated. When the comparator 42 determines that all the scanning of the address area to be post-stored is completed, the comparator 42 supplies a completion signal to the execution unit 13.

【0041】このような比較器12における比較の結
果、ポストストア対象とするアドレスとタグTAGに格
納されたアドレスとが一致(キャッシュヒット)した場
合には、キャッシュヒットしたことを通知する信号がポ
ストストア制御部34へ供給される。これによりポスト
ストア制御部34は、キャッシュヒットしたキャッシュ
ブロックのロックフラグLの値が0でかつ変更フラグM
の値が1であるときにだけ、該キャッシュブロックのキ
ャッシュブロックデータDATAをメインメモリ7に書
き戻し、有効フラグVを0にする。なお、いずれのキャ
ッシュブロックB1〜B8からもキャッシュミスを通知
する信号が供給された場合には、ポストストア制御部3
4は動作しない。
As a result of the comparison by the comparator 12, when the address to be post-stored matches the address stored in the tag TAG (cache hit), a signal notifying of the cache hit is sent to the post. It is supplied to the store control unit 34. Accordingly, the post store control unit 34 determines that the value of the lock flag L of the cache block having a cache hit is 0 and the change flag M
Only when the value of is 1, the cache block data DATA of the cache block is written back to the main memory 7 and the valid flag V is set to 0. When a signal for notifying a cache miss is supplied from any of the cache blocks B1 to B8, the post store control unit 3
4 does not work.

【0042】従って、このようなポストストア命令を実
行することにより、指定したアドレス領域に含まれるア
ドレスに対応したキャッシュブロックデータDATAを
メインメモリ7へ一括して書き戻すことができるため、
実行すべき命令の数を減少させ動作の効率を高めること
ができる。なお、上記ポストストア命令は、上記アンロ
ック命令の動作を伴ってもよい。そしてこのとき、ポス
トストアの対象とするデータがキャッシュメモリ10内
のいずれかのキャッシュブロックに格納されている場合
には、該データをメインメモリ7に書き戻した上で、該
有効フラグVを0にすると共にロックフラグLを0に
(アンロック)する。一方、ポストストアの対象とする
データがキャッシュメモリ10内に格納されていない場
合には、対応する動作は何も行わない。
Therefore, by executing such a post-store instruction, the cache block data DATA corresponding to the address included in the designated address area can be collectively written back to the main memory 7.
The number of instructions to be executed can be reduced, and the efficiency of operation can be increased. Note that the post store instruction may accompany the operation of the unlock instruction. At this time, if the data to be post-stored is stored in any of the cache blocks in the cache memory 10, the data is written back to the main memory 7 and the valid flag V is set to 0. And the lock flag L is set to 0 (unlocked). On the other hand, if the data to be post-stored is not stored in the cache memory 10, no corresponding operation is performed.

【0043】以上のような命令によれば、メインメモリ
7へのデータのポストストアと該キャッシュブロックの
アンロックとが一命令の実行により実現されるため、動
作の効率を高めることができる。ここでさらに上記命令
においては、アンロック指定が可能なものとすることも
できる。すなわち、命令形式の面においては図5に示さ
れた命令形式と同様に、アンロックを行うか否かを指定
するアンロック指定フィールドを設ける。そして、ポス
トストアの対象とするデータがキャッシュメモリ10内
のいずれかのキャッシュブロックに格納されている場合
には、アンロック指定があるときに該データをメインメ
モリ7に書き戻して有効フラグVを0にすると共に、ロ
ックフラグLを0にする(アンロックする)。また、こ
のときアンロック指定がない場合には該データをメイン
メモリ7に書き戻し、有効フラグVを0にする。一方、
ポストストアの対象とするデータがキャッシュメモリ1
0内に格納されていない場合には、対応する動作は何も
しない。 (フラッシュ命令について)フラッシュ命令が実行部1
3で実行された場合には、キャッシュ制御部30に含ま
れるフラッシュ制御部35へフラッシュの対象とする先
頭アドレスと、フラッシュの対象とするアドレス領域の
サイズが供給される。そして、この先頭アドレスはアド
レスレジスタ45を介して比較器12に供給されるが、
先頭アドレスは加算部43においてキャッシュブロック
サイズ規定部41が規定する1キャッシュブロック分の
アドレスへ順次加算される。従って比較器12は、フラ
ッシュの対象とするアドレスを1キャッシュブロック毎
にスキャンし、順次タグTAGに格納されたアドレスと
比較する。
According to the above-mentioned instructions, the post-store of data in the main memory 7 and the unlocking of the cache block are realized by executing one instruction, so that the operation efficiency can be improved. Here, in the above-mentioned command, it is also possible to specify unlocking. That is, similarly to the instruction format shown in FIG. 5, an unlock specification field for specifying whether or not to perform unlocking is provided in the instruction format. If the data to be post-stored is stored in any of the cache blocks in the cache memory 10, the data is written back to the main memory 7 when the unlock is specified, and the valid flag V is set. At the same time, the lock flag L is set to 0 (unlocked). If there is no unlock designation at this time, the data is written back to the main memory 7 and the valid flag V is set to 0. on the other hand,
The data to be post-stored is cache memory 1
If it is not stored in 0, the corresponding operation does nothing. (About flash instruction) Flash instruction is executed by execution unit 1
When the processing is executed in step 3, the start address to be flushed and the size of the address area to be flushed are supplied to the flash control unit 35 included in the cache control unit 30. The head address is supplied to the comparator 12 via the address register 45.
The start address is sequentially added to the address for one cache block defined by the cache block size defining unit 41 in the adding unit 43. Therefore, the comparator 12 scans the address to be flashed for each cache block and sequentially compares the address with the address stored in the tag TAG.

【0044】一方、フラッシュの対象とするアドレス領
域のサイズは、サイズレジスタ47及び比較器42を介
してフラッシュ制御部35へ供給され、所定のアドレス
領域をスキャンするときにおいてのみ、フラッシュ制御
部35が活性化される。なお、サイズレジスタ47から
出力されたアドレス領域のサイズは、上記1キャッシュ
ブロックのスキャン毎に、1キャッシュブロック分のサ
イズに応じて順次減算部44で減算される。
On the other hand, the size of the address area to be flashed is supplied to the flash control unit 35 via the size register 47 and the comparator 42, and the flash control unit 35 only scans a predetermined address area. Be activated. Note that the size of the address area output from the size register 47 is sequentially subtracted by the subtraction unit 44 in accordance with the size of one cache block for each scan of one cache block.

【0045】そして、フラッシュするアドレス領域がま
だ残っていると比較器42で判断される場合に、フラッ
シュ制御部35が活性化される。なお、フラッシュする
アドレス領域の上記スキャンが全て終了したと比較器4
2で判断された場合には、比較器42は完了信号を実行
部13に供給する。上記における比較器12での比較の
結果、フラッシュ対象とするアドレスとタグTAGに格
納されたアドレスとが一致(キャッシュヒット)した場
合には、キャッシュヒットしたことを通知する信号がフ
ラッシュ制御部35へ供給される。これによりフラッシ
ュ制御部35は、キャッシュヒットしたキャッシュブロ
ックのロックフラグLの値が0でかつ変更フラグMの値
が1であるときにだけ、該キャッシュブロックのキャッ
シュブロックデータDATAをメインメモリ7に書き戻
し、有効フラグVは1にしたままにする。なお、いずれ
のキャッシュブロックB1〜B8からもキャッシュミス
を通知する信号が供給された場合には、フラッシュ制御
部35は対応する動作を行わない。
When the comparator 42 determines that the address area to be flashed still remains, the flash control unit 35 is activated. It should be noted that the comparator 4 determines that all the above scanning of the address area to be flashed is completed.
If it is determined in step 2, the comparator 42 supplies a completion signal to the execution unit 13. As a result of the comparison by the comparator 12 as described above, when the address to be flushed matches the address stored in the tag TAG (cache hit), a signal notifying the cache hit is sent to the flash control unit 35. Supplied. As a result, the flush control unit 35 writes the cache block data DATA of the cache block into the main memory 7 only when the value of the lock flag L of the cache block that has hit the cache is 0 and the value of the change flag M is 1. And the valid flag V is kept at 1. When a signal notifying of a cache miss is supplied from any of the cache blocks B1 to B8, the flash control unit 35 does not perform a corresponding operation.

【0046】従って、このようなフラッシュ命令を実行
することにより、指定したアドレス領域に含まれるアド
レスに対応したキャッシュブロックデータDATAをメ
インメモリ7へ一括して書き戻すことができるため、実
行すべき命令の数を減少させ動作の効率を高めることが
できる。なお、上記フラッシュ命令は、上記アンロック
命令の動作を伴ってもよい。そしてこのとき、フラッシ
ュの対象とするデータがキャッシュメモリ10内のいず
れかのキャッシュブロックに格納されている場合には、
該データをメインメモリ7に書き戻した上で、該有効フ
ラグVを1にしたままロックフラグLを0に(アンロッ
ク)する。一方、ポストストアの対象とするデータがキ
ャッシュメモリ10内に格納されていない場合には、対
応する動作は何も行わない。
Therefore, by executing such a flash instruction, the cache block data DATA corresponding to the address included in the designated address area can be written back to the main memory 7 at a time. And the efficiency of the operation can be increased. The flash command may accompany the operation of the unlock command. At this time, if the data to be flushed is stored in any of the cache blocks in the cache memory 10,
After the data is written back to the main memory 7, the lock flag L is set to 0 (unlocked) while the valid flag V is set to 1. On the other hand, if the data to be post-stored is not stored in the cache memory 10, no corresponding operation is performed.

【0047】以上のような命令によれば、該キャッシュ
ブロックのアンロックとメインメモリ7へのデータのフ
ラッシュとが一命令の実行及びアドレスの一走査により
実現されるため、データ処理に要する時間を短縮し動作
効率を高めることができる。ここでさらに上記命令にお
いては、アンロック指定が可能なものとすることもでき
る。すなわち、命令形式の面においては図5に示された
命令形式と同様に、アンロックを行うか否かを指定する
アンロック指定フィールドを設ける。そして、フラッシ
ュの対象とするデータがキャッシュメモリ10内のいず
れかのキャッシュブロックに格納されている場合には、
アンロック指定があるときに該データをメインメモリ7
に書き戻して有効フラグVを1にしたままロックフラグ
Lを0にする(アンロックする)。また、このときアン
ロック指定がない場合には該データをメインメモリ7に
書き戻す。一方、フラッシュの対象とするデータがキャ
ッシュメモリ10内に格納されていない場合には、対応
する動作は何もしない。 (無効化命令について)無効化命令が実行部13で実行
された場合には、キャッシュ制御部30に含まれる無効
化制御部36へ無効化の対象とする先頭アドレスと、無
効化の対象とするアドレス領域のサイズが供給される。
そして、この先頭アドレスはアドレスレジスタ45を介
して比較器12に供給されるが、先頭アドレスは加算部
43においてキャッシュブロックサイズ規定部41が規
定する1キャッシュブロック分のアドレスへ順次加算さ
れる。従って比較器12は、フラッシュの対象とするア
ドレスを1キャッシュブロック毎にスキャンし、順次タ
グTAGに格納されたアドレスと比較する。
According to the above instructions, the unlocking of the cache block and the flushing of data to the main memory 7 are realized by executing one instruction and scanning one address, so that the time required for data processing is reduced. It can be shortened and operation efficiency can be increased. Here, in the above-mentioned command, it is also possible to specify unlocking. That is, similarly to the instruction format shown in FIG. 5, an unlock specification field for specifying whether or not to perform unlocking is provided in the instruction format. When the data to be flushed is stored in any of the cache blocks in the cache memory 10,
When the unlock is specified, the data is stored in the main memory 7
And the lock flag L is set to 0 (unlocked) while the valid flag V is set to 1. If there is no unlock designation at this time, the data is written back to the main memory 7. On the other hand, if the data to be flashed is not stored in the cache memory 10, no corresponding operation is performed. (About the invalidation instruction) When the invalidation instruction is executed by the execution unit 13, the invalidation control unit 36 included in the cache control unit 30 sends the invalidation start address and the invalidation target. The size of the address area is supplied.
The head address is supplied to the comparator 12 via the address register 45. The head address is sequentially added to the address of one cache block specified by the cache block size specifying unit 41 in the adding unit 43. Therefore, the comparator 12 scans the address to be flashed for each cache block and sequentially compares the address with the address stored in the tag TAG.

【0048】一方、無効化の対象とするアドレス領域の
サイズは、サイズレジスタ47及び比較器42を介して
無効化制御部36へ供給され、所定のアドレス領域をス
キャンするときにおいてのみ、無効化制御部36が活性
化される。なお、サイズレジスタ47から出力されたア
ドレス領域のサイズは、上記1キャッシュブロックのス
キャン毎に、1キャッシュブロック分のサイズに応じて
順次減算部44で減算される。
On the other hand, the size of the address area to be invalidated is supplied to the invalidation control unit 36 via the size register 47 and the comparator 42, and the invalidation control is performed only when a predetermined address area is scanned. The unit 36 is activated. Note that the size of the address area output from the size register 47 is sequentially subtracted by the subtraction unit 44 in accordance with the size of one cache block for each scan of one cache block.

【0049】そして、無効化するアドレス領域がまだ残
っていると比較器42で判断される場合に、無効化制御
部36が活性化される。なお、無効化するアドレス領域
の上記スキャンが全て終了したと比較器42で判断され
た場合には、比較器42は完了信号を実行部13に供給
する。上記における比較器12での比較の結果、無効化
の対象とするアドレスとタグTAGに格納されたアドレ
スとが一致(キャッシュヒット)した場合には、キャッ
シュヒットしたことを通知する信号が無効化制御部36
へ供給される。これにより無効化制御部36は、キャッ
シュヒットしたキャッシュブロックのロックフラグLの
値が0であるときにだけ、該キャッシュブロックのキャ
ッシュブロックデータDATAをメインメモリ7に書き
戻すことなく、有効フラグVを0にする。なお、いずれ
のキャッシュブロックB1〜B8からもキャッシュミス
を通知する信号が供給された場合には、無効化制御部3
6は動作しない。
When the comparator 42 determines that the address area to be invalidated still remains, the invalidation control unit 36 is activated. When the comparator 42 determines that all the scans of the address area to be invalidated have been completed, the comparator 42 supplies a completion signal to the execution unit 13. If the address to be invalidated matches the address stored in the tag TAG (cache hit) as a result of the comparison by the comparator 12 as described above, a signal for notifying that a cache hit has occurred is set to invalidation control. Part 36
Supplied to As a result, the invalidation control unit 36 sets the valid flag V without writing back the cache block data DATA of the cache block to the main memory 7 only when the value of the lock flag L of the cache block that has hit the cache is 0. Set to 0. When a signal for notifying a cache miss is supplied from any of the cache blocks B1 to B8, the invalidation control unit 3
6 does not work.

【0050】従って、このような無効化命令を実行する
ことにより、指定したアドレス領域に含まれるアドレス
に対応したキャッシュブロックデータDATAを無効化
することができるため、実行すべき命令の数を減少させ
動作の効率を高めることができる。なお、上記無効化命
令は、上記アンロック命令の動作を伴ってもよい。そし
てこのとき、無効化の対象とするデータがキャッシュメ
モリ10内のいずれかのキャッシュブロックに格納され
ている場合には、ロックフラグLの状態に依らず該キャ
ッシュブロックをアンロックして該データを無効化す
る。このような命令によれば、キャッシュブロックのア
ンロックとデータの無効化が、一命令の実行およびアド
レスの一走査により実現されるため、データ処理に要す
る時間が短縮され動作効率を高めることができる。
Therefore, by executing such an invalidation instruction, the cache block data DATA corresponding to the address included in the designated address area can be invalidated, so that the number of instructions to be executed is reduced. Operation efficiency can be increased. The invalidation command may accompany the operation of the unlock command. At this time, if the data to be invalidated is stored in any one of the cache blocks in the cache memory 10, the cache block is unlocked and the data is Disable. According to such an instruction, the unlocking of the cache block and the invalidation of the data are realized by executing one instruction and scanning one address, so that the time required for data processing can be reduced and the operation efficiency can be improved. .

【0051】ここでさらに上記命令においては、ロック
フラグLを無視して無効化する強制指定が可能な命令と
することもできる。すなわち、図6に示されるように、
命令形式の面においては強制指定するか否かを記す強制
指定フィールドFORCE をさらに設け、無効化の対象とす
るデータがキャッシュメモリ10内のいずれかのキャッ
シュブロックに格納されている場合には、強制指定され
ているとき該データをメインメモリ7に書き戻さずに、
有効フラグVを0にし、ロックフラグLを0にする(ア
ンロックする)。なお、この場合に強制指定されていな
いときはロック状態において、無効化を実行しない。一
方、無効化の対象とするデータがキャッシュメモリ10
内に格納されていない場合には、対応する動作は何もし
ない。
Here, the above-mentioned instruction may be an instruction that can be forcibly designated to ignore the lock flag L and invalidate the lock flag L. That is, as shown in FIG.
In the form of an instruction, a force specification field FORCE indicating whether or not to specify force is further provided. If data to be invalidated is stored in any cache block in the cache memory 10, the force specification field FORCE is set. When specified, the data is not written back to the main memory 7,
The valid flag V is set to 0, and the lock flag L is set to 0 (unlocked). In this case, when the forcible designation is not made, invalidation is not executed in the locked state. On the other hand, the data to be invalidated is the cache memory 10.
If not, the corresponding action is not taken.

【0052】ここで、以上の命令の作用をまとめると、
以下の表1のようになる。
Here, the operation of the above instructions is summarized as follows.
Table 1 below.

【0053】[0053]

【表1】 [Table 1]

【0054】上記表1において、○は動作することを示
し、×は動作しないことを示す。なお、上記表1におい
て「A1」は、キャッシュブロックをロックしない場合
の動作であって、無効操作(NOP)命令を実行するか
別のキャッシュブロックにロードするかのいずれの動作
でも良いことを示す。また「A2」は、キャッシュブロ
ックのロックフラグLを1にする(ロックする)場合の
動作であって、無効操作(NOP)命令を実行するか別
のキャッシュブロックにロードするかのいずれの動作で
も良いことを示す。
In Table 1 above, 動作 indicates operation, and × indicates no operation. In Table 1, “A1” is an operation when the cache block is not locked, and indicates that either an operation of executing an invalid operation (NOP) instruction or loading into another cache block may be performed. . “A2” is an operation for setting (locking) the lock flag L of the cache block to 1 and performing either an invalid operation (NOP) instruction or loading to another cache block. Show good things.

【0055】最後に、本発明の課題を解決するための手
段について付記する。 (1)メインメモリに接続され、キャッシュブロックか
ら構成されるキャッシュメモリの制御方法であって、指
定されたアドレス領域に含まれるアドレスを持つと共に
メインメモリに記憶されたデータを、供給される命令に
応じてキャッシュブロックにロードすることを特徴とす
るキャッシュメモリの制御方法。このような手段によれ
ば、指定されたアドレス領域に含まれるアドレスを持つ
データを一括してロードすることができる。 (2)上記命令に応じて、ロード後にキャッシュブロッ
クを別アドレスデータへの置換禁止状態とすることを特
徴とする(1)に記載のキャッシュメモリの制御方法。
このような手段によれば、動作速度を向上させることが
できる。 (3)メインメモリに接続され、キャッシュブロックか
ら構成されるキャッシュメモリの制御方法であって、指
定されたアドレス領域に含まれるアドレスを持つと共に
キャッシュブロックに記憶されたデータを、供給される
命令に応じてメインメモリにストアすることを特徴とす
るキャッシュメモリの制御方法。 (4)上記命令に応じて、ストア後にキャッシュブロッ
クの別アドレスデータへの置換禁止状態を解除すること
を特徴とする(3)に記載のキャッシュメモリの制御方
法。 (5)メインメモリに接続され、キャッシュブロックか
ら構成されるキャッシュメモリの制御方法であって、指
定されたアドレス領域に含まれるアドレスを持つと共
に、キャッシュブロックに記憶されているデータを、供
給される命令に応じてメインメモリに複写することを特
徴とするキャッシュメモリの制御方法。このような手段
によれば、必要なデータだけをメインメモリに複写して
動作効率を高めることができる。 (6)上記命令に応じて、複写後にデータが記憶されて
いるキャッシュブロックの別アドレスデータへの置換禁
止状態を解除することを特徴とする(5)に記載のキャ
ッシュメモリの制御方法。このような手段によれば、動
作速度を向上させることができる。 (7)キャッシュブロックから構成されるキャッシュメ
モリの制御方法であって、指定されたアドレス領域に含
まれるアドレスを持つデータを記憶しているキャッシュ
ブロックを、供給される命令に応じて一律に無効化する
ことを特徴とするキャッシュメモリの制御方法。このよ
うな手段により、無駄なライトバック動作を回避して動
作効率を高めることができる。 (8)キャッシュブロックから構成されたキャッシュメ
モリを含む計算機であって、指定されたアドレス領域に
含まれるアドレスを持つデータを記憶しているキャッシ
ュブロックを、供給される命令に応じて別アドレスデー
タへの置換禁止状態とし、または禁止状態を解除する制
御部を備えたことを特徴とする計算機。 (9)上記キャッシュブロックの各々に対応して設けら
れたロックフラグをさらに備え、制御部は、指定された
アドレス領域に含まれるアドレスを持つデータを記憶し
ているキャッシュブロックに対応するロックフラグを、
供給される命令に応じてセットまたはリセットすること
を特徴とする(8)に記載の計算機。このような手段に
よれば、ロックフラグをセットすることにより所望のキ
ャッシュブロックだけを一括して別アドレスデータへの
置換禁止状態とすることができるため、キャッシュメモ
リをより効率的に使用すると共に動作速度を向上させる
ことができる。 (10)メインメモリに接続されると共にキャッシュブ
ロックから構成されたキャッシュメモリを含む計算機で
あって、指定されたアドレス領域に含まれるアドレスを
持つと共にメインメモリに記憶されたデータを、供給さ
れる命令に応じてキャッシュブロックにロードする制御
部を備えたことを特徴とする計算機。 (11)上記キャッシュブロックの各々に対応して設け
られたロックフラグをさらに備え、制御部は、供給され
る命令に応じて、ロード後にロードされたキャッシュブ
ロックに対応するロックフラグをセットすることを特徴
とする(10)に記載の計算機。 (12)メインメモリに接続されると共にキャッシュブ
ロックから構成されたキャッシュメモリを含む計算機で
あって、指定されたアドレス領域に含まれるアドレスを
持つと共にキャッシュブロックに記憶されたデータを、
供給される命令に応じてメインメモリにストアする制御
部を備えたことを特徴とする計算機。 (13)上記キャッシュブロックの各々に対応して設け
られたロックフラグをさらに備え、制御部は、供給され
る命令に応じて、ストア後にキャッシュブロックに対応
するロックフラグをリセットすることを特徴とする(1
2)に記載の計算機。 (14)メインメモリに接続されると共にキャッシュブ
ロックから構成されるキャッシュメモリを含む計算機で
あって、指定されたアドレス領域に含まれるアドレスを
持つと共に、キャッシュブロックに記憶されているデー
タを、供給される命令に応じてメインメモリに複写する
制御部を備えたことを特徴とする計算機。 (15)上記キャッシュブロック毎に対応するロックフ
ラグをさらに備え、制御部は、供給される命令に応じ
て、複写後にデータが記憶されているキャッシュブロッ
クに対応するロックフラグをリセットすることを特徴と
する(14)に記載の計算機。
Finally, means for solving the problems of the present invention will be additionally described. (1) A method for controlling a cache memory connected to a main memory and configured from a cache block, wherein data having an address included in a designated address area and stored in the main memory is transmitted to a supplied instruction. A method of controlling a cache memory, wherein a cache block is loaded in response to a request. According to such means, data having addresses included in the designated address area can be loaded collectively. (2) The method of controlling a cache memory according to (1), wherein the cache block is set in a state in which replacement with another address data is prohibited after loading according to the instruction.
According to such means, the operation speed can be improved. (3) A method for controlling a cache memory connected to a main memory and configured from a cache block, wherein data having an address included in a specified address area and stored in the cache block is transmitted to a supplied instruction. A method for controlling a cache memory, wherein the cache memory is stored in a main memory in response to the request. (4) The method of controlling a cache memory according to (3), wherein the state in which the replacement of the cache block with another address data is prohibited is released after the storage in response to the instruction. (5) A control method for a cache memory connected to a main memory and configured from a cache block, wherein data having an address included in a designated address area and stored in the cache block is supplied. A method of controlling a cache memory, wherein a method of copying to a main memory according to an instruction. According to such a means, it is possible to copy only necessary data to the main memory to improve the operation efficiency. (6) The cache memory control method according to (5), wherein the prohibition of replacement of the cache block storing data after copying with another address data is released in response to the instruction. According to such means, the operation speed can be improved. (7) A method for controlling a cache memory including a cache block, wherein a cache block storing data having an address included in a specified address area is invalidated uniformly according to a supplied instruction. A method of controlling a cache memory. By such means, useless write-back operation can be avoided and operation efficiency can be increased. (8) A computer including a cache memory composed of cache blocks, in which a cache block storing data having an address included in a designated address area is converted to another address data in accordance with a supplied instruction. A computer which is provided with a control unit for making the replacement prohibited state or canceling the prohibited state. (9) The control unit further includes a lock flag provided corresponding to each of the cache blocks, and the control unit sets a lock flag corresponding to the cache block storing data having an address included in the designated address area. ,
The computer according to (8), wherein the computer is set or reset according to a supplied instruction. According to such a means, by setting the lock flag, only the desired cache block can be collectively set to the replacement prohibition state with another address data, so that the cache memory is used more efficiently and the operation is performed. Speed can be improved. (10) A computer which is connected to a main memory and includes a cache memory composed of a cache block, and which has an address included in a designated address area and is supplied with data stored in the main memory. A computer comprising: a control unit that loads a cache block according to the condition. (11) The control unit further includes a lock flag provided corresponding to each of the cache blocks, and the control unit sets a lock flag corresponding to the cache block loaded after loading according to the supplied instruction. The computer according to (10), which is characterized in that: (12) A computer including a cache memory connected to a main memory and configured from a cache block, the data having an address included in a designated address area and being stored in the cache block,
A computer comprising a control unit for storing data in a main memory according to a supplied instruction. (13) A lock flag provided corresponding to each of the cache blocks is further provided, and the control unit resets the lock flag corresponding to the cache block after storing according to the supplied instruction. (1
The computer according to 2). (14) A computer which is connected to a main memory and includes a cache memory constituted by a cache block. The computer has an address included in a designated address area and is supplied with data stored in the cache block. And a control unit for copying to a main memory in accordance with an instruction. (15) A lock flag corresponding to each cache block is further provided, and the control unit resets a lock flag corresponding to a cache block in which data is stored after copying in accordance with a supplied instruction. The computer according to (14).

【0056】[0056]

【発明の効果】上述の如く、本発明によれば、指定され
たアドレス領域に含まれるアドレスを持つデータを記憶
しているキャッシュブロックを、供給される命令に応じ
て別アドレスデータへの置換禁止状態とし、または禁止
状態を解除するため、上記指定されたアドレス領域に含
まれるアドレスを持つデータへのキャッシュミスを確実
に回避してキャッシュヒットを保証することにより、全
体としてアクセス速度の向上を図ることができる。
As described above, according to the present invention, replacement of a cache block storing data having an address included in a specified address area with another address data in accordance with a supplied instruction is prohibited. In order to improve the access speed as a whole, the cache hit is assured by reliably avoiding a cache miss to the data having the address included in the specified address area in order to set the state or to cancel the prohibited state. be able to.

【0057】また、指定されたアドレス領域に含まれる
アドレスを持つデータを記憶しているキャッシュブロッ
クを、供給される命令に応じて別アドレスデータへの置
換禁止状態とし、または該禁止状態を解除する制御部を
備えることにより、上記指定されたアドレス領域に含ま
れるアドレスを持つデータへのキャッシュミスを確実に
回避して、キャッシュヒットを保証し、全体としてアク
セス速度を向上させることができる。
Further, the cache block storing the data having the address included in the designated address area is set to a state in which replacement with another address data is prohibited according to the supplied instruction, or the prohibited state is released. By providing the control unit, it is possible to reliably avoid a cache miss to data having an address included in the specified address area, guarantee a cache hit, and improve the access speed as a whole.

【0058】また、指定されたアドレス領域に含まれる
アドレスを持つと共に前記メインメモリに記憶されたデ
ータを、供給される命令に応じて前記キャッシュブロッ
クにロードする制御部を備えることにより、指定された
アドレス領域に含まれるアドレスを持つデータを一括し
てロードすることができデータ処理の高速化と効率化を
図ることができる。
Also, a control unit having an address included in a specified address area and loading data stored in the main memory into the cache block in accordance with a supplied instruction is provided. Data having addresses included in the address area can be loaded at a time, so that the speed and efficiency of data processing can be improved.

【0059】また、指定されたアドレス領域に含まれる
アドレスを持つと共に前記キャッシュブロックに記憶さ
れたデータを、供給される命令に応じて前記メインメモ
リにストアする制御部を備えることにより、指定された
アドレス領域に含まれるアドレスを持つデータを一括し
てストアすることができデータ処理の高速化と効率化を
図ることができる。
Further, a control unit having an address included in a specified address area and storing data stored in the cache block in the main memory in accordance with a supplied instruction is provided. Data having addresses included in the address area can be stored collectively, so that high-speed and efficient data processing can be achieved.

【0060】また、指定されたアドレス領域に含まれる
アドレスを持つと共にキャッシュブロックに記憶されて
いるデータを、供給される命令に応じてメインメモリに
複写する制御部を備えることにより、動作の効率を向上
させることができる。また、指定されたアドレス領域に
含まれるアドレスを持つデータを記憶しているキャッシ
ュブロックを、供給される命令に応じて一律に無効化す
る制御部を備えることにより、動作の効率を高めること
ができる。
Further, by providing a control unit for copying data stored in a cache block having an address included in a designated address area to a main memory in accordance with a supplied instruction, operation efficiency is improved. Can be improved. Further, by providing a control unit for uniformly invalidating a cache block storing data having an address included in a designated address area in accordance with a supplied instruction, the operation efficiency can be improved. .

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

【図1】本発明の実施の形態に係る計算機の全体構成を
示す図である。
FIG. 1 is a diagram showing an overall configuration of a computer according to an embodiment of the present invention.

【図2】図1に示されたキャッシュ制御部の構成を示す
図である。
FIG. 2 is a diagram illustrating a configuration of a cache control unit illustrated in FIG. 1;

【図3】従来のキャッシュ制御部の構成を示す図であ
る。
FIG. 3 is a diagram showing a configuration of a conventional cache control unit.

【図4】本発明の実施の形態に係るロック/アンロック
命令等の命令形式を示す図である。
FIG. 4 is a diagram showing an instruction format such as a lock / unlock instruction according to the embodiment of the present invention.

【図5】本発明の実施の形態に係るロック指定フィール
ドを有する命令形式を示す図である。
FIG. 5 is a diagram showing an instruction format having a lock designation field according to the embodiment of the present invention.

【図6】本発明の実施の形態に係る強制指定フィールド
を有する命令形式を示す図である。
FIG. 6 is a diagram showing an instruction format having a compulsory designation field according to the embodiment of the present invention.

【図7】本発明の実施の形態に係る単一レジスタのロー
ド/ストア命令等の命令形式を示す図である。
FIG. 7 is a diagram showing an instruction format such as a single register load / store instruction according to the embodiment of the present invention;

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

1 CPU 3 キャッシュ部 5 バス制御装置 7 メインメモリ 9 周辺システム 10 キャッシュメモリ 11 フェッチ部 12,42 比較器 13 実行部 15,17 キャッシュウェイ 19,21,45,59 アドレスレジスタ 23,25,27,29 データレジスタ 30,50 キャッシュ制御部 31,51 ロード制御部 32,52 ストア制御部 33,53 プリロード制御部 34 ポストストア制御部 35,55 フラッシュ制御部 36,56 無効化制御部 37,57 ロック/アンロック制御部 38,58 デコード部 40 アドレス領域制御部 41 キャッシュブロックサイズ規定部 43 加算部 44 減算部 47 サイズレジスタ DESCRIPTION OF SYMBOLS 1 CPU 3 Cache part 5 Bus control device 7 Main memory 9 Peripheral system 10 Cache memory 11 Fetch part 12, 42 Comparator 13 Execution part 15, 17 Cache way 19, 21, 45, 59 Address register 23, 25, 27, 29 Data register 30, 50 Cache control unit 31, 51 Load control unit 32, 52 Store control unit 33, 53 Preload control unit 34 Post store control unit 35, 55 Flash control unit 36, 56 Invalidation control unit 37, 57 Lock / Unlock Lock control unit 38, 58 Decoding unit 40 Address area control unit 41 Cache block size defining unit 43 Addition unit 44 Subtraction unit 47 Size register

───────────────────────────────────────────────────── フロントページの続き (72)発明者 三宅 英雄 神奈川県川崎市中原区上小田中4丁目1番 1号 富士通株式会社内 Fターム(参考) 5B005 JJ11 JJ13 KK12 MM01 NN12 NN22 NN42 NN43 NN45 PP03 PP21 QQ00  ──────────────────────────────────────────────────続 き Continuing on the front page (72) Inventor Hideo Miyake 4-1-1, Kamidadanaka, Nakahara-ku, Kawasaki-shi, Kanagawa F-term within Fujitsu Limited (Reference) 5B005 JJ11 JJ13 KK12 MM01 NN12 NN22 NN42 NN43 NN45 PP03 PP21 QQ00

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 キャッシュブロックから構成されるキャ
ッシュメモリの制御方法であって、 指定されたアドレス領域に含まれるアドレスを持つデー
タを記憶している前記キャッシュブロックを、供給され
る命令に応じて別アドレスデータへの置換禁止状態と
し、または前記禁止状態を解除することを特徴とするキ
ャッシュメモリの制御方法。
1. A method for controlling a cache memory including a cache block, wherein the cache block storing data having an address included in a designated address area is separated according to a supplied instruction. A method for controlling a cache memory, wherein a replacement with address data is prohibited or the prohibited state is released.
【請求項2】 キャッシュブロックから構成されたキャ
ッシュメモリを含む計算機であって、 指定されたアドレス領域に含まれるアドレスを持つデー
タを記憶している前記キャッシュブロックを、供給され
る命令に応じて別アドレスデータへの置換禁止状態と
し、または前記禁止状態を解除する制御部を備えたこと
を特徴とする計算機。
2. A computer including a cache memory constituted by cache blocks, wherein said cache block storing data having an address included in a designated address area is separated according to a supplied instruction. A computer comprising: a control unit that sets a state in which replacement with address data is prohibited or cancels the prohibited state.
【請求項3】 メインメモリに接続されると共にキャッ
シュブロックから構成されたキャッシュメモリを含む計
算機であって、 指定されたアドレス領域に含まれるアドレスを持つと共
に前記メインメモリに記憶されたデータを、供給される
命令に応じて前記キャッシュブロックにロードする制御
部を備えたことを特徴とする計算機。
3. A computer including a cache memory connected to a main memory and configured from a cache block, and supplies data having an address included in a specified address area and stored in the main memory. A control unit for loading the cache block in response to an instruction to be executed.
【請求項4】 メインメモリに接続されると共にキャッ
シュブロックから構成されたキャッシュメモリを含む計
算機であって、 指定されたアドレス領域に含まれるアドレスを持つと共
に前記キャッシュブロックに記憶されたデータを、供給
される命令に応じて前記メインメモリにストアする制御
部を備えたことを特徴とする計算機。
4. A computer which is connected to a main memory and includes a cache memory constituted by a cache block, and supplies data having an address included in a specified address area and stored in the cache block. And a control unit for storing the data in the main memory in accordance with a command to be executed.
【請求項5】 メインメモリに接続されると共にキャッ
シュブロックから構成されるキャッシュメモリを含む計
算機であって、 指定されたアドレス領域に含まれるアドレスを持つと共
に、前記キャッシュブロックに記憶されているデータ
を、供給される命令に応じて前記メインメモリに複写す
る制御部を備えたことを特徴とする計算機。
5. A computer including a cache memory connected to a main memory and configured from a cache block, the computer having an address included in a designated address area and storing data stored in the cache block. And a control unit for copying to the main memory in accordance with a supplied instruction.
【請求項6】 キャッシュブロックから構成されるキャ
ッシュメモリを含む計算機であって、 指定されたアドレス領域に含まれるアドレスを持つデー
タを記憶している前記キャッシュブロックを、供給され
る命令に応じて一律に無効化する制御部を備えたことを
特徴とする計算機。
6. A computer including a cache memory constituted by a cache block, wherein the cache block storing data having an address included in a designated address area is uniformly stored in accordance with a supplied instruction. A computer comprising a control unit for invalidating a computer.
JP31145599A 1999-10-01 1999-11-01 Method for controlling cache memory and computer for realizing the method Pending JP2001134490A (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP31145599A JP2001134490A (en) 1999-11-01 1999-11-01 Method for controlling cache memory and computer for realizing the method
US09/671,117 US6868472B1 (en) 1999-10-01 2000-09-28 Method of Controlling and addressing a cache memory which acts as a random address memory to increase an access speed to a main memory
EP20100179486 EP2284712A3 (en) 1999-10-01 2000-09-29 Method of controlling a cache memory to increase an access speed to a main memory, and a computer using the method
EP00308633A EP1089185A3 (en) 1999-10-01 2000-09-29 Method of controlling a cache memory to increase an access speed to a main memory, and a computer using the method
KR1020000057754A KR100660951B1 (en) 1999-10-01 2000-09-30 Method of controlling a cache memory to increase an access speed to a main memory, and a computer using the method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP31145599A JP2001134490A (en) 1999-11-01 1999-11-01 Method for controlling cache memory and computer for realizing the method

Publications (1)

Publication Number Publication Date
JP2001134490A true JP2001134490A (en) 2001-05-18

Family

ID=18017436

Family Applications (1)

Application Number Title Priority Date Filing Date
JP31145599A Pending JP2001134490A (en) 1999-10-01 1999-11-01 Method for controlling cache memory and computer for realizing the method

Country Status (1)

Country Link
JP (1) JP2001134490A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6918011B2 (en) 2002-09-11 2005-07-12 Renesas Technology Corp. Cache memory for invalidating data or writing back data to a main memory
JP2007048296A (en) * 2005-08-11 2007-02-22 Internatl Business Mach Corp <Ibm> Method, apparatus and system for invalidating multiple address cache entries
JP2012530979A (en) * 2009-12-22 2012-12-06 インテル・コーポレーション System, method, and apparatus for cache flushing a given range of pages and TLB invalidating a given range of entries
JP2018511120A (en) * 2015-03-03 2018-04-19 エイアールエム リミテッド Cache maintenance instruction
JP2020532795A (en) * 2017-08-31 2020-11-12 レール ビジョン リミテッドRail Vision Ltd Systems and methods for high throughput in multiple computations
JP7470112B2 (en) 2018-11-02 2024-04-17 アーム・リミテッド Persistent Memory Cleaning

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6918011B2 (en) 2002-09-11 2005-07-12 Renesas Technology Corp. Cache memory for invalidating data or writing back data to a main memory
JP2007048296A (en) * 2005-08-11 2007-02-22 Internatl Business Mach Corp <Ibm> Method, apparatus and system for invalidating multiple address cache entries
JP2012530979A (en) * 2009-12-22 2012-12-06 インテル・コーポレーション System, method, and apparatus for cache flushing a given range of pages and TLB invalidating a given range of entries
KR101467069B1 (en) * 2009-12-22 2014-12-01 인텔 코오퍼레이션 System, method, and apparatus for a cache flush of a range of pages and tlb invalidation of a range of entries
JP2015084250A (en) * 2009-12-22 2015-04-30 インテル・コーポレーション System, method, and apparatus for performing cache flush of pages of given range and tlb invalidation of entries of given range
JP2018511120A (en) * 2015-03-03 2018-04-19 エイアールエム リミテッド Cache maintenance instruction
US11144458B2 (en) 2015-03-03 2021-10-12 Arm Limited Apparatus and method for performing cache maintenance over a virtual page
JP2020532795A (en) * 2017-08-31 2020-11-12 レール ビジョン リミテッドRail Vision Ltd Systems and methods for high throughput in multiple computations
JP7470112B2 (en) 2018-11-02 2024-04-17 アーム・リミテッド Persistent Memory Cleaning

Similar Documents

Publication Publication Date Title
US6704841B2 (en) Method and apparatus for facilitating speculative stores in a multiprocessor system
EP1399823B1 (en) Using an l2 directory to facilitate speculative loads in a multiprocessor system
US6718839B2 (en) Method and apparatus for facilitating speculative loads in a multiprocessor system
JP2566701B2 (en) Change ownership controller for data units in shared cache
US6625698B2 (en) Method and apparatus for controlling memory storage locks based on cache line ownership
US7127586B2 (en) Prefetching hints
EP0514024B1 (en) Method and apparatus for an improved memory architecture
US10445238B1 (en) Robust transactional memory
JPH0342745A (en) Plural cash-memory-access method
EP1089185A2 (en) Method of controlling a cache memory to increase an access speed to a main memory, and a computer using the method
EP1363189A2 (en) Apparatus and method for implementing a rom patch using a lockable cache
US6374332B1 (en) Cache control system for performing multiple outstanding ownership requests
JP2007011580A (en) Information processing device
JPS58154062A (en) Multiprocessor system
JP2003502754A (en) Scheduling enhancement method and apparatus in advanced microprocessor
US20110167224A1 (en) Cache memory, memory system, data copying method, and data rewriting method
JPH0619786A (en) Method and apparatus for maintenance of cache coference
US6389517B1 (en) Maintaining snoop traffic throughput in presence of an atomic operation a first port for a first queue tracks cache requests and a second port for a second queue snoops that have yet to be filtered
JP2008503821A (en) Method and system for invalidating writeback on atomic reservation lines in a small capacity cache system
JP2001222468A (en) Load/store instruction control circuit in microprocessor and method for controlling load/store instruction
JP2007533014A (en) System and method for canceling write back processing when snoop push processing and snoop kill processing occur simultaneously in write back cache
JP2001134490A (en) Method for controlling cache memory and computer for realizing the method
US5010475A (en) Consistency ensuring system for the contents of a cache memory
US6973541B1 (en) System and method for initializing memory within a data processing system
JPH0467242A (en) Cache memory control system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20041105

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070613

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070619

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070820

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070911