JP2020030696A - Processor, control method of multi-level cache memory, and control program of multi-level cache memory - Google Patents

Processor, control method of multi-level cache memory, and control program of multi-level cache memory Download PDF

Info

Publication number
JP2020030696A
JP2020030696A JP2018156654A JP2018156654A JP2020030696A JP 2020030696 A JP2020030696 A JP 2020030696A JP 2018156654 A JP2018156654 A JP 2018156654A JP 2018156654 A JP2018156654 A JP 2018156654A JP 2020030696 A JP2020030696 A JP 2020030696A
Authority
JP
Japan
Prior art keywords
cache memory
cache
bus
tier
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2018156654A
Other languages
Japanese (ja)
Other versions
JP7142289B2 (en
Inventor
優也 大森
Yuya Omori
優也 大森
大西 隆之
Takayuki Onishi
隆之 大西
裕江 岩崎
Hiroe Iwasaki
裕江 岩崎
清水 淳
Atsushi Shimizu
淳 清水
隆輔 江川
Ryusuke Egawa
隆輔 江川
雅之 佐藤
Masayuki Sato
雅之 佐藤
小林 広明
Hiroaki Kobayashi
広明 小林
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.)
Tohoku University NUC
Nippon Telegraph and Telephone Corp
Original Assignee
Tohoku University NUC
Nippon Telegraph and Telephone 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 Tohoku University NUC, Nippon Telegraph and Telephone Corp filed Critical Tohoku University NUC
Priority to JP2018156654A priority Critical patent/JP7142289B2/en
Publication of JP2020030696A publication Critical patent/JP2020030696A/en
Application granted granted Critical
Publication of JP7142289B2 publication Critical patent/JP7142289B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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)

Abstract

To provide a processor capable of suppressing electrical power consumption while maintaining or improving application execution performance.SOLUTION: The processor includes: a cache memory having multiple layers; and a determination part that determines whether or not the cache memory in the first layer should be enabled on the basis of the contribution of the cache memory of the first layer, which is calculated on the basis of value based on the power efficiency, a state of the cache memory in the first layer included in the multiple layers, and the state of the cache memory of a second layer different from the first layer included in the multiple layers.SELECTED DRAWING: Figure 1

Description

本発明は、プロセッサ、多階層キャッシュメモリの制御方法、及び多階層キャッシュメモリの制御プログラムに関する。   The present invention relates to a processor, a control method for a multi-level cache memory, and a control program for a multi-level cache memory.

近年のマイクロプロセッサは、プロセッサとメモリとの性能差を埋めるべく、キャッシュメモリと呼ばれる一時記憶装置を有している。キャッシュメモリは、プロセッサのLSI(Large-Scale Integrated circuit;大規模集積回路)の内部に実装される。キャッシュメモリは、メインメモリと比較して高速に動作可能である。そのため、将来再利用されるデータを事前にキャッシュメモリに保持することで、メモリアクセスレイテンシを隠蔽することが可能である。一方で、キャッシュメモリは、メインメモリと比較して容量が小規模である。これに加えて、プロセッサとメモリの性能差は拡大の一途を辿っている。これらのことから、近年のマイクロプロセッサでは、キャッシュメモリを多階層化することにより、大容量化とメモリアクセスレイテンシの隠蔽を図っている。   Recent microprocessors have a temporary storage device called a cache memory in order to bridge the performance difference between the processor and the memory. The cache memory is mounted inside a large-scale integrated circuit (LSI) of the processor. The cache memory can operate faster than the main memory. Therefore, it is possible to conceal memory access latency by holding data to be reused in the cache memory in advance. On the other hand, the cache memory has a smaller capacity than the main memory. In addition, the performance difference between the processor and the memory continues to increase. For these reasons, in recent microprocessors, the cache memory is multi-layered to increase the capacity and conceal the memory access latency.

多階層キャッシュメモリは、プロセッサ内の演算コアとプロセッサ外のメインメモリとの間に配置される。多階層キャッシュメモリは、演算コアに近い方から1次キャッシュメモリ、2次キャッシュメモリ、3次キャッシュメモリと、その階層に応じて次数を増加させる形で構成される。多階層キャッシュメモリは、次数の増加に応じて記憶容量が増加する一方で、次数の増加に応じて読み出しにかかる遅延時間が増加する。   The multi-level cache memory is arranged between an arithmetic core in the processor and a main memory outside the processor. The multi-level cache memory is composed of a primary cache memory, a secondary cache memory, and a tertiary cache memory, starting from the one closer to the operation core, and increasing the order according to the hierarchy. In the multi-level cache memory, while the storage capacity increases as the order increases, the delay time required for reading increases as the order increases.

例えば、3階層のキャッシュメモリにおいてメモリアクセスが発生し、このメモリアクセスが、データを読み出すロード命令であるものとする。
この場合、まず初めに1次キャッシュメモリに対して、演算コアが要求するデータの有無の確認がなされる。演算コアが要求するデータが1次キャッシュメモリに保持されている場合には、1次キャッシュメモリから演算コアへデータが提供される。演算コアが要求するデータが1次キャッシュメモリに保持されていない場合には、次に2次キャッシュメモリに対して確認がなされる。演算コアが要求するデータが2次キャッシュメモリに保持されている場合には、2次キャッシュメモリから演算コアへデータが提供される。演算コアが要求するデータが2次キャッシュメモリにも保持されていない場合には、さらに下層の3次キャッシュメモリに対して確認がなされる。演算コアが要求するデータが3次キャッシュメモリに保持されている場合には、3次キャッシュメモリから演算コアへデータが提供される。これにより、キャッシュメモリは、メモリアクセスレイテンシの隠蔽を段階的に行う。演算コアが要求するデータが3次キャッシュメモリにも保持されていない場合には、メインメモリから演算コアへデータが提供される。
このように、キャッシュメモリにデータが保存されていれば、メインメモリにアクセスすることなく、演算コアに対してデータを提供することが可能になる。これにより、メモリアクセスレイテンシを隠蔽することが可能になる。
For example, it is assumed that a memory access occurs in a three-level cache memory, and this memory access is a load instruction for reading data.
In this case, first, the primary cache memory is checked for the presence or absence of data requested by the operation core. When the data requested by the operation core is held in the primary cache memory, the data is provided from the primary cache memory to the operation core. If the data requested by the arithmetic core is not held in the primary cache memory, then the secondary cache memory is checked. When the data requested by the operation core is held in the secondary cache memory, the data is provided from the secondary cache memory to the operation core. If the data requested by the arithmetic core is not held in the secondary cache memory, a confirmation is made to the tertiary cache memory in a lower layer. When the data requested by the operation core is held in the tertiary cache memory, the data is provided from the tertiary cache memory to the operation core. Thereby, the cache memory performs the concealment of the memory access latency step by step. When the data requested by the operation core is not held in the tertiary cache memory, the data is provided from the main memory to the operation core.
As described above, if data is stored in the cache memory, data can be provided to the arithmetic core without accessing the main memory. This makes it possible to hide the memory access latency.

キャッシュメモリの多階層化が進むことに伴って、記憶容量、読み出しにかかる遅延時間、及び消費電力は、増加する傾向にある。その結果として、マイクロプロセッサにおける消費電力は、キャッシュメモリの消費電力が支配的になりつつある。その一方で、マイクロプロセッサにおいて実行されるアプリケーションは、多岐にわたる様々な特性を有している。多階層キャッシュメモリを活用することによって実行性能を向上させることが可能なアプリケーションがある一方で、計算が支配的であり、かつメモリ利用量が少ないアプリケーション等がある。例えばこのような、計算が支配的であり、かつメモリ利用量が少ないアプリケーション等においては、実行性能の向上に対する多階層キャッシュメモリの貢献は限定的である。この場合、実行性能の向上に貢献しないキャッシュメモリによって電力が無駄に消費されるため、マイクロプロセッサにおける電力効率の低下を招くことになる。   As the number of layers of the cache memory increases, the storage capacity, the delay time required for reading, and the power consumption tend to increase. As a result, the power consumption of the microprocessor is becoming dominant in the power consumption of the cache memory. On the other hand, applications executed in microprocessors have a wide variety of different characteristics. While there are applications that can improve execution performance by utilizing a multi-level cache memory, there are applications where computation is dominant and memory usage is small. For example, in such an application where calculation is dominant and memory usage is small, the contribution of the multi-tier cache memory to the improvement of execution performance is limited. In this case, power is wastefully consumed by the cache memory that does not contribute to the improvement of the execution performance, so that the power efficiency of the microprocessor is reduced.

このように、マイクロプロセッサに搭載されるキャッシュメモリの容量・消費電力が増加の一途を辿っている中で、アプリケーションによっては、キャッシュメモリに対する電力投資に見合うだけの実行性能の向上が得られずに、マイクロプロセッサの電力効率の低下を引き起こしている。これに対し、非特許文献1に記載の技術は、n階層キャッシュメモリにおいて、最大容量を有するn次キャッシュメモリ(最下層のキャッシュメモリ)にデータを書き込まずに、メインメモリに直接データを書き込むバイパス処理を行う。そして、n次キャッシュメモリへの電源供給を停止することによって、マイクロプロセッサの消費電力を削減する。   In this way, as the capacity and power consumption of the cache memory mounted on the microprocessor continues to increase, depending on the application, the execution performance cannot be improved to justify the power investment in the cache memory. , Causing a decrease in the power efficiency of the microprocessor. On the other hand, the technique described in Non-Patent Document 1 discloses a bypass that writes data directly to a main memory without writing data to an n-th order cache memory (a lowermost cache memory) having a maximum capacity in an n-level cache memory. Perform processing. Then, by stopping the power supply to the n-th cache memory, the power consumption of the microprocessor is reduced.

Takumi Takai, Yusuke Tobo, Masayuki Sato, Ryusuke Egawa, Hiroyuki Takizawa and Hiroaki Kobayashi, “A Bypass Mechanism for Way-Adaptable Caches”, Poster11, Proceedings of COOL Chips XV, April 2012.Takumi Takai, Yusuke Tobo, Masayuki Sato, Ryusuke Egawa, Hiroyuki Takizawa and Hiroaki Kobayashi, “A Bypass Mechanism for Way-Adaptable Caches”, Poster11, Proceedings of COOL Chips XV, April 2012.

しかしながら、実行性能を維持又は向上させるために必要なキャッシュメモリの、記憶容量、レイテンシ、及び階層数は、アプリケーションによってそれぞれ異なる。このため、キャッシュメモリの最下層のみに対してバイパス制御及び電力制御を行うだけでは、多様なアプリケーションに対応するための柔軟性が低いという課題がある。さらに、特定のキャッシュメモリをバイパスすることが、実行性能を維持しながら消費電力を抑制することにつながるか否かを事前に判断することが難しいという課題がある。   However, the storage capacity, latency, and number of layers of the cache memory required to maintain or improve the execution performance differ depending on the application. For this reason, there is a problem that simply performing the bypass control and the power control on only the lowermost layer of the cache memory has a low flexibility to cope with various applications. Further, there is a problem that it is difficult to determine in advance whether bypassing a specific cache memory leads to suppression of power consumption while maintaining execution performance.

本発明はこのような状況を鑑みてなされたもので、アプリケーションの実行性能を維持又は向上させつつ、消費電力を抑制することができる技術の提供を目的とする。   The present invention has been made in view of such a situation, and an object of the present invention is to provide a technique capable of suppressing or reducing power consumption while maintaining or improving the execution performance of an application.

本発明の一態様は、複数の階層からなるキャッシュメモリと、任意の命令数あたりのヒット数と、前記複数の階層に含まれる第一の階層のキャッシュメモリの状態と前記複数の階層に含まれる前記第一の階層とは異なる第二の階層のキャッシュメモリの状態とに基づく値と、に基づいて算出される、前記第一の階層のキャッシュメモリの貢献度に基づいて、前記第一の階層のキャッシュメモリを有効化するか否かを判定する判定部と、を備えるプロセッサである。   One embodiment of the present invention includes a cache memory including a plurality of layers, a hit count per an arbitrary number of instructions, a state of a cache memory of a first layer included in the plurality of layers, and a state included in the plurality of layers. A value based on the state of the cache memory of the second tier different from the first tier, and a value calculated based on the contribution of the cache memory of the first tier. And a determination unit that determines whether to validate the cache memory of the first embodiment.

また、本発明の一態様は、上記のプロセッサであって、前記第一の階層のキャッシュメモリの状態と前記第二の階層のキャッシュメモリの状態とに基づく値とは、前記第一の階層のキャッシュメモリのミスペナルティと任意の命令数あたりのヒット数を示す値であり、前記ミスペナルティは、前記第一の階層のキャッシュメモリにおけるヒット時のレイテンシと、ミスした場合に次にアクセスされる前記第二の階層のキャッシュメモリにおけるヒット時のレイテンシと、の差に基づく値である。   One embodiment of the present invention is the above processor, wherein the value based on the state of the cache memory of the first tier and the state of the cache memory of the second tier is the value of the first tier A value indicating the miss penalty of the cache memory and the number of hits per an arbitrary number of instructions, wherein the miss penalty is the latency at the time of hit in the cache memory of the first hierarchy, and the next accessed when a miss occurs. This is a value based on the difference between the latency at the time of hit in the cache memory of the second hierarchy.

また、本発明の一態様は、上記のプロセッサであって、前記貢献度とは、前記任意の命令数あたりのヒット数と、前記ミスペナルティと、を乗じることによって算出される値である。   Further, one embodiment of the present invention is the above processor, wherein the contribution is a value calculated by multiplying the miss count by the number of hits per an arbitrary number of instructions.

また、本発明の一態様は、上記のプロセッサであって、前記複数の階層のキャッシュメモリのうち、前記貢献度が最小となるキャッシュメモリをバイパスさせた場合における消費電力あたりの第一の実行性能と、前記貢献度が最小となるキャッシュメモリをバイパスさせなかった場合における前記消費電力あたりの第二の実行性能と、を算出し、前記第二の実行性能より第一の実行性能のほうがより、性能が高い場合には、前記貢献度が最小となるキャッシュメモリをバイパスさせるバイパス制御部をさらに備える。   One embodiment of the present invention is the above processor, wherein the first execution performance per power consumption in a case where the cache memory with the smallest contribution is bypassed among the cache memories of the plurality of layers. And the second execution performance per power consumption when the cache memory with the smallest contribution is not bypassed, and the first execution performance is more than the second execution performance, When the performance is high, the apparatus further includes a bypass control unit that bypasses the cache memory having the minimum contribution.

また、本発明の一態様は、複数の階層からなるキャッシュメモリを備える多階層キャッシュメモリの制御方法であって、前記複数の階層に含まれる第一の階層のキャッシュメモリの状態と前記複数の階層に含まれる前記第一の階層とは異なる第二の階層のキャッシュメモリの状態とに基づく第一の値を算出する第一算出ステップと、前記第一の値とに基づいて、前記第一の階層のキャッシュメモリの貢献度を算出する第二算出ステップと、前記貢献度に基づいて前記第一の階層のキャッシュメモリを有効化するか否かを判定する判定ステップと、を有する多階層キャッシュメモリの制御方法である。   One embodiment of the present invention is a method for controlling a multi-level cache memory including a cache memory including a plurality of levels, wherein a state of a first-level cache memory included in the plurality of levels and a state of the plurality of levels A first calculation step of calculating a first value based on a state of a cache memory of a second tier different from the first tier included in the first tier, based on the first value, A multi-level cache memory, comprising: a second calculating step of calculating the degree of contribution of a hierarchical cache memory; and a determining step of determining whether to validate the first-level cache memory based on the degree of contribution. Is a control method.

また、本発明の一態様は、上記のプロセッサとしてコンピュータを機能させるための多階層キャッシュメモリの制御プログラム。   Another embodiment of the present invention is a control program for a multi-level cache memory for causing a computer to function as the processor.

本発明によれば、アプリケーションの実行性能を維持又は向上させつつ、消費電力を抑制することができる。   According to the present invention, power consumption can be suppressed while maintaining or improving the execution performance of an application.

本発明の一実施形態に係る多階層キャッシュメモリを搭載したマイクロプロセッサの構成を説明するための図である。FIG. 2 is a diagram for explaining a configuration of a microprocessor equipped with a multi-level cache memory according to one embodiment of the present invention. 本発明の一実施形態に係るマイクロプロセッサが備えるバスセレクタの入出力の構成を説明するための図である。FIG. 4 is a diagram for explaining an input / output configuration of a bus selector provided in the microprocessor according to the embodiment of the present invention. 本発明の一実施形態に係るマイクロプロセッサによる多階層キャッシュメモリへの電力供給制御の構成を説明するための図である。FIG. 3 is a diagram for describing a configuration of power supply control to a multi-level cache memory by a microprocessor according to an embodiment of the present invention. 本発明の一実施形態に係るマイクロプロセッサ100によって実現可能な多階層キャッシュメモリの論理的な構成を示す模式図である。FIG. 2 is a schematic diagram illustrating a logical configuration of a multi-level cache memory that can be realized by a microprocessor 100 according to an embodiment of the present invention. 各階層のキャッシュメモリの構成、階層数、及び各制御信号の値との対応を示す図である。FIG. 3 is a diagram showing a configuration of a cache memory of each hierarchy, the number of hierarchies, and correspondence with values of control signals; 本発明の一実施形態に係るマイクロプロセッサ100に搭載された多階層キャッシュメモリを制御する多階層キャッシュメモリ制御部の構成を示すブロック図である。FIG. 2 is a block diagram illustrating a configuration of a multi-level cache memory control unit that controls a multi-level cache memory mounted on the microprocessor 100 according to an embodiment of the present invention. 本発明の一実施形態に係るマイクロプロセッサによるキャッシュ階層の要否判定処理の流れを示すフローチャートである。5 is a flowchart illustrating a flow of a cache hierarchy necessity determination process by the microprocessor according to the embodiment of the present invention.

<実施形態>
以下、本発明の一実施形態について図面を参照しながら説明する。
以下の説明において、「マイクロプロセッサ」は、単一又は複数の演算コア(以下、「コア」という。)と、n層からなる階層型のキャッシュメモリ(以下、「多階層キャッシュメモリ」という。)と、を搭載しているものとする。また、多階層キャッシュメモリの各階層は、最上層のキャッシュメモリ(1次キャッシュメモリ)から最下層のキャッシュメモリ(n次キャッシュメモリ)へと階層が増加するほど、記憶容量はより大きくなり、アクセス遅延時間はより長くなるものとする。
<Embodiment>
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
In the following description, a “microprocessor” refers to a single or a plurality of operation cores (hereinafter, referred to as “cores”) and a hierarchical cache memory including n layers (hereinafter, referred to as “multi-level cache memory”). And, it is assumed that. Further, as the number of layers in the multi-level cache memory increases from the uppermost level cache memory (primary cache memory) to the lowermost level cache memory (n-order cache memory), the storage capacity increases, and the access level increases. The delay time shall be longer.

[マイクロプロセッサの構成]
以下、多階層キャッシュメモリを搭載したマイクロプロセッサの構成の一例について説明する。
図1は、本発明の一実施形態に係る多階層キャッシュメモリを搭載したマイクロプロセッサの構成を説明するための図である。
以下の説明において、m次キャッシュメモリ(mは1からnまでの整数)を、「Lmキャッシュ」ということがある。
[Microprocessor configuration]
Hereinafter, an example of a configuration of a microprocessor equipped with a multi-level cache memory will be described.
FIG. 1 is a diagram for explaining a configuration of a microprocessor equipped with a multi-level cache memory according to one embodiment of the present invention.
In the following description, an m-th order cache memory (m is an integer from 1 to n) may be referred to as an “Lm cache”.

図1に示すように、マイクロプロセッサ100は、コア101と、L1キャッシュ102と、L2キャッシュ103と、L3キャッシュ104と、L4キャッシュ105と、第0バスセレクタ107と、第1バスセレクタ108と、第2バスセレクタ109と、第3バスセレクタ110と、を含んで構成される。すなわち、マイクロプロセッサ100は、4層からなる多階層キャッシュメモリを搭載したプロセッサである。   As shown in FIG. 1, the microprocessor 100 includes a core 101, an L1 cache 102, an L2 cache 103, an L3 cache 104, an L4 cache 105, a zeroth bus selector 107, a first bus selector 108, The configuration includes a second bus selector 109 and a third bus selector 110. That is, the microprocessor 100 is a processor equipped with a multi-level cache memory having four layers.

