JP3589485B2 - Set associative memory device and processor - Google Patents
Set associative memory device and processor Download PDFInfo
- Publication number
- JP3589485B2 JP3589485B2 JP12538094A JP12538094A JP3589485B2 JP 3589485 B2 JP3589485 B2 JP 3589485B2 JP 12538094 A JP12538094 A JP 12538094A JP 12538094 A JP12538094 A JP 12538094A JP 3589485 B2 JP3589485 B2 JP 3589485B2
- Authority
- JP
- Japan
- Prior art keywords
- way
- tlb
- prediction
- cache
- unit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0864—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches using pseudo-associative means, e.g. set-associative or hashing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/10—Providing a specific technical effect
- G06F2212/1028—Power efficiency
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/60—Details of cache memory
- G06F2212/608—Details relating to cache mapping
- G06F2212/6082—Way prediction in set-associative cache
-
- 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
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Description
【0001】
【産業上の利用分野】
本発明は、セットアソシアティブ方式のメモリ装置に係わり、特に、消費電力を低減させ、かつ、データ読み出し時のタイムラグを低減させたセットアソシアティブ方式のメモリ装置に関する。
【0002】
【従来の技術】
従来のセットアソシアティブ方式のメモリは、「並列計算機構成論」(富田眞治著、昭晃堂、2.3.2記憶制御装置、(1)記憶階層方式及び(2)キャッシュメモリ)に記載されている。
【0003】
図17は、前記公知文献に記載されている、従来のセットアソシアティブ方式のメモリの概略構成を示すブロック図であり、2セットアソシアティブのアドレス変換バッファ(以下、TLBと称す)691と2セットアソシアティブのキャッシュ692から構成される、TLB・キャッシュ装置である。
【0004】
アドレス600は、論理アドレスであり、TLB691により物理アドレスに変換されてキャッシュ692に入力される。
【0005】
アドレス600は、論理ページ番号604とページ内オフセット601により構成される。
【0006】
論理ページ番号604は、TLB691により物理ページ番号625に変換されキャッシュ692に入力される。
【0007】
ページ内オフセット601は、変換されずにそのままキャッシュ692に入力される。
【0008】
物理アドレスは、物理ページ番号625とページ内オフセット601により構成される。
【0009】
以下、図17に示すTLB・キャッシュ装置の動作を説明する。
【0010】
論理ページ番号604の下位ビット602は、TLBタグ格納部(610,611)に入力され、TLBタグ(612,613)が出力される。
【0011】
これらのTLBタグは、TLBウェイ判定器614に入力される。
【0012】
ここで、610はTLBのウェイ0のタグを、611はTLBのウェイ1のタグをそれぞれ格納するメモリである。
【0013】
次に、TLBウェイ判定器614では、論理ページ番号604の上位ビット603と各ウェイのTLBタグが比較され、どのウェイのTLBタグと一致したかを表すTLBウェイ判定信号615が出力される。
【0014】
一方、論理ページ番号604の下位ビット602はTLBのTLBデータ格納部(620,621)に入力され、物理ページ番号(622,623)が出力される。
【0015】
これらの物理ページ番号は、物理ページ番号選択器624に入力される。
【0016】
ここで、620はウェイ0の物理ページ番号を、621はウェイ1の物理ページ番号をそれぞれ格納するメモリである。
【0017】
物理ページ番号選択器624では、TLBウェイ判定信号615に基づいて、ウェイ0の物理ページ番号622またはウェイ1の物理ページ番号623のどちらかを選択し物理ページ番号625を出力する。
【0018】
ページ内オフセット601は、キャッシュタグ格納部(630,631)に入力され、キャッシュタグ(632,633)が出力される。
【0019】
これらのキャッシュタグ(632,633)は、キャッシュウェイ判定器634に入力される。
【0020】
ここで、630はキャッシュのウェイ0のタグを、631はキャッシュのウェイ1のタグをそれぞれ格納するメモリである。
【0021】
次に、キャッシュウェイ判定器634では、物理ページ番号625と各ウェイのキャッシュタグ(632,633)が比較され、どのウェイのキャッシュタグと一致したかを表すキャッシュウェイ判定信号635が出力される。
【0022】
一方、ページ内オフセット601は、キャッシュデータ格納部(640,641)に入力され、データ(642,643)が出力される。
【0023】
これらのデータ(642,643)は、データ選択器644に入力される。
【0024】
ここで、640はウェイ0のデータを、641はウェイ1のデータをそれぞれ格納するメモリである。
【0025】
データ選択器644では、キャッシュウェイ判定信号635に基づいて、データ642またはデータ643を選択しデータ645を出力する。
【0026】
このとき、物理ページ番号625とウェイ0のキャッシュタグ632が一致していればウェイ0のデータ642、物理ページ番号625とウェイ1のキャッシュタグ633が一致していればウェイ1のデータ643の値がデータ645の値となる。
【0027】
データ645の値は、一旦ラッチ646に格納されたあと、次のサイクルにおいてデータ647として出力される。
【0028】
このTLB・キャッシュ装置においては、TLBタグ格納部(610,611)、TLBデータ格納部(620,621)、キャッシュタグ格納部(630,631)、キャッシュデータ格納部(640,641)の8つのメモリは、同時に並列的に動作することが可能である。
【0029】
即ち、論理アドレス600が入力された時点で、これら8つのメモリは動作を開始できる。
【0030】
一方、TLBタグ格納部(610,611)、TLBウェイ判定器614、物理ページ番号選択器624、キャッシュウェイ判定器634は、同時に実行することはできず、この順番で順々に実行しなければならない。
【0031】
したがって、キャッシュウェイ判定器634の出力であるキャッシュウェイ判定信号635の値を生成するのには時間がかかる。
【0032】
このような理由から、従来の2セットアソシアティブ方式のキャッシュでは、キャッシュウェイ判定信号635の値が判明する前に、あらかじめキャッシュデータ格納部のウェイ0の部分640とウェイ1の部分641の両方を動作させ、ウェイ0のデータ642とウェイ1のデータ643を出力しておき、これをキャッシュウェイ判定信号635で選択する方式がとられていた。
【0033】
この方式では、キャッシュデータ格納部(640,641)のウェイ0の部分640とウェイ1の部分641の両方を同時に動作させるために、キャッシュを動作させるための電力が大きくなるという問題点があった。
【0034】
また、TLBタグ格納部(610,611)、TLBウェイ判定器614、物理ページ番号選択器624、キャッシュウェイ判定器634、及び、データ選択器644は順番に実行しなければならず、TLB・キャッシュ装置に論理アドレス600が入力されてからデータ645が出力されるまでのタイムラグ(遅延時間)が大きくなるという問題点があった。
【0035】
前記問題点を解決するために、セットアソシアティブ方式のキャッシュメモリにおいて、データの読み出し時のセンスアンプの活性化を、タグからのヒット信号によって行い、ヒットした時点でセンスアンプを活性化して、データ読み出し時の消費電力を低減することが、特開平4−328656号公報に記載されている。
【0036】
また、前記問題点を解決するために、セットアソシアティブ方式のキャッシュメモリにおいて、外部から入力されるアドレスとタグ部から読み出されたタグとを比較するアドレス比較部からのヒット信号が出力される前に、直前にアクセスしたデータ部を示すフラグ情報を記憶部に記憶しておき、該フラグ情報を用いることにより、アドレス比較器からのヒット信号が出力される前に、キャッシュメモリのデータ部からデータをデータバスに出力することが、特開平4−252343号公報に記載されている。
【0037】
【発明が解決しようとする課題】
前記特開平4−328656号公報に記載されたセットアソシアティブ方式のキャッシュメモリでは、データ読み出し時の消費電力を低減することが可能であるが、データ読み出しのタイムラグを低減することについて考慮されていないという問題点があった。
【0038】
また、前記特開平4−252343号公報に記載されたセットアソシアティブ方式のキャッシュメモリでは、データ読み出しのタイムラグを低減することが可能であるが、複数の連続した領域を交互にアクセスする場合にウェイを正しく予測する機構を具備しておらず、また、アドレス変換バッファを具備する、セットアソシアティブ方式のキャッシュメモリのデータ読み出し時のタイムラグについて考慮されていないという問題点があった。
【0039】
本発明は、前記従来技術の問題点を解決するためになされたものであり、本発明の目的は、セットアソシアティブ方式のメモリ装置において、消費電力を低減させ、かつ、データ読み出し時のタイムラグを低減させることが可能な技術を提供することにある。
【0040】
また、本発明の他の目的は、アドレス変換バッファを具備する、セットアソシアティブ方式のメモリ装置において、消費電力を低減させ、かつ、データ読み出し時のタイムラグを低減させることが可能な技術を提供することにある。
【0041】
また、本発明の他の目的は、アドレス変換バッファを具備する、セットアソシアティブ方式のメモリ装置において、いくつかの連続した領域を交互にアクセスする場合に、データ読み出しのタイムラグを低減させることが可能な技術を提供することにある。
【0042】
本発明の前記目的並びにその他の目的及び新規な特徴は、本明細書の記載及び添付図面によって明らかにする。
【0043】
【課題を解決するための手段】
本願において開示される発明のうち、代表的なものの概要を簡単に説明すれば、下記の通りである。
【0044】
(1)セットアソシアティブ方式のメモリ装置であって、タグを格納するタグ格納部と、データを格納するデータ格納部と、アクセスアドレスの一部とタグ格納部に格納されているタグとを比較し、どのウェイがヒットしたかを示すウェイ判定信号を出力するウェイ判定器と、ウェイ選択信号に基づき、その選択されたウェイのデータ格納部のデータを選択するデータ選択器と、前記ウェイ判定信号の予測値を発生するウェイ予測部と、前記ウェイ予測部からの予測値に基づき予測されたウェイのデータ格納部だけを活性化する手段とを具備することを特徴とする。
(2)前記(1)の手段において、前記予測値をウェイ選択信号としてデータ選択器に入力する手段と、前記ウェイ判定器からのウェイ判定信号と前記予測値を比較し、不一致の場合にウェイ予測判定信号を出力するウェイ予測判定部と、前記ウェイ予測判定部からのウェイ予測判定信号に基づき、前記ウェイ予測部の予測値をヒットしたウェイを示すウェイ判定信号に変更する手段とを、さらに具備することを特徴とする。
【0045】
(3)前記(1)または(2)の手段において、前記ウェイ予測部からの予測値に基づき、予測されたウェイのタグ格納部だけを活性化する手段を、さらに具備することを特徴とする。
(4)前記(1)ないし(3)の手段において、前記ウェイ予測部は、ウェイの番号値を記憶する予測ウェイラッチを有し、前記予測ウェイラッチに記憶されたウェイの番号値をウェイ判定信号の予測値として出力することを特徴とする。
【0046】
(5)前記(1)ないし(3)の手段において、前記ウェイ予測部は、ウェイの番号値を記憶する複数の予測ウェイラッチを有し、複数の連続した領域をアクセスする場合に、対応する複数の予測ウェイラッチに記憶されたウェイの番号値をウェイ判定信号の予測値として出力することを特徴とする。
【0047】
(6)前記(1)ないし(5)の手段において、前記メモリ装置は、さらに、セットアソシアティブ方式のアドレス変換バッファを具備し、前記メモリ装置のウェイ判定器は、アドレス変換バッファからの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ウェイ判定信号に変更する手段とを具備することを特徴とする。
【0048】
(7)前記(6)の手段において、前記TLBウェイ予測部からの予測値に基づき、予測されたウェイのTLBタグ格納部だけを活性化する手段を、さらに具備することを特徴とする。
【0049】
(8)タグを格納するタグ格納部と、データを格納するデータ格納部と、アクセスアドレスの一部とタグ格納部に格納されているタグとを比較し、どのウェイがヒットしたかを示すウェイ判定信号を出力するウェイ判定器と、ウェイ選択信号に基づき、その選択されたウェイのデータ格納部のデータを選択するデータ選択器とを具備するセットアソシアティブ方式のメモリ装置であって、ウェイの番号値を記憶する複数の予測ウェイラッチと、複数の連続した領域をアクセスする場合に、対応する複数の予測ウェイラッチに記憶されたウェイの番号値をウェイ判定信号の予測値として出力するウェイ予測部と、前記予測値をウェイ選択信号としてデータ選択器に入力する手段と、前記ウェイ判定器からのウェイ判定信号と前記予測値を比較し、不一致の場合にウェイ予測判定信号を出力するウェイ予測判定部と、前記ウェイ予測判定部からのウェイ予測判定信号に基づき、前記ウェイ予測部の予測値をヒットしたウェイを示すウェイ判定信号に変更する手段とを具備することを特徴とする。
【0050】
(9)前記(8)の手段において、前記メモリ装置は、さらに、セットアソシアティブ方式のアドレス変換バッファを具備し、前記メモリ装置のウェイ判定器は、アドレス変換バッファからの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ウェイ判定信号に変更する手段とを具備することを特徴とする。
【0051】
(10)前記(9)の手段において、前記TLBウェイ予測部は、任意のTLB予測ウェイラッチに記憶された番号値を他のTLB予測ウェイラッチに転送する手段を、さらに具備することを特徴とする。
【0052】
【作用】
前記(1)、(2)、(4)の手段によれば、セットアソシアティブ方式のメモリ装置において、ウェイ予測部によってどのウェイがヒットするかを予測し、予測されたウェイのデータ格納部のみを動作させるようにしたので、メモリ装置を動作させるための消費電力を低減させ、かつ、データ読み出しのタイムラグを低減させることが可能となる。
【0053】
前記(1)、(2)、(3)の手段によれば、セットアソシアティブ方式のメモリ装置において、ウェイ予測部によってどのウェイがヒットするかを予測し、予測されたウェイのデータ格納部、あるいは、予測されたタグ格納部およびデータ格納部のみを動作させるようにしたので、メモリ装置を動作させるための消費電力を低減させ、かつ、データ読み出しのタイムラグを低減させることが可能となる。
【0054】
また、前記(5)の手段によれば、ウェイ予測部によってどのウェイがヒットするかを予測し、予測されたウェイのデータ格納部、あるいは、予測されたタグ格納部およびデータ格納部のみを動作させるようにしたセットアソシアティブ方式のメモリ装置において、複数の連続した領域をアクセスする場合に、ウェイ予測部の複数の予測ウェイラッチに記憶されたウェイの番号値をウェイ判定信号の予測値として用いるようにしたので、いくつかの連続した領域を交互にアクセスする場合に、メモリ装置を動作させるための消費電力を低減させ、かつ、データ読み出しのタイムラグを低減させることが可能となる。
【0055】
また、前記(6)または(7)の手段によれば、アドレス変換バッファを具備するセットアソシアティブ方式のメモリ装置において、アドレス変換バッファのTLBウェイ予測部によってアドレス変換バッファのどのウェイがヒットするかを予測し、予測されたウェイのTLBデータ格納部、あるいは、予測されたTLBタグ格納部およびTLBデータ格納部のみを動作させるようにするとともに、メモリ装置のウェイ予測部によってメモリ装置のどのウェイがヒットするかを予測し、予測されたウェイのデータ格納部、あるいは、予測されたタグ格納部およびデータ格納部のみを動作させるようにしたので、アドレス変換バッファを具備するメモリ装置を動作させるための消費電力を低減させ、かつ、データ読み出しのタイムラグを低減させることが可能となる。
【0056】
また、前記(8)の手段によれば、セットアソシアティブ方式のメモリ装置において、ウェイの番号値を記憶する複数の予測ウェイラッチを有するウェイ予測部により、複数の連続した領域をアクセスする場合に、どのウェイがヒットするかを予測するようにしたので、いくつかの連続した領域を交互にアクセスする場合に、データ読み出しのタイムラグを低減させることが可能となる。
【0057】
また、前記(9)または(10)の手段によれば、アドレス変換バッファを具備するセットアソシアティブ方式のメモリ装置において、複数の連続した領域をアクセスする場合に、ウェイの番号値を記憶する複数のTLB予測ウェイラッチを有するTLBウェイ予測部により、アドレス変換バッファのどのウェイがヒットするかを予測するとともに、ウェイの番号値を記憶する複数の予測ウェイラッチを有するウェイ予測部により、メモリ装置のどのウェイがヒットするかを予測するようにしたので、データ読み出しのタイムラグを低減させることが可能となる。
【0058】
【実施例】
以下、図面を参照して本発明の実施例を詳細に説明する。
【0059】
なお、実施例を説明するための全図において、同一機能を有するものは同一符号を付け、その繰り返しの説明は省略する。
【0060】
図1は、本発明のメモリ装置の一実施例(実施例1)であるキャッシュの概略構成を示すブロック図であり、本実施例1のキャッシュをプロセッサに適用した例を示す図である。
【0061】
図1において、プロセッサは、プロセッサ本体182、アドレス変換バッファ(以下、TLBと称す)191、キャッシュ192、キャッシュウェイ予測部193、及び、キャッシュウェイ予測判定部194から構成される。
【0062】
プロセッサ本体182は、アドレス生成部190とデータ処理部195を含んでいる。
【0063】
TLB191は、2セットアソシアティブ方式のメモリであり、また、キャッシュ192は2セットアソシアティブ方式のメモリであり、ウェイの予測を行なっている。
【0064】
図2は、図1に示す、キャッシュ192、キャッシュウェイ予測部193、及び、キャッシュウェイ予測判定部194のより詳細な構成を拡大して示すブロック図であり、図3は、図1に示すTLB191のより詳細な構成を拡大して示すブロック図である。
【0065】
図4は、図1に示すプロセッサのタイムチャートを示す図である。
【0066】
図4は、キャッシュのウェイ0が予測され、予測がヒットした場合のタイムチャートを示す図である。
【0067】
まず、図1と図4を用いて、図1に示すプロセッサの動作の概要を説明する。
【0068】
図1に示すプロセッサは、パイプライン制御で処理される。
【0069】
図4における、数字401は命令の番号を表し、1と番号の書かれた領域は、命令1を処理していることを示す。
【0070】
以下、命令1の処理について述べる。
【0071】
図1に示すように、TLB191、キャッシュ192、キャッシュウェイ予測部193、及び、キャッシュウェイ予測判定器194から構成される部分は、動作するタイミングの違いによりメモリ部180とウェイ判定部181に分けられる。
【0072】
時刻1で、アドレス生成部190はアドレスを生成し、次の時刻に前記アドレスをアドレス100として出力する。
【0073】
時刻2で、メモリ部180は、アドレス100を入力して1サイクル後にデータ147をデータ処理部195に出力する。
【0074】
このとき、キャッシュウェイ予測部193の出力信号であるキャッシュ予測ウェイ信号151はウェイ0を示しており、メモリ部180のキャッシュデータ格納部140、141に関しては、予測されたウェイ、すなわち、ウェイ0のキャッシュデータ格納部140のみが動作する。
【0075】
そして、前記キャッシュデータ格納部140から読み出されたデータがデータ147として出力される。
【0076】
時刻3では、データ処理部195がデータ147を入力して処理する。
【0077】
また、時刻3では、ウェイ判定部181によって、メモリ部180から読み出されたデータ147が正しいウェイのデータであるか確認するための判定が行われる。
【0078】
メモリ部180とこのウェイ判定部181はパイプライン方式で処理を行うことができる。
【0079】
すなわち、時刻3において命令1がウェイ判定部181で処理されているときは、命令2がメモリ部180で処理される。
【0080】
すべての命令のデータがウェイ判定部181によって、正しいウェイのデータであると判定されると(すなわち、ウェイ予測がヒットすると)、図4のようなタイムチャートとデータが処理される。
【0081】
次に、図1〜図4を用いて、図1に示すプロセッサの動作の詳細を説明する。
【0082】
最初に、時刻2におけるメモリ部180の動作ついて説明する。
【0083】
まず、論理ページ番号上位ビット103は、ラッチ105に格納される。
【0084】
また、論理ページ番号下位ビット102は、TLBタグ格納部(110,111)と、TLBのTLBデータ格納部(120,121)にそれぞれ入力される。
【0085】
そして、TLBタグ格納部(110,111)とTLBのTLBデータ格納部(120,121)が動作し、それぞれの出力がラッチ116、117、126および127にそれぞれ格納される。
【0086】
一方、アドレスのページ内オフセット101は、キャッシュタグ格納部(130,131)と、キャッシュデータ格納部(140,141)に入力される。
【0087】
そして、前記キャッシュタグ格納部(130,131)が動作して、それぞれキャッシュタグ(132,133)にタグの値を出力し、前記値はそれぞれラッチ(136,137)に格納される。
【0088】
また、キャッシュウェイ予測部193からキャッシュ予測ウェイ信号151が出力される。
【0089】
前記信号151の値は予測されたウェイ、すなわち、ウェイ0を示す。
【0090】
この信号151は、ウェイデコーダ160でデコードされて、キャッシュデータ格納部(140,141)に入力される。
【0091】
このとき、信号151の値がウェイ0を示すので、ウェイデコーダ160からウェイ0のデータ格納部140を動作させるための信号161が出力される。
【0092】
この信号161により、データ格納部140が動作し、データ142を出力する。この場合、データ格納部141は動作しない。
【0093】
データ選択器144には、予測されたウェイのデータ142とキャッシュ予測ウェイ信号151が入力される。
【0094】
データ選択器144では、キャッシュ予測ウェイ信号151により示されたウェイ、すなわち、ウェイ0のデータ142が選択されてデータ145に出力される。
【0095】
また、キャッシュ予測ウェイ信号151はラッチ152に格納される。
【0096】
以上の処理が1サイクルで行なわれる。
【0097】
図7は、ウェイデコーダ160の構成を示す図である。
【0098】
キャッシュ予測ウェイ信号151は、2ビットの信号であり、ウェイ0が予測されたことを表す信号とウェイ1が予測されたことを表す信号により構成される。
【0099】
ウェイデコーダ160では、2ビットの信号を1ビットづつに分解してウェイ0が予測されたことを表す信号をキャッシュウェイ0イネーブル信号161として、ウェイ1が予測されたことを表す信号をキャッシュウェイ1イネーブル信号162としてそれぞれ出力する。
【0100】
次に、時刻3におけるウェイ判定部の動作について説明する。
【0101】
ラッチ105に格納された論理ページ番号上位ビットと、ラッチ(116,117)に格納されたTLBタグと、ラッチ(126,127)に格納された物理ページ番号とに基づき、TLBウェイ判定器114と物理ページ番号選択器124によって、物理ページ番号125の値が生成される。
【0102】
さらに、ラッチ(136,137)に格納されたキャッシュタグと物理ページ番号125とに基づき、キャッシュウェイ判定器134によってキャッシュウェイ判定信号135に値が出力される。
【0103】
キャッシュウェイ判定信号135は2ビットの信号であり、物理ページ番号125とウェイ0のキャッシュタグ138が一致したかどうかを示す1ビット信号と物理ページ番号125とウェイ1のキャッシュタグ139が一致したかを示す1ビット信号により構成される。
【0104】
キャッシュウェイ予測判定器154では、ラッチ152に格納されたキャッシュ予測ウェイ信号151の値とキャッシュウェイ判定信号135とに基づいてキャッシュ192のウェイ予測がミスしたかどうかを判定する。
【0105】
図6は、図1に示すキャッシュウェイ予測判定器154を含むキャッシュウェイ予測判定部194のより詳細な構成を示ブロック図である。
【0106】
キャッシュ192の予測されたウェイを示す信号153は2ビットの信号であり、ウェイ0が予測されたことを示す信号710とウェイ1が予測されたことを示す信号711により構成される。
【0107】
また、キャッシュウェイ判定信号135は2ビットの信号であり、ウェイ0がヒットしたことを示す信号712とウェイ1がヒットしたことを示す信号713により構成される。
【0108】
AND演算器700は、ウェイ0が予測され、かつ、ウェイ0がヒットしたときに1を出力する。
【0109】
また、AND演算器701は、ウェイ1が予測され、かつ、ウェイ1がヒットしたときに1を出力する。
【0110】
キャッシュウェイ予測判定禁止信号704は、キャッシュウェイ予測判定を行なわないときに1を出力する信号であり、時刻3では0を出力している。
【0111】
OR演算器705は、ウェイ0が予測されかつウェイ0がヒットしたか、または、ウェイ1が予測されかつウェイ1がヒットしたとき1を出力する。
【0112】
すなわち、OR演算器705は、キャッシュのウェイ予測がヒットした場合に1を出力する。
【0113】
NOT演算器707は、キャッシュのウェイ予測がミスした場合にキャッシュウェイ予測判定信号155に1の値を出力する。
【0114】
時刻3では、命令1に関する処理がキャッシュウェイ予測判定器154で行なわれ、ウェイ0が予測されてウェイ0がヒットしているのでAND演算器700の出力信号702の値が1となる。
【0115】
そして、キャッシュウェイ予測判定信号155の値は0となり、キャッシュウェイ予測判定信号155ウェイ予測がヒットしたことを示す。
【0116】
ウェイ予測がヒットすれば、図4に示すように命令1と命令2はパイプラインで実行することができる。
【0117】
次に、キャッシュウェイ予測部193においてウェイ0を予測したにもかかわらず、キャッシュ192のウェイ1がヒットした場合について述べる。
【0118】
この場合には、ウェイ予測がミスしたことになる。
【0119】
キャッシュ192のウェイ1がヒットすると、キャッシュウェイ判定信号135の値はウェイ1を示し、図6に示す信号712の値が0に、信号713の値が1となる。
【0120】
一方、ウェイ0が予測されていたので、信号710の値は1、信号711の値は0であるから、AND演算器700及び701の出力はともに0となり、信号706の値は0に、キャッシュウェイ予測判定信号155の値は1になる。
【0121】
すなわち、キャッシュウェイ予測判定信号155はウェイ予測ミスを示す。
【0122】
キャッシュウェイ予測判定信号155の値が1となると例外的な処理が実行される。
【0123】
図5は、前記した場合のタイムチャートを示す図である。
【0124】
図5は、命令1でウェイ0が予測されてウェイ予測がミスし、命令2以降でウェイ1が予測されてウェイ予測がヒットした場合のタイムチャートである。
【0125】
時刻3で、命令1のキャッシュウェイ予測判定信号155がウェイ予測のミスを示した場合、パイプライン制御信号156が出力されて、時刻3に行なわれようとしているプロセッサ本体182、TLB191、キャッシュ192の動作を抑止する。
【0126】
TLB191では、次の命令、すなわち、命令2の処理を開始しているが、途中で抑止される。
【0127】
また、時刻3では、キャッシュウェイ予測判定信号155によって、キャッシュウェイ判定信号135がラッチ150に格納される。
【0128】
これにより、キャッシュ予測ウェイ信号151の値が置き変わる。
【0129】
すなわち、時刻4からは、キャッシュ予測ウェイ信号151の値は、時刻3でキャッシュがヒットしたウェイであるウェイ1を示す。
【0130】
時刻4では、新しい値を持つキャッシュ予測ウェイ信号151が出力され、ウェイ1のキャッシュデータ格納部141を動作させる。
【0131】
キャッシュデータ格納部141の出力であるウェイ1のデータ143は、キャッシュ予測ウェイ信号151によりデータ選択器144で選択されてラッチ146に格納される。
【0132】
時刻5では、ラッチ146に格納されたウェイ1のデータがキャッシュ192から出力され、データ処理部195で処理される。
【0133】
なお、本実施例1において、キャッシュウェイ予測部193からの出力信号であるキャッシュ予測ウェイ信号151により、予測されたウェイのデータ格納部(140,141)だけでなく、予測されたウェイのタグ格納部(130,131)だけを活性化することも可能である。
【0134】
図8は、本発明のメモリ装置の他の実施例(実施例2)であるアドレス変換バッファ(TLB)と、キャッシュの概略構成を示すブロック図であり、本実施例2のアドレス変換バッファ(TLB)991と、キャッシュ992をプロセッサに適用した例を示す図である。
【0135】
図8に示すプロセッサは、図1に示すプロセッサにおいて、TLBウェイ予測部996とTLBウェイ予測判定部997を付加し、TLBについてもウェイの予測を行なうようにしたものである。
【0136】
本実施例2のTLBウェイ予測部996、および、TLBウェイ予測判定部997の構成は、前記実施例1のキャッシュウェイ予測部193、キャッシュウェイ予測判定部194と同じである。
【0137】
図8に示すプロセッサ本体982、キャッシュ992、キャッシュウェイ予測部993、キャッシュウェイ予測判定部994は、それぞれ、図1に示すプロセッサ本体182、キャッシュ192、キャッシュウェイ予測部193、キャッシュウェイ予測判定部194に対応している。
【0138】
図9は、図8に示すプロセッサのタイムチャートを示す図である。
【0139】
図9は、命令1から命令4のすべての命令について、TLBのウェイ0が予測され、予測がヒットした場合のタイムチャートを示す図である。
【0140】
図8、図9を用いて、図8に示すプロセッサの動作の概要を説明する。
【0141】
図8に示すプロセッサは、パイプライン制御で処理される。
【0142】
図9において、数字1001は命令の番号を表し、1と番号の書かれた領域は、命令1を処理していることを示す。
【0143】
以下、命令1の処理について述べる。
【0144】
図9に示すように、TLB991、キャッシュ992、TLBウェイ予測部996、及び、TLBウェイ予測判定部997、キャッシュウェイ予測部993、及び、キャッシュウェイ予測判定部994から構成される部分は、動作するタイミングの違いによりメモリ部980とウェイ判定部981に分けられる。
【0145】
時刻1で、アドレス生成部990はアドレスを生成し、次の時刻にアドレス900を出力する。
【0146】
時刻2で、メモリ部980は、アドレス900を入力して1サイクル後にデータ947をデータ処理部995に出力する。
【0147】
TLBデータ格納部(920,921)に関しては、TLBウェイ予測部996で予測されたウェイのTLBデータ格納部920だけが動作する。
【0148】
ここでは、TLBウェイ予測部996でウェイ0が予測されているので、前記TLBウェイ予測部996の出力であるTLB予測ウェイ信号961はウェイ0を示す。
【0149】
そして、前記TLB予測ウェイ信号961がTLB991に入力されて、TLBデータ格納部920が動作する。
【0150】
また、キャッシュデータ格納部(940,941)に関しては、キャッシュウェイ予測部993で予測されたウェイのキャッシュデータ格納部940だけが動作し、キャッシュデータ格納部940から読み出されたデータがデータ947として出力される。
【0151】
また、時刻2では、TLBタグ格納部(910,911)と、キャッシュタグ格納部(930,931)が動作する。
【0152】
そして、時刻3では、データ処理部995がデータ947を入力して処理する。
【0153】
また、TLB991では、論理ページ番号904の上位ビットと前時刻にTLBタグ格納部(910,911)から読みだされたTLBタグが比較され、TLBウェイ判定信号960を出力する。
【0154】
さらに、TLB991から前時刻にTLBウェイ予測部996で予測されたウェイ、すなわち、ウェイ0のTLBデータ格納部920から読みだされた物理ページ番号925が出力され、キャッシュ992に送られる。
【0155】
キャッシュ992では、物理ページ番号925と前時刻にキャッシュタグ格納部(930,931)から読みだされたキャッシュタグが比較され、キャッシュウェイ判定信号935を出力する。
【0156】
また、時刻3では、TLBウェイ予測判定部997において、TLBウェイ判定信号960の値と前時刻に出力されたTLB予測ウェイ信号961の値をもとにTLBのウェイ予測がミスしていたかどうか判定する。
【0157】
さらに、時刻3では、キャッシュウェイ予測判定部994により、時刻2におけるキャッシュウェイ予測がミスしていたかどうかを判定する。
【0158】
もし、TLBウェイ予測とキャッシュウェイ予測がともにヒットしていれば、第10図のようなタイムチャートとなる。
【0159】
次に、TLBのウェイ0を予測したにもかかわらず、TLBのウェイ1がヒットした場合について説明する。
【0160】
この場合には、TLBウェイ判定信号960の値がウェイ1を示し、TLBウェイ予測判定部997はTLBウェイ予測がミスしたものと判定する。
【0161】
図10は、前記した場合のタイムチャートを示す図である。
【0162】
この場合には、TLBウェイ予測判定信号962に値1が出力され、この値1は、TLBウェイ予測ミスを示している。
【0163】
そして、TLBウェイ予測判定信号962によって、TLBウェイ判定信号960の値がTLBウェイ予測部996に格納される。
【0164】
この格納によって、時刻3におけるTLBウェイ判定信号960の値、すなわち、ウェイ1を示す値が、時刻4からはTLB予測ウェイ信号961に出力される。
【0165】
また、時刻3において、パイプライン制御信号963が出力されて、時刻3に行なわれようとしているプロセッサ本体982、TLB991、キャッシュ992の動作を抑止する。
【0166】
TLB991やキャッシュ992では次の命令、すなわち、命令2の処理を開始しているが、途中で抑止される。
【0167】
時刻4では、新しい値をTLB予測ウェイ信号961が出力される。
【0168】
前記TLB予測ウェイ信号961の値はウェイ1を示しており、ウェイ1のTLBデータ格納部921を動作させる。
【0169】
一方、時刻4では、キャッシュ992は動作せずに内部状態を保持する。
【0170】
時刻5では、TLBデータ格納部921の出力が物理ページ番号925に出力される。
【0171】
そして、キャッシュ992よりキャッシュウェイ判定信号935が出力されてキャッシュウェイ予測判定部994に送られ、キャッシュウェイ予測判定部994でキャッシュのウェイ予測がミスしていないかどうかの判定が行なわれる。
【0172】
なお、本実施例2において、TLBウェイ予測部996からの出力信号であるTLB予測ウェイ信号961により、予測されたウェイのTLBデータ格納部(920,921)だけでなく、予測されたウェイのTLBタグ格納部(910,911)だけを活性化することも可能である。
【0173】
図11は、本発明のメモリ装置の他の実施例(実施例3)であるキャッシュの概略構成を示すブロック図であり、本実施例3のキャッシュをプロセッサに適用した例を示す図である。
【0174】
図11は、図1に示すプロッセサのアドレス生成部190をアドレス生成部1290に、キャッシュウェイ予測部193をキャッシュウェイ予測部1293にそれぞれ変更し、さらに、アドレス制御部1296を付加したものである。
【0175】
図11に示すプロセッサ本体1282、TLB1291、キャッシュ1292、キャッシュウェイ予測部1293、キャッシュウェイ予測判定部1294は、それぞれ、図1に示すプロセッサ本体182、TLB191、キャッシュ192、キャッシュウェイ予測器193、キャッシュウェイ予測判定部194に対応している。
【0176】
アドレス生成部1290は、4つのアドレスラッチ1220〜1223を持っている。
【0177】
本実施例3においては、それぞれの前記アドレスラッチ1220〜1223に対応するキャッシュ予測ウェイラッチ1230〜1233をキャッシュウェイ予測部1293が持っていることが特徴である。
【0178】
アドレス生成部1290は、1220〜1223の4つのアドレスラッチを持ち、前記ラッチの出力のうちのいずれかひとつをアドレス選択器1224によって選択し、アドレス加算器1226とラッチ1228を経て1サイクル後にアドレス1200に出力する。
【0179】
一方、キャッシュウェイ予測部1293は、アドレスラッチ1220〜1223に対応する4つのキャッシュ予測ウェイラッチ1230〜1233を持ち、アドレス選択器1224において、その出力が選択されたアドレスラッチに対応するキャッシュ予測ウェイラッチの出力をキャッシュ予測ウェイ選択器1234によって選択してキャッシュ予測ウェイ信号1212として出力する。
【0180】
このとき、アドレス選択器1224には、アドレス制御部1296から出力されるアドレスラッチ読みだし選択信号1205が、キャッシュ予測ウェイ選択器1234には、アドレスラッチ読みだし選択信号1205の1サイクル遅れの信号であるキャッシュ予測ウェイラッチ読みだし選択信号1208がそれぞれ入力される。
【0181】
そして、アドレスラッチ1220の出力がアドレス選択器1224において選択された場合には、キャッシュ予測ウェイラッチ1230の出力がキャッシュ予測ウェイ選択器1234において選択される。
【0182】
同様に、それぞれアドレスラッチ1221、1222、1223の出力がアドレス選択器1224において選択された場合には、それぞれキャッシュ予測ウェイラッチ1231、1232、1233の出力がキャッシュ予測ウェイ選択器1234において選択される。
【0183】
アドレス加算器1226は、同一のアドレスラッチを用いて連続するアドレス領域を次々にアクセスする場合に、アドレスラッチの値にある値を加えるときに使用する。
【0184】
ウェイ予測がミスしたときは、キャッシュ予測ウェイ信号1212に値を出力するために使用されたキャッシュ予測ウェイラッチにキャッシュウェイ判定信号1211の値が書き込まれる。
【0185】
この書き込みを行なうための機構が、ラッチ1240及びデコーダ1242である。
【0186】
ラッチ1240は、キャッシュ予測ウェイ選択器1234に入力されたキャッシュ予測ウェイラッチ読みだし選択信号1208の値を格納し記憶する。
【0187】
ウェイ予測がミスしたときは、キャッシュウェイ予測判定信号の値が1となる。
【0188】
デコーダ1242に入力される前記キャッシュウェイ予測判定信号1214の値が1となると、デコーダ1242はラッチ1240に格納された値をデコードしてラッチセット信号1243〜1246のいずれかひとつの値を1にする。
【0189】
図12は、図11に示すデコーダ1242の回路構成を示す図である。
【0190】
図11に示す信号1241はデコード入力信号1400に、図11に示す信号1243〜1246はデコード出力信号1430〜1433に、図11に示す信号1214はデコードイネーブル信号1410に対応している。
【0191】
デコード入力信号1400は、2ビットの2進数により構成され、第0ビット目の信号1402と第1ビット目の信号1403に分解することができる。
【0192】
前記デコーダは、この2ビットの信号の値により、デコード出力信号1430〜1433のうちのいずれかひとつを1にする。
【0193】
ただし、デコードイネーブル信号1410の値が0のときは、デコード出力信号1430〜1433の値はすべて0となる。
【0194】
それぞれラッチセット信号1243〜1246が1のとき、それぞれキャッシュ予測ウェイラッチ1230〜1233にキャッシュウェイ判定信号1211の値が書き込まれる。
【0195】
図13は、キャッシュ1292のデータ格納部に格納されたデータの一例を示す図である。
【0196】
図13において、1700はウェイ0のキャッシュデータ格納部を、1701はウェイ1のキャッシュデータ格納部をそれぞれ表す。
【0197】
1710は、キャッシュ1292のラインであり、本例では1ラインに4つのデータが格納される。
【0198】
1711は、キャッシュ1292に格納されたデータである。
【0199】
1712は、データ1711のアドレスを補助的に示したものである。
【0200】
一般に、キャッシュ1292では、データはラインごとに管理され、同一ラインのデータは同一のウェイに格納される。
【0201】
図13に示す例では、アドレス200からアドレス203までが同一のラインに対応しており、データB[0]からデータB[3]までが同一ウェイに格納されている。
【0202】
同様に、データA[0]からデータA[3]までが同一ウェイに格納される。
【0203】
データAは文字列データであり、データA[0]は1番目の文字データを、データA[1]は2番目の文字データを、データA[2]は3番目の文字データを、データA[3]は4番目の文字データを意味している。
【0204】
また、データBも同様な文字列データである。
【0205】
ここでは、文字列データAと文字列データBとを比較するためにキャッシュ1292から順次文字データを読み出す処理の例を示す。
【0206】
文字列の比較では、文字データA[0]が文字データB[0]と、文字データA[1]が文字データB[1]と、以下同様に、文字データA[3]が文字データB[3]とそれぞれ比較される。
【0207】
そのために、文字データA[0]、文字データB[0]、文字データA[1]、文字データB[1]、以下同様に、文字データA[3]、文字データB[3]の順番でキャッシュ1292から文字データが読み出される。
【0208】
以下、図14のタイムチャートを用いて、図11に示すプロセッサの動作を説明する。
【0209】
図14において、1601はラッチやキャッシュの出力信号の値、もしくは、信号の値を示す。
【0210】
時刻0において、文字列データAの先頭アドレス100がアドレスラッチ1220に、文字列データBの先頭アドレス200がアドレスラッチ1221にそれぞれ格納されているものとする。
【0211】
図11に示すプロセッサでは、文字列データAの各文字データを読み出すのにアドレスラッチ1220を使用し、文字データA〔0〕を読み出すときにはアドレス加算器1226において値0を、文字データA〔1〕を読み出すときにはアドレス加算器1226において値1を、以下同様に、文字データA〔3〕を読み出すときにはアドレス加算器1226において値3をそれぞれアドレスラッチ1220の値に加えている。
【0212】
同様に、文字列データBの各文字データを読み出すのにアドレスラッチ1221を使用している。
【0213】
また、時刻0においては、キャッシュ予測ウェイラッチ1230、1231ともに値が0であるものとする。
【0214】
すなわち、アドレスラッチ1220、アドレスラッチ1221に対応する予測ウェイはともに0である。
【0215】
このタイムチャートにおいて、時刻1から読み出し処理を開始している。
【0216】
時刻1において、アドレス100にある文字データA〔0〕を読み出すために、アドレスラッチ選択信号1205の値が0となりアドレスラッチ1220の値100が選択されてアドレスラッチ選択出力信号1225に出力される。
【0217】
そして、アドレス加算器1226を経てアドレス1227に出力される。
【0218】
アドレス加算器1226では何も加えられずアドレス1227の値は100のままである。
【0219】
時刻2で、アドレスラッチ選択信号1205の値の1サイクル遅れの信号であるキャッシュ予測ウェイラッチ読み出し選択信号1208の値0によって、アドレスラッチ1220に対応するキャッシュ予測ウェイラッチ1230の値0がキャッシュ予測ウェイ信号1212が読み出される。
【0220】
このことによって、キャッシュデータ格納部ウェイ0(1700)が動作する。
【0221】
時刻3では、キャッシュウェイ判定信号1211が出力されるが、図13に示すとおりアドレス100にあるデータA〔0〕はキャッシュのウェイ1に存在するのでキャッシュウェイ判定信号1211の値は1となる。
【0222】
キャッシュウェイ予測判定部1294では、このキャッシュウェイ判定信号1211の値1と時刻2で出力されたキャッシュ予測ウェイ信号1212の値0とを比較するが、不一致なのでウェイ予測ミスとなる。
【0223】
そこで、パイプライン制御信号1213を発行するとともに、キャッシュウェイ予測判定信号1214の値を1にする。
【0224】
デコーダ1242には、キャッシュ予測ウェイラッチ読み出し選択信号1208の1サイクル遅れの信号であるデコーダ入力信号1241が入力され、時刻2で読み出しを行ったキャッシュ予測ウェイラッチ1230にラッチセット信号1243が入力される。
【0225】
このことによって、キャッシュウェイ判定信号1211の値1がキャッシュ予測ウェイラッチ1230に書き込まれる。
【0226】
すなわち、時刻3において、アドレスラッチ1220に対応する予測ウェイは1に変更される。
【0227】
時刻4では、キャッシュ予測ウェイラッチ1230の値が1となり、キャッシュ予測ウェイ信号1212には正しいウェイ予測値である1が出力され、キャッシュデータ格納部ウェイ1(1701)から文字データA〔0〕が読み出される。
【0228】
時刻5では、キャッシュの出力データ信号1215にA〔0〕が出力される。
【0229】
一方、時刻2では、アドレス200にある文字データB〔0〕を読み出すために、アドレスラッチ選択信号1205の値が1となりアドレスラッチ1221の値200が選択されてアドレスラッチ選択出力信号1225に出力される。
【0230】
そして、アドレス加算器1226を経てアドレス1227に出力される。
【0231】
アドレス加算器1226では、何も加えられずアドレス1227の値は200のままである。
【0232】
時刻3では、この値200がラッチ1228からアドレス1200から出力される。
【0233】
また、アドレスラッチ選択信号1205の値1がラッチ1209からキャッシュ予測ウェイラッチ読み出し選択信号1208に出力される。
【0234】
時刻4では、キャッシュ予測ミス処理のために、一旦、アドレスラッチ選択信号1205の値とキャッシュ予測ウェイラッチ読み出し選択信号1208の値は、文字データA〔0〕の読み出しのために変更されてしまうが、時刻5では、再び時刻3と同じ値を取り戻す。
【0235】
ここで、ラッチ1209とラッチ1228は値回復機能付きラッチであり、その回路構成を図15に示す。
【0236】
図15において、回復機能付きラッチ1800がラッチ1209またはラッチ1228に、入力信号1801が信号1205または信号1227に、出力信号1802が信号1208または1200にそれぞれ対応している。
【0237】
値回復機能付きラッチ1800は、通常、ラッチ1810を用いて入力信号1801を出力信号1802に出力する単なるラッチとして機能するが、1サイクル前の値をラッチ1811に記憶している。
【0238】
文字データA〔0〕読み出しのキャッシュのウェイ予測のミスが判定された時刻3では、既に、次の文字データB〔0〕のアドレスまたはキャッシュ予測ウェイラッチ読み出し選択信号(以下、文字データB〔0〕読み出しパラメータと呼ぶ)が回復機能付きラッチ1800から出力されているが、文字データA〔0〕読み出しパラメータはラッチ1811に記憶されている。
【0239】
この時刻に発行されるパイプライン制御信号1213をもとに、時刻4では、ラッチ1811に格納された文字データA〔0〕読み出しパラメータを読み出してウェイ予測ミスをした文字データA〔0〕の読み出し処理を再実行し、時刻5では文字データB〔0〕読み出しパラメータをラッチ1810から読み出して通常の処理に戻る。
【0240】
そして、時刻5では、キャッシュ予測ウェイラッチ読み出し選択信号1208の値1によってキャッシュ予測ウェイラッチが選択されキャッシュ予測ウェイ信号1212に値0が出力される。
【0241】
このことによって、キャッシュデータ格納部ウェイ0(1700)が動作して文字データB〔0〕を読み出す。
【0242】
文字データB〔0〕は、図13に示されるようにウェイ0に格納されているのでウェイ予測はヒットとなる。
【0243】
時刻6では、文字データB〔0〕の値がキャッシュの出力データ信号1215に出力される。
【0244】
以上の2つの文字データの読み出しの後、アドレスラッチ1220に対応するキャッシュ予測ウェイラッチ1230の値が1に、アドレスラッチ1221に対応するキャッシュ予測ウェイラッチ1231の値が0となっている。
【0245】
したがって、この後、文字データA〔1〕、B〔1〕、A〔2〕、B〔2〕、A〔3〕、B〔3〕を読み出すときに、それぞれ、アドレスラッチ1220、1221、1220、1221、1220、1221を使用するので、キャッシュ予測ウェイの値はすべて正しいものとなり、ウェイ予測はヒットする。
【0246】
このように、本実施例においては、いくつかの連続した領域を交互にアクセスする場合にもウェイ予測がヒットする可能性が高くなる。
【0247】
図16は、本発明の他の実施例(実施例4)であるキャッシュの概略構成を示すブロック図であり、本実施例4のキャッシュをプロセッサに適用した例を示す図である。
【0248】
なお、図16においては、プロセッサで使用されるアドレス生成部、キャッシュウェイ予測部、及び、アドレス制御部だけを示している。
【0249】
図16は、図11に示すアドレス生成部1290、キャッシュウェイ予測部1293およびアドレス制御部1296を、アドレス生成部1390、キャッシュウェイ予測部1393およびアドレス制御部1396に置き換えて、プロセッサを構築したものである。
【0250】
図16に示すアドレス生成部1390は、アドレスラッチからアドレスラッチへのアドレスの転送が可能であり、アドレスラッチ1320〜1323のうちのあるアドレスラッチの出力の値を、アドレス選択器1324及びアドレス加算器1326を経由してアドレスラッチ1320〜1323のうちの任意のアドレスラッチに書き込むことができる。
【0251】
ラッチセット信号1351〜1354は、アドレスラッチ1320〜1323にアドレス1300の値をセットするための信号で、それぞれラッチセット信号1351〜1354の値が1のときにそれぞれアドレスラッチ1320〜1323にアドレス1300の値がセットされる。
【0252】
ラッチセット信号1351〜1354の値は、アドレスラッチ書き込みイネーブル信号1307とアドレスラッチ書き込み選択信号1306とに基づき、デコーダ1350で生成される。
【0253】
アドレスラッチ書き込みイネーブル信号1307は、アドレスラッチ1320〜1323へのアドレスの転送が行なわれるときに1となる信号である。
【0254】
この信号が1のときには、アドレスラッチ書き込み選択信号1306がデコーダ1350においてデコードされて、ラッチセット信号1351〜1354が出力される。
【0255】
デコーダ1350の回路構成は、図12と同じであり、図16に示す信号1306はデコード入力信号1400に、図16に示す信号1351〜1354はデコード出力信号1430〜1433に、図16に示す信号1307はデコードイネーブル信号1410に対応している。
【0256】
キャッシュウェイ予測部1393は、キャッシュ予測ウェイラッチ1330〜1333を持ち、キャッシュウェイ判定信号1311をキャッシュ予測ウェイラッチ1330〜1333に書き込むことができる。
【0257】
キャッシュウェイ予測部1393においては、さらに、キャッシュ予測ウェイラッチからキャッシュ予測ウェイラッチへのキャッシュ予測ウェイの値の転送が可能であり、キャッシュ予測ウェイラッチ1330〜1333のうちのあるキャッシュ予測ウェイラッチの出力の値をキャッシュ予測ウェイ選択器1334を経由してキャッシュ予測ウェイラッチ1330〜1333のうちの任意のキャッシュ予測ウェイラッチに書き込むことができる。
【0258】
キャッシュ予測ウェイの前記転送は、アドレスの前記転送が行なわれたときに行なわれる。
【0259】
アドレスの前記転送が行なわれるときにアドレスラッチ書き込みイネーブル信号1307の値が1になることにより、キャッシュ予測ウェイラッチ書き込み選択信号選択器1360では、アドレスラッチ書き込み選択信号1306の値がキャッシュ予測ウェイラッチ書き込み選択信号1361に出力され、キャッシュ予測ウェイラッチ書き込みデータ選択器1362ではキャッシュ予測ウェイ信号1312の値がキャッシュ予測ウェイラッチ書き込みデータ1363に出力され、そして、キャッシュ予測ウェイラッチ書き込みイネーブル信号選択器1364ではアドレスラッチ書き込みイネーブル信号1307の値、すなわち値1がキャッシュ予測ウェイラッチ書き込みイネーブル信号1365に出力される。
【0260】
デコーダ1342では、キャッシュ予測ウェイラッチ書き込み選択信号1361の値がデコードされてラッチセット信号1343〜1346が出力される。
【0261】
デコーダ1342の回路構成も、図12と同じであり、図16に示す信号1361はデコード入力信号1400に、図16に示す信号1343〜1346はデコード出力信号1430〜1433に、図16に示す信号1365はデコードイネーブル信号1410に対応している。
【0262】
ラッチセット信号1343〜1346は、キャッシュ予測ウェイラッチ1330〜1333にキャッシュ予測ウェイラッチ書き込みデータ1363の値をセットするための信号で、それぞれラッチセット信号1343〜1346の値が1のときにそれぞれキャッシュ予測ウェイラッチ1330〜1333にキャッシュ予測ウェイラッチ書き込みデータ1363の値がセットされる。
【0263】
アドレスラッチ書き込みイネーブル信号1307の値が0のときのキャッシュウェイ予測部1393の動作は、前記図11に示すキャッシュウェイ予測部1293の動作と同じである。
【0264】
なお、前記実施例3および実施例4において、アドレス変換バッファ(TLB)においてウェイを予測するようにすることも可能であり、その際、キャッシュウェイ予測部(1293,1393)に示すようにTLBウェイ予測部の予測ウェイラッチを複数個設けることも可能である。
【0265】
また、前記実施例3および実施例4は、予測値に基づいて予測されたウェイのデータ格納部、あるいは、TLBのTLBデータ格納部の活性化を行わない、従来のキャッシュにも適用できることはいうまでもない。
【0266】
以上、本発明を実施例に基づき具体的に説明したが、本発明は、前記実施例に限定されるものではなく、その要旨を逸脱しない範囲で種々変更し得ることは言うまでもない。
【0267】
【発明の効果】
本願で開示される発明のうち、代表的なものによって得られる効果を簡単に説明すれば、下記の通りである。
【0268】
(1)セットアソシアティブ方式のメモリ装置において、ウェイ予測部によってどのウェイがヒットするかを予測し、予測されたウェイのデータ格納部、あるいは、予測されたタグ格納部およびデータ格納部のみを動作させるようにしたので、メモリ装置を動作させるための消費電力を低減させ、かつ、データ読み出しのタイムラグを低減させることが可能となる。
【0269】
(2)ウェイ予測部によってどのウェイがヒットするかを予測するようにしたセットアソシアティブ方式のメモリ装置において、複数の連続した領域をアクセスする場合に、ウェイ予測部の複数の予測ウェイラッチに記憶されたウェイの番号値をウェイ判定信号の予測値として用いるようにしたので、いくつかの連続した領域を交互にアクセスする場合に、データ読み出しのタイムラグを低減させることが可能となる。
【0270】
(3)アドレス変換バッファを具備するセットアソシアティブ方式のメモリ装置において、アドレス変換バッファのTLBウェイ予測部によってアドレス変換バッファのどのウェイがヒットするかを予測し、予測されたウェイのTLBデータ格納部、あるいは、予測されたTLBタグ格納部およびTLBデータ格納部のみを動作させるようにするとともに、メモリ装置のウェイ予測部によってメモリ装置のどのウェイがヒットするかを予測し、予測されたウェイのデータ格納部、あるいは、予測されたタグ格納部およびデータ格納部のみを動作させるようにしたので、アドレス変換バッファを具備するメモリ装置を動作させるための消費電力を低減させ、かつ、データ読み出しのタイムラグを低減させることが可能となる。
【0271】
(4)アドレス変換バッファのTLBウェイ予測部によってアドレス変換バッファのどのウェイがヒットするかを予測し、予測されたウェイのTLBデータ格納部、あるいは、予測されたTLBタグ格納部およびTLBデータ格納部のみを動作させるようにするとともに、メモリ装置のウェイ予測部によってメモリ装置のどのウェイがヒットするかを予測し、予測された予測されたウェイのデータ格納部、あるいは、予測されたタグ格納部およびデータ格納部のみを動作させるようにした、アドレス変換バッファを具備するセットアソシアティブ方式のメモリ装置において、複数の連続した領域をアクセスする場合に、アドレス変換バッファのTLBウェイ予測部およびメモリ装置のウェイ予測部の複数の予測ウェイラッチに記憶されたウェイの番号値を、アドレス変換バッファのTLBウェイ判定信号およびメモリ装置のウェイ判定信号の予測値として用いるようにしたので、いくつかの連続した領域を交互にアクセスする場合に、メモリ装置を動作させるための消費電力を低減させ、かつ、データ読み出しのタイムラグを低減させることが可能となる。
【0272】
(5)セットアソシアティブ方式のメモリ装置において、ウェイの番号値を記憶する複数の予測ウェイラッチを有するウェイ予測部により、複数の連続した領域をアクセスする場合に、どのウェイがヒットするかを予測するようにしたので、いくつかの連続した領域を交互にアクセスする場合に、データ読み出しのタイムラグを低減させることが可能となる。
【0273】
(6)アドレス変換バッファを具備するセットアソシアティブ方式のメモリ装置において、複数の連続した領域をアクセスする場合に、ウェイの番号値を記憶する複数のTLB予測ウェイラッチを有するTLBウェイ予測部により、アドレス変換バッファのどのウェイがヒットするかを予測するとともに、ウェイの番号値を記憶する複数の予測ウェイラッチを有するウェイ予測部により、メモリ装置のどのウェイがヒットするかを予測するようにしたので、データ読み出しのタイムラグを低減させることが可能となる。
【0274】
(7)発明によるメモリ装置を、プロセッサのキャッシュメモリに使用することにより、キャッシュメモリの消費電力を低減させるとともに、キャッシュメモリの動作を高速に行なうことができ、これにより、消費電力が少なくマシンサイクルの短いプロセッサを実現することが可能になる。
【図面の簡単な説明】
【図1】本発明のメモリ装置の一実施例(実施例1)であるキャッシュの概略構成を示すブロック図であり、本実施例1のキャッシュをプロセッサに適用した例を示す図である。
【図2】図1に示す、キャッシュ、キャッシュウェイ予測部、及び、キャッシュウェイ予測判定部のより詳細な構成を拡大して示すブロック図である。
【第3図】図1に示す、アドレス変換バッファ(TLB)のより詳細な構成を拡大して示すブロック図である。
【図4】図1に示すプロセッサにおいて、キャッシュのウェイ予測がヒットしたときのタイムチャートを示す図である。
【図5】図1に示すプロセッサにおいて、キャッシュのウェイ予測がミスしたときのタイムチャートを示す図である。
【図6】図1に示すキャッシュウェイ予測判定部のより詳細な構成を示すブロック図である。
【図7】図2に示すウェイデコーダの構成を示す図である。
【図8】本発明のメモリ装置の他の実施例(実施例2)であるアドレス変換バッファ(TLB)と、キャッシュの概略構成を示すブロック図であり、本実施例2のアドレス変換バッファ(TLB)と、キャッシュをプロセッサに適用した例を示す図である。
【図9】図8に示すプロセッサにおいて、アドレス変換バッファ(TLB)のウェイ予測がヒットしたときのタイムチャートを示す図である。
【図10】図8に示すプロセッサにおいて、アドレス変換バッファ(TLB)のウェイ予測がミスしたときのヒットしたときのタイムチャートを示す図である。
【図11】本発明のメモリ装置の他の実施例(実施例3)であるキャッシュの概略構成を示すブロック図であり、本実施例3のキャッシュをプロセッサに適用した例を示す図である。
【図12】図11に示すデコーダの回路構成を示す図である。
【図13】図11に示すキャッシュのデータ格納部に格納されたデータの一例を示す図である。
【図14】図11に示すプロセッサのタイムチャートを示す図である。
【図15】図11に示す値回復機能付きラッチの回路構成を示す図である。
【図16】本発明のメモリ装置の他の実施例(実施例4)であるキャッシュの概略構成を示すブロック図であり、本実施例4のキャッシュをプロセッサに適用した例を示す図である。
【図17】従来のセットアソシアティブ方式のメモリの概略構成を示すブロック図である。
【符号の説明】
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…データのアドレス。[0001]
[Industrial applications]
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.
[0002]
[Prior art]
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.
[0003]
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
[0004]
The
[0005]
The
[0006]
The
[0007]
The
[0008]
The physical address is composed of a
[0009]
Hereinafter, the operation of the TLB / cache device shown in FIG. 17 will be described.
[0010]
The
[0011]
These TLB tags are input to the TLB way determiner 614.
[0012]
Here,
[0013]
Next, the TLB
[0014]
On the other hand, the
[0015]
These physical page numbers are input to the physical
[0016]
Here, 620 is a memory for storing the physical page number of
[0017]
The physical
[0018]
The
[0019]
These cache tags (632, 633) are input to the cache way determiner 634.
[0020]
Here, 630 is a memory for storing the tag of
[0021]
Next, the cache
[0022]
On the other hand, the
[0023]
These data (642, 643) are input to the
[0024]
Here, 640 is a memory for storing data of
[0025]
The
[0026]
At this time, if the
[0027]
The value of the
[0028]
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.
[0029]
That is, when the
[0030]
On the other hand, the TLB tag storage units (610, 611), the TLB
[0031]
Therefore, it takes time to generate the value of the cache
[0032]
For this reason, in the conventional two-set associative cache, before the value of the cache
[0033]
In this method, there is a problem that the power for operating the cache increases because both the
[0034]
The TLB tag storage units (610, 611), the TLB
[0035]
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.
[0036]
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.
[0037]
[Problems to be solved by the invention]
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.
[0038]
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.
[0039]
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.
[0040]
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.
[0041]
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.
[0042]
The above object and other objects and novel features of the present invention will become apparent from the description of the present specification and the accompanying drawings.
[0043]
[Means for Solving the Problems]
The following is a brief description of an outline of typical inventions disclosed in the present application.
[0044]
(1)A set associative memory device,Compare the tag storage that stores tags, the data storage that stores data, and the part of the access address with the tags stored in the tag storageAndA way determiner that outputs a way determination signal indicating which way has been hit, and a way determination signal based on the way selection signal.ComeA data selector for selecting data in a data storage unit of the selected wayAnd saidA way prediction unit that generates a predicted value of a way determination signal;SaidMeans for activating only the data storage unit of the way predicted based on the predicted value from the way prediction unit;Equipped withIt is characterized by doing.
(2) In the means of (1), means for inputting the predicted value as a way selection signal to a data selector, and a way determination signal from the way determiner and the predicted value are compared. A way prediction determination unit that outputs a prediction determination signal, and a unit that changes 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, It is characterized by having.
[0045]
(3) In the means of the above (1) or (2),The system further comprises means for activating only the tag storage unit of the predicted way based on the predicted value from the way prediction unit.
(4) In the means of (1) to (3), the way prediction unit includes a prediction way latch for storing a way number value, and a way determination is performed on the way number value stored in the prediction way latch. It is characterized in that it is output as a predicted value of a signal.
[0046]
(5) In the means of (1) to (3),Way prediction unitIsIt has a plurality of predicted way latches for storing way number values, and when accessing a plurality of continuous areas, the number value of a way stored in the corresponding plurality of predicted way latches is used as a predicted value of a way determination signal. It is characterized by outputting.
[0047]
(6) In the means (1) to (5),Memory deviceIsThe memory device further comprises a set associative address translation buffer,IsThe TLB data from the address translation buffer is compared with the tag stored in the tag storage.,A way determination signal indicating which way is hit is output, and the address translation bufferIsCompare a TLB tag storage unit that stores a TLB tag, a TLB data storage unit that stores TLB data, and a part of an access address and a TLB tag that is stored in the TLB tag storage unitAndA TLB way decision unit that outputs a TLB way decision signal indicating which way has been hit, a TLB way prediction unit that generates a predicted value of the TLB way decision signal, and a TLB way prediction unitComeMeans for activating only the TLB data storage section of the predicted TLB way, and a prediction value from the TLB way prediction section being input as a way selection signal, and selecting the TLB data in the TLB data storage section of the predicted way. A TLB data selector,SaidA TLB way prediction determining unit that compares a TLB way determination signal from a TLB way determiner with the prediction value and outputs a TLB way prediction determination signal when they do not match,SaidBased on the TLB way prediction determination signal from the TLB way prediction determination unitComeMeans for changing the prediction value of the TLB way prediction section to a TLB way determination signal indicating a hit way.
[0048]
(7) In the means of the above (6),SaidBased on predicted value from TLB way prediction unitComeThe apparatus further comprises means for activating only the TLB tag storage section of the predicted way.
[0049]
(8) A tag storage unit for storing a tag, a data storage unit for storing data, a part of an access address and a tag stored in the tag storage unit are compared, and a way indicating which way has been hit is obtained. A set associative memory device comprising: a way determiner that outputs a determination signal; and a data selector that selects data in a data storage unit of the selected way based on a way selection signal, wherein the number of the way is A plurality of predicted way latches for storing values, and a way prediction unit for outputting a way number value stored as a predicted value of a way determination signal when accessing a plurality of continuous areas, Means for inputting the predicted value as a way selection signal to a data selector, and comparing a 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 of a mismatch, and based on the way prediction determination signal from the way prediction determination unit, changes the prediction value of the way prediction unit to a way determination signal indicating the hit way. With meansIt is characterized by doing.
[0050]
(9) In the means of the above (8), 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 has been hit. The address translation buffer includes a TLB tag storage unit for storing a TLB tag, and a TLB data storage for storing TLB data. Unit, a part of the access address, and a TLB tag stored in the TLB tag storage unit, and a TLB way determination unit that outputs a TLB way determination signal indicating which way has been hit, and a way number value Are stored in a plurality of TLB prediction way latches, and when a plurality of continuous areas are accessed, a plurality of A TLB way prediction unit that outputs the TLB way number value stored in the B prediction way latch as a prediction value of a 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 that selects TLB data in a TLB data storage unit, a TLB way determination signal from the TLB way determination unit, and the predicted value, and a TLB way that outputs a TLB way prediction determination signal when the two values do not match. 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.And characterized in that:
[0051]
(10) In the means of the above (9), the TLB way prediction unit further comprises means for transferring a number value stored in an arbitrary TLB prediction way latch to another TLB prediction way latch. Do.
[0052]
[Action]
Means of the above (1), (2) and (4)According to the set associative memory device, a way prediction unit predicts which way will be hit, and a data storage unit of the predicted way.Only to work,Power consumption for operating the memory device can be reduced, and a time lag of data reading can be reduced.
[0053]
According to the means of (1), (2), and (3), in a set associative memory device, a way prediction unit predicts which way will hit, and a data storage unit of the predicted way, or Since only the predicted tag storage and data storage are operated,Power consumption for operating the memory device can be reduced, and a time lag of data reading can be reduced.
[0054]
Also,In the means of (5) aboveAccording toIn the memory device of the set associative system, which predicts which way will be hit by the way prediction unit, and operates only the predicted data storage unit or the predicted tag storage unit and the data storage unit. When accessing a plurality of continuous areas, the way number value stored in the plurality of predicted way latches of the way prediction unit is used as the predicted value of the way determination signal. If you accessPower consumption for operating the memory device can be reduced, and a time lag of data reading can be reduced.
[0055]
Also,According to the means of (6) or (7), in a set associative memory device having an address translation buffer, the TLB way prediction unit of the address translation buffer predicts which way of the address translation buffer will hit. 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 which way of the memory device is hit by the way prediction unit of the memory device. Is provided, and only the data storage unit of the predicted way, or only the predicted tag storage unit and the predicted data storage unit are operated, so that an address conversion buffer is provided.Power consumption for operating the memory device can be reduced, and a time lag of data reading can be reduced.
[0056]
Also,According to the means (8),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 is used to predict which way will be hit when accessing a plurality of continuous areas. Therefore, when several consecutive areas are alternately accessed, the time lag of data reading can be reduced.
[0057]
Also,According to the means of (9) or (10),In a set associative memory device having an address translation buffer, when accessing a plurality of continuous areas, a TLB way prediction unit having a plurality of TLB prediction way latches for storing way number values stores the address translation buffer. A way prediction unit having a plurality of prediction way latches for storing way number values while predicting which way is to be hit is used to predict which way of the memory device will be hit. Time lag can be reduced.
[0058]
【Example】
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
[0059]
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.
[0060]
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
[0061]
In FIG. 1, the processor includes a processor
[0062]
The processor
[0063]
The
[0064]
FIG. 2 is an enlarged block diagram showing a more detailed configuration of the
[0065]
FIG. 4 is a diagram showing a time chart of the processor shown in FIG.
[0066]
FIG. 4 is a diagram showing a time chart when the
[0067]
First, the outline of the operation of the processor shown in FIG. 1 will be described with reference to FIGS.
[0068]
The processor shown in FIG. 1 is processed by pipeline control.
[0069]
In FIG. 4, a numeral 401 indicates an instruction number, and an area in which 1 is written indicates that
[0070]
Hereinafter, the processing of the
[0071]
As shown in FIG. 1, a portion including the
[0072]
At
[0073]
At
[0074]
At this time, the cache prediction way signal 151 which is an output signal of the cache
[0075]
Then, the data read from the cache
[0076]
At
[0077]
At
[0078]
The
[0079]
That is, when
[0080]
If the
[0081]
Next, the operation of the processor shown in FIG. 1 will be described in detail with reference to FIGS.
[0082]
First, the operation of the
[0083]
First, the logical page number
[0084]
The logical page number
[0085]
Then, the TLB tag storage units (110, 111) and the TLB data storage units (120, 121) operate, and their outputs are stored in the
[0086]
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).
[0087]
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.
[0088]
Further, a cache prediction way signal 151 is output from the cache
[0089]
The value of the
[0090]
The
[0091]
At this time, since the value of
[0092]
The
[0093]
The
[0094]
In the
[0095]
The cache prediction way signal 151 is stored in the
[0096]
The above processing is performed in one cycle.
[0097]
FIG. 7 is a diagram showing a configuration of the
[0098]
The cache prediction way signal 151 is a 2-bit signal, and includes a signal indicating that the
[0099]
The
[0100]
Next, the operation of the way determination unit at
[0101]
Based on the logical page number upper bit stored in the
[0102]
Further, based on the cache tag stored in the latch (136, 137) and the
[0103]
The cache
[0104]
The cache way
[0105]
FIG. 6 is a block diagram showing a more detailed configuration of the cache way
[0106]
The
[0107]
The cache
[0108]
AND operator 700
[0109]
The AND
[0110]
The cache way prediction
[0111]
The OR
[0112]
That is, the
[0113]
The
[0114]
At
[0115]
Then, the value of the cache way
[0116]
If the way prediction hits,
[0117]
Next, a case where the
[0118]
In this case, the way prediction has been missed.
[0119]
When the
[0120]
On the other hand, since the
[0121]
That is, the cache way
[0122]
When the value of the cache way
[0123]
FIG. 5 is a diagram showing a time chart in the case described above.
[0124]
FIG. 5 is a time chart when the
[0125]
At
[0126]
In the
[0127]
At
[0128]
As a result, the value of the cache prediction way signal 151 is replaced.
[0129]
That is, from
[0130]
At
[0131]
[0132]
At
[0133]
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
[0134]
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
[0135]
The processor shown in FIG. 8 is different from the processor shown in FIG. 1 in that a TLB
[0136]
The configurations of the TLB
[0137]
The
[0138]
FIG. 9 is a diagram showing a time chart of the processor shown in FIG.
[0139]
FIG. 9 is a diagram showing a time chart when the
[0140]
The outline of the operation of the processor shown in FIG. 8 will be described with reference to FIGS.
[0141]
The processor shown in FIG. 8 is processed by pipeline control.
[0142]
In FIG. 9, a numeral 1001 indicates an instruction number, and an area in which 1 is written indicates that
[0143]
Hereinafter, the processing of the
[0144]
As illustrated in FIG. 9, a part including the
[0145]
At
[0146]
At
[0147]
As for the TLB data storage units (920, 921), only the TLB
[0148]
Here, since the TLB
[0149]
Then, the TLB prediction way signal 961 is input to the
[0150]
As for the cache data storage units (940, 941), only the cache
[0151]
At
[0152]
Then, at
[0153]
Further, the
[0154]
Further, the way predicted by the TLB
[0155]
The
[0156]
At
[0157]
Further, at
[0158]
If the TLB way prediction and the cache way prediction are both hits, a time chart as shown in FIG. 10 is obtained.
[0159]
Next, a case will be described in which
[0160]
In this case, the value of the TLB
[0161]
FIG. 10 is a diagram showing a time chart in the case described above.
[0162]
In this case, the
[0163]
Then, the value of the TLB
[0164]
By this storage, the value of the TLB
[0165]
At
[0166]
In the
[0167]
At
[0168]
The value of the TLB prediction way signal 961 indicates the
[0169]
On the other hand, at
[0170]
At
[0171]
Then, the cache
[0172]
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
[0173]
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
[0174]
FIG. 11 is obtained by changing the
[0175]
The processor
[0176]
The
[0177]
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.
[0178]
The
[0179]
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
[0180]
At this time, the
[0181]
When the output of the
[0182]
Similarly, when the outputs of the address latches 1221, 1222, and 1223 are selected by the
[0183]
The
[0184]
When the way prediction fails, the value of the cache
[0185]
A mechanism for performing this writing is a
[0186]
[0187]
When the way prediction misses, the value of the cache way prediction determination signal becomes 1.
[0188]
When the value of the cache way
[0189]
FIG. 12 is a diagram showing a circuit configuration of the
[0190]
11 corresponds to the
[0191]
The
[0192]
The decoder sets one of the
[0193]
However, when the value of the decode enable
[0194]
When the latch set
[0195]
FIG. 13 is a diagram illustrating an example of data stored in the data storage unit of the
[0196]
In FIG. 13,
[0197]
[0198]
[0199]
[0200]
Generally, in the
[0201]
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.
[0202]
Similarly, data A [0] to data A [3] are stored in the same way.
[0203]
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.
[0204]
Data B is similar character string data.
[0205]
Here, an example of a process of sequentially reading character data from the
[0206]
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].
[0207]
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
[0208]
Hereinafter, the operation of the processor shown in FIG. 11 will be described with reference to the time chart of FIG.
[0209]
In FIG. 14,
[0210]
At
[0211]
In the processor shown in FIG. 11, the
[0212]
Similarly, the
[0213]
At
[0214]
That is, the prediction ways corresponding to the
[0215]
In this time chart, the reading process is started from
[0216]
At
[0217]
Then, it is output to the
[0218]
Nothing is added by the
[0219]
At
[0220]
As a result, the cache data storage unit way 0 (1700) operates.
[0221]
At
[0222]
The cache way
[0223]
Therefore, the
[0224]
The
[0225]
As a result, the
[0226]
That is, at
[0227]
At
[0228]
At
[0229]
On the other hand, at
[0230]
Then, it is output to the
[0231]
In the
[0232]
At
[0233]
Further, the
[0234]
At
[0235]
Here, the
[0236]
In FIG. 15, a
[0237]
The latch with
[0238]
At
[0239]
At
[0240]
At
[0241]
As a result, the cache data storage unit way 0 (1700) operates to read out the character data B [0].
[0242]
Since the character data B [0] is stored in the
[0243]
At
[0244]
After the reading of the above two character data, the value of the cache
[0245]
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.
[0246]
As described above, in the present embodiment, the possibility of hitting the way prediction increases even when several consecutive areas are alternately accessed.
[0247]
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.
[0248]
Note that FIG. 16 shows only an address generation unit, a cache way prediction unit, and an address control unit used in the processor.
[0249]
FIG. 16 shows a processor constructed by replacing the
[0250]
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.
[0251]
The latch set
[0252]
The values of the latch set
[0253]
The address latch write enable
[0254]
When this signal is 1, the address latch
[0255]
The circuit configuration of the
[0256]
The cache way prediction unit 1393 has cache prediction way latches 1330 to 1333, and can write the cache
[0257]
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
[0258]
The transfer of the cache prediction way is performed when the transfer of the address is performed.
[0259]
When the value of the address latch write enable
[0260]
The
[0261]
The circuit configuration of the
[0262]
Latch set signals 1343 to 1346 are signals for setting the values of cache prediction way latch write
[0263]
The operation of the cache way prediction unit 1393 when the value of the address latch write enable
[0264]
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.
[0265]
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.
[0266]
As described above, the present invention has been specifically described based on the embodiments. However, it is needless to say that the present invention is not limited to the above-described embodiments and can be variously changed without departing from the gist of the present invention.
[0267]
【The invention's effect】
The effects obtained by typical aspects of the invention disclosed in the present application will be briefly described as follows.
[0268]
(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. Thus, power consumption for operating the memory device can be reduced, and a time lag of data reading can be reduced.
[0269]
(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.
[0270]
(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.
[0271]
(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 Only to operate, the way prediction unit of the memory device predicts which way of the memory device will be hit, the data storage unit of the predicted predicted way, or the predicted tag storage unit and In a set associative memory device having an address translation buffer, which operates only a data storage unit, when accessing a plurality of continuous areas, a TLB way prediction unit of the address translation buffer and a way prediction of the memory device are used. Memory stored in some predictive way latches Is used as the predicted value of the TLB way determination signal of the address translation buffer and the way determination signal of the memory device, so that the memory device can be operated when several consecutive areas are alternately accessed. , And the time lag of data reading can be reduced.
[0272]
(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.
[0273]
(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.
[0274]
(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.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a schematic configuration of a cache which is an embodiment (Embodiment 1) of a memory device according to the present invention, and is a diagram illustrating an example in which the cache of
FIG. 2 is an enlarged block diagram showing a more detailed configuration of a cache, a cache way prediction unit, and a cache way prediction determination unit shown in FIG. 1;
FIG. 3 is an enlarged block diagram showing a more detailed configuration of an address translation buffer (TLB) shown in FIG. 1;
FIG. 4 is a diagram showing a time chart when a cache way prediction hits in the processor shown in FIG. 1;
FIG. 5 is a diagram showing a time chart when a cache way prediction misses in the processor shown in FIG. 1;
FIG. 6 is a block diagram illustrating a more detailed configuration of a cache way prediction determination unit illustrated in FIG. 1;
FIG. 7 is a diagram showing a configuration of a way decoder shown in FIG. 2;
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 of the present invention. And FIG. 3 illustrates an example in which a cache is applied to a processor.
9 is a diagram showing a time chart when a way prediction of an address translation buffer (TLB) hits in the processor shown in FIG. 8;
10 is a diagram showing a time chart when a hit occurs when a way prediction of an address translation buffer (TLB) is missed in the processor shown in FIG. 8;
FIG. 11 is a block diagram illustrating a schematic configuration of a cache as another embodiment (third embodiment) of the memory device according to the present invention, and is a diagram illustrating an example in which the cache according to the third embodiment is applied to a processor.
FIG. 12 is a diagram showing a circuit configuration of the decoder shown in FIG. 11;
FIG. 13 is a diagram illustrating an example of data stored in a data storage unit of the cache illustrated in FIG. 11;
14 is a diagram showing a time chart of the processor shown in FIG. 11;
FIG. 15 is a diagram showing a circuit configuration of the latch with a value recovery function shown in FIG. 11;
FIG. 16 is a block diagram illustrating a schematic configuration of a cache as another embodiment (fourth embodiment) of the memory device according to the present invention, and is a diagram illustrating an example in which the cache according to the fourth embodiment is applied to a processor.
FIG. 17 is a block diagram showing a schematic configuration of a conventional set-associative memory.
[Explanation of symbols]
100, 600, 900, 1200, 1227, 1300 ... address, 101, 601, 901, 1201 ... offset within the page, 102, 602 ... lower bit of logical page number, 103, 603 ... upper bit of logical page number, 104, 604 904, 1204: logical page number, 110, 111, 610, 611, 910, 911: TLB tag storage unit, 112, 113, 612, 613: TLB tag, 114, 614: TLB way determination unit, 105, 116, 117 , 126, 127, 136, 137, 146, 152, 646, 1240, 1340, 1810, 1811 ... Latch, 120, 121, 620, 621, 920, 921 ... TLB data storage unit, 122, 123, 622, 623 625, 925, 1210 ...
Claims (10)
複数のウェイを有し、データを格納するデータ格納部と、
前記アクセスアドレスの第2の部分と前記タグ格納部から出力されたタグとを比較し、どのウェイがヒットしたかを示すウェイ判定信号を出力するウェイ判定器と、
ウェイ選択信号に基づき、その選択されたウェイのデータ格納部のデータを選択するデータ選択器と、
前記ウェイ判定信号の予測値を発生するウェイ予測部と、
前記データ格納部において、前記ウェイ予測部からの予測値に基づき予測されたウェイだけを活性化する手段とを具備することを特徴とするセットアソシアティブ方式のメモリ装置。A tag storage unit in which a plurality have a way for outputting the tag corresponding to the first part of the access address stores a plurality of tags,
A data storage unit having a plurality of ways and storing data;
And way determiner that said comparing a second portion of the access address and the tag output from the tag storage portion, and outputs the way decision signal indicating which way is hit,
A data selector for selecting data in a data storage unit of the selected way based on the way selection signal;
A way prediction unit that generates a predicted value of the way determination signal,
Wherein the data storage unit, a memory device of the set associative method, characterized by comprising means for activating only the-way predicted based on the predicted values from the way prediction unit.
前記ウェイ判定器からのウェイ判定信号と前記予測値を比較し、不一致の場合にウェイ予測判定信号を出力するウェイ予測判定部と、
前記ウェイ予測判定部からのウェイ予測判定信号に基づき、前記ウェイ予測部の予測値をヒットしたウェイを示すウェイ判定信号に変更する手段とを、さらに具備することを特徴とする請求項1に記載のセットアソシアティブ方式のメモリ装置。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,
2. The method according to claim 1, further comprising: 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. Set associative memory device.
前記予測ウェイラッチに記憶されたウェイの番号値をウェイ判定信号の予測値として出力することを特徴とする請求項1ないし請求項3のいずれか1項に記載のセットアソシアティブ方式のメモリ装置。The way prediction unit includes a prediction way latch for storing a way number value,
4. The set associative memory device according to claim 1, wherein a number value of a way stored in the predicted way latch is output as a predicted value of a way determination signal.
複数の連続した領域をアクセスする場合に、対応する複数の予測ウェイラッチに記憶されたウェイの番号値をウェイ判定信号の予測値として出力することを特徴とする請求項1ないし請求項3のいずれか1項に記載のセットアソシアティブ方式のメモリ装置。The way prediction unit has a plurality of prediction way latches for storing way number values,
4. The method according to claim 1, wherein when accessing a plurality of continuous areas, a way number value stored in a corresponding plurality of predicted way latches is output as a predicted value of a way determination signal. 2. The set associative memory device according to claim 1.
前記メモリ装置のウェイ判定器は、アドレス変換バッファからのTLBデータとタグ格納部に格納されているタグとを比較し、どのウェイがヒットしたかを示すウェイ判定信号を出力し、
前記アドレス変換バッファは、TLBタグを格納するTLBタグ格納部と、
TLBデータを格納するTLBデータ格納部と、
前記アクセスアドレスの第3の部分とTLBタグ格納部に格納されているTLBタグとを比較し、どのウェイがヒットしたかを示すTLBウェイ判定信号を出力するTLBウェイ判定器と、
TLBウェイ判定信号の予測値を発生するTLBウェイ予測部と、
前記TLBデータ格納部において、前記TLBウェイ予測部からの予測値に基づき、予測されたTLBウェイだけを活性化する手段と、
前記TLBウェイ予測部からの予測値がウェイ選択信号として入力され、予測されたウェイのTLBデータ格納部のTLBデータを選択するTLBデータ選択器と、
前記TLBウェイ判定器からのTLBウェイ判定信号と前記予測値を比較し、不一致の場合にTLBウェイ予測判定信号を出力するTLBウェイ予測判定部と、
前記TLBウェイ予測判定部からのTLBウェイ予測判定信号に基づき、前記TLBウェイ予測部の予測値をヒットしたウェイを示すTLBウェイ判定信号に変更する手段とを具備することを特徴とする請求項1ないし請求項5のいずれか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 the comparing the accessed third portion and TLB tags TLB tag stored in the storage portion of the address and outputs a TLB way determination signal indicating which way is hit,
A TLB way prediction unit that generates a predicted value of the TLB way determination signal;
In the TLB data storage unit, based on the predicted values from the TLB way prediction unit, and means for activating only the predicted TLB-way,
A prediction value from the TLB way prediction unit is input as a way selection signal, and a TLB data selector for selecting 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,
2. A means for changing a prediction value of the TLB way prediction section to a TLB way determination signal indicating a hit way based on a TLB way prediction determination signal from the TLB way prediction determination section. A set associative memory device according to claim 5.
複数のウェイを有し、データを格納するデータ格納部と、
前記アクセスアドレスの他の一部と前記タグ格納部から出力されたタグとを比較し、どのウェイがヒットしたかを示すウェイ判定信号を出力するウェイ判定器と、
ウェイ選択信号に基づき、その選択されたウェイのデータ格納部のデータを選択するデータ選択器と、
前記ウェイ判定信号の予測値を発生するウェイ予測部と、
前記ウェイ予測部からの予測値に基づき予測されたウェイのデータ格納部だけを活性化する手段と、
前記予測値をウェイ選択信号として前記データ選択器に入力する手段と、
前記ウェイ判定器からのウェイ判定信号と前記予測値とを比較し、不一致の場合にウェイ予測判定信号を出力するウェイ予測判定部と、
前記ウェイ予測判定部において、不一致と判断された場合に、前記ウェイ選択信号を前記ウェイ判定信号に変更する手段とを具備し、
前記タグ格納部は、前記ウェイ予測部において予測されたウェイおよび予測されていないウェイの両方の前記アクセスアドレスの一部に対応するタグを出力することを特徴とするセットアソシアティブ方式のメモリ装置。A tag storage unit having a plurality of ways for storing a plurality of tags and outputting the tags corresponding to a part of the access address,
A data storage unit having a plurality of ways and storing data;
A way determiner that compares the other part of the access address with the tag output from 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 the way selection signal;
A way prediction unit that generates a predicted value of the way determination signal,
Means for activating only the data storage unit of the way predicted based on the predicted value from the way prediction unit,
Means for inputting the predicted value to the data selector as a way selection signal,
A way prediction determination unit that compares a way determination signal from the way determiner and the prediction value, and outputs a way prediction determination signal in the case of a mismatch,
In the way prediction judging section, when it is determined that a mismatch, and means for changing the way selection signal to the way decision signal,
The set associative memory device, wherein the tag storage unit outputs a tag corresponding to a part of the access address of both the way predicted by the way prediction unit and the unpredicted way.
複数の連続した領域をアクセスする場合に、対応する複数の予測ウェイラッチに記憶されたウェイの番号値をウェイ判定信号の予測値として出力することを特徴とする請求項8に記載のセットアソシアティブ方式のメモリ装置。9. The set associative method according to claim 8, wherein when accessing a plurality of continuous areas, a way number value stored in a corresponding plurality of predicted way latches is output as a predicted value of a way determination signal. Memory device.
前記セットアソシアティブ方式のメモリ装置にアドレスを出力するアドレス生成部と、An address generation unit that outputs an address to the set associative memory device;
前記セットアソシアティブ方式のメモリ装置から読み出されたデータを処理するデータ処理部とを有することを特徴とするプロセッサ。A data processing unit for processing data read from the set associative memory device.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP12538094A JP3589485B2 (en) | 1994-06-07 | 1994-06-07 | Set associative memory device and processor |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP12538094A JP3589485B2 (en) | 1994-06-07 | 1994-06-07 | Set associative memory device and processor |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2004110649A Division JP3593123B2 (en) | 2004-04-05 | 2004-04-05 | Set associative memory device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH07334423A JPH07334423A (en) | 1995-12-22 |
| JP3589485B2 true JP3589485B2 (en) | 2004-11-17 |
Family
ID=14908709
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP12538094A Expired - Fee Related JP3589485B2 (en) | 1994-06-07 | 1994-06-07 | Set associative memory device and processor |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3589485B2 (en) |
Families Citing this family (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6687789B1 (en) * | 2000-01-03 | 2004-02-03 | Advanced Micro Devices, Inc. | Cache which provides partial tags from non-predicted ways to direct search if way prediction misses |
| JP2002196981A (en) | 2000-12-22 | 2002-07-12 | Fujitsu Ltd | Data processing device |
| JP4071942B2 (en) | 2001-04-27 | 2008-04-02 | 株式会社ルネサステクノロジ | Data processing apparatus and data processor |
| US6718439B1 (en) * | 2001-06-01 | 2004-04-06 | Advanced Micro Devices, Inc. | Cache memory and method of operation |
| JP3806131B2 (en) | 2003-05-21 | 2006-08-09 | 富士通株式会社 | Power control method and apparatus for address translation buffer |
| US20080114940A1 (en) * | 2004-09-30 | 2008-05-15 | Renesas Technology Corp. | Data Processor |
| US20070043965A1 (en) * | 2005-08-22 | 2007-02-22 | Intel Corporation | Dynamic memory sizing for power reduction |
| DE102009015086A1 (en) | 2009-03-31 | 2010-10-07 | Schott Ag | Transparent glass or glass-ceramic pane with an infrared-reflecting layer |
| JP2011257800A (en) * | 2010-06-04 | 2011-12-22 | Panasonic Corp | Cache memory device, program conversion device, cache memory control method, and program conversion method |
| US9304932B2 (en) * | 2012-12-20 | 2016-04-05 | Qualcomm Incorporated | Instruction cache having a multi-bit way prediction mask |
-
1994
- 1994-06-07 JP JP12538094A patent/JP3589485B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH07334423A (en) | 1995-12-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6356990B1 (en) | Set-associative cache memory having a built-in set prediction array | |
| US20080222360A1 (en) | Multi-port integrated cache | |
| JPH08328958A (en) | Instruction cache as well as apparatus and method for cache memory | |
| JP3593346B2 (en) | Multiport memory and data processing device accessing the same | |
| KR100335672B1 (en) | Fast data retrieval from physical addressing data storage structures using memory page crossing prediction comments | |
| JPS5991546A (en) | Central processing unit | |
| US7836253B2 (en) | Cache memory having pipeline structure and method for controlling the same | |
| JPH08101797A (en) | Translation lookaside buffer | |
| JP3589485B2 (en) | Set associative memory device and processor | |
| KR950006590B1 (en) | Microprocessor with cache memory | |
| JP4071942B2 (en) | Data processing apparatus and data processor | |
| US5490259A (en) | Logical-to-real address translation based on selective use of first and second TLBs | |
| US6622209B2 (en) | Use of non-count data and index hashing to reduce false hits in a non-tagged, n-way cache | |
| US5452427A (en) | Data processing device for variable word length instruction system having short instruction execution time and small occupancy area | |
| JP3593123B2 (en) | Set associative memory device | |
| KR100517765B1 (en) | Cache memory and control method thereof | |
| JPH10116191A (en) | Processor with buffer for compressed instructions | |
| JP2818562B2 (en) | Address translation circuit | |
| JPH06309227A (en) | Cache memory device | |
| JP2001243116A (en) | Write only system for updating least recently used bit | |
| JPH0795309B2 (en) | Set associative cache memory | |
| JPH08328960A (en) | Cache memory device | |
| JP2008146237A (en) | Cache snoop control device and cache snoop processing method | |
| JPH04242431A (en) | Information processor | |
| JP2006343803A (en) | Cache memory |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20040203 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20040405 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20040525 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20040722 |
|
| 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: 20040810 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20040817 |
|
| 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: 20080827 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080827 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090827 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090827 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100827 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110827 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110827 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: 20110827 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: 20120827 Year of fee payment: 8 |
|
| LAPS | Cancellation because of no payment of annual fees |