JPH09152989A - Data cache memory system - Google Patents

Data cache memory system

Info

Publication number
JPH09152989A
JPH09152989A JP7311270A JP31127095A JPH09152989A JP H09152989 A JPH09152989 A JP H09152989A JP 7311270 A JP7311270 A JP 7311270A JP 31127095 A JP31127095 A JP 31127095A JP H09152989 A JPH09152989 A JP H09152989A
Authority
JP
Japan
Prior art keywords
data
memory
cache
write
central processing
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
JP7311270A
Other languages
Japanese (ja)
Inventor
Hiroaki Ogoshi
博昭 小越
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP7311270A priority Critical patent/JPH09152989A/en
Publication of JPH09152989A publication Critical patent/JPH09152989A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PROBLEM TO BE SOLVED: To eliminate the need for writing operation to a main memory at the time of a cache mishit by performing write-back operation asynchronously with access to a data cache from a CPU. SOLUTION: A hit controller 3 receives input of hit information outputted by a comparator 2 by a cache controller 15 and outputs signals controlling reading operation and writing operation for corresponding data based upon address information to a data memory part 8 included in the data cache memory. A cache writer 1 searches a tag memory part 9 to check whether or not there is a dirty bit, and outputs a control signal for storing blocks present in rewritten data in the main memory when there is the rewritten data in the tag memory part 9. Then the hit controller 3 and cache writer 1 operate to control other blocks independently of each other.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明はデータキャッシュメ
モリシステムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data cache memory system.

【0002】[0002]

【従来の技術】従来、プロセッサと主メモリとの間に小
容量の高速バッファメモリを設けることにより、実効的
な主メモリアクセス時間を短縮し高速化することができ
ることは、一般に良く知られていることである。この高
速化を実現するためのメモリシステムはキャッシュメモ
リシステムと呼ばれており、図7に従来のデータキャッ
シュメモリシステムの1例のブロック図が示される。ま
た、当該システム内に搭載されるバッファメモリは、特
にキャッシュメモリと呼ばれている。更に、当該キャッ
シュメモリは、インストラクション・キャッシュメモリ
と、データ・キャッシュメモリの2つに区分けすること
も可能である。このように2つに分けた場合には、イン
ストラクション・キャッシュメモリにより命令がバッフ
ァリングされ、またデータ・キャッシュメモリによりデ
ータがバッファリングされる。キャッシュモメリを2つ
に分けることにより、インストラクションとデータとを
同時にアクセスすることができるために、コンピュータ
システムの処理能力を向上させることが可能となる。本
発明は、このデータ・キャッシュの改善にかかわるキャ
ッシュメモリシステムに関する発明である。
2. Description of the Related Art Conventionally, it is generally well known that an effective main memory access time can be shortened and speeded up by providing a small-capacity high-speed buffer memory between a processor and a main memory. That is. A memory system for realizing this speedup is called a cache memory system, and FIG. 7 shows a block diagram of an example of a conventional data cache memory system. The buffer memory mounted in the system is called a cache memory. Further, the cache memory can be divided into two, an instruction cache memory and a data cache memory. When divided into two in this way, the instruction cache memory buffers the instructions, and the data cache memory buffers the data. By dividing the cache memory into two, it is possible to access the instruction and the data at the same time, so that it is possible to improve the processing capability of the computer system. The present invention is an invention relating to a cache memory system related to the improvement of the data cache.

【0003】一般に、データ・キャッシュ操作は、CP
Uからの書込みにおいて発生するが、その方式は主とし
て2つの方式に区分される。1つは、データをキャッシ
ュメモリと主メモリとに対して同時に書込む方式であ
り、ライトスルー方式と呼ばれている。もう1つは、主
データを一旦キャッシュメモリに書込み、キャッシュミ
スが発生して置換えの対象となるブロック内に書換えら
れたデータが存在する場合にのみ、当該ブロックの内容
を主メモリに書込み、新しいブロックに置換えるという
処理により書込みを行う方式で、ライトバック方式と呼
ばれている。
In general, data cache operations are CP
Although it occurs in writing from U, the method is mainly divided into two methods. One is a method of simultaneously writing data in a cache memory and a main memory, which is called a write-through method. The other is to write the main data to the cache memory once, and only if the rewritten data exists in the block to be replaced due to a cache miss, write the contents of the block to the main memory, and write the new data. It is a method of writing by a process of replacing with a block and is called a write-back method.

【0004】まず、従来のライトバック方式によるデー
タキャッシュメモリシステムについて説明する。図7
は、従来のデータキャッシュメモリシステムの基本構成
を示すブロック図である。図7に示されるように、本従
来例は、内部アドレスバス102、内部データバス10
3、外部アドレスバス112および外部データバス11
3に対応して、CPU12と、主メモリ13と、比較器
2と、データメモリ部8と、タグメモリ部9と、キャッ
シュコントローラ15と、外部バスインターフェ−ス1
6とを備えて構成されている。CPU12、データメモ
リ部8および外部バスインターフェ−ス16は、内部デ
ータバス103を介して相互に接続されており、CPU
12より出力される内部アドレスバス102は、タグメ
モリ部9、データメモリ部8および外部バスインターフ
ェ−ス16に接続され、主メモリ13と外部バスインタ
ーフェ−ス間には、外部アドレスバス112および外部
データバス113が接続されている。また、図8は本従
来例における読出し動作時のフローチャートであり、図
9は、書込み動作時のフローチャートである。
First, a conventional data cache memory system by the write-back method will be described. FIG.
FIG. 4 is a block diagram showing a basic configuration of a conventional data cache memory system. As shown in FIG. 7, in this conventional example, an internal address bus 102 and an internal data bus 10 are used.
3, external address bus 112 and external data bus 11
3 corresponding to CPU 3, main memory 13, comparator 2, data memory unit 8, tag memory unit 9, cache controller 15, external bus interface 1
6 is provided. The CPU 12, the data memory unit 8 and the external bus interface 16 are connected to each other via the internal data bus 103.
The internal address bus 102 output from 12 is connected to the tag memory unit 9, the data memory unit 8 and the external bus interface 16, and the external address bus 112 is provided between the main memory 13 and the external bus interface. And an external data bus 113 are connected. Further, FIG. 8 is a flow chart during a read operation in this conventional example, and FIG. 9 is a flow chart during a write operation.

【0005】まず、図7において、ライトバック方式に
よるデータ読出し時において、読出しの対象となるデー
タのアドレスがタグメモリ部9に存在する場合について
説明する。始めに、CPU12から出力されるアドレス
情報が、比較器2およびタグメモリ部9に入力される
(ステップ81)。比較器2においては、タグメモリ部
9内の対応するアドレス情報が、CPU12から出力さ
れるアドレス情報と一致しているか否かが比較照合され
る(ステップ82)。ステップ82において、一致して
いる場合には、比較器2よりヒット情報106が出力さ
れて、キャッシュコントローラ15に入力される。この
一致する動作状態はキャッシュヒットと呼ばれるが、こ
のことは、データ書込みの場合においても同様である。
キャッシュコントローラ15においては、ヒット情報1
06の入力を受けて、コントロール信号110が生成さ
れて出力され、データメモリ部8および外部バスインタ
ーフェ−ス16に入力される。データメモリ部8におい
ては、コントロール信号110の入力を受けて、CPU
12より入力されるアドレス情報により指定されるブロ
ックから、該当データが読出されてデータバス103上
に出力されて、データ読出し処理が終了する(ステップ
87)。その際には、外部インターフェ−ス16は、上
記のキャッシュコントローラ1より入力されるコントロ
ール信号110により制御されて、外部アドレスバス1
12および外部データバス113より切離される。
First, referring to FIG. 7, a description will be given of the case where the address of the data to be read is present in the tag memory unit 9 when the data is read by the write back method. First, the address information output from the CPU 12 is input to the comparator 2 and the tag memory unit 9 (step 81). In the comparator 2, it is compared and collated whether the corresponding address information in the tag memory unit 9 matches the address information output from the CPU 12 (step 82). If they match in step 82, the hit information 106 is output from the comparator 2 and input to the cache controller 15. This coincident operation state is called a cache hit, but this also applies to data writing.
In the cache controller 15, hit information 1
In response to the input of 06, the control signal 110 is generated and output, and input to the data memory unit 8 and the external bus interface 16. In the data memory unit 8, the CPU receives the control signal 110 and receives it.
The corresponding data is read from the block designated by the address information inputted from 12 and is output onto the data bus 103, and the data reading process is completed (step 87). At that time, the external interface 16 is controlled by the control signal 110 input from the cache controller 1 and the external address bus 1 is controlled.
12 and the external data bus 113.

【0006】次に、ライトバック方式によるデータ読出
し時において、読出しの対象となるデータのアドレスが
タグメモリ部9に存在しない場合においては、前記ステ
ップ81のアドレス情報の入力に続いて、前記ステップ
82においては、比較器2による、タグメモリ部9内の
対応するアドレス情報と、CPU12から出力されるア
ドレス情報との比較照合結果は不一致となり、読出し対
象のデータが、データメモリ部8内に存在しないことに
なる。この不一致の動作状態はキャッシュミスと呼ばれ
る。次いで、タグメモリ部9における置換えの対象とな
るブロックのダーティビットがセットされているか否か
の判定が行われる(ステップ83)。ステップ83にお
いて、ダーティビットがセットされている場合には、デ
ータメモリ部8の内容と主メモリ13の内容とが不一致
(ミスヒット)であるという状態が示されており、外部
インターフェ−ス16を介して、置換えの対象となるブ
ロックが書換えられているか否かが判定されて(ステッ
プ84)、置換えの対象となるブロックが書換えられて
いる場合には、外部バスインターフェ−ス16を介し
て、置換えの対象となるブロックが、データメモリ部8
から主メモリ13に書込まれ(ステップ85)、その後
に、外部バスインターフェ−ス16を介して、主メモリ
13から、ミスヒットしたアドレスデータが含まれてい
るブロックが読出されて、データメモリ部8に格納され
る。そして同時に、該当ブロックのダーティ−ビットが
リセットされ、タグメモリ部9の書換えが行われて更新
される(ステップ86)。なお、ダーティ−ビットと
は、データキャッシュ内のデータと主メモリ内のデータ
との一致がとれていないことを示すビットである。そし
て、CPU12より入力されるアドレス情報により指定
されるブロックから、該当データが読出されてデータバ
ス103上に出力されて、データ読出し処理が終了する
(ステップ87)。また、ステップ83においてダーテ
ィビットがセットされていない場合には、データメモリ
部8の内容と主メモリ13の内容とが一致している状態
を示しており、これにより、該当ブロックを主メモリ1
3に書込むことなく、ステップ96において、外部イン
ターフェ−ス16を介して、主メモリ13からアドレス
データに含まれるブロックの読出しが行われて、デ−タ
メモリ部8に上書きされる。同時に、タグメモリ部9の
書換えが行われて更新され、データメモリ部8に該当デ
ータの書込みが行われて処理は終了する。なお、ステッ
プ94において、置換えの対象となるブロックが書換え
られていない場合においても、ステップ96に移行して
上記と同様の処理が行われる。
Next, at the time of reading data by the write-back method, if the address of the data to be read does not exist in the tag memory section 9, following the input of the address information at the step 81, the step 82 is followed. In the above, the comparison and comparison result of the corresponding address information in the tag memory unit 9 by the comparator 2 and the address information output from the CPU 12 do not match, and the data to be read does not exist in the data memory unit 8. It will be. This mismatched operating state is called a cache miss. Next, it is determined whether the dirty bit of the block to be replaced in the tag memory unit 9 is set (step 83). When the dirty bit is set in step 83, it is indicated that the contents of the data memory unit 8 and the contents of the main memory 13 do not match (miss hit), and the external interface 16 is shown. It is determined whether or not the block to be replaced has been rewritten (step 84). If the block to be replaced has been rewritten, the external bus interface 16 is used. And the block to be replaced is the data memory unit 8
Is written from the main memory 13 to the main memory 13 (step 85), and then the block containing the miss-hit address data is read from the main memory 13 via the external bus interface 16 to obtain the data memory. It is stored in the unit 8. At the same time, the dirty bit of the corresponding block is reset, and the tag memory unit 9 is rewritten and updated (step 86). The dirty bit is a bit indicating that the data in the data cache and the data in the main memory do not match. Then, the corresponding data is read from the block designated by the address information input from the CPU 12 and is output onto the data bus 103, and the data reading process ends (step 87). Further, when the dirty bit is not set in step 83, the contents of the data memory unit 8 and the contents of the main memory 13 match each other.
In step 96, the block included in the address data is read from the main memory 13 without overwriting the data in the data 3 and is overwritten in the data memory unit 8. At the same time, the tag memory unit 9 is rewritten and updated, the corresponding data is written in the data memory unit 8, and the process ends. Even when the block to be replaced has not been rewritten in step 94, the process proceeds to step 96 and the same processing as above is performed.

【0007】次に、図7において、ライトバック方式に
よるデータ書込み時において、書換えの対象となるデー
タのアドレスがタグメモリ部9に存在する場合について
説明する。CPU12から出力されるアドレス情報が、
比較器2およびタグメモリ部9に入力される(ステップ
91)。比較器2においては、タグメモリ部9内の対応
するアドレス情報が、CPU12から出力されるアドレ
ス情報と一致しているか否かが比較照合される(ステッ
プ92)。ステップ92において、一致している場合に
は、比較器2よりヒット情報106が出力されて、キャ
ッシュコントローラ15に入力される。キャッシュコン
トローラ15においては、ヒット情報106の入力を受
けて、コントロール信号110が生成されて出力され、
データメモリ部8および外部バスインターフェ−ス16
に入力される。データメモリ部8においては、コントロ
ール信号110の入力を受けて、CPU12より入力さ
れるアドレス情報により指定されるブロック内に、内部
データバス103上のデータが格納される(ステップ9
7)。そして、その際に、外部バスインターフェ−ス1
6は、上記のキャッシュコントローラ1より入力される
コントロール信号110により制御されて、外部アドレ
スバス112および外部データバス113より切離され
る。
Next, referring to FIG. 7, a description will be given of the case where the address of the data to be rewritten exists in the tag memory unit 9 when the data is written by the write back method. The address information output from the CPU 12 is
It is input to the comparator 2 and the tag memory unit 9 (step 91). In the comparator 2, the corresponding address information in the tag memory unit 9 is compared and collated with the address information output from the CPU 12 (step 92). If they match in step 92, the hit information 106 is output from the comparator 2 and input to the cache controller 15. The cache controller 15 receives the hit information 106 and generates and outputs the control signal 110.
Data memory unit 8 and external bus interface 16
Is input to In the data memory unit 8, when the control signal 110 is input, the data on the internal data bus 103 is stored in the block designated by the address information input from the CPU 12 (step 9).
7). And at that time, the external bus interface 1
6 is controlled by the control signal 110 input from the cache controller 1 and is separated from the external address bus 112 and the external data bus 113.

【0008】次に、ライトバック方式によるデータ書込
み時において、書換えの対象となるデータのアドレスが
タグメモリ部9に存在しない場合においては、前記ステ
ップ91のアドレス情報の入力に続いて、前記ステップ
92においては、比較器2による、タグメモリ部9内の
対応するアドレス情報と、CPU12から出力されるア
ドレス情報との比較照合結果は不一致となり、書換え対
象のデータが、データメモリ部8内に存在しないことに
なる。次いで、タグメモリ部9における置換えの対象と
なるブロックのダーティビットがセットされているか否
かの判定が行われる(ステップ93)。ステップ93に
おいて、ダーティビットがセットされている場合は、デ
ータメモリ部8の内容と主メモリ13の内容とが不一致
(ミスヒット)であるという状態を示しており、外部イ
ンターフェ−ス16を介して、置換えの対象となるブロ
ックが書換えられているか否かが判定される(ステップ
94)。ステップ94において、置換えの対象となるブ
ロックが書換えられている場合には、外部バスインター
フェ−ス16を介して、置換えの対象となるブロック
が、データメモリ部8から主メモリ13に書込まれ(ス
テップ95)、その後に、外部バスインターフェ−ス1
6を介して、主メモリ13から、ミスヒットしたアドレ
スデータが含まれているブロックが読出されて、データ
メモリ部8に格納される。そして同時に、タグメモリ部
9の書換えが行われて更新され、該当ブロックのダーテ
ィ−ビットがリセットされる(ステップ96)。その
後、データメモリ部9に該当データの書込みが行われて
処理は終了する。また、ステップ93においてダーティ
ビットがセットされていない場合には、データメモリ部
8の内容と主メモリ13の内容とが一致している状態を
示しており、これにより、該当ブロックを主メモリ13
に書込むことなく、ステップ96において、外部インタ
ーフェ−ス16を介して、主メモリ13からアドレスデ
ータに含まれるブロックの読出しが行われて、デ−タメ
モリ部8に上書きされる。同時に、タグメモリ部9の書
換えが行われて更新され、データメモリ部8に該当デー
タの書込みが行われて処理は終了する。なお、ステップ
94において、置換えの対象となるブロックが書換えら
れていない場合においても、ステップ96に移行して上
述の処理が行われる。
Next, at the time of writing data by the write-back method, if the address of the data to be rewritten does not exist in the tag memory section 9, following the input of the address information in the step 91, the step 92 is followed. In the above, the comparison and comparison result by the comparator 2 between the corresponding address information in the tag memory unit 9 and the address information output from the CPU 12 does not match, and the rewriting target data does not exist in the data memory unit 8. It will be. Then, it is determined whether or not the dirty bit of the block to be replaced in the tag memory unit 9 is set (step 93). If the dirty bit is set in step 93, it indicates that the contents of the data memory unit 8 and the contents of the main memory 13 do not match (miss hit), and the external interface 16 is used. Thus, it is determined whether the block to be replaced has been rewritten (step 94). In step 94, if the block to be replaced has been rewritten, the block to be replaced is written from the data memory unit 8 to the main memory 13 via the external bus interface 16. (Step 95), and then the external bus interface 1
The block containing the mishit address data is read from the main memory 13 via 6 and stored in the data memory unit 8. At the same time, the tag memory unit 9 is rewritten and updated, and the dirty bit of the corresponding block is reset (step 96). After that, the corresponding data is written in the data memory unit 9 and the process ends. Further, when the dirty bit is not set in step 93, the contents of the data memory unit 8 and the contents of the main memory 13 match each other.
In step 96, the block included in the address data is read from the main memory 13 without overwriting the data in the data memory unit 8 without overwriting the data in the data memory unit 8. At the same time, the tag memory unit 9 is rewritten and updated, the corresponding data is written in the data memory unit 8, and the process ends. Even if the block to be replaced has not been rewritten in step 94, the process shifts to step 96 and the above processing is performed.

【0009】またライトスルー方式の場合は、書込み時
にデータメモリ部9と同時に、主メモリ13に対しても
データの書込みを行うことにより、データメモリ部8と
主メモリ13の内容の不一致が生じないことを特徴とし
ている方式であり、従って、ライトバック方式に対比し
て、ダーティービットの判定と、その時のブロックの置
換えが不要となる方式である。このライトスルー方式の
1つの方式として、FIFOにより構成されるライトバ
ッファを用いて、書込み時には、主メモリと当該メモリ
のライトバッファにデータを書込み、ライトバッファに
おいては、外部バスの空いている時間を見計らって主メ
モリ13にデータを書込むことにより、当該主メモリ1
3に対する書込みのオーバーヘッドを低減することがで
きるというデータキャッシュメモリシステムも一般には
知られている。
In the case of the write-through method, data is written to the main memory 13 at the same time as the data memory section 9 at the time of writing, so that the contents of the data memory section 8 and the main memory 13 do not become inconsistent. Therefore, in contrast to the write-back method, it is a method that does not require dirty bit determination and block replacement at that time. As one of the write-through methods, a write buffer composed of a FIFO is used to write data to the main memory and the write buffer of the memory at the time of writing, and the free time of the external bus is kept at the write buffer. By writing the data to the main memory 13 when it is checked,
A data cache memory system that can reduce the overhead of writing to 3 is also generally known.

【0010】[0010]

【発明が解決しようとする課題】上述した従来のデータ
キャッシュメモリシステムにおいては、ライトバック・
キャッシュの場合において、キャッシュのミスヒット時
にダーティービットがセットされている状態において
は、当該ブロックの主メモリに対する書込みを行うこと
が必要不可欠の条件となり、キャッシュミスの度数が多
くなる場合には、この主メモリに対する書込みに要する
消費時間が無視できない程に増大し、データキャッシュ
メモリシステムの処理速度向上に対する障害要因になる
という欠点がある。
In the conventional data cache memory system described above, write back
In the case of a cache, when the dirty bit is set at the time of a cache miss hit, writing to the main memory of the block is an indispensable condition, and if the frequency of cache miss increases, this There is a drawback in that the consumption time required for writing to the main memory increases to a non-negligible level, which becomes an obstacle to improving the processing speed of the data cache memory system.

【0011】また、ライトバッファを用いるライトスル
ー方式の従来のデータキャッシュメモリシステムにおい
ては、データキャッシュからCPUに対する読出し時の
キャッシュミスにより、主メモリからキャッシュに読出
されるブロック内に、ライトバッファ内の値により先に
変更されるべきデータが含まれている場合には、キャッ
シュメモリの内容と主メモリの内容との間に不一致が生
じる状態となる。この不一致の問題に対しては、従来
は、ライトバッファの内容を全て主メモリに書込むこと
により始末しているが、この方法による場合には、主メ
モリに書込むことによるオーバーヘッドが増大するとい
う欠点がある。
In the conventional write-through type data cache memory system using the write buffer, a cache miss at the time of reading from the data cache to the CPU causes a cache miss in the block read from the main memory to the cache. When the value includes data that should be changed first, a mismatch occurs between the contents of the cache memory and the contents of the main memory. The problem of this inconsistency has conventionally been dealt with by writing the entire contents of the write buffer to the main memory, but in the case of this method, the overhead due to writing to the main memory increases. There are drawbacks.

【0012】[0012]

【課題を解決するための手段】第1の発明のデータキャ
ッシュメモリシステムは、中央処理装置および主メモリ
と、当該主メモリに代わって前記中央処理装置との間の
オペランドデータの授受を高速に行うデータキャッシュ
メモリと、キャッシュヒット時に前記中央処理装置によ
る前記データキャッシュメモリに対するアクセス動作に
並行して、ライトバック動作を行うために前記主メモリ
に対する書込み動作制御を行うキャッシュコントローラ
と、前記主メモリと、前記中央処理装置、前記データキ
ャッシュメモリおよび前記キャッシュコントローラとの
間に接続される外部インターフェ−スと、を備えて構成
されるデータキャッシュメモリシステムにおいて、前記
データキャッシュメモリが、所定のタグ情報を格納する
タグメモリ部と、前記中央処理装置のアドレス指定を受
けるポートおよびライトバック動作のアドレス指定を受
けるポートを含むデュアルポートRAMにより形成され
るデータメモリ部と、前記中央処理装置のアドレス情報
と前記タグメモリ部のタグ情報とを比較照合して、当該
両情報の一致・不一致を検出する比較器と、を少なくと
も備えて構成され、前記キャッシュコントローラが、前
記比較器より出力されるヒット情報の入力を受けて、前
記データキャッシュメモリに含まれる前記データメモリ
部に対応して、前記アドレス情報に基づく該当デ−タの
読出し動作/書込み動作を制御する信号を出力するヒッ
トコントローラと、前記タグメモリ部内にダーテーィビ
ットが存在するか否かをサーチし、当該タグメモリ部に
書換えられたデータが存在する場合に、該当データの存
在するブロックを、前記主メモリ内に格納するための制
御信号を出力するキャッシュライターと、前記中央処理
装置より出力されるR/W信号の入力を受けて、所定の
内部アドレスバスと所定のライトバックアドレスバスと
を同一ブロックを示すように作用するバスアービタと、
を少なくとも備えて構成されることを特徴としている。
In the data cache memory system of the first invention, operand data is exchanged at high speed between a central processing unit and a main memory, and the central processing unit instead of the main memory. A data cache memory, a cache controller that controls a write operation to the main memory to perform a write-back operation in parallel with an access operation to the data cache memory by the central processing unit at the time of a cache hit, and the main memory, In a data cache memory system comprising an external interface connected between the central processing unit, the data cache memory and the cache controller, the data cache memory stores predetermined tag information. A tag memory unit for storing, A data memory unit formed by a dual port RAM including a port for receiving the address of the central processing unit and a port for receiving the address of the write-back operation, the address information of the central processing unit and the tag information of the tag memory unit. And a comparator for detecting a match / mismatch between the two pieces of information, the cache controller receiving the hit information output from the comparator and receiving the data cache. Corresponding to the data memory unit included in the memory, there is a hit controller for outputting a signal for controlling the read / write operation of the corresponding data based on the address information, and a dirty bit exists in the tag memory unit. If there is rewritten data in the relevant tag memory section A predetermined internal address bus, which receives a cache writer for outputting a control signal for storing the block in which the corresponding data exists in the main memory and an R / W signal output from the central processing unit. And a bus arbiter that acts to indicate the same block with a given write-back address bus,
Is provided at least.

【0013】また、第2の発明のデータキャッシュメモ
リシステムは、中央処理装置および主メモリと、当該主
メモリに代わって前記中央処理装置との間のオペランド
データの授受を高速に行うデータキャッシュメモリと、
キャッシュヒット時に前記中央処理装置による前記デー
タキャッシュメモリに対するアクセス動作に並行して、
ライトバック動作を行うために前記主メモリに対する書
込み動作制御を行うキャッシュコントローラと、前記主
メモリと、前記中央処理装置、前記データキャッシュメ
モリおよび前記キャッシュコントローラとの間に接続さ
れる外部インターフェ−スと、を備えて構成されるデー
タキャッシュメモリシステムにおいて、前記データキャ
ッシュメモリが、所定のタグ情報を格納するタグメモリ
部と、前記中央処理装置のアドレス指定を受けるポート
およびライトバック動作のアドレス指定を受けるポート
を含むデュアルポートRAMにより形成されるデータメ
モリ部と、前記中央処理装置のアドレス情報と前記タグ
メモリ部のタグ情報とを比較照合して、当該両情報の一
致・不一致を検出する比較器と、を少なくとも備えて構
成され、前記キャッシュコントローラが、前記比較器よ
り出力されるヒット情報の入力を受けて、前記データキ
ャッシュメモリに含まれる前記データメモリ部に対応し
て、前記アドレス情報に基づく該当デ−タの読出し動作
/書込み動作を制御する信号を出力するヒットコントロ
ーラと、前記中央処理装置による書込み動作時に、当該
中央処理装置より出力されるアドレス情報を入力して保
持し、キャッシュヒットに対応して、該当データの存在
するブロックを、前記主メモリ内に格納するための制御
信号を出力するライトアドレスバッファと、前記中央処
理装置より出力されるR/W信号の入力を受けて、所定
の内部アドレスバスと所定のライトバックアドレスバス
とを同一ブロックを示すように作用するバスアービタ
と、を少なくとも備えて構成されることを特徴としてい
る。
A data cache memory system according to a second aspect of the present invention includes a central processing unit and a main memory, and a data cache memory which, in place of the main memory, exchanges operand data with the central processing unit at high speed. ,
At the time of a cache hit, in parallel with the access operation to the data cache memory by the central processing unit,
An external interface connected between the cache controller that controls write operations to the main memory to perform a write-back operation, the main memory, the central processing unit, the data cache memory, and the cache controller. In a data cache memory system including: a data cache memory, a tag memory unit for storing predetermined tag information, a port for receiving addressing of the central processing unit, and addressing for write-back operation. A comparator for comparing and collating the address information of the central processing unit and the tag information of the tag memory unit with a data memory unit formed by a dual port RAM including a receiving port, and detecting a match / mismatch between the both information. And at least The cache controller receives the hit information output from the comparator and, in response to the data memory unit included in the data cache memory, a read operation / write operation of corresponding data based on the address information. And a hit controller that outputs a signal for controlling the address, and the address information output from the central processing unit during the write operation by the central processing unit is input and held, and in response to the cache hit, the block in which the corresponding data exists A write address buffer for outputting a control signal for storing in the main memory, and an input of an R / W signal output from the central processing unit, and a predetermined internal address bus and a predetermined write back address. A bus arbiter that acts to indicate the same block as the bus. It is characterized in.

【0014】[0014]

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

【0015】図1は本発明の第1の実施形態を示すブロ
ック図である。図1に示されるように、本実施形態は、
内部アドレスバス102、内部データバス103、ライ
トバックアドレスバス109、ライトバックデータバス
111、外部アドレスバス112および外部データバス
113に対応して、CPU12と、主メモリ13と、キ
ャッシュライター1と、比較器2と、ヒットコントロー
ラ3と、入力制御回路4および7と、データ入出力制御
回路5と、バスアービタ6と、デュアルポートRAMに
より形成されるデータメモリ部8と、タグメモリ部9
と、外部アドレスバスインターフェ−ス10と、外部デ
ータバスインターフェ−ス11とを備えて構成される。
なお、本実施形態においては、ヒットコントローラ3と
キャッシュライター1とは、それぞれ個々に独立して他
のブロックを制御するように動作することが前提条件と
なっており、図3および図4に示されるのは、当該キャ
ッシュコントローラ3の制御による動作フローチャート
であり、図5に示されるのは、当該キャッシュライター
1の制御による動作フローチャートである。
FIG. 1 is a block diagram showing a first embodiment of the present invention. As shown in FIG.
The internal address bus 102, internal data bus 103, write back address bus 109, write back data bus 111, external address bus 112, and external data bus 113 are compared and the CPU 12, main memory 13, and cache writer 1 are compared. Device 2, hit controller 3, input control circuits 4 and 7, data input / output control circuit 5, bus arbiter 6, data memory unit 8 formed by a dual port RAM, and tag memory unit 9
And an external address bus interface 10 and an external data bus interface 11.
In the present embodiment, the hit controller 3 and the cache writer 1 are assumed to operate independently to control other blocks, respectively, and are shown in FIGS. 3 and 4. What is shown is an operation flowchart under the control of the cache controller 3, and FIG. 5 is an operation flowchart under the control of the cache writer 1.

【0016】図1において、始めに、ヒットコントロー
ラ3に関連する動作について説明する。CPU12から
データメモリ部8に対応する読出し動作として、始め
に、CPU12から出力されるアドレス情報が、内部ア
ドレスバス102を介して比較器2およびタグメモリ部
9に入力される(ステップ31:図3)。比較器2にお
いては、タグメモリ部9内の対応するアドレス情報が、
CPU12から出力されるアドレス情報と一致している
か否かが比較照合される(ステップ32:図3)。ステ
ップ32において、両情報が一致するキャッシュヒット
の場合には、比較器2よりヒット情報106が出力され
て、ヒットコントローラ3に入力される。ヒットコント
ローラ3においては、ヒット情報106の入力を受けて
コントロール信号108が生成されて出力され、入力制
御回路4およびデータ入出力制御回路5に送出される。
そして、このコントロール信号108の入力を受けた入
力制御回路4およびデータ入出力制御回路5の制御作用
により、前記アドレス情報に対応する該当データがデー
タメモリ部8より読出されて、内部データバス103上
に出力されて、データ読出し処理が終了する(ステップ
34:図3)。また、前記ステップ32において、タグ
メモリ部9内のアドレス情報が、CPU12から出力さ
れるアドレス情報と一致しないミスヒットの場合には、
タグメモリ部9およびデータメモリ部8の内容を考慮す
ることなく、該当ブロックが、主メモリ13から外部デ
ータバス113、外部データバスインターフェ−ス11
および内部データバス103を介して読出されて、デー
タメモリ部8に格納されるとともにタグメモリ部9の更
新が行われ(ステップ33:図3)、その後において、
データメモリ部8より、前記該当データが内部データバ
ス103上に出力される(ステップ34:図3)。
Referring first to FIG. 1, the operation associated with the hit controller 3 will be described. As a read operation corresponding to the data memory unit 8 from the CPU 12, first, address information output from the CPU 12 is input to the comparator 2 and the tag memory unit 9 via the internal address bus 102 (step 31: FIG. 3). ). In the comparator 2, the corresponding address information in the tag memory unit 9 is
The address information output from the CPU 12 is compared and collated (step 32: FIG. 3). In step 32, in the case of a cache hit in which both pieces of information match, hit information 106 is output from the comparator 2 and input to the hit controller 3. The hit controller 3 receives the input of the hit information 106 and generates and outputs the control signal 108, which is sent to the input control circuit 4 and the data input / output control circuit 5.
Then, by the control action of the input control circuit 4 and the data input / output control circuit 5 which have received the input of the control signal 108, the corresponding data corresponding to the address information is read from the data memory unit 8 and the data on the internal data bus 103 And the data reading process ends (step 34: FIG. 3). When the address information in the tag memory unit 9 is a mishit which does not match the address information output from the CPU 12 in step 32,
Without considering the contents of the tag memory unit 9 and the data memory unit 8, the corresponding block is transferred from the main memory 13 to the external data bus 113 and the external data bus interface 11.
And is read via the internal data bus 103 to be stored in the data memory unit 8 and the tag memory unit 9 is updated (step 33: FIG. 3).
The corresponding data is output from the data memory unit 8 onto the internal data bus 103 (step 34: FIG. 3).

【0017】また、CPU12から、データメモリ部8
に対応する書込み動作の場合においても、上述の読出し
の場合と略々同様に動作が行われる。即ち、まずCPU
12から出力されるアドレス情報が、内部アドレスバス
102を介して比較器2およびタグメモリ部9に入力さ
れる(ステップ41:図4)。タグメモリ部9からは該
当するタグ情報が読出されて、内部アドレスバス102
と並列に比較器2に入力され、前記アドレス情報と前記
タグ情報との比較照合が行われて(ステップ42:図
4)、両情報が一致する場合には、ヒット情報106が
出力されてヒットコントローラ3に入力される。ヒット
コントローラ3からはコントロール信号108が出力さ
れ、入力制御回路4およびデータ入出力制御回路5に入
力される。そして、この制御信号108による入力制御
回路4およびデータ入出力制御回路5の制御作用を介し
て、内部データバス103上の前記アドレス情報に対応
する該当データがデータメモリ部8に取込まれる(ステ
ップ44:図4)。また、比較器2において前記両情報
が不一致のミスヒットの場合には、タグメモリ部9およ
びデータメモリ部8の内容を考慮することなく、該当ブ
ロックが、主メモリ13から、外部データバス113、
外部データバスインターフェ−ス11および内部データ
バス103を介して読出されて、データメモリ部8に格
納されるとともにタグメモリ部9の更新が行われ(ステ
ップ43:図4)、その後において、データメモリ部8
に対する前記該当データの書込みが行われる(ステップ
44:図4)。
Further, from the CPU 12 to the data memory unit 8
In the case of the write operation corresponding to, the operation is performed in substantially the same manner as in the case of the above read. That is, first the CPU
The address information output from 12 is input to the comparator 2 and the tag memory unit 9 via the internal address bus 102 (step 41: FIG. 4). The corresponding tag information is read from the tag memory unit 9 and the internal address bus 102 is read.
Is input in parallel to the comparator 2, the address information and the tag information are compared and collated (step 42: FIG. 4), and when the both information match, the hit information 106 is output and hit. It is input to the controller 3. The control signal 108 is output from the hit controller 3 and input to the input control circuit 4 and the data input / output control circuit 5. Then, the corresponding data corresponding to the address information on the internal data bus 103 is taken into the data memory section 8 through the control action of the input control circuit 4 and the data input / output control circuit 5 by the control signal 108 (step 44: FIG. 4). In the case where the comparator 2 is a mis-hit in which the two pieces of information do not match, the corresponding block is transferred from the main memory 13 to the external data bus 113 without considering the contents of the tag memory unit 9 and the data memory unit 8.
The data is read out via the external data bus interface 11 and the internal data bus 103, stored in the data memory unit 8 and the tag memory unit 9 is updated (step 43: FIG. 4). Memory section 8
The corresponding data is written to (step 44: FIG. 4).

【0018】以上が、第1の実施形態におけるヒットコ
ントローラ3に関連する動作説明である。次に、本実施
形態におけるキャッシュライター1に関する動作につい
て説明する。
The above is the description of the operation related to the hit controller 3 in the first embodiment. Next, the operation of the cache writer 1 according to this embodiment will be described.

【0019】図1において、キャッシュライター1の動
作は、ヒットコントローラ3の動作とは独立する状態に
おいて行われる。まずキャッシュライター1により、タ
グメモリ部9内のダーティ−ビットのサーチが行われる
(ステップ51:図5)。次いで、ステップ51のサー
チを通じて、書換えられたデータがあるか否かが判定さ
れて(ステップ52:図5)、書換えられたデータがあ
る場合には、該当データが存在するブロックを主メモリ
13に書込む動作に移行し、書換えられたデータがない
場合には再度ステップ51に戻り、タグメモリ部9内の
ダーティ−ビットのサーチが行われる。ステップ52に
おいて書換えられたデータがあり、該当データが存在す
るブロックを主メモリ13に書込む際には、ヒットコン
トローラ3に対して、キャッシュのヒット中であるか否
かの問合わせが行われる(ステップ53:図5)。ステ
ップ53においてキャッシュのヒット中でない場合には
待機状態におかれ(ステップ56:図5)、その後にお
いて再度ステップ50に戻る。またステップ53におい
てキャッシュのヒット中である場合には、内部アドレス
バス102とライトバック・アドレスバス109が重複
しているか否かの判定が行われて(ステップ54:図
5)、重複していない場合には、キャッシュライター1
より出力されるコントロール信号110が、データメモ
リ部8、外部アドレスバスインターフェ−ス10および
外部データバスインターフェ−ス11に送出され、これ
らの外部アドレスバスインターフェ−ス10および外部
データバスインターフェ−ス11の動作により、ライト
バックデータバス111および外部データバス113
と、ライトバックアドレスバス109および外部アドレ
スバス112を介して、該当データの主ブロック13に
対する書込みが行われる(ステップ57:図5)。その
際、CPU12より出力されるR/W信号101が入力
されるバスアービタ6により、内部アドレスバス102
とライトバックアドレスバス109は同一のブロック状
態であることが示されるとともに、且つCPU12によ
り書込み動作が行われている際には、当該CPU12に
よる書込み動作が終了するまで、CPU12の動作を優
先して実行させるという調停動作が行われる。なお、前
記ステップ54において、内部アドレスバス102とラ
イトバック・アドレスバス109が重複している場合に
は、内部アドレスバス102が優先されて(ステップ5
5:図5)、ステップ56を経由して再度ステップ53
に戻る。
In FIG. 1, the operation of the cache writer 1 is performed independently of the operation of the hit controller 3. First, the cache writer 1 searches for dirty bits in the tag memory unit 9 (step 51: FIG. 5). Then, through the search in step 51, it is judged whether or not there is rewritten data (step 52: FIG. 5). If there is rewritten data, the block in which the corresponding data exists is stored in the main memory 13. The operation shifts to the writing operation, and when there is no rewritten data, the process returns to step 51 again, and the dirty bit in the tag memory unit 9 is searched. When there is data rewritten in step 52 and the block in which the data exists is written in the main memory 13, the hit controller 3 is inquired whether or not the cache is hit ( Step 53: FIG. 5). If the cache is not hit in step 53, it is placed in a standby state (step 56: FIG. 5), after which the process returns to step 50 again. If the cache is hit in step 53, it is judged whether the internal address bus 102 and the write-back address bus 109 are overlapped (step 54: FIG. 5), and it is not overlapped. In the case of cash writer 1
The control signal 110 output from the external address bus interface 10 and the external data bus interface 11 is sent to the data memory unit 8, the external address bus interface 10 and the external data bus interface 11. The write-back data bus 111 and the external data bus 113 are operated by the operation of the face 11.
Then, the corresponding data is written to the main block 13 via the write-back address bus 109 and the external address bus 112 (step 57: FIG. 5). At this time, the R / W signal 101 output from the CPU 12 is input to the internal address bus 102 by the bus arbiter 6.
And the write-back address bus 109 are shown to be in the same block state, and when a write operation is being performed by the CPU 12, the operation of the CPU 12 is prioritized until the write operation by the CPU 12 is completed. An arbitration operation of executing the operation is performed. In step 54, if the internal address bus 102 and the write-back address bus 109 overlap, the internal address bus 102 is given priority (step 5).
5: FIG. 5), step 53 again via step 56
Return to

【0020】次に、本発明の第2の実施形態について説
明する。
Next, a second embodiment of the present invention will be described.

【0021】図2は本発明の第2の実施形態を示すブロ
ック図である。図2に示されるように、本実施形態は、
内部アドレスバス102、内部データバス103、ライ
トバックアドレスバス109、ライトバックデータバス
111、外部アドレスバス112および外部データバス
113に対応して、CPU12と、主メモリ13と、キ
ャッシュライター1と、比較器2と、ヒットコントロー
ラ3と、入力制御回路4および7と、データ入出力制御
回路5と、バスアービタ6と、デュアルポートRAMに
より形成されるデータメモリ部8と、タグメモリ部9
と、ライトアドレスバッファ14と、外部アドレスバス
インターフェ−ス10と、外部データバスインターフェ
−ス11とを備えて構成される。
FIG. 2 is a block diagram showing a second embodiment of the present invention. As shown in FIG. 2, this embodiment is
The internal address bus 102, internal data bus 103, write back address bus 109, write back data bus 111, external address bus 112, and external data bus 113 are compared and the CPU 12, main memory 13, and cache writer 1 are compared. Device 2, hit controller 3, input control circuits 4 and 7, data input / output control circuit 5, bus arbiter 6, data memory unit 8 formed by a dual port RAM, and tag memory unit 9
A write address buffer 14, an external address bus interface 10 and an external data bus interface 11.

【0022】なお、本実施形態の第1の実施形態と異な
る点は、非同期書込みのためのアドレス情報が、FIF
Oにより構成されるライトアドレスバッファ14に格納
されていることである。このライトアドレスバッファ1
4においては、CPU12より内部アドレスバス102
を介して出力されるアドレス情報と、同じくCPU12
より出力されるR/W信号101の入力を受けて、これ
らのアドレス情報およびR/W信号101は常時監視さ
れる状態にあり、CPU12による書込みが行われた際
には、当該アドレス情報はライトアドレスバッファ14
に一旦保持される。一方において、書込み動作時におい
ては、ヒットコントローラ3より出力されるコントロー
ル信号107の入力を受けて、現時点のキャッシュの状
態が認識され、キャッシュヒットしている間に、ライト
アドレスバッファ14に保持されているアドレス情報が
ライトアドレスバス109に出力され、入力制御回路7
および外部アドレスバスインターフェ−ス10に入力さ
れる。これにより、データメモリ部8内の該当アドレス
のデータが取出されて、データ入出力制御回路5、外部
データバスインターフェ−ス11および外部データバス
113を介して主メモリ13の対応アドレスに書込まれ
る。
Note that the difference from the first embodiment of the present embodiment is that the address information for asynchronous writing is FIF.
It is stored in the write address buffer 14 constituted by O. This write address buffer 1
4, the internal address bus 102 from the CPU 12
Address information output via the
The address information and the R / W signal 101 are constantly monitored in response to the input of the R / W signal 101 output by the CPU 12. When the CPU 12 writes the address information, the address information is written. Address buffer 14
Once held. On the other hand, in the write operation, the control signal 107 output from the hit controller 3 is received, the current cache state is recognized, and the cache address is held in the write address buffer 14 during the cache hit. Address information is output to the write address bus 109, and the input control circuit 7
And to the external address bus interface 10. As a result, the data at the corresponding address in the data memory unit 8 is taken out and written to the corresponding address in the main memory 13 via the data input / output control circuit 5, the external data bus interface 11 and the external data bus 113. Be done.

【0023】図3および図4は、本実施形態におけるヒ
ットコントローラ3による制御作用の手順を示す動作フ
ローチャートであるが、キャッシュの読出し動作および
書込み動作の内容については、前述の第1の実施形態の
場合と同様であり、その説明は重複するため省略する。
以下においては、本実施形態の特徴であるライトアドレ
スバッファ14の動作について、図6の動作フローチャ
ートを参照して説明する。
FIGS. 3 and 4 are operation flowcharts showing the procedure of the control operation by the hit controller 3 in this embodiment. The contents of the cache read operation and the cache write operation are the same as those in the first embodiment described above. This is similar to the case, and the description thereof will be omitted because it is redundant.
The operation of the write address buffer 14, which is a feature of this embodiment, will be described below with reference to the operation flowchart of FIG.

【0024】まず、上述のように、内部アドレスバス1
02およびR/W信号101は、常時ライトアドレスバ
ッファ14により監視されており、CPU12による書
込み動作が発生すると(ステップ61:図6)、当該ア
ドレス情報はライトアドレスバッファ14に保持される
(ステップ62:図6)。一方、CPU12による書込
み動作は、ライトアドレスバッファ14に、当該アデレ
ス情報が保持された時点より開始される。そこで、まず
ライトアドレスバッファ14のFIFOに、当該アドレ
ス情報が保持されているか否か判定される(ステップ6
3:図6)。ステップ63において当該アドレス情報が
保持されていない場合には、再度ステップ63に戻る。
またステップ63において当該アドレス情報が保持され
ている場合には、ライトアドレスバッファ14により、
ヒットコントローラ3に対して、キャッシュのヒット中
であるか否かの問合わせが行われて(ステップ64:図
6)、ヒット中でない場合には待機状態におかれ(ステ
ップ67:図6)、その後に再度ステップ64に戻る。
ステップ64において、問合わせ結果がキャッシュのヒ
ット中である場合には、内部アドレスバス102とライ
トバック・アドレスバス109が重複しているか否かの
判定が行われて(ステップ65:図6)、重複していな
い場合には、外部アドレスバス112および外部データ
バス113が双方共に空いている状態にあるため、ライ
トアドレスバッファ14より出力されるコントロール信
号110による制御作用により、外部アドレスバスイン
ターフェ−ス10および外部データバスインターフェ−
ス11と、外部アドレスバス112および外部データバ
ス113を介して、ライトアドレスバッファ14のFI
FOより出力されるアドレス情報を基にして、該当ブロ
ックの主メモリ13に対する書込みが行われる(ステッ
プ68:図6)。その際、CPU12より出力されるR
/W信号101が入力されるバスアービタ6により、内
部アドレスバス102とライトバックアドレスバス10
9は同一のブロック状態であることが示されるととも
に、且つCPU12により書込み動作が行われている際
には、当該CPU12による書込み動作が終了するま
で、CPU12の動作を優先して実行させるという調停
動作が行われる。なお、前記ステップ65において、内
部アドレスバス102とライトバック・アドレスバス1
09が重複している場合には、内部アドレスバス102
が優先されて(ステップ66:図6)、ステップ67を
経由して再度ステップ64に戻る。
First, as described above, the internal address bus 1
02 and the R / W signal 101 are constantly monitored by the write address buffer 14, and when the write operation by the CPU 12 occurs (step 61: FIG. 6), the address information is held in the write address buffer 14 (step 62). : FIG. 6). On the other hand, the write operation by the CPU 12 is started when the write address buffer 14 holds the address information. Therefore, it is first determined whether or not the address information is held in the FIFO of the write address buffer 14 (step 6).
3: FIG. 6). If the address information is not held in step 63, the process returns to step 63 again.
If the address information is held in step 63, the write address buffer 14
The hit controller 3 is inquired as to whether or not the cache is hit (step 64: FIG. 6), and if it is not hit, it is placed in a standby state (step 67: FIG. 6). Then, the process returns to step 64 again.
If the inquiry result indicates that the cache is hit in step 64, it is determined whether the internal address bus 102 and the write-back address bus 109 overlap (step 65: FIG. 6). If they do not overlap, both the external address bus 112 and the external data bus 113 are in an empty state, so that the external address bus interface is controlled by the control signal 110 output from the write address buffer 14. 10 and external data bus interface
FI of the write address buffer 14 via the external address bus 112 and the external data bus 113.
Based on the address information output from the FO, the corresponding block is written into the main memory 13 (step 68: FIG. 6). At that time, R output from the CPU 12
The bus arbiter 6 to which the / W signal 101 is input allows the internal address bus 102 and the write-back address bus 10
9 indicates the same block state, and when a write operation is being performed by the CPU 12, an arbitration operation of preferentially executing the operation of the CPU 12 until the write operation by the CPU 12 is completed. Is done. In step 65, the internal address bus 102 and the write-back address bus 1
09 are duplicated, the internal address bus 102
Is prioritized (step 66: FIG. 6), and the process returns to step 64 again via step 67.

【0025】即ち、本発明においては、デ−タメモリ部
8としてデュアルポートRAMを用いることに1つの特
徴があり、これにより、CPUからデータキャッシュメ
モリに対するアクセスとは非同期に、ライトバック動作
を行うことが可能となる。
That is, one feature of the present invention is that the dual port RAM is used as the data memory unit 8, whereby the write back operation is performed asynchronously with the access from the CPU to the data cache memory. Is possible.

【0026】[0026]

【発明の効果】以上説明したように、本発明は、データ
キャッシュを構成するデータメモリ部にデュアルポート
RAMを用い、CPUからのデータキャッシュメモリに
対するアクセスと非同期にライトバック動作を行うこと
を可能としたことにより、以下に示される効果がある。 (1)リライトバックキャッシュの場合に、キャッシュ
のミスヒット時にダーティ−フラグがセットされている
状態においては、従来は、当該ブロックを主メモリに書
込むことが必要条件となっており、キャッシュミスヒッ
トが多くなるに伴ない、当該書込みに要する時間が無視
できなくなって高速性が損われるのに対比して、本発明
においては、キャッシュミス時における主メモリに対す
る書込み動作が不要となり、データキャッシュメモリシ
ステムの高速性を有効に維持することができるという効
果がある。 (2)ライトバッファを用いたライトスルー方式におい
ては、読出し時におけるキャッシュミスの場合に、主メ
モリからキャッシュに読出されるブロックの中に、ライ
トバッファ内の値により、先に変更されるべきデータが
含まれている場合には、キャッシュメモリの内容と主メ
モリの内容との間に不一致を生じることがあるが、本発
明においては、CPUからキャッシュメモリに対する書
込みの時点から、キャッシュメモリがら主メモリに対す
る書込みの時点に移行するタイミングが短縮されるため
に、従来のように、バッファの内容を全て主メモリに書
込むというオーバーヘッドの大きい方法を採ることなし
に、上記不一致が排除されるという効果がある。 (3)本発明により、キャッシュメモリと主メモリとの
間の整合性が向上されるために、従来のデータキャッシ
ュメモリシステムに対比して、タスクスイッチの高速化
およびシステムダウン時のチェック等が容易となり、ま
た、マルチプロセッサのシステムにおけるキャッシュコ
ヒーレンシの制御が容易になるという効果がある。
As described above, according to the present invention, the dual port RAM is used for the data memory portion forming the data cache, and the write back operation can be performed asynchronously with the access to the data cache memory from the CPU. By doing so, there are the following effects. (1) In the case of the rewrite back cache, in the state where the dirty flag is set at the time of a cache miss, conventionally, it is a necessary condition to write the block in the main memory, and a cache miss hit occurs. In contrast to the increase in the number of times, the time required for the write cannot be ignored and the high speed is impaired. In contrast, in the present invention, the write operation to the main memory at the time of a cache miss becomes unnecessary, and the data cache memory system There is an effect that the high speed can be effectively maintained. (2) In the write-through method using the write buffer, in the case of a cache miss at the time of reading, in the block read from the main memory to the cache, the data to be changed first by the value in the write buffer. , The contents of the cache memory and the contents of the main memory may be inconsistent. However, in the present invention, from the time when the CPU writes to the cache memory, the contents of the main memory Since the timing of shifting to the time of writing to is shortened, the effect of eliminating the above-mentioned inconsistency can be achieved without adopting the conventional overhead method of writing the entire contents of the buffer in the main memory. is there. (3) According to the present invention, the consistency between the cache memory and the main memory is improved, so that the task switch can be speeded up and the system down can be checked easily as compared with the conventional data cache memory system. In addition, there is an effect that control of cache coherency in a multiprocessor system becomes easy.

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

【図1】本発明の第1の実施形態を示すブロック図であ
る。
FIG. 1 is a block diagram showing a first embodiment of the present invention.

【図2】本発明の第2の実施形態を示すブロック図であ
る。
FIG. 2 is a block diagram showing a second embodiment of the present invention.

【図3】第1および第2の実施形態における読出し動作
のフローチャートである。
FIG. 3 is a flowchart of a read operation in the first and second embodiments.

【図4】第1および第2の実施形態における書込み動作
のフローチャートである。
FIG. 4 is a flowchart of a write operation in the first and second embodiments.

【図5】第1の実施形態のキャッシュライターの動作を
示すフローチャートである。
FIG. 5 is a flowchart showing an operation of the cache writer of the first embodiment.

【図6】第2の実施形態のライトアドレスバッファの動
作を示すフローチャートである。
FIG. 6 is a flowchart showing an operation of a write address buffer of the second embodiment.

【図7】従来例を示すブロック図である。FIG. 7 is a block diagram showing a conventional example.

【図8】従来例における読出し動作のフローチャートで
ある。
FIG. 8 is a flowchart of a read operation in a conventional example.

【図9】従来例における書込み動作のフローチャートで
ある。
FIG. 9 is a flowchart of a write operation in a conventional example.

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

1 キャッシュライター 2 比較器 3 ヒットコントローラ 4 入力制御回路 5 データ入出力制御回路 6 バスアービタ 7 入力制御回路 8 データメモリ部 9 タグメモリ部 10 外部アドレスバスインターフェ−ス 11 外部データバスインターフェ−ス 12 CPU 13 主メモリ 14 ライトアドレスバッファ 15 キャッシュコントローラ 16 外部バスインターフェ−ス 31〜34、41〜44、51〜57、61〜68、8
1〜87、91〜97ステップ
1 cache writer 2 comparator 3 hit controller 4 input control circuit 5 data input / output control circuit 6 bus arbiter 7 input control circuit 8 data memory unit 9 tag memory unit 10 external address bus interface 11 external data bus interface 12 CPU 13 Main memory 14 Write address buffer 15 Cache controller 16 External bus interface 31-34, 41-44, 51-57, 61-68, 8
1-87, 91-97 steps

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 中央処理装置および主メモリと、当該主
メモリに代わって前記中央処理装置との間のオペランド
データの授受を高速に行うデータキャッシュメモリと、
キャッシュヒット時に前記中央処理装置による前記デー
タキャッシュメモリに対するアクセス動作に並行して、
ライトバック動作を行うために前記主メモリに対する書
込み動作制御を行うキャッシュコントローラと、前記主
メモリと、前記中央処理装置、前記データキャッシュメ
モリおよび前記キャッシュコントローラとの間に接続さ
れる外部インターフェ−スと、を備えて構成されるデー
タキャッシュメモリシステムにおいて、 前記データキャッシュメモリが、所定のタグ情報を格納
するタグメモリ部と、 前記中央処理装置のアドレス指定を受けるポートおよび
ライトバック動作のアドレス指定を受けるポートを含む
デュアルポートRAMにより形成されるデータメモリ部
と、 前記中央処理装置のアドレス情報と前記タグメモリ部の
タグ情報とを比較照合して、当該両情報の一致・不一致
を検出する比較器と、を少なくとも備えて構成され、 前記キャッシュコントローラが、前記比較器より出力さ
れるヒット情報の入力を受けて、前記データキャッシュ
メモリに含まれる前記データメモリ部に対応して、前記
アドレス情報に基づく該当デ−タの読出し動作/書込み
動作を制御する信号を出力するヒットコントローラと、 前記タグメモリ部内にダーテーィビットが存在するか否
かをサーチし、当該タグメモリ部に書換えられたデータ
が存在する場合に、該当データの存在するブロックを、
前記主メモリ内に格納するための制御信号を出力するキ
ャッシュライターと、 前記中央処理装置より出力されるR/W信号の入力を受
けて、所定の内部アドレスバスと所定のライトバックア
ドレスバスとを同一ブロックを示すように作用するバス
アービタと、 を少なくとも備えて構成されることを特徴とするデータ
キャッシュメモリシステム。
1. A central processing unit and a main memory, and a data cache memory which, in place of the main memory, exchanges operand data with the central processing unit at high speed.
At the time of a cache hit, in parallel with the access operation to the data cache memory by the central processing unit,
An external interface connected between the cache controller that controls write operations to the main memory to perform a write-back operation, the main memory, the central processing unit, the data cache memory, and the cache controller. In a data cache memory system comprising: a data cache memory, a tag memory unit for storing predetermined tag information, a port for receiving addressing of the central processing unit, and addressing for write-back operation. A data memory unit formed by a dual port RAM including a receiving port, and a comparator for comparing and collating address information of the central processing unit and tag information of the tag memory unit to detect a match / mismatch between the two information. And at least The cache controller receives the hit information output from the comparator, and reads / writes the corresponding data based on the address information corresponding to the data memory unit included in the data cache memory. A hit controller that outputs a signal that controls a write operation, and a search for whether or not a dirty bit exists in the tag memory unit, and if there is rewritten data in the tag memory unit, the existence of the corresponding data Block
A cache writer that outputs a control signal to be stored in the main memory, and a predetermined internal address bus and a predetermined write-back address bus by receiving an R / W signal output from the central processing unit. A data cache memory system comprising at least a bus arbiter that operates so as to indicate the same block.
【請求項2】 中央処理装置および主メモリと、当該主
メモリに代わって前記中央処理装置との間のオペランド
データの授受を高速に行うデータキャッシュメモリと、
キャッシュヒット時に前記中央処理装置による前記デー
タキャッシュメモリに対するアクセス動作に並行して、
ライトバック動作を行うために前記主メモリに対する書
込み動作制御を行うキャッシュコントローラと、前記主
メモリと、前記中央処理装置、前記データキャッシュメ
モリおよび前記キャッシュコントローラとの間に接続さ
れる外部インターフェ−スと、を備えて構成されるデー
タキャッシュメモリシステムにおいて、 前記データキャッシュメモリが、所定のタグ情報を格納
するタグメモリ部と、前記中央処理装置のアドレス指定
を受けるポートおよびライトバック動作のアドレス指定
を受けるポートを含むデュアルポートRAMにより形成
されるデータメモリ部と、 前記中央処理装置のアドレス情報と前記タグメモリ部の
タグ情報とを比較照合して、当該両情報の一致・不一致
を検出する比較器と、を少なくとも備えて構成され、 前記キャッシュコントローラが、前記比較器より出力さ
れるヒット情報の入力を受けて、前記データキャッシュ
メモリに含まれる前記データメモリ部に対応して、前記
アドレス情報に基づく該当デ−タの読出し動作/書込み
動作を制御する信号を出力するヒットコントローラと、 前記中央処理装置による書込み動作時に、当該中央処理
装置より出力されるアドレス情報を入力して保持し、キ
ャッシュヒットに対応して、該当データの存在するブロ
ックを、前記主メモリ内に格納するための制御信号を出
力するライトアドレスバッファと、 前記中央処理装置より出力されるR/W信号の入力を受
けて、所定の内部アドレスバスと所定のライトバックア
ドレスバスとを同一ブロックを示すように作用するバス
アービタと、 を少なくとも備えて構成されることを特徴とするデータ
キャッシュメモリシステム。
2. A central processing unit and a main memory, and a data cache memory which, instead of the main memory, exchanges operand data with the central processing unit at high speed.
At the time of a cache hit, in parallel with the access operation to the data cache memory by the central processing unit,
An external interface connected between the cache controller that controls write operations to the main memory to perform a write-back operation, the main memory, the central processing unit, the data cache memory, and the cache controller. In a data cache memory system configured to include: a data cache memory, a tag memory unit that stores predetermined tag information, a port that receives addressing of the central processing unit, and addressing of a write-back operation. A data memory unit formed by a dual port RAM including a receiving port, and a comparator for comparing and collating address information of the central processing unit and tag information of the tag memory unit to detect a match / mismatch between the two information. And at least The cache controller receives the hit information output from the comparator and reads / writes the corresponding data based on the address information corresponding to the data memory unit included in the data cache memory. A hit controller that outputs a signal for controlling the operation, and during the write operation by the central processing unit, the address information output from the central processing unit is input and held, and corresponding data exists in response to the cache hit. A write address buffer that outputs a control signal for storing a block in the main memory, and an input of an R / W signal output from the central processing unit to receive a predetermined internal address bus and a predetermined write back. A bus arbiter that acts to indicate the same block as the address bus, and Data cache memory system, characterized in that.
JP7311270A 1995-11-29 1995-11-29 Data cache memory system Pending JPH09152989A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7311270A JPH09152989A (en) 1995-11-29 1995-11-29 Data cache memory system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7311270A JPH09152989A (en) 1995-11-29 1995-11-29 Data cache memory system

Publications (1)

Publication Number Publication Date
JPH09152989A true JPH09152989A (en) 1997-06-10

Family

ID=18015124

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7311270A Pending JPH09152989A (en) 1995-11-29 1995-11-29 Data cache memory system

Country Status (1)

Country Link
JP (1) JPH09152989A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02108139A (en) * 1988-10-15 1990-04-20 Fuji Xerox Co Ltd Cache memory device
JPH02224043A (en) * 1988-11-15 1990-09-06 Nec Corp Cache memory
JPH0421042A (en) * 1990-05-15 1992-01-24 Oki Electric Ind Co Ltd Store-in system cache memory
JPH06309231A (en) * 1993-04-27 1994-11-04 Agency Of Ind Science & Technol Cache memory control method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02108139A (en) * 1988-10-15 1990-04-20 Fuji Xerox Co Ltd Cache memory device
JPH02224043A (en) * 1988-11-15 1990-09-06 Nec Corp Cache memory
JPH0421042A (en) * 1990-05-15 1992-01-24 Oki Electric Ind Co Ltd Store-in system cache memory
JPH06309231A (en) * 1993-04-27 1994-11-04 Agency Of Ind Science & Technol Cache memory control method

Similar Documents

Publication Publication Date Title
US5696937A (en) Cache controller utilizing a state machine for controlling invalidations in a network with dual system busses
EP1399823B1 (en) Using an l2 directory to facilitate speculative loads in a multiprocessor system
JPH0775010B2 (en) Coherence means for multiprocessing systems.
JPH0581129A (en) Ownership change controller to data unit in cash of data processing system
US5003458A (en) Suspended instruction restart processing system based on a checkpoint microprogram address
CA2127081A1 (en) Processor interface chip for dual-microprocessor processor system
JPH0342745A (en) Plural cash-memory-access method
JP3236287B2 (en) Multiprocessor system
KR100335744B1 (en) Load/load detection and reorder method
US5737756A (en) Dual bus computer network using dual busses with dual spy modules enabling clearing of invalidation queue for processor with store through cache while providing retry cycles for incomplete accesses to invalidation queue
US5146569A (en) System for storing restart address of microprogram, determining the validity, and using valid restart address to resume execution upon removal of suspension
WO1997004392A1 (en) Shared cache memory device
US6769049B1 (en) Memory access in a computer system having parallel execution pipelines
EP0640930A2 (en) A multiprocessor system and a method of controlling such a system
JPH09152989A (en) Data cache memory system
JPS6232508B2 (en)
JPH1185613A (en) Cache memory
JP2972451B2 (en) Cache memory control method by hardware control software
JPH06124235A (en) Cache control system
JPH04340145A (en) Cache memory device
JP3200183B2 (en) Data processing device
JPH10207773A (en) Bus connecting device
JPH0148571B2 (en)
JPH04296950A (en) Cache memory device
JPH05324469A (en) Microprocessor with built-in cache memory

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 19991109