JP3593123B2 - Set associative memory device - Google Patents
Set associative memory device Download PDFInfo
- Publication number
- JP3593123B2 JP3593123B2 JP2004110649A JP2004110649A JP3593123B2 JP 3593123 B2 JP3593123 B2 JP 3593123B2 JP 2004110649 A JP2004110649 A JP 2004110649A JP 2004110649 A JP2004110649 A JP 2004110649A JP 3593123 B2 JP3593123 B2 JP 3593123B2
- Authority
- JP
- Japan
- Prior art keywords
- way
- tlb
- prediction
- cache
- data
- 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.)
- Expired - Fee Related
Links
- 238000013500 data storage Methods 0.000 claims description 75
- 238000000034 method Methods 0.000 claims description 13
- 238000010586 diagram Methods 0.000 description 41
- 230000015654 memory Effects 0.000 description 38
- 230000006870 function Effects 0.000 description 8
- 230000008569 process Effects 0.000 description 8
- 238000011084 recovery Methods 0.000 description 6
- 230000003213 activating effect Effects 0.000 description 4
- 230000003111 delayed effect Effects 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000004913 activation Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Description
本発明は、セットアソシアティブ方式のメモリ装置に係わり、特に、消費電力を低減させ、かつ、データ読み出し時のタイムラグを低減させたセットアソシアティブ方式のメモリ装置に関する。 The present invention relates to a set associative memory device, and more particularly, to a set associative memory device in which power consumption is reduced and a time lag in reading data is reduced.
従来のセットアソシアティブ方式のメモリは、「並列計算機構成論」(富田眞治著、昭晃堂、2.3.2記憶制御装置、(1)記憶階層方式及び(2)キャッシュメモリ)に記載されている。 A conventional set associative memory is described in "Parallel Computer Architecture" (written by Shinji Tomita, Shokodo, 2.3.2 Storage Controller, (1) Storage Hierarchy, and (2) Cache Memory). I have.
図17は、前記公知文献に記載されている、従来のセットアソシアティブ方式のメモリの概略構成を示すブロック図であり、2セットアソシアティブのアドレス変換バッファ(以下、TLBと称す)691と2セットアソシアティブのキャッシュ692から構成される、TLB・キャッシュ装置である。
FIG. 17 is a block diagram showing a schematic configuration of a conventional set associative type memory described in the above-mentioned known document, in which a two-set associative address translation buffer (hereinafter, referred to as TLB) 691 and a two-set associative memory are shown. This is a TLB / cache device composed of a
アドレス600は、論理アドレスであり、TLB691により物理アドレスに変換されてキャッシュ692に入力される。
The
アドレス600は、論理ページ番号604とページ内オフセット601により構成される。
The
論理ページ番号604は、TLB691により物理ページ番号625に変換されキャッシュ692に入力される。
The
ページ内オフセット601は、変換されずにそのままキャッシュ692に入力される。
The
物理アドレスは、物理ページ番号625とページ内オフセット601により構成される。
The physical address is composed of a
以下、図17に示すTLB・キャッシュ装置の動作を説明する。 Hereinafter, the operation of the TLB / cache device shown in FIG. 17 will be described.
論理ページ番号604の下位ビット602は、TLBタグ格納部(610,611)に入力され、TLBタグ(612,613)が出力される。
The
これらのTLBタグは、TLBウェイ判定器614に入力される。 These TLB tags are input to the TLB way determiner 614.
ここで、610はTLBのウェイ0のタグを、611はTLBのウェイ1のタグをそれぞれ格納するメモリである。
Here,
次に、TLBウェイ判定器614では、論理ページ番号604の上位ビット603と各ウェイのTLBタグが比較され、どのウェイのTLBタグと一致したかを表すTLBウェイ判定信号615が出力される。
Next, the TLB
一方、論理ページ番号604の下位ビット602はTLBのTLBデータ格納部(620,621)に入力され、物理ページ番号(622,623)が出力される。
On the other hand, the
これらの物理ページ番号は、物理ページ番号選択器624に入力される。
These physical page numbers are input to the physical
ここで、620はウェイ0の物理ページ番号を、621はウェイ1の物理ページ番号をそれぞれ格納するメモリである。
Here, 620 is a memory for storing the physical page number of
物理ページ番号選択器624では、TLBウェイ判定信号615に基づいて、ウェイ0の物理ページ番号622またはウェイ1の物理ページ番号623のどちらかを選択し物理ページ番号625を出力する。
The physical
ページ内オフセット601は、キャッシュタグ格納部(630,631)に入力され、キャッシュタグ(632,633)が出力される。
The
これらのキャッシュタグ(632,633)は、キャッシュウェイ判定器634に入力される。 These cache tags (632, 633) are input to the cache way determiner 634.
ここで、630はキャッシュのウェイ0のタグを、631はキャッシュのウェイ1のタグをそれぞれ格納するメモリである。
Here, 630 is a memory for storing the tag of
次に、キャッシュウェイ判定器634では、物理ページ番号625と各ウェイのキャッシュタグ(632,633)が比較され、どのウェイのキャッシュタグと一致したかを表すキャッシュウェイ判定信号635が出力される。
Next, the cache
一方、ページ内オフセット601は、キャッシュデータ格納部(640,641)に入力され、データ(642,643)が出力される。
On the other hand, the
これらのデータ(642,643)は、データ選択器644に入力される。
These data (642, 643) are input to the
ここで、640はウェイ0のデータを、641はウェイ1のデータをそれぞれ格納するメモリである。
Here, 640 is a memory for storing data of
データ選択器644では、キャッシュウェイ判定信号635に基づいて、データ642またはデータ643を選択しデータ645を出力する。
The
このとき、物理ページ番号625とウェイ0のキャッシュタグ632が一致していればウェイ0のデータ642、物理ページ番号625とウェイ1のキャッシュタグ633が一致していればウェイ1のデータ643の値がデータ645の値となる。
At this time, if the
データ645の値は、一旦ラッチ646に格納されたあと、次のサイクルにおいてデータ647として出力される。
The value of the
このTLB・キャッシュ装置においては、TLBタグ格納部(610,611)、TLBデータ格納部(620,621)、キャッシュタグ格納部(630,631)、キャッシュデータ格納部(640,641)の8つのメモリは、同時に並列的に動作することが可能である。 In this TLB / cache device, eight TLB tag storage units (610, 611), TLB data storage units (620, 621), cache tag storage units (630, 631), and cache data storage units (640, 641) are provided. The memories can operate in parallel at the same time.
即ち、論理アドレス600が入力された時点で、これら8つのメモリは動作を開始できる。
That is, when the
一方、TLBタグ格納部(610,611)、TLBウェイ判定器614、物理ページ番号選択器624、キャッシュウェイ判定器634は、同時に実行することはできず、この順番で順々に実行しなければならない。
On the other hand, the TLB tag storage units (610, 611), the TLB
したがって、キャッシュウェイ判定器634の出力であるキャッシュウェイ判定信号635の値を生成するのには時間がかかる。
Therefore, it takes time to generate the value of the cache
このような理由から、従来の2セットアソシアティブ方式のキャッシュでは、キャッシュウェイ判定信号635の値が判明する前に、あらかじめキャッシュデータ格納部のウェイ0の部分640とウェイ1の部分641の両方を動作させ、ウェイ0のデータ642とウェイ1のデータ643を出力しておき、これをキャッシュウェイ判定信号635で選択する方式がとられていた。
For this reason, in the conventional two-set associative cache, before the value of the cache
この方式では、キャッシュデータ格納部(640,641)のウェイ0の部分640とウェイ1の部分641の両方を同時に動作させるために、キャッシュを動作させるための電力が大きくなるという問題点があった。
In this method, there is a problem that the power for operating the cache increases because both the
また、TLBタグ格納部(610,611)、TLBウェイ判定器614、物理ページ番号選択器624、キャッシュウェイ判定器634、及び、データ選択器644は順番に実行しなければならず、TLB・キャッシュ装置に論理アドレス600が入力されてからデータ645が出力されるまでのタイムラグ(遅延時間)が大きくなるという問題点があった。
The TLB tag storage units (610, 611), the TLB
前記問題点を解決するために、セットアソシアティブ方式のキャッシュメモリにおいて、データの読み出し時のセンスアンプの活性化を、タグからのヒット信号によって行い、ヒットした時点でセンスアンプを活性化して、データ読み出し時の消費電力を低減することが、特開平4−328656号公報に記載されている。 To solve the above problem, in a set associative cache memory, activation of a sense amplifier at the time of data reading is performed by a hit signal from a tag, and when a hit occurs, the sense amplifier is activated to read data. The reduction of power consumption at the time is described in Japanese Patent Application Laid-Open No. 4-328656.
また、前記問題点を解決するために、セットアソシアティブ方式のキャッシュメモリにおいて、外部から入力されるアドレスとタグ部から読み出されたタグとを比較するアドレス比較部からのヒット信号が出力される前に、直前にアクセスしたデータ部を示すフラグ情報を記憶部に記憶しておき、該フラグ情報を用いることにより、アドレス比較器からのヒット信号が出力される前に、キャッシュメモリのデータ部からデータをデータバスに出力することが、特開平4−252343号公報に記載されている。 Also, in order to solve the above problem, in a set associative cache memory, a hit signal is not output from an address comparing unit that compares an externally input address with a tag read from a tag unit. In the storage unit, flag information indicating the data unit accessed immediately before is stored in the storage unit, and by using the flag information, the data from the data unit of the cache memory is output before the hit signal is output from the address comparator. Is described in Japanese Patent Application Laid-Open No. 4-252343.
前記特開平4−328656号公報に記載されたセットアソシアティブ方式のキャッシュメモリでは、データ読み出し時の消費電力を低減することが可能であるが、データ読み出しのタイムラグを低減することについて考慮されていないという問題点があった。 In the set associative cache memory described in Japanese Patent Application Laid-Open No. 4-328656, it is possible to reduce the power consumption at the time of reading data, but it is not considered to reduce the time lag of reading data. There was a problem.
また、前記特開平4−252343号公報に記載されたセットアソシアティブ方式のキャッシュメモリでは、データ読み出しのタイムラグを低減することが可能であるが、複数の連続した領域を交互にアクセスする場合にウェイを正しく予測する機構を具備しておらず、また、アドレス変換バッファを具備する、セットアソシアティブ方式のキャッシュメモリのデータ読み出し時のタイムラグについて考慮されていないという問題点があった。 In the set associative cache memory described in Japanese Patent Laid-Open No. 4-252343, it is possible to reduce the time lag of data reading. However, when a plurality of continuous areas are alternately accessed, a way is set. There is a problem in that the system does not have a mechanism for correctly predicting and does not consider a time lag in reading data from a set associative cache memory having an address translation buffer.
本発明は、前記従来技術の問題点を解決するためになされたものであり、本発明の目的は、セットアソシアティブ方式のメモリ装置において、消費電力を低減させ、かつ、データ読み出し時のタイムラグを低減させることが可能な技術を提供することにある。 SUMMARY OF THE INVENTION The present invention has been made to solve the problems of the prior art, and an object of the present invention is to reduce power consumption and reduce a time lag in data reading in a set associative memory device. It is an object of the present invention to provide a technology that can be used.
また、本発明の他の目的は、アドレス変換バッファを具備する、セットアソシアティブ方式のメモリ装置において、消費電力を低減させ、かつ、データ読み出し時のタイムラグを低減させることが可能な技術を提供することにある。 Another object of the present invention is to provide a technique capable of reducing power consumption and reducing a time lag at the time of reading data in a set associative memory device including an address translation buffer. It is in.
また、本発明の他の目的は、アドレス変換バッファを具備する、セットアソシアティブ方式のメモリ装置において、いくつかの連続した領域を交互にアクセスする場合に、データ読み出しのタイムラグを低減させることが可能な技術を提供することにある。
本発明の前記ならびにその他の目的と新規な特徴は、本明細書の記述及び添付図面によって明らかにする。
Another object of the present invention is to provide a set associative memory device having an address translation buffer, which can reduce the time lag of data reading when several continuous areas are alternately accessed. To provide technology.
The above and other objects and novel features of the present invention will become apparent from the description of the present specification and the accompanying drawings.
本願において開示される発明のうち、代表的なものの概要を簡単に説明すれば、下記の通りである。 The following is a brief description of an outline of typical inventions disclosed in the present application.
(1)タグを格納するタグ格納部と、データを格納するデータ格納部と、アクセスアドレスの一部とタグ格納部に格納されているタグとを比較しどのウェイがヒットしたかを示すウェイ判定信号を出力するウェイ判定器と、ウェイ選択信号に基づきその選択されたウェイのデータ格納部のデータを選択するデータ選択器とを具備するセットアソシアティブ方式のメモリ装置において、ウェイ判定信号の予測値を発生するウェイ予測部と、ウェイ予測部からの予測値に基づき予測されたウェイのデータ格納部だけを活性化する手段と、前記予測値をウェイ選択信号としてデータ選択器に入力する手段と、ウェイ判定器からのウェイ判定信号と前記予測値を比較し、不一致の場合にウェイ予測判定信号を出力するウェイ予測判定部と、ウェイ予測判定部からのウェイ予測判定信号に基づきウェイ予測部の予測値をヒットしたウェイを示すウェイ判定信号に変更する手段とを具備することを特徴とする。 (1) A tag storage unit for storing a tag, a data storage unit for storing data, and a part of an access address and a tag stored in the tag storage unit are compared to determine which way has been hit. In a set associative memory device including a way determiner that outputs a signal, and a data selector that selects data of a data storage unit of the selected way based on a way selection signal, a predicted value of the way determination signal is calculated. Means for activating only a data storage unit of a way predicted based on a predicted value from the way predicting unit to be generated, a means for inputting the predicted value as a way selection signal to a data selector, A way prediction determination unit that compares a way determination signal from a determiner with the predicted value and outputs a way prediction determination signal when the two do not match, Characterized by comprising a means for changing the way the determination signal indicating the hit way prediction value of the way prediction unit based on a way prediction determination signal from tough.
(2)前記(1)の手段において、ウェイ予測部からの予測値に基づき予測されたウェイのタグ格納部だけを活性化する手段を、さらに具備することを特徴とする。 (2) The means of (1), further comprising means for activating only the tag storage unit of the way predicted based on the predicted value from the way prediction unit.
(3)前記(1)または(2)の手段において、ウェイ予測部が、ウェイの番号値を記憶する複数の予測ウェイラッチを有し、複数の連続した領域をアクセスする場合に、対応する複数の予測ウェイラッチに記憶されたウェイの番号値をウェイ判定信号の予測値として出力することを特徴とする。 (3) In the means of the above (1) or (2), the way prediction section has a plurality of prediction way latches for storing way number values, and when accessing a plurality of continuous areas, And outputting the way number value stored in the predicted way latch as the predicted value of the way determination signal.
(4)前記(1)ないし(3)の手段において、メモリ装置が、さらに、セットアソシアティブ方式のアドレス変換バッファを具備し、前記メモリ装置のウェイ判定器が、アドレス変換バッファからのTLBデータとタグ格納部に格納されているタグとを比較しどのウェイがヒットしたかを示すウェイ判定信号を出力し、前記アドレス変換バッファが、TLBタグを格納するTLBタグ格納部と、TLBデータを格納するTLBデータ格納部と、アクセスアドレスの一部とTLBタグ格納部に格納されているTLBタグとを比較しどのウェイがヒットしたかを示すTLBウェイ判定信号を出力するTLBウェイ判定器と、TLBウェイ判定信号の予測値を発生するTLBウェイ予測部と、前記TLBウェイ予測部からの予測値に基づき予測されたTLBウェイのTLBデータ格納部だけを活性化する手段と、前記TLBウェイ予測部からの予測値がウェイ選択信号として入力され、予測されたウェイのTLBデータ格納部のTLBデータを選択するTLBデータ選択器と、TLBウェイ判定器からのTLBウェイ判定信号と前記予測値を比較し、不一致の場合にTLBウェイ予測判定信号を出力するTLBウェイ予測判定部と、TLBウェイ予測判定部からのTLBウェイ予測判定信号に基づきTLBウェイ予測部の予測値をヒットしたウェイを示すTLBウェイ判定信号に変更する手段とを具備することを特徴とする。 (4) In the above-mentioned means (1) to (3), the memory device further includes a set associative type address translation buffer, and the way determinator of the memory device is configured to store the TLB data from the address translation buffer and the tag. The address translation buffer compares the tag stored in the storage unit and outputs a way determination signal indicating which way has been hit, and the address translation buffer includes a TLB tag storage unit for storing a TLB tag, and a TLB for storing TLB data. A data storage unit, a TLB way determination unit that compares a part of the access address with a TLB tag stored in the TLB tag storage unit and outputs a TLB way determination signal indicating which way has been hit, and a TLB way determination A TLB way predictor for generating a predicted value of a signal, and a predicted value based on a predicted value from the TLB way predictor. Means for activating only the TLB data storage section of the selected TLB way, and TLB data which receives a prediction value from the TLB way prediction section as a way selection signal and selects TLB data in the TLB data storage section of the predicted way. A selector, a TLB way determination signal from the TLB way determination unit, which compares the TLB way determination signal from the TLB way determination unit with the predicted value, and outputs a TLB way prediction determination signal when the two values do not match. Means for changing the prediction value of the TLB way prediction unit to a TLB way determination signal indicating a hit way based on the prediction determination signal.
(5)前記(4)の手段において、TLBウェイ予測部からの予測値に基づき予測されたウェイのTLBタグ格納部だけを活性化する手段を、さらに具備することを特徴とする。 (5) The means according to (4), further comprising means for activating only the TLB tag storage unit of the way predicted based on the predicted value from the TLB way prediction unit.
(6)前記(4)または(5)の手段において、前記TLBウェイ予測部が、ウェイの番号値を記憶する複数のTLB予測ウェイラッチを有し、複数の連続した領域をアクセスする場合に、対応する複数のTLB予測ウェイラッチに記憶されたTLBウェイの番号値をTLBウェイ判定信号の予測値として出力することを特徴とする。 (6) In the means of (4) or (5), when the TLB way prediction unit has a plurality of TLB prediction way latches for storing way number values and accesses a plurality of continuous areas, TLB way number values stored in a plurality of corresponding TLB prediction way latches are output as prediction values of a TLB way determination signal.
(7)タグを格納するタグ格納部と、データを格納するデータ格納部と、アクセスアドレスの一部とタグ格納部に格納されているタグとを比較しどのウェイがヒットしたかを示すウェイ判定信号を出力するウェイ判定器と、ウェイ選択信号に基づき選択されたウェイのデータ格納部のデータを選択するデータ選択器とを具備するセットアソシアティブ方式のメモリ装置において、ウェイの番号値を記憶する複数の予測ウェイラッチを有し、複数の連続した領域をアクセスする場合に、対応する複数の予測ウェイラッチに記憶されたウェイの番号値をウェイ判定信号の予測値として出力するウェイ予測部と、前記予測値をウェイ選択信号としてデータ選択器に入力する手段と、ウェイ判定器からのウェイ判定信号と前記予測値を比較し、不一致の場合にウェイ予測判定信号を出力するウェイ予測判定部と、ウェイ予測判定部からのウェイ予測判定信号に基づきウェイ予測部の予測値をヒットしたウェイを示すウェイ判定信号に変更する手段とを具備することを特徴とする。 (7) A tag storage unit for storing a tag, a data storage unit for storing data, and a part of an access address and a tag stored in the tag storage unit are compared to determine which way has been hit. In a set associative memory device including a way determiner that outputs a signal and a data selector that selects data of a data storage unit of a way selected based on a way selection signal, a plurality of memories each storing a way number value A way prediction unit having a prediction way latch, and when accessing a plurality of continuous areas, a way prediction unit that outputs a number value of a way stored in a corresponding plurality of prediction way latches as a prediction value of a way determination signal; Means for inputting a predicted value as a way selection signal to the data selector, and comparing the way determination signal from the way determiner with the predicted value, A way prediction determination unit that outputs a way prediction determination signal in the case; and means for changing a prediction value of the way prediction unit to a way determination signal indicating a hit way based on the way prediction determination signal from the way prediction determination unit. It is characterized by the following.
(8)前記(7)の手段において、前記メモリ装置が、さらに、セットアソシアティブ方式のアドレス変換バッファを具備し、前記メモリ装置のウェイ判定器が、アドレス変換バッファからのTLBデータとタグ格納部に格納されているタグとを比較しどのウェイがヒットしたかを示すウェイ判定信号を出力し、前記アドレス変換バッファが、TLBタグを格納するTLBタグ格納部と、TLBデータを格納するTLBデータ格納部と、アクセスアドレスの一部とTLBタグ格納部に格納されているTLBタグとを比較しどのウェイがヒットしたかを示すTLBウェイ判定信号を出力するTLBウェイ判定器と、ウェイの番号値を記憶する複数のTLB予測ウェイラッチを有し、複数の連続した領域をアクセスする場合に、対応する複数のTLB予測ウェイラッチに記憶されたTLBウェイの番号値をTLBウェイ判定信号の予測値として出力するTLBウェイ予測部と、TLBウェイ予測部からの予測値が選択信号として入力され、予測されたウェイのTLBデータ格納部のTLBデータを選択するTLBデータ選択器と、TLBウェイ判定器からのTLBウェイ判定信号と前記予測値を比較し、不一致の場合にTLBウェイ予測判定信号を出力するTLBウェイ予測判定部と、TLBウェイ予測判定部からのTLBウェイ予測判定信号に基づきTLBウェイ予測部の予測値をヒットしたウェイを示すTLBウェイ判定信号に変更する手段とを具備することを特徴とする。 (8) In the means of the above (7), the memory device further comprises a set associative address translation buffer, and the way determinator of the memory device stores the TLB data from the address translation buffer and the tag storage unit. The address conversion buffer compares the stored tag with the stored tag and outputs a way determination signal indicating which way is hit. The address translation buffer stores a TLB tag and a TLB data storage that stores TLB data. And a TLB way discriminator that compares a part of the access address with the TLB tag stored in the TLB tag storage unit and outputs a TLB way decision signal indicating which way has been hit, and stores the way number value. A plurality of TLB prediction way latches, and a plurality of TLB prediction way latches are provided. A TLB way prediction unit that outputs the number value of the TLB way stored in the B prediction way latch as a prediction value of the TLB way determination signal, and a prediction value from the TLB way prediction unit is input as a selection signal, and the predicted way A TLB data selector for selecting TLB data in a TLB data storage unit, a TLB way determination signal from a TLB way determiner, and the predicted value, and a TLB way prediction determination for outputting a TLB way prediction determination signal when they do not match. And a means for changing the prediction value of the TLB way prediction unit to a TLB way determination signal indicating a hit way based on the TLB way prediction determination signal from the TLB way prediction determination unit.
前記(1)または(2)項に記載された手段によれば、セットアソシアティブ方式のメモリ装置において、ウェイ予測部によってどのウェイがヒットするかを予測し、予測されたウェイのデータ格納部、あるいは、予測されたタグ格納部およびデータ格納部のみを動作させるようにしたので、メモリ装置を動作させるための消費電力を低減させ、かつ、データ読み出しのタイムラグを低減させることが可能となる。 According to the means described in the above item (1) or (2), in the memory device of the set associative system, which way is hit by the way prediction unit, and the data storage unit of the predicted way, or Since only the predicted tag storage unit and data storage unit are operated, it is possible to reduce the power consumption for operating the memory device and reduce the time lag of data reading.
また、前記(3)項に記載された手段によれば、ウェイ予測部によってどのウェイがヒットするかを予測し、予測されたウェイのデータ格納部、あるいは、予測されたタグ格納部およびデータ格納部のみを動作させるようにしたセットアソシアティブ方式のメモリ装置において、複数の連続した領域をアクセスする場合に、ウェイ予測部の複数の予測ウェイラッチに記憶されたウェイの番号値をウェイ判定信号の予測値として用いるようにしたので、いくつかの連続した領域を交互にアクセスする場合に、メモリ装置を動作させるための消費電力を低減させ、かつ、データ読み出しのタイムラグを低減させることが可能となる。 According to the means described in the above item (3), which way is hit by the way prediction unit, the data storage unit of the predicted way, or the predicted tag storage unit and the data storage unit In the memory device of the set associative system in which only the section is operated, when accessing a plurality of continuous areas, the number value of the way stored in the plurality of predicted way latches of the way predicting section is used to predict the way determination signal. Since it is used as a value, it is possible to reduce the power consumption for operating the memory device and reduce the time lag of data reading when alternately accessing some continuous areas.
また、前記(4)または(5)項に記載された手段によれば、アドレス変換バッファを具備するセットアソシアティブ方式のメモリ装置において、アドレス変換バッファのTLBウェイ予測部によってアドレス変換バッファのどのウェイがヒットするかを予測し、予測されたウェイのTLBデータ格納部、あるいは、予測されたTLBタグ格納部およびTLBデータ格納部のみを動作させるようにするとともに、メモリ装置のウェイ予測部によってメモリ装置のどのウェイがヒットするかを予測し、予測されたウェイのデータ格納部、あるいは、予測されたタグ格納部およびデータ格納部のみを動作させるようにしたので、アドレス変換バッファを具備するメモリ装置を動作させるための消費電力を低減させ、かつ、データ読み出しのタイムラグを低減させることが可能となる。 According to the means described in (4) or (5), in a set associative memory device having an address translation buffer, which way of the address translation buffer is determined by the TLB way prediction unit of the address translation buffer. A hit is predicted, and the TLB data storage unit of the predicted way or only the predicted TLB tag storage unit and the TLB data storage unit is operated, and the way prediction unit of the memory device performs the operation of the memory device. Since a way to be hit is predicted and only the predicted way data storage unit or the predicted tag storage unit and the predicted data storage unit are operated, the memory device including the address translation buffer is operated. Power consumption for data read and data read time. It is possible to reduce the grayed.
また、前記(6)項に記載された手段によれば、アドレス変換バッファのTLBウェイ予測部によってアドレス変換バッファのどのウェイがヒットするかを予測し、予測されたウェイのTLBデータ格納部、あるいは、予測されたTLBタグ格納部およびTLBデータ格納部のみを動作させるようにするとともに、メモリ装置のウェイ予測部によってメモリ装置のどのウェイがヒットするかを予測し、予測されたウェイのデータ格納部、あるいは、予測されたタグ格納部およびデータ格納部のみを動作させるようにした、アドレス変換バッファを具備するセットアソシアティブ方式のメモリ装置において、複数の連続した領域をアクセスする場合に、アドレス変換バッファのTLBウェイ予測部およびメモリ装置のウェイ予測部の複数の予測ウェイラッチに記憶されたウェイの番号値を、アドレス変換バッファのTLBウェイ判定信号およびメモリ装置のウェイ判定信号の予測値として用いるようにしたので、いくつかの連続した領域を交互にアクセスする場合に、メモリ装置を動作させるための消費電力を低減させ、かつ、データ読み出しのタイムラグを低減させることが可能となる。 According to the means described in the above item (6), the TLB way prediction unit of the address translation buffer predicts which way of the address translation buffer will hit, and the TLB data storage unit of the predicted way, or Only the predicted TLB tag storage unit and the TLB data storage unit are operated, and the way prediction unit of the memory device predicts which way of the memory device is to be hit. Alternatively, in a set associative memory device having an address translation buffer, which operates only the predicted tag storage and data storage, when accessing a plurality of continuous areas, Plurality of predictions by TLB way predictor and way predictor of memory device Since the way number value stored in the way latch is used as the predicted value of the TLB way determination signal of the address translation buffer and the predicted value of the way determination signal of the memory device, when several consecutive areas are alternately accessed, Power consumption for operating the memory device can be reduced, and a time lag of data reading can be reduced.
また、前記(7)項に記載された手段によれば、セットアソシアティブ方式のメモリ装置において、ウェイの番号値を記憶する複数の予測ウェイラッチを有するウェイ予測部により、複数の連続した領域をアクセスする場合に、どのウェイがヒットするかを予測するようにしたので、いくつかの連続した領域を交互にアクセスする場合に、データ読み出しのタイムラグを低減させることが可能となる。 According to the means described in the above item (7), in a set associative memory device, a plurality of continuous areas are accessed by a way prediction unit having a plurality of prediction way latches for storing way number values. In this case, which way is hit is predicted, so that when several consecutive areas are alternately accessed, the time lag of data reading can be reduced.
また、前記(8)項に記載された手段によれば、アドレス変換バッファを具備するセットアソシアティブ方式のメモリ装置において、複数の連続した領域をアクセスする場合に、ウェイの番号値を記憶する複数のTLB予測ウェイラッチを有するTLBウェイ予測部により、アドレス変換バッファのどのウェイがヒットするかを予測するとともに、ウェイの番号値を記憶する複数の予測ウェイラッチを有するウェイ予測部により、メモリ装置のどのウェイがヒットするかを予測するようにしたので、データ読み出しのタイムラグを低減させることが可能となる。 According to the means described in the above item (8), in a set associative memory device having an address translation buffer, when accessing a plurality of continuous areas, a plurality of ways for storing way number values are stored. A TLB way prediction unit having a TLB prediction way latch predicts which way in the address translation buffer will be hit, and a way prediction unit having a plurality of prediction way latches for storing the number value of the way, Since the way is predicted to be hit, the time lag of data reading can be reduced.
本願において開示される発明のうち、代表的なものによって得られる効果を簡単に説明すれば、下記の通りである。
(1)セットアソシアティブ方式のメモリ装置において、ウェイ予測部によってどのウェイがヒットするかを予測し、予測されたウェイのデータ格納部、あるいは、予測されたタグ格納部およびデータ格納部のみを動作させるようにしたので、メモリ装置を動作させるための消費電力を低減させ、かつ、データ読み出しのタイムラグを低減させることが可能となる。
The effects obtained by typical aspects of the invention disclosed in the present application will be briefly described as follows.
(1) In a memory device of the set associative system, a way prediction unit predicts which way will be hit, and only the data storage unit of the predicted way or only the predicted tag storage unit and the data storage unit are operated. As a result, power consumption for operating the memory device can be reduced, and a time lag of data reading can be reduced.
(2)ウェイ予測部によってどのウェイがヒットするかを予測するようにしたセットアソシアティブ方式のメモリ装置において、複数の連続した領域をアクセスする場合に、ウェイ予測部の複数の予測ウェイラッチに記憶されたウェイの番号値をウェイ判定信号の予測値として用いるようにしたので、いくつかの連続した領域を交互にアクセスする場合に、データ読み出しのタイムラグを低減させることが可能となる。 (2) In a set associative memory device in which a way prediction unit predicts which way will be hit, when accessing a plurality of continuous areas, the memory is stored in a plurality of prediction way latches of the way prediction unit. Since the way number value thus used is used as the predicted value of the way determination signal, it is possible to reduce the data read time lag when several consecutive areas are alternately accessed.
(3)アドレス変換バッファを具備するセットアソシアティブ方式のメモリ装置において、アドレス変換バッファのTLBウェイ予測部によってアドレス変換バッファのどのウェイがヒットするかを予測し、予測されたウェイのTLBデータ格納部、あるいは、予測されたTLBタグ格納部およびTLBデータ格納部のみを動作させるようにするとともに、メモリ装置のウェイ予測部によってメモリ装置のどのウェイがヒットするかを予測し、予測されたウェイのデータ格納部、あるいは、予測されたタグ格納部およびデータ格納部のみを動作させるようにしたので、アドレス変換バッファを具備するメモリ装置を動作させるための消費電力を低減させ、かつ、データ読み出しのタイムラグを低減させることが可能となる。 (3) In a set associative memory device having an address translation buffer, a TLB way prediction unit of the address translation buffer predicts which way of the address translation buffer will be hit, and a TLB data storage unit of the predicted way; Alternatively, while only the predicted TLB tag storage unit and TLB data storage unit are operated, which way of the memory device is hit by the way prediction unit of the memory device, the data storage of the predicted way is performed. , Or only the predicted tag storage and data storage are operated, so that the power consumption for operating the memory device having the address translation buffer is reduced, and the time lag of data reading is reduced. It is possible to do.
(4)アドレス変換バッファのTLBウェイ予測部によってアドレス変換バッファのどのウェイがヒットするかを予測し、予測されたウェイのTLBデータ格納部、あるいは、予測されたTLBタグ格納部およびTLBデータ格納部のみを動作させるようにするとともに、メモリ装置のウェイ予測部によってメモリ装置のどのウェイがヒットするかを予測し、予測されたウェイのデータ格納部、あるいは、予測されたタグ格納部およびデータ格納部のみを動作させるようにした、アドレス変換バッファを具備するセットアソシアティブ方式のメモリ装置において、複数の連続した領域をアクセスする場合に、アドレス変換バッファのTLBウェイ予測部およびメモリ装置のウェイ予測部の複数の予測ウェイラッチに記憶されたウェイの番号値を、アドレス変換バッファのTLBウェイ判定信号およびメモリ装置のウェイ判定信号の予測値として用いるようにしたので、いくつかの連続した領域を交互にアクセスする場合に、メモリ装置を動作させるための消費電力を低減させ、かつ、データ読み出しのタイムラグを低減させることが可能となる。 (4) The TLB way prediction unit of the address translation buffer predicts which way in the address translation buffer will hit, and the TLB data storage unit of the predicted way, or the predicted TLB tag storage unit and TLB data storage unit Of the memory device is predicted by the way prediction unit of the memory device, and the data storage unit of the predicted way, or the predicted tag storage unit and the data storage unit In a set associative memory device having an address translation buffer, which operates only a plurality of regions, when a plurality of continuous areas are accessed, a plurality of TLB way prediction units of the address translation buffer and a plurality of way prediction units of the memory device are used. Number of way stored in predicted way latch Is used as a predicted value of the TLB way determination signal of the address translation buffer and the way determination signal of the memory device. Therefore, when several continuous areas are alternately accessed, the power consumption for operating the memory device is reduced. It is possible to reduce the time lag of data reading.
(5)セットアソシアティブ方式のメモリ装置において、ウェイの番号値を記憶する複数の予測ウェイラッチを有するウェイ予測部により、複数の連続した領域をアクセスする場合に、どのウェイがヒットするかを予測するようにしたので、いくつかの連続した領域を交互にアクセスする場合に、データ読み出しのタイムラグを低減させることが可能となる。 (5) In a memory device of the set associative system, a way prediction unit having a plurality of prediction way latches for storing way number values predicts which way will hit when accessing a plurality of continuous areas. Thus, when several consecutive areas are alternately accessed, it is possible to reduce the data read time lag.
(6)アドレス変換バッファを具備するセットアソシアティブ方式のメモリ装置において、複数の連続した領域をアクセスする場合に、ウェイの番号値を記憶する複数のTLB予測ウェイラッチを有するTLBウェイ予測部により、アドレス変換バッファのどのウェイがヒットするかを予測するとともに、ウェイの番号値を記憶する複数の予測ウェイラッチを有するウェイ予測部により、メモリ装置のどのウェイがヒットするかを予測するようにしたので、データ読み出しのタイムラグを低減させることが可能となる。 (6) In a set-associative memory device having an address translation buffer, when accessing a plurality of continuous areas, an address is obtained by a TLB way prediction unit having a plurality of TLB prediction way latches for storing way number values. Since a way prediction unit having a plurality of prediction way latches for storing way number values is predicted by predicting which way in the conversion buffer will be hit, The time lag of data reading can be reduced.
(7)発明によるメモリ装置を、プロセッサのキャッシュメモリに使用することにより、キャッシュメモリの消費電力を低減させるとともに、キャッシュメモリの動作を高速に行なうことができ、これにより、消費電力が少なくマシンサイクルの短いプロセッサを実現することが可能になる。 (7) By using the memory device according to the present invention as a cache memory of a processor, the power consumption of the cache memory can be reduced, and the operation of the cache memory can be performed at high speed. Can be realized.
以下、図面を参照して本発明の実施例を詳細に説明する。
なお、実施例を説明するための全図において、同一機能を有するものは同一符号を付け、その繰り返しの説明は省略する。
図1は、本発明のメモリ装置の一実施例(実施例1)であるキャッシュの概略構成を示すブロック図であり、本実施例1のキャッシュをプロセッサに適用した例を示す図である。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
In all the drawings for describing the embodiments, components having the same function are denoted by the same reference numerals, and a repeated description thereof will be omitted.
FIG. 1 is a block diagram showing a schematic configuration of a cache which is an embodiment (Embodiment 1) of the memory device of the present invention, and is a diagram showing an example in which the cache of
図1において、プロセッサは、プロセッサ本体182、アドレス変換バッファ(以下、TLBと称す)191、キャッシュ192、キャッシュウェイ予測部193、及び、キャッシュウェイ予測判定部194から構成される。
In FIG. 1, the processor includes a processor
プロセッサ本体182は、アドレス生成部190とデータ処理部195を含んでいる。
The processor
TLB191は、2セットアソシアティブ方式のメモリであり、また、キャッシュ192は2セットアソシアティブ方式のメモリであり、ウェイの予測を行なっている。
The
図2は、図1に示す、キャッシュ192、キャッシュウェイ予測部193、及び、キャッシュウェイ予測判定部194のより詳細な構成を拡大して示すブロック図であり、図3は、図1に示すTLB191のより詳細な構成を拡大して示すブロック図である。
FIG. 2 is an enlarged block diagram showing a more detailed configuration of the
図4は、図1に示すプロセッサのタイムチャートを示す図である。 FIG. 4 is a diagram showing a time chart of the processor shown in FIG.
図4は、キャッシュのウェイ0が予測され、予測がヒットした場合のタイムチャートを示す図である。
FIG. 4 is a diagram showing a time chart when the
まず、図1と図4を用いて、図1に示すプロセッサの動作の概要を説明する。 First, the outline of the operation of the processor shown in FIG. 1 will be described with reference to FIGS.
図1に示すプロセッサは、パイプライン制御で処理される。 The processor shown in FIG. 1 is processed by pipeline control.
図4における、数字401は命令の番号を表し、1と番号の書かれた領域は、命令1を処理していることを示す。
In FIG. 4, a numeral 401 indicates an instruction number, and an area in which 1 is written indicates that
以下、命令1の処理について述べる。
Hereinafter, the processing of the
図1に示すように、TLB191、キャッシュ192、キャッシュウェイ予測部193、及び、キャッシュウェイ予測判定器194から構成される部分は、動作するタイミングの違いによりメモリ部180とウェイ判定部181に分けられる。
As shown in FIG. 1, a portion including the
時刻1で、アドレス生成部190はアドレスを生成し、次の時刻に前記アドレスをアドレス100として出力する。
At
時刻2で、メモリ部180は、アドレス100を入力して1サイクル後にデータ147をデータ処理部195に出力する。
At
このとき、キャッシュウェイ予測部193の出力信号であるキャッシュ予測ウェイ信号151はウェイ0を示しており、メモリ部180のキャッシュデータ格納部140、141に関しては、予測されたウェイ、すなわち、ウェイ0のキャッシュデータ格納部140のみが動作する。
At this time, the cache prediction way signal 151 which is an output signal of the cache
そして、前記キャッシュデータ格納部140から読み出されたデータがデータ147として出力される。
Then, the data read from the cache
時刻3では、データ処理部195がデータ147を入力して処理する。
At
また、時刻3では、ウェイ判定部181によって、メモリ部180から読み出されたデータ147が正しいウェイのデータであるか確認するための判定が行われる。
At
メモリ部180とこのウェイ判定部181はパイプライン方式で処理を行うことができる。
The
すなわち、時刻3において命令1がウェイ判定部181で処理されているときは、命令2がメモリ部180で処理される。
That is, when
すべての命令のデータがウェイ判定部181によって、正しいウェイのデータであると判定されると(すなわち、ウェイ予測がヒットすると)、図4のようなタイムチャートとデータが処理される。
If the
次に、図1〜図4を用いて、図1に示すプロセッサの動作の詳細を説明する。 Next, the operation of the processor shown in FIG. 1 will be described in detail with reference to FIGS.
最初に、時刻2におけるメモリ部180の動作ついて説明する。
First, the operation of the
まず、論理ページ番号上位ビット103は、ラッチ105に格納される。
First, the logical page number
また、論理ページ番号下位ビット102は、TLBタグ格納部(110,111)と、TLBのTLBデータ格納部(120,121)にそれぞれ入力される。
The logical page number
そして、TLBタグ格納部(110,111)とTLBのTLBデータ格納部(120,121)が動作し、それぞれの出力がラッチ116、117、126および127にそれぞれ格納される。
Then, the TLB tag storage units (110, 111) and the TLB data storage units (120, 121) operate, and their outputs are stored in the
一方、アドレスのページ内オフセット101は、キャッシュタグ格納部(130,131)と、キャッシュデータ格納部(140,141)に入力される。 On the other hand, the address offset 101 within the page is input to the cache tag storage units (130, 131) and the cache data storage units (140, 141).
そして、前記キャッシュタグ格納部(130,131)が動作して、それぞれキャッシュタグ(132,133)にタグの値を出力し、前記値はそれぞれラッチ(136,137)に格納される。 Then, the cache tag storage units (130, 131) operate to output tag values to the cache tags (132, 133), respectively, and the values are stored in the latches (136, 137), respectively.
また、キャッシュウェイ予測部193からキャッシュ予測ウェイ信号151が出力される。
Further, a cache prediction way signal 151 is output from the cache
前記信号151の値は予測されたウェイ、すなわち、ウェイ0を示す。
The value of the
この信号151は、ウェイデコーダ160でデコードされて、キャッシュデータ格納部(140,141)に入力される。
The
このとき、信号151の値がウェイ0を示すので、ウェイデコーダ160からウェイ0のデータ格納部140を動作させるための信号161が出力される。
At this time, since the value of
この信号161により、データ格納部140が動作し、データ142を出力する。この場合、データ格納部141は動作しない。
The
データ選択器144には、予測されたウェイのデータ142とキャッシュ予測ウェイ信号151が入力される。
The
データ選択器144では、キャッシュ予測ウェイ信号151により示されたウェイ、すなわち、ウェイ0のデータ142が選択されてデータ145に出力される。
In the
また、キャッシュ予測ウェイ信号151はラッチ152に格納される。
The cache prediction way signal 151 is stored in the
以上の処理が1サイクルで行なわれる。 The above processing is performed in one cycle.
図7は、ウェイデコーダ160の構成を示す図である。
FIG. 7 is a diagram showing a configuration of the
キャッシュ予測ウェイ信号151は、2ビットの信号であり、ウェイ0が予測されたことを表す信号とウェイ1が予測されたことを表す信号により構成される。
The cache prediction way signal 151 is a 2-bit signal, and includes a signal indicating that the
ウェイデコーダ160では、2ビットの信号を1ビットづつに分解してウェイ0が予測されたことを表す信号をキャッシュウェイ0イネーブル信号161として、ウェイ1が予測されたことを表す信号をキャッシュウェイ1イネーブル信号162としてそれぞれ出力する。
The
次に、時刻3におけるウェイ判定部の動作について説明する。
Next, the operation of the way determination unit at
ラッチ105に格納された論理ページ番号上位ビットと、ラッチ(116,117)に格納されたTLBタグと、ラッチ(126,127)に格納された物理ページ番号とに基づき、TLBウェイ判定器114と物理ページ番号選択器124によって、物理ページ番号125の値が生成される。
Based on the logical page number upper bit stored in the
さらに、ラッチ(136,137)に格納されたキャッシュタグと物理ページ番号125とに基づき、キャッシュウェイ判定器134によってキャッシュウェイ判定信号135に値が出力される。
Further, based on the cache tag stored in the latch (136, 137) and the
キャッシュウェイ判定信号135は2ビットの信号であり、物理ページ番号125とウェイ0のキャッシュタグ138が一致したかどうかを示す1ビット信号と物理ページ番号125とウェイ1のキャッシュタグ139が一致したかを示す1ビット信号により構成される。
The cache
キャッシュウェイ予測判定器154では、ラッチ152に格納されたキャッシュ予測ウェイ信号151の値とキャッシュウェイ判定信号135とに基づいてキャッシュ192のウェイ予測がミスしたかどうかを判定する。
The cache way
図6は、図1に示すキャッシュウェイ予測判定器154を含むキャッシュウェイ予測判定部194のより詳細な構成を示すブロック図である。
FIG. 6 is a block diagram showing a more detailed configuration of the cache way
キャッシュ192の予測されたウェイを示す信号153は2ビットの信号であり、ウェイ0が予測されたことを示す信号710とウェイ1が予測されたことを示す信号711により構成される。
The
また、キャッシュウェイ判定信号135は2ビットの信号であり、ウェイ0がヒットしたことを示す信号712とウェイ1がヒットしたことを示す信号713により構成される。
The cache
AND演算器700は、ウェイ0が予測され、かつ、ウェイ0がヒットしたときに1を出力する。
AND operator 700
また、AND演算器701は、ウェイ1が予測され、かつ、ウェイ1がヒットしたときに1を出力する。
The AND
キャッシュウェイ予測判定禁止信号704は、キャッシュウェイ予測判定を行なわないときに1を出力する信号であり、時刻3では0を出力している。
The cache way prediction
OR演算器705は、ウェイ0が予測されかつウェイ0がヒットしたか、または、ウェイ1が予測されかつウェイ1がヒットしたとき1を出力する。
The OR
すなわち、OR演算器705は、キャッシュのウェイ予測がヒットした場合に1を出力する。
That is, the
NOT演算器707は、キャッシュのウェイ予測がミスした場合にキャッシュウェイ予測判定信号155に1の値を出力する。
The
時刻3では、命令1に関する処理がキャッシュウェイ予測判定器154で行なわれ、ウェイ0が予測されてウェイ0がヒットしているのでAND演算器700の出力信号702の値が1となる。
At
そして、キャッシュウェイ予測判定信号155の値は0となり、キャッシュウェイ予測判定信号155ウェイ予測がヒットしたことを示す。
Then, the value of the cache way
ウェイ予測がヒットすれば、図4に示すように命令1と命令2はパイプラインで実行することができる。
If the way prediction hits,
次に、キャッシュウェイ予測部193においてウェイ0を予測したにもかかわらず、キャッシュ192のウェイ1がヒットした場合について述べる。
Next, a case where the
この場合には、ウェイ予測がミスしたことになる。 In this case, the way prediction has been missed.
キャッシュ192のウェイ1がヒットすると、キャッシュウェイ判定信号135の値はウェイ1を示し、図6に示す信号712の値が0に、信号713の値が1となる。
When the
一方、ウェイ0が予測されていたので、信号710の値は1、信号711の値は0であるから、AND演算器700及び701の出力はともに0となり、信号706の値は0に、キャッシュウェイ予測判定信号155の値は1になる。
On the other hand, since the
すなわち、キャッシュウェイ予測判定信号155はウェイ予測ミスを示す。
That is, the cache way
キャッシュウェイ予測判定信号155の値が1となると例外的な処理が実行される。
When the value of the cache way
図5は、前記した場合のタイムチャートを示す図である。 FIG. 5 is a diagram showing a time chart in the case described above.
図5は、命令1でウェイ0が予測されてウェイ予測がミスし、命令2以降でウェイ1が予測されてウェイ予測がヒットした場合のタイムチャートである。
FIG. 5 is a time chart when the
時刻3で、命令1のキャッシュウェイ予測判定信号155がウェイ予測のミスを示した場合、パイプライン制御信号156が出力されて、時刻3に行なわれようとしているプロセッサ本体182、TLB191、キャッシュ192の動作を抑止する。
At
TLB191では、次の命令、すなわち、命令2の処理を開始しているが、途中で抑止される。
In the
また、時刻3では、キャッシュウェイ予測判定信号155によって、キャッシュウェイ判定信号135がラッチ150に格納される。
At
これにより、キャッシュ予測ウェイ信号151の値が置き変わる。 As a result, the value of the cache prediction way signal 151 is replaced.
すなわち、時刻4からは、キャッシュ予測ウェイ信号151の値は、時刻3でキャッシュがヒットしたウェイであるウェイ1を示す。
That is, from
時刻4では、新しい値を持つキャッシュ予測ウェイ信号151が出力され、ウェイ1のキャッシュデータ格納部141を動作させる。
At
キャッシュデータ格納部141の出力であるウェイ1のデータ143は、キャッシュ予測ウェイ信号151によりデータ選択器144で選択されてラッチ146に格納される。
時刻5では、ラッチ146に格納されたウェイ1のデータがキャッシュ192から出力され、データ処理部195で処理される。
At
なお、本実施例1において、キャッシュウェイ予測部193からの出力信号であるキャッシュ予測ウェイ信号151により、予測されたウェイのデータ格納部(140,141)だけでなく、予測されたウェイのタグ格納部(130,131)だけを活性化することも可能である。
In the first embodiment, not only the data storage unit (140, 141) of the predicted way but also the tag storage of the predicted way is generated by the cache predicted way signal 151 which is an output signal from the cache
図8は、本発明のメモリ装置の他の実施例(実施例2)であるアドレス変換バッファ(TLB)と、キャッシュの概略構成を示すブロック図であり、本実施例2のアドレス変換バッファ(TLB)991と、キャッシュ992をプロセッサに適用した例を示す図である。
FIG. 8 is a block diagram illustrating a schematic configuration of an address translation buffer (TLB) and a cache according to another embodiment (embodiment 2) of the memory device according to the present invention. FIG. 9 illustrates an example in which a
図8に示すプロセッサは、図1に示すプロセッサにおいて、TLBウェイ予測部996とTLBウェイ予測判定部997を付加し、TLBについてもウェイの予測を行なうようにしたものである。
The processor shown in FIG. 8 is different from the processor shown in FIG. 1 in that a TLB
本実施例2のTLBウェイ予測部996、および、TLBウェイ予測判定部997の構成は、前記実施例1のキャッシュウェイ予測部193、キャッシュウェイ予測判定部194と同じである。
The configurations of the TLB
図8に示すプロセッサ本体982、キャッシュ992、キャッシュウェイ予測部993、キャッシュウェイ予測判定部994は、それぞれ、図1に示すプロセッサ本体182、キャッシュ192、キャッシュウェイ予測部193、キャッシュウェイ予測判定部194に対応している。
The
図9は、図8に示すプロセッサのタイムチャートを示す図である。 FIG. 9 is a diagram showing a time chart of the processor shown in FIG.
図9は、命令1から命令4のすべての命令について、TLBのウェイ0が予測され、予測がヒットした場合のタイムチャートを示す図である。
FIG. 9 is a diagram showing a time chart when the
図8、図9を用いて、図8に示すプロセッサの動作の概要を説明する。 The outline of the operation of the processor shown in FIG. 8 will be described with reference to FIGS.
図8に示すプロセッサは、パイプライン制御で処理される。 The processor shown in FIG. 8 is processed by pipeline control.
図9において、数字1001は命令の番号を表し、1と番号の書かれた領域は、命令1を処理していることを示す。
In FIG. 9, a numeral 1001 indicates an instruction number, and an area in which 1 is written indicates that
以下、命令1の処理について述べる。
Hereinafter, the processing of the
図9に示すように、TLB991、キャッシュ992、TLBウェイ予測部996、及び、TLBウェイ予測判定部997、キャッシュウェイ予測部993、及び、キャッシュウェイ予測判定部994から構成される部分は、動作するタイミングの違いによりメモリ部980とウェイ判定部981に分けられる。
As illustrated in FIG. 9, a part including the
時刻1で、アドレス生成部990はアドレスを生成し、次の時刻にアドレス900を出力する。
At
時刻2で、メモリ部980は、アドレス900を入力して1サイクル後にデータ947をデータ処理部995に出力する。
At
TLBデータ格納部(920,921)に関しては、TLBウェイ予測部996で予測されたウェイのTLBデータ格納部920だけが動作する。
As for the TLB data storage units (920, 921), only the TLB
ここでは、TLBウェイ予測部996でウェイ0が予測されているので、前記TLBウェイ予測部996の出力であるTLB予測ウェイ信号961はウェイ0を示す。
Here, since the TLB
そして、前記TLB予測ウェイ信号961がTLB991に入力されて、TLBデータ格納部920が動作する。
Then, the TLB prediction way signal 961 is input to the
また、キャッシュデータ格納部(940,941)に関しては、キャッシュウェイ予測部993で予測されたウェイのキャッシュデータ格納部940だけが動作し、キャッシュデータ格納部940から読み出されたデータがデータ947として出力される。
As for the cache data storage units (940, 941), only the cache
また、時刻2では、TLBタグ格納部(910,911)と、キャッシュタグ格納部(930,931)が動作する。
At
そして、時刻3では、データ処理部995がデータ947を入力して処理する。
Then, at
また、TLB991では、論理ページ番号904の上位ビットと前時刻にTLBタグ格納部(910,911)から読みだされたTLBタグが比較され、TLBウェイ判定信号960を出力する。
Further, the
さらに、TLB991から前時刻にTLBウェイ予測部996で予測されたウェイ、すなわち、ウェイ0のTLBデータ格納部920から読みだされた物理ページ番号925が出力され、キャッシュ992に送られる。
Further, the way predicted by the TLB
キャッシュ992では、物理ページ番号925と前時刻にキャッシュタグ格納部(930,931)から読みだされたキャッシュタグが比較され、キャッシュウェイ判定信号935を出力する。
The
また、時刻3では、TLBウェイ予測判定部997において、TLBウェイ判定信号960の値と前時刻に出力されたTLB予測ウェイ信号961の値をもとにTLBのウェイ予測がミスしていたかどうか判定する。
At
さらに、時刻3では、キャッシュウェイ予測判定部994により、時刻2におけるキャッシュウェイ予測がミスしていたかどうかを判定する。
Further, at
もし、TLBウェイ予測とキャッシュウェイ予測がともにヒットしていれば、第10図のようなタイムチャートとなる。 If the TLB way prediction and the cache way prediction are both hits, a time chart as shown in FIG. 10 is obtained.
次に、TLBのウェイ0を予測したにもかかわらず、TLBのウェイ1がヒットした場合について説明する。
Next, a case will be described in which
この場合には、TLBウェイ判定信号960の値がウェイ1を示し、TLBウェイ予測判定部997はTLBウェイ予測がミスしたものと判定する。
In this case, the value of the TLB
図10は、前記した場合のタイムチャートを示す図である。 FIG. 10 is a diagram showing a time chart in the case described above.
この場合には、TLBウェイ予測判定信号962に値1が出力され、この値1は、TLBウェイ予測ミスを示している。
In this case, the
そして、TLBウェイ予測判定信号962によって、TLBウェイ判定信号960の値がTLBウェイ予測部996に格納される。
Then, the value of the TLB
この格納によって、時刻3におけるTLBウェイ判定信号960の値、すなわち、ウェイ1を示す値が、時刻4からはTLB予測ウェイ信号961に出力される。
By this storage, the value of the TLB
また、時刻3において、パイプライン制御信号963が出力されて、時刻3に行なわれようとしているプロセッサ本体982、TLB991、キャッシュ992の動作を抑止する。
At
TLB991やキャッシュ992では次の命令、すなわち、命令2の処理を開始しているが、途中で抑止される。
In the
時刻4では、新しい値をTLB予測ウェイ信号961が出力される。
At
前記TLB予測ウェイ信号961の値はウェイ1を示しており、ウェイ1のTLBデータ格納部921を動作させる。
The value of the TLB prediction way signal 961 indicates the
一方、時刻4では、キャッシュ992は動作せずに内部状態を保持する。
On the other hand, at
時刻5では、TLBデータ格納部921の出力が物理ページ番号925に出力される。
At
そして、キャッシュ992よりキャッシュウェイ判定信号935が出力されてキャッシュウェイ予測判定部994に送られ、キャッシュウェイ予測判定部994でキャッシュのウェイ予測がミスしていないかどうかの判定が行なわれる。
Then, the cache
なお、本実施例2において、TLBウェイ予測部996からの出力信号であるTLB予測ウェイ信号961により、予測されたウェイのTLBデータ格納部(920,921)だけでなく、予測されたウェイのTLBタグ格納部(910,911)だけを活性化することも可能である。
In the second embodiment, not only the TLB data storage unit (920, 921) of the predicted way but also the TLB of the predicted way is determined by the TLB prediction way signal 961 which is an output signal from the TLB
図11は、本発明のメモリ装置の他の実施例(実施例3)であるキャッシュの概略構成を示すブロック図であり、本実施例3のキャッシュをプロセッサに適用した例を示す図である。
FIG. 11 is a block diagram showing a schematic configuration of a cache which is another embodiment (Embodiment 3) of the memory device of the present invention, and shows an example in which the cache of
図11は、図1に示すプロッセサのアドレス生成部190をアドレス生成部1290に、キャッシュウェイ予測部193をキャッシュウェイ予測部1293にそれぞれ変更し、さらに、アドレス制御部1296を付加したものである。
FIG. 11 is obtained by changing the
図11に示すプロセッサ本体1282、TLB1291、キャッシュ1292、キャッシュウェイ予測部1293、キャッシュウェイ予測判定部1294は、それぞれ、図1に示すプロセッサ本体182、TLB191、キャッシュ192、キャッシュウェイ予測器193、キャッシュウェイ予測判定部194に対応している。
The processor main body 1282,
アドレス生成部1290は、4つのアドレスラッチ1220〜1223を持っている。
The
本実施例3においては、それぞれの前記アドレスラッチ1220〜1223に対応するキャッシュ予測ウェイラッチ1230〜1233をキャッシュウェイ予測部1293が持っていることが特徴である。 The third embodiment is characterized in that the cache way prediction unit 1293 has cache prediction way latches 1230 to 1233 corresponding to the address latches 1220 to 1223, respectively.
アドレス生成部1290は、1220〜1223の4つのアドレスラッチを持ち、前記ラッチの出力のうちのいずれかひとつをアドレス選択器1224によって選択し、アドレス加算器1226とラッチ1228を経て1サイクル後にアドレス1200に出力する。
The
一方、キャッシュウェイ予測部1293は、アドレスラッチ1220〜1223に対応する4つのキャッシュ予測ウェイラッチ1230〜1233を持ち、アドレス選択器1224において、その出力が選択されたアドレスラッチに対応するキャッシュ予測ウェイラッチの出力をキャッシュ予測ウェイ選択器1234によって選択してキャッシュ予測ウェイ信号1212として出力する。
On the other hand, the cache way prediction unit 1293 has four cache prediction way latches 1230 to 1233 corresponding to the address latches 1220 to 1223, and the output of the cache prediction way latch corresponding to the selected address latch in the
このとき、アドレス選択器1224には、アドレス制御部1296から出力されるアドレスラッチ読みだし選択信号1205が、キャッシュ予測ウェイ選択器1234には、アドレスラッチ読みだし選択信号1205の1サイクル遅れの信号であるキャッシュ予測ウェイラッチ読みだし選択信号1208がそれぞれ入力される。
At this time, the
そして、アドレスラッチ1220の出力がアドレス選択器1224において選択された場合には、キャッシュ予測ウェイラッチ1230の出力がキャッシュ予測ウェイ選択器1234において選択される。
When the output of the
同様に、それぞれアドレスラッチ1221、1222、1223の出力がアドレス選択器1224において選択された場合には、それぞれキャッシュ予測ウェイラッチ1231、1232、1233の出力がキャッシュ予測ウェイ選択器1234において選択される。
Similarly, when the outputs of the address latches 1221, 1222, and 1223 are selected by the
アドレス加算器1226は、同一のアドレスラッチを用いて連続するアドレス領域を次々にアクセスする場合に、アドレスラッチの値にある値を加えるときに使用する。
The
ウェイ予測がミスしたときは、キャッシュ予測ウェイ信号1212に値を出力するために使用されたキャッシュ予測ウェイラッチにキャッシュウェイ判定信号1211の値が書き込まれる。
When the way prediction fails, the value of the cache
この書き込みを行なうための機構が、ラッチ1240及びデコーダ1242である。
A mechanism for performing this writing is a
ラッチ1240は、キャッシュ予測ウェイ選択器1234に入力されたキャッシュ予測ウェイラッチ読みだし選択信号1208の値を格納し記憶する。
ウェイ予測がミスしたときは、キャッシュウェイ予測判定信号の値が1となる。 When the way prediction misses, the value of the cache way prediction determination signal becomes 1.
デコーダ1242に入力される前記キャッシュウェイ予測判定信号1214の値が1となると、デコーダ1242はラッチ1240に格納された値をデコードしてラッチセット信号1243〜1246のいずれかひとつの値を1にする。
When the value of the cache way
図12は、図11に示すデコーダ1242の回路構成を示す図である。
FIG. 12 is a diagram showing a circuit configuration of the
図11に示す信号1241はデコード入力信号1400に、図11に示す信号1243〜1246はデコード出力信号1430〜1433に、図11に示す信号1214はデコードイネーブル信号1410に対応している。
11 corresponds to the
デコード入力信号1400は、2ビットの2進数により構成され、第0ビット目の信号1402と第1ビット目の信号1403に分解することができる。
The
前記デコーダは、この2ビットの信号の値により、デコード出力信号1430〜1433のうちのいずれかひとつを1にする。
The decoder sets one of the
ただし、デコードイネーブル信号1410の値が0のときは、デコード出力信号1430〜1433の値はすべて0となる。
However, when the value of the decode enable
それぞれラッチセット信号1243〜1246が1のとき、それぞれキャッシュ予測ウェイラッチ1230〜1233にキャッシュウェイ判定信号1211の値が書き込まれる。
When the latch set
図13は、キャッシュ1292のデータ格納部に格納されたデータの一例を示す図である。
FIG. 13 is a diagram illustrating an example of data stored in the data storage unit of the
図13において、1700はウェイ0のキャッシュデータ格納部を、1701はウェイ1のキャッシュデータ格納部をそれぞれ表す。
In FIG. 13,
1710は、キャッシュ1292のラインであり、本例では1ラインに4つのデータが格納される。
1711は、キャッシュ1292に格納されたデータである。
1712は、データ1711のアドレスを補助的に示したものである。
一般に、キャッシュ1292では、データはラインごとに管理され、同一ラインのデータは同一のウェイに格納される。
Generally, in the
図13に示す例では、アドレス200からアドレス203までが同一のラインに対応しており、データB[0]からデータB[3]までが同一ウェイに格納されている。 In the example shown in FIG. 13, addresses 200 to 203 correspond to the same line, and data B [0] to data B [3] are stored in the same way.
同様に、データA[0]からデータA[3]までが同一ウェイに格納される。 Similarly, data A [0] to data A [3] are stored in the same way.
データAは文字列データであり、データA[0]は1番目の文字データを、データA[1]は2番目の文字データを、データA[2]は3番目の文字データを、データA[3]は4番目の文字データを意味している。 Data A is character string data, data A [0] is the first character data, data A [1] is the second character data, data A [2] is the third character data, and data A [2] is the data A [3] means the fourth character data.
また、データBも同様な文字列データである。 Data B is similar character string data.
ここでは、文字列データAと文字列データBとを比較するためにキャッシュ1292から順次文字データを読み出す処理の例を示す。
Here, an example of a process of sequentially reading character data from the
文字列の比較では、文字データA[0]が文字データB[0]と、文字データA[1]が文字データB[1]と、以下同様に、文字データA[3]が文字データB[3]とそれぞれ比較される。 In the comparison of character strings, character data A [0] is character data B [0], character data A [1] is character data B [1], and similarly, character data A [3] is character data B [1]. Each is compared with [3].
そのために、文字データA[0]、文字データB[0]、文字データA[1]、文字データB[1]、以下同様に、文字データA[3]、文字データB[3]の順番でキャッシュ1292から文字データが読み出される。
Therefore, the order of character data A [0], character data B [0], character data A [1], character data B [1], and so on in the same manner, character data A [3], character data B [3] , Character data is read from the
以下、図14のタイムチャートを用いて、図11に示すプロセッサの動作を説明する。 Hereinafter, the operation of the processor shown in FIG. 11 will be described with reference to the time chart of FIG.
図14において、1601はラッチやキャッシュの出力信号の値、もしくは、信号の値を示す。
In FIG. 14,
時刻0において、文字列データAの先頭アドレス100がアドレスラッチ1220に、文字列データBの先頭アドレス200がアドレスラッチ1221にそれぞれ格納されているものとする。
At
図11に示すプロセッサでは、文字列データAの各文字データを読み出すのにアドレスラッチ1220を使用し、文字データA〔0〕を読み出すときにはアドレス加算器1226において値0を、文字データA〔1〕を読み出すときにはアドレス加算器1226において値1を、以下同様に、文字データA〔3〕を読み出すときにはアドレス加算器1226において値3をそれぞれアドレスラッチ1220の値に加えている。
In the processor shown in FIG. 11, the
同様に、文字列データBの各文字データを読み出すのにアドレスラッチ1221を使用している。
Similarly, the
また、時刻0においては、キャッシュ予測ウェイラッチ1230、1231ともに値が0であるものとする。
At
すなわち、アドレスラッチ1220、アドレスラッチ1221に対応する予測ウェイはともに0である。
That is, the prediction ways corresponding to the
このタイムチャートにおいて、時刻1から読み出し処理を開始している。
In this time chart, the reading process is started from
時刻1において、アドレス100にある文字データA〔0〕を読み出すために、アドレスラッチ選択信号1205の値が0となりアドレスラッチ1220の値100が選択されてアドレスラッチ選択出力信号1225に出力される。
At
そして、アドレス加算器1226を経てアドレス1227に出力される。
Then, it is output to the
アドレス加算器1226では何も加えられずアドレス1227の値は100のままである。
Nothing is added by the
時刻2で、アドレスラッチ選択信号1205の値の1サイクル遅れの信号であるキャッシュ予測ウェイラッチ読み出し選択信号1208の値0によって、アドレスラッチ1220に対応するキャッシュ予測ウェイラッチ1230の値0がキャッシュ予測ウェイ信号1212が読み出される。
At
このことによって、キャッシュデータ格納部ウェイ0(1700)が動作する。 As a result, the cache data storage unit way 0 (1700) operates.
時刻3では、キャッシュウェイ判定信号1211が出力されるが、図13に示すとおりアドレス100にあるデータA〔0〕はキャッシュのウェイ1に存在するのでキャッシュウェイ判定信号1211の値は1となる。
At
キャッシュウェイ予測判定部1294では、このキャッシュウェイ判定信号1211の値1と時刻2で出力されたキャッシュ予測ウェイ信号1212の値0とを比較するが、不一致なのでウェイ予測ミスとなる。
The cache way
そこで、パイプライン制御信号1213を発行するとともに、キャッシュウェイ予測判定信号1214の値を1にする。
Therefore, the
デコーダ1242には、キャッシュ予測ウェイラッチ読み出し選択信号1208の1サイクル遅れの信号であるデコーダ入力信号1241が入力され、時刻2で読み出しを行ったキャッシュ予測ウェイラッチ1230にラッチセット信号1243が入力される。
The
このことによって、キャッシュウェイ判定信号1211の値1がキャッシュ予測ウェイラッチ1230に書き込まれる。
As a result, the
すなわち、時刻3において、アドレスラッチ1220に対応する予測ウェイは1に変更される。
That is, at
時刻4では、キャッシュ予測ウェイラッチ1230の値が1となり、キャッシュ予測ウェイ信号1212には正しいウェイ予測値である1が出力され、キャッシュデータ格納部ウェイ1(1701)から文字データA〔0〕が読み出される。
At
時刻5では、キャッシュの出力データ信号1215にA〔0〕が出力される。
At
一方、時刻2では、アドレス200にある文字データB〔0〕を読み出すために、アドレスラッチ選択信号1205の値が1となりアドレスラッチ1221の値200が選択されてアドレスラッチ選択出力信号1225に出力される。
On the other hand, at
そして、アドレス加算器1226を経てアドレス1227に出力される。
Then, it is output to the
アドレス加算器1226では、何も加えられずアドレス1227の値は200のままである。
In the
時刻3では、この値200がラッチ1228からアドレス1200から出力される。
At
また、アドレスラッチ選択信号1205の値1がラッチ1209からキャッシュ予測ウェイラッチ読み出し選択信号1208に出力される。
Further, the
時刻4では、キャッシュ予測ミス処理のために、一旦、アドレスラッチ選択信号1205の値とキャッシュ予測ウェイラッチ読み出し選択信号1208の値は、文字データA〔0〕の読み出しのために変更されてしまうが、時刻5では、再び時刻3と同じ値を取り戻す。
At
ここで、ラッチ1209とラッチ1228は値回復機能付きラッチであり、その回路構成を図15に示す。
Here, the
図15において、回復機能付きラッチ1800がラッチ1209またはラッチ1228に、入力信号1801が信号1205または信号1227に、出力信号1802が信号1208または1200にそれぞれ対応している。
In FIG. 15, a
値回復機能付きラッチ1800は、通常、ラッチ1810を用いて入力信号1801を出力信号1802に出力する単なるラッチとして機能するが、1サイクル前の値をラッチ1811に記憶している。
The latch with
文字データA〔0〕読み出しのキャッシュのウェイ予測のミスが判定された時刻3では、既に、次の文字データB〔0〕のアドレスまたはキャッシュ予測ウェイラッチ読み出し選択信号(以下、文字データB〔0〕読み出しパラメータと呼ぶ)が回復機能付きラッチ1800から出力されているが、文字データA〔0〕読み出しパラメータはラッチ1811に記憶されている。
At
この時刻に発行されるパイプライン制御信号1213をもとに、時刻4では、ラッチ1811に格納された文字データA〔0〕読み出しパラメータを読み出してウェイ予測ミスをした文字データA〔0〕の読み出し処理を再実行し、時刻5では文字データB〔0〕読み出しパラメータをラッチ1810から読み出して通常の処理に戻る。
At
そして、時刻5では、キャッシュ予測ウェイラッチ読み出し選択信号1208の値1によってキャッシュ予測ウェイラッチが選択されキャッシュ予測ウェイ信号1212に値0が出力される。
At
このことによって、キャッシュデータ格納部ウェイ0(1700)が動作して文字データB〔0〕を読み出す。 As a result, the cache data storage unit way 0 (1700) operates to read out the character data B [0].
文字データB〔0〕は、図13に示されるようにウェイ0に格納されているのでウェイ予測はヒットとなる。
Since the character data B [0] is stored in the
時刻6では、文字データB〔0〕の値がキャッシュの出力データ信号1215に出力される。
At
以上の2つの文字データの読み出しの後、アドレスラッチ1220に対応するキャッシュ予測ウェイラッチ1230の値が1に、アドレスラッチ1221に対応するキャッシュ予測ウェイラッチ1231の値が0となっている。
After the reading of the above two character data, the value of the cache
したがって、この後、文字データA〔1〕、B〔1〕、A〔2〕、B〔2〕、A〔3〕、B〔3〕を読み出すときに、それぞれ、アドレスラッチ1220、1221、1220、1221、1220、1221を使用するので、キャッシュ予測ウェイの値はすべて正しいものとなり、ウェイ予測はヒットする。 Therefore, when character data A [1], B [1], A [2], B [2], A [3], and B [3] are subsequently read, the address latches 1220, 1221, and 1220 respectively. , 1221, 1220, 1221, the values of the cache prediction ways are all correct, and the way prediction hits.
このように、本実施例においては、いくつかの連続した領域を交互にアクセスする場合にもウェイ予測がヒットする可能性が高くなる。 As described above, in the present embodiment, the possibility of hitting the way prediction increases even when several consecutive areas are alternately accessed.
図16は、本発明の他の実施例(実施例4)であるキャッシュの概略構成を示すブロック図であり、本実施例4のキャッシュをプロセッサに適用した例を示す図である。 FIG. 16 is a block diagram illustrating a schematic configuration of a cache according to another embodiment (fourth embodiment) of the present invention, and is a diagram illustrating an example in which the cache according to the fourth embodiment is applied to a processor.
なお、図16においては、プロセッサで使用されるアドレス生成部、キャッシュウェイ予測部、及び、アドレス制御部だけを示している。 Note that FIG. 16 shows only an address generation unit, a cache way prediction unit, and an address control unit used in the processor.
図16は、図11に示すアドレス生成部1290、キャッシュウェイ予測部1293およびアドレス制御部1296を、アドレス生成部1390、キャッシュウェイ予測部1393およびアドレス制御部1396に置き換えて、プロセッサを構築したものである。
FIG. 16 shows a processor constructed by replacing the
図16に示すアドレス生成部1390は、アドレスラッチからアドレスラッチへのアドレスの転送が可能であり、アドレスラッチ1320〜1323のうちのあるアドレスラッチの出力の値を、アドレス選択器1324及びアドレス加算器1326を経由してアドレスラッチ1320〜1323のうちの任意のアドレスラッチに書き込むことができる。 The address generation unit 1390 shown in FIG. 16 is capable of transferring an address from an address latch to an address latch, and outputs an output value of an address latch among the address latches 1320 to 1323 to an address selector 1324 and an address adder. Data can be written to any of the address latches 1320 to 1323 via the 1326.
ラッチセット信号1351〜1354は、アドレスラッチ1320〜1323にアドレス1300の値をセットするための信号で、それぞれラッチセット信号1351〜1354の値が1のときにそれぞれアドレスラッチ1320〜1323にアドレス1300の値がセットされる。
The latch set
ラッチセット信号1351〜1354の値は、アドレスラッチ書き込みイネーブル信号1307とアドレスラッチ書き込み選択信号1306とに基づき、デコーダ1350で生成される。
The values of the latch set
アドレスラッチ書き込みイネーブル信号1307は、アドレスラッチ1320〜1323へのアドレスの転送が行なわれるときに1となる信号である。
The address latch write enable
この信号が1のときには、アドレスラッチ書き込み選択信号1306がデコーダ1350においてデコードされて、ラッチセット信号1351〜1354が出力される。
When this signal is 1, the address latch
デコーダ1350の回路構成は、図12と同じであり、図16に示す信号1306はデコード入力信号1400に、図16に示す信号1351〜1354はデコード出力信号1430〜1433に、図16に示す信号1307はデコードイネーブル信号1410に対応している。
The circuit configuration of the
キャッシュウェイ予測部1393は、キャッシュ予測ウェイラッチ1330〜1333を持ち、キャッシュウェイ判定信号1311をキャッシュ予測ウェイラッチ1330〜1333に書き込むことができる。
The cache way prediction unit 1393 has cache prediction way latches 1330 to 1333, and can write the cache
キャッシュウェイ予測部1393においては、さらに、キャッシュ予測ウェイラッチからキャッシュ予測ウェイラッチへのキャッシュ予測ウェイの値の転送が可能であり、キャッシュ予測ウェイラッチ1330〜1333のうちのあるキャッシュ予測ウェイラッチの出力の値をキャッシュ予測ウェイ選択器1334を経由してキャッシュ予測ウェイラッチ1330〜1333のうちの任意のキャッシュ予測ウェイラッチに書き込むことができる。
The cache way prediction unit 1393 can further transfer the value of the cache prediction way latch from the cache prediction way latch to the cache prediction way latch, and output the output of a certain cache prediction way latch among the cache prediction way latches 1330 to 1333. Can be written to any of the cache prediction way latches 1330 to 1333 via the cache
キャッシュ予測ウェイの前記転送は、アドレスの前記転送が行なわれたときに行なわれる。 The transfer of the cache prediction way is performed when the transfer of the address is performed.
アドレスの前記転送が行なわれるときにアドレスラッチ書き込みイネーブル信号1307の値が1になることにより、キャッシュ予測ウェイラッチ書き込み選択信号選択器1360では、アドレスラッチ書き込み選択信号1306の値がキャッシュ予測ウェイラッチ書き込み選択信号1361に出力され、キャッシュ予測ウェイラッチ書き込みデータ選択器1362ではキャッシュ予測ウェイ信号1312の値がキャッシュ予測ウェイラッチ書き込みデータ1363に出力され、そして、キャッシュ予測ウェイラッチ書き込みイネーブル信号選択器1364ではアドレスラッチ書き込みイネーブル信号1307の値、すなわち値1がキャッシュ予測ウェイラッチ書き込みイネーブル信号1365に出力される。
When the value of the address latch write enable
デコーダ1342では、キャッシュ予測ウェイラッチ書き込み選択信号1361の値がデコードされてラッチセット信号1343〜1346が出力される。
The
デコーダ1342の回路構成も、図12と同じであり、図16に示す信号1361はデコード入力信号1400に、図16に示す信号1343〜1346はデコード出力信号1430〜1433に、図16に示す信号1365はデコードイネーブル信号1410に対応している。
The circuit configuration of the
ラッチセット信号1343〜1346は、キャッシュ予測ウェイラッチ1330〜1333にキャッシュ予測ウェイラッチ書き込みデータ1363の値をセットするための信号で、それぞれラッチセット信号1343〜1346の値が1のときにそれぞれキャッシュ予測ウェイラッチ1330〜1333にキャッシュ予測ウェイラッチ書き込みデータ1363の値がセットされる。
Latch set signals 1343 to 1346 are signals for setting the values of cache prediction way latch write
アドレスラッチ書き込みイネーブル信号1307の値が0のときのキャッシュウェイ予測部1393の動作は、前記図11に示すキャッシュウェイ予測部1293の動作と同じである。
The operation of the cache way prediction unit 1393 when the value of the address latch write enable
なお、前記実施例3および実施例4において、アドレス変換バッファ(TLB)においてウェイを予測するようにすることも可能であり、その際、キャッシュウェイ予測部(1293,1393)に示すようにTLBウェイ予測部の予測ウェイラッチを複数個設けることも可能である。 In the third and fourth embodiments, it is possible to predict the way in the address translation buffer (TLB). At this time, as shown in the cache way prediction unit (1293, 1393), the TLB way is predicted. It is also possible to provide a plurality of prediction way latches of the prediction unit.
また、前記実施例3および実施例4は、予測値に基づいて予測されたウェイのデータ格納部、あるいは、TLBのTLBデータ格納部の活性化を行わない、従来のキャッシュにも適用できることはいうまでもない。
以上、本発明者によってなされた発明を、前記実施例に基づき具体的に説明したが、本発明は、前記実施例に限定されるものではなく、その要旨を逸脱しない範囲において種々変更可能であることは勿論である。
In addition, the third and fourth embodiments can be applied to a conventional cache that does not activate the data storage unit of the way predicted based on the predicted value or the TLB data storage unit of the TLB. Not even.
As described above, the invention made by the inventor has been specifically described based on the embodiment. However, the present invention is not limited to the embodiment, and can be variously modified without departing from the gist of the invention. Of course.
100,600,900,1200,1227,1300 アドレス
101,601,901,1201 ページ内オフセット
102,602 論理ページ番号下位ビット
103,603 論理ページ番号上位ビット
104,604,904,1204 論理ページ番号
110,111,610,611,910,911 TLBタグ格納部
112,113,612,613 TLBタグ
114,614 TLBウェイ判定器
105,116,117,126,127,136,137,146,152,646,1240,1340,1810,1811 ラッチ
120,121,620,621,920,921 TLBデータ格納部
122,123,622,623,625,925,1210 物理ページ番号
124,624 物理ページ番号選択器
130,131,630,631,930,931 キャッシュタグ格納部
132,133,632,633 キャッシュタグ
134,634 キャッシュウェイ判定器
140,141,640,641,940,941,1700,1701 キャッシュデータ格納部
144,644 データ選択器
150,1230,1231,1232,1233,1330,1331,1332,1333 キャッシュ予測ウェイラッチ
154 キャッシュウェイ予測判定器
160 ウェイデコーダ
180,980 メモリ部
181,981 ウェイ判定部
182,982,1282 プロセッサ本体
190,990,1290,1390 アドレス生成部
191,691,991,1291 TLB
192,692,992,1292 キャッシュ
193,993,1293,1393 キャッシュウェイ予測部
194,994,1294 キャッシュウェイ予測判定部
195,995,1295 データ処理部
401,1001 命令の番号
700,701,1420〜1423 AND演算器
705 OR演算器
707,1404,1405 NOT演算器
790 キャッシュウェイ予測判定制御論理
996 TLBウェイ予測部
997 TLBウェイ予測判定部
1209,1228,1800 値回復機能付きラッチ
1220,1221,1222,1223,1320,1321,1322,1323 アドレスラッチ
1224,1324 アドレス選択器
1226,1326 アドレス加算器
1234,1334 キャッシュ予測ウェイ選択器
1242,1342,1350,1490 デコーダ
1296,1396 アドレス制御部
1360 書き込み選択信号選択器
1362 書き込みデータ選択器
1364 書き込みイネーブル信号選択器
1710 キャッシュのライン
1711 データ
1712 データのアドレス。
100, 600, 900, 1200, 1227, 1300
192, 692, 992, 1292
Claims (3)
データを格納するデータ格納部と、
アクセスアドレスの一部とタグ格納部に格納されているタグとを比較し、どのウェイがヒットしたかを示すウェイ判定信号を出力するウェイ判定器と、
ウェイ選択信号に基づき、その選択されたウェイのデータ格納部のデータを選択するデータ選択器とを具備するセットアソシアティブ方式のメモリ装置であって、
ウェイの番号値を記憶する複数の予測ウェイラッチと、
複数の連続した領域をアクセスする場合に、対応する複数の予測ウェイラッチに記憶されたウェイの番号値をウェイ判定信号の予測値として出力するウェイ予測部と、
前記予測値をウェイ選択信号としてデータ選択器に入力する手段と、
前記ウェイ判定器からのウェイ判定信号と前記予測値を比較し、不一致の場合にウェイ予測判定信号を出力するウェイ予測判定部と、
前記ウェイ予測判定部からのウェイ予測判定信号に基づき、前記ウェイ予測部の予測値をヒットしたウェイを示すウェイ判定信号に変更する手段とを具備することを特徴とするセットアソシアティブ方式のメモリ装置。 A tag storage unit for storing tags,
A data storage unit for storing data,
A way determiner that compares a part of the access address with the tag stored in the tag storage unit and outputs a way determination signal indicating which way has been hit;
A data selector for selecting data in a data storage unit of the selected way based on a way selection signal, the set associative memory device comprising:
A plurality of predicted way latches for storing way number values;
When accessing a plurality of continuous areas, a way prediction unit that outputs a number value of a way stored in a corresponding plurality of prediction way latches as a prediction value of a way determination signal,
Means for inputting the predicted value to a data selector as a way selection signal,
A way prediction signal comparing the way determination signal from the way determiner and the prediction value, and outputting a way prediction determination signal in the case of a mismatch,
Means for changing a prediction value of the way prediction unit to a way determination signal indicating a hit way based on a way prediction determination signal from the way prediction determination unit.
前記メモリ装置のウェイ判定器は、アドレス変換バッファからのTLBデータとタグ格納部に格納されているタグとを比較し、どのウェイがヒットしたかを示すウェイ判定信号を出力し、
前記アドレス変換バッファは、TLBタグを格納するTLBタグ格納部と、
TLBデータを格納するTLBデータ格納部と、
アクセスアドレスの一部とTLBタグ格納部に格納されているTLBタグとを比較し、どのウェイがヒットしたかを示すTLBウェイ判定信号を出力するTLBウェイ判定器と、
ウェイの番号値を記憶する複数のTLB予測ウェイラッチと、
複数の連続した領域をアクセスする場合に、対応する複数のTLB予測ウェイラッチに記憶されたTLBウェイの番号値をTLBウェイ判定信号の予測値として出力するTLBウェイ予測部と、
前記TLBウェイ予測部からの予測値が選択信号として入力され、予測されたウェイのTLBデータ格納部のTLBデータを選択するTLBデータ選択器と、
前記TLBウェイ判定器からのTLBウェイ判定信号と前記予測値を比較し、不一致の場合にTLBウェイ予測判定信号を出力するTLBウェイ予測判定部と、
前記TLBウェイ予測判定部からのTLBウェイ予測判定信号に基づき、TLBウェイ予測部の予測値をヒットしたウェイを示すTLBウェイ判定信号に変更する手段とを具備することを特徴とする請求項1に記載のセットアソシアティブ方式のメモリ装置。 The memory device further includes a set associative type address translation buffer,
The way determination unit of the memory device compares the TLB data from the address translation buffer with the tag stored in the tag storage unit, and outputs a way determination signal indicating which way has been hit,
The address translation buffer includes a TLB tag storage unit that stores a TLB tag;
A TLB data storage unit for storing TLB data;
A TLB way determiner that compares a part of the access address with a TLB tag stored in the TLB tag storage unit and outputs a TLB way determination signal indicating which way has been hit;
A plurality of TLB prediction way latches for storing way number values;
A TLB way prediction unit that outputs a TLB way number value stored in a corresponding plurality of TLB prediction way latches as a prediction value of a TLB way determination signal when accessing a plurality of continuous areas;
A TLB data selector to which a prediction value from the TLB way prediction unit is input as a selection signal and selects TLB data in a TLB data storage unit of the predicted way;
A TLB way prediction determination unit that compares a TLB way determination signal from the TLB way determination unit with the prediction value, and outputs a TLB way prediction determination signal when they do not match,
And means for changing a prediction value of the TLB way prediction unit to a TLB way determination signal indicating a hit way based on a TLB way prediction determination signal from the TLB way prediction determination unit. A set associative memory device as described in the above.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2004110649A JP3593123B2 (en) | 2004-04-05 | 2004-04-05 | Set associative memory device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2004110649A JP3593123B2 (en) | 2004-04-05 | 2004-04-05 | Set associative memory device |
Related Parent Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP12538094A Division JP3589485B2 (en) | 1994-06-07 | 1994-06-07 | Set associative memory device and processor |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2004265430A JP2004265430A (en) | 2004-09-24 |
| JP3593123B2 true JP3593123B2 (en) | 2004-11-24 |
Family
ID=33128452
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2004110649A Expired - Fee Related JP3593123B2 (en) | 2004-04-05 | 2004-04-05 | Set associative memory device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3593123B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100630702B1 (en) * | 2004-10-05 | 2006-10-02 | 삼성전자주식회사 | Controller for instruction cache and instruction translation reference buffer, and its control method |
| JP5498526B2 (en) | 2012-04-05 | 2014-05-21 | 株式会社東芝 | Cash system |
-
2004
- 2004-04-05 JP JP2004110649A patent/JP3593123B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2004265430A (en) | 2004-09-24 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP4980751B2 (en) | Data processing apparatus and memory read active control method. | |
| CN102110058B (en) | The caching method of a kind of low miss rate, low disappearance punishment and device | |
| EP2275939B1 (en) | Processor and address translating method | |
| US7631146B2 (en) | Processor with cache way prediction and method thereof | |
| KR100335672B1 (en) | Fast data retrieval from physical addressing data storage structures using memory page crossing prediction comments | |
| JP2004157593A (en) | Multiport integration cache | |
| JPH08328958A (en) | Instruction cache as well as apparatus and method for cache memory | |
| JPS5991546A (en) | Central processing unit | |
| US7836253B2 (en) | Cache memory having pipeline structure and method for controlling the same | |
| KR19980063936A (en) | Information processing unit with high hit rate branch prediction with small hardware | |
| JP3589485B2 (en) | Set associative memory device and processor | |
| US6470438B1 (en) | Methods and apparatus for reducing false hits in a non-tagged, n-way cache | |
| JP3590427B2 (en) | Instruction cache memory with read-ahead function | |
| WO2011151944A1 (en) | Cache memory device, program transformation device, cache memory control method, and program transformation method | |
| JP3593123B2 (en) | Set associative memory device | |
| JP2002278752A (en) | Instruction execution result prediction device | |
| KR100517765B1 (en) | Cache memory and control method thereof | |
| JP2007272280A (en) | Data processing device | |
| JP3808837B2 (en) | Cache memory system | |
| CN114691541B (en) | DRAM-NVM hybrid memory predictor based on dynamic access | |
| JP3697990B2 (en) | Vector processor operand cache | |
| JPH06309227A (en) | Cache memory device | |
| JP2001243116A (en) | Write only system for updating least recently used bit | |
| JPH0795309B2 (en) | Set associative cache memory | |
| JP2006343803A (en) | Cache memory |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20040824 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20040826 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080903 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080903 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090903 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090903 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100903 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110903 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110903 Year of fee payment: 7 |
|
| S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110903 Year of fee payment: 7 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120903 Year of fee payment: 8 |
|
| LAPS | Cancellation because of no payment of annual fees |