JP7363344B2 - Memory control device and control method - Google Patents
Memory control device and control method Download PDFInfo
- Publication number
- JP7363344B2 JP7363344B2 JP2019188407A JP2019188407A JP7363344B2 JP 7363344 B2 JP7363344 B2 JP 7363344B2 JP 2019188407 A JP2019188407 A JP 2019188407A JP 2019188407 A JP2019188407 A JP 2019188407A JP 7363344 B2 JP7363344 B2 JP 7363344B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- reception
- identifier
- descriptor
- 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.)
- Active
Links
Images
Landscapes
- Bus Control (AREA)
- Information Transfer Systems (AREA)
Description
本発明はデバイスと通信するメモリ制御装置等に関する。 The present invention relates to a memory control device and the like that communicate with devices.
ソケット通信において、受信データをDMA(Direct Memory Access)方式でメモリに書き込む、NIC(Network Interface Card)等のメモリ制御装置が従来知られている。 2. Description of the Related Art In socket communication, memory control devices such as NICs (Network Interface Cards) that write received data into memory using a DMA (Direct Memory Access) method are conventionally known.
図9は、あるデバイスにおいてDMA機能を有する従来のNICを使用した場合の、受信データのメモリへの書き込みに係る処理を説明するための模式図である。図9で示すように、受信データの書き込みに係る処理は、1~6の番号順に実行される。なお、図9では、表記の簡略化のため、ディスクリプタのことを「Desc」と記載する。 FIG. 9 is a schematic diagram for explaining processing related to writing received data to memory when a conventional NIC having a DMA function is used in a certain device. As shown in FIG. 9, processing related to writing received data is executed in numerical order from 1 to 6. Note that in FIG. 9, the descriptor is written as "Desc" for the sake of simplicity.
まず始めに、デバイスのCPUは、自装置のメモリに対し、受信データのディスクリプタを予め設定しておく(1)。この設定は、ソケット通信を行う前等、データの受信前に行われることが望ましい。メモリにディスクリプタが設定されたことはNICに通知される、NICは通知を受けると、メモリに格納されているディスクリプタを予め読み込んでおく。ディスクリプタが複数存在する場合は、NICは、ディスクリプタを所定の順番で読み込む(2)。 First, the CPU of the device presets a descriptor for received data in its own memory (1). This setting is desirably performed before receiving data, such as before performing socket communication. The NIC is notified that the descriptor has been set in the memory. Upon receiving the notification, the NIC reads the descriptor stored in the memory in advance. If there are multiple descriptors, the NIC reads the descriptors in a predetermined order (2).
NICはデータを受信すると(3)、読み込んでおいたディスクリプタが示すメモリ上のアドレスに、受信データを書き込む(4)。ここで、受信データが書き込まれるアドレスは、CPUがデータ受信に係る処理を行うためにアクセスできる領域である。しかしながら、該アドレスは、CPUが実行するアプリケーションプログラム(以降、アプリと称する)が直接アクセスし、書き込む、および読み出すことはできない領域のアドレスである。NICは、受信データを書き込んだことを、CPUに通知する。 When the NIC receives the data (3), it writes the received data to the address on the memory indicated by the read descriptor (4). Here, the address to which the received data is written is an area that the CPU can access to perform processing related to data reception. However, this address is an address of an area that cannot be directly accessed, written to, or read by an application program (hereinafter referred to as an application) executed by the CPU. The NIC notifies the CPU that the received data has been written.
CPUは受信データが書き込まれた旨の通知を受けると、該受信データを読み出して、解析する(5)。ここでの「解析」とは、例えば、受信データの種別、サイズ、および受信データを使用するアプリケーションの種類の少なくともいずれかを特定するための解析である。CPUは解析が終了すると、該解析結果に応じて、受信データをメモリ上の別のアドレスに再度書き込む(6)。この、再書き込み先のアドレスは、CPUが実行するアプリが直接アクセス可能、すなわちアプリが使用可能な記憶領域内のアドレスである。 When the CPU receives notification that the received data has been written, it reads and analyzes the received data (5). The "analysis" here is, for example, analysis for identifying at least one of the type and size of received data, and the type of application that uses the received data. When the analysis is completed, the CPU writes the received data again to another address on the memory according to the analysis result (6). This rewrite destination address is directly accessible to the application executed by the CPU, that is, it is an address in a storage area that can be used by the application.
以上の処理によって、デバイスのCPUが実行するアプリにおいて、受信データを取り扱うことができる状態になる。 Through the above processing, the application executed by the CPU of the device becomes able to handle the received data.
図9に示すように、従来のNICは、受信データを、アプリが直接取り扱えない記憶領域に書き込んでいた。そのため、CPUが、NICの書き込んだ受信データの解析および移動を行う必要があった。これにより、CPUの負荷が増大していた。また、受信データの解析および移動に係る処理が、データ受信の律速要因となっていた。 As shown in FIG. 9, the conventional NIC writes received data to a storage area that cannot be directly handled by an application. Therefore, it was necessary for the CPU to analyze and move the received data written by the NIC. This increased the load on the CPU. Furthermore, processing related to analysis and movement of received data has been a rate-limiting factor in data reception.
これに対し、DMAでのデータ受信をより効率化することによって、データ受信をより高速化させる技術が開発されている。例えば、特許文献1には、受信データのデータサイズに応じて、適用するディスクリプタを変更することで、受信データの格納先アドレスを振り分ける技術が開発されている。しかしながら、データサイズに応じて受信データの格納先アドレスを振り分けただけでは、アプリで受信データを利用するために、さらに受信データを解析および移動する必要が生じる。
In response to this, technology has been developed to speed up data reception by making data reception using DMA more efficient. For example, in
本発明の一態様は、前述の問題点について鑑みたものである。本発明の一態様は、データ受信をより高速化させることが可能なメモリ制御装置等を実現することを目的とする。 One aspect of the present invention takes into account the above-mentioned problems. One aspect of the present invention aims to realize a memory control device and the like that can further speed up data reception.
前記の課題を解決するために、本発明の一態様に係るメモリ制御装置は、第1デバイスのメモリにDMA(Direct Memory Access)方式でアクセスしてデータを読み書きするメモリ制御装置であって、前記第1デバイス以外の第2デバイスから、1つの通信プロトコルにて複数のデータを受信するデータ受信部と、前記複数のデータそれぞれに対応する受信ディスクリプタを指定する識別子を取得する識別子取得部と、前記メモリに記憶された複数の受信ディスクリプタから、それぞれの前記識別子に対応する受信ディスクリプタを読み出す読出部と、前記複数のデータのそれぞれを、前記メモリの、前記読出部によって読み出された前記受信ディスクリプタそれぞれにより指定されるアドレスに書き込むデータ書込部と、を備え、前記アドレスは、前記第1デバイスにおいて実行される1つ以上のアプリケーションがアクセス可能な記憶領域を示す。 In order to solve the above problems, a memory control device according to one aspect of the present invention is a memory control device that accesses the memory of a first device using a DMA (Direct Memory Access) method to read and write data, a data reception unit that receives a plurality of data using one communication protocol from a second device other than the first device; an identifier acquisition unit that acquires an identifier specifying a reception descriptor corresponding to each of the plurality of data; a reading unit that reads a reception descriptor corresponding to each of the identifiers from a plurality of reception descriptors stored in a memory; and a reading unit that reads out a reception descriptor corresponding to each of the identifiers from a plurality of reception descriptors stored in a memory; a data writing unit that writes to an address specified by, the address indicating a storage area that can be accessed by one or more applications executed in the first device.
前記の課題を解決するために、本発明の一態様に係る制御方法は、第1デバイスのメモリにDMA(Direct Memory Access)方式でアクセスしてデータを読み書きするメモリ制御装置を制御するための制御方法であって、前記第1デバイス以外の第2デバイスから、1つの通信プロトコルにて複数のデータを受信するデータ受信ステップと、前記複数のデータそれぞれに対応する受信ディスクリプタを指定する識別子を取得する識別子取得ステップと、前記メモリに記憶された複数の受信ディスクリプタから、それぞれの前記識別子に対応する受信ディスクリプタを読み出す読出ステップと、前記複数のデータのそれぞれを、前記メモリの、前記読出ステップにおいて読み出された前記受信ディスクリプタそれぞれにより指定されるアドレスに書き込むデータ書込ステップと、を含み、前記アドレスは、前記第1デバイスにおいて実行される1つ以上のアプリケーションがアクセス可能な記憶領域を示す。 In order to solve the above problems, a control method according to one aspect of the present invention includes a control method for controlling a memory control device that accesses the memory of a first device using a DMA (Direct Memory Access) method to read and write data. The method includes a data receiving step of receiving a plurality of data using one communication protocol from a second device other than the first device, and obtaining an identifier specifying a reception descriptor corresponding to each of the plurality of data. an identifier acquisition step; a reading step of reading a reception descriptor corresponding to each of the identifiers from a plurality of reception descriptors stored in the memory; and a reading step of reading each of the plurality of data from the memory in the reading step. and writing data to an address specified by each of the received descriptors, the address indicating a storage area accessible by one or more applications executed on the first device.
前記の構成または処理によれば、メモリ制御装置は、メモリの、第1デバイスが実行するアプリケーションがアクセス可能な記憶領域に、直接データを書き込む。これにより、第1デバイスは、メモリに書き込まれたデータを移動させなくても、自装置が実行するアプリケーションにおいて該データを使用することができる。これにより、受信したデータの移動が不要になるため、データ受信をより高速に行うことができる。 According to the above configuration or process, the memory control device writes data directly to a storage area of the memory that is accessible to an application executed by the first device. Thereby, the first device can use the data written in the memory in the application executed by the first device without moving the data. This eliminates the need to move received data, so data can be received faster.
前記メモリ制御装置において、前記第1デバイスは複数のアプリケーションを実行し、前記メモリにはアプリケーション毎にアクセス可能な記憶領域が規定されており、前記識別子は、前記データを使用するアプリケーションを規定するアプリケーション情報を含んでおり、前記読出部は、前記アプリケーション情報が規定するアプリケーションがアクセス可能な記憶領域のアドレスを指定する受信ディスクリプタを、前記識別子に対応する受信ディスクリプタとして読み出すこととしてもよい。 In the memory control device, the first device executes a plurality of applications, a storage area is defined in the memory that can be accessed for each application, and the identifier is an application that defines an application that uses the data. The reading unit may read a reception descriptor that specifies an address of a storage area accessible by an application defined by the application information as a reception descriptor corresponding to the identifier.
前記の構成によれば、受信したデータがどのアプリケーションで使用されるデータであるかを識別子に基づき特定し、該データを使用するアプリケーションがアクセス可能な記憶領域内のアドレスを指定する受信ディスクリプタを読み出す。これにより、データを、該データを使用するアプリケーションがアクセス可能な記憶領域に直接書き込むことができる。したがって、受信したデータの移動が不要になるため、データ受信をより高速に行うことができる。 According to the above configuration, it is determined based on the identifier which application uses the received data, and the reception descriptor that specifies the address in the storage area that is accessible by the application that uses the data is read. . This allows data to be written directly to a storage area that is accessible to applications that use the data. Therefore, since there is no need to move the received data, data can be received faster.
前記メモリ制御装置において、前記メモリには、1つの識別子に対応する複数の受信ディスクリプタが記憶されていてもよく、前記複数の受信ディスクリプタは、前記1つの識別子のアプリケーション情報が示すアプリケーションがアクセス可能な記憶領域内の、それぞれ異なるアドレスを指定してもよく、前記読出部は、前記1つの識別子に対応する前記複数の受信ディスクリプタを、所定の順番で読み出してもよい。 In the memory control device, the memory may store a plurality of reception descriptors corresponding to one identifier, and the plurality of reception descriptors are accessible by an application indicated by application information of the one identifier. Different addresses within the storage area may be specified, and the reading unit may read out the plurality of reception descriptors corresponding to the one identifier in a predetermined order.
前記の構成によれば、データ書込部によるデータの書き込み処理が遅れて、データ受信部が次に書き込むべきデータを受信してしまった場合でも、各データを別の受信ディスクリプタが示す、別のアドレスに書き込むよう指定することができる。したがって、データの書き込み処理が遅れた場合でも、誤ってデータを上書きしてしまうことを防止できる。 According to the above configuration, even if the data writing process by the data writing unit is delayed and the data receiving unit receives the data to be written next, each data is transferred to another data indicated by a different reception descriptor. You can specify to write to an address. Therefore, even if the data writing process is delayed, it is possible to prevent data from being erroneously overwritten.
前記メモリ制御装置において、前記識別子取得部は、前記データ受信部が受信した前記データに含まれている前記識別子を取得してもよい。 In the memory control device, the identifier acquisition unit may acquire the identifier included in the data received by the data reception unit.
前記の構成によれば、データと識別子とを同時に受信することができる。これにより、受信したデータの移動が不要になるため、データ受信をより高速に行うことができる。 According to the above configuration, data and an identifier can be received at the same time. This eliminates the need to move received data, so data can be received faster.
前記メモリ制御装置において、前記識別子は、該識別子に対応する前記データを示す情報を含んでおり、前記識別子取得部は、前記識別子を前記データと別個に取得してもよい。 In the memory control device, the identifier may include information indicating the data corresponding to the identifier, and the identifier acquisition unit may acquire the identifier separately from the data.
前記の構成によれば、識別子を含んだデータ形式に変更せずとも、データと識別子とを個別に送信することで、前述のメモリ制御装置と同様の効果を得ることができる。 According to the above configuration, the same effect as the above-described memory control device can be obtained by transmitting the data and the identifier separately without changing the data format to include the identifier.
前記メモリ制御装置は、前記第2デバイスの第2メモリに記憶された送信ディスクリプタを読み出す第2読出部を備えていてもよく、前記データ受信部は、前記第2メモリの、前記第2読出部によって読み出された前記送信ディスクリプタによって指定されるアドレスから読み出されたデータを前記データとして取得し、前記識別子は、前記第2デバイスから前記第1デバイスにデータを送信する際の、前記送信ディスクリプタに応じて規定されていてもよい。 The memory control device may include a second reading unit that reads the transmission descriptor stored in the second memory of the second device, and the data receiving unit reads the second reading unit of the second memory. The data read from the address specified by the transmission descriptor read by is acquired as the data, and the identifier is the transmission descriptor when transmitting data from the second device to the first device. may be specified according to the
前記の構成によれば、データを送信する側の第2デバイスにおける送信ディスクリプタから識別子が規定される。すなわち、データ送信の際に必要な送信ディスクリプタから識別子を規定するため、識別子の規定のために別途情報を取得せずとも、適切に識別子を規定することができる。 According to the above configuration, the identifier is defined from the transmission descriptor in the second device that transmits data. That is, since the identifier is defined from the transmission descriptor required for data transmission, the identifier can be appropriately defined without acquiring additional information for defining the identifier.
本発明の一態様によれば、データ受信をより高速化させることができる。 According to one aspect of the present invention, data reception can be made faster.
以下、本発明の一側面に係る実施の形態(以下、「本実施形態」とも表記する)を、図面に基づいて説明する。ただし、以下で説明する本実施形態は、あらゆる点において本発明の例示に過ぎない。本発明の範囲を逸脱することなく種々の改良や変形を行うことができることは言うまでもない。 DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment (hereinafter also referred to as "this embodiment") according to one aspect of the present invention will be described below based on the drawings. However, this embodiment described below is merely an illustration of the present invention in all respects. It goes without saying that various improvements and modifications can be made without departing from the scope of the invention.
〔実施形態1〕
§1.適用例
図1は、本実施形態に係る第1デバイス100に含まれる各部の、動作概要を示す図である。第1第1デバイス100は図示の通り、NIC(Network Interface Card)1と、メモリ2と、CPU3とを含む。なお、図1ではディスクリプタ(記述子)のことを「Desc」と記載する。以降の図においても、「Desc」はディスクリプタを意味することとする。
[Embodiment 1]
§1. Application Example FIG. 1 is a diagram showing an outline of the operation of each part included in the
NIC(メモリ制御装置)1は、第1デバイス100における通信インタフェースである。NIC1は、他のデバイス(第2デバイス)から受信したデータをDMA(Direct Memory Access)方式でメモリ2に書き込む機能を有する。
The NIC (memory control device) 1 is a communication interface in the
メモリ2は、第1デバイス100における記憶装置である。メモリ2の記憶領域はNIC1によって書き換えられる。また、メモリ2の記憶領域は、CPU3によって書き換えられる。詳細は後述するが、メモリ2は、受信ディスクリプタを記憶する記憶領域と、データを記憶する記憶領域とに分かれている。
The
ここで、「受信ディスクリプタ」とは、メモリ2に受信データを書き込む際に用いるディスクリプタである。受信ディスクリプタは、NIC1が受信したデータの、メモリ2上での格納先アドレスを示す情報である。以降、受信ディスクリプタを記憶する記憶領域を「ディスクリプタ領域」、データを記憶する記憶領域を「データ領域」と称する。
Here, the "reception descriptor" is a descriptor used when writing received data into the
CPU3は、第1デバイス100における演算装置および制御装置である。CPU3は、メモリ2に書き込まれたデータを読み出して処理する。また、CPU3は、メモリ2または他の記憶装置に記憶されたアプリケーション(アプリ)プログラムを読み出して実行する。これにより、第1デバイスにおいてアプリが動作する。CPU3は、受信するデータの書き込みの際に用いる受信ディスクリプタを規定し、該受信ディスクリプタをメモリ2のディスクリプタ領域に書き込む。CPU3は、複数のアプリに対応して複数の受信ディスクリプタをメモリ2に設定する。CPU3は、各受信ディスクリプタがいずれのアプリに対応するかを示す情報をNIC1に予め通知する。本実施形態に係る受信ディスクリプタは、第1デバイス100のCPU3において実行される、少なくとも1つのアプリがアクセス可能な記憶領域内のアドレスを示す。
The
図1に示すように、本実施形態に係る第1デバイス100において、受信データの書き込みに係る処理は、1~5の番号順に実行される。まず始めに、デバイスのCPUは、自装置のメモリに対し、受信ディスクリプタを予め設定しておく(1)。受信ディスクリプタの設定方法は特に限定されない。
As shown in FIG. 1, in the
本実施形態に係る第1デバイス100では、NIC1は、受信ディスクリプタが設定された時点ではなく、データを受信してから受信ディスクリプタを読み込む。具体的には、NICはデータを受信すると(2)、受信データに含まれている識別子を取得する。ここで、「識別子」とは、アプリに対応しており、受信データに対応する受信ディスクリプタを指定する情報である。識別子の具体的構成は特に限定されない。例えば、識別子は、受信データが第1デバイスに送信されて来た際の通信プロトコルを示す情報を含んでいてもよい。また例えば、識別子は、受信データを使用するアプリを規定するアプリケーション情報を含んでいてもよい。それゆえ、アプリケーション情報は、受信ディスクリプタに対応しているともいえる。なお、CPU3は、各受信ディスクリプタがいずれの識別子に対応するかを示す情報をNIC1に予め通知してもよい。
NIC1は識別子に応じて、メモリ2から読み込む受信ディスクリプタを選定する(3)。NIC1は、選定した受信ディスクリプタを、メモリ2から読み込む(4)。
In the
The
受信ディスクリプタを読み込んだNIC1は、該受信ディスクリプタが指定するアドレスに受信データを格納する(5)。前述のように、受信ディスクリプタは、CPU3において実行されるアプリがアクセス可能なアドレスを示している。したがって、第1デバイス100においてCPU3は、メモリ2に書き込まれたデータを移動させなくても、アプリにおいて受信データを使用することができる。これにより、受信データの移動が不要になるため、データ受信をより高速に行うことができるという効果を奏する。
The
§2.構成例
図2は、本実施形態に係る第1デバイス100の要部構成の一例を示すブロック図である。第1デバイス100は、NIC1と、メモリ2と、CPU3とを含む。NIC1と、メモリ2と、CPU3とはそれぞれバスで接続されている。なお、バスには前述の装置以外に、入力装置、表示装置、ROM(Read Only Memory)、および音声出力装置等が接続されていてもよい。
§2. Configuration Example FIG. 2 is a block diagram showing an example of the main configuration of the
第1デバイス100は、他のデバイスと、Ethernet(登録商標)等、ソケット通信を行う回線で接続している。なお、第1デバイス100は複数の他のデバイスと接続していてもよい。
The
(CPU3)
CPU3は、前述の通り、第1デバイス100における演算装置および制御装置であり、第1デバイス100を統括的に制御する。CPU3は、各種アプリを動作させる。CPU3は、第1デバイス100におけるデータ通信を行う前に、予め受信ディスクリプタを作成(規定)し、作成した受信ディスクリプタをメモリ2のディスクリプタ領域21に書き込んでおく。
(CPU3)
As described above, the
(メモリ2)
メモリ2は、各種データを記憶する記憶装置である。メモリ2は、ディスクリプタ領域21と、ライトバック領域22と、受信データ領域23との3つの記憶領域に分かれている。なお、本実施形態においてライトバック領域22は必須ではない。
(Memory 2)
The
ディスクリプタ領域21は、受信ディスクリプタを格納するための記憶領域である。受信ディスクリプタは、CPU3によって設定される。ライトバック領域22は、受信ディスクリプタをライトバックするための記憶領域である。受信ディスクリプタのライトバックについては後述する。受信データ領域23は、受信データを格納するための記憶領域である。図2に示すように、受信データ領域23は、識別子毎に分割されていてもよい。例えば、受信データ領域23は、識別子が示す受信ディスクリプタに応じて分割されていてもよい。
The
(NIC1)
NIC1は、他のデバイスから受信したデータを、メモリ2にDMA転送するための装置である。NIC1は、受信データ格納バッファ18と、受信データ処理部11とを含む。
(NIC1)
The
受信データ格納バッファ18は、NIC1が他のデバイスから受信したデータを一時的に格納するバッファである。受信データ処理部11は、メモリ2における、受信データの適切な格納先アドレスを特定し、該アドレスに受信データをDMA転送する。
The received
受信データ処理部11は、データ受信部17と、アドレス計算部(識別子取得部)16と、ディスクリプタ制御部(読出部)14と、DMA制御部12と、受信データ制御部(データ書込部)13と、ディスクリプタ格納バッファ15と、を含む。
The received
データ受信部17は、他のデバイス(第2デバイス)からデータを受信し、該データを受信データ格納バッファ18に格納する。データ受信部17は、複数の通信プロトコルに対応していてもよい。例えば、データ受信部17は、サイクリック通信により送信されたデータ(サイクリックデータ)を受信してもよい。また、データ受信部17は、TCP-IP等の通信プロトコルによって送信されたデータを受信してもよい。データ受信部17は、受信したデータの通信プロトコルを受信データ制御部13に通知してもよい。
The
本実施形態では、特段の記載が無い限り、データ受信部17は、サイクリックデータを受信することとする。データ受信部17は、1つの通信プロトコル(例えばサイクリック通信のプロトコル)で、複数のデータを受信する。
In this embodiment, unless otherwise specified, the
アドレス計算部16は、複数の受信データそれぞれに対応する識別子を取得する。本実施形態では、アドレス計算部16は、受信データ格納バッファに格納された受信データから、該データに含まれている識別子を抽出して取得する。
The
アドレス計算部16は、取得した識別子を解析することにより、各識別子に対応している受信ディスクリプタの、メモリ2における格納先アドレスを算出する。例えば、識別子がアプリ情報を含む場合、アドレス計算部16は、アプリ情報が規定するアプリがアクセス可能な記憶領域のアドレスを指定している受信ディスクリプタを選出してもよい。そして、アドレス計算部16は、該受信ディスクリプタのいずれかのアドレスを、識別子に対応する受信ディスクリプタのアドレスとして特定してもよい。アドレス計算部16は、受信ディスクリプタの格納先アドレスを、ディスクリプタ制御部14に出力する。
The
ディスクリプタ制御部14は、受信ディスクリプタの格納先アドレスが入力されると、該アドレスから受信ディスクリプタを読み出すよう、DMA制御部12に指示する。また、ディスクリプタ制御部14は、ディスクリプタ格納バッファ15に格納された受信ディスクリプタを読み出し、該受信ディスクリプタによって指定される、メモリ2上の格納先アドレスを特定する。ディスクリプタ制御部14は、特定した格納先アドレスを受信データ制御部13に出力する。
When the descriptor control unit 14 receives the storage address of the reception descriptor, it instructs the
DMA制御部12は、NIC1においてメモリ2にアクセスするインタフェースである。DMA制御部12は、受信データ処理部11の各部からの要求に応じてメモリ2にアクセスし、データの格納および取得を行う。
The
受信データ制御部13は、メモリ2の、ディスクリプタ制御部14が読み出した受信ディスクリプタが指定する格納先アドレスに、受信データを格納する。具体的には、受信データ制御部13に、受信ディスクリプタが指定する格納先アドレスが入力されると、受信データ制御部13は、受信データ格納バッファ18から受信データを読み出す。受信データ制御部13は、読み出した受信データを、DMA制御部12を介してメモリ2の指定されたアドレスに格納(書き込み)する。
The received
ディスクリプタ格納バッファ15は、DMA制御部12を介してNIC1が受信した受信ディスクリプタを一時的に格納しておくバッファである。ディスクリプタ格納バッファ15に格納された受信ディスクリプタは、ディスクリプタ制御部14によって読み出される。
The
(ライトバック処理)
ディスクリプタ制御部14は、受信ディスクリプタのライトバック処理を実行してもよい。以降、受信ディスクリプタのライトバックのことを、単に「ライトバック」とも称する。本実施形態における「ライトバック」とは、受信ディスクリプタに情報を付加(すなわち、受信ディスクリプタを上書き)して、メモリ2のライトバック領域22に書き込むことを意味する。ここで言う「情報」とは、例えば、その受信ディスクリプタが指定するアドレスに書き込みした受信データのサイズ、および、受信データの書き込み完了を示す終了判定フラグ、の少なくとも一方を示す。
(Write back processing)
The descriptor control unit 14 may perform write-back processing of the received descriptor. Hereinafter, write-back of the reception descriptor will also be simply referred to as "write-back.""Writeback" in this embodiment means adding information to the reception descriptor (that is, overwriting the reception descriptor) and writing it into the write back
図3は、ディスクリプタ制御部14が実行するライトバック処理を模式的に示したものである。図中の矢印は、受信ディスクリプタと、該受信ディスクリプタを上書きしたディスクリプタ(上書済ディスクリプタ)との対応関係を示している。図示のように、受信ディスクリプタと、上書済ディスクリプタとは1対1に対応している。受信データ制御部13は、受信データの書込みが終了すると、書込み終了の旨をディスクリプタ制御部14に通知する。ディスクリプタ制御部14は、該通知を受けると、ライトバックを実行する。すなわち、ディスクリプタ制御部14は、使用した受信ディスクリプタを上書きし、ライトバック領域22の、該受信ディスクリプタに対応するアドレスに、上書済受信ディスクリプタを書き込む。
FIG. 3 schematically shows the write-back process executed by the descriptor control unit 14. The arrows in the figure indicate the correspondence between a reception descriptor and a descriptor that has overwritten the reception descriptor (an overwritten descriptor). As shown in the figure, there is a one-to-one correspondence between the reception descriptor and the overwritten descriptor. When the reception
ディスクリプタ領域21に格納されている受信ディスクリプタは、データ受信の度に順次使用される。したがって、ディスクリプタ領域21に格納されている受信ディスクリプタ自体に終了判定フラグ等を付加して上書きしてしまうと、該受信ディスクリプタの再利用が困難になる。前述のようにライトバック領域22を設け、該領域に上書きした受信ディスクリプタを書き込むことによって、ディスクリプタ領域21に格納されている受信ディスクリプタの再利用を可能にすることができる。また、これにより、データ受信の終了判定フラグ、および受信データのサイズの記録等を、残すことができる。
The reception descriptors stored in the
§3.処理の流れ
図4は、本実施形態に係るNIC1の処理の流れの一例を示すフローチャートである。NIC1のデータ受信部17は、他のデバイスから送信されたデータを受信する(S10)。データ受信部17は、受信データを受信データ格納バッファ18に格納する(S12)。受信データが格納されると、アドレス計算部16は、該受信データから識別子を取得して、解析する(S14)。例えば、アドレス計算部16は、識別子から、受信データの種別、および、受信データを使用するアプリを特定する。受信データの種別がサイクリックデータでない場合(S16でYES)、受信データ処理部11は、S18以降の処理を行わず、通常の受信処理を行う(S28)。通常の受信処理とは、例えば、DMA方式ではなく、通常のようにCPU3を経由してメモリ2にデータを書き込む処理であってよい。
§3. Flow of Processing FIG. 4 is a flowchart showing an example of the flow of processing of the
一方、受信データの種別がサイクリックデータである場合(S16でYES)アドレス計算部16は、識別子からアドレスを算出する(S18)。アドレス計算部16は、算出したアドレスをディスクリプタ制御部14に出力する。ディスクリプタ制御部14は、アドレス計算部16から入力されたアドレスに割り当てられている受信ディスクリプタを、DMA制御部12を介して読み込み、ディスクリプタ格納バッファ15に格納させる(S20)。ディスクリプタ制御部14は、ディスクリプタ格納バッファ15に格納した受信ディスクリプタを読み出し、該受信ディスクリプタが示すメモリ2上のアドレス、すなわち、受信データの書き込み先のアドレスを特定する。ディスクリプタ制御部14は特定したアドレスを受信データ制御部13に出力する。
On the other hand, if the type of received data is cyclic data (YES in S16), the
受信データ制御部13は、受信データを、メモリ2の、受信ディスクリプタが示すアドレスに書き込む(S22)。受信データ制御部13は、受信データの書込みが終了した旨をディスクリプタ制御部14に通知する。
The reception
ディスクリプタ制御部14は、該通知を受けると、ライトバックを実行する。すなわち、ディスクリプタ制御部14は、メモリ2のライトバック領域22に、上書きした受信ディスクリプタを書き込む(S24)。
Upon receiving the notification, the descriptor control unit 14 executes writeback. That is, the descriptor control unit 14 writes the overwritten reception descriptor to the write-
以上の処理が終了すると、受信データ処理部11は、データの受信処理の完了をCPU3に通知する(S26)。
When the above processing is completed, the received
なお、図4において、S16の判定処理、およびS28の処理は必須ではない。すなわち、S14の処理の後、S16の判定処理を経ずにS18の処理を実行してもよい。また、図4において、S24に示したライトバックに関する処理も必須ではない。 Note that in FIG. 4, the determination process of S16 and the process of S28 are not essential. That is, after the process of S14, the process of S18 may be executed without going through the determination process of S16. Further, in FIG. 4, the write-back process shown in S24 is not essential.
§4.受信ディスクリプタの使用管理
メモリ2のディスクリプタ領域21には、1つの識別子に対応する複数の受信ディスクリプタが記憶されていてもよい。また、複数の受信ディスクリプタは、1つの識別子のアプリ情報が示すアプリがアクセス可能な記憶領域内の、それぞれ異なるアドレスを指定していてもよい。そして、ディスクリプタ制御部14は、複数の受信ディスクリプタを所定の順番で読み出してもよい。なお、アプリと識別子とは、1対1に対応していてもよいし、1対多で対応していてもよい。すなわち、1つのアプリに対し割り当てられる識別子は1つであってもよいし、複数であってもよい。
§4. Usage Management of Reception Descriptors The
図5は、1つの識別子に対し複数の受信ディスクリプタが設定されている場合の、受信ディスクリプタと、受信データ領域23との対応関係について模式的に示した図である。なお、図5では、ディスクリプタ領域21と受信データ領域23とをそれぞれ別個に表記しているが、図2等に示す通り、この2領域は同じメモリ2内の記憶領域であってよい。
FIG. 5 is a diagram schematically showing the correspondence between the reception descriptor and the
なお、図5において、ディスクリプタ領域21内のディスクリプタはそれぞれハイフンで繋がれた2つの数字の組合せで識別される。図5の例では、ハイフンの左側の数字は識別子の識別番号を、右側の数字は受信ディスクリプタの識別番号をそれぞれ示している。つまり、図5の例では、識別番号「0」の識別子に対応する受信ディスクリプタとして、識別番号「0」、「1」、「2」、および「3」の計4つの受信ディスクリプタが設定されている。また、識別番号「1」の識別子に対応する受信ディスクリプタとして、識別番号「0」の受信ディスクリプタが設定されている。なお、図5では識別番号「0」の識別子と、識別番号「1」の識別子とは異なるアプリに対応する識別子であることとする。
In FIG. 5, each descriptor in the
図5において、受信データ領域23内の「TAG0」および「TAG1」の数字はそれぞれ、前述のアプリの識別番号に対応している。また、「Buf0」~「Buf3」の数字はそれぞれ、前述の受信ディスクリプタの識別番号に対応している。
In FIG. 5, the numbers "TAG0" and "TAG1" in the received
図5に示す通り、同じ識別子に対応する受信ディスクリプタが複数ある場合、ディスクリプタ制御部14は、所定の順番で受信ディスクリプタを読み出し、読み出した受信ディスクリプタに対応するアドレスに、順次受信データを格納する(「TAG0:Buf0」~「TAG0:Buf3」)。一方、前述の通り、メモリ2においてアプリが使用可能な記憶領域は、該アプリ毎に異なっている。したがって、異なるアプリに対応する識別子を取得した場合、ディスクリプタ制御部14は、メモリ2上の異なる記憶領域にデータを格納する(「TAG1:Buf0」)。
As shown in FIG. 5, when there are multiple receive descriptors corresponding to the same identifier, the descriptor control unit 14 reads the receive descriptors in a predetermined order and sequentially stores the received data in the addresses corresponding to the read receive descriptors ( "TAG0:Buf0" to "TAG0:Buf3"). On the other hand, as described above, the storage area in the
図6は、NIC1のディスクリプタ制御部14における、使用する受信ディスクリプタの管理方法を模式的に示した図である。ディスクリプタ制御部14は例えば、図6に示すように、各識別子に対応する複数の受信ディスクリプタのうち、次に使用する受信ディスクリプタを、使用フラグを用いて管理してもよい。
FIG. 6 is a diagram schematically showing a method of managing the reception descriptors to be used in the descriptor control unit 14 of the
図6のディスクリプタ領域21には、計4つの受信ディスクリプタが設定されている。各受信ディスクリプタの識別番号は、図5に示した識別番号と同様の意味を持つ。つまり、図6の例では、識別番号「0」および「1」の識別子について、それぞれ対応する受信ディスクリプタがそれぞれ2つずつ設定されていることとする。
A total of four reception descriptors are set in the
図6に示すNIC1の「使用カウント」における欄内の数値は、各識別子(識別番号「0」および「1」の識別子)に対応する受信ディスクリプタのうち、次回のデータ受信の際に使用する受信ディスクリプタを示す数値である。図6に示す使用カウントの初期値は0であり、対応する受信ディスクリプタが使用される毎に1ずつカウントが増加する。また、カウントが設定されている受信ディスクリプタの数に達する場合、カウントは0に戻されることとする。 The numerical value in the "Usage count" column for NIC1 shown in FIG. A numerical value indicating a descriptor. The initial value of the usage count shown in FIG. 6 is 0, and the count increases by 1 each time the corresponding reception descriptor is used. Furthermore, when the count reaches the set number of receive descriptors, the count is reset to 0.
例えば、NIC1が識別番号「0」の識別子を含むデータを最初に受信した場合、使用カウントは0である。よって、ディスクリプタ制御部14は、識別番号「0」の識別子に対応する、識別番号「0」の受信ディスクリプタを使用する。ディスクリプタ制御部14は、受信ディスクリプタを読み出した後、識別番号「0」の識別子の使用カウントを1増加させる。 For example, when NIC1 first receives data including an identifier with identification number "0", the usage count is 0. Therefore, the descriptor control unit 14 uses the reception descriptor with the identification number "0" that corresponds to the identifier with the identification number "0". After reading the received descriptor, the descriptor control unit 14 increments the use count of the identifier with the identification number "0" by one.
次に、NIC1が識別番号「1」の識別子を含むデータを受信した場合、対応する使用カウントは0である。したがって、ディスクリプタ制御部14は、識別番号「1」の識別子に対応する、識別番号「0」の受信ディスクリプタを使用する。ディスクリプタ制御部14は、受信ディスクリプタを読み出した後、識別番号「1」の識別子の使用カウントを0に戻す。 Next, when NIC1 receives data including an identifier with identification number "1", the corresponding usage count is zero. Therefore, the descriptor control unit 14 uses the reception descriptor with the identification number "0" that corresponds to the identifier with the identification number "1". After reading the received descriptor, the descriptor control unit 14 returns the use count of the identifier with the identification number "1" to zero.
さらに、NIC1が識別番号「1」の識別子を含むデータを受信した場合、対応する使用カウントは1である。したがって、ディスクリプタ制御部14は、識別番号「1」の識別子に対応する、識別番号「1」の受信ディスクリプタを使用する。ディスクリプタ制御部14は、受信ディスクリプタを読み出した後、識別番号「1」の識別子の使用カウントを0に戻す。
Further, when the
このように、使用カウントを用いることで、複数の受信ディスクリプタを順番で使用することができる。したがって、受信データの書き込み処理が遅れて、データ受信部17が次に書き込むべきデータをすでに受信してしまった場合でも、各データを別の受信ディスクリプタが示す、別のアドレスに書き込むよう指定することができる。したがって、データの書き込み処理が遅れた場合でも、誤ってデータを上書きしてしまうことを防止できる。
In this way, by using the usage count, multiple receive descriptors can be used in sequence. Therefore, even if the writing process of received data is delayed and the
〔実施形態2〕
本発明の他の実施形態について、以下に説明する。なお、説明の便宜上、前記実施形態にて説明した部材と同じ機能を有する部材については、同じ符号を付記し、その説明を繰り返さない。
[Embodiment 2]
Other embodiments of the invention will be described below. For convenience of explanation, members having the same functions as those described in the embodiments above will be denoted by the same reference numerals, and the description thereof will not be repeated.
§1.構成例
図7は、本実施形態に係るメモリ管理システム500の要部構成の一例を示すブロック図である。メモリ管理システム500は、FPGA(Field-Programmable gate array)4と、送信側CPU7と、受信側CPU8と、送信側メモリ(第2メモリ)5と、受信側メモリ6と、を含む。
§1. Configuration Example FIG. 7 is a block diagram showing an example of the main configuration of the
(FPGA4)
FPGA4と、送信側CPU7と、送信側メモリ5はバスで接続されている。また、FPGA4と、受信側CPU8と、受信側メモリ6とは、バスで接続されている。バスの規格は特に限定しないが、例えばPCIe(Peripheral Component Interconnect Express)の規格に準拠したバスを採用することができる。それぞれのバスには、入力装置、表示装置、ROM、および音声出力装置等が接続されていてもよい。
(FPGA4)
The FPGA 4, the sending side CPU 7, and the sending
FPGA4は、送信処理部41と受信処理部42とを含んでいる。送信処理部41は送信側メモリ5にDMA方式でアクセスする。また、受信処理部42は受信側メモリ6にDMA方式でアクセスする。本実施形態では、メモリ管理システム500のFPGA4の受信処理部42と、受信側CPU8と、受信側メモリ6とで、第1デバイスが実現される。また、本実施形態では、FPGA4の送信処理部41と、送信側CPU7と、送信側メモリ5とで、第2デバイスが実現される。第2デバイスは、第1デバイスにデータを送信する他のデバイスの一種である。
The FPGA 4 includes a
すなわち、FPGA4は、第1デバイスと第2デバイスとのデータの送受信を仲介する装置である。具体的には、FPGA4の送信処理部41は、第2デバイスにおける送信側メモリ5からのデータ読出しと、データ送信処理と、を制御する。また、FPGA4の受信処理部42は、第1デバイスにおけるデータ受信処理と、第1デバイスにおける受信側メモリ6へのデータ書き込みと、を制御する。送信処理部41と受信処理部42の詳細な構成は後述する。
That is, the FPGA 4 is a device that mediates data transmission and reception between the first device and the second device. Specifically, the
(受信側CPU8および受信側メモリ6)
受信側CPU8は、実施形態1に示すCPU3と同様の構成を有する。受信側メモリ6は、実施形態1に示すメモリ2と同様の構成を有する。
(Receiving side CPU 8 and receiving side memory 6)
The receiving side CPU 8 has the same configuration as the
(送信側CPU7および送信側メモリ5)
送信側CPU7は、第2デバイスを統括的に制御する。送信側CPU7は、第2デバイスにおける各種アプリを動作させる。送信側CPU7は、第2デバイスにおけるデータ通信を行う前に、予め送信ディスクリプタを作成(規定)し、作成した送信ディスクリプタを送信側メモリ5の送信ディスクリプタ領域51に書き込んでおく。ここで、「送信ディスクリプタ」とは、送信処理部41が送信するデータの、送信側メモリ5での格納先アドレスを示す情報である。
(Sending side CPU 7 and sending side memory 5)
The transmitting side CPU 7 centrally controls the second device. The sending CPU 7 operates various applications in the second device. The sending CPU 7 creates (defines) a sending descriptor in advance and writes the created sending descriptor in the sending
送信側メモリ5は、各種データを記憶する記憶装置である。送信側メモリ5は、送信ディスクリプタ領域51と、送信データ領域52との2つの記憶領域に分かれている。送信ディスクリプタ領域51は、送信ディスクリプタを格納するための記憶領域である。送信データ領域52は、送信データを格納するための記憶領域である。なお、送信側メモリ5は、送信ディスクリプタのライトバック処理に用いるライトバック領域を有していてもよい。
The transmitting
(送信処理部41)
送信処理部41は、第2デバイスから第1デバイスへのデータの送信を制御する。送信処理部41は、DMA制御部411と、送信ディスクリプタ格納バッファ412と、送信ディスクリプタ制御部(第2読出部)413と、送信データ制御部414と、送信データ格納バッファ415とを含む。
(Transmission processing unit 41)
The
DMA制御部411は、送信処理部41の各部からの要求に応じて、送信側メモリ5にアクセスし、データの格納および取得を行う。
The
送信ディスクリプタ格納バッファ412は、送信ディスクリプタを一時的に格納しておくバッファである。送信ディスクリプタ格納バッファ412に格納された送信ディスクリプタは、送信ディスクリプタ制御部413によって読み出される。
The transmission
送信ディスクリプタ制御部413は、送信ディスクリプタを読み出して送信ディスクリプタ格納バッファ412に格納するよう、DMA制御部12に指示する。また、送信ディスクリプタ制御部413は、送信ディスクリプタ格納バッファ412に格納された送信ディスクリプタを読み出し、該送信ディスクリプタによって指定される、送信側メモリ5上の格納先アドレスを特定する。また、送信ディスクリプタ制御部413は、送信ディスクリプタから、送信データの識別子(すなわち、受信処理部42にとっての受信データの識別子)を生成する。送信ディスクリプタからの識別子の生成方法は特に限定されない。例えば、送信ディスクリプタ制御部413は、送信ディスクリプタに含まれる一部の情報を識別子としてもよい。また、送信ディスクリプタ制御部413は、送信ディスクリプタから、送信データの種類を示す情報、送信データを使用するアプリを特定する情報等を特定して、該情報を識別子としてもよい。送信ディスクリプタ制御部413は、特定した送信データの格納先アドレスと、識別子とを送信データ制御部414に出力する。
The transmission
送信データ制御部414は、送信ディスクリプタが指定する格納先アドレスから送信データを読み出す。読み出した送信データは、一時的に送信データ格納バッファ415に格納してもよい。送信データ格納バッファ415は、送信データを一時的に格納するバッファである。送信データ制御部414は、読み出した送信データと、識別子とを対応付ける。送信データ制御部414は、送信データを受信処理部42の受信データ制御部425に、識別子をアドレス計算部423に出力する。
The transmission
(受信処理部42)
受信処理部42は、第1デバイスが受信したデータのメモリへの格納を制御する。受信処理部42は、DMA制御部421と、ディスクリプタ格納バッファ422と、ディスクリプタ制御部424と、アドレス計算部423と、受信データ制御部425と、を含む。
(Reception processing unit 42)
The
DMA制御部421は、実施形態1に係るDMA制御部12と同様の処理を実行する。ディスクリプタ格納バッファ422は、実施形態1に係るディスクリプタ格納バッファ422と同様の処理を実行する。ディスクリプタ制御部424は、実施形態1に係るディスクリプタ制御部14と同様の処理を実行する。
The
アドレス計算部423は、受信処理部42が受信したデータ(受信データ)の識別子を、送信データ制御部414から。データとは別個に受信する。それ以外アドレス計算部423の処理は、実施形態1に係るアドレス計算部16と同様である。
The
受信データ制御部425は、実施形態1に係るデータ受信部17の機能と、受信データ制御部13の両方の機能を有する。具体的には、受信データ制御部425は、送信処理部41の送信データ制御部414から出力されたデータを受信する。
The received
なお、受信処理部42には、実施形態1と同様に受信データ格納バッファが含まれていてもよい。受信データ格納バッファが在る場合、受信データ制御部425は、受信データ格納バッファに受信データを一時的に格納する。受信データ格納バッファが無い場合、受信データ制御部425は、受信データを自己で一時記憶する。受信データ制御部425はまた、メモリ2の、ディスクリプタ制御部424が読み出した受信ディスクリプタが指定する格納先アドレスに、受信データを格納する。
Note that the
§2.処理の流れ
図8は、本実施形態に係るFPGA4の送信処理部41と受信処理部42の間のデータの流れを示すシーケンス図である。なお、図8のS70~S82に示す処理は、図4のS16~S28に示した処理と同様であるため、繰り返し説明しない。
§2. Flow of Processing FIG. 8 is a sequence diagram showing the flow of data between the
FPGA4の送信処理部41は、送信側CPUからデータの送信要求を受けるまで待機する(S50でNO)。データの送信要求を受けると(S50でYES)、送信ディスクリプタ制御部413は、DMA制御部411を介して、データ送信の実行回数分の送信ディスクリプタを読み込む(S52)。読み込んだ送信ディスクリプタは、一時的に送信ディスクリプタ格納バッファ412に格納してもよい。
The
送信ディスクリプタ制御部413は、読み出した送信ディスクリプタによって指定される、送信側メモリ5上の送信データの格納先アドレスを特定する。送信データ制御部414は、送信ディスクリプタが指定する格納先アドレスから送信データを読み込む(S54)。送信データ制御部414が読み込んだ送信データは、一時的に送信データ格納バッファ415に格納されてもよい。
The transmission
送信ディスクリプタ制御部413はまた、送信ディスクリプタに応じて、送信データに対応する識別子を生成する。送信データ制御部414は、送信ディスクリプタ制御部413から識別子を受信し、該識別子を送信データと対応付けてから、受信処理部42のアドレス計算部423に送信する(S56)。
The transmission
受信処理部42のアドレス計算部423はデータの識別子を受信すると(S58)、該識別子を解析することにより、(S60)、該データの受信ディスクリプタの、受信側メモリ6における格納先アドレスを特定する。
When the
一方、送信処理部41の送信データ制御部414は、識別子の送信とともに、または識別子の送信と前後して、受信処理部42の受信データ制御部425に対し、データを送信する(S62)。受信データ制御部425は該データを受信データとして受信する(S64)。
On the other hand, the transmission
送信処理部41は、S62までの処理が終了すると、未実行の送信ディスクリプタがあるか否かを判定する(S66)。すなわち、送信処理部41は、S50において受けた送信要求のうち、まだ実行していないデータ送信があるか否かを判定する。未実行の送信ディスクリプタがある場合(S66でYES)、送信処理部41は、未実行の送信ディスクリプタとそれに対応する送信データについて、S54以降の処理を繰り返す。一方、未実行の送信ディスクリプタがない場合(S66でNO)、送信処理部41は、送信要求を受けての送信処理が終了したことを送信側CPU7に通知する(S68)。
After completing the processing up to S62, the
なお、図8において、S60の処理とS64の処理とは順不同で行われてよい。また、図8において、S70の判定処理、およびS82の処理は必須ではない。すなわち、S58~S64までの処理の後、S70の判定処理を経ずにS72の処理を実行してもよい。また、図8において、S78に示したライトバックに関する処理も必須ではない。 Note that in FIG. 8, the process of S60 and the process of S64 may be performed in random order. Further, in FIG. 8, the determination process of S70 and the process of S82 are not essential. That is, after the processing from S58 to S64, the processing at S72 may be executed without going through the determination processing at S70. Further, in FIG. 8, the write-back process shown in S78 is not essential.
〔ソフトウェアによる実現例〕
NIC1およびFPGA4の制御ブロックは、集積回路(ICチップ)等に形成された論理回路(ハードウェア)によって実現してもよいし、ソフトウェアによって実現してもよい。
[Example of implementation using software]
The control blocks of the
後者の場合、NIC1およびFPGA4は、各機能を実現するソフトウェアであるプログラムの命令を実行するコンピュータを備えている。このコンピュータは、例えば1つ以上のプロセッサを備えていると共に、前記プログラムを記憶したコンピュータ読み取り可能な記録媒体を備えている。そして、前記コンピュータにおいて、前記プロセッサが前記プログラムを前記記録媒体から読み取って実行することにより、本発明の目的が達成される。前記プロセッサとしては、例えばCPU(Central Processing Unit)を用いることができる。前記記録媒体としては、「一時的でない有形の媒体」、例えば、ROM(Read Only Memory)等の他、テープ、ディスク、カード、半導体メモリ、プログラマブルな論理回路などを用いることができる。また、前記プログラムを展開するRAM(Random Access Memory)などをさらに備えていてもよい。また、前記プログラムは、該プログラムを伝送可能な任意の伝送媒体(通信ネットワークや放送波等)を介して前記コンピュータに供給されてもよい。なお、本発明の一態様は、前記プログラムが電子的な伝送によって具現化された、搬送波に埋め込まれたデータ信号の形態でも実現され得る。
In the latter case, the
本発明は上述した各実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。 The present invention is not limited to the embodiments described above, and various modifications can be made within the scope of the claims, and embodiments obtained by appropriately combining technical means disclosed in different embodiments. are also included within the technical scope of the present invention.
1 NIC(メモリ制御装置)
2 メモリ
5 送信側メモリ(第2メモリ)
6 受信側メモリ(メモリ)
3 CPU
4 FPGA(メモリ制御装置)
7 送信側CPU
8 受信側CPU
11 受信データ処理部
12、411、421 DMA制御部
13、425 受信データ制御部(データ書込部)
14、424 ディスクリプタ制御部(読出部)
15、422 ディスクリプタ格納バッファ
16、423 アドレス計算部(識別子取得部)
17 データ受信部
18 受信データ格納バッファ
21 ディスクリプタ領域
22 ライトバック領域
23 受信データ領域
41 送信処理部
42 受信処理部
51 送信ディスクリプタ領域
52 送信データ領域
100 第1デバイス
412 送信ディスクリプタ格納バッファ
413 送信ディスクリプタ制御部(第2読出部)
414 送信データ制御部
415 送信データ格納バッファ
500 メモリ管理システム
1 NIC (memory control device)
2
6 Receiving side memory (memory)
3 CPUs
4 FPGA (memory control device)
7 Sending side CPU
8 Receiving side CPU
11 Received
14, 424 Descriptor control section (reading section)
15, 422
17
414 Transmission
Claims (5)
前記第1デバイス以外の第2デバイスから、1つの通信プロトコルにて複数のデータを受信するデータ受信部と、
前記複数のデータそれぞれに対応する受信ディスクリプタを指定する識別子を取得する識別子取得部と、
前記メモリに記憶された複数の受信ディスクリプタから、それぞれの前記識別子に対応する受信ディスクリプタを読み出す読出部と、
前記複数のデータのそれぞれを、前記メモリの、前記読出部によって読み出された前記受信ディスクリプタそれぞれにより指定されるアドレスに書き込むデータ書込部と、を備え、
前記アドレスは、前記第1デバイスにおいて実行される1つ以上のアプリケーションがアクセス可能な記憶領域を示し、
前記第1デバイスは複数のアプリケーションを実行し、
前記メモリには、アプリケーション毎にアクセス可能な記憶領域が規定されており、
前記識別子は、前記データを使用するアプリケーションを規定するアプリケーション情報を含んでおり、
前記読出部は、前記アプリケーション情報が規定するアプリケーションがアクセス可能な記憶領域のアドレスを指定する受信ディスクリプタを、前記識別子に対応する受信ディスクリプタとして読み出し、
前記メモリには、1つの識別子に対応する複数の受信ディスクリプタが記憶されており、
前記1つの識別子に対応する前記複数の受信ディスクリプタは、前記1つの識別子のアプリケーション情報が示すアプリケーションがアクセス可能な記憶領域内の、それぞれ異なるアドレスを指定しており、
前記読出部は、前記1つの識別子に対応する前記複数の受信ディスクリプタを、所定の順番で読み出す、メモリ制御装置。 A memory control device that accesses the memory of a first device using a DMA (Direct Memory Access) method to read and write data,
a data receiving unit that receives a plurality of data using one communication protocol from a second device other than the first device;
an identifier acquisition unit that acquires an identifier specifying a reception descriptor corresponding to each of the plurality of data;
a reading unit that reads a reception descriptor corresponding to each of the identifiers from a plurality of reception descriptors stored in the memory;
a data writing unit that writes each of the plurality of data to an address of the memory specified by each of the reception descriptors read by the reading unit,
the address indicates a storage area accessible by one or more applications executed on the first device;
the first device executes a plurality of applications;
In the memory, a storage area that can be accessed for each application is defined,
the identifier includes application information that defines an application that uses the data;
The reading unit reads a reception descriptor that specifies an address of a storage area accessible by an application defined by the application information as a reception descriptor corresponding to the identifier;
The memory stores a plurality of reception descriptors corresponding to one identifier,
The plurality of reception descriptors corresponding to the one identifier each specify a different address within a storage area accessible by the application indicated by the application information of the one identifier,
The reading unit is a memory control device that reads the plurality of reception descriptors corresponding to the one identifier in a predetermined order .
前記識別子取得部は、前記識別子を前記データと別個に取得する、請求項1に記載のメモリ制御装置。 The identifier includes information indicating the data corresponding to the identifier,
The memory control device according to claim 1 , wherein the identifier acquisition unit acquires the identifier separately from the data.
前記データ受信部は、前記第2メモリの、前記第2読出部によって読み出された前記送信ディスクリプタによって指定されるアドレスから読み出されたデータを前記データとして取得し、
前記識別子は、前記第2デバイスから前記第1デバイスにデータを送信する際の、前記送信ディスクリプタに応じて規定されている、請求項3に記載のメモリ制御装置。 comprising a second reading unit that reads a transmission descriptor stored in a second memory of the second device,
The data receiving unit acquires, as the data, data read from the address specified by the transmission descriptor read by the second reading unit of the second memory,
4. The memory control device according to claim 3 , wherein the identifier is defined according to the transmission descriptor when transmitting data from the second device to the first device.
前記第1デバイス以外の第2デバイスから、1つの通信プロトコルにて複数のデータを受信するデータ受信ステップと、
前記複数のデータそれぞれに対応する受信ディスクリプタを指定する識別子を取得する識別子取得ステップと、
前記メモリに記憶された複数の受信ディスクリプタから、それぞれの前記識別子に対応する受信ディスクリプタを読み出す読出ステップと、
前記複数のデータのそれぞれを、前記メモリの、前記読出ステップにおいて読み出された前記受信ディスクリプタそれぞれにより指定されるアドレスに書き込むデータ書込ステップと、を含み、
前記アドレスは、前記第1デバイスにおいて実行される1つ以上のアプリケーションがアクセス可能な記憶領域を示し、
前記第1デバイスは複数のアプリケーションを実行し、
前記メモリには、アプリケーション毎にアクセス可能な記憶領域が規定されており、
前記識別子は、前記データを使用するアプリケーションを規定するアプリケーション情報を含んでおり、
前記読出ステップにおいて、前記アプリケーション情報が規定するアプリケーションがアクセス可能な記憶領域のアドレスを指定する受信ディスクリプタを、前記識別子に対応する受信ディスクリプタとして読み出し、
前記メモリには、1つの識別子に対応する複数の受信ディスクリプタが記憶されており、
前記1つの識別子に対応する前記複数の受信ディスクリプタは、前記1つの識別子のアプリケーション情報が示すアプリケーションがアクセス可能な記憶領域内の、それぞれ異なるアドレスを指定しており、
前記読出ステップにおいて、前記1つの識別子に対応する前記複数の受信ディスクリプタを、所定の順番で読み出す、制御方法。 A control method for controlling a memory control device that accesses a memory of a first device using a DMA (Direct Memory Access) method to read and write data, the method comprising:
a data receiving step of receiving a plurality of data using one communication protocol from a second device other than the first device;
an identifier obtaining step of obtaining an identifier specifying a reception descriptor corresponding to each of the plurality of data;
a reading step of reading a reception descriptor corresponding to each of the identifiers from a plurality of reception descriptors stored in the memory;
a data writing step of writing each of the plurality of data to an address of the memory specified by each of the reception descriptors read in the reading step,
the address indicates a storage area accessible by one or more applications executed on the first device;
the first device executes a plurality of applications;
In the memory, a storage area that can be accessed for each application is defined,
the identifier includes application information that defines an application that uses the data;
In the reading step, a reception descriptor specifying an address of a storage area accessible by the application defined by the application information is read as a reception descriptor corresponding to the identifier;
The memory stores a plurality of reception descriptors corresponding to one identifier,
The plurality of reception descriptors corresponding to the one identifier each specify a different address within a storage area accessible by the application indicated by the application information of the one identifier,
In the reading step, the plurality of reception descriptors corresponding to the one identifier are read in a predetermined order .
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2019188407A JP7363344B2 (en) | 2019-10-15 | 2019-10-15 | Memory control device and control method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2019188407A JP7363344B2 (en) | 2019-10-15 | 2019-10-15 | Memory control device and control method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2021064166A JP2021064166A (en) | 2021-04-22 |
| JP7363344B2 true JP7363344B2 (en) | 2023-10-18 |
Family
ID=75486521
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2019188407A Active JP7363344B2 (en) | 2019-10-15 | 2019-10-15 | Memory control device and control method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7363344B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117312201B (en) * | 2023-11-29 | 2024-02-13 | 苏州元脑智能科技有限公司 | A data transmission method, device and accelerator equipment, host and storage medium |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2006285300A (en) | 2005-03-31 | 2006-10-19 | Toshiba Corp | Signal transfer apparatus and signal transfer method |
| WO2007129482A1 (en) | 2006-04-06 | 2007-11-15 | Sony Corporation | Bridge, processor unit, information processing apparatus and access control method |
| JP2015207288A (en) | 2014-04-17 | 2015-11-19 | ローベルト ボッシュ ゲゼルシャフト ミット ベシュレンクテル ハフツング | interface unit |
-
2019
- 2019-10-15 JP JP2019188407A patent/JP7363344B2/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2006285300A (en) | 2005-03-31 | 2006-10-19 | Toshiba Corp | Signal transfer apparatus and signal transfer method |
| WO2007129482A1 (en) | 2006-04-06 | 2007-11-15 | Sony Corporation | Bridge, processor unit, information processing apparatus and access control method |
| JP2015207288A (en) | 2014-04-17 | 2015-11-19 | ローベルト ボッシュ ゲゼルシャフト ミット ベシュレンクテル ハフツング | interface unit |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2021064166A (en) | 2021-04-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112214240B (en) | Host output input command execution device and method and computer readable storage medium | |
| US10079916B2 (en) | Register files for I/O packet compression | |
| EP3470971B1 (en) | Method, apparatus, and system for accessing memory device | |
| CN110119304B (en) | Interrupt processing method, device and server | |
| US10585822B2 (en) | Operation method of host system including storage device and operation method of storage device controller | |
| JP6880402B2 (en) | Memory access control device and its control method | |
| JP2021515318A (en) | NVMe-based data reading methods, equipment and systems | |
| CN114662136A (en) | A high-speed encryption and decryption system and method of multi-algorithm IP core based on PCIE channel | |
| US7484030B2 (en) | Storage controller and methods for using the same | |
| JP2003296267A (en) | Bus system and information processing system including bus system | |
| KR102303424B1 (en) | Direct memory access control device for at least one processing unit having a random access memory | |
| US7783817B2 (en) | Method and apparatus for conditional broadcast of barrier operations | |
| JP7363344B2 (en) | Memory control device and control method | |
| CN102027424B (en) | Method for controlling access to regions of a storage comprising a plurality of processes and communication module having a message storage for implementing the method | |
| CN120416368A (en) | Data transmission method, device, electronic device, readable storage medium and program product | |
| US7451254B2 (en) | System and method for adaptive buffer allocation in a memory device interface | |
| US7409486B2 (en) | Storage system, and storage control method | |
| KR101260313B1 (en) | Electric apparatus and data sending/receiving method thereof and slave apparatus and communication method between the plural number of apparatuses | |
| JP2006119724A (en) | CPU system, bus bridge, control method thereof, and computer system | |
| US10459842B1 (en) | Data storage system with configurable prefetch buffers | |
| WO2017005009A1 (en) | External device expansion card and data processing method for input/output external device | |
| CN118363901B (en) | PCIe device, electronic component and electronic device | |
| TWI860846B (en) | Electronic device and host device coupled to memory device | |
| WO2021035609A1 (en) | Interaction method, device and system, and readable storage medium | |
| CN110489359B (en) | Data transmission control method and system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20220817 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20230630 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20230725 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20230825 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20230905 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20230918 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7363344 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |