JP6088951B2 - Cache memory system and processor system - Google Patents
Cache memory system and processor system Download PDFInfo
- Publication number
- JP6088951B2 JP6088951B2 JP2013196128A JP2013196128A JP6088951B2 JP 6088951 B2 JP6088951 B2 JP 6088951B2 JP 2013196128 A JP2013196128 A JP 2013196128A JP 2013196128 A JP2013196128 A JP 2013196128A JP 6088951 B2 JP6088951 B2 JP 6088951B2
- Authority
- JP
- Japan
- Prior art keywords
- cache memory
- cache
- stored
- read request
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0806—Multiuser, multiprocessor or multiprocessing cache systems
- G06F12/0811—Multiuser, multiprocessor or multiprocessing cache systems with multilevel cache hierarchies
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0893—Caches characterised by their organisation or structure
- G06F12/0897—Caches characterised by their organisation or structure with two or more cache hierarchy levels
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/10—Address translation
- G06F12/1009—Address translation using page tables, e.g. page table structures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/10—Providing a specific technical effect
- G06F2212/1016—Performance improvement
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/28—Using a specific disk cache architecture
- G06F2212/283—Plural cache memories
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/65—Details of virtual memory and virtual address translation
Description
本発明の実施形態は、不揮発性メモリを用いたキャッシュメモリシステムおよびプロセッサシステムに関する。 Embodiments described herein relate generally to a cache memory system and a processor system using a nonvolatile memory.
キャッシュメモリは、メインメモリよりもアクセス速度が高速であり、プロセッサの処理能力に直接的な影響を与えることから、キャッシュメモリの大容量化は今後も進むと見込まれている。 Since the cache memory has a higher access speed than the main memory and directly affects the processing capability of the processor, the increase in the capacity of the cache memory is expected to continue.
キャッシュメモリが大容量になると、キャッシュメモリ内のデータを管理するタグ情報も膨大になり、プロセッサが読み出し要求を行ったデータがキャッシュメモリ内にあるか否かの判定処理に時間がかかってしまう。この判定処理に時間がかかると、メインメモリへのアクセスにも時間がかかり、プロセッサの処理能力の低下につながる。 When the capacity of the cache memory becomes large, the tag information for managing the data in the cache memory also becomes enormous, and it takes time to determine whether or not the data requested by the processor is in the cache memory. If this determination process takes time, access to the main memory also takes time, leading to a decrease in the processing capacity of the processor.
本発明が解決しようとする課題は、大容量のキャッシュメモリに対するアクセス効率を向上可能なキャッシュメモリシステムおよびプロセッサシステムを提供することである。 The problem to be solved by the present invention is to provide a cache memory system and a processor system capable of improving access efficiency to a large-capacity cache memory.
本実施形態では、k次(k=1からnまでのすべての整数、nは1以上の整数)のキャッシュメモリと、
前記k次のキャッシュメモリよりもメモリ容量が大きく、かつメインメモリよりも高速アクセスが可能な不揮発性メモリを用いた大容量キャッシュメモリと、
プロセッサが発行する仮想アドレスから物理アドレスへのアドレス変換情報と、前記k次のキャッシュメモリのアクセス単位であるキャッシュラインよりもデータ量の多いページ単位で前記大容量キャッシュメモリにデータが格納されているか否かを記録するフラグ情報と、を格納するトランスレーション・ルックアサイド・バッファと、を備えるキャッシュメモリシステムが提供される。
In the present embodiment, a kth-order cache memory (all integers from k = 1 to n, where n is an integer equal to or greater than 1),
A large-capacity cache memory using a non-volatile memory having a memory capacity larger than that of the kth-order cache memory and capable of being accessed at a higher speed than the main memory;
Whether the data is stored in the large-capacity cache memory in units of pages with a larger amount of data than the address conversion information from the virtual address to the physical address issued by the processor and the cache line that is the access unit of the k-th cache memory A cache memory system is provided that includes flag information for recording whether or not, and a translation lookaside buffer for storing the flag information.
以下、図面を参照しながら、本発明の実施形態を説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
(第1の実施形態)
図1は本発明の第1の実施形態に係るプロセッサシステム1の概略構成を示す図である。図1のプロセッサシステム1は、プロセッサ(CPU)2と、トランスレーション・ルックアサイド・バッファ(TLB:Translation Lookaside Buffer)3と、1次キャッシュメモリ(L1キャッシュ)4と、2次キャッシュメモリ(L2キャッシュ)5と、大容量キャッシュメモリ(ページマッピングキャッシュ)6と、メインメモリ7とを備えている。
(First embodiment)
FIG. 1 is a diagram showing a schematic configuration of a
メインメモリ7以外のプロセッサ2、TLB3、L1キャッシュ4、L2キャッシュ5、およびページマッピングキャッシュ6は例えば一つのチップ8に集積される。また、TLB3、L1キャッシュ4、L2キャッシュ5、およびページマッピングキャッシュ6はメモリシステム9に対応する。
The
L1キャッシュ4とL2キャッシュ5は、メインメモリ7よりも高速アクセスが可能な半導体メモリ(例えば、SRAM)で構成されている。ページマッピングキャッシュ6は、メインメモリ7よりも高速アクセスが可能で、かつL1キャッシュ4とL2キャッシュ5よりもメモリ容量が大きい不揮発性メモリ(例えば、MRAM)で構成されている。本明細書では、ページマッピングキャッシュ6を、低消費電力のスピン注入磁化反転型MRAM(STT−MRAM)で構成する例を説明する。
The
TLB3は、CPU2が発行する仮想アドレスから物理アドレスへのアドレス変換情報と、k(k=1からnまでのすべての整数、nは1以上の整数)次のキャッシュメモリのアクセス単位であるキャッシュラインよりもデータ量の多いページ単位でページマッピングキャッシュ6にデータが格納されているか否かを記録するフラグ情報と、を格納する。本実施形態によるTLB3は、L1キャッシュ4とL2キャッシュ5に優先してCPU2によりアクセスされるため、高速のメモリ(例えばSRAM)で構成されている。
The
メインメモリ7は、メモリシステム9内のどのメモリよりもメモリ容量が大きいことから、チップ8の外部、もしくはパッケージ積層化技術を用いて、例えばDRAMで構成されている。
Since the
図2は第1の実施形態におけるTLB3、各キャッシュメモリ4〜6およびメインメモリ7のアクセス優先度を示す図である。図示のように、CPU2は、TLB3、L1キャッシュ4、L2キャッシュ5、ページマッピングキャッシュ6およびメインメモリ7の順にアクセスする。アクセス頻度の高いメモリ内のデータはアクセス頻度の低いメモリにも格納される。すなわち、L1キャッシュ4内のデータはL2キャッシュ5にも格納され、L2キャッシュ5内のデータはページマッピングキャッシュ6にも格納され、ページマッピングキャッシュ6内のデータはメインメモリ7にも格納される。このように、各メモリ4〜7は階層関係を維持しており、これらのメモリにアクセスするためのアドレス変換情報等をTLB3が保持する。
FIG. 2 is a diagram showing access priorities of the
図2は、CPU2をMOSトランジスタを組み合わせたフリップフロップ(F/F)等で構成し、TLB3、L1キャッシュ4およびL2キャッシュ5をSRAMで構成し、ページマッピングキャッシュ6をSTT−MRAMで構成し、メインメモリ7をDRAMで構成する例を示している。
In FIG. 2, the
図3は第1の実施形態におけるTLB3の内部構成を示す図である。図3のTLB3は、ページ単位で、Valid情報、Dirty情報、仮想アドレス情報(VPN:Virtual Page Number)、物理アドレス情報(PPN:Physical Page Number)、フラグ情報(Flag)と、キャッシュアドレス情報(CPN:Cache Page Number)とを格納している。
FIG. 3 is a diagram showing an internal configuration of the
CPU2が読み出し要求をするアドレスは仮想アドレスであり、この仮想アドレスは、図3に示すように、仮想アドレス情報VPNとページオフセットとを含んでいる。TLB3は、CPU2からの仮想アドレスを物理アドレスに変換する。変換した物理アドレスは、図3に示すように、物理アドレス情報PPNとページオフセットとを含んでいる。物理アドレス中のページオフセットは、CPU2が要求した仮想アドレス中のページオフセットと同じである。
The address from which the
TLB3には、図3に示すようにキャッシュアドレス情報が格納されており、TLB3は、このキャッシュアドレス情報を利用して、ページマッピングキャッシュ6をアクセスする。このキャッシュアドレス情報は、図3に示すように、キャッシュページ番号CPNとページオフセットとを有する。キャッシュアドレス中のページオフセットは、CPU2が要求した仮想アドレス中のページオフセットと同じである。
As shown in FIG. 3, cache address information is stored in the
図3に示すように、TLB3の内部にキャッシュアドレス情報が含まれていれば、そのキャッシュアドレス情報にてページマッピングキャッシュ6にアクセスできるため、アクセス効率がよくなるが、ページマッピングキャッシュ6のメモリ容量(ページエントリ数)が大きくなるほど、TLB3に格納すべきキャッシュアドレス情報が増えてしまい、TLB3が大容量化して検索にも時間がかかってしまう。よって、ページマッピングキャッシュ6のメモリ容量が大きい場合には、TLB3からキャッシュアドレス情報を削除して、TLB3の情報量の削減を図ってもよい。ただし、この場合、TLB3の物理アドレスを用いてページマッピングキャッシュ6にアクセスしなければならないため、TLB3にキャッシュアドレス情報が含まれる場合よりも、アクセスに時間がかかってしまう。
As shown in FIG. 3, if the cache address information is included in the
CPU2が実行するオペ-レーティングシステム(OS)のタスク(プロセス)が切り替わると、TLB3の情報を書き換える(フラッシュする)必要がある。これは、タスクごとに、仮想アドレスと物理アドレスとの対応関係が異なっており、同じ仮想アドレスであっても、物理アドレスが異なるためである。このため、タスクが切り替わると、TLB3のすべてのページエントリを無効化する必要が生じる。TLB3のサイズが小さい場合は大した問題ではないが、TLB3のサイズが大きい場合は、TLB3の更新に時間がかかるために、CPU2の処理遅延が生じてしまう。このような処理遅延を解消するために、各タスクの仮想空間を識別するアドレス空間ID(ASID)を設けて、予めTLB3に、アドレス空間IDごとにページ情報を格納しておけば、タスクが切り替わるごとにTLB3をフラッシュする必要がなくなる。
When the task (process) of the operating system (OS) executed by the
また、ページマッピングキャッシュ6の容量が増大すると、TLB3のエントリ数も増えるため、TLB3の検索遅延が生じてしまう。そこで、TLB3のエントリ数が多い場合は、TLB3を複数の階層構造にしたり、仮想アドレス情報VPNの一部のビット(例えば下位側10ビット)をインデックスにしたセットアソシアティブ構成にして、TLB3の検索遅延を削減するのが望ましい。
Further, when the capacity of the
図4はセットアソシアティブ構成のTLB3の内部構成を示す図である。図4のTLB3は、仮想アドレス情報VPNの一部のビットをインデックスにして、複数のウェイを有する。セットアソシアティブのインデックスとして用いる仮想アドレス情報VPNの一部のビット(例えば下位側10ビット)は、同一セット内では重複しているが、仮想アドレス情報VPNの残りのビットはウェイ毎に異なる。そのためTLB3が出力する物理アドレス情報PPNはそれぞれ異なっている。
FIG. 4 is a diagram illustrating an internal configuration of the
図4のTLB3では、CPU2が読み出し要求をした仮想アドレスの一部によりTLB3内のセットを選択し、仮想アドレスの残りの部分が選択したセット内の各ウェイが保持している仮想アドレス情報VPNと一致する場合には、対応する物理アドレス情報PPNを出力する。
In the
図5は第1の実施形態によるCPU2が読み出し要求アドレスを発行する場合の処理手順を示すフローチャートである。まず、CPU2が発行した読み出し要求アドレスがTLB3内の仮想アドレス情報VPNにヒットするか否かを判定する(ステップS1)。ヒットしなければ、メインメモリ7内の不図示のページテーブルエントリ(PTE)からアドレス変換情報をロードして、TLB3内の情報を更新する(ステップS2)。これらステップS1,S2の処理は第1処理に対応する。
FIG. 5 is a flowchart showing a processing procedure when the
ステップS1でヒットしたと判定された場合、あるいはステップS2の処理が終了した場合、CPU2が発行した読み出し要求アドレスがL1キャッシュ4内のタグ情報にヒットするか否かを判定する(ステップS3)。ヒットすれば、L1キャッシュ4に格納されている対応データを読み出してCPU2に転送し、図5の処理を終了する(ステップS4)。なお、L1キャッシュ4のインデックスがページ内のアドレスで構成されている場合には、第1処理と同時に投機的にL1キャッシュ4のタグメモリにアクセスすることも可能であるが、ヒットしたかどうかの判定は、第1処理終了後でなければならない。
If it is determined in step S1 that a hit has occurred, or if the processing in step S2 is completed, it is determined whether or not the read request address issued by the
ステップS3でヒットしなかったと判定されると、CPU2が発行した読み出し要求アドレスがL2キャッシュ5内のタグ情報にヒットするか否かを判定する(ステップS5)。ヒットすれば、L2キャッシュ5に格納されているデータを読み出してCPU2に転送し、図5の処理を終了する(ステップS6)。これらステップS3〜S6の処理は第2処理に対応する。
If it is determined in step S3 that there is no hit, it is determined whether or not the read request address issued by the
ステップS5でヒットしなかったと判定されると、CPU2が発行した読み出し要求アドレスに対応するデータがページマッピングキャッシュ6に格納されているか否かをTLB3が保持するフラグ情報に基づいて判定する(ステップS7)。格納されている場合は、このアドレスに対応するページ分のデータをページマッピングキャッシュ6から読み出してCPU2に転送するとともに、このアドレスに対応するキャッシュライン分のデータをL1キャッシュ4とL2キャッシュ5に転送する(ステップS8)。これらステップS7およびS8の処理は第3処理に対応する。
If it is determined in step S5 that no hit has occurred, it is determined based on the flag information held in the
ステップS7で格納されていないと判定されると、CPU2が発行した読み出し要求アドレスに対応するデータをメインメモリ7から読み出してCPU2に転送するとともに、このアドレスに対応するページ分のデータをページマッピングキャッシュ6に転送し、かつこのアドレスに対応するキャッシュライン分のデータをL1キャッシュ4とL2キャッシュ5に転送し、かつTLB3を更新する(ステップS9)。このステップS9の処理は第4処理に対応する。
If it is determined in step S7 that the data is not stored, the data corresponding to the read request address issued by the
このように、第1の実施形態では、L1キャッシュ4やL2キャッシュ5よりも大容量で、かつメインメモリ7よりも高速アクセスが可能なページマッピングキャッシュ6を設けて、このページマッピングキャッシュ6のタグ情報を既存のTLB3にページ単位で格納する。タグ情報をページ単位でTLB3に格納することで、L1キャッシュ4やL2キャッシュ5のようにキャッシュライン単位でタグ情報を格納するよりも情報量を削減でき、ページマッピングキャッシュ6に専用のタグメモリを設ける必要がなくなる。すなわち、本実施形態によれば、大容量かつ高速のページマッピングキャッシュ6のタグ情報を既存のTLB3に格納できる。
As described above, in the first embodiment, the
また、本実施形態では、ページマッピングキャッシュ6よりも優先してL1キャッシュ4とL2キャッシュ5にアクセスするため、L1キャッシュ4とL2キャッシュ5に迅速にアクセスできる。さらに、L1キャッシュ4とL2キャッシュ5に入りきれないデータを大容量かつ高速のページマッピングキャッシュ6に格納するため、メインメモリ7にアクセスするよりも高速にデータの読み書きを行える。
In this embodiment, since the
また、本実施形態では、TLB3の内部に、ページマッピングキャッシュ6用のキャッシュアドレス情報を有するため、L2キャッシュ5にヒットしなかったときに、このキャッシュアドレス情報を用いて、ページマッピングキャッシュ6から迅速に所望のデータを読み出すことができる。
In the present embodiment, since the
(第2の実施形態)
以下に説明する第2の実施形態は、L2キャッシュ5とページマッピングキャッシュ6へのアクセスを並列化するものである。
(Second Embodiment)
In the second embodiment described below, access to the
本実施形態は、ページマッピングキャッシュ6のアクセスレイテンシがL2キャッシュ5に匹敵するほど高速である場合、あるいはページマッピングキャッシュ6のメモリ容量がL2キャッシュ5のメモリ容量の数倍から数十倍の場合に特に有効である。
In the present embodiment, when the access latency of the
ページマッピングキャッシュ6とL2キャッシュ5は、それぞれ異なる物理アドレスのデータを格納する。すなわち、ページマッピングキャッシュ6とL2キャッシュ5は、互いに排他的にデータを格納する。
The
本実施形態のページマッピングキャッシュ6は、ページ全体に渡ってアクセスが頻繁に発生するデータを格納する。これに対して、L2キャッシュ5は、ページ内のある特定のラインだけアクセスが頻発する場合にこのラインのデータを格納する。
The
このように、本実施形態では、一つのページ内で、ページマッピングキャッシュ6とL2キャッシュ5のどちらにデータを格納するかを動的に切り替える。
As described above, in this embodiment, in one page, the
図6は第2の実施形態に係るプロセッサシステム1の概略構成を示すブロック図である。図6のプロセッサシステム1は、CPU2によりL2キャッシュ5とページマッピングキャッシュ6が並列的にアクセスされることが図1と異なっている。
FIG. 6 is a block diagram showing a schematic configuration of the
図7は第2の実施形態におけるTLB3、各キャッシュメモリ4〜6およびメインメモリ7のアクセス優先度を示す図である。図示のように、CPU2は、TLB3とL1キャッシュ4の順にアクセスし、L1キャッシュ4の後はL2キャッシュ5とページマッピングキャッシュ6に並列にアクセスし、その後メインメモリ7にアクセスする。
FIG. 7 is a diagram showing access priorities of the
図8は第2の実施形態におけるTLB3の内部構成を示す図である。図8のTLB3は、図3のTLB3の構成に加えて、ページ単位でアクセスマップを有する。アクセスマップは、例えば各ページごとに、ページ内のすべてのライン分のビットを有する。L2キャッシュ5にデータが格納されると、対応するラインのビットが例えば1に設定される。そして、アクセスマップ内の1ページ分の全ビットのうち、1になったビットの数が予め定めた閾値を超えた場合には、そのページについては、ページマッピングキャッシュ6に格納することにし、L2キャッシュ5内の対応データは無効化する。
FIG. 8 is a diagram showing an internal configuration of the
図8のTLB3は、図2のTLB3と同様に、ページマッピングキャッシュ6にアクセスするためのキャッシュアドレス情報を有するが、このキャッシュアドレス情報は必ずしも必須ではない。また、ページマッピングキャッシュ6のエントリ数が多い場合には、TLB3をセットアソシアティブ構成にしてもよい。また、データがL2キャッシュ5に格納されているときはキャッシュアドレス情報が不要で、反対に、データがページマッピングキャッシュ6に格納されている時は、アクセスマップは不要となるので、TLB3内のアクセスアップ用のビットとキャッシュアドレス情報用のビットを共有することができ、TLB3の容量を節約することができる。
The
図9は第2の実施形態によるCPU2が読み出し要求アドレスを発行する場合の処理手順を示すフローチャートである。ステップS11〜S14は図5のステップS1〜S4と同様である。ステップS13でL1キャッシュ4にヒットしなかったと判定されると、読み出し要求アドレスに対応するデータがページマッピングキャッシュ6に格納されているか否かをTLB3が保持するフラグ情報に基づいて判定する(ステップS15)。格納されている場合は、このアドレスに対応するページ分のデータをページマッピングキャッシュ6から読み出してCPU2に転送するとともに、このアドレスに対応するキャッシュライン分のデータをL1キャッシュ4に転送する(ステップS16)。ステップS11,S12の処理は第1処理に対応する。ステップS13,S14の処理は第2処理に対応する。ステップS15,S16の処理は第3処理に対応する。
FIG. 9 is a flowchart showing a processing procedure when the
ステップS15で格納されていないと判定されると、CPU2が発行した読み出し要求アドレスがL2キャッシュ5内のタグ情報にヒットするか否かを判定する(ステップS17)。ヒットすれば、L2キャッシュ5に格納されているデータを読み出してCPU2に転送する(ステップS18)。ステップS17,S18の処理は第4処理に対応する。なお、ステップS15は、ステップS11でTLB3にアクセスした時点であらかじめ必要な情報をTLB3から読み出しているため、ページマッピングキャッシュ6を持たないメモリシステムと比べて、L2キャッシュ5にアクセスするタイミングが遅延することはない。
If it is determined that it is not stored in step S15, it is determined whether or not the read request address issued by the
ステップS17でヒットしなかったと判定されると、CPU2が発行した読み出し要求アドレスに対応するデータをメインメモリ7から読み出してCPU2に転送するとともに、このアドレスに対応するページ分のデータをページマッピングキャッシュ6に転送し、かつこのアドレスに対応するキャッシュライン分のデータをL1キャッシュ4とL2キャッシュ5に転送する(ステップS19)。ステップS19の処理は第5処理に対応する。
If it is determined in step S17 that there is no hit, the data corresponding to the read request address issued by the
次に、TLB3内のアクセスマップの対応ページをチェックする(ステップS20)。すなわち、メインメモリ7から読み出したデータをL2キャッシュ5に書き込んで、TLB3内のアクセスマップを更新した場合に、アクセスマップ内の対応ページのビットが1になった数が閾値を超えるか否かをチェックする(ステップS20、S21)。
Next, the corresponding page of the access map in the
閾値を超えると判定された場合は、対応ページ内の全ラインのデータをL2キャッシュ5とメインメモリ7からページマッピングキャッシュ6に転送し、対応ページ内の全ラインのL2キャッシュ5のデータは無効化し、TLB3を更新する。このとき、ページマッピングキャッシュ6内で追い出されたデータを必要に応じてメインメモリ7にライトバックする。また、CPU2が発行した読み出し要求アドレスに対応するデータをL1キャッシュ4に転送する(ステップS22)。ステップS20〜S22の処理は第6処理に対応する。
If it is determined that the threshold value is exceeded, the data of all lines in the corresponding page is transferred from the
ステップS20で超えなかったと判定されると、CPU2が発行した読み出し要求アドレスに対応するデータをL1キャッシュ4とL2キャッシュ5に転送する(ステップS23)。ステップS23の処理は第7処理に対応する。
If it is determined in step S20 that it has not exceeded, the data corresponding to the read request address issued by the
このように、第2の実施形態では、L2キャッシュ5とページマッピングキャッシュ6へのアクセスを並列化して行うため、対応ページの全体に渡ってアクセスが頻繁に発生するか、対応ページ内の特定のラインにアクセスが集中するかによって、L2キャッシュ5とページマッピングキャッシュ6のどちらにデータを格納するかを切り替えることができる。よって、L2キャッシュ5とページマッピングキャッシュ6を効率よく使い分けることができる。
As described above, in the second embodiment, since the access to the
(第3の実施形態)
以下に説明する第3の実施形態は、TLB3とは別個に、ページテーブルを備えるものである。ページマッピングキャッシュ6のエントリ数が増えると、すべてのエントリに関するアドレス変換情報やフラグ情報等をTLB3に格納しきれなくなるおそれがある。そこで、本実施形態では、TLB3に入りきれなかった情報をページテーブルに格納する。
(Third embodiment)
In the third embodiment described below, a page table is provided separately from the
図10は第3の実施形態に係るプロセッサシステム1の概略構成を示すブロック図である。図10のプロセッサシステム1は、図1と比較して、L2キャッシュ5とページマッピングキャッシュ6の間に新たにページテーブル10を配置している。ページテーブル10には、TLB3に格納しきれなかったアドレス変換情報やフラグ情報等が格納される。よって、ページテーブル10は、基本的にはTLB3と同じ内部構成を有する。ページテーブル10は、ページマッピングキャッシュ6と同様に、メインメモリ7より高速アクセスが可能なメモリ(例えばMRAM)で構成される。
FIG. 10 is a block diagram showing a schematic configuration of the
図11は第3の実施形態におけるTLB3、ページテーブル10、各キャッシュメモリ4〜6およびメインメモリ7のアクセス優先度を示す図である。図示のように、CPU2は、TLB3、L1キャッシュ4、L2キャッシュ5、ページテーブル10、ページマッピングキャッシュ6、およびメインメモリ7の順にアクセスする。
FIG. 11 is a diagram showing access priorities of the
CPU2の読み出し要求アドレスがTLB3にヒットしなかったときに、メインメモリ7にアクセスする前に、ページテーブル10内を検索し、ページテーブル10にヒットすれば、メインメモリ7にアクセスせずにアドレス変換情報をロードすることができ、L1キャッシュ4、L2キャッシュ5に該当データがなかった場合、対応データをページマッピングキャッシュ6から取り出す。これにより、メインメモリ7へのアクセス頻度を減らすことができる。
When the read request address of the
ページテーブル10は、上述したように、基本的にはTLB3と同じ内部構成を有し、ページマッピングキャッシュ6に直接アクセスするためのキャッシュアドレス情報を有するのが望ましい。また、ページマッピングキャッシュ6のエントリ数が多い場合には、ページテーブル10をセットアソシアティブ構成にするのが望ましい。また、CPU2が実行するタスクを切り替えたときに、ページテーブル10全体を無効化して更新しなくて済むように、各タスクごとにアドレス空間ID(ASID)を割り振ってアドレス変換情報等を管理してもよい。
As described above, the page table 10 basically has the same internal configuration as that of the
図12は第3の実施形態によるCPU2が読み出し要求アドレスを発行する場合の処理手順を示すフローチャートである。ステップS31〜S36は、図5のステップS1〜S6と同様である。ステップS31,S32は第1処理に対応する。ステップS33〜S36は第2処理に対応する。
FIG. 12 is a flowchart showing a processing procedure when the
ステップS35でL2キャッシュ5にミスしたと判定されると、CPU2の読み出し要求アドレスがページテーブル10にヒットしたか否かを判定する(ステップS37)。ヒットしたと判定されると、ページマッピングキャッシュ6から該当するデータを読み出してCPU2に転送するとともに、読み出し要求アドレスに対応するキャッシュライン分のデータをL1キャッシュ4とL2キャッシュ5に転送する(ステップS38)。ステップS37,S38は第3処理に対応する。
If it is determined in step S35 that the
ステップS37でミスしたと判定されると、CPU2が発行した読み出し要求アドレスに対応するデータをメインメモリ7から読み出してCPU2に転送するとともに、このアドレスに対応するページ分のデータをページマッピングキャッシュ6に転送し、かつこのアドレスに対応するキャッシュライン分のデータをL1キャッシュ4とL2キャッシュ5に転送し、かつTLB3とページテーブル10を更新する(ステップS39)。ステップS39は第4処理に対応する。
If it is determined in step S37 that a miss has occurred, the data corresponding to the read request address issued by the
このように、第3の実施形態では、TLB3とは別個にページテーブル10を設けるため、ページマッピングキャッシュ6のエントリ数が増えて、アドレス変換情報等をTLB3に格納しきれなくなっても、ページテーブル10に格納でき、ページマッピングキャッシュ6の大容量化に対応可能となる。
As described above, in the third embodiment, since the page table 10 is provided separately from the
(第4の実施形態)
上述した第1〜第3の実施形態では、CPU2はまずTLB3にアクセスして、その後に各キャッシュメモリ4〜6とメインメモリ7に順にアクセスしている。このため、TLB3が大容量化すると、TLB3内の検索に時間がかかり、L1キャッシュ4に迅速にアクセスできなくなる。そこで、以下の第4の実施形態では、CPU2がTLB3よりも先にL1キャッシュ4にアクセスするようにしたものである。
(Fourth embodiment)
In the first to third embodiments described above, the
図13は第4の実施形態に係るプロセッサシステム1の概略構成を示すブロック図、図14は第4の実施形態におけるTLB3、各キャッシュメモリおよびメインメモリ7のアクセス優先度を示す図である。本実施形態では、図6および図7と比較して、L1キャッシュ4とTLB3を入れ替えている。
FIG. 13 is a block diagram showing a schematic configuration of the
CPU2は、読み出し要求アドレスを発行したときに、まずはL1キャッシュ4にアクセスする。図13のL1キャッシュ4は、CPU2が発行した仮想アドレスからなる読み出し要求アドレスで直接アクセス可能とされている。L1キャッシュ4にミスした場合に、CPU2はTLB3にアクセスすることになる。
When the
本実施形態のように、L1キャッシュ4に仮想アドレスでアクセスする場合、CPU2がタスクを切り替えると、L1キャッシュ4全体を無効化(フラッシュ)しなければならない。ただし、L1キャッシュ4に格納されているデータは、L2キャッシュ5とページマッピングキャッシュ6のどちらかに格納されているため、メインメモリ7にアクセスする必要はほとんどなく、高速にアドレス空間の切替を行うことができる。
When accessing the
図15は第4の実施形態によるCPU2が読み出し要求アドレスを発行する場合の処理手順を示すフローチャートである。図15のフローチャートは図9のフローチャートと比べて、図9のステップS11とS13の判定処理を入れ替えた構成になっている。すなわち、CPU2が発行した読み出し要求アドレスがL1キャッシュ4にヒットするか否かを判定し(ステップS41)、ヒットすれば、L1キャッシュ4から読み出したデータをCPU2に転送する(ステップS42)。ヒットしなければ、CPU2が発行した読み出し要求アドレスがTLB3にヒットするか否かを判定し(ステップS43)、ヒットしなければ、メインメモリ7内のページテーブルエントリからアドレス変換情報をロードしてTLB3内のデータを更新する(ステップS44)。ステップS41,S42は第1処理に対応する。ステップS43,S44は第2処理に対応する。
FIG. 15 is a flowchart showing a processing procedure when the
ステップS43で格納されていると判定された場合、あるいはステップS44の処理が終了した場合は、CPU2が発行した読み出し要求アドレスに対応するデータがページマッピングキャッシュ6に格納されているか否かをTLB3が保持するフラグ情報に基づいて判定する(ステップS45)。その後は、図9のステップS17以降と同様の処理が行われる(ステップS46〜S53)。ステップS45,S46は第3処理に対応する。ステップS47,S48は第4処理に対応する。ステップS49は第5処理に対応する。ステップS50〜S52は第6処理に対応する。ステップS53は第7処理に対応する。
If it is determined that the data is stored in step S43, or if the process in step S44 ends, the
本実施形態においても、TLB3にアドレス空間識別ID(ASID)を設けて、各タスクごとにアドレス変換情報等を管理してもよい。
Also in this embodiment, an address space identification ID (ASID) may be provided in the
図13は、L2キャッシュ5とページマッピングキャッシュ6が並列化している例を示したが、図1や図10のように、L2キャッシュ5とページマッピングキャッシュ6が並列化していない場合において、L1キャッシュ4とTLB3のアクセス順序を入れ替えてもよい。
FIG. 13 shows an example in which the
このように、第4の実施形態では、TLB3よりも先にL1キャッシュ4にアクセスするようにしたため、TLB3が大容量化してTLB3のアクセスに時間がかかる場合でも、L1キャッシュ4に迅速にアクセスできる。
As described above, in the fourth embodiment, since the
なお、L1キャッシュ4だけでなく、L2キャッシュ5も、TLB3より先にアクセスするようにしてもよい。
Note that not only the
上述した実施形態では、2階層のキャッシュメモリであるL1キャッシュ4とL2キャッシュ5を設ける例を説明したが、3階層以上のキャッシュメモリを設けてもよい。k(k=1からnまでのすべての整数、nは1以上の整数)次のキャッシュメモリを設ける場合、図5の処理では、すべてのキャッシュメモリでミスした場合に、ページマッピングキャッシュ6にアクセスすることになる。また、図9の処理では、ステップS15でミスした後、L2キャッシュ5以上の高次のキャッシュメモリすべてでミスした場合に、ステップS19以降の処理を行うことになる。また、図12の処理では、すべてのキャッシュメモリでミスした後に、ステップS37の処理を行うことになる。また、図15の処理では、ステップS45でミスした後、L2キャッシュ5以上の高次のキャッシュメモリすべてでミス場合に、ステップS49以降の処理を行うことになる。
In the embodiment described above, an example in which the
上述した各実施形態では、L2キャッシュ57のメモリセルがMRAMセルの例を説明したが、他の不揮発性メモリ(例えば、ReRAMメモリセル、Phase change RAM(PRAMやPCM)メモリセル、NANDフラッシュメモリセル)で構成されていてもよい。また、上述した各実施形態において、メモリ制御回路1の一部あるいは全部は、L1キャッシュ46またはL2キャッシュ57に内蔵してもよい。さらに、上述した各実施形態において、特定のメモリに対する電源を遮断する際には、特定のメモリ以外のn次(nは2以上の整数)のキャッシュメモリとメインメモリ78のうち、電源を遮断可能なメモリ内の一部または全部をすべて一括で遮断してもよい。あるいは、特定のメモリを含めてn次のキャッシュメモリのうち不揮発性メモリのそれぞれについて、個別に電源遮断のタイミングを制御してもよい。
In each of the embodiments described above, an example in which the memory cell of the L2 cache 57 is an MRAM cell has been described. However, other nonvolatile memories (for example, a ReRAM memory cell, a phase change RAM (PRAM or PCM) memory cell, a NAND flash memory cell) ). In each embodiment described above, part or all of the
上述した実施形態で説明したプロセッサシステム1の少なくとも一部は、ハードウェアで構成してもよいし、ソフトウェアで構成してもよい。ソフトウェアで構成する場合には、プロセッサシステム1の少なくとも一部の機能を実現するプログラムをフレキシブルディスクやCD−ROM等の記録媒体に収納し、コンピュータに読み込ませて実行させてもよい。記録媒体は、磁気ディスクや光ディスク等の着脱可能なものに限定されず、ハードディスク装置やメモリなどの固定型の記録媒体でもよい。
At least a part of the
また、プロセッサシステム1の少なくとも一部の機能を実現するプログラムを、インターネット等の通信回線(無線通信も含む)を介して頒布してもよい。さらに、同プログラムを暗号化したり、変調をかけたり、圧縮した状態で、インターネット等の有線回線や無線回線を介して、あるいは記録媒体に収納して頒布してもよい。
Further, a program for realizing at least a part of the functions of the
本発明の態様は、上述した個々の実施形態に限定されるものではなく、当業者が想到しうる種々の変形も含むものであり、本発明の効果も上述した内容に限定されない。すなわち、特許請求の範囲に規定された内容およびその均等物から導き出される本発明の概念的な思想と趣旨を逸脱しない範囲で種々の追加、変更および部分的削除が可能である。 The aspect of the present invention is not limited to the individual embodiments described above, and includes various modifications that can be conceived by those skilled in the art, and the effects of the present invention are not limited to the contents described above. That is, various additions, modifications, and partial deletions can be made without departing from the concept and spirit of the present invention derived from the contents defined in the claims and equivalents thereof.
1 プロセッサシステム、2 CPU、3 TLB、4 L1キャッシュ、5 L2キャッシュ、6 ページマッピングキャッシュ、7 メインメモリ、9 メモリシステム、10 ページテーブル 1 processor system, 2 CPU, 3 TLB, 4 L1 cache, 5 L2 cache, 6 page mapping cache, 7 main memory, 9 memory system, 10 page table
Claims (18)
前記k次のキャッシュメモリよりもメモリ容量が大きく、かつメインメモリよりも高速アクセスが可能な不揮発性メモリを用いた大容量キャッシュメモリと、
プロセッサが発行する仮想アドレスから物理アドレスへのアドレス変換情報と、前記k次のキャッシュメモリのアクセス単位であるキャッシュラインよりもデータ量の多いページ単位で前記大容量キャッシュメモリにデータが格納されているか否かを記録するフラグ情報と、を格納するトランスレーション・ルックアサイド・バッファと、を備えるキャッシュメモリシステム。 a k-th order cache memory (all integers from k = 1 to n, where n is an integer of 1 or more);
A large-capacity cache memory using a non-volatile memory having a memory capacity larger than that of the kth-order cache memory and capable of being accessed at a higher speed than the main memory;
Whether the data is stored in the large-capacity cache memory in units of pages with a larger amount of data than the address conversion information from the virtual address to the physical address issued by the processor and the cache line that is the access unit of the k-th cache memory A cache memory system comprising: flag information for recording whether or not; and a translation lookaside buffer for storing the flag information.
前記特定のキャッシュメモリと前記大容量キャッシュメモリとは、互いに異なるアドレスに対応するデータを格納する請求項1または2に記載のキャッシュメモリシステム。 The specific cache memory higher than the primary cache memory in the k-th cache memory and the large-capacity cache memory are accessed in parallel by the processor,
The cache memory system according to claim 1 or 2, wherein the specific cache memory and the large-capacity cache memory store data corresponding to different addresses.
前記大容量キャッシュメモリは、プロセッサにより、前記ページテーブルへのアクセスの後にアクセスされる請求項12に記載のキャッシュメモリシステム。 The page table is accessed by the processor after accessing the k th cache memory;
The cache memory system according to claim 12, wherein the large-capacity cache memory is accessed after access to the page table by a processor.
メインメモリと、
k次(k=1からnまでのすべての整数、nは1以上の整数)のキャッシュメモリと、
前記k次のキャッシュメモリよりもメモリ容量が大きく、かつメインメモリよりも高速アクセスが可能な不揮発性メモリを用いた大容量キャッシュメモリと、
前記プロセッサが発行する仮想アドレスから物理アドレスへのアドレス変換情報と、前記k次のキャッシュメモリのアクセス単位であるキャッシュラインよりもデータ量の多いページ単位で前記大容量キャッシュメモリにデータが格納されているか否かを記録するフラグ情報と、を格納するトランスレーション・ルックアサイド・バッファと、を備えるプロセッサシステム。 A processor;
Main memory,
a k-th order cache memory (all integers from k = 1 to n, where n is an integer of 1 or more);
A large-capacity cache memory using a non-volatile memory having a memory capacity larger than that of the kth-order cache memory and capable of being accessed at a higher speed than the main memory;
Data is stored in the large-capacity cache memory in units of pages with a larger amount of data than the address conversion information from the virtual address to the physical address issued by the processor and the cache line that is the access unit of the k-th cache memory. A processor system comprising flag information for recording whether or not there is a translation lookaside buffer for storing the flag information.
読み出し要求アドレスが前記トランスレーション・ルックアサイド・バッファにヒットしたか否かを判定し、ヒットしなければ、前記メインメモリから前記読み出し要求アドレスに関するアドレス変換情報をロードして前記トランスレーション・ルックアサイド・バッファを更新する第1処理と、
前記第1処理後に、前記読み出し要求アドレスに対応するデータが前記k次のキャッシュメモリに格納されているかを、低次のキャッシュメモリから順に調べて、格納されていれば、格納されているデータを読み出す第2処理と、
前記読み出し要求アドレスに対応するデータが前記k次のキャッシュメモリのいずれにも格納されていなければ、前記読み出し要求アドレスに対応するデータが前記大容量キャッシュメモリに格納されているか否かを前記トランスレーション・ルックアサイド・バッファが保持する前記フラグ情報に基づいて判定し、前記大容量キャッシュメモリに格納されていれば、前記大容量キャッシュメモリから前記読み出し要求アドレスに対応するデータを読み出すとともに、前記読み出し要求アドレスに対応するキャッシュライン分のデータを前記k次のキャッシュメモリに格納する第3処理と、
前記第3処理でヒットしなければ、前記メインメモリから前記読み出し要求アドレスに対応するデータを読み出すとともに、前記読み出し要求アドレスに対応するページ単位のデータを前記大容量キャッシュメモリに格納し、かつ前記読み出し要求アドレスに対応するキャッシュライン分のデータを前記k次のキャッシュメモリに格納し、かつ前記読み出し要求アドレスに基づいて前記トランスレーション・ルックアサイド・バッファを更新する第4処理と、を実行する請求項14に記載のプロセッサシステム。 The processor is
It is determined whether or not a read request address has hit the translation lookaside buffer. If not, the address translation information related to the read request address is loaded from the main memory and the translation lookaside buffer is loaded. A first process for updating the buffer;
After the first processing, it is examined in order from the low-order cache memory whether the data corresponding to the read request address is stored in the k-th order cache memory, and if stored, the stored data is A second process of reading;
If the data corresponding to the read request address is not stored in any of the k-th cache memories, it is determined whether the data corresponding to the read request address is stored in the large-capacity cache memory. If the determination is made based on the flag information held by the look-aside buffer and stored in the large-capacity cache memory, the data corresponding to the read request address is read from the large-capacity cache memory, and the read request A third process of storing data for a cache line corresponding to an address in the k-th cache memory;
If there is no hit in the third process, the data corresponding to the read request address is read from the main memory, the page unit data corresponding to the read request address is stored in the large-capacity cache memory, and the read And a fourth process of storing data for a cache line corresponding to a request address in the k-th cache memory and updating the translation lookaside buffer based on the read request address. 14. The processor system according to 14.
前記トランスレーション・ルックアサイド・バッファは、各ページ内のキャッシュラインごとに前記特定のキャッシュメモリにデータが格納されているか否かを示す情報をページ単位で格納するアクセスマップを有し、
前記プロセッサは、
読み出し要求アドレスが前記トランスレーション・ルックアサイド・バッファにヒットしたか否かを判定し、ヒットしなければ、前記メインメモリから前記読み出し要求アドレスに関するアドレス変換情報をロードして前記トランスレーション・ルックアサイド・バッファを更新する第1処理と、
前記第1処理後に、前記読み出し要求アドレスに対応するデータが前記k次のキャッシュメモリの中の1次のキャッシュメモリに格納されているかを調べて、格納されていれば、格納されているデータを読み出す第2処理と、
前記第2処理で前記1次のキャッシュメモリに格納されていないと判定されると、前記読み出し要求アドレスに対応するデータが前記大容量キャッシュメモリに格納されているか否かを前記トランスレーション・ルックアサイド・バッファが保持する前記フラグ情報に基づいて判定し、前記大容量キャッシュメモリに格納されていれば、前記大容量キャッシュメモリから前記読み出し要求アドレスに対応するデータを読み出すとともに、前記読み出し要求アドレスに対応するキャッシュライン分のデータを前記1次のキャッシュメモリに格納する第3処理と、
前記第3処理で前記トランスレーション・ルックアサイド・バッファにヒットしなかったと判定されると、前記読み出し要求アドレスが前記k次のキャッシュメモリの中の2次以上の高次のキャッシュメモリにヒットするか否かを順に判定し、ヒットすれば、前記高次のキャッシュメモリから前記読み出し要求アドレスに対応するデータを読み出す第4処理と、
前記第4処理で前記高次のキャッシュメモリに格納されていないと判定されると、前記メインメモリから前記読み出し要求アドレスに対応するデータを読み出す第5処理と、
前記トランスレーション・ルックアサイド・バッファ内の前記アクセスマップの前記読み出し要求アドレスに対応するページを参照して、前記特定のキャッシュメモリにデータが格納されている数が所定の閾値を超える場合には、対応するページの全データを前記大容量キャッシュメモリに格納して前記特定のキャッシュメモリ内のデータを無効化し、かつ前記読み出し要求アドレスに対応するキャッシュライン分のデータを前記メインメモリから読み出して前記1次のキャッシュメモリに格納し、かつ前記トランスレーション・ルックアサイド・バッファを更新する第6処理と、
前記第6処理で前記所定の閾値を超えないと判定されると、前記読み出し要求アドレスに対応するキャッシュライン分のデータを前記メインメモリから読み出して前記特定のキャッシュメモリに格納する第7処理と、を実行する請求項14に記載のプロセッサシステム。 The specific cache memory higher than the primary cache memory in the k-th cache memory and the large-capacity cache memory are accessed in parallel by the processor,
The translation lookaside buffer has an access map for storing information indicating whether data is stored in the specific cache memory for each cache line in each page in units of pages,
The processor is
It is determined whether or not a read request address has hit the translation lookaside buffer. If not, the address translation information related to the read request address is loaded from the main memory and the translation lookaside buffer is loaded. A first process for updating the buffer;
After the first processing, it is checked whether data corresponding to the read request address is stored in the primary cache memory in the k-th cache memory, and if stored, the stored data is A second process of reading;
If it is determined in the second process that the data is not stored in the primary cache memory, it is determined whether the data corresponding to the read request address is stored in the large-capacity cache memory. Determine based on the flag information held in the buffer, and if stored in the large-capacity cache memory, read data corresponding to the read request address from the large-capacity cache memory and correspond to the read request address A third process of storing data for the cache line to be stored in the primary cache memory;
If it is determined in the third process that the translation lookaside buffer has not been hit, does the read request address hit a secondary or higher order cache memory in the kth order cache memory? A fourth process for reading out data corresponding to the read request address from the higher-level cache memory if it is determined in order, and if hit,
A fifth process of reading data corresponding to the read request address from the main memory when it is determined in the fourth process that the data is not stored in the higher-order cache memory;
With reference to a page corresponding to the read request address of the access map in the translation lookaside buffer, when the number of data stored in the specific cache memory exceeds a predetermined threshold, All the data of the corresponding page is stored in the large-capacity cache memory, the data in the specific cache memory is invalidated, and the data for the cache line corresponding to the read request address is read from the main memory and the 1 A sixth process of storing in the next cache memory and updating the translation lookaside buffer;
If it is determined in the sixth process that the predetermined threshold is not exceeded, a seventh process of reading data for the cache line corresponding to the read request address from the main memory and storing it in the specific cache memory; 15. The processor system according to claim 14, wherein the processor system is executed.
前記プロセッサは、
読み出し要求アドレスが前記トランスレーション・ルックアサイド・バッファにヒットしたか否かを判定し、ヒットしなければ、前記メインメモリから前記読み出し要求アドレスに関するアドレス変換情報をロードして前記トランスレーション・ルックアサイド・バッファを更新する第1処理と、
前記第1処理後に、前記読み出し要求アドレスに対応するデータが前記k次のキャッシュメモリに格納されているかを、低次のキャッシュメモリから順に調べて、格納されていれば、格納されているデータを読み出す第2処理と、
前記読み出し要求アドレスに対応するデータが前記k次のキャッシュメモリのいずれにも格納されていなければ、前記読み出し要求アドレスが前記ページテーブルにヒットするか否かを判定し、ヒットすれば、前記大容量キャッシュメモリから前記読み出し要求アドレスに対応するデータを読み出すとともに、前記読み出し要求アドレスに対応するキャッシュライン分のデータを前記1次のキャッシュメモリおよび前記2次のキャッシュメモリに格納する第3処理と、
前記第3処理でヒットしなければ、前記メインメモリから前記読み出し要求アドレスに対応するデータを読み出すとともに、前記読み出し要求アドレスに対応するページ単位のデータを前記大容量キャッシュメモリに格納し、かつ前記読み出し要求アドレスに対応するキャッシュライン分のデータを前記k次のキャッシュメモリに格納し、かつ前記読み出し要求アドレスに基づいて前記トランスレーション・ルックアサイド・バッファおよび前記ページテーブルを更新する第4処理と、を実行する請求項14に記載のプロセッサシステム。 A page table that stores address translation information and flag information that could not be stored in the translation lookaside buffer, and that can be accessed faster than the main memory,
The processor is
It is determined whether or not a read request address has hit the translation lookaside buffer. If not, the address translation information related to the read request address is loaded from the main memory and the translation lookaside buffer is loaded. A first process for updating the buffer;
After the first processing, it is examined in order from the low-order cache memory whether the data corresponding to the read request address is stored in the k-th order cache memory, and if stored, the stored data is A second process of reading;
If the data corresponding to the read request address is not stored in any of the k-th cache memories, it is determined whether or not the read request address hits the page table. A third process of reading data corresponding to the read request address from a cache memory and storing data for a cache line corresponding to the read request address in the primary cache memory and the secondary cache memory;
If there is no hit in the third process, the data corresponding to the read request address is read from the main memory, the page unit data corresponding to the read request address is stored in the large-capacity cache memory, and the read A fourth process of storing data for a cache line corresponding to a request address in the k-th cache memory and updating the translation lookaside buffer and the page table based on the read request address; 15. The processor system according to claim 14, which is executed.
前記トランスレーション・ルックアサイド・バッファは、各ページ内のキャッシュラインごとに前記特定のキャッシュメモリにデータが格納されているか否かを示す情報をページ単位で格納するアクセスマップを有し、
前記プロセッサは、
前記読み出し要求アドレスに対応するデータが前記k次のキャッシュメモリの中の1次のキャッシュメモリに格納されているかを調べて、格納されていれば、格納されているデータを読み出す第1処理と、
読み出し要求アドレスに対応するデータが前記1次のキャッシュメモリに格納されていなければ、前記読み出し要求アドレスが前記トランスレーション・ルックアサイド・バッファにヒットするか否かを判定し、ヒットしなければ、前記メインメモリから前記読み出し要求アドレスに関するアドレス変換情報をロードして前記トランスレーション・ルックアサイド・バッファを更新する第2処理と、
前記第2処理の終了後に、前記読み出し要求アドレスに対応するデータが前記大容量キャッシュメモリに格納されているか否かを前記トランスレーション・ルックアサイド・バッファが保持する前記フラグ情報に基づいて判定し、前記大容量キャッシュメモリに格納されていれば、前記大容量キャッシュメモリから前記読み出し要求アドレスに対応するデータを読み出すとともに、前記読み出し要求アドレスに対応するキャッシュライン単位のデータを前記1次のキャッシュメモリに格納する第3処理と、
前記第3処理で前記トランスレーション・ルックアサイド・バッファに格納されていないと判定されると、前記読み出し要求アドレスが前記k次のキャッシュメモリの中の1次のキャッシュよりも高次のキャッシュメモリにヒットするか否かを順に判定し、ヒットすれば、前記高次のキャッシュメモリから前記読み出し要求アドレスに対応するデータを読み出す第4処理と、
前記第4処理で前記高次のキャッシュメモリに格納されていないと判定されると、前記メインメモリから前記読み出し要求アドレスに対応するデータを読み出す第5処理と、
前記トランスレーション・ルックアサイド・バッファ内の前記アクセスマップの前記読み出し要求アドレスに対応するページを参照して、前記特定のキャッシュメモリにデータが格納されている数が所定の閾値を超える場合には、対応するページの全データを前記大容量キャッシュメモリに格納して前記特定のキャッシュメモリ内のデータを無効化し、かつ前記読み出し要求アドレスに対応するキャッシュライン分のデータを前記1次のキャッシュメモリに格納し、かつ前記トランスレーション・ルックアサイド・バッファを更新する第6処理と、
前記第6処理で前記所定の閾値を超えないと判定されると、前記読み出し要求アドレスに対応するキャッシュライン分のデータを前記k次のキャッシュメモリに格納する第7処理と、を実行する請求項14に記載のプロセッサシステム。 The specific cache memory higher than the primary cache memory in the k-th cache memory and the large-capacity cache memory are accessed in parallel by the processor,
The translation lookaside buffer has an access map for storing information indicating whether data is stored in the specific cache memory for each cache line in each page in units of pages,
The processor is
Checking whether data corresponding to the read request address is stored in a primary cache memory in the k-th cache memory, and if stored, a first process of reading the stored data;
If the data corresponding to the read request address is not stored in the primary cache memory, it is determined whether or not the read request address hits the translation lookaside buffer. A second process of loading address translation information relating to the read request address from main memory and updating the translation lookaside buffer;
After the end of the second process, it is determined based on the flag information held by the translation lookaside buffer whether data corresponding to the read request address is stored in the large-capacity cache memory, If stored in the large-capacity cache memory, data corresponding to the read request address is read from the large-capacity cache memory, and data in units of cache lines corresponding to the read request address is read to the primary cache memory. A third process to store;
If it is determined in the third process that the address is not stored in the translation lookaside buffer, the read request address is stored in a higher-order cache memory than the first-order cache in the k-th order cache memory. Whether or not to hit, in order, and if hit, a fourth process of reading data corresponding to the read request address from the higher-order cache memory;
A fifth process of reading data corresponding to the read request address from the main memory when it is determined in the fourth process that the data is not stored in the higher-order cache memory;
With reference to a page corresponding to the read request address of the access map in the translation lookaside buffer, when the number of data stored in the specific cache memory exceeds a predetermined threshold, All the data of the corresponding page is stored in the large-capacity cache memory, the data in the specific cache memory is invalidated, and the data for the cache line corresponding to the read request address is stored in the primary cache memory And a sixth process for updating the translation lookaside buffer;
7. The seventh process of storing data for a cache line corresponding to the read request address in the k-th cache memory when it is determined in the sixth process that the predetermined threshold is not exceeded. 14. The processor system according to 14.
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013196128A JP6088951B2 (en) | 2013-09-20 | 2013-09-20 | Cache memory system and processor system |
PCT/JP2014/074128 WO2015041151A1 (en) | 2013-09-20 | 2014-09-11 | Cache memory system and processor system |
US15/069,409 US9740613B2 (en) | 2013-09-20 | 2016-03-14 | Cache memory system and processor system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013196128A JP6088951B2 (en) | 2013-09-20 | 2013-09-20 | Cache memory system and processor system |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2015060571A JP2015060571A (en) | 2015-03-30 |
JP6088951B2 true JP6088951B2 (en) | 2017-03-01 |
Family
ID=52688802
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013196128A Active JP6088951B2 (en) | 2013-09-20 | 2013-09-20 | Cache memory system and processor system |
Country Status (3)
Country | Link |
---|---|
US (1) | US9740613B2 (en) |
JP (1) | JP6088951B2 (en) |
WO (1) | WO2015041151A1 (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6228523B2 (en) * | 2014-09-19 | 2017-11-08 | 東芝メモリ株式会社 | Memory control circuit and semiconductor memory device |
JP2018049381A (en) | 2016-09-20 | 2018-03-29 | 東芝メモリ株式会社 | Memory control circuit, memory system, and processor system |
JP2018049385A (en) * | 2016-09-20 | 2018-03-29 | 東芝メモリ株式会社 | Memory system and processor system |
JP7053998B2 (en) * | 2018-06-06 | 2022-04-13 | 富士通株式会社 | Arithmetic processing unit and control method of arithmetic processing unit |
JP7041353B2 (en) * | 2018-06-06 | 2022-03-24 | 富士通株式会社 | Arithmetic processing unit and control method of arithmetic processing unit |
US11620230B2 (en) * | 2019-05-24 | 2023-04-04 | Texas Instruments Incorporated | Methods and apparatus to facilitate read-modify-write support in a coherent victim cache with parallel data paths |
US11182307B2 (en) * | 2020-02-22 | 2021-11-23 | International Business Machines Corporation | Demoting data elements from cache using ghost cache statistics |
US11914865B2 (en) * | 2022-04-11 | 2024-02-27 | Mellanox Technologies, Ltd. | Methods and systems for limiting data traffic while processing computer system operations |
Family Cites Families (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH03232034A (en) * | 1990-02-08 | 1991-10-16 | Oki Electric Ind Co Ltd | Cache controller |
US5440707A (en) | 1992-04-29 | 1995-08-08 | Sun Microsystems, Inc. | Instruction and data cache with a shared TLB for split accesses and snooping in the same clock cycle |
KR19980032776A (en) * | 1996-10-16 | 1998-07-25 | 가나이 츠토무 | Data processor and data processing system |
EP0856797B1 (en) | 1997-01-30 | 2003-05-21 | STMicroelectronics Limited | A cache system for concurrent processes |
GB9701960D0 (en) | 1997-01-30 | 1997-03-19 | Sgs Thomson Microelectronics | A cache system |
US6442666B1 (en) | 1999-01-28 | 2002-08-27 | Infineon Technologies Ag | Techniques for improving memory access in a virtual memory system |
US6654855B1 (en) * | 2000-10-26 | 2003-11-25 | Emc Corporation | Method and apparatus for improving the efficiency of cache memories using chained metrics |
JPWO2006038258A1 (en) | 2004-09-30 | 2008-05-15 | 株式会社ルネサステクノロジ | Data processor |
US7360022B2 (en) * | 2005-12-29 | 2008-04-15 | Intel Corporation | Synchronizing an instruction cache and a data cache on demand |
US20090006803A1 (en) | 2007-06-28 | 2009-01-01 | David Arnold Luick | L2 Cache/Nest Address Translation |
US20090006754A1 (en) * | 2007-06-28 | 2009-01-01 | Luick David A | Design structure for l2 cache/nest address translation |
JP5129023B2 (en) | 2008-05-26 | 2013-01-23 | 株式会社東芝 | Cache memory device |
JP5300407B2 (en) * | 2008-10-20 | 2013-09-25 | 株式会社東芝 | Virtual address cache memory and virtual address cache method |
JP2011198133A (en) * | 2010-03-19 | 2011-10-06 | Toshiba Corp | Memory system and controller |
US9418011B2 (en) * | 2010-06-23 | 2016-08-16 | Intel Corporation | Region based technique for accurately predicting memory accesses |
US9460018B2 (en) * | 2012-05-09 | 2016-10-04 | Qualcomm Incorporated | Method and apparatus for tracking extra data permissions in an instruction cache |
-
2013
- 2013-09-20 JP JP2013196128A patent/JP6088951B2/en active Active
-
2014
- 2014-09-11 WO PCT/JP2014/074128 patent/WO2015041151A1/en active Application Filing
-
2016
- 2016-03-14 US US15/069,409 patent/US9740613B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
WO2015041151A1 (en) | 2015-03-26 |
US20160196210A1 (en) | 2016-07-07 |
US9740613B2 (en) | 2017-08-22 |
JP2015060571A (en) | 2015-03-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6088951B2 (en) | Cache memory system and processor system | |
JP6118285B2 (en) | Cache memory system and processor system | |
JP5580894B2 (en) | TLB prefetching | |
US8984254B2 (en) | Techniques for utilizing translation lookaside buffer entry numbers to improve processor performance | |
US8185692B2 (en) | Unified cache structure that facilitates accessing translation table entries | |
US10031854B2 (en) | Memory system | |
JP6027562B2 (en) | Cache memory system and processor system | |
US9317448B2 (en) | Methods and apparatus related to data processors and caches incorporated in data processors | |
US20160140042A1 (en) | Instruction cache translation management | |
US20130262767A1 (en) | Concurrently Accessed Set Associative Overflow Cache | |
CN109952565B (en) | Memory access techniques | |
KR101768828B1 (en) | Memory physical address query method and apparatus | |
WO2024066195A1 (en) | Cache management method and apparatus, cache apparatus, electronic apparatus, and medium | |
US10210093B2 (en) | Memory device supporting both cache mode and memory mode, and operating method of the same | |
JP2020046761A (en) | Management device, information processing apparatus and memory control method | |
KR102355374B1 (en) | Memory management unit capable of managing address translation table using heterogeneous memory, and address management method thereof | |
US20190243778A1 (en) | Memory address translation | |
US10725675B2 (en) | Management apparatus, information processing apparatus, management method, and computer program product | |
JP6140233B2 (en) | Memory system | |
US20140006747A1 (en) | Systems and methods for processing instructions when utilizing an extended translation look-aside buffer having a hybrid memory structure | |
KR101831226B1 (en) | Apparatus for controlling cache using next-generation memory and method thereof | |
JP2019164411A (en) | Management device, information processing device, management method, and program | |
JP2021082324A (en) | Management device, information processing device, management method, and program | |
JP2019164497A (en) | Management device, information processing device, management method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20160316 |
|
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: 20170106 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20170206 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6088951 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |