JP2008112324A - Data transfer method and data transfer device - Google Patents
Data transfer method and data transfer device Download PDFInfo
- Publication number
- JP2008112324A JP2008112324A JP2006295178A JP2006295178A JP2008112324A JP 2008112324 A JP2008112324 A JP 2008112324A JP 2006295178 A JP2006295178 A JP 2006295178A JP 2006295178 A JP2006295178 A JP 2006295178A JP 2008112324 A JP2008112324 A JP 2008112324A
- Authority
- JP
- Japan
- Prior art keywords
- data
- pci
- block
- stored
- buffer memory
- 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.)
- Pending
Links
Images
Abstract
Description
本発明は、PCIバスを介してデータを転送するデータ転送方法およびデータ転送装置に関する。 The present invention relates to a data transfer method and a data transfer apparatus for transferring data via a PCI bus.
パーソナルコンピュータ等にはPCI(Peripheral Component Interconnect )バスが設置されている。近年のデジタル技術の発展に伴って処理されるデータの量が大きくなり、その処理速度を向上させる技術の必要性が大きくなってきている。そこで、PCIバス上でデータ転送速度を向上させる様々な技術が提案されている(例えば、特許文献1参照。)。 A personal computer or the like is provided with a PCI (Peripheral Component Interconnect) bus. With the recent development of digital technology, the amount of data to be processed has increased, and the need for technology to improve the processing speed has increased. Therefore, various techniques for improving the data transfer speed on the PCI bus have been proposed (see, for example, Patent Document 1).
特許文献1には、バス全体にわたるレイテンシをできる限り小さくしてデータ転送速度を向上させるデータ制御装置が記載されている。特許文献1に記載されているデータ転送制御装置は、アクセス頻度の高いアドレスの情報をプリセットアドレスとして保持し、そのデータを周期的に読み出す。その結果、データ転送装置は、データ転送速度をある程度向上させることができる。
PCIバスのリード転送において、PCIマスタがメモリーリードライン(Memory Read Line)などのPCIバスコマンドを用いてプリフェッチ・リードを実行し、転送性能を上げようとするような制御が行われることがある。その際、PCIマスタおよびPCIスレーブのデータバッファの大きさの違いから、PCIバス上に無駄なサイクル(例えば、リトライサイクルやウェイトサイクル)が実行される。図8は、マスタデバイスおよびスレーブ(ターゲット)デバイスによるデータ転送方法の処理を簡略化して示すシーケンス図である。なお、ここでは、マスタデバイス(以下、PCIマスタという。)が32バイトのデータを読み出そうとしている場合について説明する。また、スレーブデバイス(以下、PCIスレーブという。)が有するバッファメモリのサイズ(バッファサイズ)は16バイトであるとする。また、PCIマスタが有するバッファメモリのサイズは8バイトであるとする。 In PCI bus read transfer, control may be performed in which the PCI master performs prefetch read using a PCI bus command such as a memory read line to improve transfer performance. At that time, a useless cycle (for example, a retry cycle or a wait cycle) is executed on the PCI bus due to the difference in the size of the data buffer between the PCI master and the PCI slave. FIG. 8 is a sequence diagram showing a simplified process of the data transfer method by the master device and the slave (target) device. Here, a case where a master device (hereinafter referred to as a PCI master) is about to read 32-byte data will be described. Further, it is assumed that the size (buffer size) of the buffer memory included in the slave device (hereinafter referred to as PCI slave) is 16 bytes. The size of the buffer memory included in the PCI master is assumed to be 8 bytes.
PCIスレーブがデータを読み出すメモリのデータをPCIマスタが必要とする場合に、PCIマスタは、PCIスレーブに対してリード要求(PCIリード1)を出力する(ステップS801)。 When the PCI master needs data in the memory from which the PCI slave reads data, the PCI master outputs a read request (PCI read 1) to the PCI slave (step S801).
PCIスレーブは、メモリからデータを読み出す処理(メモリ読み出し1)を実行する(ステップS802)。PCIスレーブはすぐにメモリからデータを読み出すことができない。したがって、PCIマスタにすぐにデータを出力できない。そこで、PCIスレーブは、リトライ応答(リトライ応答1)をする(ステップS803)。 The PCI slave executes a process of reading data from the memory (memory read 1) (step S802). PCI slaves cannot read data from memory immediately. Therefore, data cannot be output immediately to the PCI master. Therefore, the PCI slave makes a retry response (retry response 1) (step S803).
PCIスレーブは、メモリからデータを読み出し(読み出しデータ1)、更に、次のデータの読み出し処理(メモリ読み出し2プリフェッチ)を実行する(ステップS804)。PCIスレーブがメモリから読み出してくるデータ量は、PCIスレーブが有するバッファサイズ(この例では16バイト)に依存する。なお、PCIスレーブは複数のバッファを有することもあるが、図8に示す例では、PCIスレーブが有しているバッファは1つであるとする。 The PCI slave reads data from the memory (read data 1), and further executes a next data read process (memory read 2 prefetch) (step S804). The amount of data read from the memory by the PCI slave depends on the buffer size (16 bytes in this example) of the PCI slave. Although the PCI slave may have a plurality of buffers, in the example shown in FIG. 8, it is assumed that the PCI slave has one buffer.
PCIマスタは、数サイクル後に再度PCIリード要求コマンド(PCIリード1再要求)をPCIスレーブに出力する(ステップS805)。PCIスレーブがメモリからのデータの読み出しを完了した後(すなわち、データ転送の準備ができた後)にPCIリード再要求があれば、PCIスレーブは、PCIマスタにデータを転送(データ転送1)する(ステップS806)。PCIマスタは、自身が持っているバッファサイズ分のデータを受け取るとデータ転送を終了する。 The PCI master again outputs a PCI read request command (PCI read 1 re-request) to the PCI slave after several cycles (step S805). If there is a PCI read re-request after the PCI slave completes reading of data from the memory (that is, ready for data transfer), the PCI slave transfers the data to the PCI master (data transfer 1). (Step S806). When the PCI master receives data corresponding to the buffer size of the PCI master, the PCI master ends the data transfer.
PCIマスタは、続くデータを要求するためにPCIリード要求コマンド(PCIリード2)を出力する(ステップS807)。そして、ステップS801〜806と同様の処理が実行される。 The PCI master outputs a PCI read request command (PCI read 2) to request subsequent data (step S807). And the process similar to step S801-806 is performed.
例えば、図8に示されている例では、PCIマスタは、PCIリード要求コマンド(PCIリード1)を出力した後、8バイトのデータしか受けとらない。通常のPCIスレーブは、バッファメモリに格納したデータのメモリにおけるアドレスを管理していないため、PCIリード要求2を新たな要求として受け付ける。よって、PCIスレーブは、バッファメモリに残っている8バイトと同じデータを再度読み出す(ステップS808)。したがって、PCIスレーブが32バイトのデータを転送するためには、ステップS801〜806と同様の処理が4回実行されなければならない。 For example, in the example shown in FIG. 8, the PCI master receives only 8 bytes of data after outputting the PCI read request command (PCI read 1). Since a normal PCI slave does not manage the address of the data stored in the buffer memory, it accepts the PCI read request 2 as a new request. Therefore, the PCI slave reads again the same data as the 8 bytes remaining in the buffer memory (step S808). Therefore, in order for the PCI slave to transfer 32-byte data, the same processing as steps S801 to S806 must be executed four times.
図9は、PCIスレーブの動作を簡略化して示すフローチャートである。図9(a)に示されている例では、PCIスレーブは、PCIマスタからメモリに格納されているデータの読み出し指示を入力すると(ステップS901)、ウェイトサイクルを挿入する(ステップS902)。そして、メモリからのデータの読み出しが完了すると、PCIスレーブは、PCIマスタにデータを転送する(ステップS903)。 FIG. 9 is a flowchart showing a simplified operation of the PCI slave. In the example shown in FIG. 9A, when the PCI slave inputs an instruction to read data stored in the memory from the PCI master (step S901), the PCI slave inserts a wait cycle (step S902). When reading of data from the memory is completed, the PCI slave transfers data to the PCI master (step S903).
また、図9(b)に示されている例では、PCIスレーブは、PCIマスタからメモリに格納されているデータの読み出し指示を入力すると(ステップS901)、PCIリトライ応答をする(ステップS904)。そして、メモリからのデータの読み出しが完了した後にPCIリード再要求を入力すると(ステップS905)、PCIスレーブは、PCIマスタにデータを転送する(ステップS903)。この例は、図8に示されている例に対応する。 In the example shown in FIG. 9B, when the PCI slave inputs an instruction to read data stored in the memory from the PCI master (step S901), it sends a PCI retry response (step S904). When the PCI read re-request is input after the data reading from the memory is completed (step S905), the PCI slave transfers the data to the PCI master (step S903). This example corresponds to the example shown in FIG.
以上のことから、図8および図9(b)に示されたデータ転送方法では、次のような問題点があることがわかる。
(1)PCIマスタが1つのPCIリード要求コマンドを完了するためには、2度のPCIリード要求コマンド(例えば、図8に示されている例ではステップS801とステップS805)を毎回行う必要がある。すなわち、PCIマスタにデータを転送する際に、毎回リトライ応答が実行される。
(2)PCIスレーブは、同じデータを2度読み出している(例えば、図8に示されている例ではステップS804とステップS808)。
From the above, it can be seen that the data transfer method shown in FIGS. 8 and 9B has the following problems.
(1) In order for the PCI master to complete one PCI read request command, it is necessary to perform two PCI read request commands (for example, step S801 and step S805 in the example shown in FIG. 8) each time. . That is, a retry response is executed every time data is transferred to the PCI master.
(2) The PCI slave reads the same data twice (for example, step S804 and step S808 in the example shown in FIG. 8).
上記の(1)および(2)における問題は、PCIによるデータ転送において、その開始アドレスおよびデータ量がPCIマスタに依存していることに起因する。その結果、PCIバス上に無駄なサイクル(例えば、リトライサイクルやウェイトサイクル)が実行されてしまう。 The problems in the above (1) and (2) are caused by the fact that the start address and the data amount depend on the PCI master in the data transfer by PCI. As a result, a useless cycle (for example, a retry cycle or a wait cycle) is executed on the PCI bus.
そこで、本発明は、PCIバスにおける無駄なサイクルの発生を低減させて、PCIバスの連続したデータのリード転送性能を向上させることができるデータ転送方法およびデータ転送装置を提供することを目的とする。 SUMMARY OF THE INVENTION An object of the present invention is to provide a data transfer method and a data transfer device that can reduce the generation of useless cycles in the PCI bus and improve the read transfer performance of continuous data on the PCI bus. .
本発明によるデータ転送方法は、PCIバスにおける連続したデータを転送するデータ転送方法であって、PCIリード要求コマンドに応じて、要求されたデータを記憶手段から読み出してバッファメモリに格納するステップと、バッファメモリに格納したデータの記憶手段におけるアドレスを記憶するステップとを含み、アドレスにもとづいてPCIマスタデバイスに転送するデータを制御することを特徴とする。 A data transfer method according to the present invention is a data transfer method for transferring continuous data on a PCI bus, and in response to a PCI read request command, reading requested data from a storage means and storing it in a buffer memory; Storing the address in the storage means of the data stored in the buffer memory, and controlling the data to be transferred to the PCI master device based on the address.
本発明によるデータ転送方法は、PCIリード要求コマンドを入力した際に、記憶したアドレスにもとづいてPCIリード要求コマンドに対応するデータがバッファメモリに格納されているか否かを判定するステップを含み、PCIリード要求コマンドに対応するデータがバッファメモリに格納されていると判定した場合、バッファメモリに格納されたデータをPCIマスタデバイスに転送することが好ましい。 A data transfer method according to the present invention includes a step of determining whether data corresponding to a PCI read request command is stored in a buffer memory based on a stored address when a PCI read request command is input. When it is determined that the data corresponding to the read request command is stored in the buffer memory, it is preferable to transfer the data stored in the buffer memory to the PCI master device.
本発明によるデータ転送方法は、バッファメモリに格納されているデータが有効か否かを判定するステップを含み、バッファメモリに格納されているデータが無効であると判定された場合に、要求されたデータを記憶手段から読み出してバッファメモリに格納するステップを実行することが好ましい。 The data transfer method according to the present invention includes a step of determining whether or not the data stored in the buffer memory is valid, and is requested when it is determined that the data stored in the buffer memory is invalid. Preferably, the step of reading the data from the storage means and storing it in the buffer memory is performed.
また、本発明によるデータ転送方法は、バッファメモリに格納されたデータがPCIマスタデバイスに転送されたときに、バッファメモリに格納されているデータを無効にするように構成されていてもよい。 The data transfer method according to the present invention may be configured to invalidate the data stored in the buffer memory when the data stored in the buffer memory is transferred to the PCI master device.
また、本発明によるデータ転送方法は、PCIリード要求コマンドがあると、あらかじめ決められている量のデータを記憶手段から読み出してバッファメモリに格納し、記憶手段に格納されていないデータを要求するPCIリード要求コマンドを入力するまで、記憶手段からの次のデータの読み出しを実行しないように構成されていてもよい。 Also, in the data transfer method according to the present invention, when there is a PCI read request command, a predetermined amount of data is read from the storage means and stored in the buffer memory, and the PCI requesting data not stored in the storage means is requested. Until the read request command is input, the next data may not be read from the storage unit.
本発明によるデータ転送装置は、PCIバスにおける連続したデータの転送を実行するデータ転送装置であって、PCIマスタデバイスからのPCIリード要求コマンドにしたがってPCIバスを制御する制御手段と、PCI要求コマンドに応じて要求されたデータを記憶手段から読み出し、バッファメモリに格納するデータ読み出し手段と、データ読み出し手段によってバッファメモリに格納されたデータの記憶手段におけるアドレスを記憶する管理情報記憶手段とを備え、制御手段は、アドレスにもとづいて転送するデータを制御することを特徴とする。 A data transfer apparatus according to the present invention is a data transfer apparatus for executing continuous data transfer on a PCI bus, and includes a control means for controlling the PCI bus according to a PCI read request command from a PCI master device, and a PCI request command. In response to the request, the data is read from the storage means and stored in the buffer memory, and the control information storage means for storing the address in the storage means of the data stored in the buffer memory by the data read means is provided. The means controls data to be transferred based on the address.
本発明によるデータ転送装置における制御手段は、PCIマスタデバイスからPCIリード要求コマンドを入力した場合、情報管理手段が記憶したアドレスにもとづいてPCIリード要求コマンドに対応するデータがバッファメモリに格納されているか否かを判定し、PCIリード要求コマンドに対応するデータがバッファメモリに格納されていると判定した場合、バッファメモリに格納されたデータをPCIマスタデバイスに転送することが好ましい。 In the data transfer apparatus according to the present invention, when the PCI read request command is input from the PCI master device, whether the data corresponding to the PCI read request command is stored in the buffer memory based on the address stored by the information management unit If it is determined that the data corresponding to the PCI read request command is stored in the buffer memory, it is preferable to transfer the data stored in the buffer memory to the PCI master device.
本発明によるデータ転送装置における管理情報記憶手段は、バッファメモリに格納されているデータが有効か否かを示す有効情報を記憶し、データ読み出し手段は、有効情報が無効を示している場合に、データを記憶手段から読み出すように構成されていることが好ましい。 The management information storage means in the data transfer apparatus according to the present invention stores valid information indicating whether or not the data stored in the buffer memory is valid, and the data read means is when the valid information indicates invalidity, It is preferably configured to read data from the storage means.
本発明によるデータ転送装置における制御手段は、バッファメモリに格納されているデータがPCIマスタデバイスに転送されたときに、有効情報を無効を示す状態にするように構成されていてもよい。また、制御手段は、PCIマスタデバイスからのPCIリード要求コマンドで、バッファメモリに格納されているデータの記憶手段におけるアドレスとは異なるアドレスのデータを要求されたときに、有効情報を無効を示す状態にするように構成されていてもよい。 The control means in the data transfer apparatus according to the present invention may be configured to put the valid information in a state indicating invalidity when the data stored in the buffer memory is transferred to the PCI master device. Further, the control means indicates that invalid information is invalid when data at an address different from the address in the memory means for storing data stored in the buffer memory is requested by a PCI read request command from the PCI master device. You may be comprised so that it may become.
また、本発明によるデータ転送装置におけるデータ読み出し手段は、PCIマスタデバイスからPCIリード要求コマンドがあると、あらかじめ決められている量のデータを記憶手段から読み出してバッファメモリに格納し、当該データ読み出し手段は、記憶手段に格納されていないデータを要求するPCIリード要求コマンドを入力するまで、記憶手段からの次のデータの読み出しを実行しないように構成されていてもよい。 The data reading means in the data transfer apparatus according to the present invention reads a predetermined amount of data from the storage means and stores it in the buffer memory when there is a PCI read request command from the PCI master device, and stores the data in the buffer reading memory. May be configured not to execute reading of the next data from the storage unit until a PCI read request command for requesting data not stored in the storage unit is input.
本発明による好ましい態様のデータ転送装置は、データをメモリから読み出すブロック(例えばMM_ブロック102)と、メモリから読み出されたデータのメモリにおけるアドレスとデータの有効/無効とを管理するブロック(例えばDM_ブロック103)と、DM_ブロック103から得た情報によりPCIバスを制御するブロック(例えばPM_ブロック101)とを有することを特徴とする。そのように構成されることによって、PCIバス上の無駄なサイクルを減らすことができ、PCIバスの連続したデータのリード転送性能を向上させることができる。
A data transfer device according to a preferred embodiment of the present invention includes a block for reading data from a memory (for example, MM_block 102), and a block for managing the address of the data read from the memory and the validity / invalidity of the data (for example, DM_ And a block (for example, PM_block 101) for controlling the PCI bus based on information obtained from the
本発明によれば、PCIバス上の無駄なサイクルを削減し、PCIバスにおける連続したデータの転送速度を向上させることができる。 According to the present invention, useless cycles on the PCI bus can be reduced, and the transfer rate of continuous data on the PCI bus can be improved.
実施の形態1.
以下、本発明の実施の形態を図面を参照して説明する。図1は、本発明によるデータ転送装置を含むデータ転送システムの一構成例を示すシステム構成図である。データ転送装置100は、PM_ブロック(PCI管理ブロック)101と、MM_ブロック(メモリ管理ブロック)102と、DM_ブロック(データ管理ブロック)103と、DB_ブロック(バッファメモリ)104とを含む。PM_ブロック101およびDB_ブロック104はPCIバス300に接続されている。また、MM_ブロック102は、メモリ200にアクセス可能である。
Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a system configuration diagram showing a configuration example of a data transfer system including a data transfer apparatus according to the present invention. The
PM_ブロック101は、DM_ブロック103からの情報に従ってPCIバスを制御する機能を有する。具体的には、PM_ブロック101は、PCIバス300を介してPCIマスタからPCIリード要求コマンドを入力したり、PCIリトライ応答等の処理を実行する。例えば、PM_ブロック101は、ディレイドトランザクションに則ってPCIバスを制御する。PM_ブロック101は、PCIリード要求コマンドを入力すると、MM_ブロック102に対してメモリ200からデータを読み出すことを要求する。すなわち、PM_ブロック101は、入力したPCIコマンドにしたがってMM_ブロック102にメモリアクセスを行わせるとともに、DB_ブロック104に格納されているデータをPCIバスに送出する制御手段に相当する。
The
MM_ブロック102は、PM_ブロック101からの要求およびDM_ブロック103からの情報に従ってメモリアクセスを制御する。具体的には、MM_ブロック102は、PM_ブロック101がPCIリード要求コマンドを入力したことにもとづいてメモリ200からデータを読み出すことを要求した場合に、メモリ200からデータを読み出す。メモリ200から読み出されたデータは、DB_ブロック104に格納される。MM_ブロック102は、DB_ブロック104に格納されたデータのメモリ200におけるアドレスを、管理情報記憶手段としてのDM_ブロック(データ管理ブロック)103に記憶させる管理手段である。
The
PM_ブロック101およびMM_ブロック102は、例えば、制御機能および管理機能を実現するハードウェア回路(論理回路)で実現されている。
The
DM_ブロック103は、メモリ200から読み出されたデータのメモリ200におけるアドレスやデータの有効/無効に関する情報(以下、有効情報という。)等を記憶する。有効情報とは、PCIマスタに転送できるデータがDB_ブロック104に存在しているか否かを示す情報である。すなわち、DB_ブロック104に空き領域があるか否かを示す情報である。有効情報が「有効」を示している場合には、PCIマスタに転送できるデータがDB_ブロック104に存在していることを示し、有効情報が「無効」を示している場合には、PCIマスタに転送できるデータがDB_ブロック104に存在していないことを示す。換言すれば、DB_ブロック104に空き領域が存在していることを示す。なお、DB_ブロック104に空き領域があるか否かを特定しうるような情報であれば、有効情報として、どのような情報を用いてもよい。後述する図2に示されている例では、PCIマスタにデータが転送されることにより、有効情報が無効を示す状態にされる。なお、有効情報が無効を示す状態であるということは、DB_ブロック104の領域に新たなデータを上書きしてもよいということを示す。
The
DB_ブロック104は、FIFO機能を有していてもよいし、単なるバッファであってもよい。本実施の形態では、DM_ブロック103は、8バイトの第1バッファメモリと8バイトの第2バッファメモリとを含むとする。有効情報として、第1バッファメモリに対応する第1有効情報と、第2バッファメモリに対応する第2有効情報とがある。
The
次に、本実施の形態のデータ転送装置100の動作を説明する。図2は、データ転送装置100を含むデータ転送システムの処理を説明するためのシーケンス図である。なお、図2では、図8に示されたデータ転送方法と同一の動作に対して、図8における符号と同一の符号が付されている。マスタデバイス(以下、PCIマスタという。)が32バイトのデータを読み出そうとしている場合について説明する。PCIマスタにおけるバッファサイズは8バイトであって、PCIマスタは8バイトずつPCIスレーブからデータを入力するとする。
Next, the operation of the
データ転送装置100がデータを読み出すメモリ200のデータをPCIマスタが必要とする場合に、PCIマスタは、データ転送装置100に対してリード要求コマンド(PCIリード1)を出力する(ステップS801)。PM_ブロック101は、PCIリード要求コマンドを入力する。
When the PCI master needs data in the
MM_ブロック102は、メモリ200からデータを読み出す処理(メモリ読み出し1)を実行する(ステップS802)。MM_ブロック102は、メモリ200からすぐにデータを読み出すことができない。すなわち、PCIマスタにすぐにデータを出力できない。そこで、PM_ブロック101は、リトライ応答(リトライ応答1)をする(ステップS803)。なお、MM_ブロック102は、有効情報が無効を示している状態であるときにメモリ200からデータを読み出すが、初期状態では、有効情報は無効を示している状態である。
The
MM_ブロック102は、メモリ200からデータ(例えば、8バイトのデータ)を読み出し(読み出しデータ1)、更に、次のデータ(例えば、8バイトのデータ)の読み出し処理(メモリ読み出し2プリフェッチ)を実行する(ステップS804)。読み出されたデータはDB_ブロック104に格納される。本実施の形態では、MM_ブロック102は、DB_ブロック104に空き領域が存在しなくなるまで、メモリ200からデータ読み出す。よって、この例では、第1バッファメモリと第2バッファメモリとの双方にデータが格納される。また、MM_ブロック102は、DM_ブロック103に記憶されている第1有効情報を有効を示す状態にするとともに、第2有効情報を有効を示す状態にする。
The
DM_ブロック103は、読み出されたデータのメモリ200におけるアドレスを記憶する。例えば、第1バッファメモリの先頭に格納されたデータのメモリ200におけるアドレスを記憶し、第2バッファメモリの先頭に格納されたデータのメモリ200におけるアドレスを記憶する。なお、この実施の形態では、DM_ブロック103に記憶されるアドレスに関する情報は、先頭に格納されたデータのアドレスのみであるが、そのように制御することは一例であって、例えば、先頭に格納されたデータのアドレスに加えて、バッファメモリに何バイトの有効なデータが格納されているのかを示す情報が記憶されるようにしてもよい。
The
PCIマスタは、数サイクル後に再度PCIリード要求コマンド(PCIリード1再要求)をPM_ブロック101に出力する(ステップS805)。MM_ブロック102がメモリ200からのデータの読み出しを完了した(すなわち、データ転送の準備ができた)後にPCIリード再要求があれば、DB_ブロック104からPCIマスタにデータが転送される。図2に示されている例では、MM_ブロック102によるメモリ200からのデータ読み出しが完了しているため、データ転送装置100は、データ転送応答(データ転送1)をする(ステップS806)。
The PCI master again outputs a PCI read request command (PCI read 1 re-request) to the
PCIマスタは、自身が持っているバッファサイズ分のデータを受け取ると、データ転送装置100からのデータ転送を終了させる。すなわち、PCIマスタは、PCIバスのプロトコルにしたがってトランザクションを終了する。
When the PCI master receives data corresponding to the buffer size of the PCI master, the PCI master ends the data transfer from the
データを転送するとDB_ブロック104に空きができるため、MM_ブロック102は、自動的に次のデータ(読み出しデータ3)をメモリ200から読み出す(ステップS101)。MM_ブロック102は、既に読み出されたデータのアドレスの次のアドレスからデータを読み出す。すなわち、MM_ブロック102は、次のデータ(読み出しデータ3)をメモリ200から読み出す。なお、MM_ブロック102は、メモリ200から読み出されたデータがそのバッファメモリに格納されると、バッファメモリに格納されたデータを有効と見なす。すなわち、有効情報を有効を示す状態にする。また、PM_ブロック101は、PCIマスタにデータが転送されたときに、バッファメモリに格納されていたデータを無効と見なす。すなわち、そのデータが格納されていたバッファメモリに対応する有効情報を無効を示す状態にする。
When the data is transferred, the
PCIマスタは、データ転送装置100からデータを受け取ると、続くデータのPCIリード要求コマンド(PCIリード2)をデータ転送装置100に出力する(ステップS807)。PCIリード要求コマンドを入力すると、PM_ブロック101は、そのPCIリード要求コマンド(PCIリード2)に対する要求データ(PCIリード要求コマンドで転送要求されたアドレスのデータ)が既にDB_ブロック104に存在しているか否か判定する。具体的には、PM_ブロック101は、DM_ブロック103が有するアドレスおよび有効情報によって、要求データがDB_ブロック104に存在しているか否か判定する。図2における例では既に要求データが読み出されているため(読み出しデータ2)、PM_ブロック101は、データ転送応答(データ転送2)をする(ステップS102)。
When the PCI master receives data from the
データ転送装置100は、DM_ブロック103に記憶されている、メモリ200から読み出されたデータのアドレス情報を管理しているため、2回目のPCIリード要求コマンド(PCIリード2)を新たなPCIリード要求コマンドとみなすことはない。例えば図2に示されている例では、メモリ200から読み出されたデータのメモリ200におけるアドレスがDM_ブロック103に記憶されているため、MM_ブロック102は、PCIマスタにリトライ応答することなくデータを転送できる。
Since the
したがって、図8に示されたデータ転送方法のように、同じデータを2回読み出すことはない。その結果、データ転送装置100は、連続したデータのリード転送性能を向上させることができる。
Therefore, the same data is not read twice unlike the data transfer method shown in FIG. As a result, the
次に、PM_ブロック101の動作を説明する。図3は、PM_ブロック101の動作を示すフローチャートである。PCIマスタからPCIリード要求コマンドを入力すると、PM_ブロック101は、要求データがDB_ブロック104に格納されているか否か判定する。具体的には、PM_ブロック101は、DM_ブロック103が記憶している情報(アドレスおよび有効情報)にもとづいて判定する(ステップS301)。なお、PM_ブロック101は、DB_ブロック104に格納されているデータが有効である場合に、PCIマスタからのPCIリード要求コマンドでDM_ブロック103が記憶しているアドレスとは異なるアドレスのデータが要求された場合には、有効情報を無効を示す状態に変更し、ステップS304に移行する。
Next, the operation of the
DB_ブロック104に要求データが格納されていると判定した場合(ステップS301:YES)、PM_ブロック101は、要求データがDB_ブロック104からPCIマスタに転送されるように制御する(ステップS302)。そして、DB_ブロック104に格納されているデータが無効化される。すなわち、PM_ブロック101は、転送したデータに対応した、DM_ブロック103が記憶している有効情報を無効を示す状態にする(ステップS303)。以後、MM_ブロック102は、無効の状態を示す有効情報に対応したDB_ブロック104の領域に、メモリ200から読み出されたデータを格納することができる。
If it is determined that the request data is stored in the DB_block 104 (step S301: YES), the
DB_ブロック104に要求データが格納されていないと判定した場合(有効情報が無効の状態であった場合、またはDM_ブロック103が記憶しているアドレスとは異なるアドレスのデータが要求され有効情報が無効を示す状態に変更された場合)には(ステップS301:NO)、PM_ブロック101は、PCIマスタに対してPCIリトライ応答をする(ステップS304)。そして、PM_ブロック101は、メモリ200からデータを読み出す要求をMM_ブロック102に出す(ステップS305)。
When it is determined that the request data is not stored in the DB_block 104 (when the valid information is invalid or when data of an address different from the address stored in the
次に、MM_ブロック102の動作を説明する。図4は、MM_ブロック102の動作を示すフローチャートである。MM_ブロック102は、PM_ブロック101からPCIリード要求コマンドを入力すると、メモリ200からのデータの読み出しを実行する。
Next, the operation of the
まず、MM_ブロック102は、DB_ブロック104に空きがあるか否か判定する(ステップS401)。例えば、MM_ブロック102は、DB_ブロック104に記憶されているデータに対応した有効情報が無効を示す状態であるか否かを判定することによって、DB_ブロック104に空きがあるか否か判定する。無効を示す有効情報がDM_ブロック103に存在する場合、MM_ブロック102は、DB_ブロック104に空きがあると判定する。
First, the
DB_ブロック104に空きがある場合(ステップS401:YES)、MM_ブロック102は、メモリ200からのデータの読み出しを実行する(ステップS402)。
If the
以上のように、データ転送装置100は、DM_ブロック103に記憶されている情報にもとづいてメモリ200から読み出したデータのメモリ200におけるアドレスを管理しているため、2回目のPCIリード要求コマンド(例えば、図2におけるPCIリード2)を新たなPCIリード要求コマンドとみなすことはない。したがって、データ転送装置100は、無駄なリトライ応答(例えば、図8に示されたデータ転送方法におけるリトライ応答2)を実行することなく、PCIマスタにデータを転送できる。
As described above, since the
上述したように、本実施の形態のデータ転送装置100は、PCIマスタが連続したデータの読み出しを数回のトランザクションに分けて実行した際に、無駄なPCIサイクルを減らすことができる。その結果、データの転送性能が向上する。
As described above, the
また、データ転送装置100は、メモリ200への無駄なアクセス(例えば、図8におけるステップS808におけるメモリ読み出し2)を減らすことができるため、メモリ200を共有する他のリソースの性能を向上させることができる。
Further, since the
なお、本実施の形態では、PM_ブロック101は、プリフェッチバッファ単位で、すなわち第1バッファメモリと第2バッファメモリとのそれぞれに対応して、有効情報を管理しているが、すなわち、バッファメモリ単位で有効情報を管理(有効を示す状態から無効を示す状態に、または無効を示す状態から有効を示す状態に変化させる)しているが、そのような管理の仕方は一例である。他の任意の単位、例えば1バイトや4バイト単位や複数バッファメモリ単位(例えば2バッファメモリ単位)で管理してもよい。
In the present embodiment, the
実施の形態2.
次に、第2の実施の形態を図面を参照して説明する。図5は、第2の実施の形態のデータ転送装置を含むデータ転送システムにおける処理を説明するためのシーケンス図である。データ転送装置100は、PCIマスタからの一度のPCIリード要求コマンドに対して、あらかじめ決められた量のデータをメモリ200から読み出す。なお、図5では、図8に示されたデータ転送方法における処理と同一の処理に対して、図8における符号と同一の符号が付されている。
Embodiment 2. FIG.
Next, a second embodiment will be described with reference to the drawings. FIG. 5 is a sequence diagram for explaining processing in the data transfer system including the data transfer apparatus according to the second embodiment. The
データ転送システムでは、第1の実施の形態と同様に、ステップS801〜806における処理が実行される。そして、データ転送装置100は、第1の実施の形態とは異なり、有効情報が無効を示す状態であっても、データを転送した後(すなわち、ステップS806における処理の後)のメモリ読み出しプリフェッチ(図2におけるステップS101の処理)を実行しない。そして、データ転送装置100は、PCIマスタからPCIリード要求コマンド(PCIリード2)を入力すると(ステップS807)、DM_ブロック103に格納されているデータをPCIマスタに転送する(ステップS201)。
In the data transfer system, the processes in steps S801 to S806 are executed as in the first embodiment. Unlike the first embodiment, the
PM_ブロック101は、DM_ブロック103に格納されているすべてのデータがPCIマスタに転送されたときに、DM_ブロック103に記憶されている有効情報を無効の状態にする。
The
PCIマスタは、データ転送装置100からデータを受け取ると、続くデータを要求するためにPCIリード要求コマンド(PCIリード3)をデータ転送装置100に出力する(ステップS202)。PM_ブロック101がPCIリード要求コマンドを入力したことに応じてメモリ200からデータを読み出すことを要求すると、MM_ブロック102は、その要求に対する要求データが既にDB_ブロック104に存在しているか否か判定する。
When the PCI master receives data from the
MM_ブロック102は、DB_ブロック104に格納されているデータに対応した有効情報が有効を示している状態であるか否か判定することによって、DB_ブロック104に要求データが格納されているか否か判定する。有効を示す状態の有効情報がDM_ブロック103に存在する場合、MM_ブロック102は、DB_ブロック104に要求データが格納されていると判定する。
The
図5における例では要求されたデータが読み出されていないため、無効を示す状態の有効情報が存在し、MM_ブロック102は、メモリ200からデータを読み出す処理(メモリ読み出し3)を実行する(ステップS203)。
In the example in FIG. 5, since the requested data has not been read, there is valid information indicating a state of invalidity, and the
なお、MM_ブロック102は、要求されたデータをすぐにメモリ200から読み出すことができない。すなわち、PM_ブロック101は、PCIマスタにすぐにデータを出力できないため、リトライ応答(リトライ応答3)をする(ステップS204)。そして、MM_ブロック102は、メモリ200からデータを読み出し(読み出しデータ3)、更に、次のデータの読み出し処理(メモリ読み出し4プリフェッチ)を実行する(ステップS205)。
Note that the
以上のように、MM_ブロック102は、一度のPCIリード要求コマンドに対して、あらかじめ決められた量のデータをメモリ200から読み出す。この例では、第1バッファメモリのサイズと第2バッファメモリのサイズとの和である16バイトのデータをメモリ200から読み出す。
As described above, the
次に、MM_ブロック102の動作を説明する。図6は、MM_ブロック102の動作を示すフローチャートである。PM_ブロック101がPCIリード要求コマンドを入力したことに応じてメモリ200からデータを読み出すことを要求した場合に、MM_ブロック102は、メモリ200から決められた量のデータを読み出す処理を実行する。
Next, the operation of the
すなわち、MM_ブロック102は、決められた量のデータをメモリ200から読み出すまで(ステップS601)。データをメモリ200から読み出す処理(ステップS602)を繰り返す。読み出されたデータは、DB_ブロック104に格納される。
That is, the
次に、PM_ブロック101の動作を説明する。図7は、PM_ブロック101の動作を示すフローチャートである。なお、図7では、図3に示された第1の実施の形態のPM_ブロック101の動作と同一の動作に対して、図3における符号と同一の符号が付されている。
Next, the operation of the
PCIマスタからPCIリード要求コマンドを入力すると、PM_ブロック101は、要求データがDB_ブロック104に格納されているか否か判定する(ステップS301)。具体的には、PM_ブロック101は、DM_ブロック103が有する情報(アドレスおよび有効情報)にもとづいて判定する。
When a PCI read request command is input from the PCI master, the
DB_ブロック104に要求データが格納されていると判定した場合には(ステップS301:YES)、PM_ブロック101は、要求データがDB_ブロック104からPCIマスタに転送されるように制御する(ステップS302)。
If it is determined that the request data is stored in the DB_block 104 (step S301: YES), the
DB_ブロック104に要求データが格納されていないと判定した場合(ステップS301:NO)、PM_ブロック101は、PCIマスタに対してPCIリトライ応答をする(ステップS304)。そして、PM_ブロック101は、メモリ200からデータを読み出す要求をMM_ブロック102に出す(ステップS305)。
When it is determined that the request data is not stored in the DB_block 104 (step S301: NO), the
以上のように、本実施の形態のデータ転送装置100は、PCIマスタからの一度のPCIリード要求コマンドに対して、あらかじめ決められた量のデータをメモリ200から読み出す。そして、DB_ブロック104に格納されていないデータを要求するPCIリード要求コマンドを入力するまで、メモリ200からの次のデータの読み出しを実行しない。また、第1の実施の形態の場合と同様に、PCIリード要求コマンドを入力したときに、出力できるデータがDB_ブロック104に格納されている場合には、そのデータを直ちにPCIマスタに出力する。この実施の形態は、PCIマスタが、あるアドレスブロック(アドレスが連続する複数領域)のデータを入力し、入力したデータにもとづいて処理を行い、処理の結果に応じて他のアドレスブロックのデータを入力し、入力したデータにもとづいて処理を行うような制御を繰り返し実行するような場合に有意義である。
As described above, the
なお、本実施の形態では、DM_ブロック103に格納されているすべてのデータがPCIマスタに転送されたときに有効情報が無効の状態に変更されたが、データがPCIマスタに転送されても有効情報を無効の状態に変更せず、PCIマスタからのPCIリード要求コマンドでDM_ブロック103が記憶しているアドレスとは異なるアドレスのデータが要求された場合に有効情報を無効を示す状態に変更するようにしてもよい。また、任意の単位、例えば1バイトや4バイト単位または1つのバッファメモリ単位や複数のバッファメモリ単位で管理してもよい。
In this embodiment, the validity information is changed to an invalid state when all data stored in the
実施の形態3.
図1に示されているデータ転送装置100のブロックを多重化して、データの転送性能を向上させるようにしてもよい。
Embodiment 3 FIG.
The blocks of the
ブロックが多重化される場合には、データ転送装置100は、例えば、複数のDM_ブロック103を有するように構成される。そのように構成される場合には、データ転送装置100は、メモリ200から並列にデータを読み出すことができ、データの転送性能をさらに向上することができる。
When the blocks are multiplexed, the
本発明は、PCIバスを備えた装置やシステムに適用される。 The present invention is applied to an apparatus or system having a PCI bus.
100 データ転送装置
101 PM_ブロック
102 MM_ブロック
103 DM_ブロック
104 DB_ブロック
200 メモリ
300 PCIバス
100
Claims (11)
PCIリード要求コマンドに応じて、要求されたデータを記憶手段から読み出してバッファメモリに格納するステップと、
前記バッファメモリに格納したデータの前記記憶手段におけるアドレスを記憶するステップとを含み、
前記アドレスにもとづいてPCIマスタデバイスに転送するデータを制御する
ことを特徴とするデータ転送方法。 A data transfer method for transferring continuous data on a PCI bus,
In response to a PCI read request command, reading the requested data from the storage means and storing it in the buffer memory;
Storing the address in the storage means of the data stored in the buffer memory,
A data transfer method, comprising: controlling data to be transferred to a PCI master device based on the address.
前記PCIリード要求コマンドに対応するデータが前記バッファメモリに格納されていると判定した場合、前記バッファメモリに格納されたデータをPCIマスタデバイスに転送する
請求項1記載のデータ転送方法。 Determining whether data corresponding to the PCI read request command is stored in the buffer memory based on the stored address when a PCI read request command is input;
The data transfer method according to claim 1, wherein when it is determined that data corresponding to the PCI read request command is stored in the buffer memory, the data stored in the buffer memory is transferred to a PCI master device.
バッファメモリに格納されているデータが無効であると判定された場合に、要求されたデータを記憶手段から読み出してバッファメモリに格納するステップを実行する
請求項1または請求項2記載のデータ転送装置。 Determining whether the data stored in the buffer memory is valid,
The data transfer device according to claim 1 or 2, wherein when it is determined that the data stored in the buffer memory is invalid, the step of reading the requested data from the storage means and storing it in the buffer memory is executed. .
請求項3記載のデータ転送方法。 The data transfer method according to claim 3, wherein when the data stored in the buffer memory is transferred to the PCI master device, the data stored in the buffer memory is invalidated.
前記記憶手段に格納されていないデータを要求するPCIリード要求コマンドを入力するまで、前記記憶手段からの次のデータの読み出しを実行しない
請求項1から請求項4のうちのいずれか1項に記載のデータ転送方法。 When there is a PCI read request command, a predetermined amount of data is read from the storage means and stored in the buffer memory.
The reading of the next data from the said memory | storage means is not performed until the PCI read request command which requests | requires the data which are not stored in the said memory | storage means is input. Data transfer method.
PCIマスタデバイスからのPCIリード要求コマンドにしたがってPCIバスを制御する制御手段と、
前記PCI要求コマンドに応じて要求されたデータを記憶手段から読み出し、バッファメモリに格納するデータ読み出し手段と、
前記データ読み出し手段によって前記バッファメモリに格納されたデータの前記記憶手段におけるアドレスを記憶する管理情報記憶手段とを備え、
前記制御手段は、前記アドレスにもとづいて転送するデータを制御する
ことを特徴とするデータ転送装置。 A data transfer device that performs continuous data transfer on a PCI bus,
Control means for controlling the PCI bus according to a PCI read request command from the PCI master device;
Data reading means for reading data requested in response to the PCI request command from a storage means and storing the data in a buffer memory;
Management information storage means for storing addresses in the storage means of the data stored in the buffer memory by the data reading means,
The data transfer apparatus, wherein the control means controls data to be transferred based on the address.
前記PCIリード要求コマンドに対応するデータが前記バッファメモリに格納されていると判定した場合、前記バッファメモリに格納されたデータを前記PCIマスタデバイスに転送する
請求項6記載のデータ転送装置。 When a PCI read request command is input from the PCI master device, the control means determines whether data corresponding to the PCI read request command is stored in the buffer memory based on the address stored by the information management means. ,
The data transfer device according to claim 6, wherein when it is determined that data corresponding to the PCI read request command is stored in the buffer memory, the data stored in the buffer memory is transferred to the PCI master device.
前記データ読み出し手段は、前記有効情報が無効を示している場合に、データを記憶手段から読み出す
請求項6または請求項7記載のデータ転送装置。 The management information storage means stores valid information indicating whether or not the data stored in the buffer memory is valid,
The data transfer device according to claim 6 or 7, wherein the data reading unit reads data from the storage unit when the valid information indicates invalidity.
請求項8記載のデータ転送装置。 The data transfer apparatus according to claim 8, wherein the control means sets the valid information to a state indicating invalidity when the data stored in the buffer memory is transferred to the PCI master device.
請求項8記載のデータ転送装置。 The control means puts the valid information in a state indicating invalidity when requested by the PCI read request command from the PCI master device for data at an address different from the address in the data storage means stored in the buffer memory. The data transfer device according to claim 8.
前記データ読み出し手段は、前記記憶手段に格納されていないデータを要求するPCIリード要求コマンドを入力するまで、前記記憶手段からの次のデータの読み出しを実行しない
請求項6から請求項10のうちのいずれか1項に記載のデータ転送装置。 When there is a PCI read request command from the PCI master device, the data reading means reads a predetermined amount of data from the storage means and stores it in the buffer memory.
The said data reading means does not perform reading of the next data from the said memory | storage means until it inputs the PCI read request command which requests | requires the data which are not stored in the said memory | storage means. The data transfer apparatus according to any one of claims.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006295178A JP2008112324A (en) | 2006-10-31 | 2006-10-31 | Data transfer method and data transfer device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006295178A JP2008112324A (en) | 2006-10-31 | 2006-10-31 | Data transfer method and data transfer device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008112324A true JP2008112324A (en) | 2008-05-15 |
Family
ID=39444798
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006295178A Pending JP2008112324A (en) | 2006-10-31 | 2006-10-31 | Data transfer method and data transfer device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008112324A (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005258719A (en) * | 2004-03-10 | 2005-09-22 | Matsushita Electric Ind Co Ltd | Data processing system and slave device |
-
2006
- 2006-10-31 JP JP2006295178A patent/JP2008112324A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005258719A (en) * | 2004-03-10 | 2005-09-22 | Matsushita Electric Ind Co Ltd | Data processing system and slave device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110647480B (en) | Data processing method, remote direct access network card and equipment | |
US7120755B2 (en) | Transfer of cache lines on-chip between processing cores in a multi-core system | |
EP3335124B1 (en) | Register files for i/o packet compression | |
TWI326839B (en) | Transmission device performing dma transmission, semiconductor integrated circuit device and data transmission method | |
JP2001117859A (en) | Bus controller | |
CN111708717A (en) | Data copying method, direct memory access controller and computer system | |
JP2006338538A (en) | Stream processor | |
KR20150144545A (en) | Method of operating memory controller and methods for devices having same | |
US9727521B2 (en) | Efficient CPU mailbox read access to GPU memory | |
CN110114762B (en) | Method and apparatus for accessing non-volatile memory as byte addressable memory | |
TW201106159A (en) | Directory cache allocation based on snoop response information | |
CN111406251B (en) | Data prefetching method and device | |
US7451259B2 (en) | Method and apparatus for providing peer-to-peer data transfer within a computing environment | |
US7680992B1 (en) | Read-modify-write memory with low latency for critical requests | |
JP2010244580A (en) | External device access apparatus | |
JP2010134710A (en) | Method for migrating virtual machine, server, and program | |
CN107250995B (en) | Memory management device | |
JP7158390B2 (en) | Compare-and-swap transactions | |
JP4856413B2 (en) | Arithmetic processing apparatus, information processing apparatus, and control method for arithmetic processing apparatus | |
JP6115455B2 (en) | Parallel computer system, parallel computer system control method, information processing apparatus, arithmetic processing apparatus, and communication control apparatus | |
JP2010061220A (en) | Data transfer apparatus, data transfer method and processor | |
JP2008112324A (en) | Data transfer method and data transfer device | |
JP4431492B2 (en) | Data transfer unit that supports multiple coherency granules | |
JP4924970B2 (en) | Data processing system | |
JP4965974B2 (en) | Semiconductor integrated circuit device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20101015 |
|
A131 | Notification of reasons for refusal |
Effective date: 20101019 Free format text: JAPANESE INTERMEDIATE CODE: A131 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20101214 |
|
A02 | Decision of refusal |
Effective date: 20110517 Free format text: JAPANESE INTERMEDIATE CODE: A02 |