また、図1に示すバス111〜118は、データ転送用の広帯域伝送路である。   The buses 111 to 118 shown in FIG. 1 are broadband transmission lines for data transfer.

コア101は、バス111を介して第0バスセレクタ107と接続する。   The core 101 is connected to the 0th bus selector 107 via the bus 111.

L1キャッシュ102は、バス112を介して第0バスセレクタ107と接続し、バス117を介して第1バスセレクタ108と接続する。   The L1 cache 102 connects to the 0th bus selector 107 via the bus 112 and connects to the first bus selector 108 via the bus 117.

L2キャッシュ103は、バス113を介して第0バスセレクタ107と接続し、バス118を介して第1バスセレクタ108と接続し、バス122を介して第2バスセレクタ109と接続する。   The L2 cache 103 connects to the 0th bus selector 107 via the bus 113, connects to the first bus selector 108 via the bus 118, and connects to the second bus selector 109 via the bus 122.

L3キャッシュ104は、バス114を介して第0バスセレクタ107と接続し、バス119を介して第1バスセレクタ108と接続し、バス123を介して第2バスセレクタ109と接続し、バス126を介して第3バスセレクタ110と接続する。   The L3 cache 104 connects to the 0th bus selector 107 via the bus 114, connects to the first bus selector 108 via the bus 119, connects to the second bus selector 109 via the bus 123, and connects the bus 126. It is connected to the third bus selector 110 via the third bus selector 110.

L4キャッシュ105は、バス115を介して第0バスセレクタ107と接続し、バス120を介して第1バスセレクタ108と接続し、バス124を介して第2バスセレクタ109とし、バス127を介して第3バスセレクタ110と接続する。   The L4 cache 105 connects to the 0th bus selector 107 via the bus 115, connects to the first bus selector 108 via the bus 120, forms the second bus selector 109 via the bus 124, and connects via the bus 127 Connect to the third bus selector 110.

メインメモリ106は、バス116を介して第0バスセレクタ107と接続し、バス121を介して第1バスセレクタ108と接続し、バス125を介して第2バスセレクタ109と接続し、バス128を介して第3バスセレクタ110と接続し、バス129を介してL4キャッシュ105と接続する。   The main memory 106 is connected to the 0th bus selector 107 via the bus 116, connected to the first bus selector 108 via the bus 121, connected to the second bus selector 109 via the bus 125, and connected to the bus 128. It is connected to the third bus selector 110 via the bus and to the L4 cache 105 via the bus 129.

第0バスセレクタ107、第1バスセレクタ108、第2バスセレクタ109、及び第3バスセレクタ110は、マルチプレクサから構成されている。   The 0th bus selector 107, the first bus selector 108, the second bus selector 109, and the third bus selector 110 are constituted by multiplexers.

第0バスセレクタ107は、バイパス制御部130から第0バスセレクタ107へ付与される制御信号である制御信号SC_0に基づいて、上層にあるコア101及び多階層キャッシュメモリから転送されてきたデータの出力先を選択、又は下層のキャッシュへ繋がるバスの切断を行う。   The 0th bus selector 107 outputs the data transferred from the upper core 101 and the multi-level cache memory based on a control signal SC_0 which is a control signal given from the bypass control unit 130 to the 0th bus selector 107. Select the destination or disconnect the bus connected to the lower-level cache.

第1バスセレクタ108は、バイパス制御部130から第1バスセレクタ108へ付与される制御信号である制御信号SC_1に基づいて、上層にあるコア101及び多階層キャッシュメモリから転送されてきたデータの出力先を選択、又は下層のキャッシュへ繋がるバスの切断を行う。   The first bus selector 108 outputs the data transferred from the upper core 101 and the multi-level cache memory based on the control signal SC_1 which is a control signal given to the first bus selector 108 from the bypass control unit 130. Select the destination or disconnect the bus connected to the lower-level cache.

第2バスセレクタ109は、バイパス制御部130から第2バスセレクタ109へ付与される制御信号である制御信号SC_2に基づいて、上層にあるコア101及び多階層キャッシュメモリから転送されてきたデータの出力先を選択、又は下層のキャッシュへ繋がるバスの切断を行う。   The second bus selector 109 outputs data transferred from the upper core 101 and the multi-level cache memory based on a control signal SC_2 which is a control signal given to the second bus selector 109 from the bypass control unit 130. Select the destination or disconnect the bus connected to the lower-level cache.

第3バスセレクタ110は、バイパス制御部130から第3バスセレクタ110へ付与される制御信号である制御信号SC_3に基づいて、上層にあるコア101及び多階層キャッシュメモリから転送されてきたデータの出力先を選択、又は下層のキャッシュへ繋がるバスの切断を行う。   The third bus selector 110 outputs data transferred from the upper core 101 and the multi-level cache memory based on a control signal SC_3 which is a control signal given to the third bus selector 110 from the bypass control unit 130. Select the destination or disconnect the bus connected to the lower-level cache.

[バスセレクタの入出力の構成]
以下、バスセレクタの入出力の構成の一例について説明する。
図2は、本発明の一実施形態に係るマイクロプロセッサが備えるバスセレクタの入出力の構成を説明するための図である。
[I / O configuration of bus selector]
Hereinafter, an example of the input / output configuration of the bus selector will be described.
FIG. 2 is a diagram for explaining an input / output configuration of a bus selector included in the microprocessor according to the embodiment of the present invention.

第0バスセレクタ107は、コア101からバス111を介して入力されるデータを入力とする。また、第0バスセレクタ107は、バイパス制御部130が付与する3ビットの制御信号SC_0に基づいて、データの出力先とするバス(バス112〜116のいずれか)を選択する。   The 0th bus selector 107 receives data input from the core 101 via the bus 111 as an input. Further, the 0th bus selector 107 selects a bus (any of the buses 112 to 116) as a data output destination based on the 3-bit control signal SC_0 given by the bypass control unit 130.

例えば、第0バスセレクタ107は、入力された制御信号SC_0が示す値が「000」である場合には、データの出力先として、L1キャッシュ102に接続するバス112を選択する。
また、例えば、第0バスセレクタ107は、入力された制御信号SC_0が示す値が「001」である場合には、データの出力先として、L2キャッシュ103に接続するバス113を選択する。
また、例えば、第0バスセレクタ107は、入力された制御信号SC_0が示す値が「010」である場合には、データの出力先として、L3キャッシュ104に接続するバス114を選択する。
また、例えば、第0バスセレクタ107は、入力された制御信号SC_0が示す値が「011」である場合には、データの出力先として、L4キャッシュ105に接続するバス115を選択する。
また、例えば、第0バスセレクタ107は、入力された制御信号SC_0が示す値が「100」である場合には、データの出力先として、メインメモリ106に接続するバス116を選択する。
なお、例えば、第0バスセレクタ107は、入力された制御信号SC_0が示す値が「101」である場合には、データの出力先を選択せずに下層へのバス接続を切断する。
For example, when the value indicated by the input control signal SC_0 is “000”, the 0th bus selector 107 selects the bus 112 connected to the L1 cache 102 as a data output destination.
Further, for example, when the value indicated by the input control signal SC_0 is “001”, the 0th bus selector 107 selects the bus 113 connected to the L2 cache 103 as a data output destination.
Further, for example, when the value indicated by the input control signal SC_0 is “010”, the 0th bus selector 107 selects the bus 114 connected to the L3 cache 104 as a data output destination.
For example, when the value indicated by the input control signal SC_0 is “011”, the 0th bus selector 107 selects the bus 115 connected to the L4 cache 105 as a data output destination.
For example, when the value indicated by the input control signal SC_0 is “100”, the 0th bus selector 107 selects the bus 116 connected to the main memory 106 as a data output destination.
Note that, for example, when the value indicated by the input control signal SC_0 is “101”, the 0th bus selector 107 disconnects the bus connection to the lower layer without selecting a data output destination.

第1バスセレクタ108は、L1キャッシュ102からバス117を介して入力されるデータを入力とする。また、第1バスセレクタ108は、バイパス制御部130が付与する3ビットの制御信号SC_1に基づいて、データの出力先とするバス(バス118〜121のいずれか)を選択する。   The first bus selector 108 receives data input from the L1 cache 102 via the bus 117 as an input. In addition, the first bus selector 108 selects a bus (any of the buses 118 to 121) as a data output destination based on the 3-bit control signal SC_1 provided by the bypass control unit 130.

例えば、第1バスセレクタ108は、入力された制御信号SC_1が示す値が「000」である場合には、データの出力先として、L2キャッシュ103に接続するバス118を選択する。
また、例えば、第1バスセレクタ108は、入力された制御信号SC_1が示す値が「001」である場合には、データの出力先として、L3キャッシュ104に接続するバス119を選択する。
また、例えば、第1バスセレクタ108は、入力された制御信号SC_1が示す値が「010」である場合には、データの出力先として、L4キャッシュ105に接続するバス120を選択する。
また、例えば、第1バスセレクタ108は、入力された制御信号SC_1が示す値が「011」である場合には、データの出力先として、メインメモリ106に接続するバス121を選択する。
For example, when the value indicated by the input control signal SC_1 is “000”, the first bus selector 108 selects the bus 118 connected to the L2 cache 103 as a data output destination.
Further, for example, when the value indicated by the input control signal SC_1 is “001”, the first bus selector 108 selects the bus 119 connected to the L3 cache 104 as a data output destination.
Further, for example, when the value indicated by the input control signal SC_1 is “010”, the first bus selector 108 selects the bus 120 connected to the L4 cache 105 as a data output destination.
Further, for example, when the value indicated by the input control signal SC_1 is “011”, the first bus selector 108 selects the bus 121 connected to the main memory 106 as a data output destination.

第2バスセレクタ109は、L2キャッシュ103からバス122を介して入力されるデータを入力とする。また、第2バスセレクタ109は、バイパス制御部130が付与する2ビットの制御信号SC_2に基づいて、データの出力先とするバス(バス123〜125のいずれか)を選択する。   The second bus selector 109 receives data input from the L2 cache 103 via the bus 122. Further, the second bus selector 109 selects a bus (one of the buses 123 to 125) as a data output destination based on the 2-bit control signal SC_2 provided by the bypass control unit 130.

例えば、第2バスセレクタ109は、入力された制御信号SC_2が示す値が「00」である場合には、データの出力先として、L3キャッシュ104に接続するバス125を選択する。
また、例えば、第2バスセレクタ109は、入力された制御信号SC_2が示す値が「01」である場合には、データの出力先として、L4キャッシュ105に接続するバス124を選択する。
また、例えば、第2バスセレクタ109は、入力された制御信号SC_2が示す値が「10」である場合には、データの出力先として、メインメモリ106に接続するバス125を選択する。
For example, when the value indicated by the input control signal SC_2 is “00”, the second bus selector 109 selects the bus 125 connected to the L3 cache 104 as a data output destination.
Further, for example, when the value indicated by the input control signal SC_2 is “01”, the second bus selector 109 selects the bus 124 connected to the L4 cache 105 as a data output destination.
Further, for example, when the value indicated by the input control signal SC_2 is “10”, the second bus selector 109 selects the bus 125 connected to the main memory 106 as a data output destination.

第3バスセレクタ110は、L3キャッシュ104からバス126を介して入力されるデータを入力とする。また、第3バスセレクタ110は、バイパス制御部130が付与する2ビットの制御信号SC_3に基づいて、データの出力先とするバス(バス127〜128のいずれか)を選択する。   The third bus selector 110 receives data input from the L3 cache 104 via the bus 126 as input. Further, the third bus selector 110 selects a bus (any of the buses 127 to 128) as a data output destination based on the 2-bit control signal SC_3 given by the bypass control unit 130.

例えば、第3バスセレクタ110は、入力された制御信号SC_3が示す値が「00」である場合には、データの出力先として、L4キャッシュ105に接続するバス127を選択する。
また、例えば、第3バスセレクタ110は、入力された制御信号SC_3が示す値が「01」である場合には、データの出力先として、メインメモリ106に接続するバス128を選択する。
For example, when the value indicated by the input control signal SC_3 is “00”, the third bus selector 110 selects the bus 127 connected to the L4 cache 105 as a data output destination.
Further, for example, when the value indicated by the input control signal SC_3 is “01”, the third bus selector 110 selects the bus 128 connected to the main memory 106 as a data output destination.

[多階層キャッシュメモリへの電力供給制御の構成]
以下、多階層キャッシュメモリへの電力供給制御の構成の一例について説明する。
図3は、本発明の一実施形態に係るマイクロプロセッサによる多階層キャッシュメモリへの電力供給制御の構成を説明するための図である。
[Configuration of power supply control to multi-tier cache memory]
Hereinafter, an example of a configuration of power supply control to the multi-tier cache memory will be described.
FIG. 3 is a diagram for explaining a configuration of power supply control to the multi-level cache memory by the microprocessor according to one embodiment of the present invention.

図3に示すように、電力制御部131は、マイクロプロセッサ100に搭載された多階層キャッシュメモリのうちバイパスされた階層のキャッシュメモリへの電力供給を行うか否かを示す電力制御信号(電力制御信号PC_L1〜PC_L4)を、各階層のキャッシュメモリ(L1キャッシュ102〜L4キャッシュ105)に付与する。   As illustrated in FIG. 3, the power control unit 131 includes a power control signal (power control) indicating whether to supply power to a cache memory of a bypassed hierarchy among multi-tier cache memories mounted on the microprocessor 100. The signals PC_L1 to PC_L4) are provided to the cache memories (L1 cache 102 to L4 cache 105) of each hierarchy.

図3に示すように、L1キャッシュ102、L2キャッシュ103、L3キャッシュ104及びL4キャッシュ105に入力される電力制御信号は、それぞれ、電力制御信号PC_L1、電力制御信号PC_L2、電力制御信号PC_L3及び電力制御信号PC_L4である。これらの電力制御信号(電力制御信号PC_L1〜PC_L4)は、例えば、1ビットのデータである。   As shown in FIG. 3, the power control signals input to the L1 cache 102, L2 cache 103, L3 cache 104, and L4 cache 105 are a power control signal PC_L1, a power control signal PC_L2, a power control signal PC_L3, and a power control signal, respectively. This is the signal PC_L4. These power control signals (power control signals PC_L1 to PC_L4) are, for example, 1-bit data.

キャッシュメモリに入力された電力制御信号の値が「0」である場合、キャッシュメモリへの電力供給が停止され、キャッシュメモリが無効化される。一方、キャッシュメモリに入力された電力制御信号の値が「1」であるならば、キャッシュメモリへの電力供給が行われ、キャッシュメモリが有効化される。なお、電力制御の方法そしては、例えば、パワーゲーティング等を用いた電力管理手法を適用することが考えられる。   When the value of the power control signal input to the cache memory is “0”, power supply to the cache memory is stopped, and the cache memory is invalidated. On the other hand, if the value of the power control signal input to the cache memory is “1”, power is supplied to the cache memory and the cache memory is activated. The power control method and, for example, applying a power management method using power gating or the like can be considered.

ここで、例えば、バイパス制御部130が、L2キャッシュ103をバイパスし、キャッシュ階層を、L1キャッシュ102、L3キャッシュ104及びL4キャッシュ105の3階層に再構成する場合を考える。   Here, for example, a case is considered in which the bypass control unit 130 bypasses the L2 cache 103 and reconfigures the cache hierarchy into three layers of the L1 cache 102, the L3 cache 104, and the L4 cache 105.

この場合、バイパス制御部130は、第0バスセレクタ107に対し、制御信号SC_0の値として「000」を付与する。これにより、第0バスセレクタ107とL1キャッシュ102とを接続するバス112が、データの出力先として選択される。L1キャッシュ102へ入力されたデータは、バス117を介して第1バスセレクタ108に入力される。   In this case, the bypass control unit 130 gives “000” to the 0th bus selector 107 as the value of the control signal SC_0. As a result, the bus 112 connecting the 0th bus selector 107 and the L1 cache 102 is selected as a data output destination. The data input to the L1 cache 102 is input to the first bus selector 108 via the bus 117.

L2キャッシュ103にはデータを書き込まずにバイパスするため、バイパス制御部130は、第1バスセレクタ108に対し、制御信号SC_1の値として「001」を付与する。これにより、第1バスセレクタ108とL3キャッシュ104とを接続するバス119が、データの出力先として選択される。L3キャッシュ104へ入力されたデータは、バス126を介して第3バスセレクタ110に入力される。   In order to bypass the L2 cache 103 without writing data, the bypass control unit 130 gives “001” to the first bus selector 108 as the value of the control signal SC_1. As a result, the bus 119 connecting the first bus selector 108 and the L3 cache 104 is selected as a data output destination. The data input to the L3 cache 104 is input to the third bus selector 110 via the bus 126.

このとき、バス122を経由するバスは不要となるため、バイパス制御部130は、第2バスセレクタ109に対し、制御信号SC_2の値として「11」を付与する。これにより、バス123、バス124及びバス125への接続が切断される。   At this time, since the bus via the bus 122 is unnecessary, the bypass control unit 130 gives the second bus selector 109 “11” as the value of the control signal SC_2. As a result, the connection to the bus 123, the bus 124, and the bus 125 is disconnected.

バイパス制御部130は、第3バスセレクタ110に対し、制御信号SC_3の値として「001」を付与する。これにより、第3バスセレクタ110とL4キャッシュ105とを接続するバス127が、データの出力先として出力先として選択される。L4キャッシュ105へ入力されたデータは、バス129を介してメインメモリ106に入力される。   The bypass control unit 130 gives “001” to the third bus selector 110 as the value of the control signal SC_3. As a result, the bus 127 connecting the third bus selector 110 and the L4 cache 105 is selected as an output destination of data. The data input to the L4 cache 105 is input to the main memory 106 via the bus 129.

次に、図3に示した電力制御部131は、L2キャッシュ103に対して、L2キャッシュ103への電力供給を行わないこと示す(すなわち、値が「0」である)電力制御信号PC_L2を付与する。これにより、バイパスされたL2キャッシュ103のデータアレイに対する電力供給が遮断され、L2キャッシュ103が無効化される。   Next, the power control unit 131 illustrated in FIG. 3 gives the L2 cache 103 a power control signal PC_L2 indicating that power is not supplied to the L2 cache 103 (that is, the value is “0”). I do. As a result, the power supply to the data array of the bypassed L2 cache 103 is cut off, and the L2 cache 103 is invalidated.

以上説明したように、本発明の一実施形態によるマイクロプロセッサは、搭載している多階層キャッシュメモリのバスセレクタ(第0バスセレクタ107〜第3バスセレクタ110)を制御することによって、各階層のキャッシュメモリ同士の間の接続及び切断を制御することができる。これにより、各階層のキャッシュメモリ同士の間、各階層のキャッシュメモリとメインメモリ106との間、及び、各階層のキャッシュメモリとコア101との間の接続及び切断を任意に行うことが可能になり、キャッシュメモリの構成を柔軟に変更すること可能になる。   As described above, the microprocessor according to the embodiment of the present invention controls the bus selectors (the 0th bus selector 107 to the third bus selector 110) of the mounted multi-level cache memory, and thereby, Connection and disconnection between cache memories can be controlled. This makes it possible to arbitrarily connect and disconnect between the cache memories of each layer, between the cache memory of each layer and the main memory 106, and between the cache memory of each layer and the core 101. Thus, the configuration of the cache memory can be flexibly changed.

[多階層キャッシュメモリの構成例]
以下、上記説明したマイクロプロセッサ100の4階層からなる多階層キャッシュメモリによって実現しうる論理的な構成の一例について説明する。
図4は、本発明の一実施形態に係るマイクロプロセッサ100によって実現可能な多階層キャッシュメモリの論理的な構成を示す模式図である。
[Configuration example of multi-level cache memory]
Hereinafter, an example of a logical configuration that can be realized by the multi-level cache memory including the four levels of the microprocessor 100 described above will be described.
FIG. 4 is a schematic diagram showing a logical configuration of a multi-level cache memory that can be realized by the microprocessor 100 according to one embodiment of the present invention.

図4は、4階層からなる多階層キャッシュメモリによって実現しうる、(1)から(16)までの全16通りの論理的な構成を示している。なお、図4における「L1S」〜「L4S」の表記は、それぞれ上述した「L1キャッシュ」〜「L4キャッシュ」のキャッシュ階層を示す。   FIG. 4 shows a total of 16 logical configurations (1) to (16) that can be realized by a multi-level cache memory having four levels. Note that the notations “L1S” to “L4S” in FIG. 4 indicate the cache layers of the above “L1 cache” to “L4 cache”, respectively.

また、図4において、網掛けがなされたキャッシュ階層は、バイパスされることによってデータが書き込まれることのない、電源供給が遮断されたキャッシュ階層を表している。一方、網掛けがなされていないキャッシュ階層は、バイパスされることなく活性化しているキャッシュ階層を表している。各階層のキャッシュメモリが、それぞれバイパスされるか否かの2通りの状態をとりうることから、上述した4階層からなる多階層キャッシュメモリは、全2通り(すなわち、16通り)の論理的な構成を実現することができる。 In FIG. 4, a shaded cache hierarchy indicates a cache hierarchy in which data is not written due to bypass and power supply is cut off. On the other hand, an unshaded cache hierarchy indicates a cache hierarchy that is activated without being bypassed. Since the cache memory of each hierarchy can take two states: whether each is bypassed, multi-level cache memory composed of four layers described above, the logical total 2 4 types (i.e., 16 combinations) A simple configuration can be realized.

図5は、各階層のキャッシュメモリの構成、階層数、及び各制御信号の値との対応を示す図である。図5に示すテーブルは、多階層キャッシュメモリの論理的な構成を、図4に示した(1)から(16)までの構成にした場合における、活性化されたキャッシュ階層の階層数、及び、(1)から(16)までの構成にするための制御信号(制御信号SC_00〜SC_03)の値を表している。   FIG. 5 is a diagram showing the configuration of the cache memory of each layer, the number of layers, and the correspondence with the value of each control signal. The table shown in FIG. 5 shows the number of activated cache hierarchies when the logical configuration of the multi-tier cache memory is changed from (1) to (16) shown in FIG. It shows the values of the control signals (control signals SC_00 to SC_03) for the configuration from (1) to (16).

図4及び図5に示すように、例えば、多階層キャッシュメモリの論理的な構成を(1)の構成とした場合(すなわち、キャッシュメモリのバイパスを行わない場合)、活性化されたキャッシュ階層の階層数は「4」である。また、多階層キャッシュメモリの論理的な構成を(1)の構成とするためには、制御信号SC_00の値を「000」とし、制御信号SC_01の値を「000」とし、制御信号SC_02の値を「00」とし、及び、制御信号SC_03の値を「000」とすればよい。   As shown in FIGS. 4 and 5, for example, when the logical configuration of the multi-level cache memory is configured as (1) (that is, when the cache memory is not bypassed), The number of layers is “4”. In order to set the logical configuration of the multi-level cache memory to the configuration (1), the value of the control signal SC_00 is set to “000”, the value of the control signal SC_01 is set to “000”, and the value of the control signal SC_02 is set. Is set to “00” and the value of the control signal SC_03 is set to “000”.

また、例えば、多階層キャッシュメモリの論理的な構成を(2)の構成とした場合(すなわち、L2キャッシュのみをバイパスする場合)、活性化されたキャッシュ階層の階層数は「3」である。また、多階層キャッシュメモリの論理的な構成を(1)の構成とするためには、制御信号SC_00の値を「000」とし、制御信号SC_01の値を「001」とし、制御信号SC_02の値を「00」とし、及び、制御信号SC_03の値を「000」とすればよい。   Further, for example, when the logical configuration of the multi-tier cache memory is the configuration (2) (that is, when only the L2 cache is bypassed), the number of activated cache layers is “3”. In order to set the logical configuration of the multi-level cache memory to the configuration (1), the value of the control signal SC_00 is set to “000”, the value of the control signal SC_01 is set to “001”, and the value of the control signal SC_02 is set. Is set to “00” and the value of the control signal SC_03 is set to “000”.

以上説明したように、マイクロプロセッサ100は、コア101、各キャッシュ階層(L1キャッシュ102〜L4キャッシュ105)、及びメインメモリ106の間をバスによって接続可能な構成であり、マイクロプロセッサ100が実行するアプリケーションに応じてそれぞれのバスの接続状態を制御することができる。   As described above, the microprocessor 100 has a configuration in which the core 101, each of the cache layers (the L1 cache 102 to the L4 cache 105), and the main memory 106 can be connected by the bus. , The connection state of each bus can be controlled.

これにより、マイクロプロセッサ100は、任意のキャッシュ階層へのデータの書き込みを回避させる(任意のキャッシュ階層をバイパスさせる)ことができ、バイパスさせたキャッシュ階層よりも上層の階層(キャッシュ階層又はコア101)と、バイパスさせたキャッシュ階層よりも下層にある全ての階層(キャッシュ階層又はメインメモリ106)と、を接続させることができる。   This allows the microprocessor 100 to avoid writing data to any cache hierarchy (bypassing any cache hierarchy), and a hierarchy (cache hierarchy or core 101) higher than the bypassed cache hierarchy. Can be connected to all the hierarchies (cache hierarchies or main memory 106) below the bypassed cache hierarchies.

これにより、多階層キャッシュメモリがn階層である場合には、全2通りの論理的な構成をとることが可能となる。以上説明したマイクロプロセッサ100によれば、マイクロプロセッサ100が実行するアプリケーション(及びデータアクセスパターン)に応じて適切な構成となるように、多階層キャッシュメモリの論理的な構成を柔軟に変化させることができる。 As a result, when the multi-level cache memory has n levels, it is possible to adopt a total of 2n logical configurations. According to the microprocessor 100 described above, the logical configuration of the multi-tier cache memory can be flexibly changed so that the configuration becomes appropriate according to the application (and data access pattern) executed by the microprocessor 100. it can.

ここで、アプリケーションに応じて適切な構成とは、マイクロプロセッサ100による処理の実行性能を維持又は向上させつつ、消費電力を抑制させる構成である。そのため、アプリケーションに応じて適切な構成を選択するためには、実行性能を示す指標と消費電力とを評価する必要がある。   Here, an appropriate configuration according to the application is a configuration that suppresses power consumption while maintaining or improving the performance of processing by the microprocessor 100. Therefore, in order to select an appropriate configuration according to an application, it is necessary to evaluate an index indicating execution performance and power consumption.

ここでは、実行性能を示す指標として、各キャッシュ階層がどれだけメモリアクセスレイテンシを隠蔽できるかを表すHLPKI(Hidden access Latency Per Kilo-Instruction)を用いる。マイクロプロセッサ100は、HLPKIに基づいて、m階層からなる多階層キャッシュメモリの各キャッシュ階層の要否判定(バイパスさせるか否かの判定)を行う。これにより、アプリケーションの実行性能を最大化させつつ、消費電力を抑制することができる、多階層キャッシュメモリの構成を決定する。   Here, HLPKI (Hidden Access Latency Per Kilo-Instruction) indicating how much each cache hierarchy can hide memory access latency is used as an index indicating execution performance. The microprocessor 100 determines, based on the HLPKI, whether or not each cache layer of the multi-level cache memory having m layers is required (determination of whether or not to bypass). Thus, the configuration of the multi-tier cache memory that can suppress the power consumption while maximizing the execution performance of the application is determined.

第n階層のキャッシュメモリ(n次キャッシュメモリ)におけるHLPKIを示すHLPKInは、以下の式(1)によって導出される。   HLPKIn indicating HLPKI in the cache memory of the n-th hierarchy (n-th order cache memory) is derived by the following equation (1).

HLPKIn=HPKIn×MPn ・・・(1)       HLPKIn = HPKIn × MPn (1)

HLPKInは、n次キャッシュメモリが1000命令あたりに隠蔽可能なメモリアクセスレイテンシを表す。ここで、nは、1から始まる正の整数であり、キャッシュ階層数mを最大値とする。   HLPKIn represents a memory access latency that the n-th cache memory can hide per 1000 instructions. Here, n is a positive integer starting from 1, and the number m of cache layers is the maximum value.

式(1)のHPKInは、n次キャッシュメモリにおける、1000命令あたりのヒット数である。ここで、ヒット数とはヒットした数であり、ヒットとは、ある階層のキャッシュメモリにアクセスした際に、当該キャッシュにデータが存在し、当該キャッシュから当該データを供給することを示す。一方、当該キャッシュメモリにデータが存在せず、一つ下のキャッシュ階層又はメインメモリ106へアクセスする事象を、ミスと呼ぶものとする。   HPKIn in equation (1) is the number of hits per 1000 instructions in the n-th cache memory. Here, the number of hits is the number of hits, and the hit indicates that when a cache memory of a certain hierarchy is accessed, data exists in the cache and the data is supplied from the cache. On the other hand, an event in which no data exists in the cache memory and the next lower cache hierarchy or the main memory 106 is accessed is called a miss.

HPKInの値が十分に大きい場合、n次キャッシュメモリへアクセスされる頻度及びヒット率の双方が高い。そのため、n次キャッシュメモリを使用することで、(n+1)次のキャッシュメモリ又はメインメモリ106へのアクセスレイテンシが隠蔽され、アプリケーションの実行時間の短縮が期待できる。したがって、HPKInの値が十分に大きい場合、n次キャッシュメモリを使用する(バイパスしない)と判断することができる。   When the value of HPKIn is sufficiently large, both the frequency of accessing the n-th cache memory and the hit rate are high. Therefore, by using the n-th order cache memory, the access latency to the (n + 1) -th order cache memory or the main memory 106 is hidden, and the execution time of the application can be expected to be shortened. Therefore, when the value of HPKIn is sufficiently large, it can be determined that the n-th cache memory is used (not bypassed).

一方、HPKInの値が小さい場合、n次キャッシュメモリへのアクセス数が少ないこと、又は、n次キャッシュメモリへのアクセス数は少なくないがヒット率が低いこと、のいずれかが考えられる。どちらの場合であっても、n次キャッシュメモリを使用しても、下層である(n+1)次キャッシュメモリへのアクセス数は減少しにくい。したがって、HPKInの値が小さい場合、n次キャッシュメモリを使用しない(バイパスする)と判断することができる。   On the other hand, when the value of HPKIn is small, either the number of accesses to the n-order cache memory is small, or the number of accesses to the n-order cache memory is not small but the hit rate is low is considered. In either case, the number of accesses to the (n + 1) -th order cache memory, which is the lower layer, does not easily decrease even if the n-th order cache memory is used. Therefore, when the value of HPKIn is small, it can be determined that the n-th cache memory is not used (bypassed).

このように、HPKInは、プロセッサとメモリとから構成されるコンピュータシステムにおいて、n次キャッシュメモリを有効化又は無効化することによる実行性能の性能予測の指標の一つとして活用することができる。   As described above, HPKIn can be used as one of the indexes of performance prediction of execution performance by enabling or disabling the n-order cache memory in a computer system including a processor and a memory.

また、式(1)のMPnは、n次キャッシュメモリのミスペナルティを示す。MPnは、n次キャッシュメモリにおけるヒット時のレイテンシと、ミスした場合に次にアクセスされる、(n+1)次キャッシュメモリ又はメインメモリ106におけるヒット時のレイテンシと、の差により求められる。   MPn in the equation (1) indicates the miss penalty of the n-th cache memory. MPn is determined by the difference between the latency at the time of a hit in the n-th cache memory and the latency at the time of a hit in the (n + 1) -th cache memory or main memory 106, which is accessed next when a miss occurs.

ミスペナルティが大きい場合、n次キャッシュメモリが一回のヒット時において隠蔽可能なアクセスレイテンシは大きい。そのため、HPKInが低い場合であっても、当該キャッシュ階層によりアクセスレイテンシが十分に隠蔽可能な場合は、システムの実行性能が向上する。一方、ミスペナルティが小さい場合、一回のヒットがシステムの実行性能に与える影響は限定的であるため、HPKInが高い場合であっても、当該キャッシュ階層の実行性能向上への貢献度は低い。   When the miss penalty is large, the access latency that can be concealed by the n-th cache memory in one hit is large. Therefore, even when HPKIn is low, the execution performance of the system is improved when the access latency can be sufficiently hidden by the cache hierarchy. On the other hand, when the miss penalty is small, the effect of a single hit on the execution performance of the system is limited. Therefore, even when HPKIn is high, the contribution to the improvement of the execution performance of the cache hierarchy is low.

以上のことから、HPKInとミスペナルティとの二つの指標を乗じることによって、システムの実行性能の向上に対する貢献度が低いキャッシュ階層を識別することが可能になる。   From the above, it is possible to identify a cache tier having a low contribution to the improvement of the execution performance of the system by multiplying the two indexes of HPKIn and miss penalty.

[多階層キャッシュメモリ制御部の構成]
以下、多階層キャッシュメモリを制御する多階層キャッシュメモリ制御部の構成について説明する。
図6は、本発明の一実施形態に係るマイクロプロセッサ100に搭載された多階層キャッシュメモリを制御する多階層キャッシュメモリ制御部の構成を示すブロック図である。
[Configuration of Multi-Level Cache Memory Control Unit]
Hereinafter, the configuration of the multi-level cache memory control unit that controls the multi-level cache memory will be described.
FIG. 6 is a block diagram illustrating a configuration of a multi-level cache memory control unit that controls a multi-level cache memory mounted on the microprocessor 100 according to an embodiment of the present invention.

上記において、図1を参照しながら説明した各キャッシュ階層は、図6に示す多階層キャッシュメモリ制御部300を備える。
図6に示すように、多階層キャッシュメモリ制御部300は、ヒット・カウンタ301と、命令数カウンタ302と、ミスペナルティテーブル303と、HPKI(Hit Per Kilo-Instruction)導出部304と、HLPKI導出部305と、キャッシュメモリ部309と、を含んで構成される。また、キャッシュメモリ部309は、データアレイ312を含んで構成される。
In the above, each cache hierarchy described with reference to FIG. 1 includes the multi-tier cache memory control unit 300 shown in FIG.
As shown in FIG. 6, the multi-level cache memory control unit 300 includes a hit counter 301, an instruction counter 302, a miss penalty table 303, an HPKI (Hit Per Kilo-Instruction) deriving unit 304, and an HLPKI deriving unit. 305 and a cache memory unit 309. The cache memory unit 309 includes a data array 312.

マイクロプロセッサ100において命令が実行される度に、コア101と各キャッシュ階層を結ぶ制御線を介して、実行命令数が各キャッシュ階層に転送される。多階層キャッシュメモリ制御部300の命令数カウンタ302は、実行命令数を記録する。   Each time an instruction is executed in the microprocessor 100, the number of executed instructions is transferred to each cache hierarchy via a control line connecting the core 101 and each cache hierarchy. The instruction number counter 302 of the multi-tier cache memory control unit 300 records the number of executed instructions.

また、コア101において、メモリアクセス命令(メモリからデータを読み出すロード命令)が実行される。メモリアクセス命令が求めるデータが当該キャッシュ階層に保存されている場合には、ヒット・カウンタ301は記録しているヒット数の値を一つ増加させる。   In the core 101, a memory access instruction (a load instruction for reading data from a memory) is executed. If the data requested by the memory access instruction is stored in the cache hierarchy, the hit counter 301 increases the value of the recorded hit number by one.

命令数カウンタ302が保持する値が1000に達した場合、ヒット・カウンタ301からHPKI導出部304へ、1000命令あたりのヒット数であるHPKInの値を示す情報が転送される。HPKInの値を示す情報は、HPKI導出部304において保持される。このとき、命令数カウンタ302が保持する実行命令数を示す値は、0にリセットされる。   When the value held by the instruction counter 302 reaches 1000, information indicating the value of HPKIn, which is the number of hits per 1000 instructions, is transferred from the hit counter 301 to the HPKI deriving unit 304. Information indicating the value of HPKIn is held in the HPKI deriving unit 304. At this time, the value indicating the number of executed instructions held by the instruction number counter 302 is reset to zero.

ミスペナルティテーブル303には、各キャッシュ階層におけるミスペナルティ(MPn)が保存されている。1000命令毎に、HLPKI導出部305は、HPKI導出部304から入力されたHPKInの値と、ミスペナルティテーブル303が保持しているMPnの値と、を乗じることによってHLPKInの値を導出する。   The miss penalty table 303 stores miss penalties (MPn) in each cache hierarchy. For every 1000 instructions, the HLPKI derivation unit 305 derives the value of HLPKIn by multiplying the value of HPKIn input from the HPKI derivation unit 304 by the value of MPn held in the miss penalty table 303.

その後、全キャッシュ階層のHLPKInの値を示す情報が、コア101及びバイパス制御部130へ送信される。コア101とバイパス制御部130とにおいて、HLPKIの値が最小となるキャッシュ階層をバイパスするか否かの判定が行われる。   After that, information indicating the value of HLPKIn of all cache hierarchies is transmitted to the core 101 and the bypass control unit 130. The core 101 and the bypass control unit 130 determine whether or not to bypass the cache tier in which the value of HLPKI is minimum.

HLPKIの値が最小となるキャッシュ階層をバイパスし、当該キャッシュ階層に対してデータの書き込みを行わないと判定された場合、バイパス制御部130は、当該キャッシュ階層より上層のキャッシュ階層と、当該キャッシュ階層より下層のキャッシュ階層又はメインメモリ106と、の間の接続を、バスセレクタ(第0バスセレクタ107、第1バスセレクタ108、第2バスセレクタ109、及び第3バスセレクタ110)を制御することによって切断する。これにより、バイパス制御部130は、当該キャッシュ階層がバイパスされ、上層のキャッシュ階層と、下層のキャッシュ階層又はメインメモリ106と、を接続する。   When it is determined that the cache tier in which the value of HLPKI is the minimum is bypassed and data is not written to the cache tier, the bypass control unit 130 determines the cache tier above the cache tier and the cache tier. The connection with the lower cache hierarchy or the main memory 106 is established by controlling the bus selectors (the 0th bus selector 107, the first bus selector 108, the second bus selector 109, and the third bus selector 110). Disconnect. Thereby, the bypass control unit 130 bypasses the cache hierarchy and connects the upper cache hierarchy to the lower cache hierarchy or the main memory 106.

この後、電力制御部131は、バイパスされたキャッシュ階層のキャッシュメモリ部309への電力供給を遮断する。そして、電力制御スイッチ313に対して、電力制御信号PC_Ln(nはキャッシュ階層の次数)の値として「0」が付与され、キャッシュメモリ部309のデータアレイ312へのデータ供給が遮断される。   Thereafter, the power control unit 131 shuts off power supply to the cache memory unit 309 of the bypassed cache hierarchy. Then, “0” is given to the power control switch 313 as the value of the power control signal PC_Ln (n is the order of the cache hierarchy), and the data supply to the data array 312 of the cache memory unit 309 is cut off.

[キャッシュ階層の要否判定処理]
以下、各キャッシュ階層の要否を判定する判定処理について説明する。
図7は、本発明の一実施形態に係るマイクロプロセッサによるキャッシュ階層の要否判定処理の流れを示すフローチャートである。以下に示す要否判定処理は、コア101及びバイパス制御部130によって行われる。
[Cache hierarchy necessity determination process]
Hereinafter, a description will be given of a determination process of determining whether each cache hierarchy is necessary.
FIG. 7 is a flowchart showing the flow of a cache hierarchy necessity determination process by the microprocessor according to the embodiment of the present invention. The necessity determination processing described below is performed by the core 101 and the bypass control unit 130.

マイクロプロセッサ100によってアプリケーションが実行されると、HPKI導出部304は、HPKIの値を算出する(ステップS101)。なお、上述したように、HPKIとは、ここでは、1000命令あたりのヒット数のことである。   When the application is executed by the microprocessor 100, the HPKI deriving unit 304 calculates a value of HPKI (step S101). Note that, as described above, the HPKI here refers to the number of hits per 1000 instructions.

次に、HLPKI導出部305は、各キャッシュ階層のHLPKIの値を算出する(ステップS102)。なお、上述したように、HLPKIとは、ここでは、判定対象のキャッシュ階層のHPKIとミスペナルティとを乗じた値である。   Next, the HLPKI deriving unit 305 calculates an HLPKI value of each cache hierarchy (Step S102). Note that, as described above, the HLPKI is a value obtained by multiplying the HPKI of the cache hierarchy to be determined by the miss penalty.

次に、バイパス制御部130は、全てのキャッシュ階層のHLPKIの値を集約し、最小のHLPKIの値を有するキャッシュ階層を特定し、選択する(ステップS103)。   Next, the bypass control unit 130 aggregates the HLPKI values of all the cache tiers, specifies and selects the cache tier having the minimum HLPKI value (Step S103).

次に、コア101は、ステップS103において特定された最小のHLPKIの値を有するキャッシュ階層をバイパスして無効化させた場合における、マイクロプロセッサ100のエネルギー効率(エネルギーあたりの実行性能)を評価する。   Next, the core 101 evaluates the energy efficiency (execution performance per energy) of the microprocessor 100 when the cache hierarchy having the minimum value of HLPKI specified in step S103 is bypassed and invalidated.

エネルギー効率が向上すると評価された場合(ステップS104・Yes)、HLPKIの値が最小となる当該キャッシュ階層をバイパスして無効化させ、電力供給を遮断する(ステップS105)。そして、エネルギー効率が低下するキャッシュ構成が決定するまで上記の処理(ステップS101〜ステップS104)を繰り返す。   When it is evaluated that the energy efficiency is improved (Yes in step S104), the cache tier in which the value of HLPKI is minimum is bypassed and invalidated, and the power supply is cut off (step S105). Then, the above-described processing (steps S101 to S104) is repeated until a cache configuration at which the energy efficiency decreases is determined.

一方、エネルギー効率が低下すると評価された場合(ステップS104・No)、バイパスを行わず、以上の処理によって得られたキャッシュメモリの構成を最終的な構成として決定する。
以上で、図7に示すフローチャートの処理が終了する。
On the other hand, when it is evaluated that the energy efficiency is reduced (No in step S104), the configuration of the cache memory obtained by the above processing is determined as the final configuration without performing the bypass.
Thus, the processing of the flowchart illustrated in FIG. 7 ends.

なお、キャッシュメモリの構成を決定するためには、エネルギーあたりの実行性能を求める必要があるが、実行性能の指標として、1サイクルあたりの実行命令数を表すIPC(Instructions Per Cycle)を用いることができる。また、IPCの測定手段として、プログラムの事前実行によるプロファイリング、又は、近年のマイクロプロセッサが具備するハードウェアカウンタを用いることができる。また、消費エネルギーは、マイクロプロセッサが有するハードウェアカウンタ及び電力モニタリングツールと、プログラムの実行時間と、基づいて測定することができる。   In order to determine the configuration of the cache memory, it is necessary to determine the execution performance per energy. However, as an index of the execution performance, it is necessary to use IPC (Instructions Per Cycle) representing the number of instructions executed per cycle. it can. As the IPC measuring means, profiling by pre-execution of a program or a hardware counter included in a recent microprocessor can be used. The energy consumption can be measured based on a hardware counter and a power monitoring tool included in the microprocessor, and a program execution time.

なお、アプリケーションを事前に実行して図7に示した処理を行うことによってアプリケーションに適したキャッシュ構成を選択した後に静的に処理を行うことができるだけでなく、マイクロプロセッサ100のコア101において上記の実行性能及び消費エネルギーの解析を動的に実行させる構成にすることも可能である。   Note that by executing the application in advance and performing the processing illustrated in FIG. 7, it is not only possible to statically perform the processing after selecting a cache configuration suitable for the application, but also to perform the above processing in the core 101 of the microprocessor 100. It is also possible to adopt a configuration in which analysis of execution performance and energy consumption is dynamically executed.

なお、上述した実施形態においては、HLPKInは、第n層のキャッシュメモリが1000命令あたりに隠蔽可能なメモリアクセスレイテンシを表すものとし、HPKInは、第n層のキャッシュメモリにおける1000命令あたりのヒット数であるものとしたが、これに限られるものではない。すなわち、上述した実施形態においては、各キャッシュ階層を用いるか否かを判定する基準を1000命令程度しているが、これに限られるものではない。所定の回数内でのキャッシュ階層間における貢献度に基づいて、階層毎に、各キャッシュ階層を使用するか否かを判定する構成であればよく、所定の回数は必ずしも1000回ではなくてもよい。   In the above-described embodiment, HLPKIn indicates the memory access latency that the n-th layer cache memory can hide per 1000 instructions, and HPKIn indicates the number of hits per 1000 instructions in the n-th layer cache memory. However, the present invention is not limited to this. That is, in the above-described embodiment, the criterion for determining whether to use each cache hierarchy is about 1000 instructions, but the present invention is not limited to this. The configuration may be such that it is determined whether or not to use each cache tier for each tier based on the contribution between cache tiers within a predetermined number of times. The predetermined number of times may not necessarily be 1000 times. .

以上説明したように、本発明の一実施形態による多階層キャッシュメモリの制御方法によれば、キャッシュ階層ごとに、IPCと電力とに基づいて、使用するキャッシュメモリ及びバイパスするキャッシュメモリが決定される。これにより、使用するキャッシュ階層を、アプリケーションごとに適応的に制御することができ、マイクロプロセッサ100に搭載される多階層キャッシュメモリの構造を、アプリケーションに応じて再構成できるようになる。以上の構成により、本発明の一実施形態による多階層キャッシュメモリの制御方法によれば、アプリケーションの実行性能を維持又は向上させつつ、マイクロプロセッサ100の消費電力を抑制することができ、マイクロプロセッサ100の電力効率を向上させることができる。   As described above, according to the control method of the multi-level cache memory according to the embodiment of the present invention, the cache memory to be used and the cache memory to be bypassed are determined for each cache level based on the IPC and the power. . As a result, the cache hierarchy to be used can be adaptively controlled for each application, and the structure of the multi-tier cache memory mounted on the microprocessor 100 can be reconfigured according to the application. With the above configuration, according to the method for controlling the multi-level cache memory according to the embodiment of the present invention, it is possible to suppress or reduce the power consumption of the microprocessor 100 while maintaining or improving the execution performance of the application. Power efficiency can be improved.

なお、本発明の一実施形態による多階層キャッシュメモリの制御方法は、異種のアーキテクチャを有するコアが統合されたようなマルチコアプロセッサ(ヘテロジニアスマルチコア)に対しても、効率的な適用が可能である。ヘテロジニアスマルチコアにおいては、上位キャッシュは特定のコアが占有し、下位キャッシュのみを複数コアが共有する場合がある。   The method for controlling a multi-level cache memory according to an embodiment of the present invention can be efficiently applied to a multi-core processor (heterogeneous multi-core) in which cores having different architectures are integrated. . In a heterogeneous multi-core, the upper cache may be occupied by a specific core, and only the lower cache may be shared by a plurality of cores.

例えば、動画像符号化用プロセッサの場合、画像上で必要な範囲のピクセルデータを広い範囲でL2キャッシュに転送しておき、動き探索処理用コアがさらに限定された範囲のピクセルデータを共有L2キャッシュから占有L1−1キャッシュに転送し、動き補償用コアが限定された範囲のピクセルデータを共有L2キャッシュから占有L1−2キャッシュに転送し、特定色判定用コアが限定範囲のピクセルデータを共有L2キャッシュから占有L1−3キャッシュに転送する、という場合が考えられる。   For example, in the case of a moving picture encoding processor, a necessary range of pixel data on an image is transferred to the L2 cache in a wide range, and the motion search processing core transmits a further limited range of pixel data to the shared L2 cache. To the occupied L1-1 cache, the motion compensation core transfers the limited range of pixel data from the shared L2 cache to the occupied L1-2 cache, and the specific color determination core transfers the limited range of pixel data to the shared L2 cache. It is conceivable that the data is transferred from the cache to the exclusive L1-3 cache.

このような場合、上位キャッシュは最大でコアの個数だけ存在する。そのため、各キャッシュ階層のバイパスによって実現される構造は、通常のシングルコア等に比べて、さらに多くの場合分けが考えられる。また、それぞれの上位キャッシュはヒット率についても大きなばらつきが存在することがありうる。そのため、本制御方法によりキャッシュ階層を適応的に制御することは、消費電力の大きな削減につながる。   In such a case, the upper cache exists by the number of cores at the maximum. For this reason, the structure realized by bypassing each cache hierarchy can be divided into more cases than a normal single core or the like. In addition, there may be a large variation in the hit ratio between the respective upper caches. Therefore, adaptively controlling the cache hierarchy by the present control method leads to a large reduction in power consumption.

なお、動画像には様々な画像サイズ及びフレームレートがありうるため、動画像処理用プロセッサが必要とする単位時間あたりバンド幅及びレイテンシは、動画によって大きく異なる。本制御方法を、例えば、動画像処理用プロセッサに適用する場合、入力される各動画像に応じて、プロセッサが必要とする性能を実現するための最小限のキャッシュ階層を有効化する。そして、その他のキャッシュ階層を無効化及びバイパスすることによって、本制御方法は、動画像処理性能を維持しつつ消費電力を抑制することができる。   Since moving images can have various image sizes and frame rates, the bandwidth per unit time and the latency required by the moving image processor greatly differ depending on the moving image. When the present control method is applied to, for example, a moving image processing processor, a minimum cache hierarchy for realizing the performance required by the processor is enabled in accordance with each input moving image. Then, by invalidating and bypassing the other cache layers, the present control method can suppress power consumption while maintaining moving image processing performance.

上述した実施形態における多階層キャッシュメモリ制御部300の一部又は全部をコンピュータで実現するようにしてもよい。その場合、この機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することによって実現してもよい。なお、ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間の間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含んでもよい。また上記プログラムは、前述した機能の一部を実現するためのものであってもよく、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであってもよく、FPGA(Field Programmable Gate Array)等のプログラマブルロジックデバイスを用いて実現されるものであってもよい。   A part or all of the multi-level cache memory control unit 300 in the above-described embodiment may be realized by a computer. In that case, a program for realizing this function may be recorded on a computer-readable recording medium, and the program recorded on this recording medium may be read and executed by a computer system. Here, the “computer system” includes an OS and hardware such as peripheral devices. The “computer-readable recording medium” refers to a portable medium such as a flexible disk, a magneto-optical disk, a ROM, and a CD-ROM, and a storage device such as a hard disk built in a computer system. Further, a "computer-readable recording medium" refers to a communication line for transmitting a program via a network such as the Internet or a communication line such as a telephone line, and dynamically holds the program for a short time. Such a program may include a program that holds a program for a certain period of time, such as a volatile memory in a computer system serving as a server or a client in that case. The program may be for realizing a part of the functions described above, or may be a program that can realize the functions described above in combination with a program already recorded in a computer system. It may be realized using a programmable logic device such as an FPGA (Field Programmable Gate Array).

以上、この発明の実施形態について図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計等も含まれる。   As described above, the embodiments of the present invention have been described in detail with reference to the drawings. However, the specific configuration is not limited to the embodiments and includes a design and the like within a range not departing from the gist of the present invention.

100…マイクロプロセッサ、101…コア、102…L1キャッシュ、103…L2キャッシュ、104…L3キャッシュ、105…L4キャッシュ、106…メインメモリ、107…第0バスセレクタ、108…第1バスセレクタ、109…第2バスセレクタ、110…第3バスセレクタ、111〜129…バス、130…バイパス制御部、131…電力制御部、300…多階層キャッシュメモリ制御部、301…ヒット・カウンタ、302…命令数カウンタ、303…ミスペナルティテーブル、304…HPKI導出部、305…HLPKI導出部、309…キャッシュメモリ部、312…データアレイ、313…電力制御スイッチ 100 microprocessor, 101 core, 102 L1 cache, 103 L2 cache, 104 L3 cache, 105 L4 cache, 106 main memory, 107 bus selector 0, 108 bus selector 109, 109 Second bus selector 110, third bus selector 110-129 bus 130, bypass controller 131 power controller 300 multi-level cache memory controller 301 hit counter 302 instruction number counter , 303: Mispenalty table, 304: HPKI deriving unit, 305: HLPKI deriving unit, 309: Cache memory unit, 312: Data array, 313: Power control switch

Claims (6)

複数の階層からなるキャッシュメモリと、
任意の命令数あたりのヒット数と、前記複数の階層に含まれる第一の階層のキャッシュメモリの状態と前記複数の階層に含まれる前記第一の階層とは異なる第二の階層のキャッシュメモリの状態とに基づく値と、に基づいて算出される、前記第一の階層のキャッシュメモリの貢献度に基づいて、電力効率が向上するように、前記第一の階層のキャッシュメモリを有効化するか否かを判定する判定部と、
を備えるプロセッサ。
A cache memory comprising a plurality of layers,
The number of hits per arbitrary number of instructions, the state of the cache memory of the first layer included in the plurality of layers, and the cache memory of the second layer different from the first layer included in the plurality of layers. Whether to enable the cache memory of the first tier so as to improve power efficiency based on the contribution of the cache memory of the first tier calculated based on the value based on the state and A determination unit for determining whether or not
A processor comprising:
前記第一の階層のキャッシュメモリの状態と前記第二の階層のキャッシュメモリの状態とに基づく値とは、前記第一の階層のキャッシュメモリのミスペナルティを示す値であり、前記ミスペナルティは、前記第一の階層のキャッシュメモリにおけるヒット時のレイテンシと、ミスした場合に次にアクセスされる前記第二の階層のキャッシュメモリにおけるヒット時のレイテンシと、の差に基づく値である
請求項1に記載のプロセッサ。
The value based on the state of the cache memory of the first tier and the state of the cache memory of the second tier is a value indicating a miss penalty of the cache memory of the first tier, and the miss penalty is: The value based on a difference between the latency at the time of a hit in the cache memory of the first hierarchy and the latency at the time of a hit in the cache memory of the second hierarchy which is accessed next when a miss occurs. Processor as described.
前記貢献度とは、前記ヒット数と、前記ミスペナルティと、を乗じることによって算出される値である
請求項2に記載のプロセッサ。
The processor according to claim 2, wherein the contribution degree is a value calculated by multiplying the number of hits and the miss penalty.
前記複数の階層のキャッシュメモリのうち、前記貢献度が最小となるキャッシュメモリをバイパスさせた場合における消費電力あたりの第一の実行性能と、前記貢献度が最小となるキャッシュメモリをバイパスさせなかった場合における前記消費電力あたりの第二の実行性能と、を算出し、前記第二の実行性能より第一の実行性能のほうがより、性能が高い場合には、前記貢献度が最小となるキャッシュメモリをバイパスさせるバイパス制御部
をさらに備える請求項3に記載のプロセッサ。
Among the cache memories of the plurality of hierarchies, the first execution performance per power consumption when the cache memory with the smallest contribution is bypassed, and the cache memory with the smallest contribution was not bypassed. And the second execution performance per power consumption in the case, and the first execution performance is higher than the second execution performance. The processor according to claim 3, further comprising: a bypass control unit configured to bypass the control signal.
複数の階層からなるキャッシュメモリを備える多階層キャッシュメモリの制御方法であって、
前記複数の階層に含まれる第一の階層のキャッシュメモリの状態と前記複数の階層に含まれる前記第一の階層とは異なる第二の階層のキャッシュメモリの状態とに基づく第一の値を算出する第一算出ステップと、
任意の命令数あたりのヒット数と前記第一の値とに基づいて、前記第一の階層のキャッシュメモリの貢献度を算出する第二算出ステップと、
前記貢献度に基づいて前記第一の階層のキャッシュメモリを有効化するか否かを判定する判定ステップと、
を有する多階層キャッシュメモリの制御方法。
A method for controlling a multi-level cache memory including a cache memory including a plurality of levels,
Calculating a first value based on a state of a cache memory of a first layer included in the plurality of layers and a state of a cache memory of a second layer different from the first layer included in the plurality of layers A first calculating step of
Based on the number of hits per arbitrary number of instructions and the first value, a second calculation step of calculating the contribution of the cache memory of the first tier,
A determining step of determining whether to validate the cache memory of the first tier based on the contribution degree;
A method for controlling a multi-level cache memory having:
請求項1から請求項4のうちいずれか一項に記載のプロセッサとしてコンピュータを機能させるための多階層キャッシュメモリの制御プログラム。   A control program for a multi-level cache memory for causing a computer to function as the processor according to any one of claims 1 to 4.
JP2018156654A 2018-08-23 2018-08-23 Processor, Multi-Hierarchical Cache Memory Control Method, and Multi-Hierarchical Cache Memory Control Program Active JP7142289B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018156654A JP7142289B2 (en) 2018-08-23 2018-08-23 Processor, Multi-Hierarchical Cache Memory Control Method, and Multi-Hierarchical Cache Memory Control Program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018156654A JP7142289B2 (en) 2018-08-23 2018-08-23 Processor, Multi-Hierarchical Cache Memory Control Method, and Multi-Hierarchical Cache Memory Control Program

Publications (2)

Publication Number Publication Date
JP2020030696A true JP2020030696A (en) 2020-02-27
JP7142289B2 JP7142289B2 (en) 2022-09-27

Family

ID=69624344

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018156654A Active JP7142289B2 (en) 2018-08-23 2018-08-23 Processor, Multi-Hierarchical Cache Memory Control Method, and Multi-Hierarchical Cache Memory Control Program

Country Status (1)

Country Link
JP (1) JP7142289B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008234320A (en) * 2007-03-20 2008-10-02 Fujitsu Ltd Cache control circuit
US20080270758A1 (en) * 2007-04-27 2008-10-30 Arm Limited Multiple thread instruction fetch from different cache levels
JP2013521559A (en) * 2010-03-03 2013-06-10 エーティーアイ・テクノロジーズ・ユーエルシー Cache with reload function after power recovery
JP2017021399A (en) * 2015-07-07 2017-01-26 ルネサスエレクトロニクス株式会社 Semiconductor device and cache memory control method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008234320A (en) * 2007-03-20 2008-10-02 Fujitsu Ltd Cache control circuit
US20080270758A1 (en) * 2007-04-27 2008-10-30 Arm Limited Multiple thread instruction fetch from different cache levels
JP2013521559A (en) * 2010-03-03 2013-06-10 エーティーアイ・テクノロジーズ・ユーエルシー Cache with reload function after power recovery
JP2017021399A (en) * 2015-07-07 2017-01-26 ルネサスエレクトロニクス株式会社 Semiconductor device and cache memory control method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
渡部 功 ほか: "モード切換えオーバヘッドを低減させた可変レベルキャッシュの提案と評価", 情報処理学会論文誌 論文誌トランザクション, vol. 第5巻 第4号, JPN6021049599, 15 October 2012 (2012-10-15), JP, pages 48 - 60, ISSN: 0004661541 *
渡部 功 ほか: "三段階対応の可変レベルキャッシュのマルチスレッドアプリケーションを用いた評価", 情報処理学会研究報告, JPN6021049602, 15 October 2012 (2012-10-15), JP, pages 1 - 8, ISSN: 0004661542 *

Also Published As

Publication number Publication date
JP7142289B2 (en) 2022-09-27

Similar Documents

Publication Publication Date Title
US10795844B2 (en) Multicore bus architecture with non-blocking high performance transaction credit system
Starke et al. The cache and memory subsystems of the IBM POWER8 processor
US8230179B2 (en) Administering non-cacheable memory load instructions
US8589629B2 (en) Method for way allocation and way locking in a cache
US9274591B2 (en) General purpose processing unit with low power digital signal processing (DSP) mode
US9208094B2 (en) Managing and sharing storage cache resources in a cluster environment
US10169087B2 (en) Technique for preserving memory affinity in a non-uniform memory access data processing system
JP5090047B2 (en) Method, computer program, caching system and processor for managing replacement of sets in a locked cache
US8392659B2 (en) Extending cache capacity on multiple-core processor systems
US11803505B2 (en) Multicore bus architecture with wire reduction and physical congestion minimization via shared transaction channels
US20100146209A1 (en) Method and apparatus for combining independent data caches
CN107810491B (en) Method and system for managing and controlling memory cache
US9355035B2 (en) Dynamic write priority based on virtual write queue high water mark for set associative cache using cache cleaner when modified sets exceed threshold
US20070239940A1 (en) Adaptive prefetching
CN103649932B (en) The scattered distribution of resource and for supporting by the interconnection structure of multiple engine execute instruction sequences
EP3407184A2 (en) Near memory computing architecture
CN104050110A (en) Method and system of LOCAL BYPASS FOR IN MEMORY COMPUTING
KR20230041593A (en) Scalable address decoding scheme for cxl type-2 devices with programmable interleave granularity
US7882309B2 (en) Method and apparatus for handling excess data during memory access
JP2020030696A (en) Processor, control method of multi-level cache memory, and control program of multi-level cache memory
US10691606B2 (en) Apparatus and method for supporting multiple cache features
CN115705300A (en) Method for cache memory and related product

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20180823

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20201102

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20211126

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20211214

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220204

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220621

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220817

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: 20220830

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220901

R150 Certificate of patent or registration of utility model

Ref document number: 7142289

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150