Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3593123B2 - Set associative memory device - Google Patents
[go: Go Back, main page]

JP3593123B2 - Set associative memory device - Google Patents

Set associative memory device Download PDF

Info

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
Application number
JP2004110649A
Other languages
Japanese (ja)
Other versions
JP2004265430A (en
Inventor
憲晴 平塚
文男 荒川
進 成田
修 西井
信幸 林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Renesas Technology Corp
Original Assignee
Renesas Technology Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Renesas Technology Corp filed Critical Renesas Technology Corp
Priority to JP2004110649A priority Critical patent/JP3593123B2/en
Publication of JP2004265430A publication Critical patent/JP2004265430A/en
Application granted granted Critical
Publication of JP3593123B2 publication Critical patent/JP3593123B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Classifications

    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Energy 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 cache 692.

アドレス600は、論理アドレスであり、TLB691により物理アドレスに変換されてキャッシュ692に入力される。   The address 600 is a logical address, is converted into a physical address by the TLB 691, and is input to the cache 692.

アドレス600は、論理ページ番号604とページ内オフセット601により構成される。   The address 600 is composed of a logical page number 604 and an offset 601 within a page.

論理ページ番号604は、TLB691により物理ページ番号625に変換されキャッシュ692に入力される。   The logical page number 604 is converted into a physical page number 625 by the TLB 691 and input to the cache 692.

ページ内オフセット601は、変換されずにそのままキャッシュ692に入力される。   The intra-page offset 601 is directly input to the cache 692 without being converted.

物理アドレスは、物理ページ番号625とページ内オフセット601により構成される。   The physical address is composed of a physical page number 625 and an offset 601 in the page.

以下、図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 lower bit 602 of the logical page number 604 is input to the TLB tag storage unit (610, 611), and the TLB tag (612, 613) is output.

これらのTLBタグは、TLBウェイ判定器614に入力される。   These TLB tags are input to the TLB way determiner 614.

ここで、610はTLBのウェイ0のタグを、611はTLBのウェイ1のタグをそれぞれ格納するメモリである。   Here, reference numeral 610 is a memory for storing a tag of the TLB way 0, and 611 is a memory for storing the tag of the TLB way 1 respectively.

次に、TLBウェイ判定器614では、論理ページ番号604の上位ビット603と各ウェイのTLBタグが比較され、どのウェイのTLBタグと一致したかを表すTLBウェイ判定信号615が出力される。   Next, the TLB way determination unit 614 compares the upper bit 603 of the logical page number 604 with the TLB tag of each way, and outputs a TLB way determination signal 615 indicating which TLB tag matches the TLB tag.

一方、論理ページ番号604の下位ビット602はTLBのTLBデータ格納部(620,621)に入力され、物理ページ番号(622,623)が出力される。   On the other hand, the lower bit 602 of the logical page number 604 is input to the TLB data storage unit (620, 621) of the TLB, and the physical page number (622, 623) is output.

これらの物理ページ番号は、物理ページ番号選択器624に入力される。   These physical page numbers are input to the physical page number selector 624.

ここで、620はウェイ0の物理ページ番号を、621はウェイ1の物理ページ番号をそれぞれ格納するメモリである。   Here, 620 is a memory for storing the physical page number of way 0, and 621 is a memory for storing the physical page number of way 1 respectively.

物理ページ番号選択器624では、TLBウェイ判定信号615に基づいて、ウェイ0の物理ページ番号622またはウェイ1の物理ページ番号623のどちらかを選択し物理ページ番号625を出力する。   The physical page number selector 624 selects either the physical page number 622 of way 0 or the physical page number 623 of way 1 based on the TLB way determination signal 615, and outputs the physical page number 625.

ページ内オフセット601は、キャッシュタグ格納部(630,631)に入力され、キャッシュタグ(632,633)が出力される。   The offset 601 in the page is input to the cache tag storage unit (630, 631), and the cache tag (632, 633) is output.

これらのキャッシュタグ(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 way 0 of the cache, and 631 is a memory for storing the tag of way 1 of the cache.

次に、キャッシュウェイ判定器634では、物理ページ番号625と各ウェイのキャッシュタグ(632,633)が比較され、どのウェイのキャッシュタグと一致したかを表すキャッシュウェイ判定信号635が出力される。   Next, the cache way determination unit 634 compares the physical page number 625 with the cache tag (632, 633) of each way, and outputs a cache way determination signal 635 indicating which way the cache tag matches.

一方、ページ内オフセット601は、キャッシュデータ格納部(640,641)に入力され、データ(642,643)が出力される。   On the other hand, the offset 601 in the page is input to the cache data storage unit (640, 641), and the data (642, 643) is output.

これらのデータ(642,643)は、データ選択器644に入力される。   These data (642, 643) are input to the data selector 644.

ここで、640はウェイ0のデータを、641はウェイ1のデータをそれぞれ格納するメモリである。   Here, 640 is a memory for storing data of way 0, and 641 is a memory for storing data of way 1 respectively.

データ選択器644では、キャッシュウェイ判定信号635に基づいて、データ642またはデータ643を選択しデータ645を出力する。   The data selector 644 selects the data 642 or the data 643 based on the cache way determination signal 635 and outputs the data 645.

このとき、物理ページ番号625とウェイ0のキャッシュタグ632が一致していればウェイ0のデータ642、物理ページ番号625とウェイ1のキャッシュタグ633が一致していればウェイ1のデータ643の値がデータ645の値となる。   At this time, if the physical page number 625 and the cache tag 632 of the way 0 match, the value of the data 642 of the way 0, and if the physical page number 625 and the cache tag 633 of the way 1 match, the value of the data 643 of the way 1 Is the value of the data 645.

データ645の値は、一旦ラッチ646に格納されたあと、次のサイクルにおいてデータ647として出力される。   The value of the data 645 is temporarily stored in the latch 646 and then output as data 647 in the next cycle.

この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 logical address 600 is input, these eight memories can start operating.

一方、TLBタグ格納部(610,611)、TLBウェイ判定器614、物理ページ番号選択器624、キャッシュウェイ判定器634は、同時に実行することはできず、この順番で順々に実行しなければならない。   On the other hand, the TLB tag storage units (610, 611), the TLB way decision unit 614, the physical page number selector 624, and the cache way decision unit 634 cannot be executed simultaneously, and must be executed in this order. No.

したがって、キャッシュウェイ判定器634の出力であるキャッシュウェイ判定信号635の値を生成するのには時間がかかる。   Therefore, it takes time to generate the value of the cache way determination signal 635 output from the cache way determination unit 634.

このような理由から、従来の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 way determination signal 635 is determined, both the way 0 portion 640 and the way 1 portion 641 of the cache data storage unit are operated in advance. Then, data 642 of way 0 and data 643 of way 1 are output, and the method is selected by the cache way determination signal 635.

この方式では、キャッシュデータ格納部(640,641)のウェイ0の部分640とウェイ1の部分641の両方を同時に動作させるために、キャッシュを動作させるための電力が大きくなるという問題点があった。   In this method, there is a problem that the power for operating the cache increases because both the portion 640 of the way 0 and the portion 641 of the way 1 of the cache data storage unit (640, 641) operate simultaneously. .

また、TLBタグ格納部(610,611)、TLBウェイ判定器614、物理ページ番号選択器624、キャッシュウェイ判定器634、及び、データ選択器644は順番に実行しなければならず、TLB・キャッシュ装置に論理アドレス600が入力されてからデータ645が出力されるまでのタイムラグ(遅延時間)が大きくなるという問題点があった。   The TLB tag storage units (610, 611), the TLB way decision unit 614, the physical page number selector 624, the cache way decision unit 634, and the data selector 644 must be executed in order, and the TLB / cache There is a problem that a time lag (delay time) from when the logical address 600 is input to the device until when the data 645 is output increases.

前記問題点を解決するために、セットアソシアティブ方式のキャッシュメモリにおいて、データの読み出し時のセンスアンプの活性化を、タグからのヒット信号によって行い、ヒットした時点でセンスアンプを活性化して、データ読み出し時の消費電力を低減することが、特開平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 Embodiment 1 is applied to a processor.

図1において、プロセッサは、プロセッサ本体182、アドレス変換バッファ(以下、TLBと称す)191、キャッシュ192、キャッシュウェイ予測部193、及び、キャッシュウェイ予測判定部194から構成される。   In FIG. 1, the processor includes a processor main body 182, an address translation buffer (hereinafter, referred to as TLB) 191, a cache 192, a cache way prediction unit 193, and a cache way prediction determination unit 194.

プロセッサ本体182は、アドレス生成部190とデータ処理部195を含んでいる。   The processor main body 182 includes an address generation unit 190 and a data processing unit 195.

TLB191は、2セットアソシアティブ方式のメモリであり、また、キャッシュ192は2セットアソシアティブ方式のメモリであり、ウェイの予測を行なっている。   The TLB 191 is a two-set associative memory, and the cache 192 is a two-set associative memory for predicting ways.

図2は、図1に示す、キャッシュ192、キャッシュウェイ予測部193、及び、キャッシュウェイ予測判定部194のより詳細な構成を拡大して示すブロック図であり、図3は、図1に示すTLB191のより詳細な構成を拡大して示すブロック図である。   FIG. 2 is an enlarged block diagram showing a more detailed configuration of the cache 192, the cache way prediction unit 193, and the cache way prediction determination unit 194 shown in FIG. 1. FIG. 3 is a block diagram showing the TLB 191 shown in FIG. FIG. 2 is an enlarged block diagram showing a more detailed configuration of FIG.

図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 way 0 of the cache is predicted and the prediction hits.

まず、図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 instruction 1 is being processed.

以下、命令1の処理について述べる。   Hereinafter, the processing of the instruction 1 will be described.

図1に示すように、TLB191、キャッシュ192、キャッシュウェイ予測部193、及び、キャッシュウェイ予測判定器194から構成される部分は、動作するタイミングの違いによりメモリ部180とウェイ判定部181に分けられる。   As shown in FIG. 1, a portion including the TLB 191, the cache 192, the cache way prediction unit 193, and the cache way prediction determination unit 194 is divided into a memory unit 180 and a way determination unit 181 according to a difference in operation timing. .

時刻1で、アドレス生成部190はアドレスを生成し、次の時刻に前記アドレスをアドレス100として出力する。   At time 1, the address generation unit 190 generates an address, and outputs the address as the address 100 at the next time.

時刻2で、メモリ部180は、アドレス100を入力して1サイクル後にデータ147をデータ処理部195に出力する。   At time 2, the memory unit 180 outputs the data 147 to the data processing unit 195 one cycle after inputting the address 100.

このとき、キャッシュウェイ予測部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 way prediction unit 193 indicates the way 0, and the cache data storage units 140 and 141 of the memory unit 180 indicate the predicted way, that is, the way 0 of the way 0. Only the cache data storage unit 140 operates.

そして、前記キャッシュデータ格納部140から読み出されたデータがデータ147として出力される。   Then, the data read from the cache data storage unit 140 is output as data 147.

時刻3では、データ処理部195がデータ147を入力して処理する。   At time 3, the data processing unit 195 inputs and processes the data 147.

また、時刻3では、ウェイ判定部181によって、メモリ部180から読み出されたデータ147が正しいウェイのデータであるか確認するための判定が行われる。   At time 3, the way determination unit 181 determines whether the data 147 read from the memory unit 180 is data of a correct way.

メモリ部180とこのウェイ判定部181はパイプライン方式で処理を行うことができる。   The memory unit 180 and the way determination unit 181 can perform processing by a pipeline method.

すなわち、時刻3において命令1がウェイ判定部181で処理されているときは、命令2がメモリ部180で処理される。   That is, when instruction 1 is being processed by way determination unit 181 at time 3, instruction 2 is processed by memory unit 180.

すべての命令のデータがウェイ判定部181によって、正しいウェイのデータであると判定されると(すなわち、ウェイ予測がヒットすると)、図4のようなタイムチャートとデータが処理される。   If the way determination unit 181 determines that the data of all the instructions is the correct way data (that is, if the way prediction hits), the time chart and data as shown in FIG. 4 are processed.

次に、図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 memory unit 180 at time 2 will be described.

まず、論理ページ番号上位ビット103は、ラッチ105に格納される。   First, the logical page number upper bits 103 are stored in the latch 105.

また、論理ページ番号下位ビット102は、TLBタグ格納部(110,111)と、TLBのTLBデータ格納部(120,121)にそれぞれ入力される。   The logical page number lower bits 102 are input to the TLB tag storage units (110, 111) and the TLB TLB data storage units (120, 121), respectively.

そして、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 latches 116, 117, 126, and 127, respectively.

一方、アドレスのページ内オフセット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 way prediction unit 193.

前記信号151の値は予測されたウェイ、すなわち、ウェイ0を示す。   The value of the signal 151 indicates the predicted way, ie, way 0.

この信号151は、ウェイデコーダ160でデコードされて、キャッシュデータ格納部(140,141)に入力される。   The signal 151 is decoded by the way decoder 160 and input to the cache data storage (140, 141).

このとき、信号151の値がウェイ0を示すので、ウェイデコーダ160からウェイ0のデータ格納部140を動作させるための信号161が出力される。   At this time, since the value of signal 151 indicates way 0, way decoder 160 outputs signal 161 for operating data storage unit 140 of way 0.

この信号161により、データ格納部140が動作し、データ142を出力する。この場合、データ格納部141は動作しない。   The signal 161 causes the data storage unit 140 to operate, and outputs data 142. In this case, the data storage unit 141 does not operate.

データ選択器144には、予測されたウェイのデータ142とキャッシュ予測ウェイ信号151が入力される。   The data selector 144 receives the predicted way data 142 and the cache predicted way signal 151.

データ選択器144では、キャッシュ予測ウェイ信号151により示されたウェイ、すなわち、ウェイ0のデータ142が選択されてデータ145に出力される。   In the data selector 144, the way indicated by the cache prediction way signal 151, that is, the data 142 of the way 0 is selected and output as the data 145.

また、キャッシュ予測ウェイ信号151はラッチ152に格納される。   The cache prediction way signal 151 is stored in the latch 152.

以上の処理が1サイクルで行なわれる。   The above processing is performed in one cycle.

図7は、ウェイデコーダ160の構成を示す図である。   FIG. 7 is a diagram showing a configuration of the way decoder 160.

キャッシュ予測ウェイ信号151は、2ビットの信号であり、ウェイ0が予測されたことを表す信号とウェイ1が予測されたことを表す信号により構成される。   The cache prediction way signal 151 is a 2-bit signal, and includes a signal indicating that the way 0 has been predicted and a signal indicating that the way 1 has been predicted.

ウェイデコーダ160では、2ビットの信号を1ビットづつに分解してウェイ0が予測されたことを表す信号をキャッシュウェイ0イネーブル信号161として、ウェイ1が予測されたことを表す信号をキャッシュウェイ1イネーブル信号162としてそれぞれ出力する。   The way decoder 160 decomposes the 2-bit signal into 1-bit units and sets a signal indicating that the way 0 is predicted as the cache way 0 enable signal 161 and a signal indicating that the way 1 is predicted as the cache way 1 Each is output as an enable signal 162.

次に、時刻3におけるウェイ判定部の動作について説明する。   Next, the operation of the way determination unit at time 3 will be described.

ラッチ105に格納された論理ページ番号上位ビットと、ラッチ(116,117)に格納されたTLBタグと、ラッチ(126,127)に格納された物理ページ番号とに基づき、TLBウェイ判定器114と物理ページ番号選択器124によって、物理ページ番号125の値が生成される。   Based on the logical page number upper bit stored in the latch 105, the TLB tag stored in the latch (116, 117), and the physical page number stored in the latch (126, 127), the TLB way determination unit 114 The value of the physical page number 125 is generated by the physical page number selector 124.

さらに、ラッチ(136,137)に格納されたキャッシュタグと物理ページ番号125とに基づき、キャッシュウェイ判定器134によってキャッシュウェイ判定信号135に値が出力される。   Further, based on the cache tag stored in the latch (136, 137) and the physical page number 125, a value is output to the cache way determination signal 135 by the cache way determination unit 134.

キャッシュウェイ判定信号135は2ビットの信号であり、物理ページ番号125とウェイ0のキャッシュタグ138が一致したかどうかを示す1ビット信号と物理ページ番号125とウェイ1のキャッシュタグ139が一致したかを示す1ビット信号により構成される。   The cache way determination signal 135 is a 2-bit signal. The 1-bit signal indicating whether the physical page number 125 and the cache tag 138 of the way 0 match, and whether the physical page number 125 and the cache tag 139 of the way 1 match. Is constituted by a 1-bit signal indicating

キャッシュウェイ予測判定器154では、ラッチ152に格納されたキャッシュ予測ウェイ信号151の値とキャッシュウェイ判定信号135とに基づいてキャッシュ192のウェイ予測がミスしたかどうかを判定する。   The cache way prediction determining unit 154 determines whether the way prediction of the cache 192 has missed based on the value of the cache predicted way signal 151 stored in the latch 152 and the cache way determination signal 135.

図6は、図1に示すキャッシュウェイ予測判定器154を含むキャッシュウェイ予測判定部194のより詳細な構成を示すブロック図である。   FIG. 6 is a block diagram showing a more detailed configuration of the cache way prediction determining unit 194 including the cache way prediction determining unit 154 shown in FIG.

キャッシュ192の予測されたウェイを示す信号153は2ビットの信号であり、ウェイ0が予測されたことを示す信号710とウェイ1が予測されたことを示す信号711により構成される。   The signal 153 indicating the predicted way of the cache 192 is a 2-bit signal, and includes a signal 710 indicating that the way 0 has been predicted and a signal 711 indicating that the way 1 has been predicted.

また、キャッシュウェイ判定信号135は2ビットの信号であり、ウェイ0がヒットしたことを示す信号712とウェイ1がヒットしたことを示す信号713により構成される。   The cache way determination signal 135 is a 2-bit signal, and includes a signal 712 indicating that the way 0 has hit and a signal 713 indicating that the way 1 has hit.

AND演算器700は、ウェイ0が予測され、かつ、ウェイ0がヒットしたときに1を出力する。   AND operator 700 outputs 1 when way 0 is predicted and way 0 hits.

また、AND演算器701は、ウェイ1が予測され、かつ、ウェイ1がヒットしたときに1を出力する。   The AND operator 701 outputs 1 when way 1 is predicted and way 1 is hit.

キャッシュウェイ予測判定禁止信号704は、キャッシュウェイ予測判定を行なわないときに1を出力する信号であり、時刻3では0を出力している。   The cache way prediction determination prohibition signal 704 is a signal that outputs 1 when the cache way prediction determination is not performed, and outputs 0 at time 3.

OR演算器705は、ウェイ0が予測されかつウェイ0がヒットしたか、または、ウェイ1が予測されかつウェイ1がヒットしたとき1を出力する。   The OR operator 705 outputs 1 when way 0 is predicted and way 0 is hit, or when way 1 is predicted and way 1 is hit.

すなわち、OR演算器705は、キャッシュのウェイ予測がヒットした場合に1を出力する。   That is, the OR operator 705 outputs 1 when the cache way prediction hits.

NOT演算器707は、キャッシュのウェイ予測がミスした場合にキャッシュウェイ予測判定信号155に1の値を出力する。   The NOT operator 707 outputs a value of 1 to the cache way prediction determination signal 155 when the way prediction of the cache is missed.

時刻3では、命令1に関する処理がキャッシュウェイ予測判定器154で行なわれ、ウェイ0が予測されてウェイ0がヒットしているのでAND演算器700の出力信号702の値が1となる。   At time 3, the process related to the instruction 1 is performed by the cache way prediction determining unit 154, and the value of the output signal 702 of the AND operator 700 becomes 1 because the way 0 is predicted and the way 0 is hit.

そして、キャッシュウェイ予測判定信号155の値は0となり、キャッシュウェイ予測判定信号155ウェイ予測がヒットしたことを示す。   Then, the value of the cache way prediction determination signal 155 becomes 0, indicating that the cache way prediction signal 155 way prediction has hit.

ウェイ予測がヒットすれば、図4に示すように命令1と命令2はパイプラインで実行することができる。   If the way prediction hits, instructions 1 and 2 can be executed in a pipeline as shown in FIG.

次に、キャッシュウェイ予測部193においてウェイ0を予測したにもかかわらず、キャッシュ192のウェイ1がヒットした場合について述べる。   Next, a case where the way 1 of the cache 192 hits even though the way 0 is predicted by the cache way prediction unit 193 will be described.

この場合には、ウェイ予測がミスしたことになる。   In this case, the way prediction has been missed.

キャッシュ192のウェイ1がヒットすると、キャッシュウェイ判定信号135の値はウェイ1を示し、図6に示す信号712の値が0に、信号713の値が1となる。   When the way 1 of the cache 192 hits, the value of the cache way determination signal 135 indicates the way 1, and the value of the signal 712 and the value of the signal 713 shown in FIG.

一方、ウェイ0が予測されていたので、信号710の値は1、信号711の値は0であるから、AND演算器700及び701の出力はともに0となり、信号706の値は0に、キャッシュウェイ予測判定信号155の値は1になる。   On the other hand, since the way 0 is predicted, the value of the signal 710 is 1 and the value of the signal 711 is 0, so that the outputs of the AND operators 700 and 701 are both 0, the value of the signal 706 is 0, and The value of the way prediction determination signal 155 becomes 1.

すなわち、キャッシュウェイ予測判定信号155はウェイ予測ミスを示す。   That is, the cache way prediction determination signal 155 indicates a way prediction miss.

キャッシュウェイ予測判定信号155の値が1となると例外的な処理が実行される。   When the value of the cache way prediction determination signal 155 becomes 1, exceptional processing is executed.

図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 way 0 is predicted by the instruction 1 and the way prediction is missed, and the way 1 is predicted after the instruction 2 and the way prediction is hit.

時刻3で、命令1のキャッシュウェイ予測判定信号155がウェイ予測のミスを示した場合、パイプライン制御信号156が出力されて、時刻3に行なわれようとしているプロセッサ本体182、TLB191、キャッシュ192の動作を抑止する。   At time 3, if the cache way prediction determination signal 155 of the instruction 1 indicates a way prediction miss, a pipeline control signal 156 is output, and the processor main body 182, TLB 191, and cache 192 to be performed at time 3 are output. Suppress the operation.

TLB191では、次の命令、すなわち、命令2の処理を開始しているが、途中で抑止される。   In the TLB 191, the processing of the next instruction, that is, the instruction 2 is started, but is suppressed in the middle.

また、時刻3では、キャッシュウェイ予測判定信号155によって、キャッシュウェイ判定信号135がラッチ150に格納される。   At time 3, the cache way determination signal 135 is stored in the latch 150 by the cache way prediction determination signal 155.

これにより、キャッシュ予測ウェイ信号151の値が置き変わる。   As a result, the value of the cache prediction way signal 151 is replaced.

すなわち、時刻4からは、キャッシュ予測ウェイ信号151の値は、時刻3でキャッシュがヒットしたウェイであるウェイ1を示す。   That is, from time 4, the value of the cache prediction way signal 151 indicates the way 1 which is the way in which the cache hit at time 3.

時刻4では、新しい値を持つキャッシュ予測ウェイ信号151が出力され、ウェイ1のキャッシュデータ格納部141を動作させる。   At time 4, a cache prediction way signal 151 having a new value is output, and the cache data storage unit 141 of way 1 is operated.

キャッシュデータ格納部141の出力であるウェイ1のデータ143は、キャッシュ予測ウェイ信号151によりデータ選択器144で選択されてラッチ146に格納される。   Way 1 data 143 output from the cache data storage unit 141 is selected by the data selector 144 based on the cache prediction way signal 151 and stored in the latch 146.

時刻5では、ラッチ146に格納されたウェイ1のデータがキャッシュ192から出力され、データ処理部195で処理される。   At time 5, the data of way 1 stored in the latch 146 is output from the cache 192 and processed by the data processing unit 195.

なお、本実施例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 way prediction unit 193. It is also possible to activate only the units (130, 131).

図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 cache 992 and a cache 992 are applied to a processor.

図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 way prediction unit 996 and a TLB way prediction determination unit 997 are added, and the way of TLB is also predicted.

本実施例2のTLBウェイ予測部996、および、TLBウェイ予測判定部997の構成は、前記実施例1のキャッシュウェイ予測部193、キャッシュウェイ予測判定部194と同じである。   The configurations of the TLB way prediction unit 996 and the TLB way prediction determination unit 997 of the second embodiment are the same as those of the cache way prediction unit 193 and the cache way prediction determination unit 194 of the first embodiment.

図8に示すプロセッサ本体982、キャッシュ992、キャッシュウェイ予測部993、キャッシュウェイ予測判定部994は、それぞれ、図1に示すプロセッサ本体182、キャッシュ192、キャッシュウェイ予測部193、キャッシュウェイ予測判定部194に対応している。   The processor body 982, cache 992, cache way prediction unit 993, and cache way prediction determination unit 994 shown in FIG. 8 are respectively the processor body 182, cache 192, cache way prediction unit 193, and cache way prediction determination unit 194 shown in FIG. It corresponds to.

図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 TLB way 0 is predicted for all the instructions 1 to 4 and the prediction hits.

図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 instruction 1 is being processed.

以下、命令1の処理について述べる。   Hereinafter, the processing of the instruction 1 will be described.

図9に示すように、TLB991、キャッシュ992、TLBウェイ予測部996、及び、TLBウェイ予測判定部997、キャッシュウェイ予測部993、及び、キャッシュウェイ予測判定部994から構成される部分は、動作するタイミングの違いによりメモリ部980とウェイ判定部981に分けられる。   As illustrated in FIG. 9, a part including the TLB 991, the cache 992, the TLB way prediction unit 996, the TLB way prediction determination unit 997, the cache way prediction unit 993, and the cache way prediction determination unit 994 operates. It is divided into a memory unit 980 and a way determination unit 981 according to the difference in timing.

時刻1で、アドレス生成部990はアドレスを生成し、次の時刻にアドレス900を出力する。   At time 1, the address generator 990 generates an address, and outputs the address 900 at the next time.

時刻2で、メモリ部980は、アドレス900を入力して1サイクル後にデータ947をデータ処理部995に出力する。   At time 2, the memory unit 980 outputs the data 947 to the data processing unit 995 one cycle after inputting the address 900.

TLBデータ格納部(920,921)に関しては、TLBウェイ予測部996で予測されたウェイのTLBデータ格納部920だけが動作する。   As for the TLB data storage units (920, 921), only the TLB data storage unit 920 of the way predicted by the TLB way prediction unit 996 operates.

ここでは、TLBウェイ予測部996でウェイ0が予測されているので、前記TLBウェイ予測部996の出力であるTLB予測ウェイ信号961はウェイ0を示す。   Here, since the TLB way prediction unit 996 predicts the way 0, the TLB prediction way signal 961 output from the TLB way prediction unit 996 indicates the way 0.

そして、前記TLB予測ウェイ信号961がTLB991に入力されて、TLBデータ格納部920が動作する。   Then, the TLB prediction way signal 961 is input to the TLB 991, and the TLB data storage unit 920 operates.

また、キャッシュデータ格納部(940,941)に関しては、キャッシュウェイ予測部993で予測されたウェイのキャッシュデータ格納部940だけが動作し、キャッシュデータ格納部940から読み出されたデータがデータ947として出力される。   As for the cache data storage units (940, 941), only the cache data storage unit 940 of the way predicted by the cache way prediction unit 993 operates, and the data read from the cache data storage unit 940 is used as data 947. Is output.

また、時刻2では、TLBタグ格納部(910,911)と、キャッシュタグ格納部(930,931)が動作する。   At time 2, the TLB tag storage units (910, 911) and the cache tag storage units (930, 931) operate.

そして、時刻3では、データ処理部995がデータ947を入力して処理する。   Then, at time 3, the data processing unit 995 receives and processes the data 947.

また、TLB991では、論理ページ番号904の上位ビットと前時刻にTLBタグ格納部(910,911)から読みだされたTLBタグが比較され、TLBウェイ判定信号960を出力する。   Further, the TLB 991 compares the upper bit of the logical page number 904 with the TLB tag read from the TLB tag storage unit (910, 911) at the previous time, and outputs a TLB way determination signal 960.

さらに、TLB991から前時刻にTLBウェイ予測部996で予測されたウェイ、すなわち、ウェイ0のTLBデータ格納部920から読みだされた物理ページ番号925が出力され、キャッシュ992に送られる。   Further, the way predicted by the TLB way prediction unit 996 at the previous time from the TLB 991, that is, the physical page number 925 read from the TLB data storage unit 920 of the way 0 is output and sent to the cache 992.

キャッシュ992では、物理ページ番号925と前時刻にキャッシュタグ格納部(930,931)から読みだされたキャッシュタグが比較され、キャッシュウェイ判定信号935を出力する。   The cache 992 compares the physical page number 925 with the cache tag read from the cache tag storage unit (930, 931) at the previous time, and outputs a cache way determination signal 935.

また、時刻3では、TLBウェイ予測判定部997において、TLBウェイ判定信号960の値と前時刻に出力されたTLB予測ウェイ信号961の値をもとにTLBのウェイ予測がミスしていたかどうか判定する。   At time 3, the TLB way prediction determining unit 997 determines whether or not the TLB way prediction has missed based on the value of the TLB way determination signal 960 and the value of the TLB prediction way signal 961 output at the previous time. I do.

さらに、時刻3では、キャッシュウェイ予測判定部994により、時刻2におけるキャッシュウェイ予測がミスしていたかどうかを判定する。   Further, at time 3, the cache way prediction determining unit 994 determines whether the cache way prediction at time 2 has missed.

もし、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 way 1 of the TLB is hit despite prediction of way 0 of the TLB.

この場合には、TLBウェイ判定信号960の値がウェイ1を示し、TLBウェイ予測判定部997はTLBウェイ予測がミスしたものと判定する。   In this case, the value of the TLB way determination signal 960 indicates way 1, and the TLB way prediction determination unit 997 determines that the TLB way prediction has failed.

図10は、前記した場合のタイムチャートを示す図である。   FIG. 10 is a diagram showing a time chart in the case described above.

この場合には、TLBウェイ予測判定信号962に値1が出力され、この値1は、TLBウェイ予測ミスを示している。   In this case, the value 1 is output to the TLB way prediction determination signal 962, and the value 1 indicates a TLB way prediction error.

そして、TLBウェイ予測判定信号962によって、TLBウェイ判定信号960の値がTLBウェイ予測部996に格納される。   Then, the value of the TLB way determination signal 960 is stored in the TLB way prediction unit 996 by the TLB way prediction determination signal 962.

この格納によって、時刻3におけるTLBウェイ判定信号960の値、すなわち、ウェイ1を示す値が、時刻4からはTLB予測ウェイ信号961に出力される。   By this storage, the value of the TLB way determination signal 960 at time 3, that is, the value indicating the way 1 is output to the TLB prediction way signal 961 from time 4.

また、時刻3において、パイプライン制御信号963が出力されて、時刻3に行なわれようとしているプロセッサ本体982、TLB991、キャッシュ992の動作を抑止する。   At time 3, the pipeline control signal 963 is output, and the operations of the processor main body 982, TLB 991, and cache 992 to be performed at time 3 are suppressed.

TLB991やキャッシュ992では次の命令、すなわち、命令2の処理を開始しているが、途中で抑止される。   In the TLB 991 and the cache 992, the processing of the next instruction, that is, the instruction 2, has been started, but is suppressed in the middle.

時刻4では、新しい値をTLB予測ウェイ信号961が出力される。   At time 4, a new value is output as the TLB prediction way signal 961.

前記TLB予測ウェイ信号961の値はウェイ1を示しており、ウェイ1のTLBデータ格納部921を動作させる。   The value of the TLB prediction way signal 961 indicates the way 1, and the TLB data storage unit 921 of the way 1 is operated.

一方、時刻4では、キャッシュ992は動作せずに内部状態を保持する。   On the other hand, at time 4, the cache 992 does not operate and holds the internal state.

時刻5では、TLBデータ格納部921の出力が物理ページ番号925に出力される。   At time 5, the output of the TLB data storage unit 921 is output to the physical page number 925.

そして、キャッシュ992よりキャッシュウェイ判定信号935が出力されてキャッシュウェイ予測判定部994に送られ、キャッシュウェイ予測判定部994でキャッシュのウェイ予測がミスしていないかどうかの判定が行なわれる。   Then, the cache way determination signal 935 is output from the cache 992 and sent to the cache way prediction determination unit 994, and the cache way prediction determination unit 994 determines whether or not the cache way prediction has missed.

なお、本実施例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 way prediction unit 996. It is also possible to activate only the tag storage units (910, 911).

図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 Embodiment 3 is applied to a processor.

図11は、図1に示すプロッセサのアドレス生成部190をアドレス生成部1290に、キャッシュウェイ予測部193をキャッシュウェイ予測部1293にそれぞれ変更し、さらに、アドレス制御部1296を付加したものである。   FIG. 11 is obtained by changing the address generation unit 190 of the processor shown in FIG. 1 to an address generation unit 1290, changing the cache way prediction unit 193 to a cache way prediction unit 1293, and further adding an address control unit 1296.

図11に示すプロセッサ本体1282、TLB1291、キャッシュ1292、キャッシュウェイ予測部1293、キャッシュウェイ予測判定部1294は、それぞれ、図1に示すプロセッサ本体182、TLB191、キャッシュ192、キャッシュウェイ予測器193、キャッシュウェイ予測判定部194に対応している。   The processor main body 1282, TLB 1291, cache 1292, cache way prediction unit 1293, and cache way prediction determination unit 1294 shown in FIG. It corresponds to the prediction determination unit 194.

アドレス生成部1290は、4つのアドレスラッチ1220〜1223を持っている。   The address generation unit 1290 has four address latches 1220 to 1223.

本実施例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 address generation unit 1290 has four address latches 1220 to 1223, selects one of the outputs of the latches by an address selector 1224, and passes the address 1200 after one cycle via an address adder 1226 and a latch 1228. Output to

一方、キャッシュウェイ予測部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 address selector 1224. Is selected by the cache prediction way selector 1234 and output as the cache prediction way signal 1212.

このとき、アドレス選択器1224には、アドレス制御部1296から出力されるアドレスラッチ読みだし選択信号1205が、キャッシュ予測ウェイ選択器1234には、アドレスラッチ読みだし選択信号1205の1サイクル遅れの信号であるキャッシュ予測ウェイラッチ読みだし選択信号1208がそれぞれ入力される。   At this time, the address selector 1224 receives the address latch read selection signal 1205 output from the address control unit 1296, and the cache prediction way selector 1234 receives the address latch read selection signal 1205 as a signal delayed by one cycle from the address latch read signal 1205. A certain cache prediction way latch read selection signal 1208 is input.

そして、アドレスラッチ1220の出力がアドレス選択器1224において選択された場合には、キャッシュ予測ウェイラッチ1230の出力がキャッシュ予測ウェイ選択器1234において選択される。   When the output of the address latch 1220 is selected by the address selector 1224, the output of the cache prediction way latch 1230 is selected by the cache prediction way selector 1234.

同様に、それぞれアドレスラッチ1221、1222、1223の出力がアドレス選択器1224において選択された場合には、それぞれキャッシュ予測ウェイラッチ1231、1232、1233の出力がキャッシュ予測ウェイ選択器1234において選択される。   Similarly, when the outputs of the address latches 1221, 1222, and 1223 are selected by the address selector 1224, the outputs of the cache prediction way latches 1231, 1232, and 1233 are selected by the cache prediction way selector 1234, respectively.

アドレス加算器1226は、同一のアドレスラッチを用いて連続するアドレス領域を次々にアクセスする場合に、アドレスラッチの値にある値を加えるときに使用する。   The address adder 1226 is used to add a certain value to the value of the address latch when successive address areas are successively accessed using the same address latch.

ウェイ予測がミスしたときは、キャッシュ予測ウェイ信号1212に値を出力するために使用されたキャッシュ予測ウェイラッチにキャッシュウェイ判定信号1211の値が書き込まれる。   When the way prediction fails, the value of the cache way determination signal 1211 is written to the cache prediction way latch used to output the value to the cache prediction way signal 1212.

この書き込みを行なうための機構が、ラッチ1240及びデコーダ1242である。   A mechanism for performing this writing is a latch 1240 and a decoder 1242.

ラッチ1240は、キャッシュ予測ウェイ選択器1234に入力されたキャッシュ予測ウェイラッチ読みだし選択信号1208の値を格納し記憶する。   Latch 1240 stores and stores the value of cache prediction way latch read selection signal 1208 input to cache prediction way selector 1234.

ウェイ予測がミスしたときは、キャッシュウェイ予測判定信号の値が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 prediction determination signal 1214 input to the decoder 1242 becomes 1, the decoder 1242 decodes the value stored in the latch 1240 to set any one of the latch set signals 1243 to 1246 to 1. .

図12は、図11に示すデコーダ1242の回路構成を示す図である。   FIG. 12 is a diagram showing a circuit configuration of the decoder 1242 shown in FIG.

図11に示す信号1241はデコード入力信号1400に、図11に示す信号1243〜1246はデコード出力信号1430〜1433に、図11に示す信号1214はデコードイネーブル信号1410に対応している。   11 corresponds to the decode input signal 1400, the signals 1243 to 1246 correspond to the decode output signals 1430 to 1433, and the signal 1214 illustrated in FIG. 11 corresponds to the decode enable signal 1410.

デコード入力信号1400は、2ビットの2進数により構成され、第0ビット目の信号1402と第1ビット目の信号1403に分解することができる。   The decode input signal 1400 is composed of a 2-bit binary number, and can be decomposed into a 0-bit signal 1402 and a 1-bit signal 1403.

前記デコーダは、この2ビットの信号の値により、デコード出力信号1430〜1433のうちのいずれかひとつを1にする。   The decoder sets one of the decode output signals 1430 to 1433 to 1 according to the value of the 2-bit signal.

ただし、デコードイネーブル信号1410の値が0のときは、デコード出力信号1430〜1433の値はすべて0となる。   However, when the value of the decode enable signal 1410 is 0, the values of the decode output signals 1430 to 1433 are all 0.

それぞれラッチセット信号1243〜1246が1のとき、それぞれキャッシュ予測ウェイラッチ1230〜1233にキャッシュウェイ判定信号1211の値が書き込まれる。   When the latch set signals 1243 to 1246 are 1, the value of the cache way determination signal 1211 is written to the cache prediction way latches 1230 to 1233, respectively.

図13は、キャッシュ1292のデータ格納部に格納されたデータの一例を示す図である。   FIG. 13 is a diagram illustrating an example of data stored in the data storage unit of the cache 1292.

図13において、1700はウェイ0のキャッシュデータ格納部を、1701はウェイ1のキャッシュデータ格納部をそれぞれ表す。   In FIG. 13, reference numeral 1700 denotes a way 0 cache data storage unit, and 1701 denotes a way 1 cache data storage unit.

1710は、キャッシュ1292のラインであり、本例では1ラインに4つのデータが格納される。   Reference numeral 1710 denotes a line of the cache 1292. In this example, four data are stored in one line.

1711は、キャッシュ1292に格納されたデータである。   Reference numeral 1711 denotes data stored in the cache 1292.

1712は、データ1711のアドレスを補助的に示したものである。   Reference numeral 1712 denotes an auxiliary address of the data 1711.

一般に、キャッシュ1292では、データはラインごとに管理され、同一ラインのデータは同一のウェイに格納される。   Generally, in the cache 1292, data is managed for each line, and data of the same line is stored in the same way.

図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 cache 1292 in order to compare the character string data A and the character string data B will be described.

文字列の比較では、文字データ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 cache 1292.

以下、図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, reference numeral 1601 denotes a value of a signal output from a latch or a cache or a value of a signal.

時刻0において、文字列データAの先頭アドレス100がアドレスラッチ1220に、文字列データBの先頭アドレス200がアドレスラッチ1221にそれぞれ格納されているものとする。   At time 0, it is assumed that the head address 100 of the character string data A is stored in the address latch 1220 and the head address 200 of the character string data B is stored in the address latch 1221.

図11に示すプロセッサでは、文字列データAの各文字データを読み出すのにアドレスラッチ1220を使用し、文字データA〔0〕を読み出すときにはアドレス加算器1226において値0を、文字データA〔1〕を読み出すときにはアドレス加算器1226において値1を、以下同様に、文字データA〔3〕を読み出すときにはアドレス加算器1226において値3をそれぞれアドレスラッチ1220の値に加えている。   In the processor shown in FIG. 11, the address latch 1220 is used to read each character data of the character string data A. When reading the character data A [0], the address adder 1226 sets the value 0 to the character data A [1]. Is read by the address adder 1226, and similarly, when the character data A [3] is read, the value 3 is added by the address adder 1226 to the value of the address latch 1220.

同様に、文字列データBの各文字データを読み出すのにアドレスラッチ1221を使用している。   Similarly, the address latch 1221 is used to read out each character data of the character string data B.

また、時刻0においては、キャッシュ予測ウェイラッチ1230、1231ともに値が0であるものとする。   At time 0, the values of both the cache prediction way latches 1230 and 1231 are 0.

すなわち、アドレスラッチ1220、アドレスラッチ1221に対応する予測ウェイはともに0である。   That is, the prediction ways corresponding to the address latch 1220 and the address latch 1221 are both 0.

このタイムチャートにおいて、時刻1から読み出し処理を開始している。   In this time chart, the reading process is started from time 1.

時刻1において、アドレス100にある文字データA〔0〕を読み出すために、アドレスラッチ選択信号1205の値が0となりアドレスラッチ1220の値100が選択されてアドレスラッチ選択出力信号1225に出力される。   At time 1, in order to read the character data A [0] at the address 100, the value of the address latch selection signal 1205 becomes 0, the value 100 of the address latch 1220 is selected, and is output as the address latch selection output signal 1225.

そして、アドレス加算器1226を経てアドレス1227に出力される。   Then, it is output to the address 1227 via the address adder 1226.

アドレス加算器1226では何も加えられずアドレス1227の値は100のままである。   Nothing is added by the address adder 1226, and the value of the address 1227 remains at 100.

時刻2で、アドレスラッチ選択信号1205の値の1サイクル遅れの信号であるキャッシュ予測ウェイラッチ読み出し選択信号1208の値0によって、アドレスラッチ1220に対応するキャッシュ予測ウェイラッチ1230の値0がキャッシュ予測ウェイ信号1212が読み出される。   At time 2, the value of the cache prediction way latch 1230 corresponding to the address latch 1220 is changed to the value 0 of the cache prediction way latch 1230 by the value 0 of the cache prediction way latch read selection signal 1208 which is a signal delayed by one cycle from the value of the address latch selection signal 1205. The signal 1212 is read.

このことによって、キャッシュデータ格納部ウェイ0(1700)が動作する。   As a result, the cache data storage unit way 0 (1700) operates.

時刻3では、キャッシュウェイ判定信号1211が出力されるが、図13に示すとおりアドレス100にあるデータA〔0〕はキャッシュのウェイ1に存在するのでキャッシュウェイ判定信号1211の値は1となる。   At time 3, the cache way determination signal 1211 is output. However, as shown in FIG. 13, the value of the cache way determination signal 1211 is 1 because the data A [0] at the address 100 exists in the way 1 of the cache.

キャッシュウェイ予測判定部1294では、このキャッシュウェイ判定信号1211の値1と時刻2で出力されたキャッシュ予測ウェイ信号1212の値0とを比較するが、不一致なのでウェイ予測ミスとなる。   The cache way prediction determining unit 1294 compares the value 1 of the cache way determination signal 1211 with the value 0 of the cache predicted way signal 1212 output at time 2, but because they do not match, a way prediction miss occurs.

そこで、パイプライン制御信号1213を発行するとともに、キャッシュウェイ予測判定信号1214の値を1にする。   Therefore, the pipeline control signal 1213 is issued, and the value of the cache way prediction determination signal 1214 is set to 1.

デコーダ1242には、キャッシュ予測ウェイラッチ読み出し選択信号1208の1サイクル遅れの信号であるデコーダ入力信号1241が入力され、時刻2で読み出しを行ったキャッシュ予測ウェイラッチ1230にラッチセット信号1243が入力される。   The decoder input signal 1241 which is a signal delayed by one cycle from the cache prediction way latch read selection signal 1208 is input to the decoder 1242, and the latch set signal 1243 is input to the cache prediction way latch 1230 which has read at time 2. .

このことによって、キャッシュウェイ判定信号1211の値1がキャッシュ予測ウェイラッチ1230に書き込まれる。   As a result, the value 1 of the cache way determination signal 1211 is written to the cache prediction way latch 1230.

すなわち、時刻3において、アドレスラッチ1220に対応する予測ウェイは1に変更される。   That is, at time 3, the prediction way corresponding to the address latch 1220 is changed to 1.

時刻4では、キャッシュ予測ウェイラッチ1230の値が1となり、キャッシュ予測ウェイ信号1212には正しいウェイ予測値である1が出力され、キャッシュデータ格納部ウェイ1(1701)から文字データA〔0〕が読み出される。   At time 4, the value of the cache prediction way latch 1230 becomes 1, the correct way prediction value 1 is output to the cache prediction way signal 1212, and character data A [0] is output from the cache data storage way 1 (1701). Is read.

時刻5では、キャッシュの出力データ信号1215にA〔0〕が出力される。   At time 5, A [0] is output to the output data signal 1215 of the cache.

一方、時刻2では、アドレス200にある文字データB〔0〕を読み出すために、アドレスラッチ選択信号1205の値が1となりアドレスラッチ1221の値200が選択されてアドレスラッチ選択出力信号1225に出力される。   On the other hand, at time 2, in order to read the character data B [0] at the address 200, the value of the address latch selection signal 1205 becomes 1 and the value 200 of the address latch 1221 is selected and output to the address latch selection output signal 1225. You.

そして、アドレス加算器1226を経てアドレス1227に出力される。   Then, it is output to the address 1227 via the address adder 1226.

アドレス加算器1226では、何も加えられずアドレス1227の値は200のままである。   In the address adder 1226, nothing is added and the value of the address 1227 remains at 200.

時刻3では、この値200がラッチ1228からアドレス1200から出力される。   At time 3, this value 200 is output from the address 1200 from the latch 1228.

また、アドレスラッチ選択信号1205の値1がラッチ1209からキャッシュ予測ウェイラッチ読み出し選択信号1208に出力される。   Further, the value 1 of the address latch selection signal 1205 is output from the latch 1209 to the cache prediction way latch read selection signal 1208.

時刻4では、キャッシュ予測ミス処理のために、一旦、アドレスラッチ選択信号1205の値とキャッシュ予測ウェイラッチ読み出し選択信号1208の値は、文字データA〔0〕の読み出しのために変更されてしまうが、時刻5では、再び時刻3と同じ値を取り戻す。   At time 4, due to cache prediction miss processing, the value of the address latch selection signal 1205 and the value of the cache prediction way latch read selection signal 1208 are temporarily changed to read the character data A [0]. At time 5, the same value as at time 3 is restored again.

ここで、ラッチ1209とラッチ1228は値回復機能付きラッチであり、その回路構成を図15に示す。   Here, the latches 1209 and 1228 are latches with a value recovery function, and the circuit configuration is shown in FIG.

図15において、回復機能付きラッチ1800がラッチ1209またはラッチ1228に、入力信号1801が信号1205または信号1227に、出力信号1802が信号1208または1200にそれぞれ対応している。   In FIG. 15, a latch 1800 with a recovery function corresponds to the latch 1209 or 1228, an input signal 1801 corresponds to the signal 1205 or 1227, and an output signal 1802 corresponds to the signal 1208 or 1200.

値回復機能付きラッチ1800は、通常、ラッチ1810を用いて入力信号1801を出力信号1802に出力する単なるラッチとして機能するが、1サイクル前の値をラッチ1811に記憶している。   The latch with value recovery function 1800 normally functions as a simple latch that outputs the input signal 1801 to the output signal 1802 using the latch 1810, but stores the value one cycle before in the latch 1811.

文字データA〔0〕読み出しのキャッシュのウェイ予測のミスが判定された時刻3では、既に、次の文字データB〔0〕のアドレスまたはキャッシュ予測ウェイラッチ読み出し選択信号(以下、文字データB〔0〕読み出しパラメータと呼ぶ)が回復機能付きラッチ1800から出力されているが、文字データA〔0〕読み出しパラメータはラッチ1811に記憶されている。   At time 3 when it is determined that a cache way prediction miss for reading the character data A [0] has been determined, the address of the next character data B [0] or the cache prediction way latch read selection signal (hereinafter, character data B [0 ] (Referred to as a read parameter) is output from the latch 1800 with the recovery function. The character data A [0] read parameter is stored in the latch 1811.

この時刻に発行されるパイプライン制御信号1213をもとに、時刻4では、ラッチ1811に格納された文字データA〔0〕読み出しパラメータを読み出してウェイ予測ミスをした文字データA〔0〕の読み出し処理を再実行し、時刻5では文字データB〔0〕読み出しパラメータをラッチ1810から読み出して通常の処理に戻る。   At time 4, based on the pipeline control signal 1213 issued at this time, the character data A [0] read parameter stored in the latch 1811 is read, and the character data A [0] having the way prediction error is read. The process is executed again, and at time 5, the character data B [0] read parameter is read from the latch 1810 and the process returns to the normal process.

そして、時刻5では、キャッシュ予測ウェイラッチ読み出し選択信号1208の値1によってキャッシュ予測ウェイラッチが選択されキャッシュ予測ウェイ信号1212に値0が出力される。   At time 5, the cache prediction way latch is selected by the value 1 of the cache prediction way latch read selection signal 1208, and the value 0 is output to the cache prediction way signal 1212.

このことによって、キャッシュデータ格納部ウェイ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 way 0 as shown in FIG. 13, the way prediction becomes a hit.

時刻6では、文字データB〔0〕の値がキャッシュの出力データ信号1215に出力される。   At time 6, the value of character data B [0] is output to cache output data signal 1215.

以上の2つの文字データの読み出しの後、アドレスラッチ1220に対応するキャッシュ予測ウェイラッチ1230の値が1に、アドレスラッチ1221に対応するキャッシュ予測ウェイラッチ1231の値が0となっている。   After the reading of the above two character data, the value of the cache prediction way latch 1230 corresponding to the address latch 1220 becomes 1 and the value of the cache prediction way latch 1231 corresponding to the address latch 1221 becomes 0.

したがって、この後、文字データ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 address generation unit 1290, the cache way prediction unit 1293 and the address control unit 1296 shown in FIG. 11 with an address generation unit 1390, a cache way prediction unit 1393 and an address control unit 1396. is there.

図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 signals 1351 to 1354 are signals for setting the value of the address 1300 in the address latches 1320 to 1323. When the value of the latch set signal 1351 to 1354 is 1, the address 1300 is applied to the address latches 1320 to 1323, respectively. The value is set.

ラッチセット信号1351〜1354の値は、アドレスラッチ書き込みイネーブル信号1307とアドレスラッチ書き込み選択信号1306とに基づき、デコーダ1350で生成される。   The values of the latch set signals 1351 to 1354 are generated by the decoder 1350 based on the address latch write enable signal 1307 and the address latch write selection signal 1306.

アドレスラッチ書き込みイネーブル信号1307は、アドレスラッチ1320〜1323へのアドレスの転送が行なわれるときに1となる信号である。   The address latch write enable signal 1307 is a signal that becomes 1 when an address is transferred to the address latches 1320 to 1323.

この信号が1のときには、アドレスラッチ書き込み選択信号1306がデコーダ1350においてデコードされて、ラッチセット信号1351〜1354が出力される。   When this signal is 1, the address latch write selection signal 1306 is decoded by the decoder 1350, and the latch set signals 1351 to 1354 are output.

デコーダ1350の回路構成は、図12と同じであり、図16に示す信号1306はデコード入力信号1400に、図16に示す信号1351〜1354はデコード出力信号1430〜1433に、図16に示す信号1307はデコードイネーブル信号1410に対応している。   The circuit configuration of the decoder 1350 is the same as that of FIG. 12, and a signal 1306 shown in FIG. 16 is used as a decode input signal 1400, signals 1351 to 1354 shown in FIG. 16 are used as decode output signals 1430 to 1433, and a signal 1307 shown in FIG. Corresponds to the decode enable signal 1410.

キャッシュウェイ予測部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 way determination signal 1311 to the cache prediction way latches 1330 to 1333.

キャッシュウェイ予測部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 prediction way selector 1334.

キャッシュ予測ウェイの前記転送は、アドレスの前記転送が行なわれたときに行なわれる。   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 signal 1307 becomes 1 when the address is transferred, the cache predictive way latch write select signal selector 1360 changes the value of the address latch write select signal 1306 to the cache predictive way latch write. The cache prediction way latch write data selector 1362 outputs the value of the cache prediction way signal 1312 to the cache prediction way latch write data 1363, and the cache prediction way latch write enable signal selector 1364 outputs the address of the address. The value of the latch write enable signal 1307, that is, the value 1, is output to the cache prediction way latch write enable signal 1365.

デコーダ1342では、キャッシュ予測ウェイラッチ書き込み選択信号1361の値がデコードされてラッチセット信号1343〜1346が出力される。   The decoder 1342 decodes the value of the cache prediction way latch write select signal 1361 and outputs latch set signals 1343 to 1346.

デコーダ1342の回路構成も、図12と同じであり、図16に示す信号1361はデコード入力信号1400に、図16に示す信号1343〜1346はデコード出力信号1430〜1433に、図16に示す信号1365はデコードイネーブル信号1410に対応している。   The circuit configuration of the decoder 1342 is also the same as that of FIG. 12. The signal 1361 shown in FIG. 16 is used as the decode input signal 1400, the signals 1343 to 1346 shown in FIG. 16 are used as the decode output signals 1430 to 1433, and the signal 1365 shown in FIG. Corresponds to the decode enable signal 1410.

ラッチセット信号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 data 1363 in cache prediction way latches 1330 to 1333. When the values of latch set signals 1343 to 1346 are 1, respectively, The value of cache prediction way latch write data 1363 is set in way latches 1330 to 1333.

アドレスラッチ書き込みイネーブル信号1307の値が0のときのキャッシュウェイ予測部1393の動作は、前記図11に示すキャッシュウェイ予測部1293の動作と同じである。   The operation of the cache way prediction unit 1393 when the value of the address latch write enable signal 1307 is 0 is the same as the operation of the cache way prediction unit 1293 shown in FIG.

なお、前記実施例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.

本発明のメモリ装置の一実施例(実施例1)であるキャッシュの概略構成を示すブロック図であり、本実施例1のキャッシュをプロセッサに適用した例を示す図である。FIG. 2 is a block diagram illustrating a schematic configuration of a cache which is an embodiment (Embodiment 1) of the memory device of the present invention, and is a diagram illustrating an example in which the cache of Embodiment 1 is applied to a processor. 図1に示す、キャッシュ、キャッシュウェイ予測部、及び、キャッシュウェイ予測判定部のより詳細な構成を拡大して示すブロック図である。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. 図1に示す、アドレス変換バッファ(TLB)のより詳細な構成を拡大して示すブロック図である。FIG. 2 is an enlarged block diagram showing a more detailed configuration of an address translation buffer (TLB) shown in FIG. 1. 図1に示すプロセッサにおいて、キャッシュのウェイ予測がヒットしたときのタイムチャートを示す図である。FIG. 2 is a diagram showing a time chart when a cache way prediction hits in the processor shown in FIG. 1. 図1に示すプロセッサにおいて、キャッシュのウェイ予測がミスしたときのタイムチャートを示す図である。FIG. 2 is a diagram showing a time chart when a cache way prediction misses in the processor shown in FIG. 1. 図1に示すキャッシュウェイ予測判定部のより詳細な構成を示すブロック図である。FIG. 2 is a block diagram illustrating a more detailed configuration of a cache way prediction determination unit illustrated in FIG. 1. 図2に示すウェイデコーダの構成を示す図である。FIG. 3 is a diagram showing a configuration of a way decoder shown in FIG. 2. 本発明のメモリ装置の他の実施例(実施例2)であるアドレス変換バッファ(TLB)と、キャッシュの概略構成を示すブロック図であり、本実施例2のアドレス変換バッファ(TLB)と、キャッシュをプロセッサに適用した例を示す図である。FIG. 13 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. 11 is a diagram illustrating an example in which is applied to a processor. 図8に示すプロセッサにおいて、アドレス変換バッファ(TLB)のウェイ予測がヒットしたときのタイムチャートを示す図である。FIG. 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. 図8に示すプロセッサにおいて、アドレス変換バッファ(TLB)のウェイ予測がミスしたときのヒットしたときのタイムチャートを示す図である。FIG. 9 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. 本発明のメモリ装置の他の実施例(実施例3)であるキャッシュの概略構成を示すブロック図であり、本実施例3のキャッシュをプロセッサに適用した例を示す図である。FIG. 16 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. 図11に示すデコーダの回路構成を示す図である。FIG. 12 is a diagram illustrating a circuit configuration of the decoder illustrated in FIG. 11. 図11に示すキャッシュのデータ格納部に格納されたデータの一例を示す図である。FIG. 12 is a diagram illustrating an example of data stored in a data storage unit of the cache illustrated in FIG. 11. 図11に示すプロセッサのタイムチャートを示す図である。FIG. 12 is a diagram showing a time chart of the processor shown in FIG. 11. 図11に示す値回復機能付きラッチの回路構成を示す図である。FIG. 12 is a diagram illustrating a circuit configuration of a latch with a value recovery function illustrated in FIG. 11. 本発明のメモリ装置の他の実施例(実施例4)であるキャッシュの概略構成を示すブロック図であり、本実施例4のキャッシュをプロセッサに適用した例を示す図である。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. 11 is a block diagram showing a schematic configuration of a conventional set associative memory.

符号の説明Explanation of reference numerals

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 Address 101, 601, 901, 1201 In-page offset 102, 602 Logical page number lower bit 103, 603 Logical page number upper bit 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 determiner 105,116,117,126,127,136,137,146,152,646,1240 , 1340, 1810, 1811 Latches 120, 121, 620, 621, 920, 921 TLB data storage 122, 123, 622, 623, 625, 925, 1210 Physical page numbers 124, 624 Physical page numbers Selectors 130, 131, 630, 631, 930, 931 Cache tag storage units 132, 133, 632, 633 Cache tags 134, 634 Cache way determiners 140, 141, 640, 641, 940, 941, 1700, 1701 Cache data Storage section 144,644 Data selector 150,1230,1231,1232,1233,1330,1331,1332,1333 Cache prediction way latch 154 Cache way prediction decision unit 160 way decoder 180,980 Memory section 181,981 Way decision section 182 , 982, 1282 Processor 190, 990, 1290, 1390 Address generator 191, 691, 991, 1291 TLB
192, 692, 992, 1292 Cache 193, 993, 1293, 1393 Cache way prediction unit 194, 994, 1294 Cache way prediction determination unit 195, 999, 1295 Data processing unit 401, 1001 Instruction numbers 700, 701, 1420 to 1423 AND operator 705 OR operator 707, 1404, 1405 NOT operator 790 Cache way prediction determination control logic 996 TLB way prediction unit 997 TLB way prediction determination unit 1209, 1228, 1800 Latch with value recovery function 1220, 1221, 1222, 1223 , 1320, 1321, 1322, 1323 Address latch 1224, 1324 Address selector 1226, 1326 Address adder 1234, 1334 Cache prediction way selection Decoders 1242, 1342, 1350, 1490 Decoders 1296, 1396 Address control unit 1360 Write selection signal selector 1362 Write data selector 1364 Write enable signal selector 1710 Cache line 1711 Data 1712 Data address.

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.
前記TLBウェイ予測部は、任意のTLB予測ウェイラッチに記憶された番号値を他のTLB予測ウェイラッチに転送する手段を、さらに具備することを特徴とする請求項2に記載のセットアソシアティブ方式のメモリ装置。   3. The set associative method according to claim 2, wherein the TLB way prediction unit further includes means for transferring a number value stored in an arbitrary TLB prediction way latch to another TLB prediction way latch. Memory device.
JP2004110649A 2004-04-05 2004-04-05 Set associative memory device Expired - Fee Related JP3593123B2 (en)

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)

* Cited by examiner, † Cited by third party
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

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