JP2015121945A - Cache device, computer with cache device, and cache control method - Google Patents

Cache device, computer with cache device, and cache control method Download PDF

Info

Publication number
JP2015121945A
JP2015121945A JP2013265377A JP2013265377A JP2015121945A JP 2015121945 A JP2015121945 A JP 2015121945A JP 2013265377 A JP2013265377 A JP 2013265377A JP 2013265377 A JP2013265377 A JP 2013265377A JP 2015121945 A JP2015121945 A JP 2015121945A
Authority
JP
Japan
Prior art keywords
page
address
cache
array
snoop
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2013265377A
Other languages
Japanese (ja)
Other versions
JP6272011B2 (en
Inventor
雅則 数野
Masanori Kazuno
雅則 数野
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.)
NEC Platforms Ltd
Original Assignee
NEC Platforms Ltd
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 NEC Platforms Ltd filed Critical NEC Platforms Ltd
Priority to JP2013265377A priority Critical patent/JP6272011B2/en
Publication of JP2015121945A publication Critical patent/JP2015121945A/en
Application granted granted Critical
Publication of JP6272011B2 publication Critical patent/JP6272011B2/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/0815Cache consistency protocols
    • G06F12/0831Cache consistency protocols using a bus scheme, e.g. with bus monitoring or watching means
    • 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/10Providing a specific technical effect
    • G06F2212/1048Scalability

Abstract

PROBLEM TO BE SOLVED: To reduce the number of times snoop is performed with respect to a memory exclusively used by one processor for a predetermined period of time in a multiprocessor system.SOLUTION: Cache devices are provided in correspondence with the processors in a computer which comprises: a memory unit including shared pages divided into pages with blocks and shared by a plural processors and exclusive pages exclusively used by one processor for a predetermined period of time; and a plurality of processors. The cache devices comprise management means and cache arrays, the management means 1) receiving from its corresponding processor an address of an area in the exclusive pages, sending a snoop request for a page including the area to other devices, and storing the address of the block including the area and the latest data in a cache array of the own device, and 2) receiving a snoop request for a page from other devices, and deleting all the blocks contained in the specified page from the cache array of the own device.

Description

本発明は、キャッシュ装置、キャッシュ装置を備えるコンピュータ、および、キャッシュ制御方法、特に、キャッシュのコヒーレンシを保つキャッシュ装置、キャッシュ装置を備えるコンピュータ、および、キャッシュ制御方法に関する。   The present invention relates to a cache device, a computer including the cache device, and a cache control method, and more particularly to a cache device that maintains cache coherency, a computer including the cache device, and a cache control method.

プロセッサに対応してキャッシュメモリを有するマルチプロセッサ装置は、キャッシュメモリ間のコヒーレンシを保つ必要がある。この為の技術には、以下のようなものが有る。   A multiprocessor device having a cache memory corresponding to a processor needs to maintain coherency between cache memories. Techniques for this purpose include the following.

特許文献1は、キャッシュの単位に、メモリデータのコピーを持つプロセッサを表す情報を管理する細粒度スヌープフィルタと、キャッシュの単位より大きな分割単位ごとに、当該分割単位のデータコピーがプロセッサにキャッシュされていることを示す粗粒度スヌープフィルタを備えるコンピュータシステムを開示する。このコンピュータシステムは、両フィルタを用いることにより、メモリコピーを保持しているプロセッサ以外のプロセッサに対するスヌープ発行数を減らす。   Patent Document 1 discloses a fine-grained snoop filter that manages information representing a processor having a copy of memory data in a cache unit, and a data copy of the division unit is cached in the processor for each division unit larger than the cache unit. A computer system comprising a coarse-grained snoop filter indicating that This computer system uses both filters to reduce the number of snoops issued to processors other than the processor holding the memory copy.

特許文献2は、ディレクトリ方式でコヒーレンシを制御するマルチプロセッサ装置を開示する。この装置は、キャッシュラインを分割したサブライン単位でデータのシェア状態をディレクトリに登録し、その状態に応じて、キャッシュメモリの無効化をキャッシュライン単位またはサブライン単位で行う。この装置は、これにより無効化処理の回数を減らす。   Patent Document 2 discloses a multiprocessor device that controls coherency in a directory system. This apparatus registers a data sharing state in a directory in units of sublines obtained by dividing a cache line, and invalidates the cache memory in units of cache lines or sublines according to the state. This apparatus thereby reduces the number of invalidation processes.

特許文献3は、CPU(Central Processing Unit)と同じデータをアクセスしないアクセラレータ用のキャッシュ一貫性を維持するシステムを開示する。   Patent Document 3 discloses a system that maintains cache coherency for an accelerator that does not access the same data as a CPU (Central Processing Unit).

特許文献4は、圧縮ディレクトリを用いて、キャッシュのコヒーレンシを保つマルチプロセッサシステムを開示する。このシステムは、それによりディレクトリ要領を削減する。   Patent Document 4 discloses a multiprocessor system that uses a compressed directory to maintain cache coherency. This system thereby reduces directory requirements.

特許文献5は、ページ内にダーティデータが不連続に存在してもライトバックの回数を抑えることを目的とした、ディスクキャッシュの制御方法を開示する。   Patent Document 5 discloses a disk cache control method for the purpose of suppressing the number of write backs even if dirty data is discontinuously present in a page.

特許文献6は、共有メモリ管理手段と専用メモリ管理手段を有するコンピュータを開示する。   Patent Document 6 discloses a computer having shared memory management means and dedicated memory management means.

特開2008-3アドレス変換部10414号公報JP 2008-3 ADDRESS CONVERTER 10414 特許第3875749号公報Japanese Patent No. 3875749 特開20メモリ制御部12181860号公報JP 20 Memory Control Unit 12181860 特開平8-263374号公報JP-A-8-263374 特開2006-163474号公報JP 2006-163474 A 特開2009-087189号公報JP 2009-087189 A

上記特許文献1の技術は、キャッシュの単位(キャッシュライン)ごとにスヌープを行う必要がありスヌープ回数が多く、性能劣化を発生する。本発明は、この課題を解決することを目的とする。なお、特許文献2乃至6の技術は、何れも、スヌープ回数の制御に関係しない。   In the technique of Patent Document 1, it is necessary to snoop for each cache unit (cache line), and the number of snoops is large, resulting in performance degradation. The present invention aims to solve this problem. None of the techniques of Patent Documents 2 to 6 are related to the control of the number of snoops.

本発明の一実施形態にかかるキャッシュ装置は、複数ブロックを含むページに分割され、複数のプロセッサに共有される共有ページと一定期間何れかのプロセッサに占有される排他ページを包含する記憶装置と、前記複数のプロセッサと、を備えるコンピュータに、プロセッサに対応して設けられたキャッシュ装置であって、
1)対応するプロセッサから排他ページ内の領域のアドレスを受信して、前記領域を含むページのスヌープ要求を他装置に送信して、前記領域を含むブロックのアドレスと最新データを自装置のキャッシュアレイに記憶し、2)他装置からページのスヌープ要求を受信して、指定されたページが包含する全てのブロックを自装置のキャッシュアレイから削除する管理手段と、前記キャッシュアレイと、を備える。
A cache device according to an embodiment of the present invention is divided into pages including a plurality of blocks, a storage device including a shared page shared by a plurality of processors and an exclusive page occupied by any processor for a certain period of time, A cache device provided in correspondence with a processor in a computer comprising the plurality of processors,
1) The address of the area in the exclusive page is received from the corresponding processor, the snoop request for the page including the area is transmitted to another apparatus, and the address of the block including the area and the latest data are stored in the cache array of the own apparatus. 2) management means for receiving a page snoop request from another device and deleting all blocks included in the specified page from the cache array of the own device, and the cache array.

本発明の一実施形態にかかるキャッシュ制御方法は、複数ブロックを含むページに分割され、複数のプロセッサに共有される共有ページと一定期間何れかのプロセッサに占有される排他ページを包含する記憶装置と、前記複数のプロセッサと、を備えるコンピュータに、プロセッサに対応して設けられたキャッシュ装置において、
1)対応するプロセッサから排他ページ内の領域のアドレスを受信して、前記領域を含むページのスヌープ要求を他装置に送信して、前記領域を含むブロックのアドレスと最新データを自装置のキャッシュアレイに記憶し、2)他装置からページのスヌープ要求を受信して、指定されたページが包含する全てのブロックを自装置のキャッシュアレイから削除する。
A cache control method according to an embodiment of the present invention includes a storage device that is divided into pages including a plurality of blocks and includes a shared page shared by a plurality of processors and an exclusive page occupied by any processor for a certain period of time. In a cache device provided in correspondence with a processor in a computer comprising the plurality of processors,
1) The address of the area in the exclusive page is received from the corresponding processor, the snoop request for the page including the area is transmitted to another apparatus, and the address of the block including the area and the latest data are stored in the cache array of the own apparatus. 2) When a page snoop request is received from another device, all blocks included in the designated page are deleted from the cache array of the own device.

本発明によれば、マルチプロセッサシステムにおいて、いずれかのプロセッサに一定期間占有されるメモリについて、スヌープの回数を削減することができる。   According to the present invention, in a multiprocessor system, the number of snoops can be reduced for a memory occupied by a certain processor for a certain period.

図1は、プロセスが使用する共有メモリ空間と排他メモリ空間の一例を説明する図である。FIG. 1 is a diagram illustrating an example of a shared memory space and an exclusive memory space used by a process. 図2は、メモリ空間とアドレスの関係を示す。FIG. 2 shows the relationship between the memory space and the address. 図3は、第1の実施の形態のキャッシュ装置100を搭載したコンピュータ506の構成図である。FIG. 3 is a configuration diagram of the computer 506 on which the cache device 100 according to the first embodiment is mounted. 図4は、キャッシュ装置100の内部およびその周辺の構成図である。FIG. 4 is a configuration diagram of the inside of the cache device 100 and its periphery. 図5は、コンピュータ506のページテーブルエントリに格納されるデータを示す図である。FIG. 5 is a diagram illustrating data stored in the page table entry of the computer 506. 図6は、プロセッサ122による記憶装置505のアクセス動作例を示す図である。FIG. 6 is a diagram illustrating an example of an access operation of the storage device 505 by the processor 122. 図7は、管理部120が行うスヌープ動作に関する判定表を示す図である。FIG. 7 is a diagram illustrating a determination table related to the snoop operation performed by the management unit 120. 図8は、第2の実施の形態のキャッシュ装置100の構成図である。FIG. 8 is a configuration diagram of the cache device 100 according to the second embodiment.

<第1の実施の形態>
本実施形態のキャッシュ装置100の構成及び動作を説明する前に、本実施形態に関する、基本的な考え方を説明する。
<First Embodiment>
Before describing the configuration and operation of the cache device 100 of the present embodiment, a basic concept regarding the present embodiment will be described.

マルチプロセッサ構成の情報処理装置において、各プロセッサ(プロセッサ上で動作するプロセス)がアクセスするメモリ空間には2種類ある。一つは、複数プロセッサが同時にアクセスする可能性がある共有メモリ空間であり、他の一つは、一定期間排他的に唯一のプロセッサしかアクセスしない排他メモリ空間である。   In an information processing apparatus having a multiprocessor configuration, there are two types of memory space accessed by each processor (a process operating on the processor). One is a shared memory space that may be accessed by a plurality of processors simultaneously, and the other is an exclusive memory space that is accessed exclusively by a single processor for a certain period of time.

共有メモリ空間は、複数プロセッサ間の制御に使用される空間であり、例えば、各プロセッサで実行されるプロセスの実行順やメモリのアクセス順、共有リソース等を管理する処理を実行する空間である。共有メモリ空間は、性能面ではアクセス帯域よりもレイテンシが求められる。   The shared memory space is a space used for control between a plurality of processors. For example, the shared memory space is a space for executing processing for managing the execution order of processes executed by each processor, the access order of memories, shared resources, and the like. The shared memory space is required to have a latency higher than the access bandwidth in terms of performance.

排他メモリ空間は、一定期間排他的な使用が保証された空間であり、当該期間は同時には唯一のプロセッサ(プロセス)しかアクセスしない。排他メモリ空間は、性能面ではアクセス帯域が求められる。   The exclusive memory space is a space that is guaranteed to be used exclusively for a certain period, and only a single processor (process) is accessed at the same time during the period. The exclusive memory space requires an access bandwidth in terms of performance.

ここで、一定期間とは、例えば、子プロセスが存在する間、子プロセスがあるプロセッサを占有している間、子プロセスの実行があるプロセッサ上でのみ行われている間、を意味する。子プロセスがあるプロセッサを占有している間とは、例えば当該子プロセスが連続して中断することなく実行されている間を意味する。   Here, the certain period means, for example, while a child process exists, while a child process occupies a certain processor, or while a child process is executed only on a processor with which the child process is executed. The term “while the child process occupies a certain processor” means, for example, that the child process is being executed without interruption.

図1は、プロセスが使用する共有メモリ空間と排他メモリ空間の一例を説明する図である。共有メモリ空間は、親(上位)プロセスと子(下位)プロセスが共有し、排他メモリ空間は、子(下位)プロセスが使用する。   FIG. 1 is a diagram illustrating an example of a shared memory space and an exclusive memory space used by a process. The shared memory space is shared by the parent (upper) process and the child (lower) process, and the exclusive memory space is used by the child (lower) process.

親プロセスは、共有リソースを管理し、子プロセスの生成および完了を管理し、さらに、複数のプロセッサおよびプロセスがアクセス可能なメモリ空間を用意する。子プロセスは、それぞれ個別のメモリ空間が割り当てられ、さらに、一定期間個別のプロセッサに割り当てられる。プロセスを制御するOS(Operating System)は、子プロセスに個別のプロセッサおよびメモリ空間を割り当てる事により、子プロセス相互の干渉を避ける。さらに、OSは、これにより、子プロセスの処理性能、並びに、マルチプロセッサシステムの性能とスケーラビリティー効率を最大限に引き出す。   The parent process manages shared resources, manages the creation and completion of child processes, and provides a memory space that can be accessed by multiple processors and processes. Each child process is assigned an individual memory space, and further assigned to an individual processor for a certain period. An OS (Operating System) that controls processes avoids mutual interference between child processes by assigning individual processors and memory spaces to the child processes. Furthermore, the OS thereby maximizes the processing performance of the child process, as well as the performance and scalability efficiency of the multiprocessor system.

キャッシュを有するシステムは、キャッシュのデータ管理サイズ(例:128バイト等)ごとのメモリについてキャッシュ状態を管理している。そして、あるプロセッサ(プロセス)がメモリをアクセスする際、キャッシュは、他プロセッサ上のキャッシュ(階層キャッシュ含む)状態を監視(スヌープ)し、キャッシュのコヒーレンシを保つ動作を行う。このコヒーレンシを保つために、システムは、メモリアクセスのスループットを阻害しない様に十分なスヌープ用の帯域を備え、かつ短いレイテンシを達成する。コヒーレンシ機能の搭載、LSI(Large Scale Integration)間のインタフェースの実現、および、高速動作のインタフェースの実装は、LSI回路規模、物理ピン数投資や高速動作に伴う消費電力等の点で、テクノロジコストの増加を招いている。   A system having a cache manages a cache state for a memory for each data management size (eg, 128 bytes) of the cache. When a certain processor (process) accesses the memory, the cache monitors (snoops) the state of the cache (including the hierarchical cache) on the other processor and performs an operation of maintaining the coherency of the cache. In order to maintain this coherency, the system has sufficient bandwidth for snoops so as not to hinder the throughput of memory access and achieves a short latency. The implementation of the coherency function, the implementation of an interface between LSI (Large Scale Integration), and the implementation of a high-speed operation interface require a technology cost in terms of LSI circuit scale, physical pin number investment, power consumption associated with high-speed operation, etc. An increase is incurred.

この問題に対処するため、本実施の形態のキャッシュ装置100は、共有メモリ空間と排他メモリ空間を区別して管理する。図2は、この管理差を説明する為にメモリ空間とアドレスの関係を示す。   In order to cope with this problem, the cache device 100 according to the present embodiment separately manages the shared memory space and the exclusive memory space. FIG. 2 shows the relationship between the memory space and the address in order to explain this management difference.

本実施の形態のキャッシュ装置100は、共有メモリ空間を、キャッシュのブロック単位で管理する。例えば、ブロックサイズを128バイト、メモリ空間の大きさを1テラバイト(アドレス長を40ビット)とする。この場合、キャッシュ装置100は、スヌープに使用するアドレスを33ビットのブロックアドレス(図2(a))、スヌープ実行単位をブロックとする。256メガバイト空間に連続アクセスした場合に必要なスヌープ回数は、約200万回となる。   The cache device 100 according to the present embodiment manages the shared memory space in units of cache blocks. For example, the block size is 128 bytes, and the memory space size is 1 terabyte (address length is 40 bits). In this case, the cache device 100 sets the address used for snoop as a 33-bit block address (FIG. 2A) and the snoop execution unit as a block. The number of snoops required for continuous access to a 256 megabyte space is approximately 2 million.

一方、キャッシュ装置100は、排他メモリ空間を、キャッシュのブロック単位を所定数包含するページ単位で管理する。例えば、ページサイズを16メガバイト、メモリ空間の大きさを1テラバイトとしたとき、キャッシュ装置100は、スヌープに使用するアドレスを16ビットのページアドレス(図2(b))、スヌープ実行単位をページとする。256メガバイト空間に連続アクセスした場合に必要なスヌープ回数は16回となる。   On the other hand, the cache device 100 manages the exclusive memory space in page units including a predetermined number of cache block units. For example, when the page size is 16 megabytes and the memory space size is 1 terabyte, the cache device 100 sets the address used for snoop as a 16-bit page address (FIG. 2B) and the snoop execution unit as a page. To do. The number of snoops required for continuous access to the 256 megabyte space is 16.

本実施の形態のキャッシュ装置100は、以下のような特徴を有する。   The cache device 100 of the present embodiment has the following features.

先ず、キャッシュ装置100は、共有メモリ空間と排他メモリ空間を区別する。この区別は、例えば、ページ単位でおこなう。ページテーブルエントリは、この区別の為のフラグを格納する。このフラグは、ソフトウエア(アプリケーションおよびOS)で指定可能である。キャッシュ装置100は、メモリアクセスの都度に空間の種別を区別する。キャッシュ装置100は、キャッシュコヒーレンシ制御に必要なスヌープ・タグやディレクトリ・タグ等のアドレス管理サイズを可変とし、排他メモリ空間の場合の管理サイズを大きくする。この管理サイズは、例えば、共有メモリ空間については、ブロックサイズ(128バイト)、排他メモリ空間については、ページサイズ(16メガバイト)である。   First, the cache device 100 distinguishes between the shared memory space and the exclusive memory space. This distinction is made, for example, on a page basis. The page table entry stores a flag for this distinction. This flag can be specified by software (application and OS). The cache device 100 distinguishes the type of space every memory access. The cache device 100 makes the address management size of snoop tags, directory tags, etc. necessary for cache coherency control variable, and increases the management size in the case of exclusive memory space. The management size is, for example, a block size (128 bytes) for the shared memory space and a page size (16 megabytes) for the exclusive memory space.

さらに、キャッシュ装置100は、キャッシュの無効化処理、追い出し処理等は、大きい管理サイズの制御リクエストにも対応する。即ち、キャッシュ装置100は、キャッシュ本体(データ管理)と、スヌープ・タグ等の管理サイズは別々に扱い、ひとつの制御リクエストで、複数ブロックの無効化、追い出しを実行する。   Further, the cache device 100 also supports control requests with a large management size, such as cache invalidation processing and eviction processing. That is, the cache device 100 handles the management size of the cache body (data management) and the snoop / tag separately, and executes invalidation and eviction of a plurality of blocks with one control request.

また、キャッシュ装置100は、上述のキャッシュ無効化に伴う処理の完了を通知・保障する機能を実装する。即ち、キャッシュ装置100は、コヒーレンシおよびアクセスのオーダリング(順序)を保つために完了の保障機能を持つ。   In addition, the cache device 100 is provided with a function for notifying and ensuring the completion of the processing associated with the cache invalidation described above. That is, the cache device 100 has a completion guarantee function in order to maintain coherency and access ordering (order).

(本実施形態の構成)
以降、本実施の形態のキャッシュ装置100の構成を説明する。図3は、本実施の形態のキャッシュ装置100を搭載したコンピュータ506の構成図である。
(Configuration of this embodiment)
Hereinafter, the configuration of the cache device 100 of the present embodiment will be described. FIG. 3 is a configuration diagram of a computer 506 equipped with the cache device 100 of the present embodiment.

コンピュータ506は、記憶装置505と、当該記憶装置505に接続された複数のLSI501と、を備える。LSI501は、キャッシュ装置100、メモリ制御部121、及び、一個以上のプロセッサ122を備える。各LSI501は、キャッシュ装置100を介して相互に接続されている。   The computer 506 includes a storage device 505 and a plurality of LSIs 501 connected to the storage device 505. The LSI 501 includes a cache device 100, a memory control unit 121, and one or more processors 122. The LSIs 501 are connected to each other via the cache device 100.

図4は、キャッシュ装置100の内部およびその周辺の構成図である。キャッシュ装置100は、キャッシュアレイ117、ページアドレスアレイ110、および、管理部120を備える。   FIG. 4 is a configuration diagram of the inside of the cache device 100 and its periphery. The cache device 100 includes a cache array 117, a page address array 110, and a management unit 120.

管理部120は、物理アドレス保持部105、スヌープ制御部106スヌープアドレス保持部107、選択器108、ページアドレス保持部109、ページヒット/ミス判定部111、ページ制御部112、バースト制御部113、ブロックアドレス保持部114、選択器115、ブロックアドレス保持部116、キャッシュヒット/ミス判定部118、および、キャッシュ制御部119を備える。   The management unit 120 includes a physical address holding unit 105, a snoop control unit 106, a snoop address holding unit 107, a selector 108, a page address holding unit 109, a page hit / miss determination unit 111, a page control unit 112, a burst control unit 113, a block An address holding unit 114, a selector 115, a block address holding unit 116, a cache hit / miss determination unit 118, and a cache control unit 119 are provided.

キャッシュ装置100に接続されるプロセッサ122は、命令デコード部101、論理アドレス生成部102、アドレス変換制御部103、及び、アドレス変換部104を備える。なお、ここでは、プロセッサ122について、キャッシュ装置100と密接な構成要素だけを示す。   The processor 122 connected to the cache device 100 includes an instruction decoding unit 101, a logical address generation unit 102, an address conversion control unit 103, and an address conversion unit 104. It should be noted that only the components closely related to the cache device 100 are shown here for the processor 122.

プロセッサ122の命令デコード部101は、実行する命令をデコードし必要な動作を解読する。論理アドレス生成部102は、命令デコード部101で命令をデコードした結果、記憶装置505へのアクセスが必要な場合にアクセスする論理アドレスを生成する。アドレス変換制御部103は、アドレス変換部104に対する登録、更新、等の制御をおこなう。アドレス変換部104は、論理アドレスに対応する物理アドレスを記憶している。アドレス変換部104は、TLB(Translation Look-aside Buffer)とも呼ばれる。   The instruction decoding unit 101 of the processor 122 decodes an instruction to be executed and decodes a necessary operation. The logical address generation unit 102 generates a logical address to be accessed when access to the storage device 505 is required as a result of decoding the instruction by the instruction decoding unit 101. The address translation control unit 103 controls registration, update, and the like for the address translation unit 104. The address conversion unit 104 stores a physical address corresponding to the logical address. The address translation unit 104 is also called a TLB (Translation Look-aside Buffer).

キャッシュ装置100の物理アドレス保持部105は、アドレス変換部104で生成した物理アドレスを保持するスヌープアドレス保持部107は、スヌープ要求に含まれているアドレスを保持する。選択器108は、物理アドレス保持部105、スヌープアドレス保持部107の何れか一方を選択して、選択された方に格納されているアドレスおよびS/Eフラグ(後述)を出力する。ページアドレス保持部109は、ページアドレスアレイ110を索引するアドレスを保持する。   The physical address holding unit 105 of the cache device 100 holds the physical address generated by the address conversion unit 104, and the snoop address holding unit 107 holds the address included in the snoop request. The selector 108 selects one of the physical address holding unit 105 and the snoop address holding unit 107 and outputs an address and an S / E flag (described later) stored in the selected one. The page address holding unit 109 holds an address for indexing the page address array 110.

ページアドレスアレイ110は、ページアドレスを複数保持し、各ページの状態情報を保持する。ページアドレスアレイ110は、S/Eフラグを保持している。このS/Eフラグの保持は必須ではないが、OSが管理するページエントリテーブルの矛盾や間違いを検出する機能に活用できる。例えば、ページヒット/ミス判定部111は、S/Eフラグ=1(排他メモリ空間)で登録されているページ対し、他のキャッシュ装置100からS/Eフラグ=0(共有メモリ空間)のスヌープ要求を受けた場合、例外としてOSに通知する等しても良い。また、ページアドレスアレイ110は、キャッシュアレイ117と連携して動作する。ページ制御部112は、キャッシュアレイ117にブロックが登録されると、当該ブロックが属するページをページアドレスアレイ110に登録する。   The page address array 110 holds a plurality of page addresses and holds status information of each page. The page address array 110 holds an S / E flag. Although holding the S / E flag is not essential, it can be used for a function for detecting contradiction or error in the page entry table managed by the OS. For example, the page hit / miss determination unit 111 sends a snoop request for S / E flag = 0 (shared memory space) from another cache device 100 to a page registered with the S / E flag = 1 (exclusive memory space). May be notified to the OS as an exception. The page address array 110 operates in cooperation with the cache array 117. When a block is registered in the cache array 117, the page control unit 112 registers the page to which the block belongs in the page address array 110.

ページヒット/ミス判定部111は、ページアドレス保持部109に保持されたページアドレスが、ページアドレスアレイ110に登録されているか否か(ヒット/ミス)を判定する。ページ制御部112は、ページアドレスアレイ110に対する登録、更新、等の制御をおこなう。また、ページ制御部112は、ページアドレスアレイ110の制御に伴い、該当ページに属する複数のブロックのキャッシュの状態制御指示をバースト制御部113に対して出す。さらに、ページ制御部112は、ページの状態に応じてスヌープ制御部(出力)106に対する指示を出す。   The page hit / miss determination unit 111 determines whether the page address held in the page address holding unit 109 is registered in the page address array 110 (hit / miss). The page control unit 112 controls registration, update, and the like for the page address array 110. Further, the page control unit 112 issues a cache state control instruction for a plurality of blocks belonging to the corresponding page to the burst control unit 113 in accordance with the control of the page address array 110. Further, the page control unit 112 issues an instruction to the snoop control unit (output) 106 according to the state of the page.

バースト制御部113は、ページ制御部112からの制御指示を受け、該当ページに属するブロック数分のブロックアドレスを制御し、該当ブロックをキャッシュアレイ117から追い出す等の処理を行う。また、バースト制御部113は、該当ブロックに関する制御がすべて完了した事をページ制御部112とスヌープ制御部(出力)106に通知する機能を持つ。   The burst control unit 113 receives a control instruction from the page control unit 112, controls block addresses corresponding to the number of blocks belonging to the page, and performs processing such as expelling the block from the cache array 117. The burst control unit 113 has a function of notifying the page control unit 112 and the snoop control unit (output) 106 that all the control related to the corresponding block is completed.

ブロックアドレス保持部114は、バースト制御部113で生成されたブロックアドレスを保持する。選択器115は、選択器108が選択するアドレスとブロックアドレス保持部114が保持するアドレスの何れか一方を選択する。ブロックアドレス保持部116は、キャッシュアレイ117を索引するアドレスを保持する。   The block address holding unit 114 holds the block address generated by the burst control unit 113. The selector 115 selects either the address selected by the selector 108 or the address held by the block address holding unit 114. The block address holding unit 116 holds an address for indexing the cache array 117.

キャッシュアレイ117は、いわゆるキャッシュメモリであり、ブロックのアドレスと当該ブロックのデータのコピーをペアにして記憶している。キャッシュアレイ117は、アドレスアレイとデータアレイを包含する。キャッシュヒット/ミス判定部118は、ブロックアドレス保持部116が保持するブロックアドレスが、キャッシュアレイ117に登録されているか否か(ヒット/ミス)を判定する。   The cache array 117 is a so-called cache memory, and stores a block address and a copy of the block data in pairs. The cache array 117 includes an address array and a data array. The cache hit / miss determination unit 118 determines whether or not the block address held by the block address holding unit 116 is registered in the cache array 117 (hit / miss).

キャッシュ制御部119は、キャッシュアレイ117に対する登録、更新、等の制御をおこなう。また、キャッシュ制御部119は、スヌープ制御部(出力)106に対するスヌープ結果の通知と、記憶装置505内のメモリへのアクセスが必要な場合にページ制御部112にアクセス要求を通知する。   The cache control unit 119 controls registration, update, etc. for the cache array 117. Further, the cache control unit 119 notifies the snoop control unit (output) 106 of the snoop result and notifies the page control unit 112 of an access request when access to the memory in the storage device 505 is necessary.

なお、スヌープ制御部(入力)106は、キャッシュ間のコヒーレンシを保つために必要なスヌープ動作に関して、他LSI501からのスヌープ要求を受け付ける。スヌープ制御部(出力)106は、他LSI501に対してスヌープ要求を出力する。スヌープ制御部(入力)106とスヌープ制御部(出力)106の一方または両方を、スヌープ制御部106と称することがある。スヌープ制御部106は、バースト制御部113からブロックに関する制御がすべて完了した通知を受け取り、スヌープ要求元のLSI501に完了を通知(出力)する。メモリ制御部121は、記憶装置505に対するアクセス制御を行う。   Note that the snoop control unit (input) 106 accepts a snoop request from another LSI 501 regarding a snoop operation necessary for maintaining coherency between caches. The snoop control unit (output) 106 outputs a snoop request to the other LSI 501. One or both of the snoop control unit (input) 106 and the snoop control unit (output) 106 may be referred to as the snoop control unit 106. The snoop control unit 106 receives from the burst control unit 113 a notification that all the control related to the block has been completed, and notifies (outputs) the completion to the snoop request source LSI 501. The memory control unit 121 performs access control for the storage device 505.

本図に於いて、“S/E”との記載が付加された要素は、後述するS/Eフラグを受信、記憶、または、出力する。   In the figure, an element to which “S / E” is added receives, stores, or outputs an S / E flag described later.

図5は、コンピュータ506のページテーブルエントリに格納されるデータを示す図である。ページテーブルエントリは、論理アドレスごとに、OSにより作成および管理される。   FIG. 5 is a diagram illustrating data stored in the page table entry of the computer 506. A page table entry is created and managed by the OS for each logical address.

ページテーブルエントリは、物理アドレス、S/Eフラグ、R/Wフラグ、Pフラグを記憶する。対応する論理アドレスの記憶装置505がアクセスされ、ページテーブルエントリが参照されると、その論理アドレス、物理アドレス、S/Eフラグがアドレス変換部104に格納される。   The page table entry stores a physical address, an S / E flag, an R / W flag, and a P flag. When the storage device 505 having the corresponding logical address is accessed and the page table entry is referenced, the logical address, physical address, and S / E flag are stored in the address conversion unit 104.

P(Present)フラグは、ページが記憶装置505にロードされているかどうかを示す。R/W(Read/Write)フラグは、ページの読み込み/書き込み可否を示す。   The P (Present) flag indicates whether a page is loaded in the storage device 505. The R / W (Read / Write) flag indicates whether a page can be read / written.

S/E(Share/Exclusion)フラグは、ページが共有メモリ空間であるか排他メモリ空間であるかを示す。物理アドレスは、このページエントリに対応する論理アドレスに割り当てられている記憶装置505内ページの物理アドレスである。   The S / E (Share / Exclusion) flag indicates whether the page is a shared memory space or an exclusive memory space. The physical address is the physical address of the page in the storage device 505 assigned to the logical address corresponding to this page entry.

ページエントリは、他の情報を包含していても良いし、R/Wフラグ等、一部の情報が無くても良い。例えば、S/Eフラグは、別途、ページの集合、例えば、セグメント対応に設けられていても良い。また、論理アドレスの値が閾値より大きいか小さいかで、共有メモリ空間であるか排他メモリ空間を判断できるようにしても良い。   The page entry may include other information, or some information such as an R / W flag may be absent. For example, the S / E flag may be provided separately for a set of pages, for example, corresponding to a segment. Further, whether the shared memory space or the exclusive memory space can be determined depending on whether the value of the logical address is larger or smaller than the threshold value.

(本実施形態の動作)
本実施の形態のキャッシュ装置100の動作を説明する前に、説明で用いられる、プロセッサ122による記憶装置505内のメモリのアクセス動作例を説明する。図6は、プロセッサ122による記憶装置505のアクセス動作例を示す図である。
(Operation of this embodiment)
Before describing the operation of the cache device 100 according to the present embodiment, an example of an access operation of the memory in the storage device 505 by the processor 122 used in the description will be described. FIG. 6 is a diagram illustrating an example of an access operation of the storage device 505 by the processor 122.

本例において、プロセッサ122は、1) A番地から連続する各々8バイトのメモリ空間の値を順にリード (8バイト×n回)し、2) リードした値に対して演算を実行 (8バイト×n回)し、3) 演算結果をB番地から連続する空間に順にライト (バイト×n回)する。また、プロセッサ122がアクセスする領域は、キャッシュアレイ117に対して十分大きい領域をアクセスするものとする。   In this example, the processor 122 1) sequentially reads the values of the memory space of 8 bytes each continuous from address A (8 bytes × n times), and 2) executes the operation on the read values (8 bytes × 3) Write the operation results in order from address B to the continuous space (bytes x n times). The area accessed by the processor 122 is assumed to access a sufficiently large area for the cache array 117.

上記1)動作において、プロセッサ122はキャッシュアレイ117に対してA番地のリード要求(8バイト)を実行する。キャッシュアレイ117を索引した結果、A番地はキャッシュアレイ117上に存在しない事が判明した場合(ミス)、キャッシュ装置100は、記憶装置505内のメモリに対してリード(a)動作を実行すると共に、他のキャッシュ装置100へのスヌープ(c)動作を実行する。スヌープする事で、記憶装置505のメモリ内容が最新か否かをチェックし、最新であれば記憶装置505のメモリが格納する内容を、最新でなければ最新状態を持っている他のキャッシュ装置100の内容をリプライデータとする。   In the above operation 1), the processor 122 executes a read request (8 bytes) at address A to the cache array 117. As a result of indexing the cache array 117, when it is determined that the address A does not exist on the cache array 117 (miss), the cache device 100 performs a read (a) operation on the memory in the storage device 505. Then, the snoop (c) operation to the other cache device 100 is executed. By snooping, it is checked whether or not the memory contents of the storage device 505 are the latest. If the contents are the latest, the contents stored in the memory of the storage device 505 are not the latest. Is the reply data.

メモリに対するリード(a)のリプライデータが戻ってきたら、キャッシュ装置100は、自装置のキャッシュアレイ117に当該データを登録すると共に、プロセッサ122にもデータを返却する。これらキャッシュ装置100間のコヒーレンシ制御は一般的な制御方式で良い。通常これら(a)と(c)の動作は、キャッシュの管理単位(例えば128バイト)で実行するのが一般的である。   When read (a) reply data to the memory is returned, the cache device 100 registers the data in the cache array 117 of the device itself and returns the data to the processor 122 as well. The coherency control between these cache devices 100 may be a general control method. Usually, the operations (a) and (c) are generally executed in a cache management unit (for example, 128 bytes).

上記2)動作において、プロセッサ122は上述1)動作で得たデータ(8バイト)を使用して演算を実行する。   In the above 2) operation, the processor 122 executes an operation using the data (8 bytes) obtained in the above 1) operation.

上記3)動作において、プロセッサ122は上述2)動作で得た演算した結果データ(8バイト)をライトデートとしてキャッシュに対してB番地のライト要求(8バイト)を実行する。ストアスルー制御方式を例として説明すると、キャッシュ装置100は、キャッシュアレイ117を索引した結果、B番地はキャッシュアレイ117上に存在しない事が判明した場合(ミス)に、記憶装置505に対してライト動作(b)を実行すると共に、他のキャッシュ装置100へのスヌープ(c)動作を実行する。他のキャッシュ装置100をスヌープする事で他のキャッシュ装置100のキャッシュアレイ117上のデータが更新されたことを通知し、他キャッシュ装置100上に存在するデータを無効化する。   In the above 3) operation, the processor 122 executes a write request (8 bytes) at address B to the cache using the result data (8 bytes) calculated in the above 2) operation as a write date. As an example of the store-through control method, the cache device 100 writes to the storage device 505 when it is determined that the B address does not exist on the cache array 117 as a result of indexing the cache array 117 (miss). The operation (b) is executed, and a snoop (c) operation to another cache device 100 is executed. By snooping the other cache device 100, it is notified that the data on the cache array 117 of the other cache device 100 has been updated, and the data existing on the other cache device 100 is invalidated.

これらキャッシュ装置100間のコヒーレンシ制御方式は、ストアイン方式でも良い。キャッシュ装置100は、通常(b)の動作を、ストアスルー方式の場合はライト要求の単位(8バイト)で実行し、ストアイン方式の場合はキャッシュの管理単位(例えば128バイト)で実行する。なお、ストアイン方式の場合、ライト(b)の代わりに、キャッシュ上に対象ブロックを持ってくる必要があるためリード要求が出る。これは、ストアイン方式では一般的なことであり、説明は省略する。キャッシュ装置100は、通常(c)の動作を、キャッシュの管理単位(例えば128バイト)で実行する。   The coherency control method between these cache devices 100 may be a store-in method. The cache device 100 performs the normal operation (b) in the write request unit (8 bytes) in the case of the store-through method, and in the cache management unit (for example, 128 bytes) in the case of the store-in method. In the case of the store-in method, a read request is issued because it is necessary to bring the target block onto the cache instead of writing (b). This is common in the store-in method and will not be described. The cache device 100 performs the normal operation (c) in cache management units (for example, 128 bytes).

上述した動作は、8バイト動作1回の説明であるが、例として取り上げたプロセッサ122はこの動作をn回実行する。したがって、この様なプロセッサ122の性能を発揮させるためには、記憶装置505に対するリード(a)の性能(主に帯域とアクセスタイム)、ライト(b)の性能(主に帯域)、プロセッサ122の演算性能、キャッシュ装置100の索引・登録性能(帯域とアクセスタイム)が必要である。同時に、他のキャッシュ装置100との間のコヒーレンシ制御に必要なスヌープ(c)動作も、相応の帯域が求められる。   The above-described operation is a description of one 8-byte operation, but the processor 122 taken as an example executes this operation n times. Therefore, in order to exert such performance of the processor 122, the read (a) performance (mainly bandwidth and access time) for the storage device 505, the write (b) performance (mainly bandwidth), the processor 122 Computing performance and index / registration performance (bandwidth and access time) of the cache device 100 are required. At the same time, the snoop (c) operation necessary for coherency control with other cache devices 100 also requires a corresponding band.

以降、本実施の形態のキャッシュ装置100の動作を説明する。先ず、図4における、命令デコード部101は、プロセッサ122内部で実行する命令をデコードし、その命令が必要とする動作を解読する。命令をデコードした結果、記憶装置505のアクセスが必要と判断された場合、論理アドレス生成部102は、アクセスするメモリの論理アドレスを生成する。アドレス変換制御部103は、生成した論理アドレスでアドレス変換部104を索引する。   Hereinafter, the operation of the cache device 100 of the present embodiment will be described. First, the instruction decoding unit 101 in FIG. 4 decodes an instruction to be executed inside the processor 122 and decodes an operation required by the instruction. As a result of decoding the instruction, when it is determined that the storage device 505 needs to be accessed, the logical address generation unit 102 generates a logical address of the memory to be accessed. The address translation control unit 103 indexes the address translation unit 104 with the generated logical address.

アドレス変換制御部103は、索引する事で論理アドレスに対応する物理アドレスを求める。論理アドレスと物理アドレスの対応付けは、一般的にはコンピュータ506が実行するOSが管理している。OSは、図5に示した様なページテーブルエントリを複数含むページテーブルを用意する。アドレス変換部104は、そのページテーブルの一部もしくは全部を保持する。その一部をアドレス変換部104が管理している場合は、論理アドレスに該当する物理アドレスがアドレス変換部104上に存在しない場合がある。その場合、アドレス変換制御部103は、OSが管理しているページテーブルエントリ群から該当する情報を取り出してアドレス変換部104に格納する。またOSが管理しているページテーブルエントリ群にも存在しない場合、アドレス変換制御部103は、OSに対して割り込み等で通知しページテーブルエントリの作成を依頼する。   The address translation control unit 103 obtains a physical address corresponding to the logical address by indexing. The association between the logical address and the physical address is generally managed by the OS executed by the computer 506. The OS prepares a page table including a plurality of page table entries as shown in FIG. The address conversion unit 104 holds part or all of the page table. When a part of the address is managed by the address translation unit 104, a physical address corresponding to the logical address may not exist on the address translation unit 104. In that case, the address translation control unit 103 extracts corresponding information from the page table entry group managed by the OS and stores it in the address translation unit 104. If the page table entry group managed by the OS does not exist, the address translation control unit 103 notifies the OS by an interrupt or the like and requests creation of a page table entry.

アドレス変換制御部103は、OSが管理しているページテーブルエントリが包含するS/Eフラグを持ち回り、アドレス変換部104に格納する。したがってアドレス変換部104に格納されているページテーブルエントリ情報の各々は、このS/Eフラグを含んでいる。   The address translation control unit 103 carries around the S / E flag included in the page table entry managed by the OS and stores it in the address translation unit 104. Therefore, each page table entry information stored in the address conversion unit 104 includes this S / E flag.

物理アドレス保持部105は、アドレス変換部104を索引した結果得られる物理アドレスを保持する。この物理アドレス保持部105もアドレス変換部104索引の結果得たS/Eフラグの情報を持ち回り保持している。   The physical address holding unit 105 holds a physical address obtained as a result of indexing the address conversion unit 104. This physical address holding unit 105 also carries and holds information on the S / E flag obtained as a result of the index of the address conversion unit 104.

物理アドレス保持部105の物理アドレスは、選択器108を通り、ページアドレスアレイ110を索引するためにページアドレス保持部109に送られる。選択器108およびページアドレス保持部109も、S/Eフラグの情報を保持している。また同時にキャッシュアレイ117を索引するために、物理アドレス保持部105の物理アドレスは、選択器108および選択器115を通り、ブロックアドレス保持部116に送られる。   The physical address of the physical address holding unit 105 passes through the selector 108 and is sent to the page address holding unit 109 to index the page address array 110. The selector 108 and the page address holding unit 109 also hold S / E flag information. At the same time, in order to index the cache array 117, the physical address of the physical address holding unit 105 is sent to the block address holding unit 116 through the selector 108 and the selector 115.

ページアドレスアレイ110は、ページアドレスを複数保持し、各ページの状態を保持する。ページアドレスアレイ110は、キャッシュアレイ117と連携して動作する。即ち、ページ制御部112とキャッシュ制御部119は、キャッシュアレイ117に登録されるブロックが属すページが、ページアドレスアレイ110に登録される関係となる様に、登録動作を制御する。ページアドレスアレイ110は、他の点で、一般的なアドレスアレイと同じである。   The page address array 110 holds a plurality of page addresses and holds the state of each page. The page address array 110 operates in cooperation with the cache array 117. That is, the page control unit 112 and the cache control unit 119 control the registration operation so that the page to which the block registered in the cache array 117 belongs is registered in the page address array 110. The page address array 110 is otherwise the same as a general address array.

ページアドレスアレイ110は、ページアドレス保持部109に保持したページアドレスが自身に登録されているかを検索する。ページヒット/ミス判定部111は、アクセスするページがページアドレスアレイ110に登録されているか否かを判定する。ページヒット/ミス判定部111の判定結果は、ページアドレスと共にページ制御部112に送られる。   The page address array 110 searches whether the page address held in the page address holding unit 109 is registered in itself. The page hit / miss determination unit 111 determines whether a page to be accessed is registered in the page address array 110. The determination result of the page hit / miss determination unit 111 is sent to the page control unit 112 together with the page address.

ページ制御部112は、ページヒット/ミス判定部111の判定結果を元にページアドレスアレイ110の登録更新動作を制御する。ページヒット/ミス判定部111とページ制御部112もS/Eフラグの情報を持ち回り保持している。また、ページ制御部112は、ページアドレスアレイ110にページアドレスを登録する際に、持ち回ってきたS/Eフラグの情報も登録する。また、ページ制御部112は、持ち回ってきたS/Eフラグの状態によってスヌープを実行する単位を判別する。   The page control unit 112 controls the registration update operation of the page address array 110 based on the determination result of the page hit / miss determination unit 111. The page hit / miss determination unit 111 and the page control unit 112 carry and hold information on the S / E flag. Further, when registering the page address in the page address array 110, the page control unit 112 also registers the information of the carried S / E flag. Further, the page control unit 112 determines a unit for executing snoop according to the state of the carried S / E flag.

キャッシュアレイ117は、一般的なキャッシュアレイ117(アドレスアレイおよびデータアレイ)と同じである。キャッシュアレイ117は、ブロックアドレス保持部116が保持するブロックアドレスが自身に登録されているかを検索する。キャッシュヒット/ミス判定部118は、アクセスするブロックがキャッシュアレイ117に登録されているか否かを判定する。キャッシュヒット/ミス判定部118の判定結果はブロックアドレスと共にキャッシュ制御部119に送られる。   The cache array 117 is the same as a general cache array 117 (address array and data array). The cache array 117 searches whether the block address held by the block address holding unit 116 is registered in itself. The cache hit / miss determination unit 118 determines whether or not a block to be accessed is registered in the cache array 117. The determination result of the cache hit / miss determination unit 118 is sent to the cache control unit 119 together with the block address.

キャッシュ制御部119は、キャッシュヒット/ミス判定部118の判定結果を元にキャッシュアレイ117の登録更新動作を制御する。また、キャッシュ制御部119は、メモリアクセスが必要な場合、メモリ制御部121にメモリアクセス要求を通知する。メモリ制御部121は、要求に応じて記憶装置505に対するアクセス(リード・ライト等)を実行する。これは、一般的なメモリアクセス機能である。   The cache control unit 119 controls the registration update operation of the cache array 117 based on the determination result of the cache hit / miss determination unit 118. Further, when the memory access is necessary, the cache control unit 119 notifies the memory control unit 121 of a memory access request. The memory control unit 121 executes access (read / write, etc.) to the storage device 505 in response to a request. This is a general memory access function.

ページ制御部112の情報とキャッシュ制御部119の情報は、スヌープ制御部(出力)106に送られ、そこから他のキャキャッシュ装置100にスヌープ要求が送信されるスヌープ制御部(出力)106は、スヌープ要求を出力する際に、S/Eフラグ情報を含めて出力する。   The information of the page control unit 112 and the information of the cache control unit 119 are sent to the snoop control unit (output) 106, and the snoop control unit (output) 106 from which the snoop request is transmitted to the other cache cache device 100, When the snoop request is output, the S / E flag information is output.

図7は、管理部120が行うスヌープ動作に関する判定表を示す図である。本図では、管理部120は、キャッシュ制御プロトコルとしてMESIプロトコルを使用しているものとする。管理部120は、他のプロトコルを用いても良いが、動作の細部は異なってくる。また、本実形態では、説明の簡易化のためキャッシュ階層を一つとしているが、キャッシュ階層が複数であっても良い。管理部120は、各階層において、規定されたキャッシュコヒーレンシ制御のプロトコルに従えば良い。また、管理部120は、キャッシュステータスの遷移に伴う過渡的な状態に対する制御等を実行するが、一般的な装置において考慮・解決すべき事象であるためここでは説明しない。   FIG. 7 is a diagram illustrating a determination table related to the snoop operation performed by the management unit 120. In this figure, it is assumed that the management unit 120 uses the MESI protocol as the cache control protocol. The management unit 120 may use other protocols, but the details of the operation differ. In this embodiment, one cache hierarchy is used for the sake of simplicity of explanation, but there may be a plurality of cache hierarchies. The management unit 120 may follow a prescribed cache coherency control protocol in each layer. The management unit 120 executes control for a transitional state associated with the transition of the cache status, but is not described here because it is an event that should be considered and solved in a general apparatus.

MESIプロトコルが規定するキャッシュの状態は、以下の状態を含む。
M:Modified (データは当該キャッシュだけに存在し、主記憶上の値から変更されている)
E:Exclusive (データは当該キャッシュだけに存在するが、主記憶上の値と一致している)
S:Share (システム内の他のキャッシュにも同じデータが存在している)
I:Invalid (このキャッシュラインは無効である。キャッシュミス状態も同じ状態を示す)
スヌープ制御部(出力)106、ページ制御部112、および、キャッシュ制御部119は、この表に従って動作する。図7の表は、大きく二つの列に分かれている。「状態」と記された列は、命令に関する条件と、当該命令実行前のページアドレスアレイ110とキャッシュアレイ117の状態とを記述している。「判定と処理」と記された列は、スヌープ動作の単位と動作の要否、当該命令実行後のページアドレスアレイ110とキャッシュアレイ117の状態とを記述している。
The cache state defined by the MESI protocol includes the following states.
M: Modified (Data exists only in the cache and has been changed from the value in main memory)
E: Exclusive (data exists only in the cache, but matches the value in main memory)
S: Share (the same data exists in other caches in the system)
I: Invalid (This cache line is invalid. A cache miss state is the same)
The snoop control unit (output) 106, the page control unit 112, and the cache control unit 119 operate according to this table. The table in FIG. 7 is roughly divided into two columns. The column labeled “state” describes the condition regarding the instruction and the state of the page address array 110 and the cache array 117 before the instruction is executed. A column labeled “determination and processing” describes a unit of snoop operation, necessity of the operation, and states of the page address array 110 and the cache array 117 after execution of the instruction.

図7の表の行は、発生し得る「状態」の組み合わせに対応している。表の行は、大きく二つのグループに分かれており、No.1-1〜1-24が共有メモリ空間(S/Eフラグ=0)アクセス時の状態に対応し、No.2-1〜2-24が排他メモリ空間 (S/Eフラグ=1)アクセス時の状態に対応する。なお、No.1-1〜1-24の状態および動作は、ページアドレスアレイ110を除いて、本実施の形態特有のものではない。   The rows in the table of FIG. 7 correspond to possible “state” combinations. The table rows are roughly divided into two groups. Nos. 1-1 to 1-24 correspond to the state when the shared memory space (S / E flag = 0) is accessed, and Nos. 2-1 to 2 -24 corresponds to the state when the exclusive memory space (S / E flag = 1) is accessed. The states and operations of Nos. 1-1 to 1-24 are not specific to the present embodiment except for the page address array 110.

以降、プロセッサ122が、所定のA番地から連続するメモリ空間の値を順にリードする場合(図6)を例として、図7の表を説明する。まず、共有メモリ空間アクセス時の動作を説明する。   Hereinafter, the table of FIG. 7 will be described by taking as an example the case where the processor 122 sequentially reads values in a continuous memory space from a predetermined address A (FIG. 6). First, the operation when accessing the shared memory space will be described.

1−1
ページの先頭であるA番地に対する最初のリード動作を考えると、当該番地のデータは、ページアドレスアレイ110にもキャッシュアレイ117にも存在しない。この状態は、図7の表のNo.1-9〜1-12のいずれかの状態(S/Eフラグ=0、メモリアクセス=リード、自ページアドレスアレイ110=ミス、自キャッシュアレイ117=I)が該当する。この場合、管理部120は、他のキャッシュ装置100の状態を認識するため他のキャッシュ装置100に対するスヌープ動作(スヌープ要求の発行を含む)を実行する。
1-1
Considering the first read operation for the address A which is the head of the page, the data at the address does not exist in the page address array 110 or the cache array 117. This state is one of Nos. 1-9 to 1-12 in the table of FIG. 7 (S / E flag = 0, memory access = read, own page address array 110 = miss, own cache array 117 = I ) Is applicable. In this case, the management unit 120 executes a snoop operation (including issuing a snoop request) on the other cache device 100 in order to recognize the state of the other cache device 100.

この場合、S/Eフラグ=0(共有メモリ空間)であるため、スヌープの処理単位は、キャッシュの管理サイズ(例128バイト等)であるブロックとなる。他のキャッシュ装置100は、スヌープした結果をスヌープ要求元に通知する。通知される結果は、表の「状態」、「アレイ状態」、「他キャッシュ」の列の記載に応じたものとなる。他のキャッシュ装置100は、自分のキャッシュアレイ117が最新データを持っていた場合(M状態)、当該最新データを記憶装置505に書き出す。   In this case, since the S / E flag = 0 (shared memory space), the snoop processing unit is a block having a cache management size (eg, 128 bytes). The other cache device 100 notifies the snoop request source of the snoop result. The notified result corresponds to the description in the columns of “state”, “array state”, and “other cache” in the table. When the cache array 117 has the latest data (M state), the other cache device 100 writes the latest data to the storage device 505.

管理部120は、その後、記憶装置505に該当ブロックのリード要求を出す。なお、該当ブロックの最新データは、スヌープの結果の通知に含めて、他のキャッシュ装置100から要求元に通知されても良い。このスヌープ動作および自キャッシュの状態遷移、他のキャッシュ装置100の状態遷移等の動作は、MESIプロトコルに規定されたとおりである。   Thereafter, the management unit 120 issues a read request for the corresponding block to the storage device 505. Note that the latest data of the corresponding block may be included in the notification of the snoop result and notified to the request source from another cache device 100. Operations such as the snoop operation, the state transition of the own cache, and the state transition of the other cache device 100 are as defined in the MESI protocol.

管理部120は、他のキャッシュ装置100の状態に関係なく、自装置のページアドレスアレイ110に、該当ページアドレスを登録する。管理部120は、その際に、リードリクエストと共に持ち回っていたS/Eフラグの値(この場合は0)も一緒に、ページアドレスアレイ110に登録する。   Regardless of the state of the other cache device 100, the management unit 120 registers the corresponding page address in the page address array 110 of the own device. At that time, the management unit 120 also registers the value of the S / E flag (0 in this case) carried around with the read request in the page address array 110 together.

1−2
続いて、プロセッサ122は、A番地+8番地に対するリード要求を出す。この時、ページアドレスアレイ110には当該番地のページアドレスは登録済みで、キャッシュアレイ117には当該番地のデータが存在している。この状態は、図7の表のNo.1-2〜1-4のいずれかの状態(S/Eフラグ=0、メモリアクセス=リード、自ページアドレスアレイ110=ヒット、自キャッシュアレイ117=E or S)が該当する。
1-2
Subsequently, the processor 122 issues a read request for address A + address 8. At this time, the page address of the address is already registered in the page address array 110, and data of the address exists in the cache array 117. This state is one of Nos. 1-2 to 1-4 in the table of FIG. 7 (S / E flag = 0, memory access = read, own page address array 110 = hit, own cache array 117 = E or S).

この場合、リード要求がキャッシュアレイ117にヒットした状態であるので、他のキャッシュ装置100に対するスヌープ動作は発生しない。この状態は、後続のA番地+120番地までのリードに対して同様である。   In this case, since the read request has hit the cache array 117, a snoop operation for the other cache device 100 does not occur. This state is the same for the leads up to the subsequent address A + 120.

1−3
続いて、プロセッサ122は、A番地+128番地に対するリード要求を出す。このとき、ページアドレスアレイ110には当該番地のページアドレスは登録済みだが、キャッシュアレイ117には当該番地のデータは存在しない。当該番地は、次ブロックに属するためである。この状態は、図7の表のNo.1-5〜1-8いずれかの状態(S/Eフラグ=0、メモリアクセス=リード、自ページアドレスアレイ110=ヒット、自キャッシュアレイ117=I)が該当する。この場合、管理部120は、他のキャッシュ装置100の状態を認識するため他のキャッシュ装置100に対するスヌープ動作を実行する。
1-3
Subsequently, the processor 122 issues a read request for address A + 128. At this time, the page address of the address is registered in the page address array 110, but the data of the address does not exist in the cache array 117. This is because the address belongs to the next block. This state is one of Nos. 1-5 to 1-8 in the table of FIG. 7 (S / E flag = 0, memory access = read, own page address array 110 = hit, own cache array 117 = I) Is applicable. In this case, the management unit 120 performs a snoop operation on the other cache device 100 in order to recognize the state of the other cache device 100.

この場合、S/Eフラグ=0(共有メモリ空間)であるため、スヌープの処理単位は、キャッシュの管理サイズであるブロックとなる。他のキャッシュ装置100は、スヌープした結果をスヌープ要求元に通知する。通知される結果は、表の「状態」、「アレイ状態」、「他キャッシュ」の列の記載に応じたものとなる。他のキャッシュ装置100は、自分のキャッシュアレイ117が最新データを持っていた場合(M状態)、当該最新データを記憶装置505に書き出す。   In this case, since the S / E flag = 0 (shared memory space), the snoop processing unit is a block having the cache management size. The other cache device 100 notifies the snoop request source of the snoop result. The notified result corresponds to the description in the columns of “state”, “array state”, and “other cache” in the table. When the cache array 117 has the latest data (M state), the other cache device 100 writes the latest data to the storage device 505.

管理部120は、その後、記憶装置505に該当ブロックのリード要求を出す。なお、最新データは、スヌープの結果の通知に含めて、他のキャッシュ装置100から要求元に通知されても良い。このスヌープ動作および自キャッシュの状態遷移、他のキャッシュ装置100の状態遷移等の動作は、MESIプロトコルに規定されたとおりである。なお、ページアドレスは、自ページアドレスアレイ110に既に登録済みの状態であるため、更新は不要である。   Thereafter, the management unit 120 issues a read request for the corresponding block to the storage device 505. Note that the latest data may be included in the notification of the result of the snoop and notified from the other cache device 100 to the request source. Operations such as the snoop operation, the state transition of the own cache, and the state transition of the other cache device 100 are as defined in the MESI protocol. Note that the page address is already registered in its own page address array 110, and therefore no update is necessary.

1−4
以降のアクセスに対して管理部120は、キャッシュアレイ117に格納済みのブロック内にアクセスする場合は上述の1−2の動作を、格納済みブロックを越えて新たなブロックをアクセスする場合は上述の1−3の動作を実行する。更に管理部120は、ページを越えて新たなページに対してアクセスする場合は上述の1−1の動作を実行する。
1-4
For subsequent accesses, the management unit 120 performs the above-described operation 1-2 when accessing a block already stored in the cache array 117, and the above-described operation when accessing a new block beyond the stored block. The operation of 1-3 is executed. Furthermore, the management unit 120 executes the above-described operation 1-1 when accessing a new page beyond the page.

1−5
ライト動作に関しても、リード時と同様に、状態に応じた処理が図7の表で規定してある。また、スヌープの処理単位は、キャッシュの管理サイズであるブロック単位である。詳細な説明は省略する。
1-5
Regarding the write operation, the process according to the state is defined in the table of FIG. The snoop processing unit is a block unit that is the management size of the cache. Detailed description is omitted.

次に排他メモリ空間(S/Eフラグ=1)アクセス時の管理部120の動作を説明する。   Next, the operation of the management unit 120 when accessing the exclusive memory space (S / E flag = 1) will be described.

2−1
A番地に対する最初のリード動作を考えると、当該番地のデータは、ページアドレスアレイ110にもキャッシュアレイ117にも存在しない。この状態は、図7の表のNo.2-9〜2-12いずれかの状態(S/Eフラグ=1、メモリアクセス=リード、自ページアドレスアレイ110=ミス、自キャッシュアレイ117=I)が該当する。この場合、管理部120は、他のキャッシュ装置100の状態を認識するため他のキャッシュ装置100に対するスヌープ動作(スヌープ要求の発行を含む)を実行する。
2-1
Considering the first read operation for address A, the data at the address does not exist in the page address array 110 or the cache array 117. This state is one of Nos. 2-9 to 2-12 in the table of FIG. 7 (S / E flag = 1, memory access = read, own page address array 110 = miss, own cache array 117 = I) Is applicable. In this case, the management unit 120 executes a snoop operation (including issuing a snoop request) on the other cache device 100 in order to recognize the state of the other cache device 100.

この場合、S/Eフラグ=1(排他メモリ空間)であるため、スヌープの処理単位は、ページ(例16メガバイト等)である。他のキャッシュ装置100は、スヌープした結果をスヌープ要求元に通知する。通知される結果は、表の「状態」、「アレイ状態」、「他キャッシュ」の列の記載に応じたものとなる。他のキャッシュ装置100は、自分のキャッシュアレイ117が最新データを持っていた場合(M状態)、当該最新データを記憶装置505に書き出す。   In this case, since the S / E flag = 1 (exclusive memory space), the snoop processing unit is a page (eg, 16 megabytes). The other cache device 100 notifies the snoop request source of the snoop result. The notified result corresponds to the description in the columns of “state”, “array state”, and “other cache” in the table. When the cache array 117 has the latest data (M state), the other cache device 100 writes the latest data to the storage device 505.

このスヌープ動作および自キャッシュの状態遷移、他のキャッシュ装置100の状態遷移等の動作は、一般的なMESIプロトコルと異なる。即ち、他のキャッシュ装置100は、スヌープ要求で受け取ったページアドレスに属するブロックを全てキャッシュアレイ117から追い出しキャッシュステータスをIに更新する。その後、他のキャッシュ装置100は、スヌープ要求元のキャッシュ装置100に対して、該当ページの全ブロック追い出しが完了した事を通知する。   Operations such as the snoop operation, the state transition of the own cache, and the state transition of the other cache device 100 are different from the general MESI protocol. In other words, the other cache device 100 evicts all the blocks belonging to the page address received by the snoop request from the cache array 117 and updates the cache status to I. Thereafter, the other cache device 100 notifies the snoop request source cache device 100 that the eviction of all blocks of the page has been completed.

スヌープ要求元の管理部120は、その後、記憶装置505に該当ブロックのリード要求を出す。なお、ページ単位のスヌープ要求の場合であっても、スヌープ要求元の管理部120は、ブロックアドレスを他のキャッシュ装置100に通知し、そこから該当ブロックの最新データを、スヌープの結果の通知に含めて受信しても良い。   Thereafter, the snoop request source management unit 120 issues a read request for the corresponding block to the storage device 505. Even in the case of a snoop request in units of pages, the management unit 120 of the snoop request source notifies the other cache device 100 of the block address, and from there, the latest data of the corresponding block is used to notify the snoop result. You may receive including.

管理部120は、他のキャッシュ装置100の状態に関係なく、自装置のページアドレスアレイ110に、該当ページアドレス、および、他のキャッシュ装置100の該当ページの全ブロック追い出しが完了したか否かを管理する情報を登録する。管理部120は、その際に、リードリクエストと共に持ち回っていたS/Eフラグの値(この場合は1)も一緒に、ページアドレスアレイ110に登録する。管理部120は、自キャッシュアレイ117のステータスをEに更新する。その理由は、該当ページの全ブロックは他のキャッシュ装置100のキャッシュアレイ117から追い出されているためである。   Regardless of the state of the other cache device 100, the management unit 120 determines whether or not the page address array 110 of the own device has completed eviction of the corresponding page address and all pages of the corresponding page of the other cache device 100. Register the information to be managed. At this time, the management unit 120 registers the value of the S / E flag (1 in this case) that was carried along with the read request together with the page address array 110. The management unit 120 updates the status of the own cache array 117 to E. The reason is that all blocks of the corresponding page are evicted from the cache array 117 of the other cache device 100.

2-2
続いて、プロセッサ122は、A番地+8番地に対するリード要求を出す。この時、ページアドレスアレイ110には当該番地のページアドレスは登録済みで、キャッシュアレイ117には当該番地のデータが存在している。この状態は、No.2-2状態(S/Eフラグ=1、メモリアクセス=リード、自ページアドレスアレイ110=ヒット、自キャッシュアレイ117=E)が該当する。S/Eフラグ=1の場合、キャッシュアレイ117はSに遷移する事が無いため、自キャッシュアレイ117=Sの状態(図7の表のNo.2-3〜2-4)は存在しない。
2-2
Subsequently, the processor 122 issues a read request for address A + address 8. At this time, the page address of the address is already registered in the page address array 110, and data of the address exists in the cache array 117. This state corresponds to the No. 2-2 state (S / E flag = 1, memory access = read, own page address array 110 = hit, own cache array 117 = E). When the S / E flag = 1, the cache array 117 does not transition to S, so there is no state (No. 2-3 to 2-4 in the table of FIG. 7) that the cache array 117 is S.

この場合、リード要求がキャッシュアレイ117にヒットした状態であるので、他のキャッシュ装置100に対するスヌープ動作は発生しない。この状態は、後続のA番地+120番地までのリードに対して同様である。   In this case, since the read request has hit the cache array 117, a snoop operation for the other cache device 100 does not occur. This state is the same for the leads up to the subsequent address A + 120.

2−3
続いて、プロセッサ122は、A番地+128番地に対するリード要求を出す。このとき、ページアドレスアレイ110には当該番地のページアドレスは登録済みだが、キャッシュアレイ117には当該番地のデータは存在しない。当該番地は、次ブロックに属するためである。この状態は、図7の表のNo.2-8状態(S/Eフラグ=1、メモリアクセス=リード、自ページアドレスアレイ110=ヒット、自キャッシュアレイ117=I)が該当する。リード要求の対象アドレスが、自装置のページアドレスアレイ110にヒットする状態は、既に他のキャッシュ装置100上に該当ページの全ブロックが存在していない事を意味している。したがって、必然的に他のキャッシュ装置100のキャッシュアレイ117の当該ブロックの状態はIであり、他の状態(図7の表のNo.2-5〜2-7)は存在しない。
2-3
Subsequently, the processor 122 issues a read request for address A + 128. At this time, the page address of the address is registered in the page address array 110, but the data of the address does not exist in the cache array 117. This is because the address belongs to the next block. This state corresponds to the No. 2-8 state (S / E flag = 1, memory access = read, own page address array 110 = hit, own cache array 117 = I) in the table of FIG. A state in which the target address of the read request hits the page address array 110 of its own device means that not all blocks of the corresponding page already exist on the other cache device 100. Therefore, inevitably, the state of the block of the cache array 117 of the other cache device 100 is I, and there is no other state (No. 2-5 to 2-7 in the table of FIG. 7).

管理部120は、その後、記憶装置505に該当ブロックのリード要求を出す。他のキャッシュ装置100のキャッシュアレイ117の当該ブロックの状態は既にIであるため、他のキャッシュ装置100に対するスヌープ動作は不要となる。なお、ページアドレスは、自ページアドレスアレイ110に既に登録済みの状態であるため、更新は不要である。   Thereafter, the management unit 120 issues a read request for the corresponding block to the storage device 505. Since the state of the block in the cache array 117 of the other cache device 100 is already I, the snoop operation for the other cache device 100 is not necessary. Note that the page address is already registered in its own page address array 110, and therefore no update is necessary.

2−4
以降のアクセスに対して管理部120は、キャッシュアレイ117に格納済みのブロック内にアクセスする場合は上述の2−2の動作を、格納済みブロックを越えて新たなブロックをアクセスする場合は上述の2−3の動作を実行する。更に管理部120は、ページを越えて新たなページに対してアクセスする場合は上述の2−1の動作を実行する。
2-4
For subsequent accesses, the management unit 120 performs the above-described operation 2-2 when accessing a block already stored in the cache array 117, and the above-described operation when accessing a new block beyond the stored block. The operation of 2-3 is executed. Furthermore, the management unit 120 executes the above-described operation 2-1 when accessing a new page beyond the page.

2−5
ライト動作に関しても、リード時と同様に、状態に応じた処理が図7の表で規定してある。また、スヌープの処理単位は、ページである。詳細な説明は省略する。
2-5
Regarding the write operation, the process according to the state is defined in the table of FIG. A snoop processing unit is a page. Detailed description is omitted.

次に、図4に戻って、他のキャッシュ装置100におけるスヌープ動作を説明する。   Next, returning to FIG. 4, the snoop operation in the other cache device 100 will be described.

すべての他のキャッシュ装置100のスヌープ制御部(入力)106は、スヌープ要求元キャッシュ装置100が発行したスヌープ要求を受信する。スヌープ制御部(入力)106は、S/Eフラグ情報も一緒に受け取る。受け取ったスヌープ要求は、スヌープアドレス保持部107スヌープアドレス保持部に送られる。スヌープアドレス保持部107もS/Eフラグ情報を一緒に持ち回り保持する。   The snoop control unit (input) 106 of all the other cache devices 100 receives the snoop request issued by the snoop request source cache device 100. The snoop control unit (input) 106 also receives S / E flag information. The received snoop request is sent to the snoop address holding unit 107 snoop address holding unit. The snoop address holding unit 107 also carries and holds the S / E flag information together.

スヌープアドレス保持部107のスヌープアドレスは、選択器108選択器を通り、ページアドレスアレイ110を索引するためにページアドレス保持部109に送られる。選択器108およびページアドレス保持部109もS/Eフラグの情報を持ち回り保持している。また同時にキャッシュアレイ117を索引するために、スヌープアドレス保持部107が保持する物理アドレスは、選択器108および選択器115を通り、ブロックアドレス保持部116に送られる。   The snoop address of the snoop address holding unit 107 passes through the selector 108 selector and is sent to the page address holding unit 109 for indexing the page address array 110. The selector 108 and the page address holding unit 109 carry and hold information on the S / E flag. At the same time, in order to index the cache array 117, the physical address held by the snoop address holding unit 107 is sent to the block address holding unit 116 through the selector 108 and the selector 115.

スヌープ要求アドレスと一緒に持ち回るS/Eフラグの値が0(共有メモリ空間)の場合、スヌープ要求を受けて管理部120が行う動作は、一般的なスヌープ動作(例えば一般的なMESIプロトコル時のスヌープ動作)と同じである。なお、管理部120は、ページアドレスアレイ110とキャッシュアレイ117の状態と照らし合わせて矛盾等が無いかチェックしても良い。   When the value of the S / E flag carried around with the snoop request address is 0 (shared memory space), the operation performed by the management unit 120 in response to the snoop request is a general snoop operation (for example, during a general MESI protocol). (Snoop operation). Note that the management unit 120 may check whether there is any contradiction or the like in the state of the page address array 110 and the cache array 117.

スヌープ要求アドレスと一緒に持ち回るS/Eフラグの値が1(排他メモリ空間)の場合、ページアドレス保持部109に保持したページアドレスでページアドレスアレイ110を索引し、ページヒット/ミス判定部111が、プロセッサ122がアクセスするページがページアドレスアレイ110に登録されているか否かを判定する。ページヒット/ミス判定部111は、判定結果をアドレスと共にページ制御部112に送る。   When the value of the S / E flag carried around with the snoop request address is 1 (exclusive memory space), the page address array 110 is indexed by the page address held in the page address holding unit 109, and the page hit / miss judgment unit 111 is indexed. However, it is determined whether or not the page accessed by the processor 122 is registered in the page address array 110. The page hit / miss determination unit 111 sends the determination result together with the address to the page control unit 112.

ページヒット/ミス判定部111の判定結果がミスの場合、キャッシュアレイ117は該当ページのブロックを保持していない。このため、ページ制御部112は、スヌープ結果として、他キャッシュステータス=Iを返却する様にスヌープ制御部(出力)106を制御する。   When the determination result of the page hit / miss determination unit 111 is a miss, the cache array 117 does not hold the block of the corresponding page. Therefore, the page control unit 112 controls the snoop control unit (output) 106 so as to return other cache status = I as the snoop result.

一方、ページヒット/ミス判定部111の判定結果がヒットの場合、管理部120は、該当ページの全ブロックをキャッシュアレイ117上から追い出す。ページアドレスアレイ110は、該当ページアドレスを最終的に無効化するが、キャッシュアレイ117の該当ページの全ブロック追い出しが完了したか否かを管理する情報を保持する。その理由は、追い出しの過渡状態を制御する為である。   On the other hand, when the determination result of the page hit / miss determination unit 111 is a hit, the management unit 120 drives out all the blocks of the page from the cache array 117. The page address array 110 finally invalidates the corresponding page address, but holds information for managing whether or not all the blocks of the corresponding page in the cache array 117 have been evicted. The reason is to control the transient state of eviction.

ページ制御部112は、バースト制御部113に追い出し対象となるページアドレスを通知する。バースト制御部113は、受け取ったページアドレスを元に、ページ内の最初のブロックから順にブロックアドレスを生成し、順次、ブロックアドレス保持部114に送り、該当ブロックをキャッシュアレイ117から追い出すように指示する。ブロックアドレス保持部114が保持するブロックアドレスは、選択器115を通り、ブロックアドレス保持部116に送られる。ブロックアドレス保持部116に保持したブロックアドレスでキャッシュアレイ117を索引し、キャッシュヒット/ミス判定部118でアクセスするブロックがキャッシュアレイ117に登録されているか否かを判定する。   The page control unit 112 notifies the burst control unit 113 of the page address to be evicted. The burst control unit 113 generates block addresses in order from the first block in the page based on the received page address, sequentially sends the block address to the block address holding unit 114, and instructs to eject the corresponding block from the cache array 117. . The block address held by the block address holding unit 114 passes through the selector 115 and is sent to the block address holding unit 116. The cache array 117 is indexed by the block address held in the block address holding unit 116, and the cache hit / miss determination unit 118 determines whether or not a block to be accessed is registered in the cache array 117.

キャッシュヒット/ミス判定部118の判定結果は、アドレスと共にキャッシュ制御部119に送られる。キャッシュ制御部119は、キャッシュヒット/ミス判定部118の判定結果を元に、キャッシュアレイ117の登録更新動作を制御する。   The determination result of the cache hit / miss determination unit 118 is sent to the cache control unit 119 together with the address. The cache control unit 119 controls the registration update operation of the cache array 117 based on the determination result of the cache hit / miss determination unit 118.

この更新動作は、例えば一般的なMESIプロトコル時の更新動作に同じである。MESIプロトコルを例に簡単に説明すると、キャッシュアレイ117のステータス=Iの場合は、キャッシュアレイ117上に追い出し対象ブロックが存在しないため、キャッシュ制御部119は何もしない。ステータス=EまたはSの場合は、キャッシュアレイ117上に追い出しブロックが存在している(データはメモリ内容に同じ状態である)ため、キャッシュ制御部119はキャッシュステータスを無効化する(ステータスをIに更新する)。ステータス=Mの場合は、キャッシュ上のデータが唯一のデータであるため、キャッシュ制御部119は、データを記憶装置505に書き戻すと共にキャッシュステータスを無効化する(ステータスをIに更新する)。   This update operation is the same as, for example, the update operation during a general MESI protocol. Briefly describing the MESI protocol as an example, when the status of the cache array 117 is equal to I, the cache control unit 119 does nothing because there is no block to be evicted on the cache array 117. When status = E or S, the cache control unit 119 invalidates the cache status (the status is set to I) because the eviction block exists on the cache array 117 (the data is in the same state as the memory contents). Update). In the case of status = M, since the data on the cache is the only data, the cache control unit 119 writes the data back to the storage device 505 and invalidates the cache status (updates the status to I).

バースト制御部113は、該当ページの全ブロックの追い出しを終えるまで処理を続け、全ブロックの追い出しが完了した場合に、ページ制御部112とスヌープ制御部(出力)106に対して完了の報告を通知する。スヌープ制御部(出力)106は、スヌープ要求元のキャッシュ装置100に対して、該当ページの全ブロック追い出しが完了した事を通知する。スヌープ要求元のキャッシュ装置100のページアドレスアレイ110は、この完了通知を受け取り、他のキャッシュ装置100の該当ページの全ブロック追い出しが完了したか否かを管理する情報を追い出し完了を示すように更新する。   The burst control unit 113 continues the process until all the blocks of the corresponding page have been evicted, and when the evicting of all the blocks is completed, notifies the page control unit 112 and the snoop control unit (output) 106 of the completion. To do. The snoop control unit (output) 106 notifies the snoop request source cache device 100 that all block eviction of the page has been completed. The page address array 110 of the snoop request source cache device 100 receives this completion notification, and updates the information for managing whether or not all blocks of the corresponding page of the other cache device 100 are completed to indicate the completion of the eviction. To do.

なお、実際の装置においては、説明した動作を実行するにあたり、物理的な距離や時間を要する事を考慮する必要がある(処理の完了の待ち合わせ等)。この点に関しては、各装置の設計に依存する部分であり、解決方法もその設計によって様々であるため、ここでは、その実現手段に関しては言及しない。   Note that in an actual apparatus, it is necessary to consider that a physical distance and time are required to execute the described operation (waiting for completion of processing, etc.). In this respect, since it depends on the design of each device, and the solutions vary depending on the design, the implementation means is not mentioned here.

本実施の形態にかかるキャッシュ装置100は、排他メモリ空間のスヌープ回数を削減することができる。具体的には、A番地から連続するメモリ空間の値を順にリードする例において、S/Eフラグ=0(共有メモリ空間)時の動作とS/Eフラグ=1(排他メモリ空間)時のスヌープ回数を比較すると以下となる。   The cache device 100 according to the present embodiment can reduce the number of snoops in the exclusive memory space. Specifically, in the example of sequentially reading the values in the continuous memory space from address A, the operation when the S / E flag = 0 (shared memory space) and the snoop when the S / E flag = 1 (exclusive memory space) The comparison of the number of times is as follows.

S/Eフラグ=0(共有メモリ空間)時 … ブロックを越える度にスヌープ
1-1) No.1-9〜1-12 スヌープ
1-2) No.1-2〜1-4 不要
1-3) No.1-5〜1-8 スヌープ
1-4) 以降は1-2) → 1-3)を繰り返し、ページを越えたら1-1)へ
S/Eフラグ=1(排他メモリ空間)時 … ページを越える場合にのみスヌープ
2-1) No.2-9〜2-12 スヌープ
2-2) No.2-2 不要
2-3) No.2-8 不要
2-4) 以降は2)→3)を繰り返し、ページを越えたら1)へ
この結果スヌープ帯域への要求が低減され、本願発明のキャッシュ装置100は、LSI501の回路規模の低減、物理ピン数投資や高速動作に伴う消費電力等のテクノロジコストの低減が可能となる。
When S / E flag = 0 (shared memory space): Snoop every time a block is crossed
1-1) No.1-9 ~ 1-12 Snoop
1-2) No. 1-2 to 1-4 Not required
1-3) No.1-5 ~ 1-8 Snoop
1-4) After that, repeat 1-2) → 1-3) and go to 1-1) if the page is exceeded. S / E flag = 1 (exclusive memory space)… Snoop only when the page is exceeded
2-1) No.2-9 ~ 2-12 Snoop
2-2) No.2-2 Not required
2-3) No.2-8 Not required
2-4) After that, repeat 2) → 3) and go to 1) when the page is exceeded Technology costs such as power consumption associated with investment and high-speed operation can be reduced.

このような効果を奏する理由は、管理部120が排他メモリ空間のスヌープをページ単位で実施するからである。   The reason for such an effect is that the management unit 120 performs snoop of the exclusive memory space in units of pages.

また、本発明は、スヌープキャッシュ制御方式だけでなく、ディレクトリ制御方式にも適用できる。記憶装置505内のメモリが、共有メモリ空間であるか排他メモリ空間であるかの区別は、ページと異なる単位で与えられても良い。   The present invention can be applied not only to the snoop cache control method but also to the directory control method. The distinction as to whether the memory in the storage device 505 is a shared memory space or an exclusive memory space may be given in units different from pages.

<第2の実施の形態>
図8は、本実施の形態のキャッシュ装置100の構成図である。
<Second Embodiment>
FIG. 8 is a configuration diagram of the cache device 100 according to the present embodiment.

キャッシュ装置100は、複数ブロックを含むページに分割され、複数のプロセッサ122に共有される共有ページと一定期間何れかのプロセッサ122に占有される排他ページを包含する記憶装置505と、複数のプロセッサ122と、を備えるコンピュータ506に、プロセッサ122に対応して設けられている。   The cache device 100 is divided into pages including a plurality of blocks, a storage device 505 including a shared page shared by the plurality of processors 122 and an exclusive page occupied by any processor 122 for a certain period of time, and a plurality of processors 122 Are provided in correspondence with the processor 122.

キャッシュ装置100は、管理部120と、キャッシュアレイ117と、を備える。   The cache device 100 includes a management unit 120 and a cache array 117.

管理部120は、対応するプロセッサ122から排他ページ内の領域のアドレスを受信して、領域を含むページのスヌープ要求を他装置に送信して、領域を含むブロックのアドレスと最新データを自装置のキャッシュアレイ117に登録する。管理イブ120は、さらに、他装置からページのスヌープ要求を受信して、指定されたページが包含する全てのブロックを自装置のキャッシュアレイ117から削除する。   The management unit 120 receives the address of the area in the exclusive page from the corresponding processor 122, transmits a snoop request for the page including the area to the other device, and sends the address of the block including the area and the latest data of the own device. Register in the cache array 117. The management eve 120 further receives a page snoop request from another device, and deletes all blocks included in the designated page from the cache array 117 of the own device.

本実施の形態にかかるキャッシュ装置100は、排他メモリ空間のスヌープ回数を削減することができる。このような効果を奏する理由は、管理部120が排他メモリ空間のスヌープをページ単位で実施するからである。   The cache device 100 according to the present embodiment can reduce the number of snoops in the exclusive memory space. The reason for such an effect is that the management unit 120 performs snoop of the exclusive memory space in units of pages.

以上、実施形態を参照して本願発明を説明したが、本願発明は上記実施形態に限定されものではない。本願発明の構成や詳細には、本願発明のスコープ内で当業者が理解し得る様々な変更をすることができる。   Although the present invention has been described with reference to the embodiments, the present invention is not limited to the above embodiments. Various changes that can be understood by those skilled in the art can be made to the configuration and details of the present invention within the scope of the present invention.

100 キャッシュ装置
101 命令デコード部
102 論理アドレス生成部
103 アドレス変換制御部
104 アドレス変換部
105 物理アドレス保持部
106 スヌープ制御部
106 スヌープ制御部(入力)
106 スヌープ制御部(出力)
107 スヌープアドレス保持部
108 選択器
109 ページアドレス保持部
110 ページアドレスアレイ
111 ページヒット/ミス判定部
112 ページ制御部
113 バースト制御部
114 ブロックアドレス保持部
115 選択器
116 ブロックアドレス保持部
117 キャッシュアレイ
118 キャッシュヒット/ミス判定部
119 キャッシュ制御部
121 メモリ制御部
122 プロセッサ
501 LSI
505 記憶装置
506 コンピュータ
100 cache device
101 Instruction decode section
102 Logical address generator
103 Address translation controller
104 Address converter
105 Physical address holding unit
106 Snoop control unit
106 Snoop control unit (input)
106 Snoop control unit (output)
107 Snoop address holding unit
108 selector
109 Page address holding section
110 page address array
111 Page hit / miss judgment section
112 Page control
113 Burst controller
114 Block address holding section
115 selector
116 Block address holding section
117 cache array
118 Cache hit / miss judgment section
119 Cache control unit
121 Memory controller
122 processor
501 LSI
505 storage device
506 computer

Claims (7)

複数ブロックを含むページに分割され、複数のプロセッサに共有される共有ページと一定期間何れかのプロセッサに占有される排他ページを包含する記憶装置と、前記複数のプロセッサと、を備えるコンピュータに、プロセッサに対応して設けられたキャッシュ装置であって、
1)対応するプロセッサから排他ページ内の領域のアドレスを受信して、前記領域を含むページのスヌープ要求を他装置に送信して、前記領域を含むブロックのアドレスと最新データを自装置のキャッシュアレイに記憶し、2)他装置からページのスヌープ要求を受信して、指定されたページが包含する全てのブロックを自装置のキャッシュアレイから削除する管理手段と、前記キャッシュアレイと、を備えるキャッシュ装置。
A computer comprising: a shared page divided into pages including a plurality of blocks and shared by a plurality of processors; a storage device including an exclusive page occupied by any processor for a certain period; and the plurality of processors. A cache device provided corresponding to
1) The address of the area in the exclusive page is received from the corresponding processor, the snoop request for the page including the area is transmitted to another apparatus, and the address of the block including the area and the latest data are stored in the cache array of the own apparatus. 2) a cache device comprising: a management unit that receives a snoop request for a page from another device and deletes all blocks included in the designated page from the cache array of the own device; and the cache array .
前記キャッシュ装置は、さらに、ページアドレスアレイを備え、
前記管理手段は、1)前記領域を含むページのアドレスが前記ページアドレスアレイに登録されていなければ、これを前記ページアドレスアレイに登録して、ページのスヌープ要求を他装置に送信し、2)前記領域を含むページのアドレスが前記ページアドレスアレイに登録されていれば、ページのスヌープ要求を他装置に送信しない、請求項1のキャッシュ装置。
The cache device further includes a page address array,
The management means 1) if the address of the page including the area is not registered in the page address array, registers it in the page address array and sends a page snoop request to another device. 2) 2. The cache device according to claim 1, wherein if the address of the page including the area is registered in the page address array, a page snoop request is not transmitted to another device.
前記管理手段は、
1)対応するプロセッサから共有ページ内の領域のアドレスを受信して、前記領域を含むブロックのスヌープ要求を他装置に送信して、前記領域を含むブロックのアドレスと最新データを自装置のキャッシュアレイに記憶し、2)他装置からブロックのスヌープ要求を受信して、指定されたブロックを自装置のキャッシュアレイから削除する、請求項1または2のキャッシュ装置。
The management means includes
1) The address of the area in the shared page is received from the corresponding processor, the snoop request for the block including the area is transmitted to another apparatus, and the address of the block including the area and the latest data are stored in the cache array of the own apparatus. And 2) receiving a block snoop request from another device, and deleting the designated block from the cache array of the own device.
論理アドレスと、物理アドレスと、共用ページまたは排他ページの区別情報と、を格納するアドレス変換手段を備えた前記複数のプロセッサと、
前記記憶装置と、
プロセッサの論理アドレスによる前記記憶装置アクセス時に、前記アドレス変換手段から、前記物理アドレスと前記区別情報を取得する、請求項1乃至3の何れかのキャッシュ装置と、を備えるコンピュータ。
A plurality of processors comprising address conversion means for storing logical addresses, physical addresses, and shared page or exclusive page distinction information;
The storage device;
4. A computer comprising: the cache device according to claim 1, wherein the physical address and the distinction information are acquired from the address conversion unit when the storage device is accessed by a logical address of a processor.
複数ブロックを含むページに分割され、複数のプロセッサに共有される共有ページと一定期間何れかのプロセッサに占有される排他ページを包含する記憶装置と、前記複数のプロセッサと、を備えるコンピュータに、プロセッサに対応して設けられたキャッシュ装置において、
1)対応するプロセッサから排他ページ内の領域のアドレスを受信して、前記領域を含むページのスヌープ要求を他装置に送信して、前記領域を含むブロックのアドレスと最新データを自装置のキャッシュアレイに記憶し、2)他装置からページのスヌープ要求を受信して、指定されたページが包含する全てのブロックを自装置のキャッシュアレイから削除するキャッシュ制御方法。
A computer comprising: a shared page divided into pages including a plurality of blocks and shared by a plurality of processors; a storage device including an exclusive page occupied by any processor for a certain period; and the plurality of processors. In the cache device provided corresponding to
1) The address of the area in the exclusive page is received from the corresponding processor, the snoop request for the page including the area is transmitted to another apparatus, and the address of the block including the area and the latest data are stored in the cache array of the own apparatus. 2) A cache control method for receiving a page snoop request from another device and deleting all blocks included in the specified page from the cache array of the own device.
1)前記領域を含むページのアドレスが前記ページアドレスアレイに登録されていなければ、これを前記ページアドレスアレイに登録して、ページのスヌープ要求を他装置に送信し、2)前記領域を含むページのアドレスが前記ページアドレスアレイに登録されていれば、ページのスヌープ要求を他装置に送信しない、請求項5のキャッシュ制御方法。   1) If the address of the page including the area is not registered in the page address array, register the address in the page address array and send a page snoop request to another device. 2) The page including the area 6. The cache control method according to claim 5, wherein if the address is registered in the page address array, a page snoop request is not transmitted to another device. 1)対応するプロセッサから共有ページ内の領域のアドレスを受信して、前記領域を含むブロックのスヌープ要求を他装置に送信して、前記領域を含むブロックのアドレスと最新データを自装置のキャッシュアレイに記憶し、2)他装置からブロックのスヌープ要求を受信して、指定されたブロックを自装置のキャッシュアレイから削除する、請求項5または6のキャッシュ制御方法。 1) The address of the area in the shared page is received from the corresponding processor, the snoop request for the block including the area is transmitted to another apparatus, and the address of the block including the area and the latest data are stored in the cache array of the own apparatus. And 2) receiving a block snoop request from another device and deleting the designated block from the cache array of the own device.
JP2013265377A 2013-12-24 2013-12-24 Cache device, computer including cache device, and cache control method Active JP6272011B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013265377A JP6272011B2 (en) 2013-12-24 2013-12-24 Cache device, computer including cache device, and cache control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013265377A JP6272011B2 (en) 2013-12-24 2013-12-24 Cache device, computer including cache device, and cache control method

Publications (2)

Publication Number Publication Date
JP2015121945A true JP2015121945A (en) 2015-07-02
JP6272011B2 JP6272011B2 (en) 2018-01-31

Family

ID=53533504

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013265377A Active JP6272011B2 (en) 2013-12-24 2013-12-24 Cache device, computer including cache device, and cache control method

Country Status (1)

Country Link
JP (1) JP6272011B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7383007B2 (en) 2018-08-02 2023-11-17 ザイリンクス インコーポレイテッド Hybrid precision and non-precision cache snoop filtering

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020007440A1 (en) * 2000-07-14 2002-01-17 Hitachi, Ltd. Cache access control system
US20020083275A1 (en) * 2000-12-25 2002-06-27 Shinichi Kawamoto Cache coherent control system
US20030210248A1 (en) * 2002-05-08 2003-11-13 Wyatt David A. Method and system for optimally sharing memory between a host processor and graphics processor

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020007440A1 (en) * 2000-07-14 2002-01-17 Hitachi, Ltd. Cache access control system
JP2002032265A (en) * 2000-07-14 2002-01-31 Hitachi Ltd Cache access control system and data processing system
US20020083275A1 (en) * 2000-12-25 2002-06-27 Shinichi Kawamoto Cache coherent control system
JP2002197073A (en) * 2000-12-25 2002-07-12 Hitachi Ltd Cache coincidence controller
US20030210248A1 (en) * 2002-05-08 2003-11-13 Wyatt David A. Method and system for optimally sharing memory between a host processor and graphics processor
JP2005524907A (en) * 2002-05-08 2005-08-18 インテル コーポレイション Method and system for optimal sharing of memory between host processor and graphics processor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7383007B2 (en) 2018-08-02 2023-11-17 ザイリンクス インコーポレイテッド Hybrid precision and non-precision cache snoop filtering

Also Published As

Publication number Publication date
JP6272011B2 (en) 2018-01-31

Similar Documents

Publication Publication Date Title
EP2430551B1 (en) Cache coherent support for flash in a memory hierarchy
RU2443011C2 (en) Filtration of tracing using the tracing requests cash
US9792210B2 (en) Region probe filter for distributed memory system
US9081711B2 (en) Virtual address cache memory, processor and multiprocessor
US7363462B2 (en) Performing virtual to global address translation in processing subsystem
US7765381B2 (en) Multi-node system in which home memory subsystem stores global to local address translation information for replicating nodes
TWI522802B (en) Apparatus and method for ensuring data coherency within a cache memory hierarchy of a microprocessor
US20120102273A1 (en) Memory agent to access memory blade as part of the cache coherency domain
CA2295403A1 (en) Non-uniform memory access (numa) data processing system having shared intervention support
US10423354B2 (en) Selective data copying between memory modules
WO2017112408A1 (en) Cpu remote snoop filtering mechanism for field programmable gate array cache
US9830265B2 (en) Reuse of directory entries for holding state information through use of multiple formats
US7360056B2 (en) Multi-node system in which global address generated by processing subsystem includes global to local translation information
CN113656212B (en) System and method for cache directory TCAM error detection and correction
US11526449B2 (en) Limited propagation of unnecessary memory updates
TWI407306B (en) Mcache memory system and accessing method thereof and computer program product
US9442856B2 (en) Data processing apparatus and method for handling performance of a cache maintenance operation
JP6272011B2 (en) Cache device, computer including cache device, and cache control method
JP6249120B1 (en) Processor
US11755485B2 (en) Snoop filter device
US10482015B2 (en) Ownership tracking updates across multiple simultaneous operations
KR20200088391A (en) Rinsing of cache lines from a common memory page to memory
Goel et al. E-cache memory becoming a boon towards memory management system
Kalyanasundharam et al. Cache Hierarchy and Memory Subsystem of the AMD Opteron™ Processor (“Magny Cours”)

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20161115

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170713

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170822

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20171002

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20171228

R150 Certificate of patent or registration of utility model

Ref document number: 6272011

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150