JPH1063575A - Cache memory - Google Patents

Cache memory

Info

Publication number
JPH1063575A
JPH1063575A JP8237212A JP23721296A JPH1063575A JP H1063575 A JPH1063575 A JP H1063575A JP 8237212 A JP8237212 A JP 8237212A JP 23721296 A JP23721296 A JP 23721296A JP H1063575 A JPH1063575 A JP H1063575A
Authority
JP
Japan
Prior art keywords
memory
cache
data
dirty bit
tag
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.)
Granted
Application number
JP8237212A
Other languages
Japanese (ja)
Other versions
JP3152345B2 (en
Inventor
Toshichika Sakai
敏親 境
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 JP23721296A priority Critical patent/JP3152345B2/en
Publication of JPH1063575A publication Critical patent/JPH1063575A/en
Application granted granted Critical
Publication of JP3152345B2 publication Critical patent/JP3152345B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a cache memory capable of processing consecutive storing instructions into a pipeline by one clock cycle. SOLUTION: The cache memory is provided with a first memory 11 storing cache data 11a, a second memory 12 storing tag data 12b and a valid bit 12a showing whether cache data is valid or not in one entry, a third memory 13 housing a dirty bit 13a showing whether or not cache data in the first memory is updated, address decoders 15 and 16 individually provided in each of the second and third memories, and a cache controller 17 simultaneously executing the writing of the dirty bit to the third memory and the reading of a tag in the second memory.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、キャッシュメモリ
に関し、特に連続するストア命令を1クロックサイクル
でパイプライン化することを可能とするキャッシュメモ
リを提供することにある。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a cache memory, and more particularly, to providing a cache memory which enables continuous store instructions to be pipelined in one clock cycle.

【0002】[0002]

【従来技術】従来、この種のライトバック方式のキャッ
シュメモリは、命令をクロックサイクル周期でパイプラ
イン処理することを目的として用いられている。以下、
従来のライトバック方式のキャッシュメモリについて図
を参照して説明する。
2. Description of the Related Art Heretofore, this type of write-back type cache memory has been used for the purpose of pipeline processing instructions at clock cycle periods. Less than,
A conventional write-back cache memory will be described with reference to the drawings.

【0003】図5は一般的なライトバック方式のキャッ
シュメモリの第1の従来例を示すブロック図である。図
5において、78はアドレスバス、79はデータバスで
ある。第1メモリ71はキャッシュデータ71aを格納
し、第2メモリ72はダーティビット72aとバリッド
ビット72bとタグ72cをそれぞれ格納する。
FIG. 5 is a block diagram showing a first conventional example of a general write-back type cache memory. In FIG. 5, reference numeral 78 denotes an address bus, and 79 denotes a data bus. The first memory 71 stores cache data 71a, and the second memory 72 stores dirty bits 72a, valid bits 72b, and tags 72c, respectively.

【0004】バリッドビット72bは、第1メモリ71
に保存されているデータが有効なデータであることを示
す情報を保存するフラグメモリである。
The valid bit 72b is provided in the first memory 71
Is a flag memory for storing information indicating that the data stored in the data is valid data.

【0005】ダーティビット72aはキャッシュデータ
が更新されて、外部メモリと不一致になっているか否か
を示す情報を保存するフラグメモリである。ここでは、
キャッシュデータの更新が行われた場合、ダーティビッ
ト72aにアクティブハイ(HIGH)を保持するもの
とする。
The dirty bit 72a is a flag memory for storing information indicating whether or not the cache data has been updated and does not match the external memory. here,
When the cache data is updated, the dirty bit 72a holds active high (HIGH).

【0006】キャッシュコントローラ84は、ダーティ
ビット信号82、バリッドビット信号83、タグ信号8
4の読み出し及び書き込みを第2メモリ72に対して行
い、キャッシュヒットしているかいないかを示すキャッ
シュヒット信号81を出力する。ここでは、キャッシュ
ヒットしている時、キャッシュヒット信号81をアクテ
ィブハイ(HIGH)にするものとする。
The cache controller 84 includes a dirty bit signal 82, a valid bit signal 83, a tag signal 8
4 to and from the second memory 72, and outputs a cache hit signal 81 indicating whether or not a cache hit has occurred. Here, it is assumed that when a cache hit occurs, the cache hit signal 81 is set to active high (HIGH).

【0007】図5に示す第1従来例の動作について説明
する。まず、アドレスA0のデータを第1メモリ71か
ら読み出す場合について説明する。アドレスバス78上
のアドレスA0によって、第2メモリ72からエントリ
A0のタグ72cとバリッドビット72bとダーティビ
ット72aとが、タグ信号84、バリッドビット信号8
3、ダーティビット信号82を介してキャッシュコント
ローラ84へ読み出される。キャッシュコントローラ8
4は、タグ72cとアドレスA0との比較を行い、キャ
ッシュヒット信号81を生成する。
The operation of the first conventional example shown in FIG. 5 will be described. First, a case where the data at the address A0 is read from the first memory 71 will be described. According to the address A0 on the address bus 78, the tag 72c, the valid bit 72b, and the dirty bit 72a of the entry A0 are transmitted from the second memory 72 to the tag signal 84, the valid bit signal 8
3. The data is read out to the cache controller 84 via the dirty bit signal 82. Cache controller 8
4 compares the tag 72c with the address A0 and generates a cache hit signal 81.

【0008】キャッシュミスしている場合、キャッシュ
リプレース処理を行う。キャッシュヒットしている場
合、ダーティビット72aがHIGHであるならば、キ
ャッンュデータ71aは更新されているので、外部メモ
リヘキャッシュデータを書き戻し、キャッシュリプレー
スを行う。キャッシュヒットしており、かつダーティビ
ット72aがHIGHでない場合には、第1メモリ71
からキャッシュデータを読み出す。
If a cache miss has occurred, a cache replacement process is performed. In the case of a cache hit, if the dirty bit 72a is HIGH, the cache data 71a has been updated, so the cache data is written back to the external memory and cache replacement is performed. If there is a cache hit and the dirty bit 72a is not HIGH, the first memory 71
From the cache data.

【0009】次に、キャッシュメモリにデータを書き込
むストア命令が2つ連続してキャッシュヒットする場合
の動作について説明する。
Next, an operation in the case where two store instructions for writing data to the cache memory successively cause a cache hit will be described.

【0010】ここでは、連続するストア命令をストア命
令Aとストア命令Bとする。図6は、図5に示したキャ
ッシュメモリにおいて連続するストア命令のパイプライ
ン動作を示す図である。ここで、TAG(R)はタグ7
2cの読み出し、D(R)はダーティビット72aの読
み出し、HITはキャッシュヒット信号81の生成、D
ata(W)はキャッシュデータ71aの書き込み、D
(w)はダーティビット72aへの書き込みを示す。
Here, consecutive store instructions are referred to as store instruction A and store instruction B. FIG. 6 is a diagram showing a pipeline operation of successive store instructions in the cache memory shown in FIG. Here, TAG (R) is tag 7
2C, D (R) reads the dirty bit 72a, HIT generates the cache hit signal 81, D
data (W) is the write of the cache data 71a;
(W) indicates writing to the dirty bit 72a.

【0011】ステージ(1)では、ストア命令Aに関す
るタグ72cとダーティビット72aを読み出す。ステ
ージ(2)では、ステージ(1)で読み出したタグ72
cとアドレスを比較しキャッシュヒット信号81の生成
を行う。
In the stage (1), the tag 72c and the dirty bit 72a relating to the store instruction A are read. In the stage (2), the tag 72 read in the stage (1)
The cache hit signal 81 is generated by comparing c with the address.

【0012】ステージ(3)では、ストアデータを第1
メモリ71へ書き込み、ダーティビット72aにHIG
Hを書き込む。ここで、タグ72cとダーティビット7
2aは同一の第2メモリ72に格納されているのでスト
ア命令Aに関するダーティビット72aへの書き込み中
はストア命令Bに関するタグ72cの読み出しができな
い。そのため、ステージ(5)までストア命令Bに関す
るタグ72cの読み出しを待たなければならない。この
結果、2つの連続するストア命令の実行に3クロック必
要となる。
In stage (3), store data is stored in the first
Write to the memory 71 and set the dirty bit 72a to HIG
Write H. Here, the tag 72c and the dirty bit 7
Since 2a is stored in the same second memory 72, the tag 72c relating to the store instruction B cannot be read during writing to the dirty bit 72a relating to the store instruction A. Therefore, the reading of the tag 72c related to the store instruction B must be waited until the stage (5). As a result, three clocks are required to execute two consecutive store instructions.

【0013】上記のような問題を解決する第2従来例の
キャッシュメモリが特開平5−314007号公報に開
示される。この第2従来例では、1ラインにダーティビ
ットセルを2つずつ有することにより、連続するストア
命令をクロックサイクル周期でパイプライン処理する技
術を開示している。
A cache memory of a second conventional example which solves the above problem is disclosed in Japanese Patent Laid-Open No. Hei 5-314007. This second conventional example discloses a technique in which successive store instructions are pipelined at a clock cycle period by providing two dirty bit cells in one line.

【0014】図7に上記第2従来例のライトバック方式
のキャッシュメモリのダーティビットに関する回路図を
示す。このキャッシュメモリはダイレクトマップ方式の
キャッシュメモリであり、クロックは2相クロックとす
る。
FIG. 7 is a circuit diagram showing a dirty bit of the write-back type cache memory of the second conventional example. This cache memory is a direct-mapped cache memory, and its clock is a two-phase clock.

【0015】図において、90はビット線をプリチャー
ジするプリチャージ回路、105は2相クロックの第2
相クロック(ph2)、106は2相クロックの第1相
クロック(ph1)であり、107は第2相クロック
(ph2)105を反転したクロック(xph2)、1
04はキャッシュヒット信号、102はダーティビット
に対する書き込みデータである。また、91はキャッシ
ュメモリの第0のキャッシュラインに対応するワード線
WL0及びビット線Bとその反転ビットXBに接続され
るデータの更新を示すダーティビットを保持する記憶回
路、110,111はタグメモリセル、96は記憶回路
91の第1のメモりセル、92は記憶回路91の第2の
メモリセルである。
In the figure, 90 is a precharge circuit for precharging a bit line, and 105 is a second charge of a two-phase clock.
A phase clock (ph2), 106 is a first phase clock (ph1) of a two-phase clock, and 107 is a clock (xph2) obtained by inverting the second phase clock (ph2) 105, 1
04 is a cache hit signal, and 102 is write data for a dirty bit. Further, reference numeral 91 denotes a storage circuit for holding a dirty bit indicating update of data connected to the word line WL0 and bit line B corresponding to the 0th cache line of the cache memory and its inverted bit XB, and 110 and 111 denote tag memories. A cell 96 is a first memory cell of the storage circuit 91, and a reference numeral 92 is a second memory cell of the storage circuit 91.

【0016】図7のように構成された第2実施例のキャ
ッシュメモリについてその動作を説明する。クロック
(xph2)107がLOWの時にビット線B、XBが
HIGHにプリチャージされる。第2相クロック(ph
2)105がHIGHの時にキャッシュに与えられた行
アドレスをデコードしておき、第2相クロック(ph
2)105がLOWの時に複数のワード線の中から1本
だけが有効となり、1つのキャッシュラインのダーティ
ビットエントリが選択される。
The operation of the cache memory of the second embodiment configured as shown in FIG. 7 will be described. When the clock (xph2) 107 is LOW, the bit lines B and XB are precharged to HIGH. Phase 2 clock (ph
2) The row address given to the cache when 105 is HIGH is decoded, and the second phase clock (ph
2) When 105 is LOW, only one of the plurality of word lines is valid, and a dirty bit entry of one cache line is selected.

【0017】ここでは、ワード線WL0が選択されたと
する。ダーティビットからの情報を読み出す場合は、第
1のメモリセル96に保持されたダーティビットの情報
をビット線B、XBに読み出し外部に取り出す。一方、
ダーティビットに情報を書き込む場合は2種類ある。
Here, it is assumed that word line WL0 is selected. When information from the dirty bit is read, the information of the dirty bit held in the first memory cell 96 is read out to the bit lines B and XB and taken out. on the other hand,
There are two types of writing information to dirty bits.

【0018】第1は、キャッシュへのストア動作に対し
てキャッシュミスしたとき、外部メモリから転送された
データをキャッシュラインにリプレースする際にストア
データの更新と同時にダーティビットに情報を書き込む
場合である。この動作は、書き込みデータ102をビッ
ト線B、XBに与えることにより第1のメモリセル96
に書き込む。
First, when a cache miss occurs in a store operation to a cache, when data transferred from an external memory is replaced with a cache line, information is written to a dirty bit simultaneously with update of store data. . This operation is performed by applying the write data 102 to the bit lines B and XB, and
Write to.

【0019】第2は、キャッシュへのストア動作に対し
てキャッシュヒットしたときにダーティビットをセット
するものである。第1相クロック(phl)106がH
IGHのときに、選択されたワード線WL0のHIGH
の信号をトランジスタ93を介して送り、第2のメモリ
セル92でHIGHを保持する。キャッシュの書き込み
ヒット信号104のHIGHと第2相クロック(ph
2)105のHIGHをアンドゲート101に入力しH
IGHを生成する。第2のメモリセル92に保持された
HIGHとアンドゲート101の出力HIGHをナンド
ゲート98に入力しLOWを得る。このナンドゲート1
01の出力LOWはナンドゲート97に入力され、その
出力をHIGHにセットし、インバータ108を介して
この情報を保持することになる。従って、第1のメモリ
セル96のダーティビットの情報はデータの更新を示す
「1」にセットされる。
The second is to set a dirty bit when a cache hit occurs for a store operation to the cache. First phase clock (phl) 106 is H
When HIGH, the HIGH of the selected word line WL0
Is transmitted through the transistor 93, and the second memory cell 92 holds HIGH. HIGH of the cache write hit signal 104 and the second phase clock (ph
2) High of 105 is input to AND gate 101 and H
Generate IGH. The HIGH held in the second memory cell 92 and the output HIGH of the AND gate 101 are input to the NAND gate 98 to obtain LOW. This NAND Gate 1
The output LOW of 01 is input to the NAND gate 97, the output is set to HIGH, and this information is held via the inverter 108. Therefore, the dirty bit information of the first memory cell 96 is set to "1" indicating data update.

【0020】図8は第2従来例のキャッシュメモリにお
けるストア命令のパイプライン動作の説明図である。キ
ャッシュメモリにデータを書き込むストア命令が2つ連
続してキャッシュヒットする場合について説明する。こ
こではストア命令A及びストア命令Bとし書き込みヒッ
トの動作を示す。
FIG. 8 is an explanatory diagram of a pipeline operation of a store instruction in the cache memory of the second conventional example. A case where two store instructions for writing data to the cache memory successively cause a cache hit will be described. Here, a write hit operation is shown as store instruction A and store instruction B.

【0021】TAG(R)はタグの読み出し、D(R)
はダーティビットの読み出し、DATA(W)はストア
データの書き込み、D(W)はダーティビットの書き込
みを示す。
TAG (R) reads the tag, D (R)
Indicates reading of a dirty bit, DATA (W) indicates writing of store data, and D (W) indicates writing of a dirty bit.

【0022】ステージ(1)では、ストア命令Aに関す
るタグとダーティビットを読み出す。このタグとキャッ
シュに与えられたアドレスを比較して書き込みヒット信
号を得る。ステージ(2)では、キャッシュのデータ部
にストアデータを書き込む前にビット線をプリチャージ
すると同時にダーティビットの書き込みを行う。ステー
ジ(3)では、書き込みヒット信号から得られた書き込
みイネーブル信号によりストアデータ書き込み及び次の
アクセスであるストア命令Bに関するタグとダーティビ
ットの読み出しを行う。
In the stage (1), the tag and the dirty bit relating to the store instruction A are read. The tag is compared with the address given to the cache to obtain a write hit signal. In stage (2), the bit line is precharged and the dirty bit is written at the same time before the store data is written to the data portion of the cache. In stage (3), store data is written and a tag and a dirty bit related to a store instruction B, which is the next access, are read by a write enable signal obtained from a write hit signal.

【0023】ステージ(4)では、キャッシュのデータ
部にストアデータを書き込む前にビット線をプリチャー
ジすると同時にダーティビットの書き込みを行う。それ
に続くストア命令Bの動作はストア命令Aのステージ
(3)、(4)における動作と同様である。
In the stage (4), the bit line is precharged and the dirty bit is written at the same time before the store data is written in the data portion of the cache. The subsequent operation of the store instruction B is the same as the operation of the store instruction A in the stages (3) and (4).

【0024】[0024]

【発明が解決しようとする課題】上述した従来のキャッ
シュメモリにおいては、以下に述べるような問題点を有
している。
The above-mentioned conventional cache memory has the following problems.

【0025】第1に、第1の従来技術の構成では、連続
するストア命令をパイプライン動作させる場合、1サイ
クルの停止サイクルが入り2クロック周期でしかストア
命令を行うことができないため処理効率が低下するとい
う問題点を有する。その理由は、タグの読み出しとダー
ティビットの書き込みを同時に行うことができないため
である。
First, in the configuration of the first prior art, when a continuous store instruction is operated in a pipeline manner, a store instruction can be performed only in two clock cycles with a stop cycle of one cycle. There is a problem that it decreases. The reason is that reading of the tag and writing of the dirty bit cannot be performed at the same time.

【0026】第2に、第2の従来技術では、高速化すな
わちクロック周波数を高くすることが困難であるという
問題点を有する。その理由は、プリチャージ期間中に第
2のダーティビットメモリセルに保持された値を第1の
ダーティビットメモリセルへ転送するために、プリチャ
ージ期間を短縮することが、すなわち1クロック周期を
短縮することが困難であるためである。
Second, the second conventional technique has a problem that it is difficult to increase the speed, that is, to increase the clock frequency. The reason is that, in order to transfer the value held in the second dirty bit memory cell to the first dirty bit memory cell during the precharge period, the precharge period can be shortened, that is, one clock cycle can be shortened. This is because it is difficult to do so.

【0027】第3に、第2の従来技術に示すキャッシュ
メモリの構成においては、ダーティビットのメモリセル
が2個ずつ必要であるため、回路面積が大きくなるとい
う問題点も有している。
Third, the configuration of the cache memory shown in the second prior art also has a problem that the circuit area becomes large because two dirty bit memory cells are required.

【0028】本発明の第1の目的は、上記従来の問題点
を解消し、連続するストア命令を1クロックサイクルで
パイプライン化することを可能とするキャッシュメモリ
を提供することにある。
A first object of the present invention is to solve the above-mentioned conventional problems and to provide a cache memory which enables continuous store instructions to be pipelined in one clock cycle.

【0029】本発明の第2の目的は、クロック周期の短
縮による高速化を容易に実現することができるキャッシ
ュメモリを提供することにある。
A second object of the present invention is to provide a cache memory capable of easily realizing high speed by shortening a clock cycle.

【0030】本発明の第3の目的は、ダーティビットの
書き込みと、タグの読み出しとが同時に行う際に書き込
みデータを退避させるためのメモリの増設を必要としな
いキャッシュメモリを提供することにある。
A third object of the present invention is to provide a cache memory that does not require an additional memory for saving write data when writing a dirty bit and reading a tag simultaneously.

【0031】[0031]

【課題を解決するための手段】上記目的を達成する本発
明のキャッシュメモリは、キャッシュデータを格納する
第1のメモリと、1エントリにタグデータと前記キャッ
シュデータが有効か否かを示すバリッドビットを格納す
る第2のメモリと、前記第1のメモリのキャッシュデー
タが更新されているか否かを示すダーティビットを格納
する第3のメモリと、前記第2のメモリ及び第3のメモ
リにそれぞれ個別に備えられたアドレスデコーダと、前
記第3のメモリへのダーティビットの書き込みと前記第
2メモリのタグの読み出しを同時に行う制御手段を備え
ることを特徴とする。
According to the present invention, there is provided a cache memory comprising: a first memory for storing cache data; a tag data in one entry; and a valid bit indicating whether the cache data is valid or not. , A third memory for storing a dirty bit indicating whether or not cache data of the first memory is updated, and a second memory and a third memory, respectively. , And control means for simultaneously writing a dirty bit to the third memory and reading a tag from the second memory.

【0032】請求項2の本発明のキャッシュメモリは、
前記第1のメモリにデータを書き込む第1のストア命令
と第2のストア命令がキャッシュヒットする場合に、前
記制御手段は、第1のストア命令に関する前記タグデー
タを読み出し、読み出したタグデータと書込みアドレス
を比較してキャッシュヒット信号の生成と前記ダーティ
ビットの読み出しを行う第1のステージと、プリチャー
ジ処理のみを行う第2のステージと、データの前記第1
のメモリへの書込みと前記ダーティビットの前記第3の
メモリへの書込みを行うと同時に、前記第2のストア命
令に関するタグデータの前記第2のメモリからの読み出
しを行う第3のステージと、プリチャージ処理のみを行
う第4のステージと、データの前記第1のメモリへの書
込みと前記ダーティビットの前記第3のメモリへの書込
みを行う第5のステージと、プリチャージ処理のみを行
う第6のステージからなる1クロックサイクルのパイプ
ライン動作を行うことを特徴とする。
According to a second aspect of the present invention, there is provided a cache memory comprising:
When a first store instruction and a second store instruction for writing data to the first memory cause a cache hit, the control unit reads the tag data relating to the first store instruction, and writes the read tag data and the write data. A first stage in which an address is compared to generate a cache hit signal and read the dirty bit, a second stage in which only a precharge process is performed,
A third stage in which writing of the dirty bit to the third memory and writing of the tag data relating to the second store instruction from the second memory at the same time as writing the dirty bit to the third memory; A fourth stage for performing only the charging process, a fifth stage for performing the writing of data to the first memory and the dirty bit to the third memory, and a sixth stage for performing only the precharging process. And a pipeline operation of one clock cycle composed of the stages described above.

【0033】請求項3の本発明のキャッシュメモリは、
キャッシュデータ及びキャッシュデータが更新されてい
るか否かを示すダーティビットをエントリ毎に格納する
第1のメモリと、1エントリにタグデータと前記キャッ
シュデータが有効か否かを示すバリッドビットを格納す
る第2のメモリと、前記第1のメモリ及び第2のメモリ
にそれぞれ個別に備えられたアドレスデコーダと、前記
第1のメモリへのダーティビットの書き込みと前記第2
メモリのタグの読み出しを同時に行う制御手段を備える
ことを特徴とする。
According to a third aspect of the present invention, there is provided a cache memory comprising:
A first memory for storing, for each entry, cache data and a dirty bit indicating whether or not the cache data has been updated; and a second memory for storing tag data and a valid bit indicating whether the cache data is valid in one entry. 2, an address decoder separately provided in each of the first memory and the second memory, and writing of a dirty bit to the first memory and the second memory.
It is characterized by comprising control means for simultaneously reading tags from the memory.

【0034】請求項4の本発明のキャッシュメモリは、
前記第1のメモリにデータを書き込む第1のストア命令
と第2のストア命令がキャッシュヒットする場合に、前
記制御手段は、第1のストア命令に関する前記タグデー
タを読み出し、読み出したタグデータと書込みアドレス
を比較してキャッシュヒット信号の生成と前記ダーティ
ビットの読み出しを行う第1のステージと、プリチャー
ジ処理のみを行う第2のステージと、前記第1のメモリ
へのデータと前記ダーティビットの書込みを行うと同時
に、前記第2のストア命令に関するタグデータの前記第
2のメモリからの読み出しを行う第3のステージと、プ
リチャージ処理のみを行う第4のステージと、前記第1
のメモリへのデータと前記ダーティビットの書込みを行
う第5のステージと、プリチャージ処理のみを行う第6
のステージからなる1クロックサイクルのパイプライン
動作を行うことを特徴とする。
According to a fourth aspect of the present invention, there is provided a cache memory comprising:
When a first store instruction and a second store instruction for writing data to the first memory cause a cache hit, the control unit reads the tag data relating to the first store instruction, and writes the read tag data and the write data. A first stage for comparing addresses to generate a cache hit signal and read the dirty bit, a second stage for performing only precharge processing, and writing data and the dirty bit to the first memory At the same time, a third stage for reading out the tag data relating to the second store instruction from the second memory, a fourth stage for performing only the precharge processing,
A fifth stage for writing the data and the dirty bit to the memory, and a sixth stage for performing only the precharge processing.
And a pipeline operation of one clock cycle composed of the stages described above.

【0035】[0035]

【発明の実施の形態】本発明の実施の形態について図面
を参照して詳細に説明する。図1は、本発明によるキャ
ッシュメモリの実施の形態を示すブロック図である。
Embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of a cache memory according to the present invention.

【0036】図1において、本実施の形態によるキャッ
シュメモリは、第1メモリ11、第2メモリ12、第3
メモリ13、アドレスデコーダ14〜16、キャッシュ
コントローラ17を備えて構成される。ここで、18は
アドレスバス、19はデータバスである。
In FIG. 1, the cache memory according to the present embodiment includes a first memory 11, a second memory 12,
It comprises a memory 13, address decoders 14 to 16, and a cache controller 17. Here, reference numeral 18 denotes an address bus, and 19 denotes a data bus.

【0037】第1メモリ11はキャッシュデータ11a
を格納する。第2メモリ12はバリッドビット12aと
タグ12bを格納し、第3メモリ13はダーティビット
13aを格納する。ここで、第1メモリ11のキャッシ
ュデータ11aの更新が行われた場合、ダーティビット
13aにアクディブハイ(HIGH)を保持するものと
する。
The first memory 11 stores cache data 11a.
Is stored. The second memory 12 stores a valid bit 12a and a tag 12b, and the third memory 13 stores a dirty bit 13a. Here, when the cache data 11a of the first memory 11 is updated, it is assumed that the dirty bit 13a holds active high (HIGH).

【0038】第2メモリ12と第3メモリ13はそれぞ
れ個別のアドレスデコーダ15と16を有し、タグ12
bの読み出しとダーティビット13aへの書き込みを同
時に行うことができるように構成されている。
The second memory 12 and the third memory 13 have individual address decoders 15 and 16, respectively.
It is configured such that reading of b and writing to the dirty bit 13a can be performed simultaneously.

【0039】キャッシュコントローラ17は、ダーティ
ビット信号22の読み出し及び書き込みを第3のメモリ
13に対して行い、バリッドビット信号23、タグ信号
24の読み出し及び書き込みを第2メモリ12に対して
行い、キャッシュヒット信号21を出力する。ここで
は、キャッシュヒットしている時、キャッシュヒット信
号21をアクティブハイ(HIGH)にするものとす
る。
The cache controller 17 reads and writes the dirty bit signal 22 to and from the third memory 13, reads and writes the valid bit signal 23 and the tag signal 24 to and from the second memory 12, The hit signal 21 is output. Here, when a cache hit occurs, the cache hit signal 21 is set to active high (HIGH).

【0040】図1に示す本発明の実施の形態によるキャ
ッシュメモリの動作について説明する。キャッシュデー
タを読み出す命令リードA0が実行されるとき、第1メ
モリ11からキャッシュデータ11aが、第2メモリ1
2からタグ12bとバリッドビット12aが、第3メモ
リ13からダーティビット13aが同時に読み出され
る。
The operation of the cache memory according to the embodiment of the present invention shown in FIG. 1 will be described. When an instruction read A0 for reading cache data is executed, the cache data 11a is transferred from the first memory 11 to the second memory 1
2, the tag 12b and the valid bit 12a are simultaneously read from the third memory 13, and the dirty bit 13a is read from the third memory 13.

【0041】キャッシュコントローラ17は読み出され
たタグ12bとアドレスA0とを比較することにより、
キャッンュヒット信号21をHIGHにする。
The cache controller 17 compares the read tag 12b with the address A0,
The cancel hit signal 21 is set to HIGH.

【0042】キャッシュミスしている場合、ダーティビ
ット13aがHIGHならばキャッシュデータ11aの
更新が行われているため、外部メモリにキャッシュデー
タ11aを書き戻した後、キャッシュリプレースを開始
する。ダーティビット13aがLOWならば、そのまま
キャッシュリプレースを開始する。
When a cache miss has occurred, if the dirty bit 13a is HIGH, the cache data 11a has been updated, so the cache data 11a is written back to the external memory, and then the cache replacement is started. If the dirty bit 13a is LOW, the cache replacement is started as it is.

【0043】キャッシュヒットしている場合は、第1メ
モリ11のキャッシュデータ11aを外部へ出力する。
If there is a cache hit, the cache data 11a in the first memory 11 is output to the outside.

【0044】キャッシュデータ11aを書き込む命令ス
トアA0が実行されるとき、第2メモリ12からタグ1
2bとバリッドビット12aが読み出される。キャッシ
ュコントローラ17は読み出されたタグ12bとアドレ
スA0とを比較することによりキャッンュヒット信号2
1を生成する。
When the instruction store A0 for writing the cache data 11a is executed, the tag 1
2b and the valid bit 12a are read. The cache controller 17 compares the read tag 12b with the address A0 to determine whether the cache hit signal 2
1 is generated.

【0045】キャッシュミスしている場合、第3メモリ
13からダーティビット13aを読み出し、ダーティビ
ット13aがHIGHならばキャッシュデータ11aの
更新が行われているため外部メモリにキャッシュデータ
11aを書き戻した後、キャッシュリプレースを開始す
る。ダーティビット13aがLOWならばそのままキャ
ッシュリプレースを行い、リプレースされた第1メモリ
11のエントリにストアデータを書き込み、同時に第3
メモリ13のダーティビット13aにHIGHを書き込
む。
If a cache miss has occurred, the dirty bit 13a is read from the third memory 13. If the dirty bit 13a is HIGH, the cache data 11a has been updated because the cache data 11a has been updated. , And start the cache replacement. If the dirty bit 13a is LOW, the cache replacement is performed as it is, the store data is written to the replaced entry of the first memory 11, and the third
HIGH is written to the dirty bit 13a of the memory 13.

【0046】キャッシュヒットしている場合は、リプレ
ースされた第1メモリ11のエントリにストアデータを
書き込み、同時に第3メモリ13のダーティビット13
aにHIGHを書き込む。
If there is a cache hit, the store data is written to the replaced entry of the first memory 11 and at the same time, the dirty bit 13 of the third memory 13 is written.
Write HIGH to a.

【0047】次に、キャッシュメモリにデータを書き込
むストア命令が2つ連続してキャッシュヒットする場合
の動作について説明する。ここで、連続する2つのスト
ア命令をストア命令Aとストア命令Bとする。
Next, the operation when two consecutive store instructions for writing data to the cache memory cause a cache hit will be described. Here, two consecutive store instructions are referred to as a store instruction A and a store instruction B.

【0048】図3は本発明のキャッシュメモリにおける
ストア命令のパイプライン動作の説明図である。図3に
おいて、TAG(R)はタグ12bの読み出し、D
(R)はダーティビット13aの読み出し、Data
(W)はキャッシュデータ11aへの書き込み、D
(W)はダーティビット13aへのHIGHの書き込み
をそれぞれ示す。
FIG. 3 is an explanatory diagram of a pipeline operation of a store instruction in the cache memory of the present invention. In FIG. 3, TAG (R) indicates reading of tag 12b and D
(R) is the reading of the dirty bit 13a, Data
(W) indicates writing to the cache data 11a, and D
(W) shows HIGH writing to the dirty bit 13a.

【0049】ステージ(1)では、第2メモリ12から
ストア命令Aに関するタグ12bを読み出し、読み出し
たタグ12bとアドレスを比較しキャッシュヒット信号
21の生成と第3メモリ13のダーティビット13aの
読み出しを行う。
In the stage (1), the tag 12b relating to the store instruction A is read from the second memory 12, the read tag 12b is compared with the address, and the cache hit signal 21 is generated and the dirty bit 13a of the third memory 13 is read. Do.

【0050】ステージ(2)では、ビット線のプリチャ
ージを行う。ステージ(3)では、ストアデータをキャ
ッシュデータ11aへ書き込み、ダーティビット13a
にはHIGHを書き込む。また、ダーティビット13a
の書込みと同時にストア命令Bに関するタグ12bを読
み出す。
In the stage (2), the bit lines are precharged. In stage (3), the store data is written to the cache data 11a, and the dirty bit 13a
Is written HIGH. Also, the dirty bit 13a
And the tag 12b relating to the store instruction B is read at the same time as the writing of the instruction.

【0051】ステージ(4)では、ビット線のプリチャ
ージを行う。ステージ(5)以降におけるストア命令B
の動作はストア命令Aのステージ(3)及び(4)と同
様である。
In the stage (4), the bit lines are precharged. Store instruction B after stage (5)
Are the same as those in the stages (3) and (4) of the store instruction A.

【0052】上記のように、ダーティビット13aとタ
グ12bとをそれぞれ異なる第2メモリ12と第3メモ
リ13に保持し、かつ個別のアドレスデコーダ15,1
6を備えてダーティビット13aの書き込みとタグ12
bの読み出しとを同時に行うことができる構成としたの
で、連続するストア命令を1クロックサイクルでパイプ
ライン化することが可能となる。
As described above, the dirty bit 13a and the tag 12b are stored in the different second memory 12 and third memory 13, respectively, and the individual address decoders 15, 1
6 and writing of dirty bit 13a and tag 12
Since reading of b can be performed at the same time, continuous store instructions can be pipelined in one clock cycle.

【0053】また、上記のように、プリチャージ期間に
は、他の動作を行わないため、プリチャージ期間の短縮
が容易となることから動作周波数の向上が容易となる。
Further, as described above, since no other operation is performed during the precharge period, the precharge period can be easily shortened, so that the operation frequency can be easily improved.

【0054】本発明のキャッシュメモリの第1実施例に
ついて図2を参照して説明する。図2において、本実施
例によるキャッシュメモリは、第1メモリ31、第2メ
モリ32、第3メモリ33、アドレスデコーダ34〜3
6、キャッシュコントローラ37、読出し/書込みコン
トローラ45を備えて構成される。ここで、38はアド
レスバス、39はデータバスである。
A first embodiment of the cache memory according to the present invention will be described with reference to FIG. In FIG. 2, a cache memory according to the present embodiment includes a first memory 31, a second memory 32, a third memory 33, and address decoders 34 to 3.
6, a cache controller 37, and a read / write controller 45. Here, 38 is an address bus, and 39 is a data bus.

【0055】第1メモリ31は1ラインに4ワードのキ
ャッシュデータ31aを格納している。キャッシュデー
タ31aを読み出す場合、読出し/書込みコントローラ
45は、第1メモリ31からキャッシュデータ31aを
含むラインを128ビットバス46を介して読み出し、
アドレスバス38のうちの2ビットによって、読み出さ
れたラインの4ワードの中からキャッシュデータ31a
を選び出してデータバス39に送り出す。
The first memory 31 stores 4-word cache data 31a in one line. When reading the cache data 31a, the read / write controller 45 reads a line including the cache data 31a from the first memory 31 via the 128-bit bus 46,
By using two bits of the address bus 38, the cache data 31a is read from the four words of the read line.
And sends it out to the data bus 39.

【0056】キャッシュデータ31aを書き込む場合、
読出し/書込みコントローラ45は、データバス39の
データを第1メモリ31のワードに書き込む。第2メモ
リ32はバリッドビット32aと20ビットのタグ32
bを格納している。第3メモリ33はダーティビット3
3aを格納している。
When writing the cache data 31a,
The read / write controller 45 writes the data of the data bus 39 to the word of the first memory 31. The second memory 32 includes a valid bit 32a and a 20-bit tag 32.
b. The third memory 33 is dirty bit 3
3a is stored.

【0057】ここでは、キャッシュデータの更新が行わ
れた場合、ダーティビット33aにHIGHを保持する
ものとする。
Here, when the cache data is updated, HIGH is held in the dirty bit 33a.

【0058】第2メモリ32と第3メモリ33はそれぞ
れ個別のアドレスデコーダ35、36を有し、タグ32
bの読み出しとダーティビット33aへの書き込みを同
時に行うことができるように構成されている。
The second memory 32 and the third memory 33 have individual address decoders 35 and 36, respectively.
It is configured such that reading of b and writing to the dirty bit 33a can be performed simultaneously.

【0059】キャッシュコントローラ37は、ダーティ
ビット信号42の読み出し及び書き込みを第3メモリ3
3に対して行い、バリッドビット信号43、20ビット
のタグ信号44の読み出し及び書き込みを第2メモリ3
2に対して行い、キャッシュヒット信号41を出力す
る。キャッシュヒットしている時、キャッシュコントロ
ーラ37は、キャッシュヒット信号41をHIGHにす
る。
The cache controller 37 reads and writes the dirty bit signal 42 from the third memory 3.
3 and read and write the valid bit signal 43 and the 20-bit tag signal 44 in the second memory 3.
2 and outputs a cache hit signal 41. When a cache hit occurs, the cache controller 37 sets the cache hit signal 41 to HIGH.

【0060】図2に示す第1実施例の動作について説明
する。キャッシュデータ31aの読み出しを行う命令リ
ードA0が実行されるとき、第1メモリ31からキャッ
シュデータ31aが、第2メモリ32からタグ32bと
バリッドビット32aが、第3メモリ33からダーティ
ビット33aが同時に読み出される。
The operation of the first embodiment shown in FIG. 2 will be described. When the instruction read A0 for reading the cache data 31a is executed, the cache data 31a is read from the first memory 31, the tag 32b and the valid bit 32a are read from the second memory 32, and the dirty bit 33a is read from the third memory 33 at the same time. It is.

【0061】キャッシュコントローラ378は、読み出
されたタグ32bとアドレスA0とを比較しキャッンュ
ヒット信号41を生成する。キャッシュミスしている場
合、ダーティビット33aがHIGHならばキャッシュ
データの更新が行われているため外部メモリにキャッシ
ュデータ31aを含むエントリを書き戻した後、キャッ
シュリプレースを開始する。ダーティビット33aがL
OWならば、そのままキャッシュリプレースを開始す
る。キャッシュヒットしている場合は、キャッシュデー
タ31aを外部へ出力する。
The cache controller 378 compares the read tag 32b with the address A0, and generates the cache hit signal 41. If a cache miss has occurred, if the dirty bit 33a is HIGH, the cache data has been updated, so an entry including the cache data 31a is written back to the external memory, and then cache replacement is started. Dirty bit 33a is L
If it is OW, the cache replacement is started as it is. If there is a cache hit, the cache data 31a is output to the outside.

【0062】次に、キャッシュメモリにデータを書き込
むストア命令(ストア命令Aとストア命令B)が2つ連
続しキャッシュヒットする場合について説明する。この
場合のキャッシュメモリにおけるストア命令のパイプラ
イン動作は上述した図3と同様に行われる。すなわち、
ステージ(1)では、第2メモリ32からストア命令A
に関するタグ32bを読み出し、読み出したタグ32b
とアドレスを比較しキャッシュヒット信号41の生成と
第3メモリ33からのダーティビット33aの読み出し
を行う。ステージ(2)では、ビット線のプリチャージ
を行う。ステージ(3)では、ストアデータを第1メモ
リ31のキャッシュデータ31aへ書き込み、第3メモ
リ33のダーティビット33aにHIGHを書き込む。
また、第2メモリ32からストア命令Bに関するタグ3
2bを読み出す。ステージ(4)では、ビット線のプリ
チャージを行う。ステージ(5)以降ではストア命令A
のステージ(3)、(4)と同様にストア命令Bによる
動作が行われる。
Next, a case will be described in which two store instructions (store instruction A and store instruction B) for writing data to the cache memory are consecutive and a cache hit occurs. In this case, the pipeline operation of the store instruction in the cache memory is performed in the same manner as in FIG. That is,
In the stage (1), the store instruction A from the second memory 32
Read out the tag 32b for the tag 32b
Then, the cache hit signal 41 is generated and the dirty bit 33 a is read from the third memory 33. In the stage (2), the bit lines are precharged. In stage (3), the store data is written to the cache data 31a of the first memory 31, and HIGH is written to the dirty bit 33a of the third memory 33.
The tag 3 relating to the store instruction B is stored in the second memory 32.
Read 2b. In the stage (4), the bit lines are precharged. Store instruction A after stage (5)
The operation by the store instruction B is performed in the same manner as in the stages (3) and (4).

【0063】本発明の第2実施例によるキャッシュメモ
リの構成について図4を参照して説明する。本実施例に
おいて、第1実施例と共通する構成要素には同じ参照符
号を付し、その説明を省略する。
The configuration of the cache memory according to the second embodiment of the present invention will be described with reference to FIG. In this embodiment, the same components as those in the first embodiment are denoted by the same reference numerals, and description thereof will be omitted.

【0064】この第2実施例においては、第1メモリ5
1のエントリ毎にダーティビット53aとキャッシュデ
ータ51aを格納する構成としている。これによって、
キャッシュデータ用のアドレスデコーダとダーティビッ
ト用のアドレスデコーダを1つのアドレスデコーダ54
によって共用することができる。
In the second embodiment, the first memory 5
Dirty bit 53a and cache data 51a are stored for each entry. by this,
An address decoder for cache data and an address decoder for dirty bits are combined into one address decoder 54.
Can be shared by

【0065】第1メモリ51と第2メモリ32はそれぞ
れ個別にアドレスデコーダ54,15を有する。これに
より、タグ32bの読み出しとダーティビット53aへ
の書き込みを同時に行うことができる。
The first memory 51 and the second memory 32 have address decoders 54 and 15 respectively. Thus, reading of the tag 32b and writing of the dirty bit 53a can be performed simultaneously.

【0066】この第2実施例のキャッシュデータ51a
を読み出す場合と書き込む場合の動作及びキャッシュメ
モリにデータを書き込むストア命令が2つ連続してキャ
ッシュヒットする場合の動作については、第1実施例と
同じである。
The cache data 51a of the second embodiment
The operation in the case of reading and writing the data and the operation in the case where two store instructions for writing data to the cache memory successively hit the cache are the same as those in the first embodiment.

【0067】以上好ましい実施例をあげて本発明を説明
したが、本発明は必ずしも上記実施例の内容に限定され
るものではない。
Although the present invention has been described with reference to the preferred embodiments, the present invention is not necessarily limited to the contents of the above embodiments.

【0068】[0068]

【発明の効果】以上説明したように本発明のキャッシュ
メモリによれば、以下に示すような効果が得られる。
As described above, according to the cache memory of the present invention, the following effects can be obtained.

【0069】第1に、ダーティビットとタグとを異なる
メモリに保持し、かつ個別のアドレスデコーダを備え、
ダーティビットの書き込みとタグの読み出しとを同時に
行うことができる構成としたので、連続するストア命令
を1クロックサイクルでパイプライン化することが可能
となり、これにより処理効率の向上が実現される。すな
わち、連続するストア命令をパイプライン動作させる場
合に停止サイクルを入れずに、1クロック周期でストア
動作を行うことができ、キャッシュメモリの性能を向上
させることができる。
First, a dirty bit and a tag are stored in different memories, and a separate address decoder is provided.
Since the writing of the dirty bit and the reading of the tag are performed at the same time, it is possible to pipeline the successive store instructions in one clock cycle, thereby improving the processing efficiency. That is, the store operation can be performed in one clock cycle without a stop cycle when a continuous store instruction is pipelined, and the performance of the cache memory can be improved.

【0070】第2に、ビット線のプリチャージ期間にお
いてプリチャージ以外の処理を行わないことにより、プ
リチャージ回路のサイジングによってプリチャージ時間
を短くすることが容易になり、高速化すなわちクロック
周期の短縮を容易に行うことができる。
Secondly, by performing no processing other than precharge during the precharge period of the bit line, the precharge time can be easily reduced by sizing the precharge circuit, and the speed can be increased, that is, the clock cycle can be shortened. Can be easily performed.

【0071】第3に、ダーティビットとタグとを異なる
メモリに保持し、個別のアドレスデコーダを有すること
によって、ダーティビットの書き込みとタグの読み出し
とを同時に行う際に書き込みデータを退避させるために
使用するメモリを増設する必要がない。
Third, since the dirty bit and the tag are stored in different memories and the individual address decoder is provided, the dirty bit and the tag are used to save the write data when writing the dirty bit and reading the tag at the same time. There is no need to add additional memory.

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

【図1】 本発明の実施の形態におけるキャッシュメモ
リの構成を示すブロック図である。
FIG. 1 is a block diagram illustrating a configuration of a cache memory according to an embodiment of the present invention.

【図2】 本発明の第1実施例におけるキャッシュメモ
リの構成を示すブロック図である。
FIG. 2 is a block diagram illustrating a configuration of a cache memory according to the first embodiment of the present invention.

【図3】 本発明のキャッシュメモリにデータを書き込
むストア命令が2つ連続してキャッシュヒットする場合
のパイプライン動作を説明するタイミングチャートであ
る。
FIG. 3 is a timing chart for explaining a pipeline operation in a case where two store instructions for writing data to the cache memory successively hit the cache memory according to the present invention;

【図4】 本発明の第2実施例におけるキャッシュメモ
リの構成を示すブロック図である。
FIG. 4 is a block diagram showing a configuration of a cache memory according to a second embodiment of the present invention.

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

【図6】 第1の従来例のキャッシュメモリにおけるパ
イプライン動作を説明するタイミングチャートである。
FIG. 6 is a timing chart illustrating a pipeline operation in the cache memory of the first conventional example.

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

【図8】 第2の従来例のキャッシュメモリにおけるパ
イプライン動作を説明するタイミングチャートである。
FIG. 8 is a timing chart illustrating a pipeline operation in the cache memory of the second conventional example.

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

11,31,51 第1メモリ 11a,31a,51a キャッシュデータ 12,32 第2メモリ 12a,32a バリッドビット 12b,32b タグ 13,33 第3メモリ 13a,33a,53a ダーティビット 14,15,16 アドレスデコーダ 17,37 キャッシュコントローラ 34,35,36 アドレスデコーダ 45 読出し/書込みコントローラ 54,55 アドレスデコーダ 11, 31, 51 First memory 11a, 31a, 51a Cache data 12, 32 Second memory 12a, 32a Valid bit 12b, 32b Tag 13, 33 Third memory 13a, 33a, 53a Dirty bit 14, 15, 16 Address decoder 17, 37 Cache controller 34, 35, 36 Address decoder 45 Read / write controller 54, 55 Address decoder

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 キャッシュデータを格納する第1のメモ
リと、 1エントリにタグデータと前記キャッシュデータが有効
か否かを示すバリッドビットを格納する第2のメモリ
と、 前記第1のメモリのキャッシュデータが更新されている
か否かを示すダーティビットを格納する第3のメモリ
と、 前記第2のメモリ及び第3のメモリにそれぞれ個別に備
えられたアドレスデコーダと、 前記第3のメモリへのダーティビットの書き込みと前記
第2メモリのタグの読み出しを同時に行う制御手段を備
えることを特徴とするキャッシュメモリ。
A first memory for storing cache data; a second memory for storing tag data and valid bits indicating whether or not the cache data is valid in one entry; and a cache of the first memory. A third memory for storing a dirty bit indicating whether data has been updated, an address decoder individually provided in the second memory and the third memory, and a dirty memory for the third memory. A cache memory comprising control means for simultaneously writing a bit and reading a tag from the second memory.
【請求項2】 前記第1のメモリにデータを書き込む第
1のストア命令と第2のストア命令がキャッシュヒット
する場合に、 前記制御手段は、 第1のストア命令に関する前記タグデータを読み出し、
読み出したタグデータと書込みアドレスを比較してキャ
ッシュヒット信号の生成と前記ダーティビットの読み出
しを行う第1のステージと、 プリチャージ処理のみを行う第2のステージと、 データの前記第1のメモリへの書込みと前記ダーティビ
ットの前記第3のメモリへの書込みを行うと同時に、前
記第2のストア命令に関するタグデータの前記第2のメ
モリからの読み出しを行う第3のステージと、 プリチャージ処理のみを行う第4のステージと、 データの前記第1のメモリへの書込みと前記ダーティビ
ットの前記第3のメモリへの書込みを行う第5のステー
ジと、 プリチャージ処理のみを行う第6のステージからなる1
クロックサイクルのパイプライン動作を行うことを特徴
とする請求項1に記載のキャッシュメモリ。
2. When a first store instruction and a second store instruction for writing data to the first memory cause a cache hit, the control unit reads the tag data relating to the first store instruction,
A first stage for generating a cache hit signal and reading the dirty bit by comparing the read tag data with a write address, a second stage for performing only a precharge process, and transferring data to the first memory. A third stage of reading the tag data relating to the second store instruction from the second memory at the same time as writing the dirty bit and writing the dirty bit to the third memory; From a fourth stage for writing data to the first memory and writing a dirty bit to the third memory, and a sixth stage for performing only precharge processing. Become one
2. The cache memory according to claim 1, wherein a pipeline operation of a clock cycle is performed.
【請求項3】 キャッシュデータ及びキャッシュデータ
が更新されているか否かを示すダーティビットをエント
リ毎に格納する第1のメモリと、 1エントリにタグデータと前記キャッシュデータが有効
か否かを示すバリッドビットを格納する第2のメモリ
と、 前記第1のメモリ及び第2のメモリにそれぞれ個別に備
えられたアドレスデコーダと、 前記第1のメモリへのダーティビットの書き込みと前記
第2メモリのタグの読み出しを同時に行う制御手段を備
えることを特徴とするキャッシュメモリ。
3. A first memory for storing, for each entry, cache data and a dirty bit indicating whether the cache data has been updated, and validity indicating whether or not the tag data and the cache data are valid in one entry. A second memory for storing bits; an address decoder separately provided in each of the first memory and the second memory; writing of a dirty bit to the first memory; and a tag of the second memory. A cache memory comprising control means for simultaneously performing reading.
【請求項4】 前記第1のメモリにデータを書き込む第
1のストア命令と第2のストア命令がキャッシュヒット
する場合に、 前記制御手段は、 第1のストア命令に関する前記タグデータを読み出し、
読み出したタグデータと書込みアドレスを比較してキャ
ッシュヒット信号の生成と前記ダーティビットの読み出
しを行う第1のステージと、 プリチャージ処理のみを行う第2のステージと、 前記第1のメモリへのデータと前記ダーティビットの書
込みを行うと同時に、前記第2のストア命令に関するタ
グデータの前記第2のメモリからの読み出しを行う第3
のステージと、 プリチャージ処理のみを行う第4のステージと、 前記第1のメモリへのデータと前記ダーティビットの書
込みを行う第5のステージと、 プリチャージ処理のみを行う第6のステージからなる1
クロックサイクルのパイプライン動作を行うことを特徴
とする請求項1に記載のキャッシュメモリ。
4. When a cache hit occurs between a first store instruction and a second store instruction for writing data to the first memory, the control unit reads the tag data relating to the first store instruction,
A first stage for comparing the read tag data with a write address to generate a cache hit signal and read the dirty bit, a second stage for performing only a precharge process, and a data to the first memory. And the third bit for simultaneously reading the tag data relating to the second store instruction from the second memory while writing the dirty bit.
, A fourth stage for performing only precharge processing, a fifth stage for writing data and the dirty bit to the first memory, and a sixth stage for performing only precharge processing. 1
2. The cache memory according to claim 1, wherein a pipeline operation of a clock cycle is performed.
JP23721296A 1996-08-19 1996-08-19 Cache memory Expired - Fee Related JP3152345B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP23721296A JP3152345B2 (en) 1996-08-19 1996-08-19 Cache memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP23721296A JP3152345B2 (en) 1996-08-19 1996-08-19 Cache memory

Publications (2)

Publication Number Publication Date
JPH1063575A true JPH1063575A (en) 1998-03-06
JP3152345B2 JP3152345B2 (en) 2001-04-03

Family

ID=17012052

Family Applications (1)

Application Number Title Priority Date Filing Date
JP23721296A Expired - Fee Related JP3152345B2 (en) 1996-08-19 1996-08-19 Cache memory

Country Status (1)

Country Link
JP (1) JP3152345B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100955433B1 (en) 2006-10-24 2010-05-04 엔이씨 일렉트로닉스 가부시키가이샤 Cache memory having pipeline structure and method for controlling the same

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100955433B1 (en) 2006-10-24 2010-05-04 엔이씨 일렉트로닉스 가부시키가이샤 Cache memory having pipeline structure and method for controlling the same
US7836253B2 (en) 2006-10-24 2010-11-16 Nec Electronics Corporation Cache memory having pipeline structure and method for controlling the same

Also Published As

Publication number Publication date
JP3152345B2 (en) 2001-04-03

Similar Documents

Publication Publication Date Title
US5953738A (en) DRAM with integral SRAM and arithmetic-logic units
US5245575A (en) Register circuit for copying contents of one register into another register
US5890195A (en) Dram with integral sram comprising a plurality of sets of address latches each associated with one of a plurality of sram
US6282603B1 (en) Memory with pipelined accessed and priority precharge
JPH07182870A (en) Synchronous random access memory
JPH0676566A (en) Semiconductor memory device
JPH08194679A (en) Method and device for processing digital signal and memory cell reading method
US6091667A (en) Semiconductor memory device and a data reading method and a data writing method therefor
JPH07248963A (en) Dram controller
JP3152345B2 (en) Cache memory
JP2956426B2 (en) Semiconductor storage device
JPH1196073A (en) High-performance multiport support lru memory
US5572479A (en) Semiconductor integrated circuit having a synchronous type memory
JP2000285671A (en) Semiconductor memory
JPS6235142B2 (en)
JPH10302475A (en) Memory control device
JP2004046593A (en) Cache memory and method for controlling it
JP3855002B2 (en) Counter, synchronized memory device and semiconductor memory
JPH0772879B2 (en) Cache memory device
JP3306901B2 (en) Cache memory
JP3559631B2 (en) Semiconductor memory and data processing device
JP3180877B2 (en) Memory interface circuit
JPH0334190A (en) Semiconductor memory device
JP2581484B2 (en) Data processing system
JPH0810443B2 (en) Memory control circuit

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080126

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20090126

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20100126

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees