JP6088951B2 - Cache memory system and processor system - Google Patents

Cache memory system and processor system Download PDF

Info

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
Application number
JP2013196128A
Other languages
Japanese (ja)
Other versions
JP2015060571A (en
Inventor
口 紘 希 野
口 紘 希 野
田 忍 藤
田 忍 藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2013196128A priority Critical patent/JP6088951B2/en
Priority to PCT/JP2014/074128 priority patent/WO2015041151A1/en
Publication of JP2015060571A publication Critical patent/JP2015060571A/en
Priority to US15/069,409 priority patent/US9740613B2/en
Application granted granted Critical
Publication of JP6088951B2 publication Critical patent/JP6088951B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0806Multiuser, multiprocessor or multiprocessing cache systems
    • G06F12/0811Multiuser, multiprocessor or multiprocessing cache systems with multilevel cache hierarchies
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0893Caches characterised by their organisation or structure
    • G06F12/0897Caches characterised by their organisation or structure with two or more cache hierarchy levels
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation
    • G06F12/1009Address translation using page tables, e.g. page table structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/10Providing a specific technical effect
    • G06F2212/1016Performance improvement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/28Using a specific disk cache architecture
    • G06F2212/283Plural cache memories
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/65Details 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.

特表2002−536715号公報Special Table 2002-536715 gazette 特表2002−536716号公報Japanese translation of PCT publication No. 2002-536716 特表2002−536717号公報JP-T-2002-536717

本発明が解決しようとする課題は、大容量のキャッシュメモリに対するアクセス効率を向上可能なキャッシュメモリシステムおよびプロセッサシステムを提供することである。   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.

本発明の第1の実施形態に係るプロセッサシステム1の概略構成を示す図。1 is a diagram showing a schematic configuration of a processor system 1 according to a first embodiment of the present invention. 第1の実施形態におけるTLB3、各キャッシュメモリ4〜6およびメインメモリ7のアクセス優先度を示す図。The figure which shows the access priority of TLB3, each cache memory 4-6, and the main memory 7 in 1st Embodiment. 第1の実施形態におけるTLB3の内部構成を示す図。The figure which shows the internal structure of TLB3 in 1st Embodiment. セットアソシアティブ構成のTLB3の内部構成を示す図。The figure which shows the internal structure of TLB3 of a set associative structure. 第1の実施形態によるCPU2が読み出し要求アドレスを発行する場合の処理手順を示すフローチャート。6 is a flowchart illustrating a processing procedure when the CPU 2 according to the first embodiment issues a read request address. 第2の実施形態に係るプロセッサシステム1の概略構成を示すブロック図。The block diagram which shows schematic structure of the processor system 1 which concerns on 2nd Embodiment. 第2の実施形態におけるTLB3、各キャッシュメモリ4〜6およびメインメモリ7のアクセス優先度を示す図。The figure which shows the access priority of TLB3, each cache memory 4-6, and the main memory 7 in 2nd Embodiment. 第2の実施形態におけるTLB3の内部構成を示す図。The figure which shows the internal structure of TLB3 in 2nd Embodiment. 第2の実施形態によるCPU2が読み出し要求アドレスを発行する場合の処理手順を示すフローチャート。9 is a flowchart showing a processing procedure when the CPU 2 according to the second embodiment issues a read request address. 第3の実施形態に係るプロセッサシステム1の概略構成を示すブロック図。The block diagram which shows schematic structure of the processor system 1 which concerns on 3rd Embodiment. 第3の実施形態におけるTLB3、ページテーブル10、各キャッシュメモリ4〜6およびメインメモリ7のアクセス優先度を示す図。The figure which shows the access priority of TLB3, the page table 10, each cache memory 4-6, and the main memory 7 in 3rd Embodiment. 第3の実施形態によるCPU2が読み出し要求アドレスを発行する場合の処理手順を示すフローチャート。10 is a flowchart showing a processing procedure when the CPU 2 according to the third embodiment issues a read request address. 第4の実施形態に係るプロセッサシステム1の概略構成を示すブロック図。The block diagram which shows schematic structure of the processor system 1 which concerns on 4th Embodiment. 第4の実施形態におけるTLB3、各キャッシュメモリおよびメインメモリ7のアクセス優先度を示す図。The figure which shows the access priority of TLB3, each cache memory, and the main memory 7 in 4th Embodiment. 第4の実施形態によるCPU2が読み出し要求アドレスを発行する場合の処理手順を示すフローチャート。10 is a flowchart showing a processing procedure when the CPU 2 according to the fourth embodiment issues a read request address.

以下、図面を参照しながら、本発明の実施形態を説明する。   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 processor system 1 according to the first embodiment of the present invention. A processor system 1 in FIG. 1 includes a processor (CPU) 2, a translation lookaside buffer (TLB) 3, a primary cache memory (L1 cache) 4, and a secondary cache memory (L2 cache). ) 5, a large-capacity cache memory (page mapping cache) 6, and a main memory 7.

メインメモリ7以外のプロセッサ2、TLB3、L1キャッシュ4、L2キャッシュ5、およびページマッピングキャッシュ6は例えば一つのチップ8に集積される。また、TLB3、L1キャッシュ4、L2キャッシュ5、およびページマッピングキャッシュ6はメモリシステム9に対応する。   The processor 2, TLB 3, L1 cache 4, L2 cache 5, and page mapping cache 6 other than the main memory 7 are integrated on one chip 8, for example. TLB 3, L 1 cache 4, L 2 cache 5, and page mapping cache 6 correspond to memory system 9.

L1キャッシュ4とL2キャッシュ5は、メインメモリ7よりも高速アクセスが可能な半導体メモリ(例えば、SRAM)で構成されている。ページマッピングキャッシュ6は、メインメモリ7よりも高速アクセスが可能で、かつL1キャッシュ4とL2キャッシュ5よりもメモリ容量が大きい不揮発性メモリ(例えば、MRAM)で構成されている。本明細書では、ページマッピングキャッシュ6を、低消費電力のスピン注入磁化反転型MRAM(STT−MRAM)で構成する例を説明する。   The L1 cache 4 and the L2 cache 5 are configured by semiconductor memories (for example, SRAM) that can be accessed at a higher speed than the main memory 7. The page mapping cache 6 is configured by a nonvolatile memory (for example, MRAM) that can be accessed at a higher speed than the main memory 7 and has a larger memory capacity than the L1 cache 4 and the L2 cache 5. In the present specification, an example in which the page mapping cache 6 is configured by a low power consumption spin-injection magnetization switching MRAM (STT-MRAM) will be described.

TLB3は、CPU2が発行する仮想アドレスから物理アドレスへのアドレス変換情報と、k(k=1からnまでのすべての整数、nは1以上の整数)次のキャッシュメモリのアクセス単位であるキャッシュラインよりもデータ量の多いページ単位でページマッピングキャッシュ6にデータが格納されているか否かを記録するフラグ情報と、を格納する。本実施形態によるTLB3は、L1キャッシュ4とL2キャッシュ5に優先してCPU2によりアクセスされるため、高速のメモリ(例えばSRAM)で構成されている。   The TLB 3 is address conversion information from the virtual address to the physical address issued by the CPU 2 and a cache line that is an access unit of the next cache memory k (all integers from k = 1 to n, where n is an integer of 1 or more). And flag information for recording whether or not data is stored in the page mapping cache 6 in units of pages having a larger amount of data. Since the TLB 3 according to the present embodiment is accessed by the CPU 2 in preference to the L1 cache 4 and the L2 cache 5, the TLB 3 includes a high-speed memory (for example, SRAM).

メインメモリ7は、メモリシステム9内のどのメモリよりもメモリ容量が大きいことから、チップ8の外部、もしくはパッケージ積層化技術を用いて、例えばDRAMで構成されている。   Since the main memory 7 has a memory capacity larger than any memory in the memory system 9, it is constituted by, for example, a DRAM using the outside of the chip 8 or a package stacking technique.

図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 TLB 3, the cache memories 4 to 6, and the main memory 7 in the first embodiment. As illustrated, the CPU 2 accesses the TLB 3, the L1 cache 4, the L2 cache 5, the page mapping cache 6, and the main memory 7 in this order. Data in the frequently accessed memory is also stored in the infrequently accessed memory. That is, the data in the L1 cache 4 is also stored in the L2 cache 5, the data in the L2 cache 5 is also stored in the page mapping cache 6, and the data in the page mapping cache 6 is also stored in the main memory 7. In this way, the memories 4 to 7 maintain a hierarchical relationship, and the TLB 3 holds address conversion information and the like for accessing these memories.

図2は、CPU2をMOSトランジスタを組み合わせたフリップフロップ(F/F)等で構成し、TLB3、L1キャッシュ4およびL2キャッシュ5をSRAMで構成し、ページマッピングキャッシュ6をSTT−MRAMで構成し、メインメモリ7をDRAMで構成する例を示している。   In FIG. 2, the CPU 2 is configured by a flip-flop (F / F) or the like combining MOS transistors, the TLB 3, the L1 cache 4 and the L2 cache 5 are configured by SRAM, the page mapping cache 6 is configured by STT-MRAM, An example in which the main memory 7 is constituted by a DRAM is shown.

図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 TLB 3 in the first embodiment. The TLB 3 in FIG. 3 includes, in page units, Valid information, Dirty information, virtual address information (VPN: Virtual Page Number), physical address information (PPN: Physical Page Number), flag information (Flag), and cache address information (CPN). : Cache Page Number).

CPU2が読み出し要求をするアドレスは仮想アドレスであり、この仮想アドレスは、図3に示すように、仮想アドレス情報VPNとページオフセットとを含んでいる。TLB3は、CPU2からの仮想アドレスを物理アドレスに変換する。変換した物理アドレスは、図3に示すように、物理アドレス情報PPNとページオフセットとを含んでいる。物理アドレス中のページオフセットは、CPU2が要求した仮想アドレス中のページオフセットと同じである。   The address from which the CPU 2 makes a read request is a virtual address, and this virtual address includes virtual address information VPN and a page offset as shown in FIG. The TLB 3 converts the virtual address from the CPU 2 into a physical address. As shown in FIG. 3, the converted physical address includes physical address information PPN and a page offset. The page offset in the physical address is the same as the page offset in the virtual address requested by the CPU 2.

TLB3には、図3に示すようにキャッシュアドレス情報が格納されており、TLB3は、このキャッシュアドレス情報を利用して、ページマッピングキャッシュ6をアクセスする。このキャッシュアドレス情報は、図3に示すように、キャッシュページ番号CPNとページオフセットとを有する。キャッシュアドレス中のページオフセットは、CPU2が要求した仮想アドレス中のページオフセットと同じである。   As shown in FIG. 3, cache address information is stored in the TLB 3, and the TLB 3 accesses the page mapping cache 6 using this cache address information. The cache address information includes a cache page number CPN and a page offset as shown in FIG. The page offset in the cache address is the same as the page offset in the virtual address requested by the CPU 2.

図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 TLB 3, the page mapping cache 6 can be accessed with the cache address information, so that the access efficiency is improved, but the memory capacity of the page mapping cache 6 ( As the number of page entries) increases, the cache address information to be stored in the TLB 3 increases, and the TLB 3 increases in capacity and takes longer to search. Therefore, when the memory capacity of the page mapping cache 6 is large, the cache address information may be deleted from the TLB 3 to reduce the information amount of the TLB 3. However, in this case, since the page mapping cache 6 must be accessed using the physical address of the TLB 3, access takes longer than when the TLB 3 includes cache address information.

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 CPU 2 is switched, it is necessary to rewrite (flash) the information in the TLB 3. This is because the correspondence between the virtual address and the physical address is different for each task, and the physical address is different even for the same virtual address. For this reason, when the task is switched, all page entries of the TLB 3 need to be invalidated. If the size of the TLB 3 is small, it is not a big problem, but if the size of the TLB 3 is large, it takes a long time to update the TLB 3, so that the processing delay of the CPU 2 occurs. In order to eliminate such a processing delay, an address space ID (ASID) for identifying the virtual space of each task is provided, and if the page information is stored for each address space ID in the TLB 3 in advance, the task is switched. There is no need to flush TLB3 every time.

また、ページマッピングキャッシュ6の容量が増大すると、TLB3のエントリ数も増えるため、TLB3の検索遅延が生じてしまう。そこで、TLB3のエントリ数が多い場合は、TLB3を複数の階層構造にしたり、仮想アドレス情報VPNの一部のビット(例えば下位側10ビット)をインデックスにしたセットアソシアティブ構成にして、TLB3の検索遅延を削減するのが望ましい。   Further, when the capacity of the page mapping cache 6 is increased, the number of entries in the TLB 3 is also increased, so that a search delay of the TLB 3 occurs. Therefore, when the number of TLB3 entries is large, the TLB3 has a plurality of hierarchical structures, or has a set associative configuration in which some bits (for example, the lower 10 bits) of the virtual address information VPN are used as indexes, and the TLB3 search delay It is desirable to reduce

図4はセットアソシアティブ構成のTLB3の内部構成を示す図である。図4のTLB3は、仮想アドレス情報VPNの一部のビットをインデックスにして、複数のウェイを有する。セットアソシアティブのインデックスとして用いる仮想アドレス情報VPNの一部のビット(例えば下位側10ビット)は、同一セット内では重複しているが、仮想アドレス情報VPNの残りのビットはウェイ毎に異なる。そのためTLB3が出力する物理アドレス情報PPNはそれぞれ異なっている。   FIG. 4 is a diagram illustrating an internal configuration of the TLB 3 having a set associative configuration. The TLB 3 in FIG. 4 has a plurality of ways by using some bits of the virtual address information VPN as an index. Some bits (for example, lower 10 bits) of the virtual address information VPN used as the set associative index are duplicated in the same set, but the remaining bits of the virtual address information VPN are different for each way. Therefore, the physical address information PPN output from the TLB 3 is different.

図4のTLB3では、CPU2が読み出し要求をした仮想アドレスの一部によりTLB3内のセットを選択し、仮想アドレスの残りの部分が選択したセット内の各ウェイが保持している仮想アドレス情報VPNと一致する場合には、対応する物理アドレス情報PPNを出力する。   In the TLB 3 in FIG. 4, the CPU 2 selects a set in the TLB 3 based on a part of the virtual address requested to be read, and the remaining part of the virtual address is the virtual address information VPN held by each way in the selected set. If they match, the corresponding physical address information PPN is output.

図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 CPU 2 according to the first embodiment issues a read request address. First, it is determined whether or not the read request address issued by the CPU 2 hits the virtual address information VPN in the TLB 3 (step S1). If there is no hit, the address translation information is loaded from a page table entry (PTE) (not shown) in the main memory 7 and the information in the TLB 3 is updated (step S2). These processes in steps S1 and S2 correspond to the first process.

ステップ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 CPU 2 hits the tag information in the L1 cache 4 (step S3). If there is a hit, the corresponding data stored in the L1 cache 4 is read out and transferred to the CPU 2, and the processing of FIG. 5 is terminated (step S4). If the index of the L1 cache 4 is composed of addresses in the page, it is possible to access the tag memory of the L1 cache 4 speculatively at the same time as the first processing. The determination must be after the end of the first process.

ステップ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 CPU 2 hits the tag information in the L2 cache 5 (step S5). If there is a hit, the data stored in the L2 cache 5 is read out and transferred to the CPU 2, and the process of FIG. 5 is terminated (step S6). These processes in steps S3 to S6 correspond to the second process.

ステップ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 TLB 3 whether or not the data corresponding to the read request address issued by the CPU 2 is stored in the page mapping cache 6 (step S7). ). If it is stored, the data for the page corresponding to this address is read from the page mapping cache 6 and transferred to the CPU 2, and the data for the cache line corresponding to this address is transferred to the L1 cache 4 and L2 cache 5. (Step S8). The processes in steps S7 and S8 correspond to the third process.

ステップ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 CPU 2 is read from the main memory 7 and transferred to the CPU 2, and the data for the page corresponding to this address is transferred to the page mapping cache. 6 and the data for the cache line corresponding to this address is transferred to the L1 cache 4 and the L2 cache 5, and the TLB 3 is updated (step S9). The process in step S9 corresponds to the fourth process.

このように、第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 page mapping cache 6 having a larger capacity than the L1 cache 4 and the L2 cache 5 and capable of being accessed faster than the main memory 7 is provided. Information is stored in the existing TLB 3 in units of pages. By storing tag information in the TLB 3 in page units, the amount of information can be reduced compared to storing tag information in cache line units as in the L1 cache 4 and L2 cache 5, and a dedicated tag memory is provided in the page mapping cache 6. There is no need to provide it. That is, according to the present embodiment, tag information of the large-capacity and high-speed page mapping cache 6 can be stored in the existing TLB 3.

また、本実施形態では、ページマッピングキャッシュ6よりも優先してL1キャッシュ4とL2キャッシュ5にアクセスするため、L1キャッシュ4とL2キャッシュ5に迅速にアクセスできる。さらに、L1キャッシュ4とL2キャッシュ5に入りきれないデータを大容量かつ高速のページマッピングキャッシュ6に格納するため、メインメモリ7にアクセスするよりも高速にデータの読み書きを行える。   In this embodiment, since the L1 cache 4 and the L2 cache 5 are accessed in preference to the page mapping cache 6, the L1 cache 4 and the L2 cache 5 can be accessed quickly. Furthermore, since data that cannot be stored in the L1 cache 4 and the L2 cache 5 is stored in the large-capacity and high-speed page mapping cache 6, data can be read / written faster than accessing the main memory 7.

また、本実施形態では、TLB3の内部に、ページマッピングキャッシュ6用のキャッシュアドレス情報を有するため、L2キャッシュ5にヒットしなかったときに、このキャッシュアドレス情報を用いて、ページマッピングキャッシュ6から迅速に所望のデータを読み出すことができる。   In the present embodiment, since the TLB 3 has cache address information for the page mapping cache 6, when the L2 cache 5 is not hit, the cache address information is used to quickly retrieve the page mapping cache 6. Desired data can be read out.

(第2の実施形態)
以下に説明する第2の実施形態は、L2キャッシュ5とページマッピングキャッシュ6へのアクセスを並列化するものである。
(Second Embodiment)
In the second embodiment described below, access to the L2 cache 5 and the page mapping cache 6 is parallelized.

本実施形態は、ページマッピングキャッシュ6のアクセスレイテンシがL2キャッシュ5に匹敵するほど高速である場合、あるいはページマッピングキャッシュ6のメモリ容量がL2キャッシュ5のメモリ容量の数倍から数十倍の場合に特に有効である。   In the present embodiment, when the access latency of the page mapping cache 6 is as high as that of the L2 cache 5, or when the memory capacity of the page mapping cache 6 is several times to several tens of times the memory capacity of the L2 cache 5. It is particularly effective.

ページマッピングキャッシュ6とL2キャッシュ5は、それぞれ異なる物理アドレスのデータを格納する。すなわち、ページマッピングキャッシュ6とL2キャッシュ5は、互いに排他的にデータを格納する。   The page mapping cache 6 and the L2 cache 5 store data of different physical addresses. That is, the page mapping cache 6 and the L2 cache 5 store data exclusively from each other.

本実施形態のページマッピングキャッシュ6は、ページ全体に渡ってアクセスが頻繁に発生するデータを格納する。これに対して、L2キャッシュ5は、ページ内のある特定のラインだけアクセスが頻発する場合にこのラインのデータを格納する。   The page mapping cache 6 of the present embodiment stores data that frequently occurs throughout the page. On the other hand, the L2 cache 5 stores data of this line when access frequently occurs only for a specific line in the page.

このように、本実施形態では、一つのページ内で、ページマッピングキャッシュ6とL2キャッシュ5のどちらにデータを格納するかを動的に切り替える。   As described above, in this embodiment, in one page, the page mapping cache 6 or the L2 cache 5 is dynamically switched to store data.

図6は第2の実施形態に係るプロセッサシステム1の概略構成を示すブロック図である。図6のプロセッサシステム1は、CPU2によりL2キャッシュ5とページマッピングキャッシュ6が並列的にアクセスされることが図1と異なっている。   FIG. 6 is a block diagram showing a schematic configuration of the processor system 1 according to the second embodiment. The processor system 1 in FIG. 6 is different from that in FIG. 1 in that the CPU 2 accesses the L2 cache 5 and the page mapping cache 6 in parallel.

図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 TLB 3, the cache memories 4 to 6, and the main memory 7 in the second embodiment. As shown in the figure, the CPU 2 accesses the TLB 3 and the L1 cache 4 in this order. After the L1 cache 4, the CPU 2 accesses the L2 cache 5 and the page mapping cache 6 in parallel, and then accesses the main memory 7.

図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 TLB 3 in the second embodiment. The TLB 3 in FIG. 8 has an access map for each page in addition to the configuration of the TLB 3 in FIG. The access map has, for example, bits for all lines in the page for each page. When data is stored in the L2 cache 5, the bit of the corresponding line is set to 1, for example. Then, when the number of bits that are 1 out of all bits for one page in the access map exceeds a predetermined threshold, the page is stored in the page mapping cache 6 and L2 Corresponding data in the cache 5 is invalidated.

図8のTLB3は、図2のTLB3と同様に、ページマッピングキャッシュ6にアクセスするためのキャッシュアドレス情報を有するが、このキャッシュアドレス情報は必ずしも必須ではない。また、ページマッピングキャッシュ6のエントリ数が多い場合には、TLB3をセットアソシアティブ構成にしてもよい。また、データがL2キャッシュ5に格納されているときはキャッシュアドレス情報が不要で、反対に、データがページマッピングキャッシュ6に格納されている時は、アクセスマップは不要となるので、TLB3内のアクセスアップ用のビットとキャッシュアドレス情報用のビットを共有することができ、TLB3の容量を節約することができる。   The TLB 3 in FIG. 8 has cache address information for accessing the page mapping cache 6 in the same manner as the TLB 3 in FIG. 2, but this cache address information is not always essential. If the number of entries in the page mapping cache 6 is large, the TLB 3 may be set associative. Further, when the data is stored in the L2 cache 5, the cache address information is not required. On the contrary, when the data is stored in the page mapping cache 6, the access map is not required. The up bit and the cache address information bit can be shared, and the capacity of the TLB 3 can be saved.

図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 CPU 2 according to the second embodiment issues a read request address. Steps S11 to S14 are the same as steps S1 to S4 in FIG. If it is determined in step S13 that the L1 cache 4 has not been hit, whether or not the data corresponding to the read request address is stored in the page mapping cache 6 is determined based on the flag information held in the TLB 3 (step S15). ). If it is stored, the data for the page corresponding to this address is read from the page mapping cache 6 and transferred to the CPU 2, and the data for the cache line corresponding to this address is transferred to the L1 cache 4 (step S16). ). The processes in steps S11 and S12 correspond to the first process. The processes of steps S13 and S14 correspond to the second process. The processes of steps S15 and S16 correspond to the third process.

ステップ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 CPU 2 hits the tag information in the L2 cache 5 (step S17). If there is a hit, the data stored in the L2 cache 5 is read and transferred to the CPU 2 (step S18). The processing in steps S17 and S18 corresponds to the fourth processing. In step S15, since necessary information is read from the TLB 3 in advance when the TLB 3 is accessed in step S11, the access timing to the L2 cache 5 is delayed compared to a memory system that does not have the page mapping cache 6. There is nothing.

ステップ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 CPU 2 is read from the main memory 7 and transferred to the CPU 2, and the data for the page corresponding to this address is transferred to the page mapping cache 6 And data for the cache line corresponding to this address is transferred to the L1 cache 4 and the L2 cache 5 (step S19). The process in step S19 corresponds to the fifth process.

次に、TLB3内のアクセスマップの対応ページをチェックする(ステップS20)。すなわち、メインメモリ7から読み出したデータをL2キャッシュ5に書き込んで、TLB3内のアクセスマップを更新した場合に、アクセスマップ内の対応ページのビットが1になった数が閾値を超えるか否かをチェックする(ステップS20、S21)。   Next, the corresponding page of the access map in the TLB 3 is checked (step S20). That is, when the data read from the main memory 7 is written in the L2 cache 5 and the access map in the TLB 3 is updated, whether or not the number of bits of the corresponding page in the access map becomes 1 exceeds the threshold value. Check (steps S20 and S21).

閾値を超えると判定された場合は、対応ページ内の全ラインのデータを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 L2 cache 5 and the main memory 7 to the page mapping cache 6, and the data in the L2 cache 5 of all lines in the corresponding page is invalidated. , TLB3 is updated. At this time, the data evicted in the page mapping cache 6 is written back to the main memory 7 as necessary. Further, the data corresponding to the read request address issued by the CPU 2 is transferred to the L1 cache 4 (step S22). The processes in steps S20 to S22 correspond to the sixth process.

ステップ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 CPU 2 is transferred to the L1 cache 4 and the L2 cache 5 (step S23). The process in step S23 corresponds to the seventh process.

このように、第2の実施形態では、L2キャッシュ5とページマッピングキャッシュ6へのアクセスを並列化して行うため、対応ページの全体に渡ってアクセスが頻繁に発生するか、対応ページ内の特定のラインにアクセスが集中するかによって、L2キャッシュ5とページマッピングキャッシュ6のどちらにデータを格納するかを切り替えることができる。よって、L2キャッシュ5とページマッピングキャッシュ6を効率よく使い分けることができる。   As described above, in the second embodiment, since the access to the L2 cache 5 and the page mapping cache 6 is performed in parallel, access frequently occurs over the entire corresponding page or a specific page in the corresponding page is specified. Whether the data is stored in the L2 cache 5 or the page mapping cache 6 can be switched depending on whether access concentrates on the line. Therefore, the L2 cache 5 and the page mapping cache 6 can be used efficiently.

(第3の実施形態)
以下に説明する第3の実施形態は、TLB3とは別個に、ページテーブルを備えるものである。ページマッピングキャッシュ6のエントリ数が増えると、すべてのエントリに関するアドレス変換情報やフラグ情報等をTLB3に格納しきれなくなるおそれがある。そこで、本実施形態では、TLB3に入りきれなかった情報をページテーブルに格納する。
(Third embodiment)
In the third embodiment described below, a page table is provided separately from the TLB 3. When the number of entries in the page mapping cache 6 increases, there is a possibility that address translation information, flag information, etc. relating to all entries cannot be stored in the TLB 3. Therefore, in the present embodiment, information that could not fit in the TLB 3 is stored in the page table.

図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 processor system 1 according to the third embodiment. In the processor system 1 of FIG. 10, a page table 10 is newly arranged between the L2 cache 5 and the page mapping cache 6 as compared with FIG. The page table 10 stores address conversion information, flag information, etc. that could not be stored in the TLB 3. Therefore, the page table 10 basically has the same internal configuration as the TLB 3. Similar to the page mapping cache 6, the page table 10 is configured by a memory (for example, MRAM) that can be accessed at a higher speed than the main memory 7.

図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 TLB 3, the page table 10, the cache memories 4 to 6 and the main memory 7 in the third embodiment. As illustrated, the CPU 2 accesses the TLB 3, the L1 cache 4, the L2 cache 5, the page table 10, the page mapping cache 6, and the main memory 7 in this order.

CPU2の読み出し要求アドレスがTLB3にヒットしなかったときに、メインメモリ7にアクセスする前に、ページテーブル10内を検索し、ページテーブル10にヒットすれば、メインメモリ7にアクセスせずにアドレス変換情報をロードすることができ、L1キャッシュ4、L2キャッシュ5に該当データがなかった場合、対応データをページマッピングキャッシュ6から取り出す。これにより、メインメモリ7へのアクセス頻度を減らすことができる。   When the read request address of the CPU 2 does not hit the TLB 3, the page table 10 is searched before accessing the main memory 7. If the page table 10 is hit, the address conversion is performed without accessing the main memory 7. When the information can be loaded and there is no corresponding data in the L1 cache 4 and the L2 cache 5, the corresponding data is retrieved from the page mapping cache 6. Thereby, the access frequency to the main memory 7 can be reduced.

ページテーブル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 TLB 3 and desirably has cache address information for directly accessing the page mapping cache 6. Further, when the number of entries in the page mapping cache 6 is large, it is desirable that the page table 10 has a set associative configuration. In addition, when the task executed by the CPU 2 is switched, an address space ID (ASID) is assigned to each task to manage address conversion information so that the entire page table 10 need not be invalidated and updated. Also good.

図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 CPU 2 according to the third embodiment issues a read request address. Steps S31 to S36 are the same as steps S1 to S6 in FIG. Steps S31 and S32 correspond to the first process. Steps S33 to S36 correspond to the second process.

ステップ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 L2 cache 5 has been missed, it is determined whether or not the read request address of the CPU 2 has hit the page table 10 (step S37). If it is determined that there is a hit, the corresponding data is read from the page mapping cache 6 and transferred to the CPU 2, and the data for the cache line corresponding to the read request address is transferred to the L1 cache 4 and the L2 cache 5 (step S38). ). Steps S37 and S38 correspond to the third process.

ステップ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 CPU 2 is read from the main memory 7 and transferred to the CPU 2, and the data for the page corresponding to this address is stored in the page mapping cache 6. The data for the cache line corresponding to this address is transferred to the L1 cache 4 and the L2 cache 5, and the TLB 3 and the page table 10 are updated (step S39). Step S39 corresponds to the fourth process.

このように、第3の実施形態では、TLB3とは別個にページテーブル10を設けるため、ページマッピングキャッシュ6のエントリ数が増えて、アドレス変換情報等をTLB3に格納しきれなくなっても、ページテーブル10に格納でき、ページマッピングキャッシュ6の大容量化に対応可能となる。   As described above, in the third embodiment, since the page table 10 is provided separately from the TLB 3, even if the number of entries in the page mapping cache 6 increases and the address translation information cannot be stored in the TLB 3, the page table 10, and the capacity of the page mapping cache 6 can be increased.

(第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 CPU 2 first accesses the TLB 3 and then accesses each of the cache memories 4 to 6 and the main memory 7 in order. For this reason, when the capacity of the TLB 3 is increased, it takes time to search in the TLB 3, and the L1 cache 4 cannot be quickly accessed. Therefore, in the following fourth embodiment, the CPU 2 accesses the L1 cache 4 before the TLB 3.

図13は第4の実施形態に係るプロセッサシステム1の概略構成を示すブロック図、図14は第4の実施形態におけるTLB3、各キャッシュメモリおよびメインメモリ7のアクセス優先度を示す図である。本実施形態では、図6および図7と比較して、L1キャッシュ4とTLB3を入れ替えている。   FIG. 13 is a block diagram showing a schematic configuration of the processor system 1 according to the fourth embodiment, and FIG. 14 is a diagram showing access priorities of the TLB 3, each cache memory, and the main memory 7 in the fourth embodiment. In the present embodiment, the L1 cache 4 and the TLB 3 are interchanged as compared with FIGS.

CPU2は、読み出し要求アドレスを発行したときに、まずはL1キャッシュ4にアクセスする。図13のL1キャッシュ4は、CPU2が発行した仮想アドレスからなる読み出し要求アドレスで直接アクセス可能とされている。L1キャッシュ4にミスした場合に、CPU2はTLB3にアクセスすることになる。   When the CPU 2 issues a read request address, it first accesses the L1 cache 4. The L1 cache 4 in FIG. 13 can be directly accessed with a read request address composed of a virtual address issued by the CPU 2. When the L1 cache 4 misses, the CPU 2 accesses the TLB 3.

本実施形態のように、L1キャッシュ4に仮想アドレスでアクセスする場合、CPU2がタスクを切り替えると、L1キャッシュ4全体を無効化(フラッシュ)しなければならない。ただし、L1キャッシュ4に格納されているデータは、L2キャッシュ5とページマッピングキャッシュ6のどちらかに格納されているため、メインメモリ7にアクセスする必要はほとんどなく、高速にアドレス空間の切替を行うことができる。   When accessing the L1 cache 4 with a virtual address as in this embodiment, when the CPU 2 switches tasks, the entire L1 cache 4 must be invalidated (flushed). However, since the data stored in the L1 cache 4 is stored in either the L2 cache 5 or the page mapping cache 6, there is almost no need to access the main memory 7, and the address space is switched at high speed. be able to.

図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 CPU 2 according to the fourth embodiment issues a read request address. The flowchart in FIG. 15 has a configuration in which the determination processes in steps S11 and S13 in FIG. 9 are interchanged as compared with the flowchart in FIG. That is, it is determined whether or not the read request address issued by the CPU 2 hits the L1 cache 4 (step S41). If it hits, the data read from the L1 cache 4 is transferred to the CPU 2 (step S42). If there is no hit, it is determined whether or not the read request address issued by the CPU 2 hits the TLB 3 (step S43). If there is no hit, the address conversion information is loaded from the page table entry in the main memory 7 and the TLB 3 is loaded. The data inside is updated (step S44). Steps S41 and S42 correspond to the first process. Steps S43 and S44 correspond to the second process.

ステップ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 TLB 3 determines whether data corresponding to the read request address issued by the CPU 2 is stored in the page mapping cache 6. A determination is made based on the held flag information (step S45). Thereafter, the same processing as that after step S17 in FIG. 9 is performed (steps S46 to S53). Steps S45 and S46 correspond to the third process. Steps S47 and S48 correspond to the fourth process. Step S49 corresponds to the fifth process. Steps S50 to S52 correspond to the sixth process. Step S53 corresponds to the seventh process.

本実施形態においても、TLB3にアドレス空間識別ID(ASID)を設けて、各タスクごとにアドレス変換情報等を管理してもよい。   Also in this embodiment, an address space identification ID (ASID) may be provided in the TLB 3 to manage address conversion information and the like for each task.

図13は、L2キャッシュ5とページマッピングキャッシュ6が並列化している例を示したが、図1や図10のように、L2キャッシュ5とページマッピングキャッシュ6が並列化していない場合において、L1キャッシュ4とTLB3のアクセス順序を入れ替えてもよい。   FIG. 13 shows an example in which the L2 cache 5 and the page mapping cache 6 are parallelized. However, when the L2 cache 5 and the page mapping cache 6 are not paralleled as shown in FIG. 1 and FIG. 4 and TLB3 access order may be interchanged.

このように、第4の実施形態では、TLB3よりも先にL1キャッシュ4にアクセスするようにしたため、TLB3が大容量化してTLB3のアクセスに時間がかかる場合でも、L1キャッシュ4に迅速にアクセスできる。   As described above, in the fourth embodiment, since the L1 cache 4 is accessed before the TLB 3, the L1 cache 4 can be quickly accessed even when the TLB 3 has a large capacity and takes time to access the TLB 3. .

なお、L1キャッシュ4だけでなく、L2キャッシュ5も、TLB3より先にアクセスするようにしてもよい。   Note that not only the L1 cache 4 but also the L2 cache 5 may be accessed before the TLB 3.

上述した実施形態では、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 L1 cache 4 and the L2 cache 5 that are two-level cache memories are provided has been described, but a cache memory having three or more levels may be provided. k (all integers from k = 1 to n, where n is an integer equal to or greater than 1) When the next cache memory is provided, the process of FIG. 5 accesses the page mapping cache 6 when all the cache memories miss. Will do. In the process of FIG. 9, after a miss in step S <b> 15, if a miss occurs in all higher-order cache memories higher than the L2 cache 5, the processes after step S <b> 19 are performed. In the process of FIG. 12, the process of step S37 is performed after making a miss in all the cache memories. In the process of FIG. 15, after a miss in step S <b> 45, if all of the higher-order cache memories higher than the L2 cache 5 miss, the process from step S <b> 49 is performed.

上述した各実施形態では、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 memory control circuit 1 may be built in the L1 cache 46 or the L2 cache 57. Furthermore, in each of the above-described embodiments, when the power to a specific memory is shut off, the power can be shut down among the n-order cache memory and the main memory 78 other than the specific memory (n is an integer of 2 or more). A part or all of the memory may be blocked at once. Alternatively, the power-off timing may be individually controlled for each of the non-volatile cache memories including the specific memory.

上述した実施形態で説明したプロセッサシステム1の少なくとも一部は、ハードウェアで構成してもよいし、ソフトウェアで構成してもよい。ソフトウェアで構成する場合には、プロセッサシステム1の少なくとも一部の機能を実現するプログラムをフレキシブルディスクやCD−ROM等の記録媒体に収納し、コンピュータに読み込ませて実行させてもよい。記録媒体は、磁気ディスクや光ディスク等の着脱可能なものに限定されず、ハードディスク装置やメモリなどの固定型の記録媒体でもよい。   At least a part of the processor system 1 described in the above-described embodiment may be configured by hardware or software. When configured by software, a program for realizing at least a part of the functions of the processor system 1 may be stored in a recording medium such as a flexible disk or a CD-ROM, and read and executed by a computer. The recording medium is not limited to a removable medium such as a magnetic disk or an optical disk, but may be a fixed recording medium such as a hard disk device or a memory.

また、プロセッサシステム1の少なくとも一部の機能を実現するプログラムを、インターネット等の通信回線(無線通信も含む)を介して頒布してもよい。さらに、同プログラムを暗号化したり、変調をかけたり、圧縮した状態で、インターネット等の有線回線や無線回線を介して、あるいは記録媒体に収納して頒布してもよい。   Further, a program for realizing at least a part of the functions of the processor system 1 may be distributed via a communication line (including wireless communication) such as the Internet. Further, the program may be distributed in a state where the program is encrypted, modulated or compressed, and stored in a recording medium via a wired line such as the Internet or a wireless line.

本発明の態様は、上述した個々の実施形態に限定されるものではなく、当業者が想到しうる種々の変形も含むものであり、本発明の効果も上述した内容に限定されない。すなわち、特許請求の範囲に規定された内容およびその均等物から導き出される本発明の概念的な思想と趣旨を逸脱しない範囲で種々の追加、変更および部分的削除が可能である。   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=1からnまでのすべての整数、nは1以上の整数)のキャッシュメモリと、
前記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.
前記トランスレーション・ルックアサイド・バッファは、前記k次のキャッシュメモリよりも先に、プロセッサによりアクセスされる請求項1に記載のキャッシュメモリシステム。   The cache memory system according to claim 1, wherein the translation lookaside buffer is accessed by a processor prior to the k-th order cache memory. 前記k次のキャッシュメモリは、前記大容量キャッシュメモリよりも優先してプロセッサによりアクセスされる請求項2に記載のキャッシュメモリシステム。   The cache memory system according to claim 2, wherein the k-th cache memory is accessed by a processor in preference to the large-capacity cache memory. 前記大容量キャッシュメモリは、前記k次のキャッシュメモリに格納されているすべてのデータを格納する請求項2または3に記載のキャッシュメモリシステム。   The cache memory system according to claim 2 or 3, wherein the large-capacity cache memory stores all data stored in the kth-order cache memory. 前記トランスレーション・ルックアサイド・バッファは、プロセッサにより、前記k次のキャッシュメモリの中の1次のキャッシュメモリの次にアクセスされる請求項1に記載のキャッシュメモリシステム。   The cache memory system according to claim 1, wherein the translation lookaside buffer is accessed by a processor next to a primary cache memory in the k-th cache memory. 前記大容量キャッシュメモリは、前記k次のキャッシュメモリの中の1次のキャッシュメモリ以外のすべてのキャッシュメモリに格納されているすべてのデータを格納する請求項5に記載のキャッシュメモリシステム。   The cache memory system according to claim 5, wherein the large-capacity cache memory stores all data stored in all cache memories other than the primary cache memory in the k-th cache memory. 前記k次のキャッシュメモリの中の1次のキャッシュメモリよりも高次の特定のキャッシュメモリと、前記大容量キャッシュメモリとは、プロセッサにより並行してアクセスされ、
前記特定のキャッシュメモリと前記大容量キャッシュメモリとは、互いに異なるアドレスに対応するデータを格納する請求項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.
前記トランスレーション・ルックアサイド・バッファは、各ページ内のキャッシュラインごとに前記特定のキャッシュメモリにデータが格納されているか否かを示す情報をページ単位で格納するアクセスマップを有する請求項7に記載のキャッシュメモリシステム。   The said translation lookaside buffer has an access map which stores the information which shows whether the data are stored in the said specific cache memory for every cache line in each page per page. Cache memory system. 前記トランスレーション・ルックアサイド・バッファは、前記大容量キャッシュメモリをアクセスするためのアドレス情報をページ単位で格納する請求項1乃至8のいずれかに記載のキャッシュメモリシステム。   9. The cache memory system according to claim 1, wherein the translation lookaside buffer stores address information for accessing the large-capacity cache memory in units of pages. 前記トランスレーション・ルックアサイド・バッファは、前記大容量キャッシュメモリ内のデータを前記メインメモリに書き戻したか否かを示すダーティ情報をページ単位で有する請求項1乃至9のいずれかに記載のキャッシュメモリシステム。   The cache memory according to claim 1, wherein the translation lookaside buffer has dirty information indicating whether data in the large-capacity cache memory is written back to the main memory in units of pages. system. 前記トランスレーション・ルックアサイド・バッファは、仮想アドレスの一部のビットをインデックスとしたセットアソシアティブ構成を有する請求項1乃至10のいずれかに記載のキャッシュメモリシステム。   11. The cache memory system according to claim 1, wherein the translation lookaside buffer has a set associative configuration using a part of bits of a virtual address as an index. 前記トランスレーション・ルックアサイド・バッファに格納しきれなかったアドレス変換情報およびフラグ情報を格納する、前記メインメモリよりも高速アクセスが可能なページテーブルを備える請求項1乃至11のいずれかに記載のキャッシュメモリシステム。   12. The cache according to claim 1, further comprising a page table storing address translation information and flag information that could not be stored in the translation lookaside buffer and capable of being accessed faster than the main memory. Memory system. 前記ページテーブルは、プロセッサにより、前記k次のキャッシュメモリへのアクセスの後にアクセスされ、
前記大容量キャッシュメモリは、プロセッサにより、前記ページテーブルへのアクセスの後にアクセスされる請求項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.
前記k次のキャッシュメモリの中の1次のキャッシュメモリよりも高次の特定のキャッシュメモリと、前記大容量キャッシュメモリとは、プロセッサにより並行してアクセスされ、
前記トランスレーション・ルックアサイド・バッファは、各ページ内のキャッシュラインごとに前記特定のキャッシュメモリにデータが格納されているか否かを示す情報をページ単位で格納するアクセスマップを有し、
前記プロセッサは、
読み出し要求アドレスが前記トランスレーション・ルックアサイド・バッファにヒットしたか否かを判定し、ヒットしなければ、前記メインメモリから前記読み出し要求アドレスに関するアドレス変換情報をロードして前記トランスレーション・ルックアサイド・バッファを更新する第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次のキャッシュメモリよりも高次の特定のキャッシュメモリと、前記大容量キャッシュメモリとは、プロセッサにより並行してアクセスされ、
前記トランスレーション・ルックアサイド・バッファは、各ページ内のキャッシュラインごとに前記特定のキャッシュメモリにデータが格納されているか否かを示す情報をページ単位で格納するアクセスマップを有し、
前記プロセッサは、
前記読み出し要求アドレスに対応するデータが前記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.
JP2013196128A 2013-09-20 2013-09-20 Cache memory system and processor system Active JP6088951B2 (en)

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)

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

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

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