JPH0728701A - Computer system - Google Patents

Computer system

Info

Publication number
JPH0728701A
JPH0728701A JP5175118A JP17511893A JPH0728701A JP H0728701 A JPH0728701 A JP H0728701A JP 5175118 A JP5175118 A JP 5175118A JP 17511893 A JP17511893 A JP 17511893A JP H0728701 A JPH0728701 A JP H0728701A
Authority
JP
Japan
Prior art keywords
data
address
data block
storage device
cache memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP5175118A
Other languages
Japanese (ja)
Inventor
Masahide Sato
雅英 佐藤
Shigeo Takasaki
繁夫 高崎
Yasufumi Yoshizawa
康文 吉澤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP5175118A priority Critical patent/JPH0728701A/en
Publication of JPH0728701A publication Critical patent/JPH0728701A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To transfer the data at a high speed by providing a means which transfers the data on an area designated in a main storage to a cache memory and a means which stores the address of the area received by the cache memory. CONSTITUTION:When a reading instruction 111 is issued, a data block of a main storage 14 including the address (requested by a CPU 11) designated by the instruction 111 is transferred to a data storage 134. Then the address of the data block of the storage 134 holding the data is set at a data block register 12. Meanwhile an address of the storage 14 is designated with a writing instruction 112. Then the data on the data block pointed by the register 12 are written into the address of the storage 14 that is requested by the CPU 11. If the old data on the address requested by the CPU 11 is remained in the storage 134, the data are invalidated.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はキャッシュメモリを有す
る計算機システムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a computer system having a cache memory.

【0002】[0002]

【従来の技術】最近の電子計算機に用いられる中央演算
処理装置(以下、CPU)は、アーキテクチャの改良、
VLSI化等の集積及び実装技術によって、ますます高
性能化,高速度化の傾向にある。また、このような電子
計算機に用いられる主記憶装置においても同様であり、
さらに、使用される記憶素子の集積技術により大容量化
の傾向にある。
2. Description of the Related Art A central processing unit (hereinafter, CPU) used in a recent electronic computer has an improved architecture.
Due to integration and mounting technologies such as VLSI, there is a trend toward higher performance and higher speed. The same applies to the main storage device used in such an electronic computer,
Further, there is a tendency for the capacity to be increased due to the integration technology of the storage elements used.

【0003】しかし、CPUの動作速度は主記憶装置の
それと比べると数倍も速く、両者の間には性能上大きな
ギャップが存在している。そのため、CPUと主記憶装
置を直接接続すると、システム全体の性能が低下するこ
とが知られている。
However, the operating speed of the CPU is several times faster than that of the main storage device, and there is a large gap between them in terms of performance. Therefore, it is known that if the CPU and the main storage device are directly connected, the performance of the entire system is deteriorated.

【0004】そこで、一般的には、CPUと主記憶装置
の間に、主記憶装置よりも高速アクセス可能なキャッシ
ュメモリを配置し、CPUと主記憶装置の動作速度のギ
ャップを補う工夫がなされている。
Therefore, generally, a cache memory which can be accessed faster than the main memory device is arranged between the CPU and the main memory device so as to make up for a gap between the operating speeds of the CPU and the main memory device. There is.

【0005】図2は従来の計算機システムの構成を示す
ブロック図である。図2において、キャッシュメモリ1
2は、主記憶装置14上のデータの一部を一時的に保持
するようにしたもので、保持したデータの主記憶装置1
4上のアドレスを記録するアドレスタグ装置133を有
している。キャッシュメモリ12にCPU11からのデ
ータアクセス要求があると、データブロック決定装置1
31は、要求されたデータのアドレスから要求データを
含む領域(以下、データブロック)のデータを保持する
データ記憶装置134上の領域(データブロック)を決
定する。アドレス判定装置132は、データブロック決
定装置により求められたデータブロックに現在保持さ
れ、アドレスタグ装置133に記録されているデータの
アドレスタグを、要求されたデータアドレスと比較し、
要求されたデータがデータ記憶装置134上にあるかど
うかを判定する。
FIG. 2 is a block diagram showing the configuration of a conventional computer system. In FIG. 2, the cache memory 1
Reference numeral 2 indicates a portion of the data in the main memory device 14 that is temporarily retained.
4 has an address tag device 133 for recording the address on the upper side. When there is a data access request from the CPU 11 to the cache memory 12, the data block determination device 1
31 determines an area (data block) on the data storage device 134 that holds data in an area (hereinafter, referred to as a data block) including the requested data from the address of the requested data. The address determination device 132 compares the address tag of the data currently held in the data block obtained by the data block determination device and recorded in the address tag device 133 with the requested data address,
Determine if the requested data is on the data store 134.

【0006】要求されたデータがデータ記憶装置134
上にある場合(キャッシュヒット)、CPU11はデー
タ記憶装置134上のデータを高速にアクセスできる。
要求されたデータがデータ記憶装置134上にない場合
(キャッシュミス)は、データ転送装置135が主記憶
装置14から要求データ含むデータブロックをデータブ
ロック決定装置131で求められたデータブロックに転
送し(ムーブイン)、そのデータブロックに転送された
データの主記憶装置14上のアドレスをアドレスタグ装
置133上に記憶し、その後CPU21がデータ記憶装
置134上に記憶された要求データをアクセスする。
The requested data is data storage device 134.
If it is above (cache hit), the CPU 11 can access the data in the data storage device 134 at high speed.
If the requested data is not in the data storage device 134 (cache miss), the data transfer device 135 transfers the data block including the requested data from the main storage device 14 to the data block determined by the data block determination device 131 ( Move-in), the address of the data transferred to the data block in the main storage device 14 is stored in the address tag device 133, and then the CPU 21 accesses the requested data stored in the data storage device 134.

【0007】図4はCPUからのデータアクセス要求が
あったときの基本的なデータアクセス処理フローを示し
ている。CPUからのアクセス要求がデータ読み込みの
場合、まず、データブロック決定装置131がアクセス
アドレスからデータ記憶装置134上の使用すべきデー
タブロックを決定する(ステップ301)。次に、対象
データブロックに保持されているデータが、CPU21
が要求したデータを含むデータであるかを、アドレスタ
グ記憶装置133に記憶されているアドレスタグとCP
Uの要求アドレスから判定する(ステップ302)。要
求データが対象データブロック上に存在していないと
き、対象データブロックに何らかのデータがあるか判定
し(ステップ303)、対象データブロック上に要求さ
れたデータでないデータがある場合、そのデータを主記
憶装置上に書き戻す必要があるかチェックし(ステップ
304)、書き戻す必要があれば、主記憶装置上に書き
戻す(ムーブアウト)。次に主記憶装置から要求された
データを含むデータブロックをデータ記憶装置134上
の対象データブロックにムーブインする。次に、ムーブ
インしたデータの主記憶装置上のアドレスをアドレスタ
グ記憶装置に記憶する。CPUはデータ記憶装置上に保
持されたデータを読み込む(ステップ401)。また、
CPUからのアクセス要求がデータ書き込み要求である
場合も同様であり、CPUはデータ記憶装置上に保持さ
れたデータに対して書き込みを行う(ステップ60
2)。
FIG. 4 shows a basic data access processing flow when there is a data access request from the CPU. When the access request from the CPU is data reading, the data block determining device 131 first determines the data block to be used on the data storage device 134 from the access address (step 301). Next, the data held in the target data block is the CPU 21
Whether or not the data includes the data requested by the address tag and the CP stored in the address tag storage device 133.
Judgment is made from the request address of U (step 302). When the requested data does not exist in the target data block, it is judged whether or not there is any data in the target data block (step 303). If there is data that is not the requested data in the target data block, the data is stored in the main memory. It is checked whether it needs to be written back on the device (step 304), and if it needs to be written back, it is written back on the main memory (move out). Next, the data block including the data requested from the main memory device is moved into the target data block on the data memory device 134. Next, the address of the moved-in data in the main storage device is stored in the address tag storage device. The CPU reads the data held in the data storage device (step 401). Also,
The same applies when the access request from the CPU is a data write request, and the CPU writes to the data held in the data storage device (step 60).
2).

【0008】このように、CPUは高速アクセスができ
るキャッシュメモリにアクセスし、アクセスされるデー
タがキャッシュメモリ上に存在しているときには高速に
データアクセスができる。
As described above, the CPU can access the cache memory that can be accessed at high speed and can access the data at high speed when the accessed data exists in the cache memory.

【0009】また、データを書き込む際に、キャッシュ
メモリ上のデータブロックに含まれるデータを全て書き
替える場合には、キャッシュメモリ上のデータブロック
に書き込み先データを転送することなしに、直接対象デ
ータブロックに書き込みを行い、アドレスタグを更新す
る方法も提案されている。
Further, when all the data included in the data block on the cache memory is rewritten when writing the data, the target data block is directly transferred without transferring the write destination data to the data block on the cache memory. There is also proposed a method for writing the address to the address and updating the address tag.

【0010】なお、データ書き込み方法として、キャッ
シュメモリ上のデータブロックを入れ替えるときに主記
憶装置上にデータを書き戻すスワップ方式について述べ
たが、他の方式としてキャッシュメモリ上のデータブロ
ックに書き込むと同時に主記憶装置上のデータにも書き
込みを行うストアスルー方式がある。ストアスルー方式
では、キャッシュメモリ上のデータを追い出すときに、
主記憶装置へのデータの書き込みが不要であるため、図
4における処理303,304,305は不要である。
As a data writing method, the swap method in which data is written back to the main memory when the data blocks in the cache memory are exchanged has been described, but another method is to write the data blocks in the cache memory at the same time. There is a store-through method in which data is also written in the main storage device. With the store-through method, when erasing the data in the cache memory,
Since it is not necessary to write data to the main storage device, the processes 303, 304, and 305 in FIG. 4 are unnecessary.

【0011】[0011]

【発明が解決しようとする課題】上記のようなキャッシ
ュメモリを用いることで、キャッシュヒット時には、C
PUは高速にデータにアクセスすることができ、プログ
ラムを高速に実行可能となる。しかし、キャッシュミス
時には主記憶装置からキャッシュメモリ上にデータを転
送する必要があり、プログラムの実行に時間がかかる。
By using the cache memory as described above, when a cache hit occurs, C
The PU can access the data at high speed, and the program can be executed at high speed. However, in the case of a cache miss, it is necessary to transfer data from the main storage device to the cache memory, and it takes time to execute the program.

【0012】そのため、上記のようなキャッシュメモリ
を有する計算機システムにおいて、主記憶装置上の第一
の領域にあるデータを主記憶装置上の第二の領域に転送
するデータ転送処理を行う場合、以下のような問題点が
ある。
Therefore, in the computer system having the above-mentioned cache memory, when performing the data transfer processing for transferring the data in the first area on the main storage device to the second area on the main storage device, There is such a problem.

【0013】(1)データ転送処理では、転送元データ
がキャッシュメモリ上にない場合、キャッシュメモリ上
にムーブインし、次に、転送先領域のデータがキャッシ
ュメモリ上にない場合、転送先である領域のデータをキ
ャッシュメモリ上にムーブインし、その後、キャッシュ
メモリ上の転送元データを、キャッシュメモリ上の転送
先領域に転送する。このように、転送元アドレスのデー
タと転送先アドレスのデータをキャッシュメモリ上に一
時的に保持する必要があり、転送するデータ量が大きい
ほどキャッシュミスを起こしやすい。そのため、データ
転送処理に時間がかかる。
(1) In the data transfer process, if the transfer source data is not in the cache memory, it is moved in to the cache memory, and if the data of the transfer destination area is not in the cache memory, it is the transfer destination area. Data is moved into the cache memory, and then the transfer source data in the cache memory is transferred to the transfer destination area in the cache memory. As described above, it is necessary to temporarily hold the data of the transfer source address and the data of the transfer destination address in the cache memory, and the larger the amount of data to be transferred, the easier the cache miss occurs. Therefore, the data transfer process takes time.

【0014】(2)プログラムがアクセスするアドレス
によっては主記憶装置上の転送元領域と転送先領域がキ
ャッシュメモリ上の同じデータブロックを使用する場合
が生じ、この場合、転送元データをムーブインした後、
転送先アドレスのデータをムーブインする際に、必ず、
キャッシュミスが発生する。さらに、データを転送する
単位がキャッシュメモリ上のデータブロックより小さい
場合、プログラムのアクセスパターンによって、転送元
データを読み込む時、転送先領域に書き込む時にキャッ
シュミスが発生し、一つのデータブロックを処理中に複
数のキャッシュミスが発生する。そのため、このような
同一のデータブロックを使用する場合のデータ転送は、
異なるデータブロックを用いる場合より、時間がかかる
ことがある。
(2) Depending on the address accessed by the program, the transfer source area and the transfer destination area in the main memory may use the same data block in the cache memory. In this case, after the transfer source data is moved in. ,
When moving in the data of the transfer destination address, be sure to
A cache miss occurs. Furthermore, if the data transfer unit is smaller than the data block in the cache memory, a cache miss occurs when reading the transfer source data and writing to the transfer destination area depending on the program access pattern, and one data block is being processed. Multiple cache misses occur. Therefore, when using such an identical data block, data transfer is
It may take longer than using different data blocks.

【0015】これら問題点を解決するために、プログラ
ムが、キャッシュメモリ上の、どのデータブロックを、
どのような順序でアクセスするかを、完全に把握し、プ
ログラム開発時に考慮することは困難である。
In order to solve these problems, the program determines which data block in the cache memory
It is difficult to fully understand the order of access and consider it when developing a program.

【0016】本発明の目的は、上述の如き従来技術にお
ける問題点を解消し、高速なデータ転送を可能とする計
算機システムを提供することにある。
An object of the present invention is to provide a computer system which solves the problems in the prior art as described above and enables high speed data transfer.

【0017】[0017]

【課題を解決するための手段】本発明は、上記目的を達
成するため、キャッシュメモリを有する計算機システム
において、主記憶装置上の指定された領域のデータを前
記キャッシュメモリへ転送し、転送された前記キャッシ
ュメモリ上の領域のアドレスを返す手段と、前記キャッ
シュメモリ上の指定された領域のデータを前記主記憶装
置の指定された領域に転送する手段を設ける。
In order to achieve the above object, the present invention, in a computer system having a cache memory, transfers data in a designated area on a main storage device to the cache memory and transfers the data. Means for returning the address of the area on the cache memory and means for transferring the data of the specified area on the cache memory to the specified area on the main memory are provided.

【0018】[0018]

【作用】本発明の計算機システムにおいて、主記憶装置
上の第一の領域から第二の領域にデータを転送する際、
まず、主記憶装置上の第一の領域のデータがキャッシュ
メモリ上に存在するか(キャッシュヒットか)どうかを
調べる。
In the computer system of the present invention, when data is transferred from the first area to the second area on the main memory,
First, it is checked whether the data in the first area in the main memory exists in the cache memory (cache hit).

【0019】次に、キャッシュヒットでない(キャッシ
ュミス)とき、第一の領域のデータが転送されるキャッ
シュメモリ上の領域に、いま、存在するデータを主記憶
装置上に書き戻す必要があるかどうか調べる。
Next, when there is no cache hit (cache miss), it is necessary to write back the existing data in the main memory device to the area on the cache memory to which the data in the first area is transferred. Find out.

【0020】次に、キャッシュメモリ上に存在するデー
タを主記憶装置上に書き戻す必要があるなら、そのデー
タを主記憶装置上に書き戻す。
Next, if it is necessary to write back the data existing in the cache memory to the main storage device, the data is written back to the main storage device.

【0021】次に、主記憶装置上の第一の領域のデータ
を、前述した主記憶装置上の指定された領域のデータを
キャッシュメモリへ転送し、転送されたキャッシュメモ
リ上の領域のアドレスを返す手段により、キャッシュメ
モリ上に転送し、キャッシュメモリ上の転送された領域
を記憶する。
Next, the data in the first area on the main memory is transferred to the cache memory, and the data in the designated area on the main memory is transferred to the cache memory. The returning means transfers the data to the cache memory and stores the transferred area on the cache memory.

【0022】次に、前述したキャッシュメモリ上の指定
された領域のデータを主記憶装置の指定された領域に転
送する手段により、上記処理で記憶したキャッシュメモ
リ上の領域のデータを主記憶装置上の第二の領域に転送
する。
Next, the means for transferring the data in the designated area in the cache memory to the designated area in the main storage device stores the data in the area in the cache memory stored in the above process in the main storage device. Transfer to the second area of.

【0023】このように、本発明の計算機システムによ
れば、主記憶装置上の第一の領域のデータを主記憶装置
上の第二の領域に転送するデータ転送処理を、主記憶装
置上の転送元領域を一時的に保持するキャッシュメモリ
上の領域だけを用いることで実現できる。この結果、従
来の問題点を解消し、高速なデータ転送が実現できる。
As described above, according to the computer system of the present invention, the data transfer processing for transferring the data in the first area on the main storage device to the second area on the main storage device is performed on the main storage device. This can be realized by using only the area on the cache memory that temporarily holds the transfer source area. As a result, the conventional problems can be solved and high-speed data transfer can be realized.

【0024】[0024]

【実施例】図1は、同実施例のシステム構成を示したブ
ロック図である。図1において、11はCPU、12は
データ記憶装置132のデータブロックのアドレスを有
するデータブロックレジスタ、14は主記憶装置、13
1はCPU11から要求されたデータアドレスから要求
データが保持されるデータブロックを決定するデータブ
ロック決定装置、134は主記憶装置14のデータを一
時的に保持するデータ記憶装置、133はデータ記憶装
置134が保持したデータの主記憶装置14上のアドレ
スを記憶するアドレスタグ記憶装置、135はデータ記
憶装置134と主記憶装置14の間のデータ転送を行う
データ転送装置、132は、CPUから要求されたデー
タアドレスと、このデータアドレスからデータブロック
決定装置131が決定したデータ記憶装置134上のデ
ータブロックに記憶されているデータの主記憶装置上の
アドレスを比較し、キャッシュヒット/ミスを判定する
アドレス判定装置、13は、データブロック決定装置1
31とアドレス判定装置132とアドレスタグ記憶装置
133とデータ記憶装置134とデータ転送装置135
を有するキャッシュメモリ、111は後述する読み込み
命令、112は後述する書き込み命令を示している。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 is a block diagram showing the system configuration of the same embodiment. In FIG. 1, 11 is a CPU, 12 is a data block register having an address of a data block of the data storage device 132, 14 is a main storage device, 13
Reference numeral 1 is a data block determination device that determines a data block in which requested data is held from a data address requested by the CPU 11, 134 is a data storage device that temporarily holds data in the main storage device 14, and 133 is a data storage device 134. Address tag storage device for storing the address of the data held by the main storage device 14, 135 is a data transfer device for transferring data between the data storage device 134 and the main storage device 132, and 132 is requested by the CPU Address determination for determining cache hit / miss by comparing the data address with the address on the main storage device of the data stored in the data block on the data storage device 134 determined by the data block determination device 131 from this data address Device, 13 is a data block determination device 1
31, address determination device 132, address tag storage device 133, data storage device 134, and data transfer device 135
The reference numeral 111 denotes a read instruction described later, and the reference numeral 112 denotes a write instruction described later.

【0025】CPU11は、データブロック決定装置1
31にアクセス要求をだし、アドレス判定装置131の
結果によりキャッシュヒットである場合に、データ記憶
装置134のデータをアクセスし、キャッシュミスの場
合はデータ記憶装置上に要求データが転送されるまで停
止し、要求データがデータ記憶装置134上に転送され
てからデータ記憶装置134上の転送されたデータをア
クセスするようになっている。
The CPU 11 is the data block determining device 1
When an access request is issued to 31 and the result of the address determination device 131 indicates a cache hit, the data in the data storage device 134 is accessed. In the case of a cache miss, the operation is stopped until the requested data is transferred to the data storage device. After the requested data is transferred to the data storage device 134, the transferred data on the data storage device 134 is accessed.

【0026】主記憶装置14は、プログラムが使用する
データ及びそのプログラム自体が格納されている。さら
に、主記憶装置はキャッシュメモリ上のデータ記憶装置
の管理単位であるデータブロックと同じ大きさのブロッ
クに分けられており、主記憶装置とキャッシュメモリの
間のデータの転送はこの単位で実行されるようになって
いる。
The main memory 14 stores data used by the program and the program itself. Further, the main memory device is divided into blocks of the same size as the data block which is the management unit of the data memory device on the cache memory, and data transfer between the main memory device and the cache memory is executed in this unit. It has become so.

【0027】読み込み命令111では、読み込むデータ
ブロックに含まれるデータのアドレスを指定するように
なっている。読み込み命令が発行されると、読み込み命
令で指定されたアドレス(CPUが要求するアドレス)
のデータを含む主記憶装置のデータブロックをデータ記
憶装置134に転送し、データを保持したデータ記憶装
置134上のデータブロックのアドレスをデータブロッ
クレジスタ12にセットするようになっている。
The read instruction 111 is designed to specify the address of the data included in the data block to be read. When a read command is issued, the address specified by the read command (address requested by the CPU)
The data block of the main memory device including the data of (1) is transferred to the data memory device 134, and the address of the data block on the data memory device 134 holding the data is set in the data block register 12.

【0028】書き込み命令112では、主記憶装置上の
アドレスを指定するようになっている。データブロック
レジスタが指すデータブロックのデータをCPUが要求
した主記憶装置14上のアドレスに書き込み、CPUが
要求したアドレスの古いデータがデータ記憶装置134
に残っている場合に、そのデータを無効にするようにな
っている。
The write command 112 is designed to specify an address on the main storage device. The data of the data block pointed to by the data block register is written to the address on the main storage device 14 requested by the CPU, and the old data of the address requested by the CPU is the data storage device 134.
If it remains, the data will be invalidated.

【0029】データブロックレジスタ12は、読み込み
命令111によって、データを転送されたデータ記憶装
置134上のデータブロックのアドレスがセットされる
ようになっている。
In the data block register 12, the address of the data block on the data storage device 134 to which the data has been transferred is set by the read instruction 111.

【0030】データブロック決定装置131は、CPU
が要求したデータアドレスから処理対象となるデータを
含むデータブロックが転送されるデータ記憶装置134
上のデータブロックを求めるようになっている。
The data block determination device 131 is a CPU
Data storage device 134 to which a data block including data to be processed is transferred from the data address requested by
It is designed to ask for the data block above.

【0031】アドレス判定装置132は、CPUからの
アクセス要求アドレスと、この要求アドレスからデータ
ブロック決定装置131で求められるデータブロックの
データの主記憶装置14上のアドレスを比較し、キャッ
シュヒット/ミスを判定するようになっている。
The address determination device 132 compares the access request address from the CPU with the address on the main memory 14 of the data of the data block obtained by the data block determination device 131 from this request address, and determines a cache hit / miss. It is designed to judge.

【0032】アドレスタグ記憶装置133は、データ記
憶装置134に保持しているデータの主記憶装置14上
のアドレスをタグデータとして記憶するようになってお
り、CPUがアクセス要求をだすと、要求アドレスから
データブロック決定装置が決定したデータブロックのデ
ータの主記憶装置上のアドレスをアドレス判定装置に渡
すようになっている。また、対応するデータブロックの
有効/無効を示す無効フラグとデータブロックのデータ
が書き換えられたことを示すダーティフラグをデータ記
憶装置上のデータブロックごとに持っている。無効フラ
グは対応するデータブロックにデータが何もない時と対
応するデータブロックが無効化された時にセットされ、
対応するデータブロックにデータが転送されたときにオ
フされるようになっている。また、ダーティフラグは対
応するデータブロックのデータが書き換えられた時にセ
ットされ、データブロックのデータが新たに転送された
ときにはオフされるようになっている。
The address tag storage device 133 stores the address of the data held in the data storage device 134 on the main storage device 14 as tag data, and when the CPU issues an access request, the requested address is sent. The address on the main storage device of the data of the data block determined by the data block determining device is passed to the address determining device. Further, each data block in the data storage device has an invalid flag indicating whether the corresponding data block is valid or invalid and a dirty flag indicating that the data of the data block has been rewritten. The invalid flag is set when there is no data in the corresponding data block and when the corresponding data block is invalidated,
It is turned off when data is transferred to the corresponding data block. The dirty flag is set when the data of the corresponding data block is rewritten, and turned off when the data of the data block is newly transferred.

【0033】データ記憶装置134は、データ転送主記
憶装置14上のデータを一時的に保持するようになって
おり、保持したデータの主記憶装置上のアドレスはアド
レスタグ記憶装置にタグデータとして記憶されるように
なっている。
The data storage device 134 is adapted to temporarily hold the data in the data transfer main storage device 14, and the address of the held data in the main storage device is stored in the address tag storage device as tag data. It is supposed to be done.

【0034】データ転送装置135は、アドレス判定装
置でキャッシュミスと判定された場合に、現在データ記
憶装置上のデータブロックに保持されているデータを主
記憶装置上に書き戻す必要があるなら、そのデータを書
き戻し、次に、CPUが要求したアドレスのデータを含
むデータブロックをデータ記憶装置上のデータブロック
に転送する。さらに、書き込み命令112が発行された
場合にはデータブロックレジスタが指すデータブロック
を内容を指定された主記憶装置上のアドレスに書き戻す
ようにもなっている。なお、データ転送の単位はデータ
記憶装置上のデータブロックの大きさである。
If it is necessary for the data transfer device 135 to write back the data currently held in the data block in the data storage device to the main storage device when the address determination device determines that there is a cache miss, the data transfer device 135 The data is written back, and then the data block containing the data at the address requested by the CPU is transferred to the data block on the data storage device. Further, when the write command 112 is issued, the contents of the data block pointed to by the data block register are written back to the designated address on the main storage device. The unit of data transfer is the size of the data block on the data storage device.

【0035】図3は、読み込み命令111と書き込み命
令112の動作を示すフローチャートである。以下、図
3に基づいて、本実施例の読み込み命令111と書き込
み命令112の動作を説明する。
FIG. 3 is a flow chart showing the operation of the read command 111 and the write command 112. The operation of the read command 111 and the write command 112 of this embodiment will be described below with reference to FIG.

【0036】読み込む命令111が発行されると、以下
のように要求されたアドレスのデータブロックがデータ
記憶装置に転送されるようになっている。。
When the read instruction 111 is issued, the data block of the requested address is transferred to the data storage device as follows. .

【0037】<ステップ301>まず、読み込み命令で
指定されるアドレスから、データブロック決定装置によ
り、転送先となるデータ記憶装置上のデータブロックを
求める。
<Step 301> First, from the address specified by the read command, the data block determining device determines the data block on the data storage device that is the transfer destination.

【0038】<ステップ302>次に、当該データブロ
ックのデータが読み込み命令で指定されたデータである
かどうかを、アドレスタグ記憶装置に記憶されているタ
グデータと読み込み命令で指定されたアドレスをアドレ
ス判定装置が比較し、キャッシュヒット/ミスを判定す
る。キャッシュヒットの場合、ステップ308の処理
に、キャッシュミスの場合、ステップ303の処理に進
む。
<Step 302> Next, the tag data stored in the address tag storage device and the address specified by the read command are addressed to determine whether the data of the data block is the data specified by the read command. The judging device compares and judges the cache hit / miss. If there is a cache hit, the process proceeds to step 308, and if there is a cache miss, the process proceeds to step 303.

【0039】<ステップ303>次に、当該データブロ
ックに、読み込み命令で指定されたアドレスのデータを
含むデータブロック以外のデータが記憶されているかど
うかをアドレスタグ記憶装置のタグデータから判定し、
他のデータが存在する場合、ステップ304に、他のデ
ータが存在しない場合ステップ306に進む。
<Step 303> Next, it is judged from the tag data of the address tag storage device whether or not data other than the data block including the data of the address designated by the read command is stored in the data block,
If other data exists, the process proceeds to step 304. If no other data exists, the process proceeds to step 306.

【0040】<ステップ304>次に、当該データブロ
ックのデータを主記憶装置に書き戻す必要があるかどう
か判定する。その結果、書き戻す必要があれば、<ステ
ップ305>に、書き戻す必要がない場合、ステップ3
06に進む。当ステップは、本実施例のデータ書き込み
方式がストアスルー方式である場合は不要である。
<Step 304> Next, it is judged whether or not the data of the data block needs to be written back to the main memory. As a result, if there is a need to write back, to <step 305>, if there is no need to write back, step 3
Proceed to 06. This step is not necessary when the data writing method of this embodiment is the store-through method.

【0041】<ステップ305>次に、データ転送装置
が当該データブロックのデータを主記憶装置に書き戻
す。当ステップはステップ304と同様にストアスルー
方式の場合には不要である。
<Step 305> Next, the data transfer device writes the data of the data block back to the main storage device. This step is not necessary in the case of the store-through method like step 304.

【0042】<ステップ306>次に、データ転送装置
が、読み込み命令で指定されたアドレスのデータを含む
主記憶装置上のデータブロックを、データブロック決定
装置が決定したデータ記憶装置上のデータブロックに転
送する。
<Step 306> Next, the data transfer device changes the data block in the main memory device containing the data of the address specified by the read instruction to the data block in the data memory device determined by the data block determination device. Forward.

【0043】<ステップ307>次に、ステップ306
において転送されたデータブロックの主記憶装置上のア
ドレスをアドレスタグ記憶装置のタグデータとして記憶
する。さらに、無効フラブをクリアし、ダーティフラグ
をクリアする。
<Step 307> Next, step 306
The address of the data block transferred in the main storage device is stored as tag data in the address tag storage device. Further, the invalid flag is cleared and the dirty flag is cleared.

【0044】<ステップ308>次に、ステップ306
において転送されたデータブロックのデータ記憶装置上
のアドレスをデータブロックレジスタにセットする。
<Step 308> Next, step 306
In the data block register, the address on the data storage device of the transferred data block is set.

【0045】また、書き込み命令112が発行される
と、以下のように要求されたアドレスのデータブロック
が主記憶装置に転送されるようになっている。。
When the write command 112 is issued, the data block of the requested address is transferred to the main storage device as follows. .

【0046】<ステップ309>まず、書き込み命令に
おいて指定された主記憶装置上のアドレスに、データブ
ロックレジスタが指すデータ記憶装置上のデータブロッ
クのデータをデータ転送装置が転送する。
<Step 309> First, the data transfer device transfers the data of the data block in the data storage device indicated by the data block register to the address in the main storage device designated by the write command.

【0047】<ステップ310>次に、転送先の主記憶
装置上のデータブロックがデータ記憶装置上に存在して
いるかを判定する。存在しない場合、何もせず、書き込
み命令112の処理は終了する。存在する場合、次のス
テップ311に進む。
<Step 310> Next, it is judged whether or not the data block in the main storage device of the transfer destination exists in the data storage device. If it does not exist, nothing is done and the processing of the write command 112 ends. If there is, go to the next step 311.

【0048】<ステップ311>次に、該当するデータ
ブロックを無効にするために、アドレスタグ記憶装置上
の該当データブロックの無効フラグをセットする。
<Step 311> Next, in order to invalidate the corresponding data block, the invalid flag of the corresponding data block in the address tag storage device is set.

【0049】次に、このように構成した実施例における
データ転送処理の動作を説明する。
Next, the operation of the data transfer process in the embodiment thus constructed will be described.

【0050】主記憶装置上のデータブロックAのデータ
を、データブロックBに転送する場合、プログラムで
は、読み込み命令111(以下、bload)と書き込み命令
112(以下、bwrite)を使用し、 bload a bwrite b と記述する(aはデータブロックAのアドレス、bはデ
ータブロックBのアドレス)。
When the data in the data block A on the main memory is transferred to the data block B, the program uses a read instruction 111 (hereinafter, “bload”) and a write instruction 112 (hereinafter, “bwrite”). It is described as b (a is the address of the data block A, b is the address of the data block B).

【0051】bload が発行されると、データブロック決
定装置131により、データ記憶装置134上のデータ
ブロックAのデータを記憶するデータブロックA′が決
定され、データブロックA′にデータブロックAのデー
タが既に転送されているかを、アドレスタグ記憶装置1
33のデータブロックA′に対応するタグデータとアド
レスaを比較することでアドレス判定装置132が判定
する。
When bload is issued, the data block determining device 131 determines the data block A'for storing the data of the data block A on the data storage device 134, and the data of the data block A is stored in the data block A '. Whether the address tag storage device 1 has already been transferred
The address determination device 132 determines by comparing the tag data corresponding to the 33 data block A ′ with the address a.

【0052】キャッシュヒットであればデータブロック
レジスタ12にデータブロックA′のアドレスをセット
する。一方、キャッシュミスと判定され、データブロッ
クA′のデータを主記憶装置上に書き戻す必要があれ
ば、データ転送装置135により、主記憶装置上にデー
タを書き戻す。そして、データブロックA′にデータブ
ロックAのデータをデータ転送装置135により転送
し、データブロックA′に対応するアドレスタグ記憶装
置に転送したデータの主記憶装置上のアドレスをセット
する。そして、データブロックレジスタ12にデータブ
ロックA′のアドレスをセットする。
If there is a cache hit, the address of the data block A'is set in the data block register 12. On the other hand, if it is determined to be a cache miss and it is necessary to write back the data of the data block A ′ to the main storage device, the data transfer device 135 writes the data back to the main storage device. Then, the data of the data block A is transferred to the data block A ′ by the data transfer device 135, and the address on the main storage device of the transferred data is set to the address tag storage device corresponding to the data block A ′. Then, the address of the data block A'is set in the data block register 12.

【0053】bloadの実行後、bwrite が発行されると、
データブロックレジスタがデータブロックA′を指して
おり、このデータブロックA′のデータをデータ転送装
置135が主記憶装置14上のデータブロックBに転送
する。そして、転送先アドレスbが使用するデータ記憶
装置134上のデータブロックB′をデータブロック決
定装置131によって求め、データブロックB′にデー
タブロックBの古いデータが存在するかどうかを判定
し、存在するならば、データブロックB′のデータを無
効化する。無効化は、データブロックB′に対応するア
ドレスタグ記憶装置133上の無効フラグをセットする
ことでなされる。
When bwrite is issued after executing bload,
The data block register points to the data block A ', and the data transfer device 135 transfers the data of this data block A'to the data block B in the main memory device 14. Then, the data block B'in the data storage device 134 used by the transfer destination address b is obtained by the data block determination device 131, and it is judged whether or not the old data of the data block B exists in the data block B ', and it exists. If so, the data in the data block B'is invalidated. Invalidation is performed by setting an invalid flag on the address tag storage device 133 corresponding to the data block B '.

【0054】このように、データブロックAからデータ
ブロックBへのデータの転送はbload,bwrite を発行す
ることで実現できる。この転送処理中にキャッシュミス
が発生するのは、bload を発行し、データブロックAの
データ(転送元データ)をデータ記憶装置134上のデ
ータブロックに転送するときだけである。
As described above, the data transfer from the data block A to the data block B can be realized by issuing the bload and bwrite. A cache miss occurs during this transfer process only when bload is issued and the data in the data block A (source data) is transferred to the data block in the data storage device 134.

【0055】また、上記では、主記憶装置14上の一つ
のデータブロックのデータを主記憶装置上の他のデータ
ブロックに転送するデータ転送処理を説明したが、主記
憶装置14上の連続した複数のデータブロックのデータ
を連続した複数のデータブロックに転送するデータ転送
処理についても、上記に示した方法を転送するデータブ
ロック数だけ繰り返して行うことで実現できる。さら
に、主記憶装置14上の転送元データブロックから主記
憶装置14上の複数のデータブロックにデータを転送す
るデータ転送処理についても、書き込み命令112を繰
り返し発行することで実現できる。これらのデータ転送
処理において発生するキャッシュミス回数の上限は、転
送元のデータブロックのデータをキャッシュメモリ上に
転送する回数に等しい。
In the above description, the data transfer process for transferring the data of one data block in the main memory device 14 to another data block in the main memory device has been described. The data transfer process of transferring the data of the data block to a plurality of continuous data blocks can also be realized by repeatedly performing the method described above for the number of data blocks to be transferred. Further, the data transfer process of transferring data from the transfer source data block in the main storage device 14 to the plurality of data blocks in the main storage device 14 can also be realized by repeatedly issuing the write command 112. The upper limit of the number of cache misses that occurs in these data transfer processes is equal to the number of times the data of the transfer source data block is transferred to the cache memory.

【0056】なお、本発明は、上記実施例にのみ限定さ
れず、要旨を変更しない範囲で適宜変形して実施でき
る。例えば、上述した実施例では、読み込み命令111
によってデータが転送されたキャッシュメモリ上のデー
タブロックのアドレスを記憶する手段としてデータブロ
ックレジスタを用意したが、このレジスタはキャッシュ
メモリ上のデータブロックのアドレスを記憶する専用の
レジスタであっても、計算機システムにおいてプログラ
ム実行のために使用されている汎用レジスタであっても
良い。
The present invention is not limited to the above-mentioned embodiments, and can be carried out by appropriately modifying it within the scope of the invention. For example, in the above-described embodiment, the read instruction 111
Although a data block register was prepared as a means for storing the address of the data block in the cache memory to which the data was transferred by this, even if this register is a dedicated register for storing the address of the data block in the cache memory, It may be a general-purpose register used for program execution in the system.

【0057】[0057]

【発明の効果】本発明によれば、データ転送処理におい
て、転送先データブロックのデータを書き込むために従
来使用していたキャッシュメモリ上のデータブロックを
必要としないため、キャッシュミス発生回数の上限を転
送元データをキャッシュメモリ上に転送する回数に抑え
ることができる。この結果、データ転送処理を高速に実
行できる。
According to the present invention, the data transfer process does not require the data block in the cache memory that has been conventionally used for writing the data of the transfer destination data block. The number of times the transfer source data is transferred to the cache memory can be suppressed. As a result, the data transfer process can be executed at high speed.

【0058】更に、転送先データブロックのデータを書
き込むために従来使用していたキャッシュメモリ上のデ
ータブロックを必要としないため、システム全体のキャ
ッシュミス発生確率を下げる効果もある。
Further, since the data block on the cache memory which has been used conventionally for writing the data of the transfer destination data block is not required, there is an effect of reducing the probability of occurrence of cache miss in the entire system.

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

【図1】本発明の一実施例のシステム構成を示すブロッ
ク図。
FIG. 1 is a block diagram showing a system configuration of an embodiment of the present invention.

【図2】従来技術のシステム構成を示すブロック図。FIG. 2 is a block diagram showing a system configuration of a conventional technique.

【図3】図1の実施例の処理手順を示すフローチャート
図。
FIG. 3 is a flowchart showing a processing procedure of the embodiment shown in FIG.

【図4】図2の従来技術の処理手順を示すフローチャー
ト図。
FIG. 4 is a flowchart showing a processing procedure of the conventional technique of FIG.

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

11…CPU、12…データブロックレジスタ、13…
キャッシュメモリ、14…主記憶装置、111…読み込
み命令、112…書き込み命令、131…データブロッ
ク決定装置、132…アドレス判定装置、133…アド
レスタグ記憶装置、134…データ記憶装置、135…
データ転送装置。
11 ... CPU, 12 ... Data block register, 13 ...
Cache memory, 14 ... Main storage device, 111 ... Read command, 112 ... Write command, 131 ... Data block determination device, 132 ... Address determination device, 133 ... Address tag storage device, 134 ... Data storage device, 135 ...
Data transfer device.

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】キャッシュメモリを有する計算機システム
において、主記憶装置上の指定された領域のデータを前
記キャッシュメモリへ転送する手段と、転送された前記
キャッシュメモリ上の領域のアドレスを記憶する手段を
有することを特徴とする計算機システム。
1. A computer system having a cache memory, comprising means for transferring data in a designated area on a main storage device to the cache memory, and means for storing an address of the transferred area on the cache memory. A computer system characterized by having.
【請求項2】請求項1において、前記キャッシュメモリ
上の指定された領域のデータを前記主記憶装置の指定さ
れた領域に転送する手段を有する計算機システム。
2. The computer system according to claim 1, further comprising means for transferring data in a designated area of the cache memory to a designated area of the main storage device.
【請求項3】請求項2において、前記キャッシュメモリ
上のデータを前記主記憶装置上の複数の領域に転送する
計算機システム。
3. The computer system according to claim 2, wherein the data in the cache memory is transferred to a plurality of areas in the main storage device.
JP5175118A 1993-07-15 1993-07-15 Computer system Pending JPH0728701A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5175118A JPH0728701A (en) 1993-07-15 1993-07-15 Computer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5175118A JPH0728701A (en) 1993-07-15 1993-07-15 Computer system

Publications (1)

Publication Number Publication Date
JPH0728701A true JPH0728701A (en) 1995-01-31

Family

ID=15990594

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5175118A Pending JPH0728701A (en) 1993-07-15 1993-07-15 Computer system

Country Status (1)

Country Link
JP (1) JPH0728701A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7483114B2 (en) 2003-10-20 2009-01-27 Lg Display Co., Ltd. Liquid crystal display device, substrate bonding apparatus, and method for fabricating liquid crystal display device using the same
US9333798B2 (en) 2010-12-21 2016-05-10 Mitsubishi Heavy Industries, Ltd. Vehicle wheel, running wheel, vehicle and method of assembling and disassembling vehicle wheel

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7483114B2 (en) 2003-10-20 2009-01-27 Lg Display Co., Ltd. Liquid crystal display device, substrate bonding apparatus, and method for fabricating liquid crystal display device using the same
US9333798B2 (en) 2010-12-21 2016-05-10 Mitsubishi Heavy Industries, Ltd. Vehicle wheel, running wheel, vehicle and method of assembling and disassembling vehicle wheel

Similar Documents

Publication Publication Date Title
JP3259969B2 (en) Cache memory controller
CN101446923B (en) System and method for flushing a cache line in response to instruction
JP3289661B2 (en) Cache memory system
JP2004533079A (en) Method and apparatus for facilitating speculative storage in a multiprocessor system
JPH037978B2 (en)
JP2005520222A (en) Use of L2 directory to facilitate speculative storage in multiprocessor systems
JPH0997214A (en) Information-processing system inclusive of address conversion for auxiliary processor
JP3236287B2 (en) Multiprocessor system
JPH04102948A (en) Data processing system and method
US8214597B2 (en) Cache tentative read buffer
JPH0728701A (en) Computer system
JP2000047942A (en) Device and method for controlling cache memory
JP3006204B2 (en) Information processing device
JP3564343B2 (en) Data transfer device and method during cache bypass
JP2000347941A (en) Cache memory device
JP3081635B2 (en) Cache memory invalidation processing apparatus and invalidation control method
US7840757B2 (en) Method and apparatus for providing high speed memory for a processing unit
JP2703255B2 (en) Cache memory writing device
JPH06282487A (en) Cache device
JPH07152650A (en) Cache control unit
JPH02259945A (en) Storing processing system
CN110688155A (en) Merging method for storage instruction accessing non-cacheable area
JPH08335188A (en) Cache memory device capable of controlling software
JPH01125639A (en) Disk cache control system
JPH10207773A (en) Bus connecting device