JP2010003137A - Cache memory system, cpu core, and cache memory control method - Google Patents

Cache memory system, cpu core, and cache memory control method

Info

Publication number
JP2010003137A
JP2010003137A JP2008161802A JP2008161802A JP2010003137A JP 2010003137 A JP2010003137 A JP 2010003137A JP 2008161802 A JP2008161802 A JP 2008161802A JP 2008161802 A JP2008161802 A JP 2008161802A JP 2010003137 A JP2010003137 A JP 2010003137A
Authority
JP
Japan
Prior art keywords
data
memory hierarchy
memory
hierarchy
cpu
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.)
Withdrawn
Application number
JP2008161802A
Other languages
Japanese (ja)
Inventor
Fumihiko Hayakawa
文彦 早川
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2008161802A priority Critical patent/JP2010003137A/en
Publication of JP2010003137A publication Critical patent/JP2010003137A/en
Withdrawn legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To provide a cache memory system capable of reducing the overhead of memory access, improving the utilization efficiency of a memory, a CPU, an external device for supplying data to the memory and the like, and improving the performance of the entire system, and to provide a CPU core, and a cache memory control method. <P>SOLUTION: A higher-order memory data storage 24 reads updated data from a lower-order memory hierarchy 12 when data referred to by the CPU core 11 are the updated data, and stores the data in a higher-order memory hierarchy 15. When the higher-order memory storage section 24 stores data in the higher-order memory hierarchy 15, a memory lock device 23 locks the higher-order memory hierarchy 15. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、キャッシュメモリシステムに関する。   The present invention relates to a cache memory system.

図9に本発明の前提となる従来のキャッシュメモリシステムを示す。
図9のキャッシュメモリシステム100aでは、メモリアクセス性能を向上させるため、CPU101と下位メモリ階層103の間に上位メモリ階層(キャッシュメモリ)102が設けられている。この上位メモリ階層102は下位メモリ階層103よりアクセス速度は速いが、下位メモリ階層103よりメモリ容量が小さい。
FIG. 9 shows a conventional cache memory system as a premise of the present invention.
In the cache memory system 100 a of FIG. 9, an upper memory hierarchy (cache memory) 102 is provided between the CPU 101 and the lower memory hierarchy 103 in order to improve memory access performance. The upper memory hierarchy 102 has a faster access speed than the lower memory hierarchy 103, but has a smaller memory capacity than the lower memory hierarchy 103.

このような構成のキャッシュメモリシステム100aにおいて、アクセラレータ等の外部デバイス104から出力されるデータAが下位メモリ階層103に置かれ、CPU101が外部デバイス104が出力したデータAを参照し、何らかの演算をするケースを考える。   In the cache memory system 100a having such a configuration, the data A output from the external device 104 such as an accelerator is placed in the lower memory hierarchy 103, and the CPU 101 refers to the data A output from the external device 104 and performs some operation. Think of a case.

このケースでは、CPU101がデータAに対する全ての処理を終了するまで、下位メモリ階層103にはデータAが保持され続け、CPU101がデータAに対する処理を終了すると、CPU101は上位メモリ階層102と下位メモリ階層103のデータを無効化した後、外部デバイス104に次のデータBを下位メモリ階層103に書き込む処理に取り掛からせる。したがって外部デバイス104に待ち時間が生じて、処理効率が悪い。   In this case, the data A is kept in the lower memory hierarchy 103 until the CPU 101 finishes all the processes for the data A, and when the CPU 101 finishes the process for the data A, the CPU 101 has the upper memory hierarchy 102 and the lower memory hierarchy. After invalidating the data 103, the external device 104 is started to write the next data B into the lower memory hierarchy 103. Therefore, a waiting time occurs in the external device 104, and processing efficiency is poor.

図9に示す方法ではシステム全体性能が上がらないため、下位メモリ階層103をダブルバッファにしたキャッシュメモリシステム100bの構成を取ることが多い。
図10に下位メモリ階層をダブルバッファにしたキャッシュメモリシステム100bの構成を示す。
Since the overall system performance does not improve with the method shown in FIG. 9, a configuration of a cache memory system 100b in which the lower memory hierarchy 103 is a double buffer is often adopted.
FIG. 10 shows a configuration of a cache memory system 100b in which the lower memory hierarchy is a double buffer.

ダブルバッファのキャッシュメモリシステム100bでは、下位メモリ階層103上の上位メモリ階層102にムーブインされたデータが記録されていた領域に次のデータをオーラップ処理する。   In the double buffer cache memory system 100b, the next data is overlapped in the area where the data moved in the upper memory hierarchy 102 on the lower memory hierarchy 103 was recorded.

図10に示すように下位メモリ階層103をダブルバッファ構成とすると、データAの処理とデータBの処理をオーバーラップさせることが出来るので、図9のキャッシュメモリシステムに比べて全体的なスループットが向上する。   As shown in FIG. 10, when the lower memory hierarchy 103 has a double buffer configuration, the processing of data A and the processing of data B can be overlapped, so that the overall throughput is improved as compared with the cache memory system of FIG. To do.

なおキャッシュメモリシステムの構成としては、様々なものが提案されており、一例として、特許文献1には、データの処理時間を短縮するために、プロセッサからの命令の有無に関わらず、事前にキャッシュメモリにデータを読み込んでおくキャッシュメモリシステムが開示されている。   Various configurations of cache memory systems have been proposed. As an example, Patent Document 1 discloses a cache memory system in advance in order to shorten the data processing time, regardless of the presence or absence of instructions from the processor. A cache memory system that reads data into a memory is disclosed.

また特許文献2には、上位のキャッシュメモリと下位のキャッシュメモリが同時に同じデータを持たないようにして、メモリ容量を有効に活用するようにしたキャッシュメモリシステムが開示されている。   Patent Document 2 discloses a cache memory system in which the upper cache memory and the lower cache memory do not have the same data at the same time so that the memory capacity is effectively utilized.

更に特許文献3に開示のあるキャッシュメモリシステムでは、データとタグとを保持する複数のエントリからなる複数のウェイ毎に、優先して格納すべきデータの種類を示す優先属性を保持する。これにより優先属性を持つデータに対してウェイを確保すると同時に、ウェイ中の空きエントリは他の属性を持つデータを格納するので、キャッシュメモリを
有効活用できる。
特開平9−128296号公報 特開平5−127997号公報 特開2005−346268号公報
Further, in the cache memory system disclosed in Patent Document 3, a priority attribute indicating the type of data to be preferentially stored is held for each of a plurality of ways including a plurality of entries holding data and tags. As a result, a way is secured for data having a priority attribute, and at the same time, empty entries in the way store data having other attributes, so that the cache memory can be used effectively.
JP-A-9-128296 Japanese Patent Laid-Open No. 5-127997 JP 2005-346268 A

従来のキャッシュメモリシステムではプログラムの実行状態によっては、上位メモリ階層のデータが下位メモリ階層に追い出される可能性があったため、プログラムが第1のデータの使用が完了するまで、下位メモリ階層に次の第2のデータを置くことができなかった。   In the conventional cache memory system, depending on the execution state of the program, there is a possibility that data in the upper memory hierarchy may be expelled to the lower memory hierarchy. Therefore, until the program completes use of the first data, The second data could not be placed.

これを回避するため、下位メモリ階層をダブルバッファ構成にすることで、第1のデータの処理と次の第2のデータの処理をオーバーラップさせていた。
しかし図10に示すダブルバッファによるキャッシュメモリシステムでは、これからCPU101が利用することが分かっているデータが下位メモリ階層103にあった場合、CPU101がそのデータを実際に利用するタイミングになって初めて下位メモリ階層103から読み出すため、リードレイテンシが長くなる。そしてこの点がボトルネックとなり性能の向上が望めない。
In order to avoid this, the processing of the first data overlaps the processing of the next second data by adopting a double buffer configuration in the lower memory hierarchy.
However, in the cache memory system using the double buffer shown in FIG. 10, when there is data in the lower memory hierarchy 103 that is known to be used by the CPU 101, the lower memory is not used until the CPU 101 actually uses the data. Since data is read from the hierarchy 103, the read latency becomes long. And this point becomes a bottleneck, and improvement in performance cannot be expected.

そこで本発明は、メモリアクセスのオーバーヘッドを削減すると共に、メモリやCPU、メモリにデータ供給する外部デバイス等の利用効率を上げ、システム全体の性能を向上させることの出来るキャッシュメモリシステム、CPUコア及びキャッシュメモリ制御方法を提供することを課題とする。   Therefore, the present invention reduces a memory access overhead, improves the utilization efficiency of a memory, a CPU, an external device for supplying data to the memory, and the like, and improves the performance of the entire system, a CPU core, and a cache It is an object to provide a memory control method.

本発明によるキャッシュメモリシステムは、CPU、及び少なくとも上位メモリ階層と下位メモリ階層の2階層を備えるメモリ階層を備え、前記下位メモリ階層に供給されるデータを前記CPUが書き換えを行わないことを前提とし、領域格納部、上位メモリデータ格納部、及びメモリロック部を備える。   The cache memory system according to the present invention includes a CPU and a memory hierarchy including at least two upper memory hierarchies and lower memory hierarchies, and the CPU does not rewrite data supplied to the lower memory hierarchies. , An area storage unit, an upper memory data storage unit, and a memory lock unit.

領域格納部は、前記下位メモリ階層上の更新されるデータのアドレスを記憶する。
上位メモリデータ格納部は、前記CPUが参照したデータのアドレスと前記領域格納部内のアドレスを比較し、当該CPUが参照したデータが前記更新されるデータであるとき、前記更新されるデータを前記下位メモリ階層から読み出し、前記上位メモリ階層にデータを格納する。
The area storage unit stores an address of data to be updated on the lower memory hierarchy.
The upper memory data storage unit compares the address of the data referred to by the CPU with the address in the area storage unit, and when the data referred to by the CPU is the data to be updated, Read from the memory hierarchy and store data in the upper memory hierarchy.

メモリロック部は、前記上位メモリ格納部が前記上位メモリ階層にデータを格納した後に、前記上位メモリ階層をロックする。
また本発明によるCPUコアは、順次データが更新される下位メモリ階層と接続されたCPUコアであって、前記下位メモリ階層より高速な上位メモリ階層と、メモリからデータを読み出して処理を行う命令実行部と、前記下位メモリ階層上の更新されるデータのアドレスを記憶する領域格納部と、前記命令実行部が参照したデータのアドレスと前記領域格納部内のアドレスを比較し、当該CPUが参照したデータが前記下位メモリ階層のデータであるとき、当該下位メモリ階層からデータを読み出し、前記上位メモリ階層にデータを格納する上位メモリデータ格納部と、前記命令実行部がメモリを参照する際に、予め設定されている条件を満たしたなら前記下位メモリ階層上のデータの更新を指示する条件完了通知部と、を備えることを特徴とする。
The memory lock unit locks the upper memory hierarchy after the upper memory storage unit stores data in the upper memory hierarchy.
The CPU core according to the present invention is a CPU core connected to a lower memory hierarchy in which data is sequentially updated, an upper memory hierarchy that is faster than the lower memory hierarchy, and an instruction execution that reads and processes data from the memory. The address of the data to be updated on the lower memory hierarchy, the address of the data referenced by the instruction execution unit and the address in the area storage unit, and the data referenced by the CPU Is the data in the lower memory hierarchy, the data is read from the lower memory hierarchy and stored in the upper memory hierarchy, and the instruction execution unit is set in advance when referring to the memory. A condition completion notifying unit for instructing update of data on the lower memory hierarchy if a predetermined condition is satisfied. To.

更に本発明によるキャッシュメモリ制御方法は、順次データが更新される下位メモリ階
層と接続されたCPUコアによるキャッシュメモリ制御方法であって、命令を実行する命令実行部が参照したデータのアドレスと、前記下位メモリ階層上の更新されるデータのアドレスを比較し、当該CPUが参照したデータが前記下位メモリ階層のデータであるとき、当該下位メモリ階層からデータを読み出し、前記下位メモリ階層より高速な上位メモリ階層にデータを格納し、前記命令実行部がメモリを参照する際に、予め設定されている条件を満たしたなら前記下位メモリ階層上のデータの更新を指示する、ことを特徴とする。
Furthermore, a cache memory control method according to the present invention is a cache memory control method by a CPU core connected to a lower memory hierarchy in which data is sequentially updated, the address of data referred to by an instruction execution unit that executes an instruction, The address of the data to be updated on the lower memory hierarchy is compared, and when the data referenced by the CPU is the data of the lower memory hierarchy, the data is read from the lower memory hierarchy, and the higher-speed memory faster than the lower memory hierarchy Data is stored in a hierarchy, and when the instruction execution unit refers to a memory, if a preset condition is satisfied, an instruction to update data on the lower memory hierarchy is given.

本キャッシュメモリシステムによれば、メモリアクセスのオーバーヘッド削減と、メモリや外部デバイスやCPUの利用効率を向上し、システム全体の性能を向上することができる。   According to the cache memory system, it is possible to reduce the overhead of memory access, improve the utilization efficiency of the memory, the external device, and the CPU, and improve the performance of the entire system.

また従来のシステムより下位メモリ階層を小さく構成することが出来、システム全体の縮小及び低コスト化を実現することが出来る。   Further, the lower memory hierarchy can be made smaller than that of the conventional system, and the entire system can be reduced and the cost can be reduced.

以下に図面を参照しながら本発明の一実施形態について説明する。
図1は本実施形態のキャッシュメモリシステムが前提とするシステムのイメージ図である。
An embodiment of the present invention will be described below with reference to the drawings.
FIG. 1 is an image diagram of a system premised on the cache memory system of the present embodiment.

本実施形態のキャッシュメモリシステム1は、CPUコア11、下位メモリ階層12、及び下位メモリ階層12に大量かつ連続してデータを書き込むハードウェアアクセラレータ等の外部デバイス13がバス14を介して接続される構成となっている。またCPUコア11は、内部に上位メモリ階層15を備えている。   In the cache memory system 1 of this embodiment, a CPU core 11, a lower memory hierarchy 12, and an external device 13 such as a hardware accelerator that writes a large amount of data continuously to the lower memory hierarchy 12 are connected via a bus 14. It has a configuration. The CPU core 11 includes an upper memory hierarchy 15 therein.

なお順次下位メモリ階層12にデータが書き込まれてゆく状況にありさえすれば、下位メモリ階層12にデータを供給するものは外部デバイス13に限定されるものではなく、キャッシュメモリシステム1内に外部デバイス13を備えなくても良い。   As long as data is sequentially written in the lower memory hierarchy 12, the one that supplies data to the lower memory hierarchy 12 is not limited to the external device 13, and the external device is included in the cache memory system 1. 13 may not be provided.

図1のキャッシュメモリシステム1において、外部デバイス13は下位メモリ階層12に順次データを書き込んでゆき、CPUコア11はこのデータを上位メモリ階層15を介して参照する。なおCPUコア11は、データを参照するのみで改変は行わないものとする。   In the cache memory system 1 of FIG. 1, the external device 13 sequentially writes data to the lower memory hierarchy 12, and the CPU core 11 refers to this data via the upper memory hierarchy 15. Note that the CPU core 11 only refers to data and does not modify it.

以下の説明では、キャッシュメモリシステム1が動画のデコード処理を行なうシステムに用いられる場合を例として説明する。
この場合外部デバイス13はDMACであり、ネットワーク等から定期的に動画ストリームを取得し下位メモリ階層12であるメインメモリに転送する動作を行ない、上位メモリ階層15であるキャッシュメモリを持つCPUコア11はその動画ストリームを取り込みデコード処理を行ない画像データを出力するものとする。
In the following description, a case where the cache memory system 1 is used in a system that performs video decoding processing will be described as an example.
In this case, the external device 13 is a DMAC, which periodically acquires a moving image stream from a network or the like and transfers it to the main memory which is the lower memory hierarchy 12, and the CPU core 11 having a cache memory which is the upper memory hierarchy 15 It is assumed that the moving picture stream is captured and decoded to output image data.

次に本実施形態のキャッシュメモリシステム1の動作を説明する。
図2は本実施形態のキャッシュメモリシステム1の動作を説明する図である。
同図においてCPUコア11は、キャッシュメモリシステム1の動作制御を行うために、上位メモリ解放装置21、条件完了通知装置22、上位メモリロック装置23、上位メモリデータ格納装置24及び領域格納装置25を備えている。
Next, the operation of the cache memory system 1 of this embodiment will be described.
FIG. 2 is a diagram for explaining the operation of the cache memory system 1 of the present embodiment.
In the figure, the CPU core 11 includes an upper memory release device 21, a condition completion notification device 22, an upper memory lock device 23, an upper memory data storage device 24 and an area storage device 25 in order to control the operation of the cache memory system 1. I have.

上位メモリ解放装置21は、CPUコア11からの指示に基づいて、上位メモリロック装置23がロックした上位メモリ階層15を解放する。条件完了通知装置22は、予め設定した条件を満たしたらCPUコア11に通知するもので、この通知を受けてCPUコア
11は、外部デバイス13に対して次のデータ処理を行うよう指示する。上位メモリロック装置23は、上位メモリ階層15に格納したデータが追い出されないようロックする。上位メモリデータ格納装置24は、指定領域を下位メモリ階層12から一度に読み出し、上位メモリ階層15にデータを格納する。領域格納装置25は、外部デバイス13が更新するメモリ領域の開始番地と終了番地を記憶する。
The upper memory release device 21 releases the upper memory hierarchy 15 locked by the upper memory lock device 23 based on an instruction from the CPU core 11. The condition completion notification device 22 notifies the CPU core 11 when a preset condition is satisfied. Upon receiving this notification, the CPU core 11 instructs the external device 13 to perform the next data processing. The upper memory lock device 23 locks the data stored in the upper memory hierarchy 15 so that it is not evicted. The upper memory data storage device 24 reads the specified area from the lower memory hierarchy 12 at a time and stores the data in the upper memory hierarchy 15. The area storage device 25 stores the start address and end address of the memory area updated by the external device 13.

このような構成において、まず外部デバイス13が、下位メモリ階層12にデータを書き込み、データの更新を行う(1)。次に外部デバイス13は、下位メモリ階層12の更新が完了したことをCPUコア11に通知する(2)。   In such a configuration, the external device 13 first writes data to the lower memory hierarchy 12 and updates the data (1). Next, the external device 13 notifies the CPU core 11 that the update of the lower memory hierarchy 12 has been completed (2).

CPUコア11は、(1)で外部デバイス13が下位メモリ階層12に書き込んだデータを参照しようとする(3)。このときCPUコア11の上位メモリデータ格納装置24は、領域格納装置25内のアドレスと参照データのアドレスを比較して、CPUコア11が参照しようとしたデータが(1)で更新された領域のデータであると判断した場合は、下位メモリ階層12から該当領域のデータを一度に全て読み出し、上位メモリ階層15に格納する(4)。また上位メモリロック装置23は、(4)で上位メモリ階層15に格納したデータを下位メモリ階層12に追い出されないようロックする(5)。   The CPU core 11 tries to refer to the data written by the external device 13 in the lower memory hierarchy 12 in (1) (3). At this time, the upper memory data storage device 24 of the CPU core 11 compares the address in the area storage device 25 with the address of the reference data, and the data of the area that the CPU core 11 is trying to reference is updated in (1). If the data is determined to be data, all the data in the corresponding area is read from the lower memory hierarchy 12 at a time and stored in the upper memory hierarchy 15 (4). Further, the upper memory lock device 23 locks the data stored in the upper memory hierarchy 15 in (4) so as not to be evicted to the lower memory hierarchy 12 (5).

条件完了通知装置22は、CPUコア11が特定のアドレスのデータを参照したり特定の値のデータを参照する等、予め設定した条件を満たしたら、CPUコア11に通知を行う。CPUコア11は、この通知を受けて、該当領域のデータを用いた処理をしつつ、外部デバイス13に次のデータ処理を指示する(6)。   The condition completion notification device 22 notifies the CPU core 11 when the CPU core 11 satisfies a preset condition such as referring to data of a specific address or referring to data of a specific value. Upon receiving this notification, the CPU core 11 instructs the external device 13 to perform the next data processing while performing processing using the data in the corresponding area (6).

そしてCPUコア11が該当領域のデータの利用を終了したら、上位メモリ解放装置21は、(5)で行った上位メモリ階層15のロックを解除し、上位メモリ階層15の無効化処理を行う。   When the CPU core 11 finishes using the data in the corresponding area, the upper memory release device 21 releases the lock of the upper memory hierarchy 15 performed in (5), and performs the invalidation process of the upper memory hierarchy 15.

図3は、本実施形態のキャッシュメモリシステム1のCPUコア11、上位メモリ階層15、下位メモリ階層12及び外部デバイス13間のデータのやりとりを示すシーケンス図である。   FIG. 3 is a sequence diagram showing data exchange among the CPU core 11, the upper memory hierarchy 15, the lower memory hierarchy 12, and the external device 13 of the cache memory system 1 of the present embodiment.

同図においてまず外部デバイス13が下位メモリ階層12内にデータを書き込み、データの更新を行う(1)。データの更新が完了すると、外部デバイス13は、CPUコア11にデータの更新が完了したことを通知する(2)。   In the figure, the external device 13 first writes data into the lower memory hierarchy 12 and updates the data (1). When the data update is completed, the external device 13 notifies the CPU core 11 that the data update is completed (2).

これを受けてCPUコア11は、(1)で更新されたデータを参照しようとする(3)。このデータはまだ上位メモリ階層15には無いので、CPUコア11はデータを下位メモリ階層12に対して参照する。この参照により、(1)で更新されたデータは、下位メモリ階層12から上位メモリ階層15に一度に全て読み込まれる(4)。この読み込みが完了すると、上位メモリ階層15内のデータがはき出されないように、上位メモリ階層15をロックする(5)。以降CPUコア11は、上位メモリ階層15上のデータを参照して処理を行う。   In response to this, the CPU core 11 tries to refer to the data updated in (1) (3). Since this data is not yet in the upper memory hierarchy 15, the CPU core 11 refers to the data for the lower memory hierarchy 12. With this reference, the data updated in (1) is read from the lower memory hierarchy 12 to the upper memory hierarchy 15 all at once (4). When this reading is completed, the upper memory hierarchy 15 is locked so that the data in the upper memory hierarchy 15 is not ejected (5). Thereafter, the CPU core 11 performs processing with reference to data on the upper memory hierarchy 15.

CPUコア11が上位メモリ階層15上のデータを参照して処理を行っている最中に、予め設定しておいた特定条件、例えばCPUコア11が特定のアドレスのデータを参照する等の条件を満たしたら、これを条件完了通知装置22がCPUコア11に通知し、CPUコア11は外部デバイス13に次のデータ更新処理の開始を指示する(6)。   While the CPU core 11 performs processing with reference to the data on the upper memory hierarchy 15, a predetermined condition set in advance, for example, a condition such as the CPU core 11 referring to data at a specific address is set. When the condition is satisfied, the condition completion notification device 22 notifies the CPU core 11 of this, and the CPU core 11 instructs the external device 13 to start the next data update process (6).

これを受けて外部デバイス13は下位メモリ階層12に次のデータを書き込んでゆく。またこのとき並列して、CPUコア11は上位メモリ階層15上のデータを参照しながら
処理を続ける(7)。なおこの間上位メモリ階層15と下位メモリ階層12の間にコヒーレンシがとれてない部分31が生じる。
In response to this, the external device 13 writes the next data in the lower memory hierarchy 12. At this time, in parallel, the CPU core 11 continues the processing while referring to the data on the upper memory hierarchy 15 (7). During this time, a portion 31 where no coherency is obtained occurs between the upper memory hierarchy 15 and the lower memory hierarchy 12.

そしてCPUコア11は処理が終了すると、上位メモリ階層15のロックを解除する(8)。
以降(3)〜(8)の処理を繰り返し、外部デバイス13によって更新されるデータを順次処理していく。
When the processing is completed, the CPU core 11 unlocks the upper memory hierarchy 15 (8).
Thereafter, the processes (3) to (8) are repeated, and the data updated by the external device 13 is sequentially processed.

このように本実施形態のキャッシュメモリシステム1では、CPUコア11が参照するデータは常に上位メモリ階層15にあるので、CPUコア11は高速に処理を行うことが出来る。またCPUコア11によるデータを参照しながらの処理と、外部デバイス13によるデータの更新処理が並列に行われるので、システム全体の高速化、及び性能の向上を行うことが出来る。   As described above, in the cache memory system 1 of the present embodiment, since the data referred to by the CPU core 11 is always in the upper memory hierarchy 15, the CPU core 11 can perform processing at high speed. Further, the processing while referring to the data by the CPU core 11 and the data update processing by the external device 13 are performed in parallel, so that the entire system can be increased in speed and performance can be improved.

また図9の従来のキャッシュメモリシステムに比して、システム全体において高スループットを実現することが出来る。更に図10のダブルバッファの構成に比して、下位メモリ階層の容量を小さくすることが出来る。   Compared with the conventional cache memory system of FIG. 9, high throughput can be realized in the entire system. Furthermore, the capacity of the lower memory hierarchy can be reduced as compared with the double buffer configuration of FIG.

次に外部デバイス13が下位メモリ階層12に書き込むデータの大きさが上位メモリ階層15の容量より大きい場合について説明する。
外部デバイス13が下位メモリ階層12に書き込むデータの大きさが上位メモリ階層15の容量より大きい場合は、本実施形態のキャッシュメモリシステム1は、複数回に分けて上位メモリ階層15にデータを読み込む。
Next, a case where the size of data written to the lower memory hierarchy 12 by the external device 13 is larger than the capacity of the upper memory hierarchy 15 will be described.
When the size of the data written to the lower memory hierarchy 12 by the external device 13 is larger than the capacity of the upper memory hierarchy 15, the cache memory system 1 of this embodiment reads data into the upper memory hierarchy 15 in a plurality of times.

図4は外部デバイス13が下位メモリ階層12に書き込むデータの大きさが上位メモリ階層15の容量より大きい場合における、本実施形態のキャッシュメモリシステム1の動作を説明する図である。   FIG. 4 is a diagram for explaining the operation of the cache memory system 1 according to the present embodiment when the size of data written to the lower memory hierarchy 12 by the external device 13 is larger than the capacity of the upper memory hierarchy 15.

同図において、まず外部デバイス13が、下位メモリ階層12にデータを書き込み、データの更新を行う(1)。次に外部デバイス13は、下位メモリ階層12の更新が完了したことをCPUコア11に通知する(2)。   In the figure, the external device 13 first writes data to the lower memory hierarchy 12 and updates the data (1). Next, the external device 13 notifies the CPU core 11 that the update of the lower memory hierarchy 12 has been completed (2).

CPUコア11は、(1)で外部デバイス13が下位メモリ階層12に書き込んだデータを参照しようとする(3)。このときCPUコア11の上位メモリデータ格納装置24は、領域格納装置25内のアドレスと参照データのアドレスを比較し、CPUコア11が参照しようとしたデータが(1)で更新された領域のデータであると判断した場合は、下位メモリ階層12から該当領域のデータを一度に上位メモリ階層15の容量分読み出し、上位メモリ階層15に格納する(4)。また上位メモリロック装置23は、(4)で上位メモリ階層15に格納したデータを下位メモリ階層12に追い出されないようロックする(5)。   The CPU core 11 tries to refer to the data written by the external device 13 in the lower memory hierarchy 12 in (1) (3). At this time, the upper memory data storage device 24 of the CPU core 11 compares the address in the area storage device 25 with the address of the reference data, and the data of the area in which the data that the CPU core 11 is trying to reference is updated in (1). If it is determined, the data in the corresponding area is read from the lower memory hierarchy 12 by the capacity of the upper memory hierarchy 15 at a time and stored in the upper memory hierarchy 15 (4). Further, the upper memory lock device 23 locks the data stored in the upper memory hierarchy 15 in (4) so as not to be evicted to the lower memory hierarchy 12 (5).

この(1)〜(5)までの処理は、基本的には図2の場合と同じになる。
次にCPUコア11が、上位メモリ階層15上のデータを使用し終えたなら、上位メモリ解放装置21が、(5)で行われた上位メモリ階層15に対するロックを解除し、上位メモリ階層15の無効化処理を行う(6)。
The processes from (1) to (5) are basically the same as those in FIG.
Next, when the CPU core 11 finishes using the data on the upper memory hierarchy 15, the upper memory release device 21 releases the lock on the upper memory hierarchy 15 performed in (5), and the upper memory hierarchy 15 An invalidation process is performed (6).

そして次にCPUコア11が、上位メモリ階層15外の(1)で外部デバイス13が下位メモリ階層12に書き込んだデータを参照しようとすると、下位メモリ階層12上のデータを上位メモリ階層15に上位メモリ階層15の容量分格納する。また上位メモリロック装置23は、上位メモリ階層15に格納したデータを下位メモリ階層12に追い出されないようロックする。そしてCPUコア11が、上位メモリ階層15上のデータを使用し終えたなら、上位メモリ解放装置21が、上位メモリ階層15に対するロックを解除して上位メモリ階層15の無効化処理を行う(7)。   Then, when the CPU core 11 tries to refer to the data written by the external device 13 to the lower memory hierarchy 12 in (1) outside the upper memory hierarchy 15, the data on the lower memory hierarchy 12 is transferred to the upper memory hierarchy 15. Stores the capacity of the memory hierarchy 15. The upper memory lock device 23 locks the data stored in the upper memory hierarchy 15 so that the data is not evicted to the lower memory hierarchy 12. When the CPU core 11 has finished using the data on the upper memory hierarchy 15, the upper memory release device 21 releases the lock on the upper memory hierarchy 15 and performs the invalidation process of the upper memory hierarchy 15 (7). .

この(7)の処理を、CPUコア11が(1)で外部デバイス13が更新したデータに対して全て行うまで繰り返す。
そして(7)において、CPUコア11が上位メモリ階層15上のデータを参照しながら処理を行っている途中で、CPUコア11が特定のアドレスのデータを参照する等、予め設定した条件を満たしたなら、条件完了通知装置22はこれをCPUコア11に通知する。そしてCPUコア11は、この通知を受けると、外部デバイス13に対して次のデータ処理を指示する(8)。この指示を受けて外部デバイス13は下位メモリ階層12に次のデータを転送してゆく。
The process (7) is repeated until the CPU core 11 performs all the data updated by the external device 13 in (1).
In (7), while the CPU core 11 is performing processing while referring to the data on the upper memory hierarchy 15, the CPU core 11 satisfies a preset condition such as referring to data at a specific address. Then, the condition completion notification device 22 notifies the CPU core 11 of this. Upon receiving this notification, the CPU core 11 instructs the external device 13 to perform the next data processing (8). In response to this instruction, the external device 13 transfers the next data to the lower memory hierarchy 12.

そしてCPUコア11は、(7)での条件完了通知装置22へのデータ参照が終了したならば、上位メモリロック装置23は上位メモリ階層15に対するロックを解除する(9)。   When the data reference to the condition completion notification device 22 in (7) is completed, the CPU core 11 releases the lock on the upper memory hierarchy 15 (9).

図5は外部デバイス13が下位メモリ階層12に書き込むデータの大きさが上位メモリ階層15の容量より大きい場合における、本実施形態のキャッシュメモリシステム1のCPUコア11、上位メモリ階層15、下位メモリ階層12及び外部デバイス13間のデータのやりとりを示すシーケンス図である。   FIG. 5 illustrates the CPU core 11, the upper memory hierarchy 15, and the lower memory hierarchy of the cache memory system 1 according to the present embodiment when the size of data written to the lower memory hierarchy 12 by the external device 13 is larger than the capacity of the upper memory hierarchy 15. 12 is a sequence diagram showing exchange of data between 12 and an external device 13. FIG.

同図においてまず外部デバイス13が下位メモリ階層12内にデータを書き込み、データの更新を行う(1)。データの更新が完了すると、外部デバイス13は、CPUコア11にデータの更新が完了したことを通知する(2)。   In the figure, the external device 13 first writes data into the lower memory hierarchy 12 and updates the data (1). When the data update is completed, the external device 13 notifies the CPU core 11 that the data update is completed (2).

これを受けてCPUコア11は、(1)で更新されたデータを参照しようとする(3)。このデータはまだ上位メモリ階層15には無いので、CPUコア11はデータを下位メモリ階層12に対して参照する。この参照により、(1)で更新されたデータは、下位メモリ階層12から上位メモリ階層15に一度に上位メモリロック装置23の容量分のデータが読み込まれる(4)。この読み込みが完了すると、上位メモリ階層15内のデータがはき出されないように、上位メモリ階層15をロックする(5)。以降CPUコア11は、上位メモリ階層15上のデータを参照して処理を行う。   In response to this, the CPU core 11 tries to refer to the data updated in (1) (3). Since this data is not yet in the upper memory hierarchy 15, the CPU core 11 refers to the data for the lower memory hierarchy 12. With this reference, the data updated in (1) is read from the lower memory hierarchy 12 into the upper memory hierarchy 15 for the capacity of the upper memory lock device 23 at a time (4). When this reading is completed, the upper memory hierarchy 15 is locked so that the data in the upper memory hierarchy 15 is not ejected (5). Thereafter, the CPU core 11 performs processing with reference to data on the upper memory hierarchy 15.

この(1)〜(5)までの処理は、基本的には図3の場合と同じになる。
次にCPUコア11が、上位メモリ階層15上のデータを使用し終えたなら、(5)で行われた上位メモリ階層15に対するロックを解除する(6)。
The processes from (1) to (5) are basically the same as those in FIG.
Next, when the CPU core 11 finishes using the data on the upper memory hierarchy 15, the lock on the upper memory hierarchy 15 performed in (5) is released (6).

そして次にCPUコア11が、上位メモリ階層15外の(1)で外部デバイス13が下位メモリ階層12に書き込んだデータを参照しようとすると、下位メモリ階層12上のデータを上位メモリ階層15に上位メモリ階層15の容量分格納する。また上位メモリ階層15に格納したデータを下位メモリ階層12に追い出されないようロックする。そしてCPUコア11が、上位メモリ階層15上のデータを使用し終えたなら、上位メモリ階層15に対するロックを解除する(7)。   Then, when the CPU core 11 tries to refer to the data written by the external device 13 to the lower memory hierarchy 12 in (1) outside the upper memory hierarchy 15, the data on the lower memory hierarchy 12 is transferred to the upper memory hierarchy 15. Stores the capacity of the memory hierarchy 15. Further, the data stored in the upper memory hierarchy 15 is locked so as not to be evicted to the lower memory hierarchy 12. When the CPU core 11 has finished using the data on the upper memory hierarchy 15, the lock on the upper memory hierarchy 15 is released (7).

(7)でCPUコア11が上位メモリ階層15上のデータを参照して処理を行っている最中に、予め設定しておいた特定条件、例えばCPUコア11が特定のアドレスのデータを参照する等の条件を満たしたら、CPUコア11は外部デバイス13に次のデータ更新処理の開始を指示する(8)。   While the CPU core 11 performs processing by referring to the data on the upper memory hierarchy 15 in (7), a specific condition set in advance, for example, the CPU core 11 refers to data at a specific address. If the above conditions are satisfied, the CPU core 11 instructs the external device 13 to start the next data update process (8).

これを受けて外部デバイス13は下位メモリ階層12に次のデータを書き込んでゆく。またこのとき並列して、CPUコア11は上位メモリ階層15上のデータを参照しながら処理を続ける(9)。   In response to this, the external device 13 writes the next data in the lower memory hierarchy 12. At this time, in parallel, the CPU core 11 continues the processing while referring to the data on the upper memory hierarchy 15 (9).

そしてCPUコア11は処理が終了すると、上位メモリ階層15のロックを解除する(10)。
以降(3)〜(10)の処理を繰り返し、外部デバイス13によって更新されるデータを順次処理してゆく。
When the processing is completed, the CPU core 11 unlocks the upper memory hierarchy 15 (10).
Thereafter, the processes (3) to (10) are repeated, and the data updated by the external device 13 is sequentially processed.

このように本実施形態のキャッシュメモリシステム1は、外部デバイス13が下位メモリ階層12に転送するデータの量が、上位メモリ階層15の容量より大きい場合にも対処することが出来る。   As described above, the cache memory system 1 according to the present embodiment can cope with the case where the amount of data transferred from the external device 13 to the lower memory hierarchy 12 is larger than the capacity of the upper memory hierarchy 15.

次に上位メモリ階層15上のデータを更新する際のデータ更新量を設定した場合の例を示す。
このデータ更新量が設定されると、上位メモリ階層15が下位メモリ階層12からデータを転送する際、常にこのデータ更新量の大きさのデータ量が転送されることとなる。
Next, an example in which the data update amount for updating data on the upper memory hierarchy 15 is set will be shown.
When this data update amount is set, when the upper memory layer 15 transfers data from the lower memory layer 12, a data amount of the data update amount is always transferred.

図6はデータ更新量を設定した場合の本実施形態のキャッシュメモリシステム1の動作を説明する図である。
なお同図において、データ更新量は、領域格納装置25内に設定される。
FIG. 6 is a diagram for explaining the operation of the cache memory system 1 of the present embodiment when the data update amount is set.
In the figure, the data update amount is set in the area storage device 25.

図6において、まず外部デバイス13が、下位メモリ階層12にデータを書き込み、データの更新を行う(1)。次に外部デバイス13は、下位メモリ階層12の更新が完了したことをCPUコア11に通知する(2)。   In FIG. 6, the external device 13 first writes data to the lower memory hierarchy 12 and updates the data (1). Next, the external device 13 notifies the CPU core 11 that the update of the lower memory hierarchy 12 has been completed (2).

CPUコア11は、(1)で外部デバイス13が下位メモリ階層12に書き込んだデータを参照しようとする(3)。このときCPUコア11の上位メモリデータ格納装置24は、領域格納装置25に格納されているアドレスと参照データのアドレスから、CPUコア11が参照しようとしたデータが(1)で更新された領域のデータであると判断した場合は、下位メモリ階層12から該当領域のデータを上位メモリ階層15の容量分読み出し、上位メモリ階層15に格納する(4)。このとき上位メモリ階層15に読み込みデータ量は、予め領域格納装置25内に設定されるデータ更新量となる。   The CPU core 11 tries to refer to the data written by the external device 13 in the lower memory hierarchy 12 in (1) (3). At this time, the upper memory data storage device 24 of the CPU core 11 uses the address stored in the region storage device 25 and the address of the reference data, in the region where the data that the CPU core 11 tried to reference is updated in (1). If the data is determined to be data, the data in the corresponding area is read from the lower memory hierarchy 12 by the capacity of the upper memory hierarchy 15 and stored in the upper memory hierarchy 15 (4). At this time, the amount of data read into the upper memory hierarchy 15 is a data update amount preset in the area storage device 25.

また上位メモリロック装置23は、(4)で上位メモリ階層15に格納したデータを下位メモリ階層12に追い出されないようロックする(5)。
CPUコア11は、上位メモリ階層15を参照しながら処理を進める。そしてこの間に例えばCPUコア11が特定のアドレスのデータを参照する等、特定の条件を満たすと、条件完了通知装置22が条件完了通知装置22が下位メモリ階層12の該当領域を無効化する(6)。これにより外部デバイス13が下位メモリ階層12は、次のデータを下位メモリ階層12に転送する。
Further, the upper memory lock device 23 locks the data stored in the upper memory hierarchy 15 in (4) so as not to be evicted to the lower memory hierarchy 12 (5).
The CPU core 11 proceeds with processing while referring to the upper memory hierarchy 15. During this time, if a specific condition is satisfied, for example, the CPU core 11 refers to data at a specific address, the condition completion notification device 22 invalidates the corresponding area in the lower memory hierarchy 12 (6 ). As a result, the external device 13 transfers the next data to the lower memory hierarchy 12 in the lower memory hierarchy 12.

またCPUコア11が上位メモリ階層15上のデータを参照し終え、次のデータを参照しようとすると、上位メモリ解放装置21はこれを認知し、(3)で行った上位メモリ階層15のロックを解除して、無効化処理を行う(7)。   When the CPU core 11 finishes referring to the data on the upper memory hierarchy 15 and tries to refer to the next data, the upper memory release device 21 recognizes this and locks the upper memory hierarchy 15 performed in (3). The invalidation processing is performed (7).

(7)で上位メモリ階層15の無効化が行われると、上記した(4)〜(7)の処理を繰り返し、CPUコア11によるデータの参照処理と、外部デバイス13による下位メモリ階層12へのデータ転送が並列して行われる。   When the upper memory hierarchy 15 is invalidated in (7), the above-described processes (4) to (7) are repeated, and the data reference process by the CPU core 11 and the external device 13 to the lower memory hierarchy 12 are repeated. Data transfer is performed in parallel.

図7は、データ更新量を設定した場合における、本実施形態のキャッシュメモリシステム1のCPUコア11、上位メモリ階層15、下位メモリ階層12及び外部デバイス13間のデータのやりとりを示すシーケンス図である。   FIG. 7 is a sequence diagram showing data exchange among the CPU core 11, the upper memory hierarchy 15, the lower memory hierarchy 12, and the external device 13 of the cache memory system 1 of this embodiment when the data update amount is set. .

同図において、まず外部デバイス13が下位メモリ階層12内にデータを書き込み、データの更新を行う(1)。データの更新が完了すると、外部デバイス13は、CPUコア11にデータの更新が完了したことを通知する(2)。   In the figure, first, the external device 13 writes data in the lower memory hierarchy 12 and updates the data (1). When the data update is completed, the external device 13 notifies the CPU core 11 that the data update is completed (2).

これを受けてCPUコア11は、(1)で更新されたデータを参照しようとする(3)。このデータはまだ上位メモリ階層15には無いので、CPUコア11はデータを下位メモリ階層12に対して参照する。この参照により、(1)で更新されたデータは、下位メモリ階層12から上位メモリ階層15に読み込まれる(4)。このとき上位メモリ階層15に読み込まれるデータの大きさは、領域格納装置25内に設定されている大きさとなる。   In response to this, the CPU core 11 tries to refer to the data updated in (1) (3). Since this data is not yet in the upper memory hierarchy 15, the CPU core 11 refers to the data for the lower memory hierarchy 12. By this reference, the data updated in (1) is read from the lower memory hierarchy 12 to the upper memory hierarchy 15 (4). At this time, the size of the data read into the upper memory hierarchy 15 is the size set in the area storage device 25.

この(4)の読み込みが完了すると、上位メモリ階層15内のデータがはき出されないように、上位メモリ階層15をロックする(5)。以降CPUコア11は、上位メモリ階層15上のデータを参照して処理を行う。   When the reading of (4) is completed, the upper memory hierarchy 15 is locked so that the data in the upper memory hierarchy 15 is not ejected (5). Thereafter, the CPU core 11 performs processing with reference to data on the upper memory hierarchy 15.

次にCPUコア11が、上位メモリ階層15上のデータを使用し終えたなら、(5)で行われた上位メモリ階層15に対するロックを解除する(6)。これにより、上位メモリ階層15上のデータは無効となる。   Next, when the CPU core 11 finishes using the data on the upper memory hierarchy 15, the lock on the upper memory hierarchy 15 performed in (5) is released (6). As a result, the data on the upper memory hierarchy 15 becomes invalid.

そして次にCPUコア11が、上位メモリ階層15外の(1)で外部デバイス13が下位メモリ階層12に書き込んだデータを参照しようとすると、下位メモリ階層12上のデータを上位メモリ階層15に上位メモリ階層15の容量分格納する。また上位メモリ階層15に格納したデータを下位メモリ階層12に追い出されないようロックする。そしてCPUコア11が、上位メモリ階層15上のデータを使用し終えたなら、上位メモリ階層15に対するロックを解除する(7)。   Then, when the CPU core 11 tries to refer to the data written by the external device 13 to the lower memory hierarchy 12 in (1) outside the upper memory hierarchy 15, the data on the lower memory hierarchy 12 is transferred to the upper memory hierarchy 15. Stores the capacity of the memory hierarchy 15. Further, the data stored in the upper memory hierarchy 15 is locked so as not to be evicted to the lower memory hierarchy 12. When the CPU core 11 has finished using the data on the upper memory hierarchy 15, the lock on the upper memory hierarchy 15 is released (7).

(7)でCPUコア11が上位メモリ階層15上のデータを参照して処理を行っている最中に、予め設定しておいた特定条件、例えばCPUコア11が特定のアドレスのデータを参照する等の条件を満たしたら、CPUコア11は外部デバイス13に次のデータ更新処理の開始を指示する(8)。   While the CPU core 11 performs processing by referring to the data on the upper memory hierarchy 15 in (7), a specific condition set in advance, for example, the CPU core 11 refers to data at a specific address. If the above conditions are satisfied, the CPU core 11 instructs the external device 13 to start the next data update process (8).

これを受けて外部デバイス13は下位メモリ階層12に次のデータを書き込んでゆく。またこのとき並列して、CPUコア11は上位メモリ階層15上のデータを参照しながら処理を続ける(9)。   In response to this, the external device 13 writes the next data in the lower memory hierarchy 12. At this time, in parallel, the CPU core 11 continues the processing while referring to the data on the upper memory hierarchy 15 (9).

そしてCPUコア11は処理が終了すると、上位メモリ階層15のロックを解除する(10)。
以降(3)〜(10)の処理を繰り返し、外部デバイス13によって更新されるデータを順次処理してゆく。
When the processing is completed, the CPU core 11 unlocks the upper memory hierarchy 15 (10).
Thereafter, the processes (3) to (10) are repeated, and the data updated by the external device 13 is sequentially processed.

このように本実施形態のキャッシュメモリシステム1は、外部デバイス13が下位メモリ階層12に転送するデータの量が、上位メモリ階層15の容量より大きい場合も、下位メモリ階層12から上位メモリ階層15へのデータ転送を複数回に分けることにより実現することが出来る。また、下位メモリ階層12から上位メモリ階層15へのデータ転送を行う際の、データ転送量を事前に設定変更することが出来る。   As described above, in the cache memory system 1 according to the present embodiment, even when the amount of data transferred from the external device 13 to the lower memory hierarchy 12 is larger than the capacity of the upper memory hierarchy 15, the lower memory hierarchy 12 moves to the upper memory hierarchy 15. This can be realized by dividing the data transfer into a plurality of times. In addition, the data transfer amount when transferring data from the lower memory hierarchy 12 to the upper memory hierarchy 15 can be changed in advance.

図8は、本実施形態のキャッシュメモリシステムのCPUコアのキャッシュメモリ関係の詳細な構成を示す図である。
同図においてキャッシュメモリシステム1に係る構成としては、上述した上位メモリ解放装置21、条件完了通知装置22、上位メモリロック装置23、上位メモリデータ格納装置24及び領域格納装置25の他にタグRAM41、キャッシュRAM42、XOR回路43及びキャッシュフィル装置44を備えている。
FIG. 8 is a diagram showing a detailed configuration of the cache memory related to the CPU core of the cache memory system of this embodiment.
In the figure, the configuration related to the cache memory system 1 includes a tag RAM 41, in addition to the above-described upper memory release device 21, condition completion notification device 22, upper memory lock device 23, upper memory data storage device 24 and area storage device 25. A cache RAM 42, an XOR circuit 43, and a cache fill device 44 are provided.

タグRAM41及びキャッシュRAM42は、上位メモリ階層15を構成するメモリで、タグRAM41には命令実行部50から要求されたデータのアドレスがキャッシュにヒット/ミスしたかを判断するためのタグ情報が、またキャッシュRAM42にはタグ情報に対応したデータが記憶されている。またタグRAM41にはロックビットを記憶する領域があり、このログビットがセットされると対応する上位メモリ階層15のデータ(すなわちキャッシュRAM42のデータ)がロックされる。   The tag RAM 41 and the cache RAM 42 are memories constituting the upper memory hierarchy 15. The tag RAM 41 has tag information for determining whether the address of the data requested from the instruction execution unit 50 has hit / missed in the cache. The cache RAM 42 stores data corresponding to the tag information. Further, the tag RAM 41 has an area for storing a lock bit, and when this log bit is set, the data in the upper memory hierarchy 15 corresponding thereto (that is, the data in the cache RAM 42) is locked.

XOR回路43は、命令実行部50から要求されたデータのアドレスとタグRAM41の出力とのXOR演算を行いキャッシュのヒット/ミスを出力するものである。キャッシュフィル装置44は、上位メモリデータ格納装置24からの指示に基づいて命令実行部50から要求されたアドレスのデータを含む、特定の大きさのデータを下位メモリ階層12に要求する。   The XOR circuit 43 performs an XOR operation on the address of the data requested from the instruction execution unit 50 and the output of the tag RAM 41 and outputs a cache hit / miss. The cache fill device 44 requests the lower memory hierarchy 12 for data of a specific size including data at the address requested by the instruction execution unit 50 based on an instruction from the upper memory data storage device 24.

このような構成の本実施形態のキャッシュメモリシステム1では、命令実行部50が要求アドレスを発行するとこれがタグRAM41内のタグと比較され、ヒットすればキャッシュRAM42からデータが読み出されて、命令実行部50に出力される。またキャッシュミスすれば、上位メモリデータ格納装置24からの指示に基づいてキャッシュフィル装置44が下位メモリ階層12にデータの要求を行い、新たなデータがタグRAM41及びキャッシュRAM42に格納される。   In the cache memory system 1 of the present embodiment having such a configuration, when the instruction execution unit 50 issues a request address, this is compared with the tag in the tag RAM 41, and if hit, the data is read from the cache RAM 42 and the instruction is executed. Is output to the unit 50. If a cache miss occurs, the cache fill device 44 requests data from the lower memory hierarchy 12 based on an instruction from the upper memory data storage device 24, and new data is stored in the tag RAM 41 and the cache RAM 42.

このように本実施形態のキャッシュメモリシステム1では、CPUコア11が参照するデータは常に上位メモリ階層15にあるので、CPUコア11の処理は高速になる。例えば動画のデコード処理を行なうときは、1フレーム分のストリームデータが常にキャッシュにあるため、CPUコア11の動画デコード処理が高速になる。   As described above, in the cache memory system 1 of the present embodiment, the data referred to by the CPU core 11 is always in the upper memory hierarchy 15, so that the processing of the CPU core 11 becomes faster. For example, when performing moving image decoding processing, stream data for one frame is always in the cache, so that the moving image decoding processing of the CPU core 11 becomes faster.

またCPUコア11による処理と、下位メモリ階層12へのデータの転送を平行して行うことが出来るので、システム全体のスループットを向上させることが出来る。例えば動画のデコード処理を行なうときは、前フレームの動画デコード処理を行ないながら、次フレームのストリームデータを取得することができる。
更には、ダブルバッファとする構成に比して、下位メモリ階層12の容量を小さく構成することが出来る。よってシステム全体の小型化、低価格化を実現することが出来る。
In addition, since the processing by the CPU core 11 and the data transfer to the lower memory hierarchy 12 can be performed in parallel, the throughput of the entire system can be improved. For example, when performing moving image decoding processing, stream data of the next frame can be acquired while performing moving image decoding processing of the previous frame.
Furthermore, the capacity of the lower memory hierarchy 12 can be made smaller than that of the double buffer configuration. Therefore, it is possible to reduce the size and price of the entire system.

以上の実施形態に関し、更に以下の付記を開示する。
(付記1)
CPU、及び少なくとも上位メモリ階層と下位メモリ階層の2階層を備えるメモリ階層を備え、前記下位メモリ階層に供給されるデータを前記CPUが書き換えを行わないキャッシュメモリシステムにおいて、
前記下位メモリ階層上の更新されるデータのアドレスを記憶する領域格納部と、
前記CPUが参照したデータのアドレスと前記領域格納部内のアドレスを比較し、当該CPUが参照したデータが前記更新されるデータであるとき、前記更新されるデータを前記下位メモリ階層から読み出し、前記上位メモリ階層にデータを格納する上位メモリデータ格納部と、
前記上位メモリ格納部が前記上位メモリ階層にデータを格納した後に、前記上位メモリ
階層をロックするメモリロック部と、
を備えることを特徴とするキャッシュメモリシステム。
(付記2)
前記CPUが前記上位メモリ階層を参照するに当たって、予め設定した条件を満たしたとき、前記CPUに通知を行う条件完了通知部を更に備え、
前記条件完了通知部による前記CPUへの通知に対して、前記CPUは、前記下位メモリ階層へのデータ転送を指示することを特徴とする付記1に記載のキャッシュメモリシステム。
(付記3)
前記上位メモリ階層に対するロックを解除する上位メモリ開放部と、
を更に備え、
前記CPUが前記上位メモリ階層上のデータの参照を終了した後に、前記上位メモリ開放部は、前記上位メモリ階層の前記ロックを解除することを特徴とする付記1に記載のキャッシュメモリシステム。
(付記4)
前記領域格納部は、前記上位メモリデータ格納部が前記下位メモリ階層から前記上位メモリ階層に格納するデータの大きさを格納し、
前記上位メモリデータ格納部が前記下位メモリ階層から前記上位メモリ階層にデータを格納する際、一度に前記データの大きさ分格納することを特徴とする付記1に記載のキャッシュメモリシステム。
(付記5)
前記データの大きさは、前記上位メモリ階層の最大容量であることを特徴とする付記4に記載のキャッシュメモリシステム。
(付記6)
前記CPUが前記上位メモリ階層上のデータの参照を終了した後に、前記上位メモリデータ格納部が前記下位メモリ階層から前記上位メモリ階層に前記データの大きさ分のデータを格納することを特徴とする付記4に記載のキャッシュメモリシステム。
(付記7)
前記下位メモリ階層上のデータを更新する外部デバイス部を更に備えることを特徴とする付記1に記載のキャッシュメモリシステム。
(付記8)
前記外部デバイス部は、前記下位メモリ階層のデータの更新の完了を前記CPUに通知することを特徴とする付記7に記載のキャッシュメモリシステム。
(付記9)
順次データが更新される下位メモリ階層と接続されたCPUコアにおいて
前記下位メモリ階層より高速な上位メモリ階層と、
メモリからデータを読み出して処理を行う命令実行部と、
前記下位メモリ階層上の更新されるデータのアドレスを記憶する領域格納部と、
前記命令実行部が参照したデータのアドレスと前記領域格納部内のアドレスを比較し、当該CPUが参照したデータが前記下位メモリ階層のデータであるとき、当該下位メモリ階層からデータを読み出し、前記上位メモリ階層にデータを格納する上位メモリデータ格納部と、
前記命令実行部がメモリを参照する際に、予め設定されている条件を満たしたなら前記下位メモリ階層上のデータの更新を指示する条件完了通知部と、
を備えることを特徴とするCPUコア。
(付記10)
前記上位メモリデータ格納部が、前記下位メモリ階層からデータを読み出し、前記上位メモリ階層にデータを格納した後、当該上位メモリ階層をロックする上位メモリロック部を更に備えることを特徴とする付記9に記載のCPUコア。
(付記11)
前記命令実行部が、前記上位メモリ階層上のデータを参照し終えたとき、前記上位メモ
リ階層のロックを解除する上位メモリ解放部を更に備えることを特徴とする付記10に記載のCPUコア。
(付記10)
順次データが更新される下位メモリ階層と接続されたCPUコアによるキャッシュメモリ制御方法において、
命令を実行する命令実行部が参照したデータのアドレスと、前記下位メモリ階層上の更新されるデータのアドレスを比較し、当該CPUが参照したデータが前記下位メモリ階層のデータであるとき、当該下位メモリ階層からデータを読み出し、前記下位メモリ階層より高速な上位メモリ階層にデータを格納し、
前記命令実行部がメモリを参照する際に、予め設定されている条件を満たしたなら前記下位メモリ階層上のデータの更新を指示する
ことを特徴とするキャッシュメモリ制御方法。
Regarding the above embodiment, the following additional notes are disclosed.
(Appendix 1)
In a cache memory system including a CPU and a memory hierarchy including at least two upper and lower memory hierarchies, and the CPU does not rewrite data supplied to the lower memory hierarchy,
An area storage unit for storing addresses of data to be updated on the lower memory hierarchy;
The address of the data referred to by the CPU is compared with the address in the area storage unit, and when the data referred to by the CPU is the updated data, the updated data is read from the lower memory hierarchy, An upper memory data storage unit for storing data in the memory hierarchy;
A memory lock unit for locking the upper memory hierarchy after the upper memory storage unit stores data in the upper memory hierarchy;
A cache memory system comprising:
(Appendix 2)
The CPU further includes a condition completion notifying unit for notifying the CPU when a predetermined condition is satisfied when referring to the upper memory hierarchy,
The cache memory system according to appendix 1, wherein the CPU instructs data transfer to the lower memory hierarchy in response to the notification to the CPU by the condition completion notification unit.
(Appendix 3)
An upper memory release unit for releasing the lock on the upper memory hierarchy;
Further comprising
The cache memory system according to appendix 1, wherein the upper memory release unit releases the lock of the upper memory hierarchy after the CPU finishes referring to data on the upper memory hierarchy.
(Appendix 4)
The area storage unit stores the size of data that the upper memory data storage unit stores from the lower memory hierarchy to the upper memory hierarchy,
2. The cache memory system according to appendix 1, wherein when the upper memory data storage unit stores data from the lower memory hierarchy to the upper memory hierarchy, the upper memory data storage unit stores the size of the data at a time.
(Appendix 5)
The cache memory system according to appendix 4, wherein the data size is a maximum capacity of the upper memory hierarchy.
(Appendix 6)
After the CPU finishes referring to the data on the upper memory hierarchy, the upper memory data storage unit stores data corresponding to the size of the data from the lower memory hierarchy to the upper memory hierarchy. The cache memory system according to appendix 4.
(Appendix 7)
The cache memory system according to appendix 1, further comprising an external device unit that updates data on the lower memory hierarchy.
(Appendix 8)
The cache memory system according to appendix 7, wherein the external device unit notifies the CPU of completion of update of data in the lower memory hierarchy.
(Appendix 9)
In a CPU core connected to a lower memory hierarchy in which data is sequentially updated, an upper memory hierarchy that is faster than the lower memory hierarchy;
An instruction execution unit that reads and processes data from the memory;
An area storage unit for storing addresses of data to be updated on the lower memory hierarchy;
The address of the data referenced by the instruction execution unit is compared with the address in the area storage unit. When the data referenced by the CPU is data in the lower memory hierarchy, the data is read from the lower memory hierarchy, and the upper memory An upper memory data storage unit for storing data in a hierarchy;
When the instruction execution unit refers to the memory, a condition completion notification unit that instructs to update data on the lower memory hierarchy if a preset condition is satisfied;
A CPU core comprising:
(Appendix 10)
The supplementary note 9 is characterized in that the upper memory data storage unit further comprises an upper memory lock unit that reads data from the lower memory hierarchy, stores the data in the upper memory hierarchy, and locks the upper memory hierarchy. The CPU core described.
(Appendix 11)
The CPU core according to appendix 10, further comprising an upper memory release unit that releases the lock of the upper memory hierarchy when the instruction execution unit has finished referring to the data on the upper memory hierarchy.
(Appendix 10)
In a cache memory control method by a CPU core connected to a lower memory hierarchy in which data is sequentially updated,
The address of the data referenced by the instruction execution unit that executes the instruction is compared with the address of the data to be updated on the lower memory hierarchy, and when the data referred to by the CPU is data of the lower memory hierarchy, Read data from the memory hierarchy, store the data in the upper memory hierarchy faster than the lower memory hierarchy,
When the instruction execution unit refers to the memory, if a preset condition is satisfied, an instruction to update data on the lower memory hierarchy is given.

本実施形態のキャッシュメモリシステムが前提とするシステムのイメージ図である。It is an image figure of the system which the cache memory system of this embodiment assumes. 本実施形態のキャッシュメモリシステムの動作を説明する図である。It is a figure explaining operation | movement of the cache memory system of this embodiment. 本実施形態のキャッシュメモリシステムのデータのやりとりを示すシーケンス図である。It is a sequence diagram which shows exchange of data of the cache memory system of this embodiment. 外部デバイスが下位メモリ階層に書き込むデータの大きさが上位メモリ階層の容量より大きい場合における、本実施形態のキャッシュメモリシステムの動作を説明する図である。It is a figure explaining operation | movement of the cache memory system of this embodiment when the magnitude | size of the data which an external device writes in a lower memory hierarchy is larger than the capacity | capacitance of an upper memory hierarchy. 外部デバイスが下位メモリ階層に書き込むデータの大きさが上位メモリ階層の容量より大きい場合における、本実施形態のキャッシュメモリシステムのデータのやりとりを示すシーケンス図である。FIG. 11 is a sequence diagram showing data exchange in the cache memory system of the present embodiment when the size of data written to the lower memory hierarchy by the external device is larger than the capacity of the upper memory hierarchy. データ更新量を設定した場合の本実施形態のキャッシュメモリシステムの動作を説明する図である。It is a figure explaining operation | movement of the cache memory system of this embodiment when a data update amount is set. データ更新量を設定した場合の本実施形態のキャッシュメモリシステムのデータのやりとりを示すシーケンス図である。It is a sequence diagram which shows exchange of data of the cache memory system of this embodiment when a data update amount is set. 本実施形態のキャッシュメモリシステムのCPUコアのキャッシュメモリ関係の詳細な構成を示す図である。It is a figure which shows the detailed structure regarding the cache memory of the CPU core of the cache memory system of this embodiment. 従来のキャッシュメモリシステムを示す図である。1 is a diagram illustrating a conventional cache memory system. 下位メモリ階層をダブルバッファにしたキャッシュメモリシステムの構成を示す図である。It is a figure which shows the structure of the cache memory system which used the lower memory hierarchy as the double buffer.

符号の説明Explanation of symbols

1 キャッシュメモリシステム
11 CPUコア
12 下位メモリ階層
13 外部デバイス
14 バス
15 上位メモリ階層
21 上位メモリ解放装置
22 条件完了通知装置
23 上位メモリロック装置
24 上位メモリデータ格納装置
25 領域格納装置
41 タグRAM
42 キャッシュRAM
43 XOR回路
44 キャッシュフィル装置
DESCRIPTION OF SYMBOLS 1 Cache memory system 11 CPU core 12 Lower memory hierarchy 13 External device 14 Bus 15 Upper memory hierarchy 21 Upper memory release apparatus 22 Condition completion notification apparatus 23 Upper memory lock apparatus 24 Upper memory data storage apparatus 25 Area storage apparatus 41 Tag RAM
42 Cache RAM
43 XOR circuit 44 Cash fill device

Claims (5)

CPU、及び少なくとも上位メモリ階層と下位メモリ階層の2階層を備えるメモリ階層を備え、前記下位メモリ階層に供給されるデータを前記CPUが書き換えを行わないキャッシュメモリシステムにおいて、
前記下位メモリ階層上の更新されるデータのアドレスを記憶する領域格納部と、
前記CPUが参照したデータのアドレスと前記領域格納部内のアドレスを比較し、当該CPUが参照したデータが前記更新されるデータであるとき、前記更新されるデータを前記下位メモリ階層から読み出し、前記上位メモリ階層にデータを格納する上位メモリデータ格納部と、
前記上位メモリ格納部が前記上位メモリ階層にデータを格納した後に、前記上位メモリ階層をロックするメモリロック部と、
を備えることを特徴とするキャッシュメモリシステム。
In a cache memory system including a CPU and a memory hierarchy including at least two upper and lower memory hierarchies, and the CPU does not rewrite data supplied to the lower memory hierarchy,
An area storage unit for storing addresses of data to be updated on the lower memory hierarchy;
The address of the data referred to by the CPU is compared with the address in the area storage unit, and when the data referred to by the CPU is the updated data, the updated data is read from the lower memory hierarchy, An upper memory data storage unit for storing data in the memory hierarchy;
A memory lock unit for locking the upper memory hierarchy after the upper memory storage unit stores data in the upper memory hierarchy;
A cache memory system comprising:
前記CPUが前記上位メモリ階層を参照するに当たって、予め設定した条件を満たしたとき、前記CPUに通知を行う条件完了通知部を更に備え、
前記条件完了通知部による前記CPUへの通知に対して、前記CPUは、前記下位メモリ階層へのデータ転送を指示することを特徴とする請求項1に記載のキャッシュメモリシステム。
The CPU further includes a condition completion notifying unit for notifying the CPU when a predetermined condition is satisfied when referring to the upper memory hierarchy,
2. The cache memory system according to claim 1, wherein the CPU instructs data transfer to the lower memory hierarchy in response to the notification to the CPU by the condition completion notification unit.
前記領域格納部は、前記上位メモリデータ格納部が前記下位メモリ階層から前記上位メモリ階層に格納するデータの大きさを格納し、
前記上位メモリデータ格納部が前記下位メモリ階層から前記上位メモリ階層にデータを格納する際、一度に前記データの大きさ分格納することを特徴とする請求項1に記載のキャッシュメモリシステム。
The area storage unit stores the size of data that the upper memory data storage unit stores from the lower memory hierarchy to the upper memory hierarchy,
2. The cache memory system according to claim 1, wherein when the upper memory data storage unit stores data from the lower memory hierarchy to the upper memory hierarchy, the cache memory system stores the size of the data at a time.
順次データが更新される下位メモリ階層と接続されたCPUコアにおいて
前記下位メモリ階層より高速な上位メモリ階層と、
メモリからデータを読み出して処理を行う命令実行部と、
前記下位メモリ階層上の更新されるデータのアドレスを記憶する領域格納部と、
前記命令実行部が参照したデータのアドレスと前記領域格納部内のアドレスを比較し、当該CPUが参照したデータが前記下位メモリ階層のデータであるとき、当該下位メモリ階層からデータを読み出し、前記上位メモリ階層に データを格納する上位メモリデータ格納部と、
前記命令実行部がメモリを参照する際に、予め設定されている条件を満たしたなら前記下位メモリ階層上のデータの更新を指示する条件完了通知部と、
を備えることを特徴とするCPUコア。
In a CPU core connected to a lower memory hierarchy in which data is sequentially updated, an upper memory hierarchy that is faster than the lower memory hierarchy;
An instruction execution unit that reads and processes data from the memory;
An area storage unit for storing addresses of data to be updated on the lower memory hierarchy;
The address of the data referred to by the instruction execution unit is compared with the address in the area storage unit, and when the data referred to by the CPU is data of the lower memory hierarchy, the data is read from the lower memory hierarchy, and the upper memory An upper memory data storage unit for storing data in a hierarchy;
When the instruction execution unit refers to the memory, a condition completion notification unit that instructs to update data on the lower memory hierarchy if a preset condition is satisfied;
A CPU core comprising:
順次データが更新される下位メモリ階層と接続されたCPUコアによるキャッシュメモリ制御方法において、
命令を実行する命令実行部が参照したデータのアドレスと、前記下位メモリ階層上の更新されるデータのアドレスを比較し、当該CPUが参照したデータが前記下位メモリ階層のデータであるとき、当該下位メモリ階層からデータを読み出し、前記下位メモリ階層より高速な上位メモリ階層にデータを格納し、
前記命令実行部がメモリを参照する際に、予め設定されている条件を満たしたなら前記下位メモリ階層上のデータの更新を指示する
ことを特徴とするキャッシュメモリ制御方法。
In a cache memory control method by a CPU core connected to a lower memory hierarchy in which data is sequentially updated,
The address of the data referenced by the instruction execution unit that executes the instruction is compared with the address of the data to be updated on the lower memory hierarchy, and when the data referred to by the CPU is data of the lower memory hierarchy, Read data from the memory hierarchy, store the data in the upper memory hierarchy faster than the lower memory hierarchy,
When the instruction execution unit refers to the memory, if the preset condition is satisfied, an instruction to update data on the lower memory hierarchy is given.
JP2008161802A 2008-06-20 2008-06-20 Cache memory system, cpu core, and cache memory control method Withdrawn JP2010003137A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008161802A JP2010003137A (en) 2008-06-20 2008-06-20 Cache memory system, cpu core, and cache memory control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008161802A JP2010003137A (en) 2008-06-20 2008-06-20 Cache memory system, cpu core, and cache memory control method

Publications (1)

Publication Number Publication Date
JP2010003137A true JP2010003137A (en) 2010-01-07

Family

ID=41584800

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008161802A Withdrawn JP2010003137A (en) 2008-06-20 2008-06-20 Cache memory system, cpu core, and cache memory control method

Country Status (1)

Country Link
JP (1) JP2010003137A (en)

Similar Documents

Publication Publication Date Title
US11762780B2 (en) Write merging on stores with different tags
US10585804B2 (en) Systems and methods for non-blocking implementation of cache flush instructions
US8250331B2 (en) Operating system virtual memory management for hardware transactional memory
KR100567099B1 (en) Method and apparatus for facilitating speculative stores in a multiprocessor system
US7167954B2 (en) System and method for caching
US20110167222A1 (en) Unbounded transactional memory system and method
US20050086435A1 (en) Cache memory controlling apparatus, information processing apparatus and method for control of cache memory
JPH05324471A (en) Cache controller
JP2009098934A (en) Processor and cache memory
KR20040007546A (en) Using an l2 directory to facilitate speculative loads in a multiprocessor system
US11599483B2 (en) Dedicated cache-related block transfer in a memory system
JP2005234854A (en) Multiprocessor system
US8918587B2 (en) Multilevel cache hierarchy for finding a cache line on a remote node
TW200417857A (en) Allocating cache lines
JP2005346168A (en) Cache memory, system, and data storage method
KR100988334B1 (en) Cache control apparatus, and information processing apparatus
KR20070040340A (en) Disable write back on atomic reserved line in a small cache system
JP2001249846A (en) Cache memory device and data processing system
US6397298B1 (en) Cache memory having a programmable cache replacement scheme
KR101203157B1 (en) Data Transfer System, Apparatus and Method
JP2010003137A (en) Cache memory system, cpu core, and cache memory control method
JP2005250830A (en) Processor and main memory sharing multiprocessor
KR20080016429A (en) Information processing system, information processing board, and method of updating cache tag and snoop tag
WO2010098152A1 (en) Cache memory system and cache memory control method
JP2003016438A (en) Image generating device

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20110906