JP4868246B2 - Multiprocessor and memory replacement method - Google Patents

Multiprocessor and memory replacement method Download PDF

Info

Publication number
JP4868246B2
JP4868246B2 JP2007236085A JP2007236085A JP4868246B2 JP 4868246 B2 JP4868246 B2 JP 4868246B2 JP 2007236085 A JP2007236085 A JP 2007236085A JP 2007236085 A JP2007236085 A JP 2007236085A JP 4868246 B2 JP4868246 B2 JP 4868246B2
Authority
JP
Japan
Prior art keywords
cell
memory
copy
snoop
processor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2007236085A
Other languages
Japanese (ja)
Other versions
JP2009070013A (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.)
NEC Computertechno Ltd
Original Assignee
NEC Computertechno 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 Computertechno Ltd filed Critical NEC Computertechno Ltd
Priority to JP2007236085A priority Critical patent/JP4868246B2/en
Publication of JP2009070013A publication Critical patent/JP2009070013A/en
Application granted granted Critical
Publication of JP4868246B2 publication Critical patent/JP4868246B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/0817Cache consistency protocols using directory methods
    • G06F12/082Associative directories

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Description

本発明は、本発明は、スパースディレクトリ方式を採用するマルチプロセッサシステムにおけるメモリの動的リプレース方式に関する。   The present invention relates to a dynamic memory replacement method in a multiprocessor system employing a sparse directory method.

スパースディレクトリ方式を採用するマルチプロセッサシステムにおけるメモリの動的リプレースでは、リプレース前のメモリからリプレース後のメモリへデータのコピーが行われる。フルディレクトリ方式が、全メモリについてステータスとキャッシュしているプロセッサを管理するのに対し、スパースディレクトリ方式はメモリの一部についてのみ管理を行う方式である。スパースディレクトリ方式を採用するマルチプロセッサシステムにおける、関連するメモリの動的リプレースの方式について、図2を参照して説明する。図2は、複数のセルから構成されるマルチプロセッサシステムの一例を示す図である。図2において、セル100に備えるメモリ111からセル200に備えるメモリ214へ動的リプレースを行う場合を説明する。セル100、200は、1以上のプロセッサ、1以上のメモリ、及びセルコントローラを備える。   In the dynamic replacement of the memory in the multiprocessor system adopting the sparse directory method, data is copied from the memory before the replacement to the memory after the replacement. The full directory method manages the status and the cached processor for all memories, whereas the sparse directory method manages only a part of the memory. A related memory dynamic replacement method in a multiprocessor system employing a sparse directory method will be described with reference to FIG. FIG. 2 is a diagram illustrating an example of a multiprocessor system including a plurality of cells. A case where dynamic replacement is performed from the memory 111 provided in the cell 100 to the memory 214 provided in the cell 200 will be described with reference to FIG. The cells 100 and 200 include one or more processors, one or more memories, and a cell controller.

関連する方式では、メモリ間のデータコピー後にコピー先セルコントローラ220のスパースディレクトリを更新する。このため、メモリ間のデータコピー後に一度もアクセスされていないラインに対するアクセスの場合、全プロセッサにスヌープのブロードキャストを行う必要があった。さらに、スパースディレクトリでは全メモリのステータスを管理することができないので、コヒーレンシを保証するために、メモリのデータコピー後にコピー先の全メモリ214を一度リードし、スパースディレクトリを更新する必要があった。   In the related method, the sparse directory of the copy destination cell controller 220 is updated after data is copied between the memories. For this reason, when accessing a line that has never been accessed after copying data between memories, it is necessary to broadcast a snoop to all the processors. Further, since the status of all memories cannot be managed in the sparse directory, it is necessary to read the entire copy destination memory 214 once after copying the data in the memory and update the sparse directory in order to guarantee coherency.

スパースディレクトリ方式を採用するマルチプロセッサシステムにおけるメモリのデータコピー及びその終了後の動作を図9のフローチャートを使って説明する。   The memory data copy and the operation after the end in the multiprocessor system adopting the sparse directory method will be described with reference to the flowchart of FIG.

まず、コピー元プロセッサ101のメモリ111からコピー先プロセッサ201のメモリ211へのメモリのデータコピーを行う(S1001)。具体的には、次のような動作を行う。プロセッサ102は、システムFWから指示を受け、コピー元プロセッサ101に接続するメモリ111の全ラインを、キャッシュライン毎にリードし、コピー元プロセッサ101のメモリに対してライトを行う。コピー元プロセッサ101は、ライト要求を受けるたびにメモリ111に対して、ライトを行うとともに、コピー先プロセッサ204に接続するメモリ214に対しライトを転送する(ライト要求を行う)。このようにして、メモリのデータコピーを行う。   First, the memory data is copied from the memory 111 of the copy source processor 101 to the memory 211 of the copy destination processor 201 (S1001). Specifically, the following operation is performed. The processor 102 receives an instruction from the system FW, reads all lines of the memory 111 connected to the copy source processor 101 for each cache line, and writes to the memory of the copy source processor 101. Each time the copy source processor 101 receives a write request, the copy source processor 101 writes to the memory 111 and transfers the write to the memory 214 connected to the copy destination processor 204 (performs a write request). In this way, data copy of the memory is performed.

メモリ111の全ラインのリードおよびライトが完了した後に、システムFWはシステム内のアドレスとメモリの対応を示すレジスタをコピー元のメモリ111からコピー先のメモリ214に変更し、コピー元プロセッサ101とメモリ111をシステムから切り離す(S1002)。次に、システムFWから指示により、システム内の任意のプロセッサは、コピー先プロセッサ204に接続するメモリ214をキャッシュライン毎にリードする(S1003)。コピー先プロセッサ204は、接続する全てのプロセッサ201、202、203とセルコンローラ206に、スヌープを送信する(S1004)。スヌープを受けとったセルコントローラ220は、スパースディレクトリ221にスヌープを受けたラインのステータス情報を保持しているかの判断を行う(S1005)。   After the reading and writing of all the lines of the memory 111 are completed, the system FW changes the register indicating the correspondence between the address and the memory in the system from the copy source memory 111 to the copy destination memory 214, and the copy source processor 101 and the memory 111 is disconnected from the system (S1002). Next, according to an instruction from the system FW, an arbitrary processor in the system reads the memory 214 connected to the copy destination processor 204 for each cache line (S1003). The copy destination processor 204 transmits a snoop to all the processors 201, 202, 203 and the cell controller 206 to be connected (S1004). The cell controller 220 that has received the snoop determines whether the sparse directory 221 holds the status information of the line that has received the snoop (S1005).

スパースディレクトリ221でラインのステータス情報を保持している場合(S1006でYes)、セルコントローラ220は、管理しているステータス情報に基づいてラインをキャッシュしている特定のプロセッサにスヌープを送信し(S1007)、該プロセッサよりスヌープレスポンスを受け取る(S1008)。一方、スパースディレクトリ221でラインのステータス情報を保持していない場合(S1006でNo)、セルコントローラ220は、セル200外の全てのプロセッサに対しスヌープのブロードキャストを行い(S1009)、そのスヌープレスポンスを全て受信する(S1010)。   When the line status information is held in the sparse directory 221 (Yes in S1006), the cell controller 220 transmits a snoop to a specific processor that caches the line based on the managed status information (S1007). ), A snoop response is received from the processor (S1008). On the other hand, when the line status information is not held in the sparse directory 221 (No in S1006), the cell controller 220 broadcasts the snoop to all the processors outside the cell 200 (S1009), and all the snoop responses are transmitted. Receive (S1010).

次に、セルコントローラ220は、スヌープレスポンスに基づいて、スパースディレクトリ221の更新を行い(S1011)、コピー先プロセッサ204に対し、スヌープレスポンスを送信する(S1012)。コピー先プロセッサ204は、スヌープレスポンスを全て受信し、リクエストを送信したプロセッサにデータを送信する(S1013)。   Next, the cell controller 220 updates the sparse directory 221 based on the snoop response (S1011), and transmits a snoop response to the copy destination processor 204 (S1012). The copy destination processor 204 receives all the snoop responses and transmits data to the processor that transmitted the request (S1013).

任意のプロセッサは、コピー先メモリ214の全ラインのリードが終了したかを確認し、終了した場合(S1014でYes)、通常の動作に移行し(S1015)、リードしていないラインが残っている場合(S1014でNo)、コピー先メモリ214のキャッシュラインで、リードされていないラインにリードポイントをあわせ、リードを行い(S1016)、ステップS1004からの処理を繰り返す。このようにして、一連の動作をコピー先プロセッサ204のメモリの全キャッシュライン数分行う。   The arbitrary processor confirms whether or not reading of all the lines in the copy destination memory 214 has been completed, and if completed (Yes in S1014), shifts to a normal operation (S1015), and there remains an unread line. In the case (No in S1014), the read point is aligned with the unread line in the cache line of the copy destination memory 214, the read is performed (S1016), and the processing from Step S1004 is repeated. In this way, a series of operations are performed for the total number of cache lines in the memory of the copy destination processor 204.

これにより、セルコントローラ220内のスパースディレクトリ221でセル200外のプロセッサのキャッシュ情報を全て管理する状態になり、プロセッサキャッシュ間コヒーレンシが保証される。また、特許文献1には、分散メモリマルチプロセッサシステムにおけるメモリ移行のためのシステムが開示されている。この技術はメモリの1ラインをコピーする毎に、アクセス先のラインを旧ラインから新ラインへ変更し、変更後のラインのアクセスを旧ラインから新ラインへ転送している。
特開2004−054931号公報
As a result, the cache information of the processors outside the cell 200 is managed by the sparse directory 221 in the cell controller 220, and inter-processor cache coherency is guaranteed. Patent Document 1 discloses a system for memory migration in a distributed memory multiprocessor system. In this technology, every time one line of memory is copied, the access destination line is changed from the old line to the new line, and the access of the changed line is transferred from the old line to the new line.
JP 2004-054931 A

しかしながら、この関連する方式では、プロセッサキャッシュ間コヒーレンシを保証するため、コピー先メモリの全キャッシュラインをリードし、コピー先セル(上記例ではセル200)外に含まれる全プロセッサにスヌープのブロードキャストを行う必要があった。このため、メモリの動的リプレースの処理時間が長く、またメモリのデータコピー後のリードの間は、他のリクエストのスループットが落ち、性能が低下する問題があった。近年、システムあたりのメモリの容量は増加する傾向にあり、この問題を解決する必要があった。   However, in this related method, in order to guarantee coherency between processor caches, all cache lines in the copy destination memory are read, and snoop broadcast is performed to all processors included outside the copy destination cell (cell 200 in the above example). There was a need. For this reason, there is a problem that the processing time of the dynamic replacement of the memory is long, and the throughput of other requests is reduced during the read after the data copy of the memory, and the performance is deteriorated. In recent years, the memory capacity per system has been increasing, and it has been necessary to solve this problem.

本発明は、このような事情に鑑みてなされたものであり、スパースディレクトリ方式を採用するマルチプロセッサシステムにおいて、コピー元のスパースディレクトリを用いてコピー先のスパースディレクトリを更新することによって、メモリの動的リプレースの処理を高速化させることを目的とする。   The present invention has been made in view of such circumstances, and in a multiprocessor system employing a sparse directory method, the memory operation is improved by updating the copy destination sparse directory using the copy source sparse directory. The purpose is to speed up the process of automatic replacement.

本発明に係るマルチプロセッサの一態様は、キャッシュメモリを有する1以上のプロセッサと、1以上のメモリとを有するセルを複数備えるマルチプロセッサシステムであって、前記各セルは、他セル内のキャッシュメモリに記録されている自セル内のメモリのデータに関するステータス情報を保持するスパースディレクトリと、コピー元セルとコピー先セルが異なるメモリ間でデータコピーを行う場合、コピー元メモリからコピー先メモリへデータをコピーし、前記コピー元セル内のスパースディレクトリが保持するステータス情報に基づいて、前記コピー先セルのスパースディレクトリを更新するセルコントローラと、を備える。   One aspect of the multiprocessor according to the present invention is a multiprocessor system including a plurality of cells each having one or more processors having a cache memory and one or more memories, wherein each cell is a cache memory in another cell. When copying data between the sparse directory that stores the status information related to the memory data in the own cell and the memory in which the copy source cell and copy destination cell are different, the data is copied from the copy source memory to the copy destination memory. A cell controller that performs copying and updates the sparse directory of the copy destination cell based on status information held in the sparse directory in the copy source cell.

また、本発明に係るメモリのリプレース方法の一態様は、キャッシュメモリを有する1以上のプロセッサと、1以上のメモリとを有するセルを複数備えるマルチプロセッサシステムのメモリリプレース方法であって、他セル内のキャッシュメモリに保持された自セル内のメモリのデータに関するステータス情報を保持し、セルが異なるメモリ間でコピー元メモリからコピー先メモリへデータをコピーし、コピー終了後、前記コピー元メモリへのアクセス先をコピー先メモリへ変更し、前記コピー元セル内のスパースディレクトリが保持するステータス情報に基づいて、前記コピー先セルのスパースディレクトリが保持するステータス情報を更新する。   Another aspect of the memory replacement method according to the present invention is a memory replacement method for a multiprocessor system including a plurality of cells each having one or more processors having a cache memory and one or more memories. Status information regarding the data in the memory in its own cell held in the cache memory of the cell, and copying the data from the copy source memory to the copy destination memory between memories with different cells. The access destination is changed to the copy destination memory, and the status information held in the sparse directory of the copy destination cell is updated based on the status information held in the sparse directory in the copy source cell.

本発明によれば、スパースディレクトリ方式を採用するマルチプロセッサシステムにおいて、コピー元のスパースディレクトリを用いてコピー先のスパースディレクトリを更新することによって、メモリの動的リプレースの処理を高速化させることが可能となる。   According to the present invention, in a multiprocessor system employing a sparse directory system, it is possible to speed up the dynamic replacement process of a memory by updating the copy destination sparse directory using the copy source sparse directory. It becomes.

以下、本発明の実施形態について、図面を参照しながら説明する。説明の明確化のため、以下の記載及び図面は、適宜、省略、及び簡略化がなされている。各図面において同一の構成または機能を有する構成要素および相当部分には、同一の符号を付し、その説明を省略する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. For clarity of explanation, the following description and drawings are omitted and simplified as appropriate. In the drawings, components having the same configuration or function and corresponding parts are denoted by the same reference numerals, and description thereof is omitted.

(実施形態1)
本実施形態では、コピー元のスパースディレクトリにコピー元のメモリのキャッシュ状況を反映させ、メモリ間のデータコピー後にコピー元のスパースディレクトリの情報をコピー先のスパースディレクトリへ反映させる一態様を説明する。
(Embodiment 1)
In the present embodiment, an aspect will be described in which the cache state of the copy source memory is reflected in the copy source sparse directory, and the information of the copy source sparse directory is reflected in the copy destination sparse directory after data is copied between the memories.

図1は、本発明の実施形態に係るマルチプロセッサシステムが備えるセルの構成例を示すブロック図である。セル100はマルチプロセッサシステムの一つの単位であり、プロセッサ101、102、103、104、メモリ111、112、113、114、セルコントローラ120を備える。   FIG. 1 is a block diagram illustrating a configuration example of a cell included in a multiprocessor system according to an embodiment of the present invention. The cell 100 is one unit of the multiprocessor system, and includes processors 101, 102, 103, and 104, memories 111, 112, 113, and 114, and a cell controller 120.

キャッシュ(キャッシュメモリ)131、132、133、134は、プロセッサ101、102、103、104の内部にメモリのデータを一時的に格納するMESI(Modified Exclusive Shared Invalid)などの一般的なキャッシュプロトコルを採用するキャッシュメモリである。   The cache (cache memory) 131, 132, 133, 134 employs a general cache protocol such as MESI (Modified Exclusive Shared Invalid) that temporarily stores memory data in the processors 101, 102, 103, 104. Cache memory.

プロセッサ101、102、103、104はメモリ111、112、113、114それぞれと接続され、各メモリのデータの管理を行っている。プロセッサ101〜104とセルコントローラ120は、インタフェース151〜160により、1対1で接続される。   The processors 101, 102, 103, and 104 are connected to the memories 111, 112, 113, and 114, respectively, and manage data in each memory. The processors 101 to 104 and the cell controller 120 are connected one-to-one by the interfaces 151 to 160.

メモリ111〜114は各プロセッサからキャッシュライン単位でアクセスされる。1キャッシュラインのビット幅は例えば64バイトで一定であり、メモリアクセスの際に指定されるアドレス(後述する図3のアドレス303)で、キャッシュラインの位置が決定される。   The memories 111 to 114 are accessed from each processor in units of cache lines. The bit width of one cache line is, for example, 64 bytes, and the position of the cache line is determined by an address (address 303 in FIG. 3 described later) specified at the time of memory access.

セルコントローラ120は、セル100内のメモリ111〜114とセル100外との間のアクセスを制御する。セルコントローラ120は、セル100の外部からのアクセスを受けたときに、メモリ111〜114が任意のプロセッサにキャッシュされているかどうかの情報と、キャッシュされている場合は、そのプロセッサ番号の情報を保持するスパースディレクトリ121を設ける。   The cell controller 120 controls access between the memories 111 to 114 in the cell 100 and the outside of the cell 100. When the cell controller 120 receives an access from the outside of the cell 100, the cell controller 120 holds information on whether or not the memories 111 to 114 are cached in an arbitrary processor, and information on the processor number if cached. A sparse directory 121 is provided.

スパースディレクトリ121は、セル内のメモリ111〜114に関して他セルのプロセッサが保持するキャッシュのステータスを全て管理する。ここで、スパースディレクトリ121は、セル100内のメモリ111〜114の全キャッシュラインより少ないエントリしか持たず、管理可能なエントリ数を越えた時には、他セル内のプロセッサからデータの掃き出しを行わせる機構を有する。
システムFW(Firmware)122は、セルコントローラ120内に設けられ、HW(hardware)の基本的な制御を行うソフトのことである。例えば、今回のメモリ間のデータコピーも、システムFWで制御可能なものの1つということができる。。
The sparse directory 121 manages all the cache statuses held by the processors of other cells with respect to the memories 111 to 114 in the cell. Here, the sparse directory 121 has fewer entries than all the cache lines of the memories 111 to 114 in the cell 100, and when the number of manageable entries is exceeded, a mechanism for sweeping data from the processors in other cells. Have
A system FW (Firmware) 122 is software that is provided in the cell controller 120 and performs basic control of HW (hardware). For example, data copying between memories this time can be said to be one that can be controlled by the system FW. .

なお、図1に示すプロセッサ及びメモリの数は一例を示したものであり、1つのセルに1以上のプロセッサ及びメモリが備えられていればよい。   Note that the number of processors and memories shown in FIG. 1 is an example, and it is sufficient that one cell includes one or more processors and memories.

図2に、図1で示したセル間の接続を示す。図2は、複数のセルから構成されるマルチプロセッサシステムの一例を示す図である。図2では、セル100の他に、セル200、500、550を設けた例を示す。セル200、500、550は、セル100と同様の構成を有するが、図2中では一部省略している。セルコントローラ120、220、520、570はインタフェース251〜256で1対1接続され、セル100、200、500、550間のアクセスを転送する。セル200は、プロセッサ201、202、203、204とメモリ214、セルコントローラ220、セルコントローラ220に設置するスパースディレクトリ221を備える。セル500はプロセッサ501、502、503、504とセルコントローラ520を、セル550はプロセッサ551、552、553、554とセルコントローラ570を備えている。各セル200、500、550は、図1で示したキャッシュ105〜108とメモリ111〜114、スパースディレクトリ121、及びシステムFW122に対応する構成要素が存在するが、説明で使用しないため省略する。   FIG. 2 shows connections between the cells shown in FIG. FIG. 2 is a diagram illustrating an example of a multiprocessor system including a plurality of cells. FIG. 2 shows an example in which cells 200, 500, and 550 are provided in addition to the cell 100. The cells 200, 500, and 550 have the same configuration as the cell 100, but are partially omitted in FIG. The cell controllers 120, 220, 520, and 570 are connected on a one-to-one basis through interfaces 251 to 256, and transfer access between the cells 100, 200, 500, and 550. The cell 200 includes processors 201, 202, 203, 204, a memory 214, a cell controller 220, and a sparse directory 221 installed in the cell controller 220. The cell 500 includes processors 501, 502, 503, and 504 and a cell controller 520, and the cell 550 includes processors 551, 552, 553, and 554, and a cell controller 570. The cells 200, 500, and 550 have components corresponding to the caches 105 to 108, the memories 111 to 114, the sparse directory 121, and the system FW 122 shown in FIG.

図3は、本発明の実施形態におけるセル間の通信で使用されるパケットのフォーマットを示す図である。パケット300は、フラグ301、リクエストの種類302、アドレス303、キャッシュステータス304、送信先プロセッサ番号305、返信先プロセッサ番号306、及びデータ307から構成される。   FIG. 3 is a diagram showing a format of a packet used in communication between cells in the embodiment of the present invention. The packet 300 includes a flag 301, a request type 302, an address 303, a cache status 304, a transmission destination processor number 305, a reply destination processor number 306, and data 307.

フラグ301は、ディレクトリ更新中を示すフラグであり、コピー元セルコントローラまたは、コピー先セルコントローラで使用される。フラグ301は、"0"で通常のパケットであることを示し、"1"でディレクトリ更新するための専用パケットであることを示す。コピー元でもコピー先でもないセルコントローラでは、フラグ301の値を持ちまわる。フラグ301は、図4を用いて後述する、コピー元セルコントローラのリクエスト/スヌープ生成回路410で"1"にセットされ、コピー先セルコントローラの第1調停回路402とライトデータ生成回路406でチェックされる。   The flag 301 is a flag indicating that the directory is being updated, and is used by the copy source cell controller or the copy destination cell controller. The flag 301 indicates that the packet is a normal packet when “0”, and indicates that the packet is a dedicated packet for directory update when “1”. A cell controller that is neither the copy source nor the copy destination carries the value of the flag 301. The flag 301 is set to “1” by the request / snoop generation circuit 410 of the copy source cell controller, which will be described later with reference to FIG. 4, and is checked by the first arbitration circuit 402 and the write data generation circuit 406 of the copy destination cell controller. The

リクエストの種類302は、パケットが要求するリクエストの種類を示すフィールドであり、リード、リードリプライ、ライト、スヌープ、スヌープレスポンスに対応する値が格納される。リードはメモリからデータを読み出し、データを送信することを要求する。リードリプライは、リードに対する返信であり、読み出したデータをリード要求したプロセッサに送信する。スヌープは、リードされたアドレスのステータス情報をもとに、キャッシュしているプロセッサにキャッシュステータス304で示したステータスに変更することを要求する。スヌープレスポンスはスヌープに対する返信であり、スヌープを受信したプロセッサは、アドレスで示されるキャッシュラインのステータスをスヌープで要求されたステータスに変更した後に、スヌープレスポンスを送信する。   The request type 302 is a field indicating the type of request requested by the packet, and stores values corresponding to read, read reply, write, snoop, and snoop response. Read reads data from the memory and requests to send data. The read reply is a reply to the read, and transmits the read data to the processor that requested the read. The snoop requests the cached processor to change to the status indicated by the cache status 304 based on the status information of the read address. The snoop response is a reply to the snoop, and the processor that has received the snoop transmits the snoop response after changing the status of the cache line indicated by the address to the status requested by the snoop.

アドレス303は、メモリのアドレスを示すフィールドであり、どのメモリのどのキャッシュラインへのアクセスかが示される。また、アドレス303は、スパースディレクトリのエントリを決定するためにも使用される。   An address 303 is a field indicating a memory address, and indicates which cache line of which memory is accessed. The address 303 is also used to determine a sparse directory entry.

キャッシュステータス304は、アドレス303で特定されたラインのMESIステータスを示すフィールドである。パケットのリクエストの種類302がリードリプライの場合、キャッシュステータス304は、データ307のステータスを示す。リクエストの種類302がスヌープレスポンス、ライトの場合、キャッシュステータス304は、リクエストの送信元のプロセッサが保持する、アドレス303で特定されたキャッシュラインに対するステータスを示す。リクエストの種類302がリードの場合、キャッシュステータス304は、送信元のプロセッサがアドレス303で特定されたラインに要求するステータスを示す。リクエストの種類302がスヌープの場合は送信先のプロセッサにそのラインに対する変更するステータスを示す。   The cache status 304 is a field indicating the MESI status of the line specified by the address 303. When the packet request type 302 is read reply, the cache status 304 indicates the status of the data 307. When the request type 302 is snoop response or write, the cache status 304 indicates the status of the cache line specified by the address 303 held by the processor that sent the request. When the request type 302 is read, the cache status 304 indicates a status requested by the transmission source processor to the line specified by the address 303. When the request type 302 is snoop, the status of changing the line is indicated to the destination processor.

送信先プロセッサ番号305は、起因となるリクエスト(スヌープ、リード、ライト)を送信した先の(受信する)プロセッサ番号を示す。つまり、送信先プロセッサ番号305は、リクエストの種類302がスヌープとスヌープレスポンスの場合、アドレス303で特定されたラインをキャッシュしているプロセッサ番号を示し、リードとリードリプライ、ライトの場合、アクセスしたいメモリが接続しているプロセッサ番号を示す。   The transmission destination processor number 305 indicates the processor number to which the request (snoop, read, write) as a cause is transmitted (received). That is, the transmission destination processor number 305 indicates the processor number that caches the line specified by the address 303 when the request type 302 is snoop and snoop response, and when read, read reply, or write, the memory to be accessed Indicates the connected processor number.

送信先プロセッサ番号305は、起因となるリクエスト(スヌープ、リード、ライト)を送信するプロセッサ番号を示す。つまり、返信先プロセッサ番号306は、リクエストの種類302がスヌープとスヌープレスポンスの場合、アドレスによって示されるメモリが接続するプロセッサ番号を示し、リードとリードリプライ、ライトの場合、リクエストを送信したプロセッサ番号を示す。コピー元セルコントローラ120から発振するスヌープにおける、返信先プロセッサ番号306値については、図4のリクエスト/スヌープ生成回路410後述する。   The transmission destination processor number 305 indicates a processor number that transmits a request (snoop, read, write) as a cause. That is, when the request type 302 is snoop and snoop response, the reply destination processor number 306 indicates the processor number to which the memory indicated by the address is connected. When the request type 302 is read, read reply, or write, the processor number that transmitted the request is indicated. Show. The value of the reply destination processor number 306 in the snoop oscillated from the copy source cell controller 120 will be described later.

データ307は、データを格納する部分であり、リードリプライとライト、スヌープレスポンスで使用される。   Data 307 is a part for storing data, and is used for read reply, write, and snoop response.

図4に、本発明の実施形態に係るセルコントローラの構成例を示す。図4では、セル100内のセルコントローラ120を一例として示しているが、他のセル内に備えられるセルコントローラも同様の構成・機能を有する。セルコントローラ120は、図1に示したスパースディレクトリ121、システムFW122に加え、状態フラグ401、第1調停回路402、リクエスト格納バッファ403、スヌープレスポンス格納バッファ404、アドレス生成回路405、ライトデータ生成回路(スパースディレクトリライトデータ生成回路)406、ライトコマンド生成回路407、リードポインタ408、セレクタ409、413、リクエスト/スヌープ生成回路(生成部)410、合成回路411、及び第2調停回路412を備える。   FIG. 4 shows a configuration example of the cell controller according to the embodiment of the present invention. In FIG. 4, the cell controller 120 in the cell 100 is shown as an example, but cell controllers provided in other cells also have the same configuration and function. In addition to the sparse directory 121 and the system FW 122 shown in FIG. 1, the cell controller 120 includes a status flag 401, a first arbitration circuit 402, a request storage buffer 403, a snoop response storage buffer 404, an address generation circuit 405, a write data generation circuit ( Sparse directory write data generation circuit) 406, write command generation circuit 407, read pointer 408, selectors 409 and 413, request / snoop generation circuit (generation unit) 410, synthesis circuit 411, and second arbitration circuit 412.

状態フラグ401は、セルコントローラ120が、通常状態であるか、メモリのデータコピー後のコピー元セルコントローラとして動作している状態であるか、あるいは、メモリのデータコピー後のコピー先セルコントローラとして動作している状態であるかを示すフラグである。状態フラグ401は、システムFW122によって設定される。状態フラグ401のビット数は例えば2ビットであり、[00]で通常状態で動作することを示し、[01]でコピー元セルコントローラとして動作することを示し、[10]でコピー先セルコントローラとして動作することを示し、[11]は使用しない。2ビットの情報を第1調停回路402とライトデータ生成回路406、リクエスト/スヌープ生成回路410に出力する。また、アドレス生成回路405とリードポインタ408のセレクタ条件として出力される。   The status flag 401 indicates whether the cell controller 120 is in a normal state, is operating as a copy source cell controller after copying data in the memory, or operates as a copy destination cell controller after copying data in the memory. It is a flag indicating whether or not the current state is in progress. The status flag 401 is set by the system FW 122. The number of bits of the status flag 401 is, for example, 2 bits, [00] indicates that it operates in a normal state, [01] indicates that it operates as a copy source cell controller, and [10] indicates that it operates as a copy destination cell controller. Indicates that it operates, and [11] is not used. The 2-bit information is output to the first arbitration circuit 402, the write data generation circuit 406, and the request / snoop generation circuit 410. Further, it is output as a selector condition for the address generation circuit 405 and the read pointer 408.

第1調停回路402は、セル100内のプロセッサ101〜104からのアクセス、及び、セル100外のセルコントローラ220、520、570からのアクセスを調停し、リクエスト格納バッファ403またはスヌープレスポンス格納バッファに出力する。第1調停回路402は、パケット300を入力し、状態フラグ401が[00]、[01]の場合は、リクエスト格納バッファ403へ出力を行う。第1調停回路402は、状態フラグ401が[10]の場合、パケット内のスパースディレクトリ121更新中を示すフラグ301のチェックを行い、フラグ301が"1"だった場合は、受信したパケットをスヌープレスポンス格納バッファ404に出力し、フラグ301が"1"でない場合は、リクエスト格納バッファ403に出力する。   The first arbitration circuit 402 arbitrates accesses from the processors 101 to 104 in the cell 100 and accesses from the cell controllers 220, 520, and 570 outside the cell 100, and outputs them to the request storage buffer 403 or the snoop response storage buffer. To do. The first arbitration circuit 402 receives the packet 300 and outputs it to the request storage buffer 403 when the status flag 401 is [00] or [01]. When the status flag 401 is “10”, the first arbitration circuit 402 checks the flag 301 indicating that the sparse directory 121 is being updated in the packet. If the flag 301 is “1”, the first arbitration circuit 402 snoops the received packet. When the flag 301 is not “1”, the request is stored in the request storage buffer 403.

リクエスト格納バッファ403は、現在セルコントローラ120で実行されているリクエストを全て保持している。また、保持しているリクエストに起因して、リクエスト/スヌープ生成回路410からスヌープが送信された場合、該リクエストと同一のエントリでスヌープの情報を保持し、該スヌープのレスポンスを受信する。   The request storage buffer 403 holds all requests currently being executed by the cell controller 120. When a snoop is transmitted from the request / snoop generation circuit 410 due to the held request, snoop information is held in the same entry as the request, and the snoop response is received.

セルコントローラ120は、スパースディレクトリ121のエントリの読み出しを行う場合、保持したリクエストのアドレス303をアドレス生成回路405に送信し、エントリの特定を行う。スパースディレクトリ121のエントリの更新を行う場合、保持したリクエストのアドレス303をアドレス生成回路405に送信し、ライトデータ生成回路406へアドレスに対応するメモリラインのステータス(キャッシュステータス304とキャッシュするプロセッサ番号)を送信する。プロセッサに接続するメモリの更新が必要な場合、ライトコマンド生成回路407へリクエストの種類302とデータ307を送信する。メモリの更新が必要ない場合、リクエスト/スヌープ生成回路410へパケット内のリクエストの種類302を出力する。   When reading the entry of the sparse directory 121, the cell controller 120 transmits the address 303 of the held request to the address generation circuit 405 and specifies the entry. When updating the entry of the sparse directory 121, the address 303 of the held request is transmitted to the address generation circuit 405, and the status of the memory line corresponding to the address (cache status 304 and cache processor number) is transmitted to the write data generation circuit 406. Send. When the memory connected to the processor needs to be updated, the request type 302 and the data 307 are transmitted to the write command generation circuit 407. When the memory update is not necessary, the request type 302 in the packet is output to the request / snoop generation circuit 410.

スヌープレスポンス格納バッファ404は、コピー先セルコントローラである時に使用される。スヌープレスポンス格納バッファ404で受信するパケットのリクエストの種類は、スヌープレスポンスのみである。スヌープレスポンス格納バッファ404は、状態フラグ401が[10]のとき、すなわち、セルコントローラ120がメモリのデータコピー後のコピー先セルコントローラとなる場合、かつ、パケット300のフラグ301が"1"のとき、すなわち、スパースディレクトリ更新中の場合、第1調停回路402よりパケットを受信する。このため、スヌープレスポンス格納バッファ404に格納される、スパースディレクトリを更新するスヌープレスポンスを「更新用スヌープレスポンス」ともいう。セルコントローラ120は、受信したスヌープレスポンスの情報を基にして、スパースディレクトリ121の更新を行う。つまり、該スパースディレクトリのエントリを決定するために、アドレス生成回路405にアドレス303を送信し、更新するステータス情報(キャッシュステータス情報)を生成するためにライトデータ生成回路406にアドレスに対応するメモリラインのステータス情報(キャッシュステータス304とキャッシュするプロセッサ番号)を送信する。また、プロセッサに接続するメモリの更新が必要な場合は、ライトコマンド生成回路407へリクエストの種類302とデータ307を送信する。   The snoop response storage buffer 404 is used when it is a copy destination cell controller. The type of request for a packet received by the snoop response storage buffer 404 is only a snoop response. In the snoop response storage buffer 404, when the status flag 401 is [10], that is, when the cell controller 120 becomes a copy destination cell controller after data copy of the memory, and when the flag 301 of the packet 300 is “1”. That is, when the sparse directory is being updated, the packet is received from the first arbitration circuit 402. For this reason, the snoop response for updating the sparse directory stored in the snoop response storage buffer 404 is also referred to as an “update snoop response”. The cell controller 120 updates the sparse directory 121 based on the received snoop response information. That is, the address 303 is transmitted to the address generation circuit 405 in order to determine the entry of the sparse directory, and the memory line corresponding to the address is transmitted to the write data generation circuit 406 in order to generate status information (cache status information) to be updated. Status information (cache status 304 and cache processor number) is transmitted. If the memory connected to the processor needs to be updated, the request type 302 and data 307 are transmitted to the write command generation circuit 407.

アドレス生成回路405は、リクエスト格納バッファ403またはスヌープレスポンス格納バッファ404より送信されるアドレス303からキーアドレスを作成し、アクセスするスパースディレクトリ121のエントリを決定する。アドレス生成回路405は、状態フラグが[00]、[10]の時に、セレクタ409で選択され、スパースディレクトリをアクセスすることが可能になる。アドレスからキーアドレスを作成する方法はスパースディレクトリの構成に依存して決定する。ここではその方法の詳細には言及しない。決定したエントリのキーアドレスを基に、スパースディレクトリ121にアクセスを行う。   The address generation circuit 405 creates a key address from the address 303 transmitted from the request storage buffer 403 or the snoop response storage buffer 404, and determines an entry of the sparse directory 121 to be accessed. The address generation circuit 405 is selected by the selector 409 when the status flags are [00] and [10], and can access the sparse directory. The method for creating the key address from the address is determined depending on the configuration of the sparse directory. The details of the method are not mentioned here. Based on the key address of the determined entry, the sparse directory 121 is accessed.

ライトデータ生成回路406は、リクエスト格納バッファ403またはスヌープレスポンス格納バッファ404から送られる情報からスパースディレクトリ121へ書き込むデータを生成する。書き込むデータは、ラインをキャッシュするプロセッサ番号、及び、該ラインのキャッシュステータス値、具体的には、ME(Modified Exclusive)、S(Shared)、I(Invalid)のいずれかの値である。本実施形態では、パケット300において、フラグ301が"1"(ディレクトリ更新中を示す)であるかを常時チェックし、"1"でない場合は、常にスパースディレクトリ121のステータス情報を更新する。フラグ301が"1"であり、スパースディレクトリ121にステータス情報が登録されていない場合は、該スパースディレクトリのステータス情報を更新し、ステータス情報が登録されている場合には、ステータス情報の更新は行わない。   The write data generation circuit 406 generates data to be written to the sparse directory 121 from information sent from the request storage buffer 403 or the snoop response storage buffer 404. The data to be written is a processor number that caches the line and a cache status value of the line, specifically, one of ME (Modified Exclusive), S (Shared), and I (Invalid). In this embodiment, in the packet 300, it is always checked whether the flag 301 is “1” (indicating that the directory is being updated). If it is not “1”, the status information of the sparse directory 121 is always updated. When the flag 301 is “1” and the status information is not registered in the sparse directory 121, the status information of the sparse directory is updated. When the status information is registered, the status information is updated. Absent.

ライトコマンド生成回路407は、セル100内のプロセッサ101〜104に接続するメモリ111〜114にデータを書き込む場合、または、他セル200、500、550のプロセッサからのリード要求に対応するデータを送信する場合に、リクエスト格納バッファ403またはスヌープレスポンス格納バッファ404から出力されるパケット300に含まれるリクエストの種類302及びデータ307に基づいてリードリプライ、ライトのコマンドを生成し、合成回路411へ出力する。   The write command generation circuit 407 transmits data corresponding to a read request from a processor in another cell 200, 500, or 550 when writing data to the memories 111 to 114 connected to the processors 101 to 104 in the cell 100. In this case, a read reply command and a write command are generated based on the request type 302 and the data 307 included in the packet 300 output from the request storage buffer 403 or the snoop response storage buffer 404, and output to the synthesis circuit 411.

リードポインタ408は、スパースディレクトリ121のエントリ数の閾値を示すレジスタと、コピー元セルとして、スパースディレクトリ121を読み出すときのエントリを示すリードカウンタとを備える。リードカウンタの初期値は"0"である。リードポインタ408は、セルコントローラ120の状態フラグ401が[01]にアサートされている(すなわち、メモリのデータコピー後のコピー元セルコントローラである)時に、セレクタ409で選択され、リードカウンタに基づいてスパースディレクトリ121のエントリにアクセスする。また、リードポインタ408は、リクエスト/スヌープ生成回路410からストローブ信号を受信すると、リクエストカウンタを+1("1"インクリメント)し、スパースディレクトリの次エントリの読み込みを開始する。セルコントローラ120は、エントリ数の閾値(レジスタの値)を超えるまで、スパースディレクトリのエントリにアクセスを行う機能を有する。   The read pointer 408 includes a register indicating a threshold value of the number of entries in the sparse directory 121 and a read counter indicating an entry when the sparse directory 121 is read as a copy source cell. The initial value of the read counter is “0”. The read pointer 408 is selected by the selector 409 when the state flag 401 of the cell controller 120 is asserted to [01] (that is, the copy source cell controller after the data copy of the memory), and based on the read counter Access an entry in the sparse directory 121. When the read pointer 408 receives the strobe signal from the request / snoop generation circuit 410, the read pointer 408 increments the request counter by +1 ("1" increment), and starts reading the next entry in the sparse directory. The cell controller 120 has a function of accessing the entries of the sparse directory until the threshold value of the number of entries (register value) is exceeded.

セレクタ409は、状態フラグ401の値によって、セレクトを変更する。状態フラグ401が[00]、[10]のときは、アドレス生成回路405をセレクトし、状態フラグ401が[01]の時はリードポインタ408をセレクトする。ただし、状態フラグ401が[01]の場合でも、メモリ間のデータコピーに関与しないセル100内の他のプロセッサが存在するので、リクエスト格納バッファ403にリクエストが格納されている(セル100内の他のプロセッサからのリクエストか、または、セル100内の他のプロセッサに接続するメモリへのリクエストか、を受信している)場合は、優先してアドレス生成回路405をセレクトすることになる。   The selector 409 changes the selection according to the value of the status flag 401. When the status flag 401 is [00] or [10], the address generation circuit 405 is selected, and when the status flag 401 is [01], the read pointer 408 is selected. However, even when the status flag 401 is [01], since there are other processors in the cell 100 that are not involved in data copying between memories, the request is stored in the request storage buffer 403 (others in the cell 100). The address generation circuit 405 is preferentially selected if the request is received from the other processor in the cell 100 or to the memory connected to another processor in the cell 100).

スパースディレクトリ121は、セル100内のメモリ111〜114に関してライン毎のステータス情報を管理する。ステータス情報は、ラインが他セル内のプロセッサにキャッシュされているかどうかの情報、及び、ラインが他セル内のプロセッサにキャッシュされている場合、キャッシュしているプロセッサ番号を含んだ情報を保持している。また、セル100外のプロセッサがキャッシュするセル内のメモリ111〜114のラインの管理を全て行う。メモリとプロセッサのキャッシュのアドレス・マッピングの方式として、例えばセット・アソシアティブ方式などがあるが、本発明では、アドレスとエントリの対応が取れればどのような方式でもよい。また、スパースディレクトリ121は、アドレス生成回路405より指示されたキーアドレスに対応するエントリへライトデータ生成回路406で生成されたステータス情報を書き込む機能を有する。また、アドレス生成回路405より指示されたキーアドレスに対応するエントリの読み出しを行い、読み出されたアドレスのステータス情報をリクエスト/スヌープ生成回路410と合成回路411とへ出力する機能を有する。また、リードポインタ408のリードカウンタにより指示されたエントリの読み出しを行い、読み出されたアドレス、及び、該アドレスのステータス情報をリクエスト/スヌープ生成回路410に出力する機能を有する。   The sparse directory 121 manages status information for each line regarding the memories 111 to 114 in the cell 100. The status information holds information including whether the line is cached in a processor in another cell and information including the cached processor number when the line is cached in a processor in another cell. Yes. Further, all the lines of the memories 111 to 114 in the cell cached by the processor outside the cell 100 are managed. As a method of address mapping between the memory and the processor cache, for example, there is a set associative method, but in the present invention, any method may be used as long as the correspondence between the address and the entry can be taken. The sparse directory 121 has a function of writing status information generated by the write data generation circuit 406 to an entry corresponding to the key address specified by the address generation circuit 405. Further, it has a function of reading an entry corresponding to the key address instructed by the address generation circuit 405 and outputting status information of the read address to the request / snoop generation circuit 410 and the synthesis circuit 411. Further, it has a function of reading an entry instructed by the read counter of the read pointer 408 and outputting the read address and status information of the address to the request / snoop generation circuit 410.

リクエスト/スヌープ生成回路410は、スパースディレクトリ121から受け取るアドレス、該アドレスのステータス情報、及び、リクエスト格納バッファ403またはスヌープレスポンス格納バッファ404から受け取るリクエストの種類302に基づいて、スヌープの必要性を検証する。リクエスト/スヌープ生成回路410は、リクエストの種類302がスヌープ、リードであり、ステータス情報より他セルのプロセッサがキャッシュしていると判明した場合、スヌープリクエストの生成を行い、第2調停回路412に送信する。それと同時に、リクエスト格納バッファ403にスヌープの情報を通知する。リクエストの種類302がスヌープレスポンスの場合、スパースディレクトリ121から受け取る、アドレスに対応するラインのステータス情報(MESI)を付け、プロセッサに送信する。   The request / snoop generation circuit 410 verifies the necessity of snoop based on the address received from the sparse directory 121, the status information of the address, and the request type 302 received from the request storage buffer 403 or the snoop response storage buffer 404. . The request / snoop generation circuit 410 generates a snoop request and transmits it to the second arbitration circuit 412 when it is determined from the status information that the type 302 of the request is snoop or read and the processor of another cell caches. To do. At the same time, the request storage buffer 403 is notified of snoop information. When the request type 302 is a snoop response, the status information (MESI) of the line corresponding to the address received from the sparse directory 121 is attached and transmitted to the processor.

また、リクエスト/スヌープ生成回路410は、セルコントローラ120がメモリのデータコピー後のコピー先セルコントローラである時、具体的には、状態フラグ401が[10]にアサートされている時に、スパースディレクトリ121に該リクエストのアドレスに対応するステータス情報を保持していないリクエストやスヌープを受信した場合、セル100外の全プロセッサにスヌープのブロードキャストを行う機構を有し、第2調停回路412に出力する。   Further, the request / snoop generation circuit 410, when the cell controller 120 is a copy destination cell controller after the data copy of the memory, specifically, when the status flag 401 is asserted to [10], the sparse directory 121. When a request or snoop that does not hold status information corresponding to the address of the request is received, a snoop broadcast mechanism is provided to all the processors outside the cell 100 and is output to the second arbitration circuit 412.

さらに、リクエスト/スヌープ生成回路410は、セルコントローラ120がメモリのデータコピー後のコピー元セルコントローラである時、具体的には、状態フラグ401が[01]にアサートされている時に、スパースディレクトリ121からスヌープ指示があった場合、スヌープパケットの返信先プロセッサ番号306をコピー先セルコントローラに設定し、ディレクトリ更新中を示すフラグ301を"1"にセットしたスヌープを生成する機構を有する。生成したスヌープを第2調停回路412に出力すると同時に、リードポインタ408が保持するリードポインタを+1("1"インクリメント)するために、ストローブ信号をリードポインタ408に送信する。   Further, when the cell controller 120 is a copy source cell controller after data copy of the memory, specifically, when the status flag 401 is asserted to [01], the request / snoop generation circuit 410 has the sparse directory 121. When there is a snoop instruction from, a mechanism for generating a snoop in which a reply destination processor number 306 of the snoop packet is set in the copy destination cell controller and a flag 301 indicating that the directory is being updated is set to “1”. At the same time when the generated snoop is output to the second arbitration circuit 412, a strobe signal is transmitted to the read pointer 408 in order to increment the read pointer held by the read pointer 408 by +1 ("1" increment).

合成回路411は、ライトコマンド生成回路407で生成されたリードリプライやライトと、スパースディレクトリ121から受け取る、アドレスに対応するラインのステータス情報(MESI)とを合成し、第2調停回路412に出力する。   The synthesizing circuit 411 synthesizes the read reply or write generated by the write command generation circuit 407 and the status information (MESI) of the line corresponding to the address received from the sparse directory 121, and outputs it to the second arbitration circuit 412. .

第2調停回路412は、リクエスト/スヌープ生成回路410から出力されるスヌープ、リード、スヌープレスポンスの送信と、合成回路411から出力されるリードリプライやライトの送信を調停し、セル100のプロセッサ102、103、104(コピー元メモリと対応するプロセッサを除く)やセル100外のセルコントローラ220、520、550に送信する。
セレクタ413は、リクエスト格納バッファ403とスヌープレスポンス格納バッファ404との出力を選択する。セレクタ413は、状態フラグ401の値を入力し、状態フラグ401が[10]を示すとき、すなわち、コピー先セルのときに、スヌープレスポンス格納バッファ404の出力を優先して選択する構成にしてもよい。
The second arbitration circuit 412 arbitrates transmission of the snoop, read, and snoop response output from the request / snoop generation circuit 410, and transmission of the read reply and write output from the synthesis circuit 411, and the processor 102 of the cell 100, 103 and 104 (excluding processors corresponding to the copy source memory) and cell controllers 220, 520, and 550 outside the cell 100.
The selector 413 selects the output of the request storage buffer 403 and the snoop response storage buffer 404. The selector 413 receives the value of the status flag 401 and selects the output of the snoop response storage buffer 404 with priority when the status flag 401 indicates [10], that is, when it is a copy destination cell. Good.

続いて、図1、図2、及び図5を用いてメモリのデータコピーの動作を説明する。図5は、本実施形態のメモリ間のデータコピーの動作例を示すフローチャートである。ここでは、セル100のメモリ111のデータをセル200のメモリ214へデータコピーする場合の動作を一例として説明する。   Subsequently, the data copy operation of the memory will be described with reference to FIG. 1, FIG. 2, and FIG. FIG. 5 is a flowchart illustrating an operation example of data copying between memories according to the present embodiment. Here, an operation when data in the memory 111 of the cell 100 is copied to the memory 214 of the cell 200 will be described as an example.

メモリ間のデータコピーを行う前に、セルコントローラ120のスパースディレクトリ121で、プロセッサ101に接続するメモリ111のキャッシュ状況をコピー元セル100内のプロセッサ102〜104のキャッシュも含めて管理するために、セル100でプロセッサ101と接続するプロセッサ102、103,104との経路155、156、157をセルコントローラ120経由になるように経路変更する。具体的には、155は152と151、156は153と151、157は154と151へと変更する(S601)。これにより、通常は他セルのプロセッサのキャッシュ情報しか持たないスパースディレクトリ121に、セル内のプロセッサ102、103、104の、メモリ111に関するキャッシュ状況を反映させる。   In order to manage the cache status of the memory 111 connected to the processor 101 including the caches of the processors 102 to 104 in the copy source cell 100 with the sparse directory 121 of the cell controller 120 before copying data between the memories. In the cell 100, the routes 155, 156, and 157 with the processors 102, 103, and 104 connected to the processor 101 are changed so as to pass through the cell controller 120. Specifically, 155 is changed to 152 and 151, 156 is changed to 153 and 151, and 157 is changed to 154 and 151 (S601). As a result, the sparse directory 121, which normally has only the cache information of the processors of other cells, reflects the cache status of the processors 102, 103, and 104 in the cell regarding the memory 111.

次に、システムFW122などの指示によって、プロセッサ102(セル100内外のどのプロセッサでもよい)は、コピー元プロセッサ101に接続するメモリ111の全ラインを、キャッシュライン毎にリードし、コピー元プロセッサ101のメモリ111に対してライト(ライト要求)を行う。コピー元プロセッサ101は、ライト要求を受けるたびにメモリ111に対して、ライトを行うとともに、コピー先プロセッサ204に接続するメモリ214に対しライトを転送する(ライト要求を行う)ことによって、メモリのデータコピーをライン毎に全ラインについて行う(S602)。   Next, in response to an instruction from the system FW 122, the processor 102 (which may be any processor inside or outside the cell 100) reads all lines of the memory 111 connected to the copy source processor 101 for each cache line, and Write to the memory 111 (write request). Each time the copy source processor 101 receives a write request, the copy source processor 101 writes to the memory 111 and transfers the write to the memory 214 connected to the copy destination processor 204 (performs a write request). Copying is performed for all lines line by line (S602).

システムFW122は、アクセス先の変更と状態フラグ401の設定を行う(S603)。具体的には、システムFW122は、アクセスするメモリが接続するプロセッサをコピー元プロセッサ101からコピー先プロセッサ204に変更し、コピー元プロセッサ101はシステムから切り離す。アクセスを行うプロセッサの変更や、コピー元プロセッサの切り離し方については、本実施形態では、一般的な方式を採用するため、その詳細説明を省略する。コピー完了後にシステムFW122は、セルコントローラ内の状態フラグ401を、コピー元セルコントローラ120について[01]に、コピー先セルコントローラ220について[10]にセットする。   The system FW 122 changes the access destination and sets the status flag 401 (S603). Specifically, the system FW 122 changes the processor connected to the memory to be accessed from the copy source processor 101 to the copy destination processor 204, and the copy source processor 101 is disconnected from the system. Regarding the change of the processor to be accessed and the method of disconnecting the copy source processor, a general method is adopted in the present embodiment, and thus detailed description thereof is omitted. After the copy is completed, the system FW 122 sets the status flag 401 in the cell controller to [01] for the copy source cell controller 120 and [10] for the copy destination cell controller 220.

コピー元セルコントローラ120は、セルコントローラ120内のスパースディレクトリ121が保持するエントリ毎のステータス情報を確認する(S604)。具体的には、リードポインタ408が保持するリードカウンタが示すエントリのステータス情報を確認する。ステータス情報を基に、コピー元セルコントローラ120のリクエスト/スヌープ生成回路410は、スパースディレクトリのステータス情報を基にメモリ111のデータをキャッシュしているプロセッサを決定し、スヌープパケットの返信先プロセッサ番号306をコピー先セルコントローラ220に変更し、ディレクトリ更新中を示すフラグ301を"1"にセットしたスヌープをキャッシュしている特定のプロセッサに送信する(605)。コピー元セルコントローラ120の詳しい内部動作については後述する。   The copy source cell controller 120 checks the status information for each entry held in the sparse directory 121 in the cell controller 120 (S604). Specifically, the status information of the entry indicated by the read counter held by the read pointer 408 is confirmed. Based on the status information, the request / snoop generation circuit 410 of the copy source cell controller 120 determines a processor that caches the data in the memory 111 based on the status information of the sparse directory, and returns a reply processor number 306 of the snoop packet. Is changed to the copy destination cell controller 220, and a snoop in which the flag 301 indicating that the directory is being updated is set to “1” is transmitted to a specific processor that caches (605). Detailed internal operation of the copy source cell controller 120 will be described later.

スヌープを受信した特定のプロセッサは、自プロセッサ内のキャッシュにスヌープパケットのアドレス303で示されるラインがあるかを確認し、データが最新である場合は、ライトデータつきのスヌープレスポンスを、それ以外の場合は、データなしのスヌープレスポンスを、ディレクトリ更新中を示すフラグ301を持ちまわったまま、コピー先セルコントローラ220に送信する。   The specific processor that received the snoop checks whether there is a line indicated by the address 303 of the snoop packet in the cache in its own processor, and if the data is the latest, sends a snoop response with write data, otherwise Transmits a snoop response with no data to the copy destination cell controller 220 while holding the flag 301 indicating that the directory is being updated.

コピー先セルコントローラ220は、該特定のプロセッサよりディレクトリ更新中を示すフラグ301が"1"であるスヌープレスポンスを受け取り(S606)、スヌープレスポンスパケットのアドレス303が示すラインのステータス情報をスパースディレクトリ221で保持しているか判断する(S607)。保持している場合(S607でYes)、スパースディレクトリ221の更新を行うことなくスヌープレスポンスを破棄する(S608)。一方、ステータス情報を保持していない場合(S607でNo)、スパースディレクトリ221の情報を更新する(609)。コピー先セルコントローラ220の詳しい内部動作については後述する。   The copy destination cell controller 220 receives a snoop response in which the flag 301 indicating that the directory is being updated is “1” from the specific processor (S606), and stores the status information of the line indicated by the address 303 of the snoop response packet in the sparse directory 221. It is determined whether it is held (S607). If it is held (Yes in S607), the snoop response is discarded without updating the sparse directory 221 (S608). On the other hand, when the status information is not held (No in S607), the information of the sparse directory 221 is updated (609). Detailed internal operation of the copy destination cell controller 220 will be described later.

コピー元セルコントローラ120は、リードポインタ408のリードカウンタを "1"インクリメントする(S610)。コピー元セルコントローラ120は、リードポインタ408のリードカウンタの値がスパースディレクトリ121のエントリ数を超えているかを判断する(S611)。セルコントローラ120は、エントリ数(リードポインタ408のスパースディレクトリのエントリの閾値を示すレジスタの値)を超えている場合(S611でYes)、状態フラグ401を通常時の動作に移行させる(S612)。エントリ数以下の場合(S611でNo)、セルコントローラ120は、リードポインタ408のリードカウンタが示すスパースディレクトリ121のキャッシュラインのステータス情報を確認し(S613)、ステップS605以降の処理を繰り返す。一連の動作をコピー元セルコントローラ120のスパースディレクトリ121のエントリ数分行う。   The copy source cell controller 120 increments the read counter of the read pointer 408 by “1” (S610). The copy source cell controller 120 determines whether the read counter value of the read pointer 408 exceeds the number of entries in the sparse directory 121 (S611). When the number of entries (the value of the register indicating the threshold value of the sparse directory entry of the read pointer 408) is exceeded (Yes in S611), the cell controller 120 shifts the status flag 401 to the normal operation (S612). If the number is less than the number of entries (No in S611), the cell controller 120 confirms the status information of the cache line of the sparse directory 121 indicated by the read counter of the read pointer 408 (S613), and repeats the processing from step S605. A series of operations is performed for the number of entries in the sparse directory 121 of the copy source cell controller 120.

このようにして、経路変更によってコピー元セルコントローラ120は、プロセッサ101に接続するメモリ111にアクセスする全プロセッサのステータス情報をスパースディレクトリ121で保持することになり、スパースディレクトリ121のステータス情報を基にスヌープを送信する。また、コピー先セルのセルコントローラ220は、コピー元セルコントローラ120から送信されたスヌープに対するスヌープレスポンスに基づいて、コピー先セルコントローラ220のスパースディレクトリ221を更新する。これにより、プロセッサキャッシュ間コヒーレンシを保証することができる。   In this way, the copy source cell controller 120 holds the status information of all the processors accessing the memory 111 connected to the processor 101 in the sparse directory 121 by the path change, and based on the status information of the sparse directory 121. Send a snoop. The cell controller 220 of the copy destination cell updates the sparse directory 221 of the copy destination cell controller 220 based on the snoop response to the snoop transmitted from the copy source cell controller 120. Thereby, the coherency between processor caches can be ensured.

ここで、コピー元セルコントローラとコピー先セルコントローラの詳しい内部の動作について、図4、5を用いて説明する。   Here, detailed internal operations of the copy source cell controller and the copy destination cell controller will be described with reference to FIGS.

コピー元セルコントローラ120は、状態フラグ401が[01]にセットされている場合、セレクタ409は、リードポインタ408を選択する。HW(Hardware)によってリクエスト/スヌープ生成回路410は、リードポインタ408のリードカウンタが示すスパースディレクトリ121のエントリをリードする。リードされたエントリのステータス情報を基に、リクエスト/スヌープ生成回路410は、宛先をキャッシュしているプロセッサに、返信先がコピー先セルコントローラ220になるように、パケットの送信先プロセッサ番号305設定し、パケット内のディレクトリ更新中を示す"1"をフラグ301へセットする。生成したパケット300を第2調停回路412に送信する。   The copy source cell controller 120 selects the read pointer 408 when the status flag 401 is set to [01]. The request / snoop generation circuit 410 reads the entry of the sparse directory 121 indicated by the read counter of the read pointer 408 by HW (Hardware). Based on the status information of the read entry, the request / snoop generation circuit 410 sets the packet transmission destination processor number 305 in the processor that caches the destination so that the reply destination is the copy destination cell controller 220. “1” indicating that the directory is being updated in the packet is set in the flag 301. The generated packet 300 is transmitted to the second arbitration circuit 412.

第2調停回路412は、その他のスヌープや、リクエストとで調停を行い、調停で選択されたならばキャッシュしているプロセッサにスヌープを送信する。リクエスト/スヌープ生成回路410は、第2調停回路412に送信すると同時に、リードポインタ408のリードカウンタを"1"インクリメントするために、ストローブ信号を送信し、該ストローブ信号を受け取ったリードポインタ408は、リードカウンタを"1"インクリメントし(S610)、リードポインタ408の値とスパースディレクトリ121のエントリ数を比較し(S611)、リードポインタ408の値が超えている場合(S611でYes)、エントリのリードを終了し、状態フラグを[00]に変更する(S612)。超えていない場合(S612でNo)、スパースディレクトリ121をアクセスする(S613)。   The second arbitration circuit 412 performs arbitration with other snoops and requests, and if selected by arbitration, transmits the snoop to the cached processor. The request / snoop generation circuit 410 transmits to the second arbitration circuit 412 and simultaneously transmits a strobe signal to increment the read counter of the read pointer 408 by “1”. The read pointer 408 that has received the strobe signal The read counter is incremented by “1” (S610), the value of the read pointer 408 is compared with the number of entries in the sparse directory 121 (S611), and if the value of the read pointer 408 exceeds (Yes in S611), the entry is read. And the status flag is changed to [00] (S612). If not exceeded (No in S612), the sparse directory 121 is accessed (S613).

コピー先セルコントローラ220は、状態フラグ401が[10]にセットされている場合、第1調停回路402は、パケット内のディレクトリ更新中を示すフラグ301が"1"であるかを確認し、"1"にセットされたパケットをスヌープレスポンス格納バッファ404に格納する。スヌープレスポンス格納バッファ404は格納したパケットについて、アドレス生成回路405にアドレス303を、ライトデータ生成回路406にアドレスに対応するメモリ214のラインのステータス情報(キャッシュステータス304とキャッシュを行うプロセッサ)を出力する。アドレス生成回路405は、アドレス303よりスパースディレクトリ121のエントリ番号を特定するためのキーアドレスを生成する。また、ライトデータ生成回路406は、ステータス情報よりスパースディレクトリ221を更新するためのデータを生成する。   When the status flag 401 is set to [10], the copy destination cell controller 220 checks whether the flag 301 indicating that the directory in the packet is being updated is “1”. The packet set to 1 ″ is stored in the snoop response storage buffer 404. The snoop response storage buffer 404 outputs the address 303 to the address generation circuit 405 and the status information of the line of the memory 214 corresponding to the address (the cache status 304 and the processor that performs the cache) to the write data generation circuit 406 for the stored packet. . The address generation circuit 405 generates a key address for specifying the entry number of the sparse directory 121 from the address 303. The write data generation circuit 406 generates data for updating the sparse directory 221 from the status information.

セルコントローラ220は、アドレス生成回路405で生成したキーアドレスでスパースディレクトリ221を引いた(参照した)結果、エントリに登録されている場合(S607でYes)、ライトデータ生成回路406で生成したデータを破棄する。エントリに登録されていない場合(S607でNo)、スパースディレクトリ221を更新する。システムFW122は、コピー元セルコントローラの状態フラグが[00]に落とされたのを確認したら、コピー先セルコントローラの状態フラグも[00]に落として、通常動作に戻る。   When the cell controller 220 is registered in the entry as a result of subtracting (referring to) the sparse directory 221 with the key address generated by the address generation circuit 405 (Yes in S607), the data generated by the write data generation circuit 406 is displayed. Discard. If it is not registered in the entry (No in S607), the sparse directory 221 is updated. When the system FW 122 confirms that the status flag of the copy source cell controller has been set to [00], the status flag of the copy destination cell controller is also set to [00] and returns to the normal operation.

次に、セルコントローラ220がコピー先セルコントローラとして動作している時、具体的には状態フラグ401が[10]にアサートされている時に、コピー先プロセッサ204に接続するメモリ214へのアクセスされた場合、あるいは、コピー先プロセッサ204からのスヌープを受信した場合の動作について図6を用いて説明する。図6は、セルコントローラがコピー先セルコントローラとして動作している場合の動作例を示すフローチャートである。   Next, when the cell controller 220 is operating as the copy destination cell controller, specifically when the status flag 401 is asserted to [10], the memory 214 connected to the copy destination processor 204 is accessed. The operation when a snoop is received from the copy destination processor 204 will be described with reference to FIG. FIG. 6 is a flowchart showing an operation example when the cell controller operates as a copy destination cell controller.

コピー先セルコントローラ220は、セル200外より、コピー先プロセッサ204に接続するメモリ214へのリクエストを受信する(S701)。あるいは、コピー先セルコントローラ220は、コピー先プロセッサ204より、スヌープを受信する(702)。ステップS701またはS702のいずれかが生じると、セルコントローラ220は、アクセスを受けたラインのステータス情報をスパースディレクトリ221で管理を行っているかを確認する(S703)。   The copy destination cell controller 220 receives a request to the memory 214 connected to the copy destination processor 204 from outside the cell 200 (S701). Alternatively, the copy destination cell controller 220 receives a snoop from the copy destination processor 204 (702). When either step S701 or S702 occurs, the cell controller 220 confirms whether the status information of the accessed line is managed by the sparse directory 221 (S703).

管理している場合(S703でYes)、セルコントローラ220は、ステータス情報に基づいてキャッシュを行っている特定のプロセッサに対し、スヌープを送信し(S704)、その後レスポンスを受信して(S705)、スパースディレクトリの更新を行う(708)。スパースディレクトリ221で管理していない場合(S703でNo)、セル内外の全プロセッサに対し、スヌープのブロードキャストを行い(S706)、スヌープのレスポンスを全て受け取り(S707)、スパースディレクトリ221のステータス情報を更新する(S708)。スパースディレクトリ221の更新が終了したら、セルコントローラ220は、コピー先プロセッサ204に対し、ステップS701でリクエストを受信した場合リクエストを送信し、ステップS702でスヌープを受信した場合スヌープのレスポンスを行う(S709)。   When managing (Yes in S703), the cell controller 220 transmits a snoop to a specific processor that performs caching based on the status information (S704), and then receives a response (S705). The sparse directory is updated (708). When not managed by the sparse directory 221 (No in S703), the snoop is broadcast to all the processors inside and outside the cell (S706), all snoop responses are received (S707), and the status information of the sparse directory 221 is updated. (S708). When the update of the sparse directory 221 is completed, the cell controller 220 transmits a request to the copy destination processor 204 when a request is received in step S701, and performs a snoop response when a snoop is received in step S702 (S709). .

この動作は、通常状態、すなわち状態フラグ401が[00]にアサートされている時の動作のように、スパースディレクトリ221にステータス情報が管理されていない場合、すぐにスヌープレスポンスやリード要求をアドレスで決定されるメモリが接続されているプロセッサに送信できるのと違い、プロセッサ間キャッシュコヒーレンシを保証するためにスヌープのブロードキャスト(S706)が必要となる。   In this operation, when status information is not managed in the sparse directory 221 as in the normal state, that is, the operation when the state flag 401 is asserted to [00], a snoop response or a read request is immediately addressed. Unlike being able to transmit to the processor to which the determined memory is connected, a snoop broadcast (S706) is required to ensure inter-processor cache coherency.

次に、通常時の動作として、セル100内のプロセッサのリクエストからの動作とセル100外のプロセッサのリクエストからの動作について説明する。図7は、本実施形態のセルコントローラが通常状態において、セル内のプロセッサからリクエストを受けた場合の動作例を示すフローチャートである。図8は、本実施形態のセルコントローラが通常状態において、セル外のプロセッサからリクエストを受けた場合の動作例を示すフローチャートである。   Next, operations from a request from a processor in the cell 100 and operations from a request from a processor outside the cell 100 will be described as normal operations. FIG. 7 is a flowchart showing an operation example when the cell controller of the present embodiment receives a request from the processor in the cell in the normal state. FIG. 8 is a flowchart showing an operation example when the cell controller of this embodiment receives a request from a processor outside the cell in a normal state.

図7を参照して、セル100内のプロセッサ102よりメモリ111へリードのリクエストが発行された場合を一例として説明する。プロセッサ102は、プロセッサ101に接続するメモリ111に対し、リクエストを発行する(S801)。リクエストを受信したプロセッサ101は、セル100内のプロセッサとセルコントローラ120に対し、スヌープのブロードキャストを行う(S802)。スヌープを受信したセルコントローラ120は、スパースディレクトリ121のステータス情報を管理しているかを確認する(S804)。   With reference to FIG. 7, a case where a read request is issued from the processor 102 in the cell 100 to the memory 111 will be described as an example. The processor 102 issues a request to the memory 111 connected to the processor 101 (S801). The processor 101 that has received the request broadcasts a snoop to the processors in the cell 100 and the cell controller 120 (S802). The cell controller 120 that has received the snoop confirms whether the status information of the sparse directory 121 is managed (S804).

スパースディレクトリ121でステータス情報を保持している場合(S804でYes)、管理しているステータス情報を基にラインをキャッシュしているプロセッサに対し、スヌープを送信し(S805)、該プロセッサより、スヌープレスポンスを受け取る(S806)。受け取った情報を基にセルコントローラ120は、スパースディレクトリ221の書き換えを行い(S807)、リクエストが要求されたプロセッサ101に対してスヌープのレスポンスを行う(S808)。一方、スパースディレクトリ121でステータス情報を保持していない場合(S804でNo)、セルコントローラ120はスヌープレスポンスをすぐにプロセッサ101に返信する(S808)。   When status information is held in the sparse directory 121 (Yes in S804), a snoop is transmitted to the processor that caches the line based on the managed status information (S805), and the snoop is sent from the processor. A response is received (S806). Based on the received information, the cell controller 120 rewrites the sparse directory 221 (S807), and sends a snoop response to the processor 101 that has requested the request (S808). On the other hand, when the status information is not held in the sparse directory 121 (No in S804), the cell controller 120 immediately returns a snoop response to the processor 101 (S808).

プロセッサ101は、セルコントローラ120からスヌープレスポンスを全て受け取った後、リードのリクエストを発行したプロセッサ102に対して、データを送信する(809)。このようにして、一連のセル内のプロセッサのリクエストからの動作を終了する。   After receiving all the snoop responses from the cell controller 120, the processor 101 transmits data to the processor 102 that issued the read request (809). In this way, the operation from the request of the processor in the series of cells is completed.

次に、図8を参照して、セル100外のプロセッサ201よりメモリ111へリードリクエストが発行された場合を一例として説明する。プロセッサ201は、セルコントローラ220を介して、セルコントローラ120へプロセッサ101と接続するメモリ111へのリクエストを発行する(S901)。リクエストを受信したセルコントローラ120は、スパースディレクトリ121のステータス情報の確認をする(S902)。スパースディレクトリ121でステータス情報を管理しているかを確認する(S903)。   Next, a case where a read request is issued from the processor 201 outside the cell 100 to the memory 111 will be described as an example with reference to FIG. The processor 201 issues a request to the memory 111 connected to the processor 101 to the cell controller 120 via the cell controller 220 (S901). The cell controller 120 that has received the request checks the status information of the sparse directory 121 (S902). It is checked whether status information is managed in the sparse directory 121 (S903).

スパースディレクトリ121でステータス情報を保持している場合(S903でYes)、管理している情報を基にラインをキャッシュしているプロセッサに対し、スヌープを送信し(S904)、該プロセッサより、スヌープレスポンスを受け取る(S905)。セルコントローラ120は、受け取った情報を基にスパースディレクトリ121の書き換えを行い(S906)、リクエストが発行されたプロセッサ101に対しリクエストを送信する(S907)。一方、スパースディレクトリ121でステータス情報を保持していない場合(S903でNo)、リクエストをすぐにプロセッサ101に送信する(S907)。   When status information is held in the sparse directory 121 (Yes in S903), a snoop is transmitted to the processor that caches the line based on the managed information (S904), and the snoop response is sent from the processor. Is received (S905). The cell controller 120 rewrites the sparse directory 121 based on the received information (S906), and transmits the request to the processor 101 that issued the request (S907). On the other hand, when the status information is not held in the sparse directory 121 (No in S903), the request is immediately transmitted to the processor 101 (S907).

リクエストを受信したプロセッサ101は、セル100内のプロセッサ102〜104に対し、スヌープのブロードキャストを行う(S908)。プロセッサ101は、プロセッサ102〜104からスヌープレスポンスを全て受け取った後、セルコントローラ120に対して、データを送信する(S909)。セルコントローラ120は、プロセッサ201にデータを送信する(S910)。このようにして、一連の他セルのプロセッサのリクエストからの動作を終了する。   The processor 101 that has received the request broadcasts a snoop to the processors 102 to 104 in the cell 100 (S908). After receiving all the snoop responses from the processors 102 to 104, the processor 101 transmits data to the cell controller 120 (S909). The cell controller 120 transmits data to the processor 201 (S910). In this manner, the operation from the request of the processor of another series of cells is completed.

上記ではコピー元セルをセル100とし、コピー先セルをセル200として説明したが、他のメモリ間のデータコピーでも同様に機能することはいうまでもない。   In the above description, the copy source cell is assumed to be the cell 100 and the copy destination cell is assumed to be the cell 200. However, it goes without saying that the data copy between other memories functions similarly.

(その他の実施形態)
上記実施形態では、セルに複数のプロセッサを有する場合を説明したが、セル内に一つのプロセッサとメモリの組み合わせを備える場合であっても本発明を適用することができる。このような場合、図5のステップS601では、セル内のプロセッサがシステムFWの指示を受けてメモリ111へのリードを要求したが、システムFWは、セル外のプロセッサにリード要求の指示を行ってもよい。また、コピー元セル内のプロセッサのキャッシュメモリに保持されるコピー元メモリに関する情報はないため、コピー元セル内のスパースディレクトリへステータス情報を収集する処理は不要となる。
(Other embodiments)
In the above embodiment, the case where a cell has a plurality of processors has been described. However, the present invention can be applied even when a combination of one processor and a memory is provided in a cell. In such a case, in step S601 in FIG. 5, the processor in the cell receives an instruction from the system FW and requests to read to the memory 111, but the system FW instructs the processor outside the cell to read. Also good. Further, since there is no information about the copy source memory held in the cache memory of the processor in the copy source cell, the process of collecting status information in the sparse directory in the copy source cell is not necessary.

以上、説明したように、本発明の好適な実施形態によれば、メモリのデータコピーを行う前に、セル内のローカルプロセッサ間のインタフェースを切断して、コピー元のメモリをリードすることで、コピー元のスパースディレクトリにローカルプロセッサのステータス情報も反映させ、メモリのデータコピー後に、コピー元のスパースディレクトリの情報を使って、コピー先のスパースディレクトリを更新することで、メモリの動的リプレースの処理を高速化することができる。具体的には、コピー元プロセッサが接続するセルコントローラ(例えば、図2のセルコントローラ120)には、該セルコントローラのスパースディレクトリ(例えば図2のスパースディレクトリ121)をエントリ毎にリードをし、スヌープを送信する機構をリクエスト/スヌープ生成回路(例えば、図4のリクエスト/スヌープ生成回路410)に設ける。   As described above, according to the preferred embodiment of the present invention, before the memory data is copied, the interface between the local processors in the cell is disconnected, and the copy source memory is read. Dynamic copy processing of memory by reflecting the status information of the local processor in the copy source sparse directory and updating the copy destination sparse directory using the copy source sparse directory information after copying the memory data. Can be speeded up. Specifically, the cell controller (for example, the cell controller 120 in FIG. 2) to which the copy source processor is connected reads the sparse directory of the cell controller (for example, the sparse directory 121 in FIG. 2) for each entry, and snoops. Is provided in the request / snoop generation circuit (for example, the request / snoop generation circuit 410 in FIG. 4).

また、コピー先プロセッサ(例えば、図2のプロセッサ204)の接続するセルコントローラ(例えば図2のセルコントローラ220)には、自身が送信していない(コピー元のセルコントローラが送信した)スヌープに対するスヌープレスポンスをスヌープレスポンス格納バッファ(例えば、図4のスヌープレスポンス格納バッファ404)に送信する機構を第1調停回路(例えば、図4の第1調停回路402)に設ける。コピー元セルコントローラが保持するスパースディレクトリのステータス情報に基づき、全プロセッサのキャッシュからデータを掃き出させ、コピー先のスパースディレクトリを更新することによって、コヒーレンシを保証し、かつメモリのラインの一部を管理するスパースディレクトリ(例えば、図2のスパースディレクトリ121)のエントリ数分のスヌープを発行するのみなので、メモリのデータコピー後にスパースディレクトリ(例えば、図2のスパースディレクトリ221)を高速に更新できる。さらに、1ラインのスヌープ数もキャッシュを行っているプロセッサへのスヌープのみに抑えられるので、スヌープによるトラフィックの増加を抑えられる。このようにして、スヌープのブロードキャストの発行数を抑え、メモリの動的リプレースの際に、従来よりも他のリクエストのスループットを低下させることなく処理する。   Further, a snoop for a snoop that is not transmitted to the cell controller (for example, the cell controller 220 in FIG. 2) to which the copy destination processor (for example, the processor 204 in FIG. 2) is connected (sent by the copy source cell controller). A mechanism for transmitting the response to the snoop response storage buffer (for example, the snoop response storage buffer 404 in FIG. 4) is provided in the first arbitration circuit (for example, the first arbitration circuit 402 in FIG. 4). Based on the status information of the sparse directory held by the copy source cell controller, data is swept from the caches of all processors, and the copy destination sparse directory is updated to ensure coherency and a part of the memory line is Since only snoops for the number of entries of the sparse directory to be managed (for example, the sparse directory 121 in FIG. 2) are issued, the sparse directory (for example, the sparse directory 221 in FIG. 2) can be updated at high speed after the data copy of the memory. Furthermore, since the number of snoops per line can be suppressed to only snoops to the processor that performs caching, an increase in traffic due to snoops can be suppressed. In this way, the number of issued snoop broadcasts is suppressed, and when dynamic memory replacement is performed, processing is performed without lowering the throughput of other requests than before.

また、本発明の好適な実施形態によれば、以下に記載する効果が得られる。
第1の効果は、プロセッサ間キャッシュコヒーレンシの保証をするために、従来はメモリのデータコピー完了後にメモリのキャッシュライン数分を全てリードする必要があった。しかし、本発明では、メモリのキャッシュラインの一部のキャッシュラインを管理するスパースディレクトリの全エントリをリードすればよい。エントリ数がメモリのライン数より格段に少ないために、キャッシュコヒーレンシを保証するためにかかる時間を短縮することができる。
Moreover, according to a preferred embodiment of the present invention, the effects described below can be obtained.
The first effect is that in order to guarantee interprocessor cache coherency, conventionally, it is necessary to read all the number of cache lines in the memory after the data copy of the memory is completed. However, in the present invention, all entries of the sparse directory that manages a part of the cache lines of the memory may be read. Since the number of entries is much smaller than the number of lines in the memory, the time taken to guarantee cache coherency can be reduced.

第2の効果は、従来は、メモリのデータコピー完了後に行うメモリのリードの際にメモリの1キャッシュラインに対し、全プロセッサにスヌープの送信をしていた。しかし本発明では、コピー元セルコントローラのスパースディレクトリを使用することで、1キャッシュラインに対し、特定のプロセッサにのみスヌープを送信すればよいので、トラフィックを減少させることができ、性能低下を抑えることができる。   The second effect is that, conventionally, a snoop is transmitted to all processors for one cache line of the memory when the memory is read after the data copy of the memory is completed. However, in the present invention, by using the sparse directory of the copy source cell controller, it is only necessary to send a snoop to a specific processor for one cache line, so traffic can be reduced and performance degradation can be suppressed. Can do.

なお、本発明は上記に示す実施形態に限定されるものではない。本発明の範囲において、上記実施形態の各要素を、当業者であれば容易に考えうる内容に変更、追加、変換することが可能である。   In addition, this invention is not limited to embodiment shown above. Within the scope of the present invention, it is possible to change, add, or convert each element of the above-described embodiment to a content that can be easily considered by those skilled in the art.

本発明の実施形態に係るマルチプロセッサシステムが備えるセルの構成例を示すブロック図である。It is a block diagram which shows the structural example of the cell with which the multiprocessor system which concerns on embodiment of this invention is provided. 複数のセルから構成されるマルチプロセッサシステムの一例を示す図である。It is a figure which shows an example of the multiprocessor system comprised from a some cell. 本実施形態におけるセル間の通信で使用されるパケットのフォーマットを示す図である。It is a figure which shows the format of the packet used by the communication between cells in this embodiment. 本実施形態に係るセルコントローラ内の構成例を示すブロック図である。It is a block diagram which shows the structural example in the cell controller which concerns on this embodiment. 本実施形態のメモリ間のデータコピーの動作例を示すフローチャートである。It is a flowchart which shows the operation example of the data copy between the memory of this embodiment. 本実施形態のセルコントローラがコピー先セルコントローラとして動作している場合の動作例を示すフローチャートである。It is a flowchart which shows the operation example in case the cell controller of this embodiment is operate | moving as a copy destination cell controller. 本実施形態のセルコントローラが通常状態において、セル内のプロセッサからリクエストを受けた場合の動作例を示すフローチャートである。It is a flowchart which shows the operation example when the cell controller of this embodiment receives a request from the processor in a cell in a normal state. 本実施形態のセルコントローラが通常状態において、セル外のプロセッサからリクエストを受けた場合の動作例を示すフローチャートである。It is a flowchart which shows the operation example when the cell controller of this embodiment receives a request from the processor outside a cell in a normal state. 関連する技術のメモリ間のデータコピーの動作例を示すフローチャートである。It is a flowchart which shows the operation example of the data copy between the memories of related technology.

符号の説明Explanation of symbols

100、200、500、550 セル
101、102、103、104 プロセッサ
111、112、113、114 メモリ
120 セルコントローラ
121 スパースディレクトリ
122 システムFW
131、132、133、134 キャッシュ
300 パケット
301 フラグ
302 リクエストの種類
303 アドレス
304 キャッシュステータス
305 送信先プロセッサ番号
306 返信先プロセッサ番号
307 データ
401 状態フラグ
402 第1調停回路
403 リクエスト格納バッファ
404 スヌープレスポンス格納バッファ
405 アドレス生成回路
406 ライトデータ生成回路
407 ライトコマンド生成回路
408 リードポインタ
409、413 セレクタ
410 リクエスト/スヌープ生成回路
411 合成回路
412 第2調停回路
100, 200, 500, 550 Cell 101, 102, 103, 104 Processor 111, 112, 113, 114 Memory 120 Cell controller 121 Sparse directory 122 System FW
131, 132, 133, 134 Cache 300 Packet 301 Flag 302 Request type 303 Address 304 Cache status 305 Transmission destination processor number 306 Return destination processor number 307 Data 401 Status flag 402 First arbitration circuit 403 Request storage buffer 404 Snoop response storage buffer 405 Address generation circuit 406 Write data generation circuit 407 Write command generation circuit 408 Read pointer 409, 413 Selector 410 Request / snoop generation circuit 411 Synthesis circuit 412 Second arbitration circuit

Claims (9)

キャッシュメモリを有する1以上のプロセッサと、1以上のメモリとを有するセルを複数備えるマルチプロセッサシステムであって、
前記各セルは、
他セル内のキャッシュメモリに記録されている自セル内のメモリのデータに関するステータス情報を保持するスパースディレクトリと、
コピー元セルとコピー先セルが異なるメモリ間でデータコピーを行う場合、コピー元メモリからコピー先メモリへデータをコピーし、前記コピー元セル内のスパースディレクトリが保持するステータス情報に基づいて、前記コピー先セルのスパースディレクトリを更新するセルコントローラと、を備えるマルチプロセッサシステム。
A multiprocessor system comprising a plurality of cells having one or more processors having a cache memory and one or more memories,
Each cell is
A sparse directory that holds status information about the data in the memory in its own cell recorded in the cache memory in another cell;
When copying data between memories in which the copy source cell and the copy destination cell are different, the data is copied from the copy source memory to the copy destination memory, and the copy is performed based on the status information held in the sparse directory in the copy source cell. And a cell controller that updates a sparse directory of the destination cell.
前記セルコントローラは、前記コピー元セルのスパースディレクトリが保持するステータス情報に基づいて、前記コピー先セルのセルコントローラを返信先とするスヌープを発行することを特徴とする請求項1記載のマルチプロセッサシステム。   2. The multiprocessor system according to claim 1, wherein the cell controller issues a snoop whose return destination is a cell controller of the copy destination cell based on status information held in a sparse directory of the copy source cell. . 前記メモリは接続されたプロセッサを介してアクセスされ、
前記セルは、複数のプロセッサを有し、前記データコピーを行う場合、前記接続されたプロセッサが前記セルコントローラを介して自セル内の他のプロセッサへアクセスするようにプロセッサ間を接続し、
前記セルコントローラは、前記コピー元メモリへのアクセスによって、前記自セル内の他のプロセッサがキャッシュメモリに保持する前記コピー元メモリのデータに関するステータス情報を、前記コピー元のスパースディレクトリが保持するステータス情報へ追加することを特徴とする請求項2記載のマルチプロセッサシステム。
The memory is accessed via a connected processor;
The cell includes a plurality of processors, and when the data copy is performed, the connected processors are connected to each other so that the connected processor accesses another processor in the own cell via the cell controller,
The cell controller, when accessing the copy source memory, status information about the data of the copy source memory held in the cache memory by another processor in the own cell, and status information held by the copy source sparse directory The multiprocessor system according to claim 2, further comprising:
前記セルコントローラは、前記コピー元セルである場合、前記コピー元メモリに関するステータス情報に基づいて、前記コピー元メモリのデータを前記キャッシュメモリに保持するプロセッサを特定し、前記コピー先セルのセルコントローラを返信先とするスヌープを生成し、生成したスヌープを前記特定したプロセッサへ送信することを特徴とする請求項1乃至3のいずれか一項に記載のマルチプロセッサシステム。   When the cell controller is the copy source cell, the cell controller specifies a processor that holds the data of the copy source memory in the cache memory based on status information about the copy source memory, and sets the cell controller of the copy destination cell. The multiprocessor system according to any one of claims 1 to 3, wherein a snoop as a reply destination is generated and the generated snoop is transmitted to the specified processor. 前記セルコントローラは、前記コピー先セルである場合、前記特定したプロセッサから送信されたスヌープレスポンスを受信し、受信したスヌープレスポンスに基づいて、スパースディレクトリのステータス情報を更新することを特徴とする請求項4記載のマルチプロセッサシステム。   The cell controller, when it is the copy destination cell, receives a snoop response transmitted from the specified processor, and updates status information of a sparse directory based on the received snoop response. 5. The multiprocessor system according to 4. 前記セルコントローラは、前記コピー先セルである場合、前記スパースディレクトリのステータス情報を更新中に、前記コピー先メモリへアクセスするリクエストを受け付け、受け付けたリクエストがアクセスするメモリラインが前記スパースディレクトリのステータス情報に含まれていないと判断した場合、全プロセッサにスヌープを送信し、返信されるスヌープレスポンスに基づいて前記スパースディレクトリを更新することを特徴とする請求項5記載のマルチプロセッサシステム。   When the cell controller is the copy destination cell, the cell controller receives a request to access the copy destination memory while updating the status information of the sparse directory, and the memory line accessed by the received request is the status information of the sparse directory. 6. The multiprocessor system according to claim 5, wherein if it is determined that the sparse directory is not included, the sparse directory is updated based on the returned snoop response. 前記セルコントローラは、前記メモリ間のデータコピー終了後、前記コピー元メモリへのアクセス先をコピー先メモリへ変更し、前記スパースディレクトリのステータス情報を更新することを特徴とする請求項4乃至6記載のいずれか一項に記載のマルチプロセッサシステム。   7. The cell controller changes the access destination to the copy source memory to a copy destination memory after the data copy between the memories is completed, and updates the status information of the sparse directory. The multiprocessor system according to any one of the above. 前記セルコントローラは、
前記セルが、通常状態、コピー元セル、及びコピー先セルのいずれであるかを示す状態フラグと、
セル内へのアクセスのリクエストを格納するリクエスト格納バッファと、
前記コピー元セルのセルコントローラが発行したスヌープの返信を更新用スヌープレスポンスとして格納するスヌープレスポンス格納バッファと、
前記リクエスト、及び前記更新用スヌープレスポンスを受信し、状態フラグに基づいて、前記リクエスト格納バッファと前記更新用スヌープレスポンスとのいずれかへ格納する調停回路と、
前記状態フラグがコピー先セルであり、かつ、前記リクエストが前記スパースディレクトリにステータス情報を保持していないメモリラインへのアクセスである場合、スヌープを生成し、全プロセッサへ発行する生成部と、を備え、
前記スパースディレクトリは、前記更新用スヌープレスポンス、及び、前記生成部によって発行されたスヌープについて返信されるスヌープレスポンスに基づいて更新されることを特徴とする請求項2乃至7のいずれか一項に記載のマルチプロセッサシステム。
The cell controller is
A status flag indicating whether the cell is a normal state, a copy source cell, or a copy destination cell;
A request storage buffer for storing requests for access to the cell;
A snoop response storage buffer for storing a snoop response issued by the cell controller of the copy source cell as an update snoop response;
An arbitration circuit that receives the request and the update snoop response and stores the request in either the request storage buffer or the update snoop response based on a status flag;
A generation unit that generates a snoop and issues it to all processors when the status flag is a copy destination cell and the request is an access to a memory line that does not hold status information in the sparse directory; Prepared,
The sparse directory is updated based on the snoop response for update and a snoop response returned for the snoop issued by the generation unit. Multiprocessor system.
キャッシュメモリを有する1以上のプロセッサと、1以上のメモリとを有するセルを複数備えるマルチプロセッサシステムのメモリリプレース方法であって、
他セル内のキャッシュメモリに保持された自セル内のメモリのデータに関するステータス情報を保持し、
セルが異なるメモリ間でコピー元メモリからコピー先メモリへデータをコピーし、
コピー終了後、前記コピー元メモリへのアクセス先をコピー先メモリへ変更し、
前記コピー元セル内のスパースディレクトリが保持するステータス情報に基づいて、前記コピー先セルのスパースディレクトリが保持するステータス情報を更新するメモリリプレース方法。
A memory replacement method for a multiprocessor system comprising a plurality of cells each having one or more processors having a cache memory and one or more memories,
Holds status information about data in the memory in its own cell held in the cache memory in another cell,
Copy data from copy source memory to copy destination memory between memories with different cells,
After copying, change the access destination to the copy source memory to the copy destination memory,
A memory replacement method for updating status information held in a sparse directory in the copy destination cell based on status information held in a sparse directory in the copy source cell.
JP2007236085A 2007-09-12 2007-09-12 Multiprocessor and memory replacement method Expired - Fee Related JP4868246B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007236085A JP4868246B2 (en) 2007-09-12 2007-09-12 Multiprocessor and memory replacement method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007236085A JP4868246B2 (en) 2007-09-12 2007-09-12 Multiprocessor and memory replacement method

Publications (2)

Publication Number Publication Date
JP2009070013A JP2009070013A (en) 2009-04-02
JP4868246B2 true JP4868246B2 (en) 2012-02-01

Family

ID=40606220

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007236085A Expired - Fee Related JP4868246B2 (en) 2007-09-12 2007-09-12 Multiprocessor and memory replacement method

Country Status (1)

Country Link
JP (1) JP4868246B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2618262A1 (en) 2010-09-13 2013-07-24 Fujitsu Limited Information processing device and method for controlling information processing device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6055610A (en) * 1997-08-25 2000-04-25 Hewlett-Packard Company Distributed memory multiprocessor computer system with directory based cache coherency with ambiguous mapping of cached data to main-memory locations
US6631448B2 (en) * 1998-03-12 2003-10-07 Fujitsu Limited Cache coherence unit for interconnecting multiprocessor nodes having pipelined snoopy protocol
US7103728B2 (en) * 2002-07-23 2006-09-05 Hewlett-Packard Development Company, L.P. System and method for memory migration in distributed-memory multi-processor systems
JP4362454B2 (en) * 2005-04-07 2009-11-11 富士通株式会社 Cache coherence management device and cache coherence management method

Also Published As

Publication number Publication date
JP2009070013A (en) 2009-04-02

Similar Documents

Publication Publication Date Title
JP4230998B2 (en) Computer system with processor cache for recording remote cache presence information
JP5431525B2 (en) A low-cost cache coherency system for accelerators
US8291175B2 (en) Processor-bus attached flash main-memory module
JP3661764B2 (en) Method and system for providing an eviction protocol in a non-uniform memory access computer system
KR101414384B1 (en) Processor, information processing apparatus, and arithmetic method
US20080215819A1 (en) Method, apparatus, and computer program product for a cache coherency protocol state that predicts locations of shared memory blocks
US6260117B1 (en) Method for increasing efficiency in a multi-processor system and multi-processor system with increased efficiency
JP5550089B2 (en) Multiprocessor system, node controller, failure recovery method
CN100585572C (en) Protocol for maintaining cache coherency in CMP
WO2011158320A1 (en) Multi-core processor system, cache coherency control method, and cache coherency control program
JP4673585B2 (en) Memory system control apparatus and memory system control method
US6587922B2 (en) Multiprocessor system
CN108415861B (en) Apparatus and method for cached content management
JP4507563B2 (en) Multiprocessor system
JP5212478B2 (en) Control device, data transfer device, information processing device, arithmetic processing device, and control method for information processing device
CN117059147A (en) Tracking memory modifications at cache line granularity
JP2004199677A (en) System for and method of operating cache
JP3068469B2 (en) Second level cache memory system
JPH09179779A (en) Computer system and data transfer method
US8015372B2 (en) Apparatus and method for memory migration in a distributed memory multiprocessor system
JP2009070013A (en) Multiprocessor and memory replacement method
CN101303669A (en) Semiconductor device with address translation memory access mechanism
JP2005250830A (en) Processor and main memory shared multiprocessor
JP4030951B2 (en) Data duplication apparatus and method
JP3507314B2 (en) Memory controller and computer system

Legal Events

Date Code Title Description
TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20111018

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20111102

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20141125

Year of fee payment: 3

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

LAPS Cancellation because of no payment of annual fees