JP2022044302A - Communication control apparatus and method for controlling communication control apparatus - Google Patents
Communication control apparatus and method for controlling communication control apparatus Download PDFInfo
- Publication number
- JP2022044302A JP2022044302A JP2020149861A JP2020149861A JP2022044302A JP 2022044302 A JP2022044302 A JP 2022044302A JP 2020149861 A JP2020149861 A JP 2020149861A JP 2020149861 A JP2020149861 A JP 2020149861A JP 2022044302 A JP2022044302 A JP 2022044302A
- Authority
- JP
- Japan
- Prior art keywords
- descriptor
- data
- communication control
- control device
- dco
- 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.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/10—Packet switching elements characterised by the switching fabric construction
- H04L49/111—Switch interfaces, e.g. port details
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Communication Control (AREA)
Abstract
【課題】ディスクリプタによる誤ったデータ転送を防止しつつ、ネットワークから受信したデータを高速にメインメモリへと転送する。
【解決手段】DMAC(121)は、第一のディスクリプタ(Dc(X))が「利用可能でない」と判定されると、第二のディスクリプタ(Dc(Y))に従って転送を行う。
【選択図】図1
PROBLEM TO BE SOLVED: To transfer data received from a network to a main memory at high speed while preventing erroneous data transfer by a descriptor.
When it is determined that the first descriptor (Dc (X)) is "not available", the DMAC (121) transfers according to the second descriptor (Dc (Y)).
[Selection diagram] Fig. 1
Description
本発明は、ネットワークから受信したデータをメインメモリへと転送する通信制御機器等に関する。 The present invention relates to a communication control device or the like that transfers data received from a network to a main memory.
従来、ネットワークから受信したデータをメインメモリへと転送する通信制御機器について、ディスクリプタによる誤ったデータ転送を防止する技術が知られている。例えば、下掲の特許文献1には、ディスクリプタを読み出すときに、ディスクリプタが正しいか否かを確認して、メモリのデータのDMA転送の可否を判定するDMA回路が開示されている。DMA回路は、ディスクリプタが正しくないと判定すると、DMA転送を行わずに、CPUにエラー通知を行う。そして、エラーを通知されたCPUによって適切な設定がなされた後に、DMA回路は転送を実行する。
Conventionally, a technique for preventing erroneous data transfer by a descriptor is known for a communication control device that transfers data received from a network to a main memory. For example,
しかしながら、上述のような従来技術は、「受信したデータを、ディスクリプタに従ってメインメモリへと転送する」というデータ受信処理を、高速に実行することができないという問題がある。例えば、上述のような従来技術は、高速な制御周期(例えば、100μs)で周期的に実行すべきデータ受信処理を、前記制御周期内に完了することは困難である。以下、従来技術の抱える問題の詳細を、図8を用いて説明する。 However, the above-mentioned conventional technique has a problem that the data reception process of "transferring the received data to the main memory according to the descriptor" cannot be executed at high speed. For example, in the above-mentioned conventional technique, it is difficult to complete the data reception process that should be periodically executed in a high-speed control cycle (for example, 100 μs) within the control cycle. Hereinafter, the details of the problems of the prior art will be described with reference to FIG.
図8は、上述のような従来技術において、ディスクリプタに従ってデータをメインメモリへと転送する通信制御機器が前記ディスクリプタの許否(当否)を判定してから、前記データを前記メインメモリへと転送するまでに要する時間等を説明する図である。 FIG. 8 shows from the time when the communication control device that transfers data to the main memory according to the descriptor in the above-mentioned conventional technique determines whether or not the descriptor is allowed or rejected, until the data is transferred to the main memory. It is a figure explaining the time required for this.
上述のような従来技術において、前記通信制御機器が前記ディスクリプタの誤りを検知した場合、前記通信制御機器は、その検知結果をCPUへと通知する。上述の通知を受けたCPUは、ディスクリプタを再設定する。そして、CPUによって再設定されたディスクリプタに従って、前記通信制御機器は、データをメインメモリへと転送する。 In the above-mentioned prior art, when the communication control device detects an error in the descriptor, the communication control device notifies the CPU of the detection result. Upon receiving the above notification, the CPU resets the descriptor. Then, according to the descriptor reset by the CPU, the communication control device transfers the data to the main memory.
そのため、図8の(A)に示すように、前記通信制御機器は、CPU(ソフトウェア)によるディスクリプタの再設定処理が完了するまで待機しなければならず、ディスクリプタの誤りを検知してから、データをメインメモリへと転送するまでに要する時間が長い。 Therefore, as shown in FIG. 8A, the communication control device must wait until the descriptor reset processing by the CPU (software) is completed, and after detecting the descriptor error, the data It takes a long time to transfer to the main memory.
また、一般に通信制御機器は、データを受信してからメインメモリへと転送するまでの間、受信したデータを、一時的な格納領域であるバッファ(例えば、FIFO(First In First Out)方式の格納領域であるデータFIFO)に格納する。そして、通信制御機器は、バッファに格納したデータを、ディスクリプタに従ってメインメモリへと転送する。ただし、通信制御機器の備えるバッファの記憶容量は限られているのが通常である。また、通信制御機器は、いったんバッファにデータを格納した後は、そのデータのメインメモリへの転送が完了するまで、そのデータをバッファに保存し続けておくのが原則である。 Further, in general, a communication control device stores the received data in a buffer (for example, a FIFO (First In First Out) method) which is a temporary storage area from the time when the data is received until the time when the data is transferred to the main memory. It is stored in the data FIFO) which is an area. Then, the communication control device transfers the data stored in the buffer to the main memory according to the descriptor. However, the storage capacity of the buffer provided in the communication control device is usually limited. Further, in principle, the communication control device once stores the data in the buffer and then keeps the data in the buffer until the transfer of the data to the main memory is completed.
そのため、図8の(B)に示すように、ディスクリプタの許否を判定してから、データをメインメモリへと転送するまでに要する時間が長くなると、受信したデータをバッファに格納することができず、その結果、受信したデータを喪失する可能性がある。 Therefore, as shown in FIG. 8B, if the time required to transfer the data to the main memory after determining the permission or disapproval of the descriptor becomes long, the received data cannot be stored in the buffer. As a result, the received data may be lost.
図8の(B)に示す例において、従来技術に係る通信制御機器は、データ1を受信した後、さらに、データ2およびデータ3を受信し、受信したデータ1、データ2、および、データ3をバッファへと格納する。そして、前記通信制御機器は、データ1のメインメモリへの転送が完了するまで、つまり、CPU(ソフトウェア)によるディスクリプタの再設定処理が完了するまで、データ1をバッファに保存し続けておく。ただし、バッファの記憶容量は限られているため、前記通信制御機器が受信したデータ1、データ2、および、データ3を格納しているバッファには、新たなデータを格納できるだけの余裕がない。
In the example shown in FIG. 8B, the communication control device according to the prior art receives the
そのため、ソフトウェアによるディスクリプタの再設定処理が完了し、データ1のメインメモリへの転送が完了するまでに、前記通信制御機器がさらにデータ4を受信すると、前記通信制御機器は、データ4を、バッファに格納することができない。そのため、前記通信制御機器は、受信したデータ4をメインメモリへと転送することができず、データ4は失われる。
Therefore, when the communication control device further receives the
図8を用いて説明してきたように、「ディスクリプタの誤りを検知すると、CPUに検知結果を通知し、CPUによって再設定されたディスクリプタに従ってデータをメインメモリへと転送する」という従来技術には、以下の問題がある。すなわち、前記従来技術には、データ転送に要する時間が長くなるという問題があり、また、データ転送に要する時間が長くなった結果、受信したデータが失われる(つまり、メインメモリへと転送できない)可能性があるといった問題がある。 As described with reference to FIG. 8, the conventional technique of "when a descriptor error is detected, the detection result is notified to the CPU and the data is transferred to the main memory according to the descriptor reset by the CPU" is used. There are the following problems. That is, the conventional technique has a problem that the time required for data transfer becomes long, and as a result of the long time required for data transfer, the received data is lost (that is, it cannot be transferred to the main memory). There is a problem that there is a possibility.
本発明の一態様は、ディスクリプタによる誤ったデータ転送を防止しつつ、ネットワークから受信したデータを高速にメインメモリへと転送することができる通信制御機器を実現することを目的とする。 One aspect of the present invention is to realize a communication control device capable of transferring data received from a network to a main memory at high speed while preventing erroneous data transfer by a descriptor.
上記の課題を解決するために、本発明の一態様に係る通信制御機器は、ネットワークから受信したデータをメインメモリへと転送する通信制御機器であって、前記データを格納すべき領域の開始アドレスを規定するディスクリプタを読み込む読込部と、前記読込部によって読み込まれた前記ディスクリプタに規定されている前記開始アドレスが、前記メインメモリにおいて前記データを格納可能な領域として予め設定された領域である許可領域内にあると、前記読込部によって読み込まれた前記ディスクリプタを利用可能であると判定する判定部と、前記読込部によって読み込まれた前記ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する転送部と、を備え、前記ディスクリプタは予め複数用意されており、前記転送部は、(A)前記予め複数用意されたディスクリプタの内、前記読込部によって読み込まれた第一ディスクリプタが、前記判定部によって利用可能であると判定されると、前記第一ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送し、(B)前記第一ディスクリプタが前記判定部によって利用可能でないと判定されると、前記予め複数用意されたディスクリプタの内、前記読込部によって前記第一ディスクリプタよりも後に読み込まれた第二ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する。 In order to solve the above problems, the communication control device according to one aspect of the present invention is a communication control device that transfers data received from the network to the main memory, and is a start address of an area in which the data should be stored. A permission area in which the reading unit for reading the descriptor and the start address specified in the descriptor read by the reading unit are preset areas in the main memory as areas in which the data can be stored. If it is inside, the determination unit for determining that the descriptor read by the reading unit is available, and the area having the start address specified in the descriptor read by the reading unit as the start address. , A transfer unit for transferring the data, and a plurality of the descriptors are prepared in advance, and the transfer unit is (A) the first of the plurality of descriptors prepared in advance, which is read by the reading unit. When the descriptor is determined to be available by the determination unit, the data is transferred to an area having the start address specified in the first descriptor as a start address, and (B) the first descriptor. When it is determined by the determination unit that the data is not available, the start address specified in the second descriptor read by the reading unit after the first descriptor among the plurality of descriptors prepared in advance is assigned. The data is transferred to the area to be the start address.
前記の構成によれば、前記通信制御機器は、前記予め複数用意されたディスクリプタの中から読み込んだ第一ディスクリプタを「利用可能である」と判定すると、前記第一ディスクリプタの規定する開始アドレスを先頭アドレスとする領域にデータを転送する。また、前記通信制御機器は、前記第一ディスクリプタを「利用可能でない」と判定すると、前記予め複数用意されたディスクリプタの中からさらに、前記第二ディスクリプタを読み込む。そして、前記通信制御機器は、前記第二ディスクリプタの規定する前記開始アドレスを先頭アドレスとする領域に、前記データを転送する。 According to the above configuration, when the communication control device determines that the first descriptor read from the plurality of descriptors prepared in advance is "available", the start address specified by the first descriptor is started first. Transfer the data to the area to be the address. Further, when the communication control device determines that the first descriptor is "not available", the communication control device further reads the second descriptor from the plurality of descriptors prepared in advance. Then, the communication control device transfers the data to an area whose head address is the start address defined by the second descriptor.
つまり、前記通信制御機器は、読み込んだ前記第一ディスクリプタの規定する開始アドレスが前記許可領域内にないと判定した場合にも、その判定結果をCPU等に通知することはなく、CPU等に前記第一ディスクリプタを正しいものに再設定させることはない。前記通信制御機器は、前記第一ディスクリプタの規定する開始アドレスが前記許可領域内にないと判定すると、予め用意された前記第二ディスクリプタをさらに読み込み、読み込んだ前記第二ディスクリプタに従って、前記データをメインメモリへと転送する。 That is, even if the communication control device determines that the read start address specified by the first descriptor is not within the permitted area, the communication control device does not notify the CPU or the like of the determination result, and the CPU or the like is described. It does not reset the first descriptor to the correct one. When the communication control device determines that the start address specified by the first descriptor is not within the permitted area, the communication control device further reads the second descriptor prepared in advance, and the data is mainly read according to the read second descriptor. Transfer to memory.
前記通信制御機器は、前記予め複数用意されたディスクリプタの中から前記データの転送に「利用可能なディスクリプタ」を選択し、選択した「利用可能なディスクリプタ」に従って、前記データを転送する。 The communication control device selects an "available descriptor" for transferring the data from the plurality of descriptors prepared in advance, and transfers the data according to the selected "available descriptor".
そのため、前記通信制御機器は、前記ディスクリプタによる誤ったデータ転送を防止することができ、また、前記データの転送に「利用可能なディスクリプタ」をCPU等に再設定させる場合に比べて、前記データの転送に要する時間を短縮することができる。 Therefore, the communication control device can prevent erroneous data transfer by the descriptor, and the data can be transferred as compared with the case where the CPU or the like resets the "usable descriptor" for the data transfer. The time required for transfer can be shortened.
つまり、前記通信制御機器は、ディスクリプタによる誤ったデータ転送を防止しつつ、ネットワークから受信したデータを高速にメインメモリへと転送することができるとの効果を奏する。 That is, the communication control device has the effect of being able to transfer the data received from the network to the main memory at high speed while preventing erroneous data transfer by the descriptor.
特に、「読み込んだディスクリプタに規定されている開始アドレスが、前記許可領域内にあるか否か」の判定は、前記データをネットワークから受信する前であっても、実行可能である。そのため、前記通信制御機器は、「ディスクリプタによる誤ったデータ転送」を防止するための処理を、前記データを受信する前に実行することができる。 In particular, the determination of "whether or not the start address specified in the read descriptor is within the permitted area" can be executed even before the data is received from the network. Therefore, the communication control device can execute a process for preventing "erroneous data transfer by the descriptor" before receiving the data.
前記通信制御機器は、「ディスクリプタによる誤ったデータ転送」を防止するための処理を前記データの受信前に実行しておくことで、前記データを受信してから前記データを前記メインメモリへと転送するまでの時間を短縮できるという効果を奏する。 The communication control device executes a process for preventing "erroneous data transfer by a descriptor" before receiving the data, so that the data is transferred to the main memory after receiving the data. It has the effect of shortening the time required to do so.
ここで、前記通信制御機器は、NIC(Network Interface Card、ネットワーク・インターフェイス・カード)として実現されるのが望ましい。前記通信制御機器は、典型的には、FPGA(Field-Programmable gate array)またはASIC(Application Specific Integrated Circuit)等のハードウェアによる論理回路で構成される。 Here, it is desirable that the communication control device is realized as a NIC (Network Interface Card). The communication control device is typically composed of a logic circuit made of hardware such as an FPGA (Field-Programmable gate array) or an ASIC (Application Specific Integrated Circuit).
ディスクリプタの拒否を判定する前記通信制御機器を、ハードウェアによる論理回路で構成した場合、以下の効果を実現することができる。すなわち、一般的に、処理内容が同じであれば、ハードウェアによる処理の方が、ソフトウェア(具体的には、CPU)による処理よりも、高速で実行することができる。そのため、ハードウェアによる論理回路で構成された前記通信制御機器は、CPUにディスクリプタの拒否を判定させる場合に比べて高速に、ディスクリプタの拒否を判定することができるとの効果を奏する。 When the communication control device for determining the descriptor rejection is configured by a logic circuit by hardware, the following effects can be realized. That is, in general, if the processing contents are the same, the processing by hardware can be executed at a higher speed than the processing by software (specifically, CPU). Therefore, the communication control device configured by the logic circuit by the hardware has an effect that the descriptor rejection can be determined at a higher speed than the case where the CPU determines the descriptor rejection.
特に、前記通信制御機器は、CPU等によりディスクリプタの再設定を必要とせずに、予め複数用意されたディスクリプタの中から、前記データの転送に「利用可能なディスクリプタ」を選択し、選択したディスクリプタに従って転送を実行する。 In particular, the communication control device selects an "usable descriptor" for data transfer from a plurality of descriptors prepared in advance without requiring the descriptor to be reset by a CPU or the like, and follows the selected descriptor. Perform the transfer.
ハードウェアによる論理回路で構成した場合、前記通信制御機器は、前記データの転送に「利用可能なディスクリプタ」を予め複数用意されたディスクリプタの中から選択する処理を極めて高速に実行することができる。また、ハードウェアによる論理回路で構成した場合、前記通信制御機器は、予め複数用意されたディスクリプタの中から選択したディスクリプタに従って、極めて高速に転送を実行することができる。 When configured with a logic circuit by hardware, the communication control device can execute a process of selecting a plurality of "usable descriptors" prepared in advance for data transfer at extremely high speed. Further, when configured by a logic circuit by hardware, the communication control device can execute transfer at extremely high speed according to a descriptor selected from a plurality of descriptors prepared in advance.
したがって、前記通信制御機器をハードウェアによる論理回路で構成した場合、前記通信制御機器は、ディスクリプタによる誤ったデータ転送を防止しつつ、ネットワークから受信したデータを極めて高速に転送することができるとの効果を奏する。 Therefore, when the communication control device is configured by a logic circuit by hardware, the communication control device can transfer the data received from the network at an extremely high speed while preventing erroneous data transfer by the descriptor. It works.
本発明の一態様に係る通信制御機器において、前記判定部は、(A)前記読込部によって読み込まれた前記ディスクリプタに規定されている前記開始アドレスが、前記許可領域内にあり、かつ、(B)受信した前記データのデータサイズと、前記読込部によって読み込まれた前記ディスクリプタに規定されている前記開始アドレスとから算出する、前記データを転送した場合の転送後の領域の末尾アドレスが前記許可領域内にある場合に、前記読込部によって読み込まれた前記ディスクリプタを利用可能であると判定してもよい。 In the communication control device according to one aspect of the present invention, in the determination unit, (A) the start address specified in the descriptor read by the reading unit is in the permitted area, and (B). ) The end address of the area after transfer when the data is transferred, which is calculated from the data size of the received data and the start address specified in the descriptor read by the reading unit, is the permitted area. If it is inside, it may be determined that the descriptor read by the reading unit is available.
前記の構成によれば、前記通信制御機器は、受信した前記データのデータサイズと、前記読込部によって読み込まれた前記ディスクリプタの規定する前記開始アドレスとから、前記末尾アドレスを算出する。そして、前記通信制御機器は、「読み込んだディスクリプタの規定する開始アドレスが前記許可領域内にあり」、かつ、「前記末尾アドレスが前記許可領域内にある」と判定すると、読み込んだ前記ディスクリプタを利用可能であると判定する。 According to the above configuration, the communication control device calculates the end address from the data size of the received data and the start address defined by the descriptor read by the reading unit. Then, when the communication control device determines that "the start address specified by the read descriptor is in the permitted area" and "the end address is in the permitted area", the read descriptor is used. Judge that it is possible.
ここで、「読み込んだディスクリプタの規定する開始アドレスが前記許可領域内にある」場合であっても、「前記末尾アドレスが前記許可領域内にない」時がある。そのような時には、読み込んだディスクリプタは、受信したデータの転送先を決定するディスクリプタとしては不適切であり、つまり、受信したデータの転送先を決定するディスクリプタとしては利用することができない(利用不能である)。 Here, even when "the start address specified by the read descriptor is in the permitted area", there are times when "the end address is not in the permitted area". In such a case, the read descriptor is inappropriate as a descriptor for determining the transfer destination of the received data, that is, it cannot be used as a descriptor for determining the transfer destination of the received data (unusable). be).
そこで、前記通信制御機器は、「読み込んだディスクリプタの規定する開始アドレス」に加えて、受信したデータのデータサイズをも考慮して、「読み込んだディスクリプタが利用可能か否か」を判定する。 Therefore, the communication control device determines "whether or not the read descriptor can be used" in consideration of the data size of the received data in addition to the "start address specified by the read descriptor".
したがって、前記通信制御機器は、開始アドレスに加えて、受信したデータのデータサイズをも考慮することで、予め複数用意されたディスクリプタの中から、受信したデータの転送に「利用可能なディスクリプタ」を、より正確に選択できるとの効果を奏する。 Therefore, the communication control device considers the data size of the received data in addition to the start address, and selects a "usable descriptor" for the transfer of the received data from among a plurality of descriptors prepared in advance. , It has the effect of being able to select more accurately.
本発明の一態様に係る通信制御機器は、予め取得した、前記許可領域の先頭アドレスと前記許可領域のデータサイズとから、前記許可領域を算出してもよい。 The communication control device according to one aspect of the present invention may calculate the permission area from the start address of the permission area and the data size of the permission area acquired in advance.
前記の構成によれば、前記通信制御機器は、前記許可領域の先頭アドレスと前記許可領域のデータサイズとを予め取得しておき、取得した前記許可領域の先頭アドレスと前記許可領域のデータサイズとから、前記許可領域を算出する。 According to the above configuration, the communication control device acquires the start address of the permission area and the data size of the permission area in advance, and obtains the start address of the permission area and the data size of the permission area. From, the permission area is calculated.
したがって、前記通信制御機器は、予め取得した、前記許可領域の先頭アドレスと前記許可領域のデータサイズとから、前記許可領域を算出することができるとの効果を奏する。 Therefore, the communication control device has the effect that the permitted area can be calculated from the start address of the permitted area and the data size of the permitted area acquired in advance.
本発明の一態様に係る通信制御機器は、前記データを受信しようとする都度、前記データを受信する前に前記メインメモリに設定される前記ディスクリプタを格納する格納部をさらに備え、前記第一ディスクリプタは前記格納部に格納されており、前記転送部は、(A)前記第一ディスクリプタが前記判定部によって利用可能でないと判定され、かつ、(B)前記格納部に格納されていた前記第一ディスクリプタとは異なる前記ディスクリプタであって、前記読込部によって前記第一ディスクリプタよりも後に読み込まれた前記ディスクリプタである後行ディスクリプタが、前記判定部によって利用可能であると判定されると、前記後行ディスクリプタを前記第二ディスクリプタとして、前記後行ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送してもよい。 The communication control device according to one aspect of the present invention further includes a storage unit for storing the descriptor set in the main memory before receiving the data each time the data is to be received, and the first descriptor is provided. Is stored in the storage unit, and the transfer unit (A) determines that the first descriptor is not available by the determination unit, and (B) the first storage unit stored in the storage unit. When it is determined by the determination unit that the trailing descriptor, which is the descriptor different from the descriptor and is the descriptor read after the first descriptor by the reading unit, is available, the subsequent descriptor is used. The data may be transferred to an area having the start address specified in the trailing descriptor as the start address, with the descriptor as the second descriptor.
前記の構成によれば、前記通信制御機器は、前記格納部に格納された第一ディスクリプタを「利用可能である」と判定すると、前記第一ディスクリプタの規定する開始アドレスを先頭アドレスとする領域にデータを転送する。 According to the above configuration, when the communication control device determines that the first descriptor stored in the storage unit is "available", the communication control device is set in an area having a start address specified by the first descriptor as a start address. Transfer data.
また、前記通信制御機器は、前記第一ディスクリプタを「利用可能でない」と判定し、かつ、前記後行ディスクリプタを「利用可能である」と判定すると、前記後行ディスクリプタを前記第二ディスクリプタとして、前記後行ディスクリプタに従って転送を実行する。例えば、前記通信制御機器は、前記第一ディスクリプタを「利用可能でない」と判定すると、前記格納部に格納されている前記後行ディスクリプタをさらに読み込む。そして、前記通信制御機器は、読み込んだ前記後行ディスクリプタが「利用可能である」と判定すると、前記後行ディスクリプタの規定する前記開始アドレスを先頭アドレスとする領域に、前記データを転送する。 Further, when the communication control device determines that the first descriptor is "not available" and the trailing descriptor is "available", the trailing descriptor is used as the second descriptor. The transfer is executed according to the following descriptor. For example, when the communication control device determines that the first descriptor is "not available", the communication control device further reads the trailing descriptor stored in the storage unit. Then, when the communication control device determines that the read trailing descriptor is "available", the communication control device transfers the data to an area having the start address defined by the trailing descriptor as the start address.
ここで一般に、或る情報(例えば、数メガバイト(Mbyte)の画像情報)が、何個の前記データ(より正確には、何個のフレームデータ)として送信されるのかを、CPU等(ソフトウェア)は計算していない。例えば、1個の前記データ(フレームデータ)のデータサイズが、通常は「1.5キロバイト(Kbyte)」である場合であっても、CPU等は、その或る情報が、何個の前記データとして送信されるのかを計算していない。 Here, in general, the CPU or the like (software) determines how many of the above data (more accurately, how many frame data) the certain information (for example, image information of several megabytes (Mbyte)) is transmitted. Has not calculated. For example, even if the data size of one piece of the data (frame data) is usually "1.5 kilobytes (Kbyte)", the CPU or the like may use the information such as how many pieces of the data. Not calculated if it will be sent as.
その代わりに、一般にCPU等は、或る情報を受信する前に、その或る情報を常に受信できるように(前記メインメモリへと転送できるように)、十分な数(個数)の前記ディスクリプタを、前記メインメモリに設定しておく。つまり、CPU等は、ネットワークから受信すべき前記データの個数に比して十分余裕のある個数の前記ディスクリプタを、前記データを受信する前に、予め前記メインメモリに設定しておく。 Instead, the CPU or the like generally provides a sufficient number (number) of the descriptors so that the information can always be received (transferred to the main memory) before receiving the information. , Set in the main memory. That is, the CPU or the like sets the descriptors in the main memory in advance before receiving the data, in a number having a sufficient margin with respect to the number of the data to be received from the network.
そして、CPU等によって前記メインメモリに設定された前記ディスクリプタは、前記格納部に格納される。そのため、ネットワークから受信すべき前記データの個数に比して、前記格納部に格納されている前記ディスクリプタの個数は、十分に多い。 Then, the descriptor set in the main memory by the CPU or the like is stored in the storage unit. Therefore, the number of the descriptors stored in the storage unit is sufficiently larger than the number of the data to be received from the network.
したがって、前記通信制御機器は、転送すべき前記データの個数に比して十分多い個数の前記ディスクリプタの中から、前記データの転送に「利用可能なディスクリプタ」を選択することができるとの効果を奏する。 Therefore, the communication control device has the effect that "available descriptors" can be selected for the transfer of the data from the descriptors having a sufficiently large number as compared with the number of the data to be transferred. Play.
本発明の一態様に係る通信制御機器において、前記格納部に格納され、前記読込部によって読み込まれた前記ディスクリプタであって、前記判定部によって利用可能でないと判定された前記ディスクリプタの個数が、予め設定された基準個数を超えると、前記読込部は、前記格納部とは異なる第二格納部に予め格納されている前記ディスクリプタである退避用ディスクリプタを読み込み、前記転送部は、前記読込部によって読み込まれた前記退避用ディスクリプタを前記第二ディスクリプタとして、前記退避用ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送してもよい。 In the communication control device according to one aspect of the present invention, the number of the descriptors stored in the storage unit and read by the reading unit and determined not to be available by the determination unit is determined in advance. When the set reference number is exceeded, the reading unit reads the save descriptor which is the descriptor stored in advance in the second storage unit different from the storage unit, and the transfer unit reads by the reading unit. The saved descriptor may be used as the second descriptor, and the data may be transferred to an area having the start address specified in the save descriptor as a start address.
前記の構成によれば、前記通信制御機器は、読み込んだ「前記格納部に格納されたディスクリプタ」であって、利用不能と判定したディスクリプタの個数が、前記基準個数を超えると、前記第二格納部に予め格納されている前記退避用ディスクリプタを読み込む。そして、前記通信制御機器は、前記退避用ディスクリプタを前記第二ディスクリプタとして、前記退避用ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する。 According to the above configuration, the communication control device is the read "descriptor stored in the storage unit", and when the number of descriptors determined to be unusable exceeds the reference number, the second storage is performed. The save descriptor stored in advance in the unit is read. Then, the communication control device transfers the data to the area where the save descriptor is used as the second descriptor and the start address defined in the save descriptor is the start address.
ここで、読み込んだ「前記格納部に格納されたディスクリプタ」であって、利用不能と判定したディスクリプタの個数が、前記基準個数を超えている場合、以下の事象が発生している可能性がある。すなわち、「前記格納部に格納されたディスクリプタ」の全て、または、その大部分に、異常が発生している可能性がある。そして、「前記格納部に格納されたディスクリプタ」の全て、または、その大部分に、異常が発生している場合、「前記格納部に格納されたディスクリプタ」の中から「利用可能なディスクリプタ」を選択するのは不可能であり、または、多大の時間を要する。 Here, if the number of descriptors determined to be unusable in the read "descriptor stored in the storage unit" exceeds the reference number, the following events may have occurred. .. That is, there is a possibility that an abnormality has occurred in all or most of the "descriptors stored in the storage unit". Then, when an abnormality occurs in all or most of the "descriptors stored in the storage unit", "usable descriptors" are selected from the "descriptors stored in the storage unit". It is impossible or time consuming to choose.
そこで、前記通信制御機器は、「前記格納部に格納されており、利用不能と判定した」ディスクリプタの個数が、前記基準個数を超えると、「前記格納部に格納されたディスクリプタ」に代えて、前記退避用ディスクリプタに従って、前記データを転送する。 Therefore, when the number of descriptors "stored in the storage unit and determined to be unusable" exceeds the reference number, the communication control device replaces the "descriptor stored in the storage unit". The data is transferred according to the save descriptor.
したがって、前記通信制御機器は、「前記格納部に格納されたディスクリプタ」の全て、または、その大部分について、異常が発生している場合にも、前記データを前記メインメモリへと、確実かつ高速に転送することができるとの効果を奏する。 Therefore, the communication control device reliably and quickly transfers the data to the main memory even when an abnormality occurs in all or most of the "descriptors stored in the storage unit". It has the effect of being able to be transferred to.
本発明の一態様に係る通信制御機器において、前記退避用ディスクリプタの規定する開始アドレスは、前記メインメモリにおいて前記データを格納可能な領域であって、前記許可領域とは異なる領域内にあってもよい。 In the communication control device according to one aspect of the present invention, the start address defined by the save descriptor is an area in which the data can be stored in the main memory, even if it is in an area different from the permitted area. good.
前記の構成によれば、前記通信制御機器は、前記退避用ディスクリプタに従って前記データを前記メインメモリへと転送する場合、前記退避用ディスクリプタに従って前記データを、前記許可領域とは異なる領域へと転送する。言い換えれば、前記退避用ディスクリプタに従って前記データが転送される領域は、前記許可領域とは異なる。 According to the above configuration, when the communication control device transfers the data to the main memory according to the save descriptor, the communication control device transfers the data to an area different from the permitted area according to the save descriptor. .. In other words, the area to which the data is transferred according to the save descriptor is different from the permitted area.
前記退避用ディスクリプタの規定する開始アドレスが前記許可領域内にある場合、以下の事象が発生し得る。すなわち、前記退避用ディスクリプタに従って前記許可領域内に転送された或るデータが、前記格納部に格納されている前記ディスクリプタに従って前記許可領域内に転送される別のデータによって、上書きされてしまう可能性がある。 When the start address specified by the save descriptor is within the permitted area, the following events may occur. That is, there is a possibility that a certain data transferred into the permitted area according to the save descriptor may be overwritten by another data transferred into the permitted area according to the descriptor stored in the storage unit. There is.
そして、上述のような事態を防ぐためには、例えば、「前記或るデータが転送された領域と、前記別のデータが転送される領域とが、重複するか」を判断する処理などの煩雑な処理が必要となる。 Then, in order to prevent the above-mentioned situation, for example, a complicated process of determining "whether the area to which the certain data is transferred overlaps with the area to which the other data is transferred" is complicated. Processing is required.
これに対して、前記退避用ディスクリプタの規定する開始アドレスが前記許可領域内にない場合、前記退避用ディスクリプタに従って前記メインメモリへと転送された前記或るデータが、前記別のデータによって上書きされてしまうことはない。 On the other hand, when the start address specified by the save descriptor is not in the permitted area, the certain data transferred to the main memory according to the save descriptor is overwritten by the other data. It won't end up.
したがって、前記通信制御機器は、「前記退避用ディスクリプタに従って転送された或るデータが、前記格納部に格納されている前記ディスクリプタに従って転送される別のデータで上書きされる」といった事態を、煩雑な処理を要せず回避できるとの効果を奏する。 Therefore, the communication control device complicates the situation that "a certain data transferred according to the save descriptor is overwritten by another data transferred according to the descriptor stored in the storage unit". It has the effect of being avoidable without the need for processing.
上記の課題を解決するために、本発明の一態様に係る制御方法は、ネットワークから受信したデータをメインメモリへと転送する通信制御機器の制御方法であって、前記データを格納すべき領域の開始アドレスを規定するディスクリプタを読み込む読込ステップと、前記読込ステップにて読み込まれた前記ディスクリプタに規定されている前記開始アドレスが、前記メインメモリにおいて前記データを格納可能な領域として予め設定された領域である許可領域内にあると、前記読込ステップにて読み込まれた前記ディスクリプタを利用可能であると判定する判定ステップと、前記読込ステップにて読み込まれた前記ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する転送ステップと、を含み、前記ディスクリプタは予め複数用意されており、前記転送ステップは、(A)前記予め複数用意されたディスクリプタの内、前記読込ステップにて読み込まれた第一ディスクリプタが、前記判定ステップにて利用可能であると判定されると、前記第一ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送し、(B)前記第一ディスクリプタが前記判定ステップにて利用可能でないと判定されると、前記予め複数用意されたディスクリプタの内、前記読込ステップにて前記第一ディスクリプタよりも後に読み込まれた第二ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する。 In order to solve the above problems, the control method according to one aspect of the present invention is a control method for a communication control device that transfers data received from a network to a main memory, and is an area for storing the data. A read step in which a descriptor defining a start address is read, and an area in which the start address specified in the descriptor read in the read step is preset as an area in which the data can be stored in the main memory. When it is in a certain permission area, the determination step of determining that the descriptor read in the read step is available, and the start address specified in the descriptor read in the read step are headed. The area to be an address includes a transfer step for transferring the data, and a plurality of the descriptors are prepared in advance. The transfer step is (A) in the read step among the plurality of descriptors prepared in advance. When it is determined that the first descriptor read in the above is available in the determination step, the data is transferred to an area having the start address specified in the first descriptor as a start address. (B) When it is determined that the first descriptor is not available in the determination step, the second descriptor read after the first descriptor in the read step among the plurality of descriptors prepared in advance. The data is transferred to an area having the start address specified in 1.
前記の構成によれば、前記制御方法は、前記予め複数用意されたディスクリプタの中から読み込んだ第一ディスクリプタを「利用可能である」と判定すると、前記第一ディスクリプタの規定する開始アドレスを先頭アドレスとする領域にデータを転送する。また、前記制御方法は、前記第一ディスクリプタを「利用可能でない」と判定すると、前記予め複数用意されたディスクリプタの中からさらに、前記第二ディスクリプタを読み込む。そして、前記制御方法は、前記第二ディスクリプタの規定する前記開始アドレスを先頭アドレスとする領域に、前記データを転送する。 According to the above configuration, when the control method determines that the first descriptor read from the plurality of descriptors prepared in advance is "available", the start address specified by the first descriptor is set as the start address. Transfer the data to the area to be. Further, when the control method determines that the first descriptor is "not available", the second descriptor is further read from the plurality of descriptors prepared in advance. Then, the control method transfers the data to an area having the start address defined by the second descriptor as a start address.
つまり、前記制御方法は、読み込んだ前記第一ディスクリプタの規定する開始アドレスが前記許可領域内にないと判定した場合にも、その判定結果をCPU等に通知することはなく、CPU等に前記第一ディスクリプタを正しいものに再設定させることはない。前記制御方法は、前記第一ディスクリプタの規定する開始アドレスが前記許可領域内にないと判定すると、予め用意された前記第二ディスクリプタをさらに読み込み、読み込んだ前記第二ディスクリプタに従って、前記データをメインメモリへと転送する。 That is, even if the control method determines that the read start address specified by the first descriptor is not within the permitted area, the determination result is not notified to the CPU or the like, and the CPU or the like is notified of the determination result. It does not reconfigure a descriptor to the correct one. When the control method determines that the start address specified by the first descriptor is not within the permitted area, the second descriptor prepared in advance is further read, and the data is stored in the main memory according to the read second descriptor. Transfer to.
前記制御方法は、前記予め複数用意されたディスクリプタの中から前記データの転送に「利用可能なディスクリプタ」を選択し、選択した「利用可能なディスクリプタ」に従って、前記データを転送する。 In the control method, "available descriptors" are selected for transferring the data from the plurality of descriptors prepared in advance, and the data is transferred according to the selected "available descriptors".
そのため、前記制御方法は、前記ディスクリプタによる誤ったデータ転送を防止することができ、また、前記データの転送に「利用可能なディスクリプタ」をCPU等に再設定させる場合に比べて、前記データの転送に要する時間を短縮することができる。 Therefore, the control method can prevent erroneous data transfer by the descriptor, and also, as compared with the case where the CPU or the like resets the "usable descriptor" for the data transfer, the data transfer. The time required for the data can be shortened.
つまり、前記制御方法は、ディスクリプタによる誤ったデータ転送を防止しつつ、ネットワークから受信したデータを高速にメインメモリへと転送することができるとの効果を奏する。 That is, the control method has the effect of being able to transfer data received from the network to the main memory at high speed while preventing erroneous data transfer by the descriptor.
特に、「読み込んだディスクリプタに規定されている開始アドレスが、前記許可領域内にあるか否か」の判定は、前記データをネットワークから受信する前であっても、実行可能である。そのため、前記制御方法は、「ディスクリプタによる誤ったデータ転送」を防止するための処理を、前記データを受信する前に実行することができる。 In particular, the determination of "whether or not the start address specified in the read descriptor is within the permitted area" can be executed even before the data is received from the network. Therefore, the control method can execute a process for preventing "erroneous data transfer by the descriptor" before receiving the data.
前記制御方法は、「ディスクリプタによる誤ったデータ転送」を防止するための処理を前記データの受信前に実行しておくことで、前記データを受信してから前記データを前記メインメモリへと転送するまでの時間を短縮できるという効果を奏する。 In the control method, a process for preventing "erroneous data transfer by a descriptor" is executed before receiving the data, so that the data is transferred to the main memory after receiving the data. It has the effect of shortening the time until.
ここで、前記通信制御機器は、NIC(Network Interface Card、ネットワーク・インターフェイス・カード)として実現されるのが望ましい。前記通信制御機器は、典型的には、FPGA(Field-Programmable gate array)またはASIC(Application Specific Integrated Circuit)等のハードウェアによる論理回路で構成される。 Here, it is desirable that the communication control device is realized as a NIC (Network Interface Card). The communication control device is typically composed of a logic circuit made of hardware such as an FPGA (Field-Programmable gate array) or an ASIC (Application Specific Integrated Circuit).
ディスクリプタの拒否を判定する前記通信制御機器を、ハードウェアによる論理回路で構成した場合、以下の効果を実現することができる。すなわち、一般的に、処理内容が同じであれば、ハードウェアによる処理の方が、ソフトウェア(具体的には、CPU)による処理よりも、高速で実行することができる。そのため、ハードウェアによる論理回路で構成された前記通信制御機器は、CPUにディスクリプタの拒否を判定させる場合に比べて高速に、ディスクリプタの拒否を判定することができるとの効果を奏する。 When the communication control device for determining the descriptor rejection is configured by a logic circuit by hardware, the following effects can be realized. That is, in general, if the processing contents are the same, the processing by hardware can be executed at a higher speed than the processing by software (specifically, CPU). Therefore, the communication control device configured by the logic circuit by the hardware has an effect that the descriptor rejection can be determined at a higher speed than the case where the CPU determines the descriptor rejection.
特に、前記制御方法は、CPU等によりディスクリプタの再設定を必要とせずに、予め複数用意されたディスクリプタの中から、前記データの転送に「利用可能なディスクリプタ」を選択し、選択したディスクリプタに従って転送を実行する。 In particular, in the control method, "available descriptors" are selected for data transfer from a plurality of descriptors prepared in advance without the need for descriptor resetting by a CPU or the like, and the descriptors are transferred according to the selected descriptors. To execute.
ハードウェアによる論理回路で構成した場合、前記通信制御機器は、前記データの転送に「利用可能なディスクリプタ」を予め複数用意されたディスクリプタの中から選択する処理を極めて高速に実行することができる。また、ハードウェアによる論理回路で構成した場合、前記通信制御機器は、予め複数用意されたディスクリプタの中から選択したディスクリプタに従って、極めて高速に転送を実行することができる。 When configured with a logic circuit by hardware, the communication control device can execute a process of selecting a plurality of "usable descriptors" prepared in advance for data transfer at extremely high speed. Further, when configured by a logic circuit by hardware, the communication control device can execute transfer at extremely high speed according to a descriptor selected from a plurality of descriptors prepared in advance.
したがって、前記通信制御機器をハードウェアによる論理回路で構成した場合、前記制御方法は、ディスクリプタによる誤ったデータ転送を防止しつつ、ネットワークから受信したデータを極めて高速に転送することができるとの効果を奏する。 Therefore, when the communication control device is configured by a logic circuit by hardware, the control method has an effect that the data received from the network can be transferred at an extremely high speed while preventing erroneous data transfer by the descriptor. Play.
本発明の一態様によれば、ディスクリプタによる誤ったデータ転送を防止しつつ、ネットワークから受信したデータを高速にメインメモリへと転送することができるとの効果を奏する。 According to one aspect of the present invention, it is possible to transfer data received from the network to the main memory at high speed while preventing erroneous data transfer by the descriptor.
〔実施形態1〕
以下、本発明の一側面に係る実施の形態(以下、「本実施形態」とも表記する)を、図面に基づいて説明する。なお、図中同一または相当部分には同一符号を付してその説明は繰返さない。本実施の形態においては、機械および設備等の制御対象を制御するPLC(Programmable Logic Controller)1の備える通信制御機器10を「ネットワークから受信したデータをメインメモリへと転送する通信制御機器」の典型例として説明を行なう。また、以下の説明において、「N」、「P」、「Q」、「X」、「Y」等は、各々、「1」以上の整数を示すものとする。
[Embodiment 1]
Hereinafter, an embodiment according to one aspect of the present invention (hereinafter, also referred to as “the present embodiment”) will be described with reference to the drawings. The same or corresponding parts in the drawings are designated by the same reference numerals and the description thereof will not be repeated. In the present embodiment, the
§1.適用例
本発明の一態様に係る通信制御機器10についての理解を容易にするため、先ず、本発明が適用される場面の一例について、具体的には、通信制御機器10を備えるPLC1を含む制御システム0の概要について、図2を用いて説明する。
§1. Application Example In order to facilitate understanding of the
(制御システムの概要)
図2は、PLC1を含む制御システム0の概要を示す図である。図2に示すように、制御システム0は、PLC1と、ネットワークハブ2と、各々がネットワークハブ2を介してPLC1に接続されているネットワーク3(1)および3(2)とを含んでいる。以下、ネットワーク3(1)と、ネットワーク3(2)とを特に区別する必要がない場合には、単に「ネットワーク3」と称することがある。ネットワーク3は、1つ以上のネットワークデバイスを含んでいる。
(Overview of control system)
FIG. 2 is a diagram showing an outline of
図2に例示する制御システム0においては、ネットワークハブ2を介して、複数のネットワーク3が、PLC1に接続している。制御システム0における通信には、ギガ帯域が使用されてもよい。
In the
PLC1は、制御システム0の全体を制御する制御装置である。ネットワークハブ2は、PLC1と複数のネットワーク3との間の通信を管理するネットワークハブまたはネットワークスイッチである。図2に示す制御システム0においては、PLC1の1つのネットワークポート(すなわち、図1の受信ポート130)に対して、複数のネットワーク3が、例えば、ネットワーク3(1)および3(2)が、存在している。
PLC1 is a control device that controls the
ここで、ネットワーク3(1)および3(2)のいずれもが制御ネットワークであってもよいし、すなわち、PLC1と通信を行う全てのネットワーク3が制御ネットワークであってもよい。また、ネットワーク3(1)および3(2)のいずれか一方が制御ネットワークであり、他方がデータネットワークであってもよく、つまり、PLC1と通信を行うネットワーク3について、制御ネットワークとデータネットワークとが混在していてもよい。
Here, any of the networks 3 (1) and 3 (2) may be a control network, that is, all the
例えば、ネットワーク3が制御ネットワークである場合、PLC1は、生産設備内の入力機器及び出力機器の制御を司る制御装置であり、また、ネットワークデバイスは、例えば、生産設備内の入力機器及び出力機器である。PLC1とネットワークデバイスとは、ネットワーク3を介してサイクリックに通信を行なうことで、INデータ及びOUTデータ(以下、「IOデータ」という)の送受信を行ない、PLC1は、生産設備の全体を制御する。すなわち、ネットワーク3が制御ネットワークである場合、制御システム0は、PLC1をマスタ装置(データ伝送を管理するマスタ装置)とし、ネットワークデバイスをスレーブ装置とするマスタ・スレーブ制御システムと捉えることができる。
For example, when the
ネットワーク3が制御ネットワークである場合、ネットワーク3は、EtherCAT(Ethernet for Control Automation Technology:登録商標)規格等の産業用イーサネット(登録商標)規格に準拠するものであってもよい。ネットワーク3が制御ネットワークである場合、ネットワーク3は、EtherNet/IP(登録商標)規格に準拠するものであってもよい。
When the
以下では、図2におけるPLC1とネットワークデバイスとの間の通信(以下、「ネットワーク通信」とも称する)がEthernet規格に準拠する例について説明する。また、CPU30と通信制御機器10とは、PCIe(Peripheral Component Interconnect Express)によって通信可能に接続されているものとする。
Hereinafter, an example in which communication between PLC1 and a network device in FIG. 2 (hereinafter, also referred to as “network communication”) conforms to the Ethernet standard will be described. Further, it is assumed that the
なお、図2には、ネットワークハブ2を介して、複数のネットワーク3が、PLC1に接続する制御システム0を例示したが、制御システム0において、PLC1に、複数のネットワーク3がネットワークハブ2を介して接続することは必須ではない。制御システム0において、1つのネットワーク3(特に、1つの制御ネットワーク)が、ネットワークハブ2を介さずに、PLC1に接続してもよい。例えば、マスタ・スレーブ制御システムである制御システム0において、マスタ装置であるPLC1と、各々がスレーブ装置である1つ以上のネットワークデバイスとを、一筆書きの形式で通信可能に接続してもよい。
Note that FIG. 2 illustrates a
(本実施形態に係る通信制御機器の概要)
詳細は図1を用いて後述するが、図2に例示したPLC1は、データ受信処理を実行する通信制御機器10と、PLC1の記憶手段であるメインメモリ20と、メインメモリ20に転送されたデータDtを用いて各種の処理を実行するCPU30とを備えている。
(Outline of communication control device according to this embodiment)
The details will be described later with reference to FIG. 1, but the PLC1 exemplified in FIG. 2 is a
(受信データのメインメモリへの転送に係る、一般的な処理について)
PLC1において、ネットワーク3から制御周期Cc(例えば、100μs)ごとに受信した各種のデータDtは、例えば以下のようにして、メインメモリ20へと転送される。すなわち、先ずCPU30は、「ネットワーク3からPLC1が受信したデータDtを格納すべき、メインメモリ20中の領域」の開始アドレスAsを規定するディスクリプタDcを、メインメモリ20に設定する。例えば、CPU30は、PLC1がデータDtを受信しようとする都度(例えば、制御周期Ccごとに)、データDtを受信する前に、通常ディスクリプタDcoを、メインメモリ20に設定する。
(About general processing related to transfer of received data to main memory)
In the
CPU30は、通常ディスクリプタDcoのメインメモリ20への設定を完了すると、その旨を通信制御機器10へと通知する。CPU30から通常ディスクリプタDcoの設定完了を通知された通信制御機器10は、通知に従ってメインメモリ20を参照し、CPU30によって設定された通常ディスクリプタDcoを読み込む。具体的には、通信制御機器10は、CPU30によってメインメモリ20に設定された通常ディスクリプタDcoを、第一ディスクリプタFIFO125へと格納する。第一ディスクリプタFIFO125は、通常ディスクリプタDcoを格納しておくための格納領域であり、例えばFIFO(First In First Out)方式の格納領域である。
When the
PLC1がネットワーク3からデータDtを受信すると、通信制御機器10は、データ受信処理を実行する。すなわち、通信制御機器10は、先ず、PLC1がネットワーク3から受信したデータDtを、データFIFO127に格納する。データFIFO127は、データDtを一時的に格納しておくバッファ(格納領域)であり、例えばFIFO方式の格納領域である。
When the
通信制御機器10は、データFIFO127に格納されているデータDtを、ディスクリプタDcに従ってメインメモリ20に転送し、例えば、第一ディスクリプタFIFO125に格納されている通常ディスクリプタDcoに従ってメインメモリ20に転送する。具体的には、通信制御機器10は、ディスクリプタDcに規定されている開始アドレスAsを先頭アドレスとするメインメモリ20中の領域に、データDtを転送する。
The
データDtのメインメモリ20への転送を完了すると、通信制御機器10は、データDtのメインメモリ20への転送に用いたディスクリプタDcに対応する、メインメモリ20中のディスクリプタDcを、以下の情報によって更新する。すなわち、通信制御機器10は、「メインメモリ20へと転送したデータDtのデータサイズを示す情報」と、「データDtの転送に用いられたことを示す情報」とによって、更新する。したがって、データDtのメインメモリ20への転送に用いられたディスクリプタDcに対応する、メインメモリ20中のディスクリプタDcには、「そのデータDtのデータサイズを示す情報」と「データ転送に用いられたことを示す情報」とが追記される。
When the transfer of the data Dt to the main memory 20 is completed, the
(誤ったディスクリプタによるデータの消失等について)
ディスクリプタDcに規定されている開始アドレスAsに誤りがある場合、そのディスクリプタDcに従ってデータDtをメインメモリ20へと転送することによって、以下のような事態が発生し得る。すなわち、誤った開始アドレスAsを規定したディスクリプタDcに従ってメインメモリ20へと転送された或るデータDt(X)によって、データDt(X)よりも前にメインメモリ20へと転送された別のデータDt(Y)が上書きされる事態が発生し得る。
(About data loss due to incorrect descriptor)
If there is an error in the start address As specified in the descriptor Dc, the following situation may occur by transferring the data Dt to the main memory 20 according to the descriptor Dc. That is, another data transferred to the main memory 20 before the data Dt (X) by one data Dt (X) transferred to the main memory 20 according to the descriptor Dc defining the erroneous start address As. A situation may occur in which Dt (Y) is overwritten.
(ディスクリプタの許否の判定について)
誤った開始アドレスAsを規定した通常ディスクリプタDcoを利用することで、データDtを消失するといった事態が発生しないよう、通信制御機器10は、通常ディスクリプタDcoに従って転送を行う前に、通常ディスクリプタDcoの許否を判定する。
(About the judgment of whether or not the descriptor is allowed)
The
具体的には、通信制御機器10は、「データDtの転送が許可されている領域」として予め設定しておいた標準受信領域Rgoを用いて、データDtをメインメモリへと転送する際に用いる通常ディスクリプタDcoの許否を判断する。例えば、通信制御機器10は、標準受信領域Rgoの先頭アドレスと標準受信領域Rgoのデータサイズとを予め取得しておき、取得した標準受信領域Rgoの先頭アドレスと標準受信領域Rgoのデータサイズとから、標準受信領域Rgoを算出(設定)しておく。
Specifically, the
そして、通信制御機器10は、通常ディスクリプタDcoに規定されている開始アドレスAsが標準受信領域Rgo内にあるかを判定する(第一判定処理FJ)。また、通信制御機器10は、データDtのデータサイズと、通常ディスクリプタDcoに規定されている開始アドレスAsとから、「データDtを転送した場合の転送後の領域」の末尾アドレスAeを算出する。そして、通信制御機器10は、算出した末尾アドレスAeが標準受信領域Rgo内にあるかを判定する(第二判定処理SJ)。
Then, the
通信制御機器10は、開始アドレスAsが標準受信領域Rgo内にあり、かつ、末尾アドレスAeが標準受信領域Rgo内にあると、その通常ディスクリプタDcoを、データDtの転送に用いることが可能な「利用可能なディスクリプタ」と判定する。通信制御機器10は、開始アドレスAsおよび末尾アドレスAeの少なくとも一方が標準受信領域Rgo内にないと、その通常ディスクリプタDcoを、データDtの転送に用いることのできない「利用不能なディスクリプタ」と判定する。
When the start address As is in the standard reception area Rgo and the end address Ae is in the standard reception area Rgo, the
(予め準備しておいた複数のディスクリプタを用いて転送を実行する)
通信制御機器10は、ネットワーク3から受信したデータDtをメインメモリ20へと転送する際、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」であると判定すると、別のディスクリプタDc(Y)を用いて、転送を実行する。通信制御機器10は、複数のディスクリプタDcを予め準備しており、或る通常ディスクリプタDco(X)が「利用不能なディスクリプタ」であっても、別のディスクリプタDc(Y)を「利用可能なディスクリプタ」として用いて、転送を実行する。
(Execute transfer using multiple descriptors prepared in advance)
When the
通信制御機器10は、先ずその或る通常ディスクリプタDco(X)について、上述の判定を実行し、つまり、その或る通常ディスクリプタDco(X)の当否を判定する。
The
通信制御機器10は、その或る通常ディスクリプタDco(X)を「利用可能なディスクリプタ」であると判定すると、その通常ディスクリプタDco(X)に従って、データDtのメインメモリ20への転送を実行する。
When the
通信制御機器10は、その或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」であると判定すると、以下の処理を実行する。すなわち、通信制御機器10は、その或る通常ディスクリプタDco(X)が「利用不能なディスクリプタ」であるとの判定結果をCPU30に通知することなく、予め準備しておいた別のディスクリプタDc(Y)に従って、データDtの転送を実行する。
When the
つまり、通信制御機器10は、或る通常ディスクリプタDco(X)に加えて、その或る通常ディスクリプタDco(X)が「利用不能なディスクリプタ」である場合のために、別のディスクリプタDc(Y)を、予め準備している。
That is, the
(複数の通常ディスクリプタの中から「利用可能なディスクリプタ」を選択する)
或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」と判定した場合に、通信制御機器10がデータDtの転送を実行するために「利用可能なディスクリプタ」として用いるディスクリプタDcは、例えば通常ディスクリプタDco(Y)である。
(Select "Available Descriptor" from multiple normal descriptors)
When a certain normal descriptor Dco (X) is determined to be an "unusable descriptor", the descriptor Dc used by the
つまり、通信制御機器10は、或る通常ディスクリプタDco(X)以外に、別の通常ディスクリプタDco(Y)を予め準備しておく。そして、通信制御機器10は、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」と判定した場合、「利用可能なディスクリプタ」と判定した別の通常ディスクリプタDco(Y)を用いて、データDtの転送を実行する。
That is, the
例えば、通信制御機器10は、ネットワーク3から受信したデータDtをメインメモリ20へと転送する際に従うべきディスクリプタDcとして、或る通常ディスクリプタDco(X)を含む複数の通常ディスクリプタDcoを、予め準備している。
For example, the
そして、通信制御機器10は、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」であると判定すると、その判定結果をCPU30に通知することなく、別の通常ディスクリプタDco(Y)について、その許否を判定する。通信制御機器10は、その別の通常ディスクリプタDco(Y)を「利用可能なディスクリプタ」であると判定すると、その別のディスクリプタDc(Y)に従って、データDtをメインメモリ20へと転送する。
Then, when the
つまり、通信制御機器10は、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」であると判定すると、その或る通常ディスクリプタDco(X)をスキップし、その或る通常ディスクリプタDco(X)は、データDtの転送に用いない。通信制御機器10は、予め準備しておいた複数の通常ディスクリプタDcoの中から別の通常ディスクリプタDco(Y)をさらに読み込み、その別の通常ディスクリプタDco(Y)の拒否を判定する。通信制御機器10は、その別の通常ディスクリプタDco(Y)を「利用可能なディスクリプタ」であると判定すると、その別のディスクリプタDc(Y)の規定する開始アドレスAs(Y)を先頭アドレスとする領域に、データDtを転送する。
That is, when the
以上の処理は、以下のように整理することができる。すなわち、通信制御機器10は、予め複数の通常ディスクリプタDcoを準備しておく。そして、通信制御機器10は、予め複数用意された通常ディスクリプタDcoの中から「利用可能なディスクリプタ」と判定する通常ディスクリプタDcoが現れるまで、予め複数用意された通常ディスクリプタDcoを順次読み込み、各々の許否を判定する。通信制御機器10は、予め複数用意された通常ディスクリプタDcoの中から「利用可能なディスクリプタ」と判定した通常ディスクリプタDcoが現れると、利用可能なディスクリプタ」と判定した通常ディスクリプタDcoに従って転送を実行する。
The above processing can be organized as follows. That is, the
つまり、通信制御機器10は、ネットワーク3から受信したデータDtをメインメモリ20へと転送する処理である受信処理において、以下のようにして、データDtの転送に用いるべき「利用可能なディスクリプタ」を選択してもよい。すなわち、通信制御機器10は、予め用意された複数の通常ディスクリプタDcoの中から、データDtの転送に用いるべき「利用可能なディスクリプタ」を選択してもよい。
That is, in the reception process, which is the process of transferring the data Dt received from the
通信制御機器10は、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」であると判定しても、その判定結果をCPU30に通知することはなく、CPU30にその或る通常ディスクリプタDco(X)を正しい内容に再設定させることもない。その代わりに、通信制御機器10は、予め用意された複数の通常ディスクリプタDcoの中から別の通常ディスクリプタDco(Y)を読み込む。そして、通信制御機器10は、別の通常ディスクリプタDco(Y)の許否を判定し、その別の通常ディスクリプタDco(Y)を「利用可能なディスクリプタ」であると判定すると、その別の通常ディスクリプタDco(Y)に従ってデータDtを転送する。
Even if the
通信制御機器10は、或る通常ディスクリプタDco(X)について「利用不能」と判定しても、データDtの転送に用いるべき「利用可能なディスクリプタ」をCPU30に再設定させず、例えば、別の通常ディスクリプタDco(Y)に従って転送を実行する。つまり、通信制御機器10は、予め用意された複数の通常ディスクリプタDcoの中から「利用可能なディスクリプタ」を選択し、選択した「利用可能なディスクリプタ」に従って、データDtを転送する。
Even if the
そのため、通信制御機器10は、「利用可能なディスクリプタ」をCPU30に再設定させる場合に比べて、データDtの転送に要する時間を短縮することができる。
Therefore, the
ここで、例えば、或る通常ディスクリプタDco(X)が「利用可能なディスクリプタ」であったため、その或る通常ディスクリプタDco(X)を用いて転送を行う場合に、転送までに要する時間が時間T(X)であったとする。また、或る通常ディスクリプタDco(X)が「利用不能なディスクリプタ」であったため、別の通常ディスクリプタDco(Y)を用いて転送を行うことになった場合に、転送までに要する時間が時間T(Y)であったとする。 Here, for example, since a certain normal descriptor Dco (X) is an "available descriptor", when a transfer is performed using the certain normal descriptor Dco (X), the time required for the transfer is time T. It is assumed that it was (X). Further, since a certain normal descriptor Dco (X) is an "unusable descriptor", when the transfer is performed using another normal descriptor Dco (Y), the time required for the transfer is time T. It is assumed that it was (Y).
この時、或る通常ディスクリプタDco(X)と別の通常ディスクリプタDco(Y)とが予め用意されている場合、時間T(X)と時間T(Y)との差は、十分に小さくなる。特に、通信制御機器10をハードウェアによる論理回路で構成した場合、時間T(X)と時間T(Y)との差は、無視できるほどに小さくすることができる。つまり、通信制御機器10は、或る通常ディスクリプタDco(X)が「利用不能なディスクリプタ」であったため、別の通常ディスクリプタDco(Y)を用いて転送を行うことになった場合にも、時間T(X)とほぼ同じ時間で、データDtを転送できる。
At this time, when a certain normal descriptor Dco (X) and another normal descriptor Dco (Y) are prepared in advance, the difference between the time T (X) and the time T (Y) becomes sufficiently small. In particular, when the
通信制御機器10は、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」であると判定しても、その或る通常ディスクリプタDco(X)をスキップし、別のディスクリプタDc(Y)に従って転送を実行する。通信制御機器10は、CPU30による「利用可能なディスクリプタ」の再設定を待たずに、予め準備しておいた別のディスクリプタDc(Y)に従って転送を実行するため、時間T(X)とほぼ同じ時間である時間T(Y)で、データDtを転送することができる。
Even if the
(退避用ディスクリプタを「利用可能なディスクリプタ」として用いる)
或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」と判定した場合に、通信制御機器10がデータDtの転送を実行するために「利用可能なディスクリプタ」として用いるディスクリプタDcは、例えば退避用ディスクリプタDceである。
(Use the save descriptor as the "usable descriptor")
When a certain normal descriptor Dco (X) is determined to be an "unusable descriptor", the descriptor Dc used by the
例えば、CPU30は、通常ディスクリプタDcoとは別に、退避用ディスクリプタDceを、データDtを受信する前に、メインメモリ20に設定しておく。そして、CPU30によってメインメモリ20に設定された退避用ディスクリプタDceは、退避用ディスクリプタDceを格納しておくための、FIFO方式の格納領域である第二ディスクリプタFIFO126に格納される。すなわち、本実施形態において、ディスクリプタDcは、通常ディスクリプタDcoと退避用ディスクリプタDceとに大別される。
For example, the
具体的には、通信制御機器10は、或る通常ディスクリプタDco(X)以外に、退避用ディスクリプタDceを予め準備している。通信制御機器10は、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」と判定した場合、退避用ディスクリプタDceを「利用可能なディスクリプタ」として、退避用ディスクリプタDceを用いて、データDtの転送を実行してもよい。
Specifically, the
例えば、通信制御機器10は、「利用不能なディスクリプタ」であると判定した通常ディスクリプタDcoの個数であるエラー個数Ctが、予め設定しておいた基準個数Nrを超えると、以下の処理を実行する。すなわち、エラー個数Ctが基準個数Nrを超えると、通信制御機器10は、退避用ディスクリプタDce(Y)に従って、データDtをメインメモリ20へと転送する。具体的には、通信制御機器10は、退避用ディスクリプタDce(Y)に規定されている開始アドレスAsを先頭アドレスとするメインメモリ20中の領域に、データDtを転送してもよい。
For example, the
基準個数Nrとして「0」が予め設定されていた場合、通信制御機器10は、以下の処理を実行する。すなわち、通信制御機器10は、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」と判定すると、他の通常ディスクリプタDcoの当否を判定することなく、退避用ディスクリプタDceを用いて、データDtの転送を実行する。
When "0" is preset as the reference number Nr, the
ここで、例えば、或る通常ディスクリプタDco(X)が「利用可能なディスクリプタ」であったため、その或る通常ディスクリプタDco(X)を用いて転送を行う場合に、転送までに要する時間が時間T(X)であったとする。また、或る通常ディスクリプタDco(X)が「利用不能なディスクリプタ」であったため、退避用ディスクリプタDce(Y)を用いて転送を行うことになった場合に、転送までに要する時間が時間T(Y)であったとする。 Here, for example, since a certain normal descriptor Dco (X) is an "available descriptor", when a transfer is performed using the certain normal descriptor Dco (X), the time required for the transfer is time T. It is assumed that it was (X). Further, since a certain normal descriptor Dco (X) is an "unusable descriptor", when the transfer is performed using the backup descriptor Dce (Y), the time required for the transfer is time T (). It is assumed that it was Y).
この時、或る通常ディスクリプタDco(X)と退避用ディスクリプタDce(Y)とが予め用意されている場合、時間T(X)と時間T(Y)との差は、十分に小さくなる。特に、通信制御機器10をハードウェアによる論理回路で構成した場合、時間T(X)と時間T(Y)との差は、無視できるほどに小さくすることができる。つまり、通信制御機器10は、或る通常ディスクリプタDco(X)が「利用不能なディスクリプタ」であったため、退避用ディスクリプタDce(Y)を用いて転送を行うことになった場合にも、時間T(X)とほぼ同じ時間で、データDtを転送できる。
At this time, when a certain normal descriptor Dco (X) and the save descriptor Dce (Y) are prepared in advance, the difference between the time T (X) and the time T (Y) becomes sufficiently small. In particular, when the
これまで説明してきたように、通信制御機器10は、データDtの転送に際して、先ず、或る通常ディスクリプタDco(X)を読み込み、その拒否を判定する。通信制御機器10は、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」であると判定すると、「利用不能なディスクリプタ」であると判定した通常ディスクリプタDcoの個数(エラー個数Ct)が、基準個数Nrを超えていないかを判定する。エラー個数Ctが基準個数Nrを超えていないと判定すると、通信制御機器10は、予め準備しておいた複数の通常ディスクリプタDcoの中から、別の通常ディスクリプタDcoを読み込み、その許否を判定する。或る通常ディスクリプタDco(X)の次に通信制御機器10が読み込む通常ディスクリプタDco(Y)は、或る通常ディスクリプタDco(X)に後行する通常ディスクリプタDcoであり、後行ディスクリプタDcとも称する。
As described above, when transferring the data Dt, the
(A)通信制御機器10は、読み込んだ別の通常ディスクリプタDcoを「利用可能なディスクリプタ」であると判定すると、「利用可能なディスクリプタ」と判定したその別の通常ディスクリプタDcoに従って、データDtの転送を実行する。
(A) When the
(B)通信制御機器10は、読み込んだ別の通常ディスクリプタDcoを「利用不能なディスクリプタ」であると判定すると、さらに、「エラー個数Ctが基準個数Nrを超えていないか」を判定する。エラー個数Ctが基準個数Nrを超えていないと判定すると、通信制御機器10は、予め準備しておいた複数の通常ディスクリプタDcoの中から、さらに別の通常ディスクリプタDcoを読み込み、その許否を判定する。通信制御機器10は、読み込んだ通常ディスクリプタDcoを「利用不能なディスクリプタ」であると判定すると、「エラー個数Ctが基準個数Nrを超えた」と判定するまで、さらに別の通常ディスクリプタDcoを読み込み、その許否を判定する。
(B) When the
読み込んだ通常ディスクリプタDcoの中から、「利用可能なディスクリプタ」と判定した通常ディスクリプタDcoが現れると、通信制御機器10は、「利用可能なディスクリプタ」と判定した通常ディスクリプタDcoに従って、データDtの転送を実行する。
When the normal descriptor Dco determined to be "available descriptor" appears from the read normal descriptor Dco, the
そして、通信制御機器10は、「エラー個数Ctが基準個数Nrを超えた」と判定すると、退避用ディスクリプタDceを読み込み、退避用ディスクリプタDceの開始アドレスAsを先頭アドレスとする領域に、データDtを転送する。
Then, when the
つまり、「エラー個数Ctが基準個数Nrを超える」、または、『「利用可能なディスクリプタ」と判定した通常ディスクリプタDcoが現れる』まで、通信制御機器10は、以下の処理を繰り返す。すなわち、通信制御機器10は、予め準備しておいた通常ディスクリプタDcoを順次読み込み、その許否を順次判定する。
That is, the
「エラー個数Ctが基準個数Nrを超える」と、通信制御機器10は、退避用ディスクリプタDceを読み込み、退避用ディスクリプタDceの規定する開始アドレスAsを先頭アドレスとする領域に、データDtを転送する。
When "the number of errors Ct exceeds the reference number Nr", the
『「利用可能なディスクリプタ」と判定した通常ディスクリプタDcoが現れる』と、通信制御機器10は、「利用可能なディスクリプタ」と判定した通常ディスクリプタDcoの規定する開始アドレスAsを先頭アドレスとする領域に、データDtを転送する。
"A normal descriptor Dco determined to be an" available descriptor "appears", the
(標準受信領域Rgoと退避用受信領域Rgeとの関係について)
詳細は後述するが、退避用ディスクリプタDce(Y)の規定する開始アドレスAsは、「標準受信領域Rgoとは異なる、メインメモリ20中の領域(後述する「退避用受信領域Rge」)」内にある。言い換えれば、退避用ディスクリプタDce(Y)に従ってデータDtが転送される場合のデータDtの転送先(格納先)の領域である退避用受信領域Rgeと、標準受信領域Rgoとは、メインメモリ20中の互いに異なる領域である。
(Relationship between standard reception area Rgo and backup reception area Rge)
Although the details will be described later, the start address As defined by the save descriptor Dce (Y) is in the “area in the main memory 20 (“reserve reception area Rge” described later) different from the standard reception area Rgo). be. In other words, the save receive area Rge, which is the area of the transfer destination (storage destination) of the data Dt when the data Dt is transferred according to the save descriptor Dce (Y), and the standard receive area Rgo are in the main memory 20. Are different areas of each other.
§2.構成例
これまでに図2を用いて概要を説明してきた通信制御機器10、および、通信制御機器10を含むPLC1について、次に、図1を用いてその詳細を説明していく。
§2. Configuration Example The
図1は、PLC1の構成例を示す図である。図1に例示する通り、PLC1は、ハードウェア構成として、通信制御機器10と、メインメモリ20と、CPU30とを含む。PLC1は、さらに、各種のプログラムおよびパラメータなどのデータを不揮発的に保持する不揮発性メモリと、外部装置とPLC1とを接続するためのUSBコネクタなどを含んでもよい。通信制御機器10と、メインメモリ20と、CPU30と、不揮発性メモリ(不図示)との間は、各種のバス(内部バス)を介してそれぞれ結合されている。
FIG. 1 is a diagram showing a configuration example of PLC1. As illustrated in FIG. 1, the
CPU30は、典型的には、汎用的なコンピュータアーキテクチャに準じて構成され、内部クロックに従って順次命令コードを解釈して実行する。CPU30は、ハードウェア構成としては、1つ以上のCPUコアと、ネットワーク制御部とを含んでいる。
The
メインメモリ20は、PLC1の記憶手段であり、例えば、PLC1(特に、通信制御機器10)がネットワーク3から受信したデータDtが格納される。CPU30は、メインメモリ20に格納されているデータDtに対して、各種の演算処理を実行する。
The main memory 20 is a storage means of the
メインメモリ20は、揮発性の記憶領域(RAM)であり、ネットワーク3から受信し、CPU30による各種の演算処理の対象となるデータDtの格納に加えて、PLC1へ電源投入後にCPU30で実行されるべき各種プログラムを保持する。また、メインメモリ20は、CPU30による各種プログラムの実行時の作業用メモリとしても使用される。このようなメインメモリ20として、例えば、DRAM(Dynamic Random Access Memory)、SRAM(Static Random Access Memory)等を用いることができる。
The main memory 20 is a volatile storage area (RAM), and is executed by the
図1に例示するメインメモリ20には、データDtと共に、PLC1がデータDtを受信しようとする都度(例えば、制御周期Ccごとに)、データDtを受信する前に、CPU30によって設定される通常ディスクリプタDcoが格納されている。通常ディスクリプタDcoは、例えば、PLCが受信する特定のデータDtに対応し、対応するデータDtのメインメモリ20中での格納先アドレス(つまり、開始アドレスAs)、対応するデータDtのメインメモリ20中でのデータサイズ等を示す情報を含む。
The main memory 20 illustrated in FIG. 1 is a normal descriptor set by the
前述の通り、PLC1は不図示の不揮発性メモリをさらに備えていてもよく、不揮発性メモリは、各種のプログラムおよびパラメータなどのデータを不揮発的に保持する。これらのデータは、必要に応じて、CPU30がアクセスできるようにメインメモリ20にコピーされる。このような不揮発性メモリは、フラッシュメモリのような半導体メモリを用いることができる。あるいは、ハードディスクドライブのような磁気記録媒体、DVD-RAM(Digital Versatile Disk Random Access Memory)のような光学記録媒体などを用いることもできる。
As described above, the
通信制御機器10は、ネットワーク3からのデータDtを受信し、受信したデータDtをメインメモリ20へと格納(転送)するデータ転送装置であり、例えば、NIC(Network Interface Card)として実現される。通信制御機器10は、典型的には、FPGA(Field-Programmable gate array)またはASIC(Application Specific Integrated Circuit)等のハードウェアによる論理回路で構成される。通信制御機器10は、メインメモリ20、CPU30、および、不揮発性メモリ(不図示)の各々と、データの送受信が可能に構成されている。
The
通信制御機器10は、受信ポート130を介してネットワーク3と接続され、ネットワーク3とのデータの遣り取りを制御し、特に、データDtの受信を制御する。通信制御機器10は、例えば、ネットワーク3における物理層およびデータリンク層の機能を提供する。すなわち、通信制御機器10は、ネットワーク3の準拠する規格に従い、送信データの送信およびデータDtの受信を制御する。具体的には、通信制御機器10は、ネットワーク3に接続されているネットワークデバイスからデータDtを受信し、受信したデータDtをデータFIFO127に格納する。
The
詳細は後述するが、PLC1は、CPU30ではなく、ハードウェアによる論理回路で構成した通信制御機器10によって、ネットワーク3から受信したデータDtの、メインメモリ20への転送を制御し、特に、転送先を決定する。したがって、PLC1は、CPU30の処理負荷を増大させることなく、ハードウェアによる論理回路で構成した通信制御機器10によって、データDtを、メインメモリ20の所望の領域へと転送することができるとの効果を奏する。
Although the details will be described later, the
図1に例示する通信制御機器10は、機能ブロックとして、IF110と、受信処理部120と、受信ポート130とを備えている。図1に例示する通信制御機器10について、記載の簡潔性を担保するため、送信ポートを介してネットワーク3へと送信データを送信する構成などの、本実施の形態に直接関係のない構成は、省略している。ただし、実施の実情に則して、通信制御機器10は、当該省略された構成を備えてもよい。
The
IF(Interface)110は、通信制御機器10(特に、DMAC121)が、メインメモリ20、CPU30、および、不揮発性メモリ(不図示)の各々と通信するためのインターフェースである。
The IF (Interface) 110 is an interface for the communication control device 10 (particularly, DMAC121) to communicate with each of the main memory 20, the
受信ポート130で受信されたデータDt(受信データ)は、データFIFO127へと格納される。
The data Dt (received data) received on the receiving
受信処理部120は、「ネットワーク3から受信したデータDt(具体的には、データFIFO127に格納されているデータDt)を、予め準備されたディスクリプタDcに従って、メインメモリ20へと転送する処理」である受信処理を実行する。受信処理部120は、DMAC121と、アドレス決定部122と、第一ディスクリプタFIFO125と、第二ディスクリプタFIFO126と、データFIFO127とを含んでいる。
The
DMAC(Direct Memory Access Controller)121は、メインメモリ20と、第一ディスクリプタFIFO125、第二ディスクリプタFIFO126、および、データFIFO127の各々との間のデータ交換を実行する。
The DMAC (Direct Memory Access Controller) 121 executes data exchange between the main memory 20 and each of the
例えば、DMAC121は、データDtの受信の都度(例えば、制御周期Ccごとに)、データDtの受信前に、CPU30によってメインメモリ20に設定された通常ディスクリプタDcoを読み出して、第一ディスクリプタFIFO125に格納する。また、DMAC121は、CPU30によって、特定のデータDtとは無関係にメインメモリ20に設定された退避用ディスクリプタDceを読み出して、第二ディスクリプタFIFO126に格納する。
For example, the
DMAC121は、データFIFO127に格納されている受信データ(データDt)を、先頭から順に、メインメモリ20へと格納する。DMAC121は、アドレス決定部122から通知される『データDtの転送に「利用可能なディスクリプタ」に規定されている開始アドレスAs』を先頭アドレスとするメインメモリ20中の領域に、データFIFO127に格納されているデータDtを転送する。
The
DMAC121は、データDtのメインメモリ20への転送を完了すると、ライトバックディスクリプタをメインメモリ20へと転送し、つまり、メインメモリ20中のディスクリプタをライトバックディスクリプタで上書きする。具体的には、DMAC121は、データDtのメインメモリ20への転送に用いたディスクリプタDcに対応する、メインメモリ20中のディスクリプタDcを、ライトバックディスクリプタで上書きする。ライトバックディスクリプタとは、データDtのメインメモリ20への転送に用いたディスクリプタDcに、以下の2つの情報を追記したディスクリプタDcである。すなわち、「そのディスクリプタDcに従ってメインメモリ20へと転送したデータDtの、データサイズを示す情報」と、「データDtの転送に用いられたことを示す情報」とを追記したディスクリプタDcである。
When the
アドレス決定部122は、予め準備しておいた複数のディスクリプタDcの中から、データDtの転送に用いることが可能な「利用可能なディスクリプタ」を選択し、選択した「利用可能なディスクリプタ」の開始アドレスAsを、DMAC121に通知する。アドレス決定部122は、読込部123と、判定部124とを含む。
The
判定部124によって、或る通常ディスクリプタDcoが『データDtの転送に用いることが可能な「利用可能なディスクリプタ」である』と判定されると、アドレス決定部122は、以下の情報をDMAC121に通知する。すなわち、アドレス決定部122は、『データDtの転送に用いることが可能な「利用可能なディスクリプタ」である』と判定された、その或る通常ディスクリプタDcoの規定する開始アドレスAsを、DMAC121に通知する。
When the
アドレス決定部122は、読込部123によって退避用ディスクリプタDceが読み込まれると、読込部123によって読み込まれた退避用ディスクリプタDceの規定する開始アドレスAsを、DMAC121に通知する。すなわち、アドレス決定部122は、退避用ディスクリプタDceを、データDtの転送に用いることが可能な「利用可能なディスクリプタ」であるとし、退避用ディスクリプタDceの規定する開始アドレスAsを、DMAC121に通知する。
When the save descriptor Dce is read by the
読込部123は、ディスクリプタDcを読み込み、読み込んだディスクリプタDcの規定する開始アドレスAsを判定部124に通知する。例えば、読込部123は、データDtの転送の転送に際して先ず、第一ディスクリプタFIFO125に格納されている通常ディスクリプタDcoを読み込み、読み込んだ通常ディスクリプタDcoの規定する開始アドレスAsを、判定部124に通知する。
The
また、読込部123は、判定部124から、或る通常ディスクリプタDcoが「利用不能なディスクリプタ」であるとの判定結果を通知されると、以下の判定を実行する。すなわち、読込部123は、判定部124によって「利用不能なディスクリプタ」であると判定された通常ディスクリプタDcoの個数(エラー個数Ct)が、基準個数Nrを超えていないかを判定する。
Further, when the
読込部123は、エラー個数Ctが基準個数Nrを超えていないと判定すると、第一ディスクリプタFIFO125を参照して別の通常ディスクリプタDcoを読み込み、その別の通常ディスクリプタDcoの規定する開始アドレスAsを判定部124に通知する。例えば、読込部123は、第一ディスクリプタFIFO125において、或る通常ディスクリプタDcoの次に格納されている通常ディスクリプタDco(つまり、或る通常ディスクリプタDcoの後行ディスクリプタ)を読み込む。
When the
或る通常ディスクリプタDcoが「利用不能なディスクリプタ」であるとの判定結果を通知された読込部123は、エラー個数Ctが基準個数Nrを超えるまで、第一ディスクリプタFIFO125に格納されている通常ディスクリプタDcoを順次読み込む。そして、読込部123は、読み込んだ通常ディスクリプタDcoの規定する開始アドレスAsを、判定部124に通知する。
The
読込部123は、エラー個数Ctが基準個数Nrを超えたと判定すると、第二ディスクリプタFIFO126に格納されている退避用ディスクリプタDceを読み込む。アドレス決定部122は、読込部123によって読み込まれた退避用ディスクリプタDceの規定する開始アドレスAsを、DMAC121に通知する。
When the
例えば、読込部123は、CPU30から、基準個数Nrを、予め取得しておく。
For example, the
(基準個数の値の一例)
基準個数Nrは、例えば「3」とするのが望ましい。
(Example of standard number of values)
The reference number Nr is preferably "3", for example.
ここで、通常ディスクリプタDcoがデータDtの転送に「利用不能なディスクリプタ」であると判定される場合として、主に以下の2つのケースが想定される。すなわち、第一に、「通常ディスクリプタDcoの規定する開始アドレスAsが、標準受信領域Rgo内にない(例えば、開始アドレスAsが、標準受信領域Rgoの末尾アドレスを超えたアドレスを示している)」ケースである。第二に、「ネットワーク3から受信したデータDtのデータサイズが想定よりも大きく、末尾アドレスAeが、標準受信領域Rgo内にない」ケースである。
Here, the following two cases are mainly assumed as cases where the normal descriptor Dco is determined to be an "unusable descriptor" for the transfer of data Dt. That is, first, "the start address As specified by the normal descriptor Dco is not in the standard reception area Rgo (for example, the start address As indicates an address exceeding the end address of the standard reception area Rgo)". It is a case. The second case is "the data size of the data Dt received from the
上述の2つの典型的なケースのいずれもが発生したとしても、3つ目の通常ディスクリプタDcoは、データDtの転送に「利用可能なディスクリプタ」であると判定される可能性が高い。通常ディスクリプタDcoが3つ続けて「利用不能なディスクリプタ」であると判定される可能性は低く、通常ディスクリプタDcoが3つ続けて「利用不能なディスクリプタ」であると判定された場合には、何らかの異常が発生している可能性がある。 Even if both of the above two typical cases occur, the third normal descriptor Dco is likely to be determined to be an "available descriptor" for the transfer of data Dt. It is unlikely that three normal descriptors Dco will be determined to be "unusable descriptors" in a row, and if three normal descriptors Dco are determined to be "unusable descriptors" in a row, something will happen. An abnormality may have occurred.
そのため、基準個数Nrを「3」とすることによって、通信制御機器10は、以下の2つの効果を実現することが可能となる。すなわち、第一に、上述の2つの典型的なケースのいずれもが発生したとしても、通信制御機器10は、退避用ディスクリプタDceに従うのではなく、通常ディスクリプタDco(3つ目の通常ディスクリプタDco)に従って、データDtの転送を実行し得る。第二に、通信制御機器10は、何らかの異常が発生した場合であっても、退避用ディスクリプタDceに従って、確実にデータDtの転送を実行することができる。
Therefore, by setting the reference number Nr to "3", the
また、前述の通り、基準個数Nrは、データDtの転送に「利用不能なディスクリプタ」と判定され得る通常ディスクリプタDcoの個数である。そして、複数の通常ディスクリプタDcoの各々が規定する開始アドレスAsの間隔は、例えば、「1.5KByte(キロバイト)」である。そのため、基準個数Nrを「3」とした場合、「1.5*3=4.5Kbyte」の領域が、「転送されるデータDtのために確保しておいたが、実際には使用されなかった領域」、つまり、「無駄な領域」となり得る。「無駄な領域」が増えることになるため、基準個数Nrは、例えば「10」などの大きな値とはしない方が望ましい。そこで、基準個数Nrは、例えば「3」などの小さな値とするのが望ましい。 Further, as described above, the reference number Nr is the number of normal descriptors Dco that can be determined as "unusable descriptors" for the transfer of data Dt. The interval of the start address As defined by each of the plurality of normal descriptors Dco is, for example, "1.5 KByte (kilobytes)". Therefore, when the reference number Nr is set to "3", the area of "1.5 * 3 = 4.5Kbyte" is reserved for the data Dt to be transferred, but it is not actually used. It can be a "data area", that is, a "useless area". Since the "waste area" increases, it is desirable that the reference number Nr is not set to a large value such as "10". Therefore, it is desirable that the reference number Nr is a small value such as "3".
(基準個数の決定方法例)
読込部123は、CPU30から、基準個数Nr自体に代えて、基準個数Nrを決定する方法を予め取得しておいてもよい。例えば、読込部123は、「CPU30によって設定された通常ディスクリプタDcoであって、判定部124が許否を未だ判定していない通常ディスクリプタDcoの個数Xから、『2』を減じた値を基準個数Nrとする」という決定方法を予め取得してもよい。ただし、基準個数Nrは「0」以上の整数とする。そして、読込部123は、予め取得した上述の決定方法に基づいて基準個数Nrを決定し、決定した基準個数Nrを利用してもよい。上述の個数Xは、「第一ディスクリプタFIFO125に格納されている通常ディスクリプタDcoであって、判定部124が許否を未だ判定していない通常ディスクリプタDcoの個数」と言い換えることもできる。
(Example of how to determine the standard number)
The
例えば、個数Xが「1」である場合、判定部124が或る通常ディスクリプタDcoを「利用不能なディスクリプタ」と判定すると、判定部124が拒否を判定すべき次の通常ディスクリプタDcoは残っていない。そのため、読込部123は、基準個数Nrを「0」とするのが望ましい。
For example, when the number X is "1" and the
例えば、個数Xが「4」である場合、読込部123は、基準個数Nrを「2=4-2」とするのが望ましい。個数Xが「4」である場合、メインメモリ20へと転送すべきデータDtが複数(例えば、2つ)あったとしても、通信制御機器10は、基準個数Nrを「2」とすることで、それら複数のデータDtの各々を、通常ディスクリプタDcoに従って転送し得る。
For example, when the number X is "4", it is desirable that the
例えば、第一ディスクリプタFIFO125に許否を未判定の4つの通常ディスクリプタDcoが格納されている場合、通信制御機器10は、上述の決定方法に基づいて、基準個数Nrを「2」に決定する。そして、通信制御機器10は、第一のデータDt(0)および第二のデータDt(1)の各々の転送に際して、以下の処理を実行し得る。
For example, when four normal descriptors Dco whose permission or rejection has not been determined are stored in the
すなわち、通信制御機器10は、第一の通常ディスクリプタDco(0)および第二の通常ディスクリプタDco(1)を、第一のデータDt(0)の転送に「利用不能なディスクリプタ」と判定しても、第三の通常ディスクリプタDco(2)の拒否を判定する。そして、通信制御機器10は、第三の通常ディスクリプタDco(2)を、第一のデータDt(0)の転送に「利用可能なディスクリプタ」と判定すると、第三の通常ディスクリプタDco(2)に従って、第一のデータDt(0)を転送する。
That is, the
また、通信制御機器10は、第四の通常ディスクリプタDco(3)の拒否を判定する。そして、通信制御機器10は、第四の通常ディスクリプタDco(3)を、第二のデータDt(1)の転送に「利用可能なディスクリプタ」と判定すると、第四の通常ディスクリプタDco(3)に従って、第二のデータDt(1)を転送する。
Further, the
上述の通り、「個数Xから、『2』を減じた値を基準個数Nrとする」という決定方法に基づいて基準個数Nrを決定することによって、通信制御機器10は、以下の効果を実現することができる。すなわち、通信制御機器10は、メインメモリ20へと転送すべきデータDtが複数あったとしても、それら複数のデータDtの各々を、通常ディスクリプタDcoに従って、メインメモリ20へと転送し得るという効果を実現することができる。
As described above, the
判定部124は、読込部123によって読み込まれた通常ディスクリプタDcoの拒否を判定し、例えば、その通常ディスクリプタDcoの規定する開始アドレスAsを用いて、第一判定処理FJおよび第二判定処理SJを実行する。
The
第一判定処理FJとして、判定部124は、読込部123から、「読込部123によって読み込まれた通常ディスクリプタDcoの開始アドレスAs」を通知されると、通知された開始アドレスAsが標準受信領域Rgo内にあるかを判定する。
As the first determination process FJ, when the
また、判定部124は、読込部123から通知された開始アドレスAsと、データDtのデータサイズとから、「開始アドレスAsを先頭アドレスとする領域に、データDtを転送した場合の転送後の領域」の末尾アドレスAeを算出する。そして、判定部124は、第二判定処理SJとして、算出した末尾アドレスAeが標準受信領域Rgo内にあるかを判定する。
Further, the
判定部124は、開始アドレスAsが標準受信領域Rgo内にあり、かつ、末尾アドレスAeが標準受信領域Rgo内にあると、「読込部123によって読み込まれた通常ディスクリプタDco」を、データDtの転送に「利用可能なディスクリプタ」と判定する。アドレス決定部122は、判定部124によって「利用可能なディスクリプタ」である』と判定された通常ディスクリプタDcoの規定する開始アドレスAsを、DMAC121に通知する。
When the start address As is in the standard reception area Rgo and the end address Ae is in the standard receive area Rgo, the
判定部124は、開始アドレスAsおよび末尾アドレスAeの少なくとも一方が標準受信領域Rgo内にないと、「読込部123によって読み込まれた通常ディスクリプタDco」を、データDtの転送に「利用不能なディスクリプタ」と判定する。判定部124は、「読込部123によって読み込まれた通常ディスクリプタDco」を「利用不能なディスクリプタ」と判定したという判定結果を、読込部123に通知する。
If at least one of the start address As and the end address Ae is not in the standard reception area Rgo, the
例えば、判定部124は、CPU30から、標準受信領域Rgoの先頭アドレスと標準受信領域Rgoのデータサイズとを、予め取得しておく。そして、判定部124は、取得した標準受信領域Rgoの先頭アドレスと標準受信領域Rgoのデータサイズとから、標準受信領域Rgoを算出する。
For example, the
第一ディスクリプタFIFO125には、CPU30によってメインメモリ20に設定された通常ディスクリプタDcoが格納され、例えば、FIFO(first in, first out、先入れ先出し)方式で格納される。CPU30が、通常ディスクリプタDcoのメインメモリ20への設定を完了して、通信制御機器10に受信許可を発行すると、通信制御機器10(具体的には、DMAC121)は、メインメモリ20から通常ディスクリプタDcoを読み出す。そして、DMAC121は、読み出した通常ディスクリプタDcoを、第一ディスクリプタFIFO125に格納する。
The normal descriptor Dco set in the main memory 20 by the
第二ディスクリプタFIFO126には、CPU30によってメインメモリ20に設定された退避用ディスクリプタDceが格納され、例えば、FIFO(first in, first out、先入れ先出し)方式で格納される。CPU30が、退避用ディスクリプタDceのメインメモリ20への設定を完了して、通信制御機器10に受信許可を発行すると、通信制御機器10(具体的には、DMAC121)は、メインメモリ20から退避用ディスクリプタDceを読み出す。そして、DMAC121は、読み出した退避用ディスクリプタDceを、第二ディスクリプタFIFO126に格納する。
The save descriptor Dce set in the main memory 20 by the
データFIFO127には、PLC1(特に、通信制御機器10)がネットワーク3から受信したデータDt(受信データ)が一時的に格納され、例えば、FIFO方式で格納される。
The data Dt (received data) received from the
(通常ディスクリプタと退避用ディスクリプタとの区別について)
本実施形態において、ディスクリプタDcは予め複数用意され、通常ディスクリプタDcoと、退避用ディスクリプタDceとに大別することができる。
(Regarding the distinction between normal descriptors and save descriptors)
In the present embodiment, a plurality of descriptors Dc are prepared in advance, and can be roughly classified into a normal descriptor Dco and a save descriptor Dce.
通常ディスクリプタDcoは、PLC1がデータDtを受信しようとする都度(例えば、制御周期Ccごとに)、データDtを受信する前に、CPU30によってメインメモリ20に設定される。CPU30によってメインメモリ20に設定された通常ディスクリプタDcoは、DMAC121によって第一ディスクリプタFIFO125に格納される。
Normally, the descriptor Dco is set in the main memory 20 by the
退避用ディスクリプタDceは、データDtの受信とは無関係に、CPU30によってメインメモリ20に予め設定される。
CPU30によってメインメモリ20に設定された退避用ディスクリプタDceは、DMAC121によって第二ディスクリプタFIFO126に格納される。
The save descriptor Dce is preset in the main memory 20 by the
The save descriptor Dce set in the main memory 20 by the
例えば、CPU30は、或るデータDt(X)を受信する前に、その或るデータDt(X)を転送すべきメインメモリ20中の領域(特に、その先頭アドレス)を指示するために、メインメモリ20に通常ディスクリプタDco(X)を設定する。CPU30は、或るデータDt(X)を転送すべきメインメモリ20中の領域を指示するために、メインメモリ20に通常ディスクリプタDco(X1)、Dco(X2)、Dco(X3)、・・・、Dco(Xn)を設定してもよい。そして、CPU30によってメインメモリ20に設定された通常ディスクリプタDco(X)(または、通常ディスクリプタDco(X1)、Dco(X2)、Dco(X3)、・・・、Dco(Xn))は、第一ディスクリプタFIFO125に格納される。つまり、通常ディスクリプタDcoは、PLCが受信する特定のデータDtに対応する(または、対応すべき)ディスクリプタDcであり、例えば、通常ディスクリプタDco(X)は、PLCが受信する特定の或るデータDt(X)に対応する。
For example, the
これに対して、退避用ディスクリプタDceは、PLCが受信する特定のデータDtには対応しないディスクリプタDcであり、PLCが受信する任意のデータDtについて、その転送先(特に、その先頭アドレス)を規定するディスクリプタDcである。「退避用ディスクリプタDceの規定する開始アドレスAs」を先頭アドレスとする、メインメモリ20中の領域は、退避用受信領域Rge(退避用領域)とも称される。退避用受信領域Rgeは、PLCが受信する任意のデータDtを格納可能な領域であり、「特定のデータDtを格納すべき領域としてCPU30が指定する領域(つまり、標準受信領域Rgo(許可領域))」とは異なる。
On the other hand, the save descriptor Dce is a descriptor Dc that does not correspond to the specific data Dt received by the PLC, and defines the transfer destination (particularly, the start address) of any data Dt received by the PLC. Descriptor Dc to be used. The area in the main memory 20 having the "start address As specified by the save descriptor Dce" as the start address is also referred to as a save receive area Rge (save area). The save reception area Rge is an area capable of storing arbitrary data Dt received by the PLC, and is "an area designated by the
これまで図1を用いてその構成例を説明してきた通信制御機器10について、次に、通信制御機器10が実行する受信処理の具体例等を、図3から図5を用いて説明していく。
The
(『通常ディスクリプタの中から「利用可能なディスクリプタ」を選択する』例)
図3は、通信制御機器10が、予め準備された複数の通常ディスクリプタDcoを順次読み込み、「利用可能」と判定した通常ディスクリプタDcoに従って、データDtをメインメモリ20へと転送する例を説明する図である。図3に示す例では、データFIFO127に、データDt(0)およびデータDt(1)がFIFO方式で格納されている。また、第一ディスクリプタFIFO125には、通常ディスクリプタDco(0)、Dco(1)、Dco(2)、・・・、Dco(N)が予め格納されている。
("Select" available descriptor "from normal descriptors" example)
FIG. 3 is a diagram illustrating an example in which the
(先頭のデータの転送例)
通信制御機器10は、データFIFO127の先頭に格納されたデータDt(0)を転送するために、先ず、第一ディスクリプタFIFO125の先頭に格納された通常ディスクリプタDco(0)の拒否を判定する。
(Example of transferring the first data)
In order to transfer the data Dt (0) stored at the head of the
具体的には、先ず、読込部123は、第一ディスクリプタFIFO125の先頭に格納された通常ディスクリプタDco(0)を読み込み、通常ディスクリプタDco(0)に規定されている開始アドレスAs(0)を、判定部124に通知する。
Specifically, first, the
判定部124は、開始アドレスAs(0)が、予め設定しておいた標準受信領域Rgo内にあるかを判定する(第一判定FJ)。
The
また、判定部124は、データDt(0)のデータサイズと、開始アドレスAs(0)とから、「通常ディスクリプタDco(0)に従ってデータDt(0)を転送した場合の転送後の領域」の末尾アドレスAe(0,0)を算出する。そして、通信制御機器10は、算出した末尾アドレスAe(0,0)が、予め設定しておいた標準受信領域Rgo内にあるかを判定する(第二判定SJ)。
Further, the
判定部124は、開始アドレスAs(0)が標準受信領域Rgo内にあり、かつ、末尾アドレスAe(0,0)が標準受信領域Rgo内にあると、通常ディスクリプタDco(0)が、データDt(0)の転送に「利用可能なディスクリプタ」であると判定する。アドレス決定部122は、判定部124によってデータDt(0)の転送に「利用可能なディスクリプタ」であると判定された通常ディスクリプタDco(0)に規定されている開始アドレスAs(0)を、DMAC121に通知する。
In the
DMAC121は、アドレス決定部122から通知される『データDtの転送に「利用可能なディスクリプタ」に規定されている開始アドレスAs』を先頭アドレスとするメインメモリ20中の領域に、データDtを転送する。DMAC121は、『データDt(0)の転送に「利用可能なディスクリプタ」である通常ディスクリプタDco(0)に規定されている開始アドレスAs(0)』を先頭アドレスとするメインメモリ20中の領域に、データDt(0)を転送する。
The
DMAC121は、データDt(0)のメインメモリ20への転送を完了すると、メインメモリ20中の通常ディスクリプタDco(0)をライトバックディスクリプタで上書きする。その結果、メインメモリ20中の通常ディスクリプタDco(0)には、「データDt(0)のデータサイズを示す情報」と、「データDt(0)の転送に用いられたことを示す情報」とが追記される。
When the
(次のデータの転送例)
通信制御機器10は、データDt(1)を転送するために、第一ディスクリプタFIFO125において通常ディスクリプタDco(0)の次に格納されている通常ディスクリプタDco(1)の拒否を判定する。つまり、通信制御機器10は、第一ディスクリプタFIFO125に格納されている通常ディスクリプタDcoであって、その拒否を判定していない通常ディスクリプタDcoの先頭である、通常ディスクリプタDco(1)の拒否を判定する。
(Example of transferring the following data)
The
具体的には、先ず、読込部123は、通常ディスクリプタDco(1)を読み込み、通常ディスクリプタDco(1)に規定されている開始アドレスAs(1)を、判定部124に通知する。
Specifically, first, the
判定部124は、開始アドレスAs(1)が、予め設定しておいた標準受信領域Rgo内にあるかを判定する(第一判定FJ)。
The
また、判定部124は、データDt(1)のデータサイズと、開始アドレスAs(1)とから、「通常ディスクリプタDco(1)に従ってデータDt(1)を転送した場合の転送後の領域」の末尾アドレスAe(1,1)を算出する。そして、通信制御機器10は、算出した末尾アドレスAe(1,1)が、予め設定しておいた標準受信領域Rgo内にあるかを判定する(第二判定SJ)。
Further, the
図3に示すように、通常ディスクリプタDco(1)には、CPU30が通常ディスクリプタDco(1)で設定したつもりの、標準受信領域Rgo内の開始アドレスAs’(1)に代えて、標準受信領域Rgo外の開始アドレスAs(1)が規定されている。
As shown in FIG. 3, in the normal descriptor Dco (1), the standard reception area is replaced with the start address As'(1) in the standard reception area Rgo that the
判定部124は、開始アドレスAs(1)が標準受信領域Rgo内にないことを確認すると、通常ディスクリプタDco(1)を「利用不能なディスクリプタ」であると判定する。判定部124は、この判定結果を、CPU30に通知することなく、読込部123に通知する。
When the
通常ディスクリプタDco(1)が「利用不能なディスクリプタ」であるとの判定結果を通知された読込部123は、第一ディスクリプタFIFO125において通常ディスクリプタDco(1)の次に格納されている通常ディスクリプタDco(2)を読み込む。そして、読込部123は、読み込んだ通常ディスクリプタDco(2)に規定されている開始アドレスAs(2)を、判定部124に通知する。
The
判定部124は、開始アドレスAs(2)が、予め設定しておいた標準受信領域Rgo内にあるかを判定する(第一判定FJ)。
The
また、判定部124は、データDt(1)のデータサイズと、開始アドレスAs(2)とから、「通常ディスクリプタDco(2)に従ってデータDt(1)を転送した場合の転送後の領域」の末尾アドレスAe(1,2)を算出する。そして、通信制御機器10は、算出した末尾アドレスAe(1,2)が、予め設定しておいた標準受信領域Rgo内にあるかを判定する(第二判定SJ)。
Further, the
判定部124は、開始アドレスAs(2)が標準受信領域Rgo内にあり、かつ、末尾アドレスAe(1,2)が標準受信領域Rgo内にあると、通常ディスクリプタDco(2)がデータDt(1)の転送に「利用可能なディスクリプタ」であると判定する。アドレス決定部122は、判定部124によってデータDt(1)の転送に「利用可能なディスクリプタ」であると判定された通常ディスクリプタDco(2)に規定されている開始アドレスAs(2)を、DMAC121に通知する。
In the
DMAC121は、アドレス決定部122から通知される『データDtの転送に「利用可能なディスクリプタ」に規定されている開始アドレスAs』を先頭アドレスとするメインメモリ20中の領域に、データDtを転送する。DMAC121は、『データDt(1)の転送に「利用可能なディスクリプタ」である通常ディスクリプタDco(2)に規定されている開始アドレスAs(2)』を先頭アドレスとするメインメモリ20中の領域に、データDt(1)を転送する。
The
DMAC121は、データDt(1)のメインメモリ20への転送を完了すると、メインメモリ20中の通常ディスクリプタDco(2)をライトバックディスクリプタで上書きする。その結果、メインメモリ20中の通常ディスクリプタDco(2)には、「データDt(1)のデータサイズを示す情報」と、「データDt(1)の転送に用いられたことを示す情報」とが追記される。
When the
(通常ディスクリプタの個数について)
ここで一般に、或る情報(例えば、数メガバイト(Mbyte)の画像情報)が、何個のデータDt(より正確には、何個のフレームデータ)として送信されるのかを、CPU30(ソフトウェア)は計算していない。例えば、1個のデータDt(フレームデータ)のデータサイズが、通常は「1.5キロバイト(Kbyte)」である場合であっても、CPU30は、その或る情報が、何個のデータDtとして送信されるのかを計算していない。
(Regarding the number of normal descriptors)
Here, in general, the CPU 30 (software) determines how many data Dt (more accurately, how many frame data) a certain information (for example, several megabytes (Mbyte) of image information) is transmitted. Not calculated. For example, even if the data size of one data Dt (frame data) is usually "1.5 kilobytes (Kbyte)", the
その代わりに、一般にCPU30(ソフトウェア)は、或る情報を受信する前に、その或る情報を常に受信できるように、十分な数(個数)の通常ディスクリプタDcoを、メインメモリ20に設定しておく。 Instead, the CPU 30 (software) generally sets a sufficient number (number) of normal descriptors Dco in the main memory 20 so that the certain information can always be received before receiving the certain information. deep.
つまり、CPU30は、例えば制御周期CcごとにPLC1が受信すべきデータDtの個数に比して十分余裕のある個数の通常ディスクリプタDcoを、PLC1がデータDtを受信する前に、予めメインメモリ20に設定しておく。そして、CPU30によってメインメモリ20に設定された通常ディスクリプタDcoは、DMAC121によって、第一ディスクリプタFIFO125に格納される。
That is, for example, the
そのため、データFIFO127に格納されているデータDtの個数に比して、第一ディスクリプタFIFO125に格納されている通常ディスクリプタDcoの個数は、十分に多い。したがって、アドレス決定部122(特に、判定部124)は、転送すべきデータDtの個数に比して十分多い個数の通常ディスクリプタDcoの中から、データDtの転送に「利用可能なディスクリプタ」を選択することができる。
Therefore, the number of normal descriptors Dco stored in the
(CPUがディスクリプタの拒否を把握する方法について)
前述の通り、DMAC121は、データDtの転送を完了すると、転送に用いた通常ディスクリプタDcoに対応する、メインメモリ20中の通常ディスクリプタDcoをライトバックディスクリプタで上書きする。その結果、転送に用いられた通常ディスクリプタDcoに対応する、メインメモリ20中の通常ディスクリプタDcoには、「データDtのデータサイズを示す情報」と、「データDtの転送に用いられたことを示す情報」とが追記される。
(How the CPU knows when a descriptor is rejected)
As described above, when the transfer of the data Dt is completed, the
したがって、CPU30は、「データDtの転送に用いられたことを示す情報」を参照することによって、メインメモリ20中の通常ディスクリプタDcoについて、その許否を把握することができる。
Therefore, the
例えば、DMAC121は、転送に用いられた通常ディスクリプタDcoに対応する、メインメモリ20中の通常ディスクリプタDcoについて、通常ディスクリプタDco中の項目の一つである「結果フラグ」を、「0」から「1」へと更新する。CPU30は、「結果フラグ」によって、メインメモリ20中の通常ディスクリプタDcoの内、どの通常ディスクリプタDcoが転送に用いられ、どの通常ディスクリプタDcoが転送に用いられなかったかを把握することができる。
For example, the
また、DMAC121は、転送に用いられなかった通常ディスクリプタDcoに対応する、メインメモリ20中の通常ディスクリプタDcoについて、通常ディスクリプタDco中の項目の一つである「破棄フラグ」を、「0」から「1」へと更新してもよい。CPU30は、「破棄フラグ」によって、メインメモリ20中の通常ディスクリプタDcoの内、データDtの転送に用いられなかった通常ディスクリプタDcoを把握することができる。
Further, the
(『退避用ディスクリプタを「利用可能なディスクリプタ」として用いる』例)
図4は、通信制御機器10が、退避用ディスクリプタDceを読み込み、退避用ディスクリプタDceに従ってデータDtをメインメモリ20へと転送する例を説明する図である。通信制御機器10(特に、DMAC121)は、判定部124によって「利用不能なディスクリプタ」であると判定された通常ディスクリプタDcoの個数であるエラー個数Ctが、予め設定しておいた基準個数Nrを超えると、以下の処理を実行する。すなわち、エラー個数Ctが基準個数Nrを超えると、DMAC121は、退避用ディスクリプタDceに規定されている開始アドレスAsを先頭アドレスとする領域に、データDtを転送する。
(Example of "using a descriptor for saving as a" usable descriptor "")
FIG. 4 is a diagram illustrating an example in which the
図4に示す例では、データFIFO127に、データDt(0)およびデータDt(1)がFIFO方式で格納されている。また、第一ディスクリプタFIFO125には、通常ディスクリプタDco(0)、Dco(1)、Dco(2)、・・・、Dco(N)が予め格納されている。さらに、第二ディスクリプタFIFO126には、退避用ディスクリプタDce(Z)が予め格納されている。また、CPU30によって、基準個数Nrとして「0」が予め設定されている。
In the example shown in FIG. 4, the data Dt (0) and the data Dt (1) are stored in the
(先頭のデータの転送例)
図4に示す例において、通信制御機器10がデータDt(0)の転送に際して実行する処理は、図3に例示した処理と同様である。すなわち、通信制御機器10は、図3に示すのと同様に、データFIFO127の先頭に格納されたデータDt(0)を転送するために、先ず、第一ディスクリプタFIFO125の先頭に格納された通常ディスクリプタDco(0)の拒否を判定する。すなわち、判定部124は、通常ディスクリプタDco(0)に対して、第一判定FJおよび第二判定SJを実行する。
(Example of transferring the first data)
In the example shown in FIG. 4, the process executed by the
判定部124は、開始アドレスAs(0)が標準受信領域Rgo内にあり、かつ、末尾アドレスAe(0,0)が標準受信領域Rgo内にあると、通常ディスクリプタDco(0)がデータDt(0)の転送に「利用可能なディスクリプタ」であると判定する。アドレス決定部122は、判定部124によってデータDt(0)の転送に「利用可能なディスクリプタ」であると判定された通常ディスクリプタDco(0)に規定されている開始アドレスAs(0)を、DMAC121に通知する。
In the
DMAC121は、アドレス決定部122から通知された開始アドレスAs(0)を先頭アドレスとするメインメモリ20中の領域に、データDt(0)を転送する。
The
DMAC121は、データDt(0)のメインメモリ20への転送を完了すると、メインメモリ20中の通常ディスクリプタDco(0)をライトバックディスクリプタで上書きする。
When the
(次のデータの転送例)
通信制御機器10は、データDt(1)を転送するために、第一ディスクリプタFIFO125に格納されており、かつ、その拒否を判定していない通常ディスクリプタDcoの先頭である、通常ディスクリプタDco(1)の拒否を判定する。すなわち、判定部124は、通常ディスクリプタDco(1)に対して、第一判定FJおよび第二判定SJを実行する。
(Example of transferring the following data)
The
図4に示す例においても、図3に示したのと同様に、通常ディスクリプタDco(1)には、標準受信領域Rgo外の開始アドレスAs(1)が規定されている。 Also in the example shown in FIG. 4, as shown in FIG. 3, the normal descriptor Dco (1) defines the start address As (1) outside the standard reception area Rgo.
そのため、判定部124は、開始アドレスAs(1)が標準受信領域Rgo内にないことを確認し、通常ディスクリプタDco(1)を「利用不能なディスクリプタ」であると判定する。判定部124は、この判定結果を、CPU30に通知することなく、読込部123に通知する。
Therefore, the
通常ディスクリプタDco(1)が「利用不能なディスクリプタ」であるとの判定結果を通知された読込部123は、以下の処理を実行する。すなわち、読込部123は、判定部124によって「利用不能なディスクリプタ」であると判定された通常ディスクリプタDcoの個数であるエラー個数Ctが、基準個数Nrを超えたか否かを判定する。
The
前述の通り、図4に示す例において、基準個数Nr「0」である。また、判定部124は、通常ディスクリプタDco(1)を「利用不能なディスクリプタ」であると判定しているから、判定部124が「利用不能なディスクリプタ」であると判定した通常ディスクリプタDcoの個数であるエラー個数Ctは、「1」となる。
As described above, in the example shown in FIG. 4, the reference number Nr is “0”. Further, since the
そのため、読込部123は、「エラー個数Ctが基準個数Nrを超えた」と判定する。そして、「エラー個数Ctが基準個数Nrを超えた」と判定した読込部123は、第二ディスクリプタFIFO126に格納されている退避用ディスクリプタDce(Z)を読み込む。
Therefore, the
アドレス決定部122は、読込部123によって読み込まれた退避用ディスクリプタDce(Z)に規定されている開始アドレスAs(Z)を、DMAC121に通知する。
The
DMAC121は、アドレス決定部122から通知される『データDtの転送に「利用可能なディスクリプタ」に規定されている開始アドレスAs』を先頭アドレスとするメインメモリ20中の領域に、データDtを転送する。DMAC121は、『データDt(1)の転送に「利用可能なディスクリプタ」である退避用ディスクリプタDce(Z)に規定されている開始アドレスAs(Z)』を先頭アドレスとするメインメモリ20中の領域に、データDt(0)を転送する。
The
DMAC121は、データDt(1)のメインメモリ20への転送を完了すると、メインメモリ20中の退避用ディスクリプタDce(Z)をライトバックディスクリプタで上書きする。その結果、メインメモリ20中の退避用ディスクリプタDce(Z)には、「データDt(1)のデータサイズを示す情報」と、「データDt(1)の転送に用いられたことを示す情報」とが追記される。
When the
(退避用ディスクリプタによって規定される転送領域について)
図4に示すように、退避用ディスクリプタDce(Y)の規定する開始アドレスAsが存在する退避用受信領域Rgeと、標準受信領域Rgoとは、メインメモリ20中の互いに異なる領域とするのが望ましい。
(About the transfer area specified by the descriptor for saving)
As shown in FIG. 4, it is desirable that the save receive area Rge in which the start address As defined by the save descriptor Dce (Y) exists and the standard receive area Rgo are different areas in the main memory 20. ..
退避用ディスクリプタDce(Y)の規定する開始アドレスAsが標準受信領域Rgo内にある場合、以下の事象が発生し得る。すなわち、退避用ディスクリプタDce(Y)に従って標準受信領域Rgo内に転送されたデータDt(1)が、通常ディスクリプタDcoに従って標準受信領域Rgo内に転送された他のデータDtによって更新(上書き)されてしまうといった事象が発生し得る。 When the start address As specified by the backup descriptor Dce (Y) is in the standard reception area Rgo, the following events may occur. That is, the data Dt (1) transferred into the standard reception area Rgo according to the save descriptor Dce (Y) is updated (overwritten) by other data Dt transferred into the standard reception area Rgo according to the normal descriptor Dco. An event such as closing can occur.
そして、CPU30がデータDt(1)を用いた処理を実行する前に、データDt(1)が他のデータDtによって上書きされてしまうと、当然、CPU30は、データDt(1)を用いた処理を実行することができない。
Then, if the data Dt (1) is overwritten by another data Dt before the
このような事象を回避するためには、例えば、「データDt(1)が転送された領域と、通常ディスクリプタDcoに従って別のデータDtが転送される領域とが重複するかを判断する処理」などの煩雑な処理が必要となる。 In order to avoid such an event, for example, "a process of determining whether the area to which the data Dt (1) is transferred overlaps with the area to which another data Dt is transferred according to the normal descriptor Dco" or the like. Complicated processing is required.
退避用受信領域Rgeと標準受信領域Rgoとを互いに異なる領域としておくことで、上述の煩雑な処理を要することなく、上述の事象を回避することができる。つまり、退避用受信領域Rgeと標準受信領域Rgoとを分けることで、「退避用ディスクリプタDceに従って転送された或るデータDtが、通常ディスクリプタDcoに従って転送される別のデータDtによって上書きされる」といった事象を簡易に回避できる。 By setting the backup reception area Rge and the standard reception area Rgo as different areas from each other, the above-mentioned event can be avoided without requiring the above-mentioned complicated processing. That is, by separating the backup reception area Rge and the standard reception area Rgo, "a certain data Dt transferred according to the backup descriptor Dce is overwritten by another data Dt transferred according to the normal descriptor Dco". The event can be easily avoided.
(本実施形態に係る通信制御装置が実現する効果について)
図5は、通信制御機器10の奏する効果を説明する図である。図5の(A)は、図8の(A)と同様であり、ディスクリプタDcに従ってデータDtをメインメモリ20へと転送する従来までの通信制御機器について、ディスクリプタDcの許否を判定してから、データDtを転送するまでに要する時間等を説明する図である。
(About the effect realized by the communication control device according to this embodiment)
FIG. 5 is a diagram illustrating the effect of the
従来までの通信制御機器は、或るディスクリプタDc(X)について、アドレス(開始アドレスAs)等の異常を検知すると、以下の処理を実行する。
すなわち、従来までの通信制御機器は、或るディスクリプタDc(X)の誤りを検知すると、その検知結果をCPUへと通知し、CPU(ソフトウェア)に、その或るディスクリプタDc(X)を再設定させる。例えば、従来までの通信制御機器は、CPU30に、「異常なアドレスを規定した或るディスクリプタDc(X)」を、「正しいアドレスを規定した或るディスクリプタDc(X’)」に、書き換えさせる。
The conventional communication control device executes the following processing when an abnormality such as an address (start address As) is detected for a certain descriptor Dc (X).
That is, when the conventional communication control device detects an error in a certain descriptor Dc (X), it notifies the CPU of the detection result and resets the certain descriptor Dc (X) in the CPU (software). Let me. For example, the conventional communication control device causes the
そのため、従来までの通信制御機器は、CPUによる或るディスクリプタDc(X)の再設定処理が完了するまで待機しなければならず、或るディスクリプタDc(X)の誤りを検知してから、データDtをメインメモリ20へと転送するまでに要する時間が長い。従来までの通信制御機器は、ディスクリプタDcの開始アドレスAs等の異常を検知してから、データDtの転送を実行するまでの間に、ソフトウェアによるディスクリプタDcの再設定処理の完了を待つ必要がある。 Therefore, the conventional communication control device has to wait until the reset processing of a certain descriptor Dc (X) by the CPU is completed, and after detecting an error of a certain descriptor Dc (X), the data It takes a long time to transfer Dt to the main memory 20. Conventional communication control devices need to wait for the completion of the descriptor Dc resetting process by software between the time when an abnormality such as the start address As of the descriptor Dc is detected and the time when the data Dt is transferred. ..
図5の(B)は、通信制御機器10について、ディスクリプタDcの許否を判定してから、データDtを転送するまでに要する時間等を説明する図である。
FIG. 5B is a diagram for explaining the time required for the
通信制御機器10は、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」であると判定すると、別のディスクリプタDc(Y)を「利用可能なディスクリプタ」として用いて、データDtの転送を実行する。そのため、図5の(B)に示すように、通信制御機器10は、ディスクリプタDcの開始アドレスAs等の異常を検知してから、データDtの転送を実行するまでの間に、CPU30によるディスクリプタDcの再設定処理の完了を待つ必要がない。
When the
ここで、例えば、或る通常ディスクリプタDco(X)が「利用可能なディスクリプタ」であったため、その或る通常ディスクリプタDco(X)を用いて転送を行う場合に、転送までに要する時間が時間T(X)であったとする。また、或る通常ディスクリプタDco(X)が「利用不能なディスクリプタ」であったため、別のディスクリプタDc(Y)を用いて転送を行うことになった場合に、転送までに要する時間が時間T(Y)であったとする。 Here, for example, since a certain normal descriptor Dco (X) is an "available descriptor", when a transfer is performed using the certain normal descriptor Dco (X), the time required for the transfer is time T. It is assumed that it was (X). Further, since a certain normal descriptor Dco (X) is an "unusable descriptor", when the transfer is performed using another descriptor Dc (Y), the time required for the transfer is time T (). It is assumed that it was Y).
この時、或る通常ディスクリプタDco(X)と別のディスクリプタDc(Y)とが予め用意されている場合、時間T(X)と時間T(Y)との差は、十分に小さくなる。特に、通信制御機器10をハードウェアによる論理回路で構成した場合、時間T(X)と時間T(Y)との差は、無視できるほどに小さくすることができる。つまり、通信制御機器10は、或る通常ディスクリプタDco(X)が「利用不能なディスクリプタ」であったため、別のディスクリプタDc(Y)を用いて転送を行うことになった場合にも、時間T(X)とほぼ同じ時間で、データDtを転送できる。
At this time, when a certain normal descriptor Dco (X) and another descriptor Dc (Y) are prepared in advance, the difference between the time T (X) and the time T (Y) becomes sufficiently small. In particular, when the
(通信制御機器についての整理)
これまでに図1から図5を用いて説明してきた内容は、以下のように整理することができる。すなわち、通信制御機器10は、ネットワーク3から受信したデータDtをメインメモリ20へと転送する通信制御機器である。通信制御機器10は、読込部123と、判定部124と、DMAC121(転送部)とを備えている。
(Arrangement of communication control equipment)
The contents described so far using FIGS. 1 to 5 can be organized as follows. That is, the
読込部123は、データDtを格納すべき領域の開始アドレスAsを規定するディスクリプタDcを読み込む。
The
判定部124は、読込部123によって読み込まれたディスクリプタDcに規定されている開始アドレスAsが、メインメモリ20においてデータDtを格納可能な領域として予め設定された領域である標準受信領域Rgo(許可領域)内にあるかを判定する。判定部124は、開始アドレスAsが標準受信領域Rgo内にあると、読込部123によって読み込まれたディスクリプタDcを「利用可能である」と判定する。
The
DMAC121は、読込部123によって読み込まれたディスクリプタDcに規定されている開始アドレスAsを先頭アドレスとする領域に、データDtを転送する。
The
通信制御機器10において、ディスクリプタDcは予め複数用意されている。そして、読込部123は、予め複数用意されたディスクリプタDcの中から先ず、例えば第一のディスクリプタDc(X)(特に、第一の通常ディスクリプタDco(X))を読み込む。
In the
(A)DMAC121は、第一のディスクリプタDc(X)が、判定部124によって「利用可能である」と判定されると、以下の転送を実行する。すなわち、DMAC121は、第一のディスクリプタDc(X)に規定されている開始アドレスAs(X)を先頭アドレスとする領域に、データDtを転送する。
(A) The
(B)DMAC121は、第一のディスクリプタDc(X)が判定部124によって「利用可能でない」と判定されると、以下の転送を実行する。すなわち、DMAC121は、予め複数用意されたディスクリプタDcの内、読込部123によって第一のディスクリプタDc(X)よりも後に読み込まれた第二のディスクリプタDc(Y)に従って、データDtを転送する。具体例には、DMAC121は、第二のディスクリプタDc(Y)に規定されている開始アドレスAs(Y)を先頭アドレスとする領域に、データDtを転送する。
(B) When the first descriptor Dc (X) is determined to be "not available" by the
前記の構成によれば、通信制御機器10は、予め複数用意されたディスクリプタDcの中から読み込んだ第一のディスクリプタDc(X)を「利用可能である」と判定すると、第一のディスクリプタDc(X)に従って、データDtを転送する。具体例には、通信制御機器10は、第一のディスクリプタDc(X)の規定する開始アドレスAs(X)を先頭アドレスとする領域にデータDtを転送する。
According to the above configuration, when the
また、通信制御機器10は、第一のディスクリプタDc(X)を「利用可能でない」と判定すると、予め複数用意されたディスクリプタDcの中からさらに、第二のディスクリプタDc(Y)を読み込む。そして、通信制御機器10は、第二のディスクリプタDc(Y)の規定する開始アドレスAs(Y)を先頭アドレスとする領域に、データDtを転送する。
Further, when the
つまり、通信制御機器10は、読み込んだ第一のディスクリプタDc(X)の規定する開始アドレスAs(X)が標準受信領域Rgo内にないと判定した場合にも、その判定結果をCPU30等に通知することはない。開始アドレスAs(X)が標準受信領域Rgo内にないと判定した場合にも、通信制御機器10は、CPU30等に第一のディスクリプタDc(X)を正しいものに再設定させることはない。通信制御機器10は、第一のディスクリプタDc(X)の規定する開始アドレスAs(X)が標準受信領域Rgo内にないと判定すると、予め用意された第二のディスクリプタDc(Y)をさらに読み込む。そして、通信制御機器10は、読み込んだ第二のディスクリプタDc(Y)に従って、データDtをメインメモリ20へと転送する。
That is, even when the
通信制御機器10は、予め複数用意されたディスクリプタDcの中からデータDtの転送に「利用可能なディスクリプタ」を選択し、選択した「利用可能なディスクリプタ」に従って、データDtを転送する。
The
そのため、通信制御機器10は、ディスクリプタDcによる誤ったデータ転送を防止することができる。また、通信制御機器10は、データDtの転送に「利用可能なディスクリプタ」をCPU30等に再設定させる場合に比べて、データDtの転送に要する時間を短縮することができる。
Therefore, the
つまり、通信制御機器10は、ディスクリプタDcによる誤ったデータ転送を防止しつつ、ネットワーク3から受信したデータDtを高速にメインメモリ20へと転送することができるとの効果を奏する。
That is, the
特に、「読み込んだディスクリプタDcに規定されている開始アドレスAsが、標準受信領域Rgo内にあるか否か」の判定は、データDtをネットワーク3から受信する前であっても、実行可能である。そのため、通信制御機器10は、「ディスクリプタDcによる誤ったデータ転送」を防止するための処理を、データDtを受信する前に実行することができる。
In particular, the determination of "whether or not the start address As specified in the read descriptor Dc is within the standard reception area Rgo" can be executed even before the data Dt is received from the
通信制御機器10は、「ディスクリプタDcによる誤ったデータ転送」を防止するための処理をデータDtの受信前に実行しておくことで、データDtを受信してからデータDtをメインメモリ20へと転送するまでの時間を短縮できるという効果を奏する。
The
ここで、通信制御機器10は、NIC(Network Interface Card、ネットワーク・インターフェイス・カード)として実現されるのが望ましい。通信制御機器10は、典型的には、FPGA(Field-Programmable gate array)またはASIC(Application Specific Integrated Circuit)等のハードウェアによる論理回路で構成される。
Here, it is desirable that the
ディスクリプタDcの拒否を判定する通信制御機器10を、ハードウェアによる論理回路で構成した場合、以下の効果を実現することができる。すなわち、一般的に、処理内容が同じであれば、ハードウェアによる処理の方が、ソフトウェア(具体的には、CPU)による処理よりも、高速で実行することができる。そのため、ハードウェアによる論理回路で構成された通信制御機器10は、CPU30等にディスクリプタDcの拒否を判定させる場合に比べて高速に、ディスクリプタDcの拒否を判定することができるとの効果を奏する。
When the
特に、通信制御機器10は、CPU30等によるディスクリプタDcの再設定を必要とせずに、予め複数用意されたディスクリプタDcの中から、データDtの転送に「利用可能なディスクリプタ」を選択し、選択したディスクリプタDcに従って転送を実行する。
In particular, the
ハードウェアによる論理回路で構成した場合、通信制御機器10は、データDtの転送に「利用可能なディスクリプタ」を予め複数用意されたディスクリプタDcの中から選択する処理を極めて高速に実行することができる。また、ハードウェアによる論理回路で構成した場合、通信制御機器10は、予め複数用意されたディスクリプタDcの中から選択したディスクリプタDcに従って、極めて高速に転送を実行することができる。
When configured with a logic circuit by hardware, the
したがって、通信制御機器10をハードウェアによる論理回路で構成した場合、通信制御機器10は、ディスクリプタDcによる誤ったデータDt転送を防止しつつ、ネットワーク3から受信したデータDtを極めて高速に転送することができるとの効果を奏する。
Therefore, when the
通信制御機器10において、判定部124は、以下の2つの条件が共に満たされる場合に、読込部123によって読み込まれたディスクリプタDcを「利用可能である」と判定する。すなわち、判定部124は、(A)ディスクリプタDcの規定する開始アドレスAsが、標準受信領域Rgo内にあるという条件と、(B)末尾アドレスAeが標準受信領域Rgo内にあるという条件とが共に満たされる場合に、「利用可能である」と判定する。
In the
末尾アドレスAeは、読込部123によって読み込まれたディスクリプタDcに従ってデータDtを転送した場合の転送後の領域の末尾アドレスである。末尾アドレスAeは、受信したデータDtのデータサイズと、読込部123によって読み込まれたディスクリプタDcの規定する開始アドレスAsとから算出される。
The end address Ae is the end address of the area after transfer when the data Dt is transferred according to the descriptor Dc read by the
前記の構成によれば、通信制御機器10は、受信したデータDtのデータサイズと、読込部123によって読み込まれたディスクリプタDcの規定する開始アドレスAsとから、末尾アドレスAeを算出する。そして、通信制御機器10は、「読み込んだディスクリプタDcの規定する開始アドレスAsが標準受信領域Rgo内にあり」、かつ、「末尾アドレスAeが標準受信領域Rgo内にある」と、読み込んだディスクリプタDcを「利用可能である」と判定する。
According to the above configuration, the
ここで、「読み込んだディスクリプタDcの規定する開始アドレスAsが標準受信領域Rgo内にある」場合であっても、「末尾アドレスAeが標準受信領域Rgo内にない」時がある。そのような時には、読み込んだディスクリプタDcは、受信したデータDtの転送先を決定するディスクリプタDcとしては不適切であり、つまり、受信したデータDtの転送先を決定するディスクリプタDcとしては利用することができない(利用不能である)。 Here, even in the case where "the start address As specified by the read descriptor Dc is in the standard reception area Rgo", there are times when "the end address Ae is not in the standard reception area Rgo". In such a case, the read descriptor Dc is inappropriate as the descriptor Dc for determining the transfer destination of the received data Dt, that is, it can be used as the descriptor Dc for determining the transfer destination of the received data Dt. Not possible (not available).
そこで、通信制御機器10は、「読み込んだディスクリプタDcの規定する開始アドレスAs」に加えて、受信したデータDtのデータサイズをも考慮して、「読み込んだディスクリプタDcが利用可能か否か(つまり、ディスクリプタDcの許否)」を判定する。
Therefore, the
通信制御機器10は、開始アドレスAsに加えて、受信したデータDtのデータサイズを考慮することで、予め複数用意されたディスクリプタDcの中から、受信したデータDtの転送に「利用可能なディスクリプタ」を、より正確に選択できるとの効果を奏する。
The
通信制御機器10は、予め取得した、標準受信領域Rgoの先頭アドレスと標準受信領域Rgoのデータサイズとから、標準受信領域Rgoを算出する。例えば、通信制御機器10は、CPU30から、標準受信領域Rgoの先頭アドレスと標準受信領域Rgoのデータサイズとを、予め取得しておく。
The
前記の構成によれば、通信制御機器10は、標準受信領域Rgoの先頭アドレスと標準受信領域Rgoのデータサイズとを予め取得しておく。そして、通信制御機器10は、取得した標準受信領域Rgoの先頭アドレスと標準受信領域Rgoのデータサイズとから、標準受信領域Rgoを算出する。
According to the above configuration, the
したがって、通信制御機器10は、予め取得した、標準受信領域Rgoの先頭アドレスと標準受信領域Rgoのデータサイズとから、標準受信領域Rgoを算出することができるとの効果を奏する。
Therefore, the
通信制御機器10は、第一ディスクリプタFIFO125(格納部)をさらに備えている。第一ディスクリプタFIFO125には、「データDtを受信しようとする都度(例えば、制御周期Ccごとに)、データDtを受信する前にメインメモリ20に設定されるディスクリプタDc」である通常ディスクリプタDcoが格納される。
The
データDtの転送に際して読込部123が最初に読み読み、判定部124によって最初にその当否を判定される第一のディスクリプタDc(X)は、第一ディスクリプタFIFO125に格納されている通常ディスクリプタDcoである。例えば、データDtの転送に際して読込部123が最初に読み読み、判定部124によって最初にその当否を判定される第一のディスクリプタDc(X)は、通常ディスクリプタDco(X)である。
The first descriptor Dc (X), which is first read by the
DMAC121は、(A)通常ディスクリプタDco(X)が「利用可能でない」と判定され、かつ、(B)別の通常ディスクリプタDco(Y)が「利用可能である」と判定されると、通常ディスクリプタDco(Y)に従って転送を実行する。 The DMAC121 determines that (A) the normal descriptor Dco (X) is "not available" and (B) another normal descriptor Dco (Y) is "available". The transfer is executed according to Dco (Y).
別の通常ディスクリプタDco(Y)は、読込部123によって第一のディスクリプタDc(X)(つまり、通常ディスクリプタDco(X))よりも後に読み込まれる通常ディスクリプタDcoである。つまり、通常ディスクリプタDco(Y)は、通常ディスクリプタDco(X)に後行する通常ディスクリプタDcoであり、通常ディスクリプタDco(X)の後行ディスクリプタDcである。
Another normal descriptor Dco (Y) is a normal descriptor Dco that is read by the
通常ディスクリプタDco(Y)が判定部124によって「利用可能である」と判定されると、DMAC121は、通常ディスクリプタDco(Y)を「利用可能なディスクリプタ」として、通常ディスクリプタDco(Y)に従って転送を実行する。具体的には、DMAC121は、通常ディスクリプタDco(Y)に規定されている開始アドレスAs(Y)を先頭アドレスとする領域に、データDtを転送する。
When the
例えば、通常ディスクリプタDco(P)が「利用可能でない」と判定され、かつ、通常ディスクリプタDco(P)の次に読み込まれた通常ディスクリプタDco(Q)が「利用可能である」と判定されると、DMAC121は、以下の転送を実行する。すなわち、DMAC121は、読込部123によって通常ディスクリプタDco(P)の次に読み込まれ、判定部124によって「利用可能である」と判定された通常ディスクリプタDco(Q)に従って、データDtを転送する。
For example, if the normal descriptor Dco (P) is determined to be "not available" and the normal descriptor Dco (Q) read next to the normal descriptor Dco (P) is determined to be "available". ,
例えば、通常ディスクリプタDco(P)およびDco(Q)が「利用可能でない」と判定され、通常ディスクリプタDco(Q)の次に読み込まれた通常ディスクリプタDco(R)が「利用可能である」と判定されると、DMAC121は、以下を実行する。すなわち、DMAC121は、読込部123によって通常ディスクリプタDco(Q)の次に読み込まれ、判定部124によって「利用可能である」と判定された通常ディスクリプタDco(R)に従って、データDtを転送する。
For example, the normal descriptors Dco (P) and Dco (Q) are determined to be "not available", and the normal descriptor Dco (R) read next to the normal descriptor Dco (Q) is determined to be "available". Then, the
前記の構成によれば、通信制御機器10は、第一ディスクリプタFIFO125に格納された通常ディスクリプタDco(X)を「利用可能である」と判定すると、通常ディスクリプタDco(X)に従って転送を実行する。具体的には、通信制御機器10は、「利用可能である」と判定した通常ディスクリプタDco(X)の規定する開始アドレスAs(X)を先頭アドレスとする領域に、データDtを転送する。
According to the above configuration, when the
また、通信制御機器10は、通常ディスクリプタDco(X)を「利用可能でない」と判定し、かつ、通常ディスクリプタDco(Y)を「利用可能である」と判定すると、通常ディスクリプタDco(Y)に従って転送を実行する。例えば、通信制御機器10は、通常ディスクリプタDco(X)を「利用可能でない」と判定すると、第一ディスクリプタFIFO125に格納されている後行ディスクリプタDcである通常ディスクリプタDco(Y)をさらに読み込む。そして、通信制御機器10は、読み込んだ通常ディスクリプタDco(Y)を「利用可能である」と判定すると、通常ディスクリプタDco(Y)の規定する開始アドレスAs(Y)を先頭アドレスとする領域に、データDtを転送する。
Further, when the
ここで一般に、或る情報(例えば、数メガバイト(Mbyte)の画像情報)が、何個のデータDt(より正確には、何個のフレームデータ)として送信されるのかを、CPU等(ソフトウェア)は計算していない。例えば、1個のデータDt(フレームデータ)のデータサイズが、通常は「1.5キロバイト(Kbyte)」である場合であっても、CPU等は、その或る情報が、何個のデータDtとして送信されるのかを計算していない。 Here, in general, the CPU or the like (software) determines how many data Dt (more accurately, how many frame data) a certain information (for example, image information of several megabytes (Mbyte)) is transmitted. Has not calculated. For example, even if the data size of one data Dt (frame data) is usually "1.5 kilobytes (Kbyte)", the CPU or the like has a certain amount of information such as how many data Dt. Not calculated if it will be sent as.
その代わりに、一般にCPU等は、或る情報を受信する前に、その或る情報を常に受信できるように(メインメモリ20へと転送できるように)、十分な数(個数)の通常ディスクリプタDcoを、メインメモリ20に設定しておく。つまり、CPU30等は、ネットワーク3から受信すべきデータDtの個数に比して十分余裕のある個数の通常ディスクリプタDcoを、データDtを受信する前に、予めメインメモリ20に設定しておく。
Instead, the CPU or the like generally has a sufficient number (number) of normal descriptors Dco so that the certain information can always be received (transferred to the main memory 20) before receiving the certain information. Is set in the main memory 20. That is, the
そして、CPU30等によってメインメモリ20に設定された通常ディスクリプタDcoは、第一ディスクリプタFIFO125に格納される。そのため、ネットワーク3から受信すべきデータDtの個数に比して、第一ディスクリプタFIFO125に格納されている通常ディスクリプタDcoの個数は、十分に多い。
Then, the normal descriptor Dco set in the main memory 20 by the
したがって、通信制御機器10は、転送すべきデータDtの個数に比して十分多い個数の通常ディスクリプタDcoの中から、データDtの転送に「利用可能なディスクリプタ」を選択することができるとの効果を奏する。
Therefore, the effect that the
通信制御機器10は、第一ディスクリプタFIFO125とは異なる第二ディスクリプタFIFO126をさらに備えている。通信制御機器10において、エラー個数Ctが、予め設定された基準個数Nrを超えると、読込部123は、第二ディスクリプタFIFO126に予め格納されているディスクリプタDcである退避用ディスクリプタDceを読み込む。DMAC121は、読込部123によって読み込まれた退避用ディスクリプタDceを、データDtの転送に「利用可能なディスクリプタ」として、退避用ディスクリプタDceに規定されている開始アドレスAsを先頭アドレスとする領域に、データDtを転送する。
The
エラー個数Ctは、第一ディスクリプタFIFO125に格納され、読込部123によって読み込まれた通常ディスクリプタDcoであって、判定部124によって「利用可能でない」と判定された通常ディスクリプタDcoの個数である。
The error number Ct is the number of normal descriptors Dco stored in the
前記の構成によれば、通信制御機器10は、エラー個数Ctが基準個数Nrを超えると、第二ディスクリプタFIFO126に予め格納されている退避用ディスクリプタDceを読み込む。そして、通信制御機器10は、退避用ディスクリプタDceを、データDtの転送に「利用可能なディスクリプタ」として、退避用ディスクリプタDceに規定されている開始アドレスAsを先頭アドレスとする領域に、前記データDtを転送する。
According to the above configuration, when the error number Ct exceeds the reference number Nr, the
ここで、エラー個数Ctが基準個数Nrを超えている場合、「第一ディスクリプタFIFO125に格納されている通常ディスクリプタDco」の全て、または、その大部分に、異常が発生している可能性がある。そして、その場合、「第一ディスクリプタFIFO125に格納されている通常ディスクリプタDco」の中から「利用可能なディスクリプタ」を選択するのは不可能であり、または、多大の時間を要する。
Here, when the error number Ct exceeds the reference number Nr, there is a possibility that an abnormality has occurred in all or most of the "normal descriptor Dco stored in the
そこで、通信制御機器10は、エラー個数Ctが基準個数Nrを超えると、「第一ディスクリプタFIFO125に格納されている通常ディスクリプタDco」に代えて、退避用ディスクリプタDceに従って、データDtを転送する。
Therefore, when the error number Ct exceeds the reference number Nr, the
したがって、通信制御機器10は、「第一ディスクリプタFIFO125に格納されている通常ディスクリプタDco」の全て、または、その大部分について、異常が発生している場合にも、データDtを確実かつ高速に転送することができるとの効果を奏する。
Therefore, the
通信制御機器10において、退避用ディスクリプタDceの規定する開始アドレスAsは、メインメモリ20においてデータDtを格納可能な領域であって、標準受信領域Rgoとは異なる領域(退避用受信領域Rge)内にある。
In the
前記の構成によれば、通信制御機器10は、退避用ディスクリプタDceに従ってデータDtをメインメモリ20へと転送する場合、以下の領域にデータDtを転送する。すなわち、通信制御機器10は、退避用ディスクリプタDceに従ってデータDtを、標準受信領域Rgoとは異なる領域である退避用受信領域Rgeへと転送する。言い換えれば、退避用ディスクリプタDceに従ってデータDtが転送される領域である退避用受信領域Rgeは、標準受信領域Rgoとは異なる。
According to the above configuration, when the
退避用ディスクリプタDceの規定する開始アドレスAsが標準受信領域Rgo内にある場合、退避用ディスクリプタDceに従って標準受信領域Rgo内に転送された或るデータDt(X)について、以下の事象が発生し得る。すなわち、その或るデータDt(X)が、第一ディスクリプタFIFO125に格納されている通常ディスクリプタDcoに従って標準受信領域Rgo内に転送される別のデータDt(Y)によって、上書きされてしまう可能性がある。
When the start address As specified by the backup descriptor Dce is in the standard reception area Rgo, the following events may occur for a certain data Dt (X) transferred into the standard reception area Rgo according to the backup descriptor Dce. .. That is, there is a possibility that the certain data Dt (X) may be overwritten by another data Dt (Y) transferred into the standard reception area Rgo according to the normal descriptor Dco stored in the
そして、上述のような事態を防ぐためには、例えば、「或るデータDt(X)が転送された領域と、別のデータDt(Y)が転送される領域とが、重複するか」を判断する処理などの煩雑な処理が必要となる。 Then, in order to prevent the above-mentioned situation, for example, it is determined whether the area to which a certain data Dt (X) is transferred overlaps with the area to which another data Dt (Y) is transferred. Complicated processing such as processing is required.
これに対して、退避用ディスクリプタDceの規定する開始アドレスAsが標準受信領域Rgo内にない場合、退避用ディスクリプタDceに従って転送された上述の或るデータDt(X)が、上述の別のデータDt(Y)によって上書きされることはない。 On the other hand, when the start address As specified by the save descriptor Dce is not in the standard reception area Rgo, the above-mentioned certain data Dt (X) transferred according to the save descriptor Dce is the above-mentioned another data Dt. It is not overwritten by (Y).
したがって、通信制御機器10は、「退避用ディスクリプタDceに従って転送されたデータDt(X)が、通常ディスクリプタDcoに従って転送されるデータDt(Y)で上書きされる」といった事態を、煩雑な処理を要せず回避できるとの効果を奏する。
Therefore, the
§3.動作例
(本実施形態に係る通信制御装置が実現する処理の全体概要について)
図6は、標準受信領域Rgo(許可領域)を特定する処理、および、判定処理の概要を説明する図である。通信制御機器10は、「受信したデータDtの転送先(特に、その開始アドレスAs)を決定し、決定した転送先にデータDtを転送する」処理であるデータ受信処理を実行する前に、標準受信領域Rgoを特定する処理を実行しておく。また、標準受信領域Rgoを特定した後に通信制御機器10が実行するデータ受信処理は、2つの判定処理を含み、具体的には、第一判定処理FJおよび第二判定処理SJを含む。
§3. Operation example (Overview of the processing realized by the communication control device according to this embodiment)
FIG. 6 is a diagram illustrating an outline of a process for specifying a standard reception area Rgo (permitted area) and a determination process. The
図6の(A)は、通信制御機器10がデータ受信処理を実行する前に特定しておく標準受信領域Rgoについて、説明する図である。通信制御機器10は、予めCPU30から、「標準受信領域Rgoの先頭アドレス」を示す情報と、「標準受信領域Rgoのデータサイズ」を示す情報とを取得しておく。通信制御機器10は、CPU30から取得しておいた、「標準受信領域Rgoの先頭アドレス」と「標準受信領域Rgoのデータサイズ」とから、図6の(A)に示すように、標準受信領域Rgoを特定する。
FIG. 6A is a diagram illustrating a standard reception area Rgo specified before the
図6の(A)は、通信制御機器10が実行するデータ受信処理に含まれる第一判定処理FJおよび第二判定処理SJの概要を説明する図である。
FIG. 6A is a diagram illustrating an outline of the first determination process FJ and the second determination process SJ included in the data reception process executed by the
第一判定処理FJにおいて、通信制御機器10(特に、判定部124)は、「読込部123によって読み込まれたディスクリプタDc(特に、通常ディスクリプタDco)において規定されている開始アドレスAsが、標準受信領域Rgo内であるか」を判定する。判定部124は、CPU30によって通常ディスクリプタDcoがメインメモリ20に設定された時点以降に、第一判定処理FJを実行することができる。より正確には、判定部124は、CPU30によってメインメモリ20に設定された通常ディスクリプタDcoが第一ディスクリプタFIFO125に格納された時点以降に、第一判定処理FJを実行することができる。つまり、判定部124は、データDtを受信する前であっても、第一ディスクリプタFIFO125に通常ディスクリプタDcoが格納された時点以降であれば、第一判定処理FJを実行することができる。
In the first determination process FJ, the communication control device 10 (particularly, the determination unit 124) has a standard reception area in which the start address As defined in the descriptor Dc (particularly, the normal descriptor Dco) read by the
これに対して、第二判定処理SJは、データDtを受信した時点以降に、通信制御機器10(特に、判定部124)によって実行される。判定部124は、PLC1がデータDtを受信すると、より正確には、PLC1が受信したデータDtがデータFIFO127に格納されると、データDtのデータサイズを計測する。判定部124は、計測したデータDtのデータサイズと、通常ディスクリプタDcoにおいて規定されている開始アドレスAsとから、「通常ディスクリプタDcoに従ってデータDtを転送した場合の転送後の領域」の末尾アドレスAeを算出する。そして、第二判定処理SJにおいて、判定部124は、末尾アドレスAeが標準受信領域Rgo内であるかを判定する。
On the other hand, the second determination process SJ is executed by the communication control device 10 (particularly, the determination unit 124) after the time when the data Dt is received. The
ここで、第一判定処理FJは、データDtを受信する前であっても実行することができるが、第一判定処理FJを、データDtを受信する前に実行することは必須ではない。例えば、データDtを受信した後に、第一判定処理FJを実行してもよいし、データDtの受信と並行して第一判定処理FJを実行してもよい。 Here, the first determination process FJ can be executed even before the data Dt is received, but it is not essential to execute the first determination process FJ before the data Dt is received. For example, the first determination process FJ may be executed after receiving the data Dt, or the first determination process FJ may be executed in parallel with the reception of the data Dt.
(データ受信処理の概要について)
図7は、通信制御機器10が実行するデータ受信処理の一例を示すフロー図である。アドレス決定部122は、判定部124によって「利用不能なディスクリプタ」であると判定された通常ディスクリプタDcoの個数であるエラー個数Ctを、「0」とする(S110)。読込部123は、第一ディスクリプタFIFO125を参照して、未だ判定部124によってその当否を判定されていない通常ディスクリプタDcoを読み込む(S120)。読込部123は、読み込んだ通常ディスクリプタDcoに規定されている開始アドレスAsを、判定部124に通知する。判定部124は、「読込部123から通知された開始アドレスAsが、標準受信領域Rgo内にあるか」を判定する(S130)(第一判定処理FJ)。
(Overview of data reception processing)
FIG. 7 is a flow chart showing an example of data reception processing executed by the
判定部124によって「読込部123から通知された開始アドレスAsが、標準受信領域Rgo内にある」と判定されると(S130でYES)、通信制御機器10はデータDtを受信し(S140)、受信したデータDtをデータFIFO127に格納する。
When the
データDtがデータFIFO127に格納されると、判定部124は、データFIFO127に格納されたデータDtのデータサイズを計測する。判定部124は、計測したデータDtのデータサイズと、読込部123から通知された開始アドレスAsとから、「通常ディスクリプタDcoに従ってデータDtを転送した場合の転送後の領域」の末尾アドレスAeを算出する(S150)。そして、判定部124は、「S140にて算出した末尾アドレスAeが、標準受信領域Rgo内にあるか」を判定する(S160)(第二判定処理SJ)。
When the data Dt is stored in the
判定部124によって「S140にて算出した末尾アドレスAeが、標準受信領域Rgo内にある」と判定されると(S160でYES)、アドレス決定部122は、以下の処理を実行する。すなわち、アドレス決定部122は、読込部123によって最後に読み込まれたディスクリプタDcに規定されている開始アドレスAsを、DMAC121に通知する。
When the
DMAC121は、読込部123が最後に読み込んだディスクリプタDcに従ってデータDtを転送する(S170)。つまり、DMAC121は、アドレス決定部122から通知された「読込部123によって最後に読み込まれたディスクリプタDcに規定されている開始アドレスAs」を先頭アドレスとするメインメモリ20中の領域に、データDtを転送する。
The
判定部124によって「読込部123から通知された開始アドレスAsが、標準受信領域Rgo内にない」と判定されると(S130でNO)、アドレス決定部122は、エラー個数Ctを「1」だけカウントアップする(S180)。読込部123は、S180で「1」だけカウントアップされたエラー個数Ctについて、「基準個数Nrを超えたか」を判定する(S190)。
When the
S180で「1」だけカウントアップされたエラー個数Ctが「基準個数Nrを超えたと判定すると(S190でYES)、読込部123は、第二ディスクリプタFIFO126に予め格納されている退避用ディスクリプタDceを読み込む(S200)。そして、アドレス決定部122は、読込部123によって最後に読み込まれたディスクリプタDcに規定されている開始アドレスAsを、DMAC121に通知する。つまり、アドレス決定部122は、S200で読込部123によって読み込まれた退避用ディスクリプタDceに規定されている開始アドレスAsを、DMAC121に通知する。
When it is determined that the error number Ct counted up by "1" in S180 exceeds the reference number Nr (YES in S190), the
S180で「1」だけカウントアップされたエラー個数Ctが「基準個数Nrを超えていない」と判定すると(S190でYES)、読込部123は、第一ディスクリプタFIFO125に格納されている次の通常ディスクリプタDcoを読み込む(S210)。つまり、読込部123は、第一ディスクリプタFIFO125に格納されており、未だ判定部124によってその当否を判定されていない通常ディスクリプタDcoのうち、その先頭の通常ディスクリプタDcoを読み込む。読込部123は、読み込んだ通常ディスクリプタDcoに規定されている開始アドレスAsを、判定部124に通知する。判定部124は、読込部123から、読込部123が読み込んだ通常ディスクリプタDcoに規定されている開始アドレスAsを通知されると、S130の処理を実行する。
When it is determined in S180 that the error number Ct counted up by "1" does not exceed the "reference number Nr" (YES in S190), the
図7は、判定部124によって「読込部123から通知された開始アドレスAsが、標準受信領域Rgo内にある」と判定されてから、通信制御機器10がデータDtを受信する例を示している。しかしながら、通信制御機器10がデータDtを受信するタイミングが、判定部124によって「読込部123から通知された開始アドレスAsが、標準受信領域Rgo内にある」と判定された後であることは必須ではない。
FIG. 7 shows an example in which the
前述の通り、第一判定処理FJを、データDtを受信する前に実行することは必須ではない。例えば、S130の判定(第一判定処理FJ)の前に、S140(データDtの受信)を実行してもよい。 As described above, it is not essential to execute the first determination process FJ before receiving the data Dt. For example, S140 (reception of data Dt) may be executed before the determination of S130 (first determination process FJ).
言い換えれば、判定部124によって「読込部123から通知された開始アドレスAsが、標準受信領域Rgo内にある」と判定されてから、通信制御機器10がデータDtを受信することは必須ではない。第一処理FJにおいて、判定部124は、読込部123によって読み込まれた通常ディスクリプタDcoの中から、「開始アドレスAsが、標準受信領域Rgo内にある」と判定する通常ディスクリプタDcoを発見できればよい。
In other words, it is not essential that the
第一処理FJにおいて「開始アドレスAsが、標準受信領域Rgo内にある」通常ディスクリプタDcoが発見されるタイミングと、通信制御機器10がデータDtを受信するタイミングとの先後は問わない。例えば、第一処理FJにおいて「開始アドレスAsが、標準受信領域Rgo内にある」通常ディスクリプタDcoが発見される前に、通信制御機器10がデータDtを受信してもよい。例えば、或るディスクリプタDcについてS130で「NO」と判定された後、別のディスクリプタDcが読み込まれる前、または、別のディスクリプタDcについてS130の判定が実行される前までに、通信制御機器10がデータDtを受信してもよい。
It does not matter whether the timing at which the normal descriptor Dco "the start address As is in the standard reception area Rgo" is found in the first processing FJ and the timing at which the
これまで図7を用いて説明してきた通信制御機器10の実行する処理は、以下のように整理することができる。すなわち、通信制御機器10の実行する制御方法は、ネットワーク3から受信したデータDtをメインメモリ20へと転送する通信制御機器の制御方法である。前記制御方法は、読込ステップ(S120、S200、および、S210)と、判定ステップ(S130およびS160)と、転送ステップ(S170)とを含んでいる。
The processes executed by the
読込ステップは、データDtを格納すべき領域の開始アドレスAsを規定するディスクリプタDcを読み込む。 The read step reads the descriptor Dc that defines the start address As of the area in which the data Dt should be stored.
判定ステップは、読込ステップにて読み込まれたディスクリプタDcの規定する開始アドレスAsが、標準受信領域Rgo(許可領域)内にあると、読込ステップにて読み込まれたディスクリプタDcを「利用可能である」と判定する。標準受信領域Rgoは、メインメモリ20においてデータDtを格納可能な領域として予め設定されている。 In the determination step, if the start address As specified by the descriptor Dc read in the read step is in the standard reception area Rgo (permitted area), the descriptor Dc read in the read step is "available". Is determined. The standard reception area Rgo is preset as an area in which the data Dt can be stored in the main memory 20.
転送ステップは、読込ステップにて読み込まれたディスクリプタDcの規定する開始アドレスAsを先頭アドレスとする領域に、データDtを転送する。 The transfer step transfers the data Dt to an area having the start address As specified by the descriptor Dc read in the read step as the start address.
通信制御機器10において、ディスクリプタDcは予め複数用意されている。
In the
転送ステップは、(A)予め複数用意されたディスクリプタDcの内、読込ステップにて読み込まれた第一のディスクリプタDc(X)が、判定ステップにて「利用可能である」と判定されると、以下の転送を実行する。すなわち、読込ステップは、第一のディスクリプタDc(X)に規定されている開始アドレスAs(X)を先頭アドレスとする領域に、データDtを転送する。例えば、転送ステップは、予め複数用意されたディスクリプタDcの内、読込ステップにて読み込まれた第一の通常ディスクリプタDco(X)が、判定ステップにて「利用可能である」と判定されると、第一の通常ディスクリプタDco(X)に従って転送を行う。 In the transfer step, (A) among the plurality of descriptors Dc prepared in advance, when the first descriptor Dc (X) read in the read step is determined to be "available" in the determination step, Perform the following transfer. That is, the read step transfers the data Dt to the area having the start address As (X) defined in the first descriptor Dc (X) as the start address. For example, in the transfer step, among the plurality of descriptors Dc prepared in advance, the first normal descriptor Dco (X) read in the read step is determined to be "available" in the determination step. The transfer is performed according to the first normal descriptor Dco (X).
転送ステップは、(B)第一のディスクリプタDc(X)が判定ステップにて「利用可能でない」と判定されると、以下の転送を実行する。すなわち、転送ステップは、予め複数用意されたディスクリプタDcの内、読込ステップにて第一のディスクリプタDc(X)よりも後に読み込まれた第二のディスクリプタDc(Y)に従って、データDtを転送する。具体例には、転送ステップは、第二のディスクリプタDc(Y)に規定されている開始アドレスAs(Y)を先頭アドレスとする領域に、データDtを転送する。 In the transfer step, (B) when the first descriptor Dc (X) is determined to be "not available" in the determination step, the following transfer is executed. That is, the transfer step transfers the data Dt according to the second descriptor Dc (Y) read after the first descriptor Dc (X) in the read step among the plurality of descriptors Dc prepared in advance. As a specific example, the transfer step transfers data Dt to an area having a start address As (Y) defined in the second descriptor Dc (Y) as a start address.
前記の構成によれば、前記制御方法は、予め複数用意されたディスクリプタDcの中から読み込んだ第一のディスクリプタDc(X)を「利用可能である」と判定すると、第一のディスクリプタDc(X)に従って、データDtを転送する。具体例には、前記制御方法は、第一のディスクリプタDc(X)の規定する開始アドレスAs(X)を先頭アドレスとする領域にデータDtを転送する。 According to the above configuration, when the control method determines that the first descriptor Dc (X) read from a plurality of descriptors Dc prepared in advance is "available", the first descriptor Dc (X) is determined. ), The data Dt is transferred. As a specific example, the control method transfers data Dt to an area having a start address As (X) defined by the first descriptor Dc (X) as a start address.
また、前記制御方法は、第一のディスクリプタDc(X)を「利用可能でない」と判定すると、予め複数用意されたディスクリプタDcの中からさらに、第二のディスクリプタDc(Y)を読み込む。そして、前記制御方法は、第二のディスクリプタDc(Y)の規定する開始アドレスAs(Y)を先頭アドレスとする領域に、データDtを転送する。 Further, in the control method, when it is determined that the first descriptor Dc (X) is "not available", the second descriptor Dc (Y) is further read from the plurality of descriptors Dc prepared in advance. Then, in the control method, the data Dt is transferred to the area having the start address As (Y) defined by the second descriptor Dc (Y) as the start address.
つまり、前記制御方法は、読み込んだ第一のディスクリプタDc(X)の規定する開始アドレスAs(X)が標準受信領域Rgo内にないと判定した場合にも、その判定結果をCPU30等に通知することはない。開始アドレスAs(X)が標準受信領域Rgo内にないと判定した場合にも、前記制御方法は、CPU30等に第一のディスクリプタDc(X)を正しいものに再設定させることはない。前記制御方法は、第一のディスクリプタDc(X)の規定する開始アドレスAs(X)が標準受信領域Rgo内にないと判定すると、予め用意された第二のディスクリプタDc(Y)をさらに読み込む。そして、前記制御方法は、読み込んだ第二のディスクリプタDc(Y)に従って、データDtをメインメモリ20へと転送する。
That is, even when it is determined that the start address As (X) defined by the first descriptor Dc (X) read is not in the standard reception area Rgo, the control method notifies the
前記制御方法は、予め複数用意されたディスクリプタDcの中からデータDtの転送に「利用可能なディスクリプタ」を選択し、選択した「利用可能なディスクリプタ」に従って、データDtを転送する。 In the control method, "available descriptor" is selected for the transfer of data Dt from a plurality of descriptors Dc prepared in advance, and the data Dt is transferred according to the selected "available descriptor".
そのため、前記制御方法は、ディスクリプタDcによる誤ったデータ転送を防止することができる。また、前記制御方法は、データDtの転送に「利用可能なディスクリプタ」をCPU30等に再設定させる場合に比べて、データDtの転送に要する時間を短縮することができる。
Therefore, the control method can prevent erroneous data transfer by the descriptor Dc. Further, the control method can shorten the time required for transferring the data Dt as compared with the case where the "usable descriptor" is reset to the
つまり、前記制御方法は、ディスクリプタDcによる誤ったデータ転送を防止しつつ、ネットワーク3から受信したデータDtを高速にメインメモリ20へと転送することができるとの効果を奏する。
That is, the control method has the effect of being able to transfer the data Dt received from the
特に、「読み込んだディスクリプタDcに規定されている開始アドレスAsが、標準受信領域Rgo内にあるか否か」の判定は、データDtをネットワーク3から受信する前であっても、実行可能である。そのため、前記制御方法は、「ディスクリプタDcによる誤ったデータ転送」を防止するための処理を、データDtを受信する前に実行することができる。
In particular, the determination of "whether or not the start address As specified in the read descriptor Dc is within the standard reception area Rgo" can be executed even before the data Dt is received from the
前記制御方法は、「ディスクリプタDcによる誤ったデータ転送」を防止するための処理をデータDtの受信前に実行しておくことで、データDtを受信してからデータDtをメインメモリ20へと転送するまでの時間を短縮できるという効果を奏する。 In the control method, a process for preventing "erroneous data transfer by the descriptor Dc" is executed before the data Dt is received, so that the data Dt is transferred to the main memory 20 after the data Dt is received. It has the effect of shortening the time required to do so.
ここで、通信制御機器10は、NIC(Network Interface Card、ネットワーク・インターフェイス・カード)として実現されるのが望ましい。通信制御機器10は、典型的には、FPGA(Field-Programmable gate array)またはASIC(Application Specific Integrated Circuit)等のハードウェアによる論理回路で構成される。
Here, it is desirable that the
ディスクリプタDcの拒否を判定する通信制御機器10を、ハードウェアによる論理回路で構成した場合、以下の効果を実現することができる。すなわち、一般的に、処理内容が同じであれば、ハードウェアによる処理の方が、ソフトウェア(具体的には、CPU)による処理よりも、高速で実行することができる。そのため、ハードウェアによる論理回路で構成された通信制御機器10は、CPU30等にディスクリプタDcの拒否を判定させる場合に比べて高速に、ディスクリプタDcの拒否を判定することができるとの効果を奏する。
When the
特に、前記制御方法は、CPU30等によるディスクリプタDcの再設定を必要とせずに、予め複数用意されたディスクリプタDcの中から、データDtの転送に「利用可能なディスクリプタ」を選択し、選択したディスクリプタDcに従って転送を実行する。
In particular, the control method does not require the descriptor Dc to be reset by the
ハードウェアによる論理回路で構成した場合、通信制御機器10は、データDtの転送に「利用可能なディスクリプタ」を予め複数用意されたディスクリプタDcの中から選択する処理を極めて高速に実行することができる。また、ハードウェアによる論理回路で構成した場合、通信制御機器10は、予め複数用意されたディスクリプタDcの中から選択したディスクリプタDcに従って、極めて高速に転送を実行することができる。
When configured with a logic circuit by hardware, the
したがって、通信制御機器10をハードウェアによる論理回路で構成した場合、前記制御方法は、ディスクリプタDcによる誤ったデータ転送を防止しつつ、ネットワーク3から受信したデータDtを極めて高速に転送することができるとの効果を奏する。
Therefore, when the
§4.変形例
(ネットワーク構成例について)
図2に例示した制御システム0において、複数のネットワーク3が、ネットワークハブ2を介して、PLC1に接続している。しかしながら、制御システム0において、1つのネットワーク3がネットワークハブ2を介さずにPLC1に接続し、例えば、PLC1と、1つ以上のネットワークデバイスとが、一筆書きの形式で互いに通信可能に接続されていてもよい。
§4. Modification example (about network configuration example)
In the
本発明は上述した各実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。 The present invention is not limited to the above-described embodiments, and various modifications can be made within the scope of the claims, and the embodiments obtained by appropriately combining the technical means disclosed in the different embodiments. Is also included in the technical scope of the present invention.
3 ネットワーク
10 通信制御機器
20 メインメモリ
30 CPU
121 DMAC(転送部)
123 読込部
124 判定部
125 第一ディスクリプタFIFO(格納部)
126 第二ディスクリプタFIFO(第二格納部)
Ae 末尾アドレス
As 開始アドレス
Ct エラー個数
Dc ディスクリプタ
Dce 退避用ディスクリプタ
Dco 通常ディスクリプタ
Dt データ
Nr 基準個数
Rgo 標準受信領域(許可領域)
S120 読込ステップ
S130 判定ステップ
S160 判定ステップ
S170 転送ステップ
S200 読込ステップ
S210 読込ステップ
3
121 DMAC (transfer section)
123
126 Second descriptor FIFO (second storage)
Ae End address As Start address Ct Number of errors Dc Descriptor Dce Descriptor for backup Dco Normal descriptor Dt Data Nr Reference number Rgo Standard reception area (permitted area)
S120 read step S130 judgment step S160 judgment step S170 transfer step S200 read step S210 read step
Claims (7)
前記データを格納すべき領域の開始アドレスを規定するディスクリプタを読み込む読込部と、
前記読込部によって読み込まれた前記ディスクリプタに規定されている前記開始アドレスが、前記メインメモリにおいて前記データを格納可能な領域として予め設定された領域である許可領域内にあると、前記読込部によって読み込まれた前記ディスクリプタを利用可能であると判定する判定部と、
前記読込部によって読み込まれた前記ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する転送部と、
を備え、
前記ディスクリプタは予め複数用意されており、
前記転送部は、
(A)前記予め複数用意されたディスクリプタの内、前記読込部によって読み込まれた第一ディスクリプタが、前記判定部によって利用可能であると判定されると、前記第一ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送し、
(B)前記第一ディスクリプタが前記判定部によって利用可能でないと判定されると、前記予め複数用意されたディスクリプタの内、前記読込部によって前記第一ディスクリプタよりも後に読み込まれた第二ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する
通信制御機器。 A communication control device that transfers data received from the network to the main memory.
A read unit that reads a descriptor that specifies the start address of the area where the data should be stored, and
When the start address specified in the descriptor read by the reading unit is within the permitted area which is a preset area for storing the data in the main memory, the reading unit reads the data. A determination unit that determines that the descriptor is available, and
A transfer unit that transfers the data to an area whose start address is the start address specified in the descriptor read by the read unit.
Equipped with
Multiple descriptors are prepared in advance,
The transfer unit
(A) When it is determined that the first descriptor read by the reading unit among the plurality of descriptors prepared in advance can be used by the determination unit, the start specified in the first descriptor is specified. Transfer the data to the area starting from the address,
(B) When it is determined by the determination unit that the first descriptor is not available, it is defined as the second descriptor read by the reading unit after the first descriptor among the plurality of descriptors prepared in advance. A communication control device that transfers the data to an area whose start address is the start address.
請求項1に記載の通信制御機器。 In the determination unit, (A) the start address specified in the descriptor read by the reading unit is in the permitted area, and (B) the data size of the received data and the reading are performed. When the end address of the transferred area when the data is transferred, which is calculated from the start address specified in the descriptor read by the unit, is within the permitted area, the data is read by the read unit. The communication control device according to claim 1, wherein it is determined that the descriptor can be used.
請求項1または2に記載の通信制御機器。 The communication control device according to claim 1 or 2, wherein the permission area is calculated from the start address of the permission area and the data size of the permission area acquired in advance.
前記第一ディスクリプタは前記格納部に格納されており、
前記転送部は、(A)前記第一ディスクリプタが前記判定部によって利用可能でないと判定され、かつ、(B)前記格納部に格納されていた前記第一ディスクリプタとは異なる前記ディスクリプタであって、前記読込部によって前記第一ディスクリプタよりも後に読み込まれた前記ディスクリプタである後行ディスクリプタが、前記判定部によって利用可能であると判定されると、前記後行ディスクリプタを前記第二ディスクリプタとして、前記後行ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する
請求項1から3のいずれか1項に記載の通信制御機器。 Each time the data is to be received, a storage unit for storing the descriptor set in the main memory before receiving the data is further provided.
The first descriptor is stored in the storage unit, and is stored in the storage unit.
The transfer unit is the descriptor that is different from (A) the first descriptor determined by the determination unit and (B) the first descriptor stored in the storage unit. When it is determined by the determination unit that the trailing descriptor, which is the descriptor read after the first descriptor by the reading unit, is available, the trailing descriptor is used as the second descriptor, and the latter is described. The communication control device according to any one of claims 1 to 3, wherein the data is transferred to an area having the start address specified in the line descriptor as a start address.
前記読込部は、前記格納部とは異なる第二格納部に予め格納されている前記ディスクリプタである退避用ディスクリプタを読み込み、
前記転送部は、前記読込部によって読み込まれた前記退避用ディスクリプタを前記第二ディスクリプタとして、前記退避用ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する
請求項4に記載の通信制御機器。 When the number of the descriptors stored in the storage unit and read by the reading unit and determined not to be available by the determination unit exceeds a preset reference number,
The reading unit reads a save descriptor which is the descriptor stored in advance in a second storage unit different from the storage unit, and reads the descriptor.
A claim that the transfer unit transfers the data to an area in which the save descriptor read by the read unit is used as the second descriptor and the start address specified in the save descriptor is the start address. The communication control device according to 4.
請求項5に記載の通信制御機器。 The communication control device according to claim 5, wherein the start address specified by the save descriptor is an area in which the data can be stored in the main memory and is in an area different from the permitted area.
前記データを格納すべき領域の開始アドレスを規定するディスクリプタを読み込む読込ステップと、
前記読込ステップにて読み込まれた前記ディスクリプタに規定されている前記開始アドレスが、前記メインメモリにおいて前記データを格納可能な領域として予め設定された領域である許可領域内にあると、前記読込ステップにて読み込まれた前記ディスクリプタを利用可能であると判定する判定ステップと、
前記読込ステップにて読み込まれた前記ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する転送ステップと、
を含み、
前記ディスクリプタは予め複数用意されており、
前記転送ステップは、
(A)前記予め複数用意されたディスクリプタの内、前記読込ステップにて読み込まれた第一ディスクリプタが、前記判定ステップにて利用可能であると判定されると、前記第一ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送し、
(B)前記第一ディスクリプタが前記判定ステップにて利用可能でないと判定されると、前記予め複数用意されたディスクリプタの内、前記読込ステップにて前記第一ディスクリプタよりも後に読み込まれた第二ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する
制御方法。 It is a control method of a communication control device that transfers data received from the network to the main memory.
A read step that reads a descriptor that specifies the start address of the area where the data should be stored, and
When the start address specified in the descriptor read in the read step is within the permitted area which is a preset area for storing the data in the main memory, the read step is performed. And the determination step of determining that the descriptor read in
A transfer step of transferring the data to an area having the start address specified in the descriptor read in the read step as a start address, and a transfer step.
Including
Multiple descriptors are prepared in advance,
The transfer step is
(A) Among the plurality of descriptors prepared in advance, when it is determined that the first descriptor read in the reading step can be used in the determination step, it is specified in the first descriptor. The data is transferred to the area having the start address as the start address, and the data is transferred.
(B) When it is determined that the first descriptor is not available in the determination step, the second descriptor read after the first descriptor in the read step among the plurality of descriptors prepared in advance. A control method for transferring the data to an area having the start address as the start address specified in 1.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020149861A JP7476733B2 (en) | 2020-09-07 | 2020-09-07 | COMMUNICATION CONTROL DEVICE AND METHOD FOR CONTROLLING COMMUNICATION CONTROL DEVICE |
PCT/JP2021/006542 WO2022049801A1 (en) | 2020-09-07 | 2021-02-22 | Communication control device and control method for communication control device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020149861A JP7476733B2 (en) | 2020-09-07 | 2020-09-07 | COMMUNICATION CONTROL DEVICE AND METHOD FOR CONTROLLING COMMUNICATION CONTROL DEVICE |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2022044302A true JP2022044302A (en) | 2022-03-17 |
JP7476733B2 JP7476733B2 (en) | 2024-05-01 |
Family
ID=80490843
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020149861A Active JP7476733B2 (en) | 2020-09-07 | 2020-09-07 | COMMUNICATION CONTROL DEVICE AND METHOD FOR CONTROLLING COMMUNICATION CONTROL DEVICE |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP7476733B2 (en) |
WO (1) | WO2022049801A1 (en) |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI226546B (en) | 2002-06-18 | 2005-01-11 | Via Tech Inc | Method for checking address of data to be transferred in DMA mode and DMA controller |
JP4390694B2 (en) | 2004-12-24 | 2009-12-24 | 富士通株式会社 | DMA circuit and disk array device using the same |
JP2009032053A (en) | 2007-07-27 | 2009-02-12 | Sony Corp | Data reception system |
JP2010004262A (en) * | 2008-06-19 | 2010-01-07 | Sony Corp | Information reception device and information reception method |
US7921237B1 (en) | 2008-09-29 | 2011-04-05 | Network Appliance, Inc. | Preserving data integrity of DMA descriptors |
JP5287301B2 (en) | 2009-01-30 | 2013-09-11 | 富士通株式会社 | Descriptor transfer device, I / O controller, and descriptor transfer method |
-
2020
- 2020-09-07 JP JP2020149861A patent/JP7476733B2/en active Active
-
2021
- 2021-02-22 WO PCT/JP2021/006542 patent/WO2022049801A1/en active Application Filing
Also Published As
Publication number | Publication date |
---|---|
JP7476733B2 (en) | 2024-05-01 |
WO2022049801A1 (en) | 2022-03-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109491958B (en) | Error Handling System and Error Handling Methods | |
US11609793B2 (en) | Electronic apparatus determining GPUs in a network for effective data learning and method for controlling thereof | |
US7516254B2 (en) | Memory control apparatus | |
EP0132161B1 (en) | Apparatus for controlling a plurality of interruption processings | |
US8213448B2 (en) | Method to support lossless real time data sampling and processing on rapid I/O end-point | |
US7934043B2 (en) | Data processing apparatus for controlling access to a memory based upon detection of completion of a DMA bus cycle | |
CN111694508B (en) | Method and system for managing LBA overlap checking in NVMe-based SSDs | |
JP2022044302A (en) | Communication control apparatus and method for controlling communication control apparatus | |
JPH11272609A (en) | Serial data transfer method and synchronous serial bus interface mounted with the method | |
US8756356B2 (en) | Pipe arbitration using an arbitration circuit to select a control circuit among a plurality of control circuits and by updating state information with a data transfer of a predetermined size | |
JP7063445B2 (en) | Fault information processing program, computer, fault notification method, computer system | |
EP1255375A1 (en) | Plural station memory data sharing system | |
FR2991475B1 (en) | SYSTEM CIRCUIT DEVICE AND SYSTEM EQUIPPED WITH MEMORY ACCESS METHOD | |
US20230099487A1 (en) | Communication control device and method for controlling communication control device | |
WO2023030128A1 (en) | Communication method and apparatus, electronic device, storage medium, and system on chip | |
JP4217386B2 (en) | FIFO device | |
GB2598666A (en) | I3C pending read with retransmission | |
US7167937B2 (en) | Bus system | |
JP4327765B2 (en) | Bus system | |
JP4527419B2 (en) | Program trace method and trace processing system | |
JP2005032036A (en) | Device for automatically setting interruption interval value for channel card | |
CN118210561A (en) | FPGA rapid loading method, device, equipment and medium | |
JP2009289269A6 (en) | Memory allocation method in buffer memory | |
JP2004355041A (en) | Dma transfer relay device, dma transfer method and dma transfer system | |
CN112286657A (en) | Electronic device and interrupt processing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20230310 |
|
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: 20240319 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20240401 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7476733 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |