JP2006139646A - Data transfer device and data transfer method - Google Patents
Data transfer device and data transfer method Download PDFInfo
- Publication number
- JP2006139646A JP2006139646A JP2004330088A JP2004330088A JP2006139646A JP 2006139646 A JP2006139646 A JP 2006139646A JP 2004330088 A JP2004330088 A JP 2004330088A JP 2004330088 A JP2004330088 A JP 2004330088A JP 2006139646 A JP2006139646 A JP 2006139646A
- Authority
- JP
- Japan
- Prior art keywords
- data
- memory
- cache
- read
- scheduled
- 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
Links
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Bus Control (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
本発明は、プロセッサとプロセッサ外部に備えられたメモリデバイスとの間におけるデータの転送を行うデータ転送装置およびデータ転送方法に関する。 The present invention relates to a data transfer apparatus and a data transfer method for transferring data between a processor and a memory device provided outside the processor.
従来、プロセッサがメインメモリ等のメモリデバイス上のデータを読み出す処理を高速化するために、キャッシュメモリが用いられている。
キャッシュメモリは、プロセッサによって高速にデータを読み出すことが可能な記憶素子によって構成されている。そして、キャッシュメモリは、メモリデバイスに記憶されているデータ(以下、適宜「メモリデバイスデータ」と言う。)の一部を記憶しておき、プロセッサがメモリデバイスからデータの読み出しを行う場合に、そのデータがキャッシュメモリに記憶されているものであれば、キャッシュメモリから読み出すことによって、データを高速に読み出すことを可能としている。
Conventionally, a cache memory is used in order to speed up a process in which a processor reads data on a memory device such as a main memory.
The cache memory is configured by a storage element that can read data at high speed by a processor. The cache memory stores a part of data stored in the memory device (hereinafter referred to as “memory device data” as appropriate), and when the processor reads data from the memory device, the cache memory If the data is stored in the cache memory, the data can be read at high speed by reading from the cache memory.
ここで、キャッシュメモリの方式には種々のものがあるが、セット・アソシアティブ方式が一般的である。
セット・アソシアティブ方式とは、キャッシュメモリを複数の領域(ウェイ)に分割し、それぞれのウェイに、メモリデバイス上の異なるアドレスのデータを格納しておくことにより、ヒット率を向上させることができる方式である。
Here, there are various cache memory systems, but the set associative system is common.
The set associative method is a method that can improve the hit rate by dividing the cache memory into a plurality of areas (way) and storing data of different addresses on the memory device in each way. It is.
図13は、従来のセット・アソシアティブ方式のキャッシュメモリ100の構成を示す概略図である。
図13において、キャッシュメモリ100は、タグ・テーブル110と、データ・メモリ120と、ヒット検出部130と、マルチプレクサ(MUX)140とを含んで構成される。なお、キャッシュメモリ100においては、その記憶領域内に、複数N個の要素を記憶することが可能であり、これらの要素それぞれは“エントリ”と称される。また、キャッシュメモリ100は、2ウェイのセット・アソシアティブ方式であり、各エントリには、それぞれ2つのメモリデバイスデータ(ウェイAおよびウェイBのデータ)が格納されている。
FIG. 13 is a schematic diagram showing a configuration of a conventional set-
In FIG. 13, the
タグ・テーブル110は、データ・メモリ120におけるウェイA,Bそれぞれのメモリデバイスデータが、メモリデバイス上のいずれのアドレスに記憶されているものであるかを示すアドレス情報を記憶している。タグ・テーブル110に記憶されているアドレス情報は、後述するヒット検出部130によって参照され、キャッシュがヒットしたか否かの判定に用いられる。
The tag table 110 stores address information indicating at which address on the memory device the memory device data of the ways A and B in the
データ・メモリ120は、アクセス頻度の高いデータ等、所定のメモリデバイスデータを記憶している。また、データ・メモリ120には、ウェイA,Bそれぞれに対応するメモリデバイスデータを記憶することが可能である。
ヒット検出部130は、プロセッサからの読み出し命令に対し、キャッシュメモリ100に記憶されているメモリデバイスデータがヒットしたか否かを検出する。具体的には、タグ・テーブル110に記憶されたアドレス情報それぞれを参照し、プロセッサからの読み出し命令に示されたアドレスに対応するアドレス情報が検出されると、キャッシュがヒットしたものと判定する。そして、ヒット検出部130は、ヒットしたウェイを示す情報をMUX140に出力する。
The
The
MUX140は、ヒット検出部130から入力されたウェイを示す情報に基づいて、データ・メモリ120から出力されるいずれかのメモリデバイスデータを選択し、プロセッサへの出力データ(プロセッサによって読み出されたデータ)とする。
ところで、プロセッサの中には、メインメモリ等、プロセッサ外部に備えられるメモリデバイスの他、そのメモリデバイスより高速にアクセス可能なローカルメモリをプロセッサ内部に備えるものがある。
The MUX 140 selects any memory device data output from the
Some processors include a memory device provided outside the processor, such as a main memory, and a local memory accessible at a higher speed than the memory device.
そして、プロセッサ外部に備えられたメモリデバイスから一部のデータをローカルメモリに読み込み、高速に処理を行うことで、全体として処理効率の向上が図られている。
このとき、ローカルメモリと外部のメモリデバイスとの間におけるデータ転送を、プロセッサを介することなく行うために、DMAC(Direct Memory Access Controller)が備えられることがある。
Further, the processing efficiency is improved as a whole by reading a part of data from a memory device provided outside the processor into the local memory and performing processing at high speed.
At this time, a DMAC (Direct Memory Access Controller) may be provided to transfer data between the local memory and the external memory device without using a processor.
DMACは、ローカルメモリと外部のメモリデバイスとの間でプロセッサを介することなくデータを転送することにより、プロセッサの処理負荷を軽減している。
ところが、キャッシュメモリを備えるプロセッサにおいては、キャッシュメモリに記憶されたデータと外部のメモリデバイスに記憶されたデータとが必ずしも一致していない場合がある。
The DMAC reduces the processing load on the processor by transferring data between the local memory and the external memory device without going through the processor.
However, in a processor provided with a cache memory, data stored in the cache memory may not always match data stored in an external memory device.
したがって、DMACがアクセスする外部のメモリデバイス上のデータは、キャッシュメモリの内容が反映されておらず、無効なものとなる可能性がある。
そこで、DMACが外部のメモリデバイスにアクセスする場合に、キャッシュメモリを介してアクセスすることにより、プロセッサが外部のメモリデバイスにアクセスする場合と同様、最新のデータ(有効なデータ)を参照可能とすることが考えられる。
Therefore, the data on the external memory device accessed by the DMAC does not reflect the contents of the cache memory and may become invalid.
Therefore, when the DMAC accesses an external memory device, the latest data (valid data) can be referred to by accessing via the cache memory as in the case where the processor accesses the external memory device. It is possible.
ここで、DMACを備える場合に、外部のメモリデバイスのデータとキャッシュメモリのデータとのコヒーレンシ(一致性)を保証するための技術として、特許文献1〜3に記載されたものが知られている。
しかしながら、上述のようなセット・アソシアティブ方式のキャッシュメモリにおいては、プロセッサからエントリ・アドレス(キャッシュメモリ内に記憶されているいずれかのエントリを選択するアドレス)が入力された場合、キャッシュメモリ100の複数のウェイそれぞれについて、タグ・テーブル110およびデータ・メモリ120にアクセスを行い、データがヒットしたか否かが検出される。
However, in the set associative cache memory as described above, when an entry address (an address for selecting one of the entries stored in the cache memory) is input from the processor, a plurality of
そのため、仮にDMACがキャッシュメモリ100にアクセスした場合であっても、キャッシュメモリ100内の不要な部分に対するアクセスが増加することとなり、消費電力の増加、あるいは、処理効率の低下を招くと言う問題があった。
なお、上述の公報に記載された技術は、DMACが外部のメモリデバイスにアクセスする場合に、キャッシュメモリを介してアクセスする上で生ずる上記問題を解決するものではなかった。
Therefore, even if the DMAC accesses the
Note that the technique described in the above publication does not solve the above-described problem that occurs when the DMAC accesses an external memory device through the cache memory.
このように、DMA(Direct Memory Access)を行う場合等、プロセッサを介することなくローカルメモリと外部のメモリデバイスとの間でデータ転送を行う場合に、キャッシュメモリに記憶されたデータとのコヒーレンシを保証しつつ、消費電力の増加、あるいは、処理効率の低下を防止することは困難であった。
本発明の課題は、プロセッサを介することなくローカルメモリと外部のメモリデバイスとの間でデータ転送を行う場合に、キャッシュメモリに記憶されたデータとのコヒーレンシを保証しつつ、消費電力の増加、あるいは、処理効率の低下を防止することである。
In this way, when performing data transfer between local memory and an external memory device without going through a processor, such as when performing DMA (Direct Memory Access), coherency with data stored in the cache memory is guaranteed. However, it has been difficult to prevent an increase in power consumption or a decrease in processing efficiency.
An object of the present invention is to increase power consumption while guaranteeing coherency with data stored in a cache memory when transferring data between a local memory and an external memory device without going through a processor, or It is to prevent a decrease in processing efficiency.
以上の課題を解決するため、本発明は、
プロセッサ外部に備えられる第1のメモリ(例えば、図1のメインメモリ7)と、前記第1のメモリと前記プロセッサとの間に備えられ、前記第1のメモリに記憶されているデータの少なくとも一部を複数のウェイにキャッシュしておくことが可能なキャッシュメモリ(例えば、図1のキャッシュメモリ5)と、前記プロセッサによって前記第1のメモリより高速にアクセス可能な第2のメモリ(例えば、図1のローカルメモリ3)とを含むデータ転送装置であって、前記第1のメモリから前記第2のメモリへのデータの読み出し命令あるいは前記第2のメモリから前記第1のメモリへのデータの書き込み命令の少なくともいずれかを、前記キャッシュメモリに出力することにより、前記第1のメモリと前記第2のメモリとの間で前記プロセッサを介さずにデータ転送を行うアクセス制御手段(例えば、図1のDMAC4)と、前記アクセス制御手段が読み出しあるいは書き込みを行っているアクセス中データの後にアクセスされると予想される予定データが、前記キャッシュメモリのいずれかのウェイにキャッシュされているか否かを判定するキャッシュ判定手段(例えば、図2のアクセス管理部20およびタグ・テーブル40)と、前記キャッシュ判定手段によって、前記予定データがいずれかのウェイにキャッシュされていると判定された場合に、前記複数のウェイのうち、該予定データが記憶されているウェイにアクセスし、該予定データを読み出して記憶する先読みキャッシュ手段(例えば、図2のアクセス管理部20および先読みキャッシュ部30)とを含み、前記先読みキャッシュ手段は、前記アクセス中データの後に前記予定データ対象とする読み出し命令が入力された場合、記憶している予定データを前記アクセス制御手段に出力し、前記アクセス中データの後に前記予定データを対象とする書き込み命令が入力された場合、該予定データに対して書き込みを行うことを特徴としている。
In order to solve the above problems, the present invention provides:
A first memory provided outside the processor (for example,
このような構成により、第1のメモリと第2のメモリとの間でプロセッサを介さずにデータの転送を行う場合にも、キャッシュメモリを介してデータの転送が行われる。このキャッシュメモリにおいては、読み出し対象であるデータがアクセス制御手段によって読み出されている際に、引き続いて読み出されると予想されるデータがキャッシュされているか否かを検出する。そして、キャッシュメモリは、引き続いて読み出されると予想されるデータがキャッシュメモリに記憶されている場合、そのデータを先読みキャッシュ手段に記憶し、引き続いてDMACから実際に読み出されたデータのアドレスが、先読みキャッシュ手段に記憶されたデータのアドレスと一致する場合、そのデータに対して読み出しあるいは書き込みが行われる。 With such a configuration, even when data is transferred between the first memory and the second memory without using a processor, the data is transferred via the cache memory. In this cache memory, when data to be read is being read by the access control means, it is detected whether or not the data expected to be read subsequently is cached. When the cache memory stores data that is expected to be read subsequently, the cache memory stores the data in the prefetch cache means, and subsequently the address of the data actually read from the DMAC is If the address of the data stored in the prefetch cache means matches, the data is read or written.
そのため、アクセス制御手段から読み出しあるいは書き込み対象であるデータのアドレスが入力された場合に、キャッシュメモリは、キャッシュメモリの各ウェイに常にはアクセスする必要がなく、キャッシュメモリに読み出しあるいは書き込み対象であるデータが記憶されている場合にのみアクセスすれば足りる。
したがって、プロセッサを介することなく第1のメモリと第2のメモリとの間でデータ転送を行う場合に、キャッシュメモリに記憶されたデータとのコヒーレンシを保証しつつ、消費電力の増加、あるいは、処理効率の低下を防止することが可能となる。
Therefore, when the address of the data to be read or written is input from the access control means, the cache memory does not always have to access each way of the cache memory, and the data to be read or written to the cache memory. Access is only necessary if is stored.
Therefore, when data is transferred between the first memory and the second memory without going through the processor, an increase in power consumption or processing is ensured while ensuring coherency with the data stored in the cache memory. It is possible to prevent a decrease in efficiency.
また、前記キャッシュメモリは、前記複数のウェイについて、キャッシュしているデータのアドレスを格納しているアドレス記憶手段(例えば、図2のタグ・テーブル40)と、該アドレスそれぞれに対応するデータを記憶しているデータ記憶手段(例えば、図2のデータ・メモリ50)とを含み、前記キャッシュ判定手段は、前記アドレス記憶手段のいずれかのウェイに、前記予定データのアドレスが記憶されているか否かによって、該予定データがキャッシュされているか否かを判定し、前記先読みキャッシュ手段は、前記データ記憶手段の複数のウェイのうち、前記予定データのアドレスを記憶している前記アドレス記憶手段のウェイに対応するウェイにアクセスすることを特徴としている。 The cache memory also stores address storage means (for example, the tag table 40 in FIG. 2) that stores the addresses of the cached data for the plurality of ways, and data corresponding to each of the addresses. The cache determination unit determines whether the address of the scheduled data is stored in any one of the address storage units. To determine whether the schedule data is cached, and the prefetch cache means stores the address of the schedule data storing the address of the schedule data among the plurality of ways of the data storage means. It is characterized by accessing the corresponding way.
このような構成により、アドレス記憶手段にアクセスすることで、予定データがキャッシュにヒットするか否かを判定することができるため、キャッシュにヒットするか否かを判定する際にデータ記憶手段にアクセスすることによって発生する不要な消費電力を低減することが可能となる。また、データ記憶手段において、予定データが記憶されているウェイにのみアクセスすることができるため、さらに消費電力を低減することが可能となる。 With such a configuration, it is possible to determine whether or not the scheduled data hits the cache by accessing the address storage means, so the data storage means is accessed when determining whether or not the cache hits the cache. By doing so, it is possible to reduce unnecessary power consumption. Further, since the data storage means can access only the way where the scheduled data is stored, it is possible to further reduce the power consumption.
また、前記予定データは、前記読み出し中データの直後に読み出しあるいは書き込みが行われると予想されるデータ(例えば、読み出し中データのアドレスに引き続くアドレスのデータ等)であることを特徴としている。
したがって、読み出し中データの次に読み出されると予想されるデータのみについて、キャッシュされているか否かおよび先読みキャッシュ手段への記憶等の処理を行えばよいため、処理効率を向上させることができる。
Further, the scheduled data is data that is expected to be read or written immediately after the data being read (for example, data at an address subsequent to the address of the data being read).
Therefore, only the data that is expected to be read next to the data being read only needs to be processed such as whether it is cached and stored in the prefetch cache means, so that the processing efficiency can be improved.
また、前記アクセス制御手段のアクセス対象となるデータは、複数のワードを含むブロックとして構成され、該ブロックを単位として、前記予定データがキャッシュされているか否かの判定あるいは前記予定データの読み出しあるいは書き込みを行うことを特徴としている。
このような構成により、複数のワードそれぞれについて、アクセス制御手段が読み出し命令あるいは書き込み命令を行う必要がなく、一つの命令でブロック全体を読み出すことあるいは書き込むことができるため、消費電力を低減することができると共に、処理効率を向上させることが可能となる。
Further, the data to be accessed by the access control means is configured as a block including a plurality of words, and it is determined whether the scheduled data is cached or reading or writing the scheduled data in units of the block. It is characterized by performing.
With this configuration, it is not necessary for the access control means to execute a read command or a write command for each of a plurality of words, and the entire block can be read or written with a single command, thereby reducing power consumption. In addition, the processing efficiency can be improved.
また、前記キャッシュ判定手段は、前記アクセス中データを構成する複数のワードのうち、前記アクセス制御手段が末尾のワードの読み出しあるいは書き込みを指示することに対応して、前記予定データがキャッシュされているか否かを判定することを特徴としている。
一般に、予定データは、アクセス中データのより後のワードがアクセス制御手段にアクセスされているタイミングで予想する方が、的中する確率が高くなるものである。
Further, the cache determination means determines whether the scheduled data is cached in response to the access control means instructing reading or writing of the last word among the plurality of words constituting the accessed data. It is characterized by determining whether or not.
In general, it is more probable that the scheduled data is predicted at the timing when the later word of the data being accessed is accessed by the access control means.
したがって、このような構成により、より高い確率でアクセス制御手段にアクセスされるデータを予定データとして先読みすることが可能となる。
また、前記キャッシュ判定手段は、前記アクセス中データを構成する複数のワードのうち、前記アクセス制御手段が末尾のワードに先行するワードの読み出しあるいは書き込みを指示することに対応して、前記予定データがキャッシュされているか否かを判定することを特徴としている。
Therefore, with such a configuration, it is possible to prefetch data accessed by the access control means with higher probability as scheduled data.
Further, the cache determination means corresponds to the fact that the scheduled data is in response to the access control means instructing to read or write the word preceding the last word among the plurality of words constituting the data being accessed. It is characterized by determining whether or not it is cached.
このような構成により、より早いタイミングで予定データがキャッシュされているか否かを判定できるため、キャッシュされていない場合の処理(例えば、メモリデバイスから読み込む処理等)をより早く行うことができ、ウェイトサイクルの発生を防止することあるいは発生するウェイトサイクルを低減することが可能となる。
また、前記先読みキャッシュ手段は、前記キャッシュ判定手段によって、前記予定データがいずれかのウェイにキャッシュされていると判定された場合に、前記アクセス中データを構成する複数のワードのうち、前記アクセス制御手段が末尾のワードの読み出しあるいは書き込みを指示することに対応して、該予定データが記憶されているウェイにアクセスし、該予定データの読み出しあるいは書き込みを行うことを特徴としている。
With such a configuration, it is possible to determine whether or not the scheduled data is cached at an earlier timing, so that the processing when it is not cached (for example, processing to read from the memory device) can be performed earlier, and the wait It is possible to prevent the occurrence of cycles or reduce the number of wait cycles that occur.
Further, the prefetch cache means, when the cache determination means determines that the scheduled data is cached in any way, the access control among the plurality of words constituting the accessed data In response to the means instructing reading or writing of the last word, the means accesses the way in which the scheduled data is stored and reads or writes the scheduled data.
このような構成により、より早いタイミングで予定データがキャッシュされているか否かを判定した場合にも、予定データの読み出しあるいは書き込みが行われる確率が高くなったタイミングで、実際に予定データの読み出しあるいは書き込みを行うことができる。したがって、先読みキャッシュ手段に記憶された予定データがアクセス制御手段に読み出されない場合あるいは書き込まれない場合となる割合を低減できるため、処理効率の低下を防止することができる。 With such a configuration, even when it is determined whether or not the scheduled data is cached at an earlier timing, the scheduled data is actually read or read at the timing when the probability that the scheduled data is read or written is increased. Can write. Accordingly, since the ratio of the case where the scheduled data stored in the prefetch cache unit is not read or written to the access control unit can be reduced, it is possible to prevent the processing efficiency from being lowered.
また、前記キャッシュメモリにおける複数のウェイのうち、データのアクセスに関係しないウェイを低消費電力で動作させる低消費電力化手段(例えば、図11の消費電力制御部80)をさらに含むことを特徴としている。
このような構成により、不要な部分の消費電力を低減することができ、データ転送装置の消費電力をさらに低減することが可能となる。
Further, the present invention further includes power consumption reduction means (for example, a power
With such a configuration, it is possible to reduce power consumption of unnecessary portions and further reduce power consumption of the data transfer apparatus.
また、前記低消費電力化手段は、データの読み出しに関係しないウェイに対し、クロック信号を供給しないように制御するクロックゲーティング機能を備えることを特徴としている。
このような構成により、不要な部分に対するクロック信号を供給することにより発生する不要な消費電力を低減することができる。
Further, the low power consumption means is characterized by having a clock gating function for controlling so that a clock signal is not supplied to a way not related to data reading.
With such a configuration, unnecessary power consumption generated by supplying a clock signal to unnecessary portions can be reduced.
また、前記キャッシュメモリは、セット・アソシアティブ方式のキャッシュメモリであることを特徴としている。
このような構成により、セット・アソシアティブ方式のキャッシュメモリにおいて、エントリに含まれる各ウェイのアドレス記憶手段(タグ・テーブル)およびデータ記憶手段(データ・メモリ)に不必要にアクセスすることによって発生する消費電力を大幅に低減できると共に、処理効率を向上させることが可能となる。
Further, the cache memory is a set associative cache memory.
With this configuration, in the set associative cache memory, consumption caused by unnecessary access to the address storage means (tag table) and data storage means (data memory) of each way included in the entry The power can be greatly reduced and the processing efficiency can be improved.
また、前記先読みキャッシュ手段は、前記キャッシュ判定手段によって、前記キャッシュメモリのいずれのウェイにも前記予定データがキャッシュされていないと判定された場合、前記メモリデバイスにアクセスし、該予定データを読み出して記憶することを特徴としている。
このような構成により、予定データがキャッシュされていない場合に、メモリデバイスから予定データを読み出す処理をより早く行うことができるため、ウェイトサイクルの発生を防止することあるいは発生するウェイトサイクルを低減することが可能となる。
The prefetch cache unit accesses the memory device and reads the scheduled data when the cache determining unit determines that the scheduled data is not cached in any way of the cache memory. It is characterized by memorizing.
With this configuration, when the scheduled data is not cached, the process of reading the scheduled data from the memory device can be performed more quickly, so that the generation of wait cycles can be prevented or the generated wait cycles can be reduced. Is possible.
また、本発明は、
プロセッサ外部に備えられる第1のメモリと、前記第1のメモリと前記プロセッサとの間に備えられ、前記第1のメモリに記憶されているデータの少なくとも一部を複数のウェイにキャッシュしておくことが可能なキャッシュメモリと、前記プロセッサによって前記第1のメモリより高速にアクセス可能な第2のメモリとにおけるデータ転送方法であって、前記第1のメモリから前記第2のメモリへのデータの読み出し命令あるいは前記第2のメモリから前記第1のメモリへのデータの書き込み命令の少なくともいずれかを、前記キャッシュメモリに出力することにより、前記第1のメモリと前記第2のメモリとの間で前記プロセッサを介さずにデータ転送を行うアクセス制御ステップと、前記アクセス制御ステップにおいて読み出しあるいは書き込みが行われているアクセス中データの後にアクセスされると予想される予定データが、前記キャッシュメモリのいずれかのウェイにキャッシュされているか否かを判定するキャッシュ判定ステップと、前記キャッシュ判定ステップにおいて、前記予定データがいずれかのウェイにキャッシュされていると判定された場合に、前記複数のウェイのうち、該予定データが記憶されているウェイにアクセスし、該予定データを読み出して記憶する先読みキャッシュステップと、前記アクセス中データの後に前記予定データを対象とする読み出し命令が発行された場合、記憶している予定データを読み出させ、前記アクセス中データの後に前記予定データを対象とする書き込み命令が発行された場合、該予定データに対して書き込みを行うことを特徴としている。
The present invention also provides:
A first memory provided outside the processor, and provided between the first memory and the processor, and caches at least a part of data stored in the first memory in a plurality of ways. A method of transferring data between a cache memory capable of being transferred and a second memory accessible by the processor at a higher speed than the first memory, wherein the data is transferred from the first memory to the second memory. By outputting at least one of a read command or a data write command from the second memory to the first memory to the cache memory, between the first memory and the second memory An access control step for transferring data without going through the processor, and reading in the access control step In the cache determination step for determining whether or not the scheduled data that is expected to be accessed after the in-access data being written is cached in any way of the cache memory, and in the cache determination step When it is determined that the scheduled data is cached in any way, the prefetching that accesses the way in which the scheduled data is stored and reads and stores the scheduled data among the plurality of ways A cache step, and when a read instruction for the scheduled data is issued after the data being accessed, the stored planned data is read, and a write for the planned data is targeted after the data being accessed When an instruction is issued, write to the scheduled data. It is characterized in.
このように、本発明によれば、プロセッサを介することなくローカルメモリと外部のメモリデバイスとの間でデータ転送を行う場合に、キャッシュメモリに記憶されたデータとのコヒーレンシを保証しつつ、消費電力の増加、あるいは、処理効率の低下を防止することが可能となる。 As described above, according to the present invention, when data is transferred between a local memory and an external memory device without going through a processor, power consumption is ensured while ensuring coherency with data stored in the cache memory. It is possible to prevent an increase in the processing rate or a decrease in processing efficiency.
以下、図を参照して本発明に係るデータ転送装置の実施の形態を説明する。
まず、構成を説明する。
図1は、本発明に係るデータ転送装置1Aを備える情報処理装置1の概略構成を示すブロック図である。
図1において、情報処理装置1は、CPU(Central Processing Unit)コア2と、ローカルメモリ3と、DMAC(Direct Memory Access Controller)4と、キャッシュメモリ5と、メモリインターフェース(以下、「メモリI/F」と言う。)6と、メインメモリ7とを含んで構成され、これら各部はバスを介して接続されている。なお、図1に示す構成の場合、ローカルメモリ3、DMAC4、キャッシュメモリ5、メモリI/F6およびメインメモリ7がデータ転送装置1Aを構成している。
Hereinafter, embodiments of a data transfer apparatus according to the present invention will be described with reference to the drawings.
First, the configuration will be described.
FIG. 1 is a block diagram showing a schematic configuration of an
In FIG. 1, an
CPUコア2は、情報処理装置1全体を制御するものであり、所定のプログラムを実行することにより、種々の処理を行う。例えば、CPUコア2は、メインメモリ7の所定のアドレスから演算対象となるデータあるいは命令コードを読み出して演算処理を行い、演算結果をメインメモリ7の所定のアドレスに書き込む動作を繰り返しながら、入力されたプログラムを実行する。
The
このとき、CPUコア2がメインメモリ7にアクセスする処理を高速化するために、キャッシュメモリ5を介してデータが入出力される。
また、CPUコア2には、CPUコア2が高速にアクセス可能なローカルメモリ3が備えられている。そして、メインメモリ7とローカルメモリ3との間で、DMAC4がCPUコア2を介することなくデータの転送を行うことにより、CPUコア2がメインメモリ7との間でデータ転送を行う処理負担を軽減し、処理の高速化が図られる。
At this time, data is input / output via the
The
ローカルメモリ3は、CPUの内蔵メモリとして構成され、SRAM(Static Random Access Memory)等、メインメモリ7より高速にCPUコア2からアクセス可能な記憶素子を備えて構成されている。また、ローカルメモリは、メインメモリ7より小容量に構成されている。そして、DMAC4によって、CPUコア2の処理対象となる所定のデータがメインメモリ7からローカルメモリ3に読み込まれたり、CPUコア2の処理結果であるデータがローカルメモリ3からメインメモリ7に書き出されたりする。
The
DMAC4は、ローカルメモリ3とメインメモリ7とにおけるDMAを制御し、DMAの実行中にCPUコア2をウェイト状態とさせたり、DMAの終了をCPUコア2に通知したりする。
また、DMAC4は、ローカルメモリ3とメインメモリ7との間でデータの転送を行う際に、キャッシュメモリ5を介してデータの読み込みあるいは書き出しを行う構成である。
The
The
このように、ローカルメモリ3とメインメモリ7との間でデータ転送を行う場合にキャッシュメモリ5を介することで、ローカルメモリ3においてDMA転送を行うのに先立ち、キャッシュメモリ5とメインメモリ7とのコヒーレンシを保証するための処理を行う必要がなくなる。したがって、メインメモリ7とローカルメモリ3との間でDMA転送を行う場合の処理の高速化を図ることができ、処理効率の向上を図ることが可能となる。
As described above, when data is transferred between the
キャッシュメモリ5は、メインメモリ7より高速にCPUコア2からアクセス可能な記憶素子を備えており、CPUコア2がメインメモリ7とデータを入出力する処理を高速化する。
また、キャッシュメモリ5は、DMAC4がローカルメモリ3とメインメモリ7との間でデータの転送を行う場合にデータの入出力を制御する。
The
The
ここで、キャッシュメモリの方式には種々のものがあるが、セット・アソシアティブ方式が一般的であるため、ここでは2ウェイ(ウェイA,B)のセット・アソシアティブ方式のキャッシュメモリを例に挙げて説明する。
なお、セット・アソシアティブ方式とは、キャッシュメモリを複数の領域(ウェイ)に分割し、それぞれのウェイに、メモリデバイス上の異なるアドレスのデータを格納しておくことにより、ヒット率を向上させることができる方式である。
Here, there are various cache memory systems, but since the set associative system is common, here, a 2-way (way A, B) set associative cache memory is taken as an example. explain.
In the set associative method, the hit ratio is improved by dividing the cache memory into a plurality of areas (way) and storing data of different addresses on the memory device in each way. This is a possible method.
図2は、キャッシュメモリ5の機能構成を示すブロック図である。
図2において、キャッシュメモリ5は、アクセス調停部10と、アクセス管理部20と、先読みキャッシュ部30と、タグ・テーブル40と、データ・メモリ50と、ヒット検出部60と、MUX70とを含んで構成される。
また、図3は、タグ・テーブル40およびデータ・メモリ50に記憶されるデータの構成を示す図であり、(a)はタグ・テーブル40内のデータの構成、(b)はデータ・メモリ50内のデータの構成を示している。
FIG. 2 is a block diagram showing a functional configuration of the
In FIG. 2, the
FIG. 3 is a diagram showing a configuration of data stored in the tag table 40 and the
以下、図2に基づいて、キャッシュメモリ5の構成を説明し、適宜、図3を参照することとする。なお、ここでは、キャッシュメモリ5が、2ウェイ(ウェイA,B)のセット・アソシアティブ方式である場合を想定している。
アクセス管理部20は、キャッシュメモリ5全体を制御するものであり、後述する状態遷移図に従うように、キャッシュメモリ5を動作させる。
Hereinafter, the configuration of the
The
例えば、アクセス管理部20は、CPUコア2あるいはDMAC4から入力された読み出し命令に基づいて、読み出し命令に示されたアドレスのデータが先読みキャッシュ部30に記憶されている場合には、そのアドレスに対応するデータをCPUコア2あるいはDMAC4に対して出力させると共に、引き続き読み出されるデータを予想し、予想したデータを先読みキャッシュ部30のプロセッサ先読みバッファ34あるいはDMA先読みバッファ35に記憶させる。
For example, when the data at the address indicated in the read command is stored in the
一方、読み出し命令に示されたアドレスのデータが先読みキャッシュ部30に記憶されていない場合、アクセス管理部20は、タグ・テーブル40を参照する。そして、そのアドレスがタグ・テーブル40に記憶されている場合、アクセス管理部20は、そのアドレスに対応するデータをデータ・メモリ50からプロセッサ先読みバッファ34あるいはDMA先読みバッファ35に記憶させる。
On the other hand, when the data at the address indicated in the read command is not stored in the
また、読み出し命令に示されたアドレスがタグ・テーブル40に記憶されていない場合、アクセス管理部20は、メインメモリ7にアクセスし、そのアドレスのデータを先読みキャッシュ部30の外部メモリ先読みバッファ36に記憶させる。
先読みキャッシュ部30は、CPUコア2あるいはDMAC4から入力された読み出し命令を受け取り、読み出し命令に示されたアドレスをアクセス管理部20に出力する。また、先読みキャッシュ部30は、アクセス管理部20の指示に従って、CPUコア2あるいはDMAC4によって読み出されると予想されたデータを、データ・メモリ50あるいはメインメモリ7から予め読み出して記憶し、CPUコア2あるいはDMAC4から実際に読み出された場合に、そのデータをCPUコア2あるいはDMAC4に出力する。
If the address indicated in the read command is not stored in the tag table 40, the
The
具体的には、先読みキャッシュ部30は、アドレス制御部31と、プロセッサ書き込みバッファ32と、DMA書き込みバッファ33と、プロセッサ先読みバッファ34と、DMA先読みバッファ35と、外部メモリ先読みバッファ36とを含んで構成される。
アドレス制御部31は、CPUコア2あるいはDMAC4から入力された読み出し命令あるいは書き込み命令から、読み出しあるいは書き込みの対象となっているデータのアドレスを取得し、アクセス管理部20に出力する。また、アドレス制御部31は、データ・メモリ50にキャッシュされているデータを読み出す際に、タグ・テーブル40およびデータ・メモリ50に読み出しあるいは書き込み対象のアドレスを出力したり、データ・メモリ50にキャッシュされていないデータをメインメモリ7から読み出す際に、読み出し対象のアドレスをメインメモリ7に出力したりする。
Specifically, the
The
なお、アドレス制御部31は、アクセス管理部20からデータの読み出し(先読み)が指示され、そのデータのアドレスがタグ・テーブル40に記憶されている場合には、データ・メモリ50の各ウェイのうち、そのデータが記憶されているウェイにのみアドレスを出力する。
そのため、不要なウェイへのアクセス回数を低減することができ、消費電力を低減することができると共に、処理効率の向上を実現することができる。
The
As a result, the number of accesses to unnecessary ways can be reduced, power consumption can be reduced, and processing efficiency can be improved.
プロセッサ書き込みバッファ32は、アクセス調停部10によって入力されたCPUコア2の書き込みデータを記憶する。
DMA書き込みバッファ33は、アクセス調停部10によって入力されたDMAC4の書き込みデータを記憶する。
なお、プロセッサ書き込みバッファ32およびDMA書き込みバッファ33に記憶されたデータは、これらのデータに関する書き込み命令が終了した場合に、データ・メモリ50およびメインメモリ7に転送される。
The processor write
The DMA write
Note that the data stored in the
プロセッサ先読みバッファ34は、データ・メモリ50から読み出されたデータを、MUX70を介して受け取り、CPUコア2に出力するデータとして記憶する。
DMA先読みバッファ35は、データ・メモリ50から読み出されたデータを、MUX70を介して受け取り、DMAC4に出力するデータとして記憶する。
外部メモリ先読みバッファ36は、メインメモリ7から読み出されたデータを受け取り、CPUコア2あるいはDMAC4に出力するデータとして記憶する。また、外部メモリ先読みバッファ36に記憶されたデータは、キャッシュメモリ5において処理が行われないクロックタイミングにデータ・メモリ50に格納される。
The processor prefetch buffer 34 receives the data read from the
The
The external
タグ・テーブル40は、図3(a)に示すように、各エントリ(0番〜511番、ただし、エントリ数N=512の場合)について、データ・メモリ50に記憶されたデータがキャッシュヒットしたか否かを示すフラグと、データ・メモリ50に記憶されたデータが記憶されているメインメモリ7上のアドレスとを記憶している。また、各エントリには、ウェイA,Bに対応するフラグおよびアドレスが記憶されている。タグ・テーブル40に記憶されているアドレスを参照することにより、データ・メモリ50のデータが、キャッシュにヒットしたか否かを判定することができる。
In the tag table 40, as shown in FIG. 3A, the data stored in the
データ・メモリ50は、各エントリについて、所定のメモリデバイスデータを記憶している。なお、データ・メモリ50は、4ワードを1ブロックとして取り扱い、データ・メモリ50からデータを読み出す場合には、エントリに含まれるいずれかのウェイの4ワード(w0〜w4)を1まとまりとして読み出すことが可能である。ただし、1ブロックにおける一部のワード(例えば、ワードw1〜w3)を読み出すことも可能である。
The
ヒット検出部60は、アドレス制御部31からタグ・テーブル40に対し、読み出し命令あるいは書き込み命令に示されたアドレスが入力された場合に、データ・メモリ50に記憶されているメモリデバイスデータがヒットしたか否かを検出する。具体的には、タグ・テーブル40に記憶されたアドレスそれぞれを参照し、アドレス制御部31から入力されたアドレスが検出されると、キャッシュがヒットしたものと判定する。そして、ヒット検出部60は、ヒットしたウェイを示す情報をMUX70に出力する。
The
MUX70は、ヒット検出部60からヒットしたウェイを示す情報を受け取り、データ・メモリ50の各ウェイの記憶領域からメモリデバイスデータを受け取る。そして、MUX70は、ヒット検出部60から入力されたウェイに対応するメモリデバイスデータを選択し、プロセッサ先読みバッファ34あるいはDMA先読みバッファ35に出力する。
次に、動作を説明する。
The
Next, the operation will be described.
情報処理装置1は、主としてアクセス管理部20の制御によって、所定の動作に対応する状態遷移を行う。
まず、情報処理装置1の基本的な動作について説明する。
なお、ここではCPUコア2あるいはDMAC4から読み出し命令が入力された場合について説明する。
The
First, the basic operation of the
Here, a case where a read command is input from the
情報処理装置1の基本的な動作においては、読み出し対象であるメモリデバイスデータの最後のワードのアドレスがプロセッサから出力されるタイミングで、タグ・テーブル40を参照し、引き続き読み出されると予想されるデータ(以下、「予定データ」と言う。)がキャッシュにヒットするか否かを検出(先読み)する。したがって、実際に読み出しあるいは書き込みが行われる可能性の高いデータについて、キャッシュを先読みすることができるため、先読みキャッシュ部30におけるデータのヒット率を向上させることができる。
In the basic operation of the
図4は、情報処理装置1の基本的な動作を示す状態遷移図である。
図4において、情報処理装置1は、状態S1〜S4を遷移し、それぞれの状態間を遷移するための遷移条件C1〜C12が定められている。
状態S1(ST-PRC-NORMAL)においては、予定データが、プロセッサ先読みバッファ34あるいはDMA先読みバッファ35に記憶されている場合(先読みキャッシュにヒットしている場合)に、そのデータをブロック単位でCPUコア2あるいはDMAC4に出力する。
FIG. 4 is a state transition diagram showing the basic operation of the
In FIG. 4, the
In the state S1 (ST-PRC-NORMAL), when the scheduled data is stored in the processor prefetch buffer 34 or the DMA prefetch buffer 35 (when the prefetch cache is hit), the data is transferred to the CPU in units of blocks. Output to
また、状態S1においては、予定データが、プロセッサ先読みバッファ34あるいはDMA先読みバッファ35に記憶されていない場合には、読み出し対象のアドレスに基づいて、タグ・テーブル40およびデータ・メモリ50にアクセスし、そのアドレスと一致するデータをデータ・メモリ50から読み込む状態(ST-PREREAD-ACTIVE)に移行する。
さらに、状態S1においては、メインメモリ7から読み込まれているデータのブロックのうち、末尾のワードの読み出しが完了するまでは、キャッシュのリード(データ・メモリ50の読み出し)を行わない。
In the state S1, when the scheduled data is not stored in the processor prefetch buffer 34 or the
Further, in the state S1, the cache reading (reading of the data memory 50) is not performed until the reading of the last word in the block of data read from the
状態S2(ST-PREREAD-ACTIVE)においては、予定データのアドレスに基づいて、タグ・テーブル40にのみアクセスし、タグ・テーブル40に記憶されたアドレスと一致(キャッシュにヒット)した場合、そのアドレスに対応するデータをデータ・メモリ50から読み出す。
状態S3(ST-CACHE-HIT-TEST)においては、タグ・テーブル40とデータ・メモリ50にアクセスし、予定データのアドレスがタグ・テーブル40のアドレスと一致するか否かを検出する。そして、状態S3においては、予定データのアドレスと一致したアドレスに対応するデータをデータ・メモリ50から読み出す。
In the state S2 (ST-PREREAD-ACTIVE), only the tag table 40 is accessed based on the address of the scheduled data, and if the address matches the address stored in the tag table 40 (cache hit), that address Is read from the
In the state S3 (ST-CACHE-HIT-TEST), the tag table 40 and the
状態S4(ST-EXMEM-ACCESS)においては、メインメモリ7を読み出すためのステートマシン“sm-exmem-access”(図5参照)を起動し、メインメモリ7を読み出す。状態S4から他の状態へ遷移するタイミングは、1ワードの読み込みが終了する時点であり、ステートマシン“sm-exmem-access”の動作の終了を待たない。即ち、他の状態においては、メインメモリ7の読み出しを待つためのウェイトサイクル(wait-cycle)が生ずる場合がある。
In the state S4 (ST-EXMEM-ACCESS), the state machine “sm-exmem-access” (see FIG. 5) for reading the
遷移条件C1(CND-PRA-START)は、状態S1において、読み込み対象であるデータの末尾のワード(16進数で表されたアドレスの末尾が“C”のワード)のアドレスが、CPUコア2あるいはDMAC4から入力されることを意味している。
遷移条件C2(CND-PRA-END)は、状態S2において、ウェイトサイクルが発生しなければ、次のサイクルで状態S1に戻ることを意味している。
In the transition condition C1 (CND-PRA-START), in the state S1, the address of the last word of the data to be read (the word whose hexadecimal address ends with “C”) is the
The transition condition C2 (CND-PRA-END) means that if no wait cycle occurs in the state S2, the state returns to the state S1 in the next cycle.
遷移条件C3(CND-CHT-START)は、状態S1において、予定データが、先読みキャッシュにヒットしない場合(プロセッサ先読みバッファ34あるいはDMA先読みバッファ35に記憶されていない場合)を意味している。
遷移条件C4(CND-CHT-CNT)は、状態S3を継続するための条件である。即ち、先読みキャッシュ部30に予定データが記憶されていないため、タグ・テーブル40およびデータ・メモリ50にアクセスしてキャッシュヒットを確認し続けるための条件である。なお、分岐命令について、分岐先のアドレスがブロックの末尾であり、かつ状態S3である場合には、次のサイクルでブロックの先頭のワードにアクセスすることから、連続して先読みキャッシュにヒットしない場合に、先読みキャッシュのミスヒットと判定される。
The transition condition C3 (CND-CHT-START) means that the scheduled data does not hit the prefetch cache in the state S1 (when it is not stored in the processor prefetch buffer 34 or the DMA prefetch buffer 35).
The transition condition C4 (CND-CHT-CNT) is a condition for continuing the state S3. In other words, since the scheduled data is not stored in the
遷移条件C5(CND-CHT-PRA)は、状態S3から状態S2へ遷移するための条件である。即ち、先読みキャッシュ部30に予定データが記憶されていないため、タグ・テーブル40およびデータ・メモリ50にアクセスしてキャッシュヒットを確認する状態から、タグ・テーブル40にのみアクセスし、キャッシュヒットを確認する状態へ遷移するための条件である。なお、分岐命令について、分岐先のアドレスがブロックの末尾から2番目(16進数で表されたアドレスの末尾が“8”のワード)であり、かつ状態S3である場合には、次のサイクルでブロックの末尾のデータにアクセスすることとなり、即ち、状態S2に遷移することとなるため、状態S1に戻ることなく、状態S2に直接遷移するものである。
The transition condition C5 (CND-CHT-PRA) is a condition for making a transition from the state S3 to the state S2. That is, since the scheduled data is not stored in the
遷移条件C6(CND-CHT-END)は、状態S3において、分岐先のアドレスがブロックの先頭および2番目(16進数で表されたアドレスの末尾が“0”あるいは“4”のワード)である場合に、先読みキャッシュにヒットしている状態であれば、状態S1に戻ることを意味している。
遷移条件C7(CND-EMA-START)は、状態S3において、キャッシュにヒットしない場合(データ・メモリ50に読み込み対象であるデータが記憶されていない場合)を意味している。
In the transition condition C6 (CND-CHT-END), in the state S3, the branch destination address is the head and the second of the block (the word whose hexadecimal address ends with “0” or “4”). In this case, if the prefetch cache is hit, it means that the process returns to the state S1.
The transition condition C7 (CND-EMA-START) means that the cache is not hit in the state S3 (when the data to be read is not stored in the data memory 50).
遷移条件C8(CND-PRA-EMA)は、状態S2において、キャッシュにヒットしない場合を意味している。
遷移条件C9(CND-PRA-CHT)は、状態S2において、先読みキャッシュにヒットしない場合を意味している。
遷移条件C10(CND-NORM-CNT)は、状態S1において、先読みキャッシュにヒットしている場合あるいはメインメモリ7にアクセスしている場合を意味している。
The transition condition C8 (CND-PRA-EMA) means a case where the cache is not hit in the state S2.
The transition condition C9 (CND-PRA-CHT) means a case where the prefetch cache is not hit in the state S2.
The transition condition C10 (CND-NORM-CNT) means a case where the prefetch cache is hit or the
遷移条件C11(CND-PRA-CNT)は、状態S2において、先読み処理を継続する場合を意味している。
遷移条件C12(CND-EMA-END)は、状態S4において、メインメモリ7へのアクセスが終了した場合を意味している。
次に、メインメモリ7を読み出すためのステートマシン“sm-exmem-access”について説明する。
The transition condition C11 (CND-PRA-CNT) means a case where the prefetch process is continued in the state S2.
The transition condition C12 (CND-EMA-END) means a case where access to the
Next, the state machine “sm-exmem-access” for reading the
図5は、情報処理装置1上に構築されるステートマシン“sm-exmem-access”の動作を示す状態遷移図である。
図5において、情報処理装置1は、状態T1〜T6を遷移する。
状態T1(ST-WAIT)においては、メインメモリ7へのアクセスを停止している。状態T1においては、所定のタイミングで、状態T2に移行する。
FIG. 5 is a state transition diagram showing the operation of the state machine “sm-exmem-access” constructed on the
In FIG. 5, the
In the state T1 (ST-WAIT), access to the
状態T2(ST-EXMEM-READ-1W-S)においては、読み出し対象であるデータの第1番目のワードをメインメモリ7から読み出し、読み出す処理が終了すると、状態T3に移行する。
状態T3(ST-EXMEM-READ-1W-E-2W-S)においては、読み出し対象であるデータの第2番目のワードをメインメモリ7から読み出し、読み出す処理が終了すると、状態T4に移行する。
In the state T2 (ST-EXMEM-READ-1W-S), when the first word of the data to be read is read from the
In the state T3 (ST-EXMEM-READ-1W-E-2W-S), when the second word of the data to be read is read from the
状態T4(ST-EXMEM-READ-2W-E-3W-S)においては、読み出し対象であるデータの第3番目のワードをメインメモリ7から読み出し、読み出す処理が終了すると、状態T5に移行する。
状態T5(ST-EXMEM-READ-3W-E-4W-S)においては、読み出し対象であるデータの第4番目のワードをメインメモリ7から読み出し、読み出す処理が終了すると、状態T6に移行する。
In the state T4 (ST-EXMEM-READ-2W-E-3W-S), when the third word of the data to be read is read from the
In the state T5 (ST-EXMEM-READ-3W-E-4W-S), when the fourth word of the data to be read is read from the
状態T6(ST-EXMEM-READ-4W-E)においては、読み出し対象であるデータの第4番目のワードをメインメモリ7から読み出す処理が終了することに対応して、状態T1に戻る。
図4および図5に示すように各状態を遷移する結果、情報処理装置1は、CPUコア2あるいはDMAC4によって読み出されるデータに応じて、具体的に以下のような動作を行う。
In the state T6 (ST-EXMEM-READ-4W-E), the process returns to the state T1 in response to the completion of the process of reading the fourth word of the data to be read from the
As a result of transitioning between the states as shown in FIGS. 4 and 5, the
まず、CPUコア2あるいはDMAC4によって読み出されるデータが、連続して先読みキャッシュにヒットする場合の例について説明する。
図6は、CPUコア2あるいはDMAC4によって読み出されるデータが、連続して先読みキャッシュにヒットする場合の動作例を示すタイミングチャートである。
図6においては、CPUコア2あるいはDMAC4によって、連続するアドレスのデータ(アドレス“A00〜A0C”、“A10〜A1C”および“A20〜A2C”のデータ)が読み出される場合を示している。なお、以下、アドレス“A00〜A0C”、“A10〜A1C”および“A20〜A2C”によって示されるデータをそれぞれ第1〜第3のデータと称する。
First, an example will be described in which data read by the
FIG. 6 is a timing chart showing an operation example when data read by the
FIG. 6 shows a case where data of continuous addresses (data of addresses “A00 to A0C”, “A10 to A1C”, and “A20 to A2C”) is read by the
図6において、第1のデータにおける末尾のワードのアドレス(アドレス“A0C”)がCPUコア2あるいはDMAC4から入力されるタイミング(サイクル“4”)で、予定データである第2のデータのアドレスがタグ・テーブル40の各ウェイに入力される。
すると、次のクロックタイミング(サイクル“5”)において、タグ・テーブル40の各ウェイに記憶されたアドレスが出力されると共に、それらのアドレスと第2のデータのアドレスとが一致するか否かが判定され、ここでは一致していることから、キャッシュにヒットしたことが検出される(C ACHE-HIT=1)。また、このとき、第2のデータのアドレスが、データ・メモリ50の第2のデータが記憶されている方のウェイ(ここでは、図6中に実線で示されているウェイAであるものとし、第2のデータが記憶されていないウェイBについては点線で示す。以下、同様である。)に入力される(WAYA-DATA-ADRS,WAYB-DATA-ADRS)。
In FIG. 6, the address of the last data in the first data (address “A0C”) is input from the
Then, at the next clock timing (cycle “5”), the addresses stored in the respective ways of the tag table 40 are output, and whether these addresses match the address of the second data or not. In this case, since they match, it is detected that the cache is hit (C ACHE-HIT = 1). At this time, the address of the second data is assumed to be the way in which the second data of the
そして、引き続くクロックタイミング(サイクル“6”)において、データ・メモリ50から、第2のデータを記憶しているウェイのデータ(WAYA-TAG-DATA,WAYB-TAG-DATA)が出力されると共に、ヒット検出部60から、いずれかのウェイを選択する情報(WAY-SELECT)が出力される。その結果、選択されたウェイのメモリデバイスデータ(データ“D10”)が、CPUコア2あるいはDMAC4に対して出力される(PBUS-RDDATA)。
At the subsequent clock timing (cycle “6”), the data of the way (WAYA-TAG-DATA, WAYB-TAG-DATA) storing the second data is output from the
即ち、サイクル“5”で行われたCPUコア2あるいはDMAC4からの読み出し命令に対し、情報処理装置1は、対応するメモリデバイスデータをサイクル“6”で出力している。
また、情報処理装置1においては、メモリデバイスデータをブロック単位で読み出すことができるため、データ“D10”を読み出すことにより、同じブロックの他のデータ(データ“D14”〜“D1C”)もまとめて読み出され、プロセッサ先読みバッファ34に記憶される。その結果、データ“D10”に引き続く3ワードは、それぞれを読み出すためにタグ・テーブル40およびデータ・メモリ50にアクセスすることなく、データ“D10”に連続して、プロセッサ先読みバッファ34からCPUコア2あるいはDMAC4に出力されることとなる。
That is, in response to a read command from the
In the
なお、情報処理装置1は、第2のデータをCPUコア2あるいはDMAC4に出力しながら、上述のような処理によって第3のデータを先読みし、同様にCPUコア2あるいはDMAC4に出力する。
次に、CPUコア2あるいはDMAC4によって読み出されるデータが、先読みキャッシュにヒットしない場合の例について説明する。
Note that the
Next, an example in which data read by the
図7は、CPUコア2あるいはDMAC4によって読み出されるデータが、先読みキャッシュにヒットしない場合の動作例を示すタイミングチャートである。なお、図7におけるデータ名や信号名等は、図6における場合と同様である。
図7において、サイクル“6”までの動作は、図6に示すサイクル“6”までの動作とほぼ同様である。ただし、サイクル“5”で読み出される第2のデータの先頭ワードは分岐命令であり、その命令はサイクル“6”で実行される。
FIG. 7 is a timing chart showing an operation example when data read by the
In FIG. 7, the operation up to cycle “6” is almost the same as the operation up to cycle “6” shown in FIG. However, the first word of the second data read in cycle “5” is a branch instruction, and the instruction is executed in cycle “6”.
そして、サイクル“7”において、分岐先であるアドレス“A44”のデータは、プロセッサ先読みバッファ34あるいはDMA先読みバッファ35に記憶されていないことから、先読みキャッシュにヒットしないことが検出される(PRC-HIT=0)。このとき、情報処理装置1は、ノーウェイトでデータの供給を行うため、次のサイクルでアドレス“A44”に対応するメモリデバイスデータ“D44”を出力するべく、タグ・テーブル40およびデータ・メモリ50の各ウェイに、アドレス“A44”のワードを含むブロック(以下、「分岐先データ」と言う。)のアドレスを出力する。
In cycle “7”, since the data of the branch destination address “A44” is not stored in the processor prefetch buffer 34 or the
そして、サイクル“8”において、タグ・テーブル40から、各ウェイに記憶されたアドレス(WAYA-TAG-DATA,WAYB-TAG-DATA)が出力されると共に、データ・メモリ50から、各ウェイのデータ(WAYA-TAG-DATA,WAYB-TAG-DATA)が出力される。このとき、タグ・テーブル40の各ウェイに記憶されたアドレスと、分岐先データのアドレスとが一致することから、キャッシュにヒットしたことが検出される(CACHE-HIT=1)。さらに、ヒット検出部60から、いずれかのウェイを選択する情報(WAY-SELECT)が出力される。その結果、選択されたウェイのメモリデバイスデータ(データ“D44”)がCPUコア2あるいはDMAC4に対して出力される(PBUS-RDDATA)。
In cycle “8”, the address (WAYA-TAG-DATA, WAYB-TAG-DATA) stored in each way is output from the tag table 40 and the data of each way is output from the
即ち、サイクル“7”で行われたプロセッサからの分岐先の読み出し命令に対し、情報処理装置1は、対応するメモリデバイスデータをサイクル“8”で出力している。
ここで、分岐先であるアドレス“A44”は、ブロックの第2番目のワードであることから、情報処理装置1においては、そのブロックの第2番目から第4番目のワード(アドレス“A44〜”A4C“のワード)がまとめて読み出され、プロセッサ先読みバッファ34あるいはDMA先読みバッファ35に記憶される。
That is, in response to the branch destination read instruction from the processor executed in cycle “7”, the
Here, since the branch destination address “A44” is the second word of the block, in the
この後、情報処理装置1は、図6における処理と同様に、分岐先データをCPUコア2あるいはDMAC4に出力する。
次に、CPUコア2あるいはDMAC4によって読み出されるデータが、先読みキャッシュにもキャッシュにもヒットしない場合の例について説明する。
図8は、CPUコア2あるいはDMAC4によって読み出されるデータが、先読みキャッシュにもキャッシュにもヒットしない場合の動作例を示すタイミングチャートである。なお、図8におけるデータ名や信号名等は、図6における場合と同様である。
Thereafter, the
Next, an example in which data read by the
FIG. 8 is a timing chart showing an operation example when data read by the
図8において、サイクル“7”までの動作は、図7に示すサイクル“7”までの動作と同様である。
そして、サイクル“8”において、タグ・テーブル40から、各ウェイに記憶されたアドレス(WAYA-TAG-DATA,WAYB-TAG-DATA)が出力されると共に、データ・メモリ50から、各ウェイのデータ(WAYA-TAG-DATA,WAYB-TAG-DATA)が出力される。このとき、タグ・テーブル40の各ウェイに記憶されたアドレスと、分岐先データのアドレスとが一致しないことから、キャッシュにヒットしないことが検出される(CACHE-HIT=0)。
In FIG. 8, the operation up to cycle “7” is the same as the operation up to cycle “7” shown in FIG.
In cycle “8”, the address (WAYA-TAG-DATA, WAYB-TAG-DATA) stored in each way is output from the tag table 40 and the data of each way is output from the
すると、アドレス“A44”のデータが読み出せないことから、情報処理装置1は、メインメモリ7からデータを読み出す。そのため、メインメモリ7からデータが取り込めるまでの3サイクル分、ウェイトサイクルが発生する。
なお、情報処理装置1は、メインメモリ7から取り込んだ分岐先データを外部メモリ先読みバッファ36に順次記憶する。このとき、メインメモリ7からデータを取り込むためには、キャッシュの場合と異なり、1ワードにつき2サイクルを要している(データ“D44〜D48”)。そして、情報処理装置1は、分岐先データを外部メモリ先読みバッファ36に記憶した後には、図6における処理と同様に、引き続くデータを先読みし、同様にCPUコア2あるいはDMAC4に出力する。また、外部メモリ先読みバッファ36に記憶された分岐先データは、データ・メモリ50へのアクセスが行われていないタイミングで、データ・メモリ50にキャッシュされる。さらに、外部メモリ先読みバッファ36にメインメモリ7から取り込んだデータが記憶されている状態で、そのデータに対する読み出し命令がCPUコア2あるいはDMAC4から入力された場合、外部メモリ先読みバッファ36に記憶されたデータが、CPUコア2あるいはDMAC4に出力される。
Then, since the data of the address “A44” cannot be read, the
The
次に、CPUコア2あるいはDMAC4によって読み出されるデータが、連続するアドレスのデータであるにもかかわらず、先読みが行えない場合(キャッシュにヒットしない場合)の例について説明する。なお、このような場合には、予定データをメインメモリ7から取り込む必要がある。
図9は、CPUコア2あるいはDMAC4によって読み出されるデータが、連続するアドレスのデータであるにもかからず、キャッシュにヒットしない場合の動作例を示すタイミングチャートである。なお、図9におけるデータ名や信号名等は、図6における場合と同様である。
Next, an example will be described in which the data read by the
FIG. 9 is a timing chart showing an operation example when the data read by the
図9において、サイクル“4〜5”の動作は、図8に示すサイクル“6〜7”の動作とほぼ同様である。ただし、図9の場合、キャッシュにヒットしないことが検出されるサイクル“5”において、メインメモリ7へのアクセスを直ちに開始している。
そして、メインメモリ7へのアクセスを行ってから3サイクルの後(サイクル“8”)、メインメモリ7から予定データの各ワードが順次取り込まれる。
In FIG. 9, the operation of cycles “4 to 5” is almost the same as the operation of cycles “6 to 7” shown in FIG. However, in the case of FIG. 9, the access to the
Then, after three cycles after accessing the main memory 7 (cycle “8”), each word of the scheduled data is sequentially fetched from the
即ち、CPUコア2あるいはDMAC4から読み出し対象となるデータのアドレス(アドレス“A10”)が入力されるサイクル“5”に対し、3サイクル後にメインメモリ7のデータがCPUコア2あるいはDMAC4に出力されることとなる。
この結果、従来のように、CPUコア2あるいはDMAC4から読み出し対象となるデータのアドレスが入力されてから、キャッシュにヒットするか否かを検出する場合に比べ、1サイクル早いタイミングでメインメモリ7のデータを取り込むことが可能となる。つまり、従来の方法では、CPUコア2あるいはDMAC4から読み出し命令が入力されてから、CPUコア2あるいはDMAC4にデータが出力されるまで4サイクルを要していたが、図9においては、3サイクルに短縮されている。
That is, the data in the
As a result, as compared with the conventional case, when the address of the data to be read is input from the
なお、図4〜図9の説明においては、予定データがキャッシュにヒットするか否かを検出(先読み)するタイミングを、読み出し対象であるメモリデバイスデータの最後のワードのアドレスがCPUコア2あるいはDMAC4から出力されるタイミングであるものとして説明したが、読み出し対象であるメモリデバイスデータの先頭のワードのアドレスがプロセッサから入力されるタイミングで先読みを行うこととしても良い。この場合、先読みしたデータが実際にCPUコア2あるいはDMAC4から読み出される確率が低下するものの、キャッシュにヒットしない場合にウェイトサイクルのペナルティを軽減できる。
In the description of FIG. 4 to FIG. 9, the timing for detecting whether or not the scheduled data hits the cache (prefetching), the address of the last word of the memory device data to be read is the
以下、読み出し対象であるメモリデバイスデータの先頭のワードのアドレスがCPUコア2あるいはDMAC4から入力されるタイミングで先読みを行う場合(以下、「先行先読み処理」と言う。)の動作について説明する。
図10は、先行先読み処理の動作を示す状態遷移図である。
図10において、情報処理装置1は、状態P1〜P4および状態P5,6を遷移し、それぞれの状態間を遷移するための遷移条件G1〜G14が定められている。
Hereinafter, an operation when prefetching is performed at the timing when the address of the first word of the memory device data to be read is input from the
FIG. 10 is a state transition diagram showing the operation of the prefetching process.
In FIG. 10, the
なお、図10における状態P1〜P4および遷移条件G2〜G12は、図4における状態S1〜S4および遷移条件C2〜C12とそれぞれ同様であるため説明を省略し、異なる部分についてのみ説明する。
状態P5(ST-PREREAD-IDLE)は、タイミングを遅らせるためのアイドル状態である。即ち、ブロックの先頭のワードのアドレスがCPUコア2あるいはDMAC4から入力されるタイミングで先読みを行う場合、読み出し対象となるデータをプロセッサ先読みバッファ34あるいはDMA先読みバッファ35に取り込むタイミングが早すぎてしまう“ずれ”を解消するために、一定サイクルのアイドル状態が挿入されるものである。
Note that states P1 to P4 and transition conditions G2 to G12 in FIG. 10 are the same as states S1 to S4 and transition conditions C2 to C12 in FIG.
The state P5 (ST-PREREAD-IDLE) is an idle state for delaying the timing. That is, when prefetching is performed at the timing when the address of the first word of the block is input from the
状態P6(ST-PREREAD-EXE)においては、データ・メモリ50からプロセッサ先読みバッファ34あるいはDMA先読みバッファ35にデータが転送される。
遷移条件G1(CND-PRA-F-START)は、状態P1において、読み込み対象であるデータの先頭のワード(16進数で表されたアドレスの末尾が“0”のワード)のアドレスが、CPUコア2あるいはDMAC4から入力されることを意味している。
In the state P6 (ST-PREREAD-EXE), data is transferred from the
In the transition condition G1 (CND-PRA-F-START), in the state P1, the address of the first word of the data to be read (the word whose address is expressed as a hexadecimal number with “0” at the end) is the CPU core. 2 or DMAC4.
遷移条件G13(CND-PRA-READ-START)は、状態P5において、読み込み対象であるデータの末尾のワード(16進数で表されたアドレスの末尾が“C”のワード)のアドレスが、プロセッサから入力されることを意味している。
遷移条件G14(CND-PRA-READ-END)は、データ・メモリ50からプロセッサ先読みバッファ34あるいはDMA先読みバッファ35へのデータの転送が終了することを意味している。
In the transition condition G13 (CND-PRA-READ-START), in the state P5, the address of the last word of the data to be read (the word with the end of the address represented by the hexadecimal number “C”) is sent from the processor. It means that it is input.
The transition condition G14 (CND-PRA-READ-END) means that data transfer from the
図10に示すように各状態を遷移する結果、情報処理装置1は、例えば、上述の図6〜図9に対応する動作を行う。
なお、図4〜図10の説明においては、読み出し命令の場合の動作について説明したが、書き込み命令が入力された場合にも、プロセッサ書き込みバッファ32あるいはDMA書き込みバッファ33が用いられる点を除き、ほぼ同様の動作となるため、ここでは説明を省略する。
As a result of the transition of each state as illustrated in FIG. 10, the
In the description of FIGS. 4 to 10, the operation in the case of a read command has been described. However, even when a write command is input, the
以上のように、本実施の形態に係る情報処理装置1は、ローカルメモリ3とメインメモリ7との間でCPUコア2を介さずにデータの転送を行う場合にも、キャッシュメモリ3を介してデータの転送が行われる。キャッシュメモリ3においては、読み出し対象であるデータがCPUコア2あるいはDMAC4から読み出されている際に、引き続いて読み出されると予想されるデータがキャッシュされているか否か(データ・メモリ50に記憶されているか否か)を検出する。そして、キャッシュメモリ3は、引き続いて読み出されると予想されるデータがキャッシュに記憶されている場合、そのデータを先読みキャッシュ部30に記憶し、引き続いて読み出されると予想されるデータがキャッシュに記憶されていない場合、そのデータをメインメモリ7から読み出し、先読みキャッシュ部30に記憶する。その後、引き続くサイクルでCPUコア2あるいはDMAC4から実際に読み出されたデータのアドレスが、先読みキャッシュ部30に記憶されたデータのアドレスと一致する場合、そのデータを先読みキャッシュ部30からCPUコア2あるいはDMAC4に出力する。なお、引き続くサイクルでプロセッサから実際に読み出されたデータのアドレスが、先読みキャッシュ部30に記憶されたデータのアドレスと一致しない場合には、その時点でメインメモリ7にアクセスする。
As described above, the
そのため、DMAC4から読み出しあるいは書き込み対象であるデータのアドレスが入力された場合に、キャッシュメモリ3は、タグ・テーブル40およびデータ・メモリ50の各ウェイに常にはアクセスする必要がなく、データ・メモリ50に読み出しあるいは書き込み対象であるデータが記憶されている場合にのみアクセスすれば足りる。
したがって、CPUコア2を介することなくローカルメモリ3とメインメモリ7との間でデータ転送を行う場合に、キャッシュメモリ3に記憶されたデータとのコヒーレンシを保証しつつ、消費電力の増加、あるいは、処理効率の低下を防止することが可能となる。
Therefore, when the address of data to be read or written is input from the
Therefore, when data is transferred between the
また、情報処理装置1は、読み出し対象であるデータの末尾のワードのアドレスが入力されているタイミングで、予定データの先読みを行う。
したがって、引き続くサイクルで読み出される確率の高いデータを先読みキャッシュ部30に記憶しておくことができるため、無駄なデータに対するアクセスを行う事態を低減でき、消費電力の低減を図ることができる。
In addition, the
Therefore, since data having a high probability of being read in the subsequent cycle can be stored in the
一方、情報処理装置1は、読み出し対象であるデータの先頭のワードのアドレスが入力されるタイミング等、末尾のワードのアドレスが入力されるタイミングより早く予定データの先読みを行うことも可能である。
この場合、より早いタイミングでキャッシュのヒットが検出されるため、キャッシュにヒットしない場合に、メインメモリ7から読み出し対象であるデータを読み込む処理をより早く行うことができ、ウェイトサイクルの発生を防止すること、あるいは、ウェイトサイクルの回数を低減することが可能となる。
On the other hand, the
In this case, since a cache hit is detected at an earlier timing, the process of reading the data to be read from the
なお、情報処理装置1において、クロックゲーティング機能を備えることにより、さらに消費電力を低減することが可能である。
図11は、情報処理装置1がクロックゲーティング機能を備える場合の構成を示す図である。
図11において、情報処理装置1は、図2に示す構成に加え、消費電力制御部80を含んで構成される。
Note that the
FIG. 11 is a diagram illustrating a configuration when the
11, the
消費電力制御部80は、情報処理装置1において動作を行わない部分に対し、クロック信号の供給を停止させる機能を備えている。
図12は、消費電力制御部80の構成を示す図である。
図12において、消費電力制御部80は、複数n個のメモリそれぞれに対応するクロックゲーティング素子(以下、「CG素子」と言う。)71−1〜71−nを含んで構成される。
The power
FIG. 12 is a diagram illustrating a configuration of the power
In FIG. 12, the power
これらのCG素子81−1〜81−nには、アクセス管理部20から、クロック信号の供給を行うか否かを切り替えるための消費電力モード信号SG1〜SGnがそれぞれ入力される。アクセス管理部20は、動作が不要であると判定されたメモリに対してはクロック信号の供給を停止させる消費電力モード信号を出力し、動作を行うと判定されたメモリに対してはクロック信号を供給する消費電力モード信号を出力する。
These CG elements 81-1 to 81-n receive power consumption mode signals SG1 to SGn for switching whether or not to supply a clock signal from the
このような構成とすることにより、先読みキャッシュ部30に読み込むデータが記憶されているデータ・メモリ50のウェイに対してのみクロック信号を供給するといったことが可能となり、さらに消費電力の低減を図ることができる。
With this configuration, it is possible to supply a clock signal only to the way of the
1 情報処理装置、1A データ転送装置、2 CPUコア、3 ローカルメモリ、4 DMAC、5 キャッシュメモリ、6 メモリI/F、7 メインメモリ、10 アクセス調停部、20 アクセス管理部、30 先読みキャッシュ部、31 アドレス制御部、32 プロセッサ書き込みバッファ、33 DMA書き込みバッファ、34 プロセッサ先読みバッファ、35 DMA先読みバッファ、36 外部メモリ先読みバッファ、40 タグ・テーブル、50 データ・メモリ、60 ヒット検出部、70 MUX、80 消費電力制御部、81 CG素子 1 Information processing device, 1A data transfer device, 2 CPU core, 3 local memory, 4 DMAC, 5 cache memory, 6 memory I / F, 7 main memory, 10 access arbitration unit, 20 access management unit, 30 prefetch cache unit, 31 address control unit, 32 processor write buffer, 33 DMA write buffer, 34 processor prefetch buffer, 35 DMA prefetch buffer, 36 external memory prefetch buffer, 40 tag table, 50 data memory, 60 hit detection unit, 70 MUX, 80 Power consumption control unit, 81 CG element
Claims (12)
前記第1のメモリから前記第2のメモリへのデータの読み出し命令あるいは前記第2のメモリから前記第1のメモリへのデータの書き込み命令の少なくともいずれかを、前記キャッシュメモリに出力することにより、前記第1のメモリと前記第2のメモリとの間で前記プロセッサを介さずにデータ転送を行うアクセス制御手段と、
前記アクセス制御手段が読み出しあるいは書き込みを行っているアクセス中データの後にアクセスされると予想される予定データが、前記キャッシュメモリのいずれかのウェイにキャッシュされているか否かを判定するキャッシュ判定手段と、
前記キャッシュ判定手段によって、前記予定データがいずれかのウェイにキャッシュされていると判定された場合に、前記複数のウェイのうち、該予定データが記憶されているウェイにアクセスし、該予定データを読み出して記憶する先読みキャッシュ手段と、
を含み、
前記先読みキャッシュ手段は、前記アクセス中データの後に前記予定データ対象とする読み出し命令が入力された場合、記憶している予定データを前記アクセス制御手段に出力し、前記アクセス中データの後に前記予定データを対象とする書き込み命令が入力された場合、該予定データに対して書き込みを行うことを特徴とするデータ転送装置。 A first memory provided outside the processor, and provided between the first memory and the processor, and caches at least a part of data stored in the first memory in a plurality of ways. A data transfer device including a cache memory capable of being accessed and a second memory accessible by the processor at a higher speed than the first memory,
By outputting to the cache memory at least one of a data read command from the first memory to the second memory or a data write command from the second memory to the first memory, Access control means for transferring data between the first memory and the second memory without going through the processor;
Cache determination means for determining whether or not scheduled data expected to be accessed after in-access data being read or written by the access control means is cached in any way of the cache memory; ,
When the cache determination means determines that the scheduled data is cached in any way, the way in which the scheduled data is stored is accessed from among the plurality of ways, and the scheduled data is Prefetch cache means for reading and storing;
Including
The read-ahead cache means outputs the stored scheduled data to the access control means when the read command for the scheduled data is input after the accessed data, and the scheduled data after the accessed data A data transfer device that writes data to the scheduled data when a write command for the target is input.
前記キャッシュ判定手段は、前記アドレス記憶手段のいずれかのウェイに、前記予定データのアドレスが記憶されているか否かによって、該予定データがキャッシュされているか否かを判定し、
前記先読みキャッシュ手段は、前記データ記憶手段の複数のウェイのうち、前記予定データのアドレスを記憶している前記アドレス記憶手段のウェイに対応するウェイにアクセスすることを特徴とする請求項1記載のデータ転送装置。 The cache memory includes, for the plurality of ways, address storage means for storing cached data addresses, and data storage means for storing data corresponding to each of the addresses,
The cache determination means determines whether the schedule data is cached by determining whether the address of the schedule data is stored in any way of the address storage means,
2. The prefetch cache unit accesses a way corresponding to a way of the address storage unit storing an address of the scheduled data among a plurality of ways of the data storage unit. Data transfer device.
前記第1のメモリから前記第2のメモリへのデータの読み出し命令あるいは前記第2のメモリから前記第1のメモリへのデータの書き込み命令の少なくともいずれかを、前記キャッシュメモリに出力することにより、前記第1のメモリと前記第2のメモリとの間で前記プロセッサを介さずにデータ転送を行うアクセス制御ステップと、
前記アクセス制御ステップにおいて読み出しあるいは書き込みが行われているアクセス中データの後にアクセスされると予想される予定データが、前記キャッシュメモリのいずれかのウェイにキャッシュされているか否かを判定するキャッシュ判定ステップと、
前記キャッシュ判定ステップにおいて、前記予定データがいずれかのウェイにキャッシュされていると判定された場合に、前記複数のウェイのうち、該予定データが記憶されているウェイにアクセスし、該予定データを読み出して記憶する先読みキャッシュステップと、
前記アクセス中データの後に前記予定データを対象とする読み出し命令が発行された場合、記憶している予定データを読み出させ、前記アクセス中データの後に前記予定データを対象とする書き込み命令が発行された場合、該予定データに対して書き込みを行うことを特徴とするデータ転送方法。 A first memory provided outside the processor, and provided between the first memory and the processor, and caches at least a part of data stored in the first memory in a plurality of ways. A data transfer method between a cache memory capable of being accessed and a second memory accessible by the processor at a higher speed than the first memory,
By outputting to the cache memory at least one of a data read command from the first memory to the second memory or a data write command from the second memory to the first memory, An access control step for transferring data between the first memory and the second memory without going through the processor;
Cache determination step for determining whether or not the scheduled data that is expected to be accessed after the in-access data being read or written in the access control step is cached in any way of the cache memory When,
In the cache determination step, when it is determined that the scheduled data is cached in any way, the way in which the scheduled data is stored is accessed from among the plurality of ways, and the scheduled data is A read-ahead cache step for reading and storing;
When a read command for the scheduled data is issued after the accessing data, the stored scheduled data is read, and a write command for the scheduled data is issued after the accessing data A data transfer method comprising: writing to the scheduled data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004330088A JP2006139646A (en) | 2004-11-15 | 2004-11-15 | Data transfer device and data transfer method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004330088A JP2006139646A (en) | 2004-11-15 | 2004-11-15 | Data transfer device and data transfer method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2006139646A true JP2006139646A (en) | 2006-06-01 |
Family
ID=36620423
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004330088A Withdrawn JP2006139646A (en) | 2004-11-15 | 2004-11-15 | Data transfer device and data transfer method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2006139646A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20190112020A (en) * | 2017-02-08 | 2019-10-02 | 에이알엠 리미티드 | Data processing |
-
2004
- 2004-11-15 JP JP2004330088A patent/JP2006139646A/en not_active Withdrawn
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20190112020A (en) * | 2017-02-08 | 2019-10-02 | 에이알엠 리미티드 | Data processing |
JP2020514878A (en) * | 2017-02-08 | 2020-05-21 | エイアールエム リミテッド | Data processing |
JP7089530B2 (en) | 2017-02-08 | 2022-06-22 | アーム・リミテッド | Data processing |
KR102526431B1 (en) | 2017-02-08 | 2023-04-27 | 에이알엠 리미티드 | data processing |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5417879B2 (en) | Cache device | |
US20050086435A1 (en) | Cache memory controlling apparatus, information processing apparatus and method for control of cache memory | |
US5423016A (en) | Block buffer for instruction/operand caches | |
US11157411B2 (en) | Information handling system with immediate scheduling of load operations | |
US8190825B2 (en) | Arithmetic processing apparatus and method of controlling the same | |
JP2003504757A (en) | Buffering system bus for external memory access | |
JP2007213578A (en) | Data-cache miss prediction and scheduling | |
JP2000339157A (en) | Cache memory controller and computer system | |
US8195880B2 (en) | Information handling system with immediate scheduling of load operations in a dual-bank cache with dual dispatch into write/read data flow | |
JP2005276199A (en) | Method to provide cache management command for dma controller | |
JP5444889B2 (en) | Arithmetic processing device and control method of arithmetic processing device | |
JP2004171177A (en) | Cache system and cache memory controller | |
JP2009053820A (en) | Hierarchal cache memory system | |
JP2008107983A (en) | Cache memory | |
KR20060102565A (en) | System and method for canceling write back operation during simultaneous snoop push or snoop kill operation in write back caches | |
JP5159258B2 (en) | Arithmetic processing unit | |
KR100710922B1 (en) | Set-associative cache-management method using parallel reads and serial reads initiated while processor is waited | |
JP5157424B2 (en) | Cache memory system and cache memory control method | |
JP2003140965A (en) | Distributed shared memory type parallel computer and instruction scheduling method | |
JP4173858B2 (en) | Instruction cache and method for reducing memory contention | |
US8140756B2 (en) | Information handling system with immediate scheduling of load operations and fine-grained access to cache memory | |
US20100268890A1 (en) | Information handling system with immediate scheduling of load operations in a dual-bank cache with single dispatch into write/read data flow | |
US6976130B2 (en) | Cache controller unit architecture and applied method | |
JP4374956B2 (en) | Cache memory control device and cache memory control method | |
JPH1055276A (en) | Multi-level branching prediction method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20070403 |
|
A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20080205 |