JP7476733B2 - COMMUNICATION CONTROL DEVICE AND METHOD FOR CONTROLLING COMMUNICATION CONTROL DEVICE - Google Patents
COMMUNICATION CONTROL DEVICE AND METHOD FOR CONTROLLING COMMUNICATION CONTROL DEVICE Download PDFInfo
- Publication number
- JP7476733B2 JP7476733B2 JP2020149861A JP2020149861A JP7476733B2 JP 7476733 B2 JP7476733 B2 JP 7476733B2 JP 2020149861 A JP2020149861 A JP 2020149861A JP 2020149861 A JP2020149861 A JP 2020149861A JP 7476733 B2 JP7476733 B2 JP 7476733B2
- Authority
- JP
- Japan
- Prior art keywords
- descriptor
- data
- control device
- communication control
- 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.)
- Active
Links
- 238000004891 communication Methods 0.000 title claims description 318
- 238000000034 method Methods 0.000 title claims description 120
- 238000012546 transfer Methods 0.000 claims description 299
- 230000015654 memory Effects 0.000 claims description 192
- 238000003860 storage Methods 0.000 claims description 45
- 230000008569 process Effects 0.000 description 72
- 101100408464 Caenorhabditis elegans plc-1 gene Proteins 0.000 description 43
- 238000012545 processing Methods 0.000 description 35
- 230000000694 effects Effects 0.000 description 34
- 238000010586 diagram Methods 0.000 description 20
- 230000005856 abnormality Effects 0.000 description 10
- 238000005516 engineering process Methods 0.000 description 8
- 102100026205 1-phosphatidylinositol 4,5-bisphosphate phosphodiesterase gamma-1 Human genes 0.000 description 4
- 101000691599 Homo sapiens 1-phosphatidylinositol 4,5-bisphosphate phosphodiesterase gamma-1 Proteins 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 4
- 238000004904 shortening Methods 0.000 description 4
- 238000001514 detection method Methods 0.000 description 3
- 238000004519 manufacturing process Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000005352 clarification Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000008570 general process Effects 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000003936 working memory Effects 0.000 description 1
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)
Description
本発明は、ネットワークから受信したデータをメインメモリへと転送する通信制御機器等に関する。 The present invention relates to a communication control device that transfers data received from a network to a main memory.
従来、ネットワークから受信したデータをメインメモリへと転送する通信制御機器について、ディスクリプタによる誤ったデータ転送を防止する技術が知られている。例えば、下掲の特許文献1には、ディスクリプタを読み出すときに、ディスクリプタが正しいか否かを確認して、メモリのデータのDMA転送の可否を判定するDMA回路が開示されている。DMA回路は、ディスクリプタが正しくないと判定すると、DMA転送を行わずに、CPUにエラー通知を行う。そして、エラーを通知されたCPUによって適切な設定がなされた後に、DMA回路は転送を実行する。
Conventionally, there is known a technique for preventing erroneous data transfer due to a descriptor in a communication control device that transfers data received from a network to a main memory. For example, the below-mentioned
しかしながら、上述のような従来技術は、「受信したデータを、ディスクリプタに従ってメインメモリへと転送する」というデータ受信処理を、高速に実行することができないという問題がある。例えば、上述のような従来技術は、高速な制御周期(例えば、100μs)で周期的に実行すべきデータ受信処理を、前記制御周期内に完了することは困難である。以下、従来技術の抱える問題の詳細を、図8を用いて説明する。 However, the above-mentioned conventional technology has a problem in that it is not possible to execute the data reception process, which involves "transferring received data to main memory according to the descriptor," at high speed. For example, the above-mentioned conventional technology has difficulty completing the data reception process, which should be executed periodically at a high-speed control period (e.g., 100 μs), within the control period. The details of the problems with the conventional technology are explained below with reference to FIG. 8.
図8は、上述のような従来技術において、ディスクリプタに従ってデータをメインメモリへと転送する通信制御機器が前記ディスクリプタの許否(当否)を判定してから、前記データを前記メインメモリへと転送するまでに要する時間等を説明する図である。 Figure 8 is a diagram explaining the time required for a communication control device that transfers data to a main memory according to a descriptor to transfer the data to the main memory after determining whether the descriptor is permissible (valid) in the prior art described above.
上述のような従来技術において、前記通信制御機器が前記ディスクリプタの誤りを検知した場合、前記通信制御機器は、その検知結果をCPUへと通知する。上述の通知を受けたCPUは、ディスクリプタを再設定する。そして、CPUによって再設定されたディスクリプタに従って、前記通信制御機器は、データをメインメモリへと転送する。 In the conventional technology described above, when the communication control device detects an error in the descriptor, the communication control device notifies the CPU of the detection result. The CPU, which receives the notification, resets the descriptor. Then, the communication control device transfers data to the main memory according to the descriptor reset by the CPU.
そのため、図8の(A)に示すように、前記通信制御機器は、CPU(ソフトウェア)によるディスクリプタの再設定処理が完了するまで待機しなければならず、ディスクリプタの誤りを検知してから、データをメインメモリへと転送するまでに要する時間が長い。 As a result, as shown in FIG. 8 (A), the communication control device must wait until the CPU (software) has completed the descriptor reconfiguration process, and it takes a long time from detecting a descriptor error to transferring the data to the main memory.
また、一般に通信制御機器は、データを受信してからメインメモリへと転送するまでの間、受信したデータを、一時的な格納領域であるバッファ(例えば、FIFO(First In First Out)方式の格納領域であるデータFIFO)に格納する。そして、通信制御機器は、バッファに格納したデータを、ディスクリプタに従ってメインメモリへと転送する。ただし、通信制御機器の備えるバッファの記憶容量は限られているのが通常である。また、通信制御機器は、いったんバッファにデータを格納した後は、そのデータのメインメモリへの転送が完了するまで、そのデータをバッファに保存し続けておくのが原則である。 Furthermore, communications control devices generally store received data in a buffer (for example, a data FIFO, which is a storage area using the FIFO (First In First Out) method) as a temporary storage area between when the data is received and when it is transferred to the main memory. The communications control device then 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 communications control device is usually limited. Furthermore, as a rule, once data has been stored in the buffer, the communications control device will keep the data stored in the buffer until the transfer of that data to the main memory is complete.
そのため、図8の(B)に示すように、ディスクリプタの許否を判定してから、データをメインメモリへと転送するまでに要する時間が長くなると、受信したデータをバッファに格納することができず、その結果、受信したデータを喪失する可能性がある。 Therefore, as shown in FIG. 8B, if the time required from determining whether the descriptor is acceptable to transferring the data to the main memory becomes long, the received data cannot be stored in the buffer, and 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, after receiving
そのため、ソフトウェアによるディスクリプタの再設定処理が完了し、データ1のメインメモリへの転送が完了するまでに、前記通信制御機器がさらにデータ4を受信すると、前記通信制御機器は、データ4を、バッファに格納することができない。そのため、前記通信制御機器は、受信したデータ4をメインメモリへと転送することができず、データ4は失われる。
Therefore, if the communication control device further receives
図8を用いて説明してきたように、「ディスクリプタの誤りを検知すると、CPUに検知結果を通知し、CPUによって再設定されたディスクリプタに従ってデータをメインメモリへと転送する」という従来技術には、以下の問題がある。すなわち、前記従来技術には、データ転送に要する時間が長くなるという問題があり、また、データ転送に要する時間が長くなった結果、受信したデータが失われる(つまり、メインメモリへと転送できない)可能性があるといった問題がある。 As explained with reference to FIG. 8, the conventional technology "when an error in a descriptor is detected, the detection result is notified to the CPU, and data is transferred to the main memory according to the descriptor reset by the CPU" has the following problems. That is, the conventional technology has a problem that it takes a long time to transfer data, and as a result of the long time required for data transfer, there is a problem that the received data may be lost (i.e., the data cannot be transferred to the main memory).
本発明の一態様は、ディスクリプタによる誤ったデータ転送を防止しつつ、ネットワークから受信したデータを高速にメインメモリへと転送することができる通信制御機器を実現することを目的とする。 One aspect of the present invention aims to realize a communication control device that can transfer data received from a network to main memory at high speed while preventing erroneous data transfer due to a descriptor.
上記の課題を解決するために、本発明の一態様に係る通信制御機器は、ネットワークから受信したデータをメインメモリへと転送する通信制御機器であって、前記データを格納すべき領域の開始アドレスを規定するディスクリプタを読み込む読込部と、前記読込部によって読み込まれた前記ディスクリプタに規定されている前記開始アドレスが、前記メインメモリにおいて前記データを格納可能な領域として予め設定された領域である許可領域内にあると、前記読込部によって読み込まれた前記ディスクリプタを利用可能であると判定する判定部と、前記読込部によって読み込まれた前記ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する転送部と、を備え、前記ディスクリプタは予め複数用意されており、前記転送部は、(A)前記予め複数用意されたディスクリプタの内、前記読込部によって読み込まれた第一ディスクリプタが、前記判定部によって利用可能であると判定されると、前記第一ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送し、(B)前記第一ディスクリプタが前記判定部によって利用可能でないと判定されると、前記予め複数用意されたディスクリプタの内、前記読込部によって前記第一ディスクリプタよりも後に読み込まれた第二ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する。 In order to solve the above problem, a communication control device according to one aspect of the present invention is a communication control device that transfers data received from a network to a main memory, and includes a reading unit that reads a descriptor that specifies the start address of an area in which the data is to be stored, a determination unit that determines that the descriptor read by the reading unit is usable if the start address specified in the descriptor read by the reading unit is within an allowed area that is a pre-set area in the main memory in which the data can be stored, and a transfer unit that transfers the data to an area whose top address is the start address specified in the descriptor read by the reading unit. and a transfer unit that transfers the data, and a plurality of the descriptors are prepared in advance, and the transfer unit (A) transfers the data to an area having the start address specified in the first descriptor as a leading address when the determination unit determines that a first descriptor read by the reading unit among the plurality of the prepared descriptors is available, and (B) transfers the data to an area having the start address specified in a second descriptor read by the reading unit after the first descriptor as a leading address when the determination unit determines that the first descriptor is not available.
前記の構成によれば、前記通信制御機器は、前記予め複数用意されたディスクリプタの中から読み込んだ第一ディスクリプタを「利用可能である」と判定すると、前記第一ディスクリプタの規定する開始アドレスを先頭アドレスとする領域にデータを転送する。また、前記通信制御機器は、前記第一ディスクリプタを「利用可能でない」と判定すると、前記予め複数用意されたディスクリプタの中からさらに、前記第二ディスクリプタを読み込む。そして、前記通信制御機器は、前記第二ディスクリプタの規定する前記開始アドレスを先頭アドレスとする領域に、前記データを転送する。 According to the above configuration, when the communication control device determines that the first descriptor read from the multiple prepared descriptors is "available," it transfers data to an area whose top address is the start address specified by the first descriptor. When the communication control device determines that the first descriptor is "unavailable," it further reads the second descriptor from the multiple prepared descriptors. Then, the communication control device transfers the data to an area whose top address is the start address specified by the second descriptor.
つまり、前記通信制御機器は、読み込んだ前記第一ディスクリプタの規定する開始アドレスが前記許可領域内にないと判定した場合にも、その判定結果をCPU等に通知することはなく、CPU等に前記第一ディスクリプタを正しいものに再設定させることはない。前記通信制御機器は、前記第一ディスクリプタの規定する開始アドレスが前記許可領域内にないと判定すると、予め用意された前記第二ディスクリプタをさらに読み込み、読み込んだ前記第二ディスクリプタに従って、前記データをメインメモリへと転送する。 In other words, even if the communication control device determines that the start address specified by the read first descriptor is not within the permitted area, it does not notify the CPU or the like of the determination result, and does not cause the CPU or the like to 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, it further reads the second descriptor prepared in advance, and transfers the data to main memory according to the read second descriptor.
前記通信制御機器は、前記予め複数用意されたディスクリプタの中から前記データの転送に「利用可能なディスクリプタ」を選択し、選択した「利用可能なディスクリプタ」に従って、前記データを転送する。 The communication control device selects an "available descriptor" for the data transfer from among the multiple descriptors prepared in advance, and transfers the data according to the selected "available descriptor."
そのため、前記通信制御機器は、前記ディスクリプタによる誤ったデータ転送を防止することができ、また、前記データの転送に「利用可能なディスクリプタ」をCPU等に再設定させる場合に比べて、前記データの転送に要する時間を短縮することができる。 As a result, the communication control device can prevent erroneous data transfer using the descriptor, and can reduce the time required to transfer the data compared to when the CPU or the like is forced to reset the "available descriptor" for the data transfer.
つまり、前記通信制御機器は、ディスクリプタによる誤ったデータ転送を防止しつつ、ネットワークから受信したデータを高速にメインメモリへと転送することができるとの効果を奏する。 In other words, the communication control device has the effect of preventing erroneous data transfer due to the descriptor, while being able to transfer data received from the network to the main memory at high speed.
特に、「読み込んだディスクリプタに規定されている開始アドレスが、前記許可領域内にあるか否か」の判定は、前記データをネットワークから受信する前であっても、実行可能である。そのため、前記通信制御機器は、「ディスクリプタによる誤ったデータ転送」を防止するための処理を、前記データを受信する前に実行することができる。 In particular, the determination of "whether or not the start address specified in the read descriptor is within the permitted area" can be performed even before the data is received from the network. Therefore, the communication control device can perform processing to prevent "erroneous data transfer due to a descriptor" before receiving the data.
前記通信制御機器は、「ディスクリプタによる誤ったデータ転送」を防止するための処理を前記データの受信前に実行しておくことで、前記データを受信してから前記データを前記メインメモリへと転送するまでの時間を短縮できるという効果を奏する。 The communication control device performs processing to prevent "erroneous data transfer due to a descriptor" before receiving the data, thereby achieving the effect of shortening the time from receiving the data to transferring the data to the main memory.
ここで、前記通信制御機器は、NIC(Network Interface Card、ネットワーク・インターフェイス・カード)として実現されるのが望ましい。前記通信制御機器は、典型的には、FPGA(Field-Programmable gate array)またはASIC(Application Specific Integrated Circuit)等のハードウェアによる論理回路で構成される。 Here, it is preferable that the communication control device is realized as a NIC (Network Interface Card). The communication control device is typically configured with a hardware logic circuit such as an FPGA (Field-Programmable gate array) or an ASIC (Application Specific Integrated Circuit).
ディスクリプタの拒否を判定する前記通信制御機器を、ハードウェアによる論理回路で構成した場合、以下の効果を実現することができる。すなわち、一般的に、処理内容が同じであれば、ハードウェアによる処理の方が、ソフトウェア(具体的には、CPU)による処理よりも、高速で実行することができる。そのため、ハードウェアによる論理回路で構成された前記通信制御機器は、CPUにディスクリプタの拒否を判定させる場合に比べて高速に、ディスクリプタの拒否を判定することができるとの効果を奏する。 When the communication control device that determines whether to reject a descriptor is configured with a hardware logic circuit, the following effect can be achieved. That is, generally, if the processing content is the same, processing by hardware can be executed faster than processing by software (specifically, a CPU). Therefore, the communication control device configured with a hardware logic circuit has the effect of being able to determine whether to reject a descriptor faster than when the CPU is used to determine whether to reject a descriptor.
特に、前記通信制御機器は、CPU等によりディスクリプタの再設定を必要とせずに、予め複数用意されたディスクリプタの中から、前記データの転送に「利用可能なディスクリプタ」を選択し、選択したディスクリプタに従って転送を実行する。 In particular, the communication control device selects an "available descriptor" for the data transfer from among a number of descriptors prepared in advance, without requiring a CPU or other device to reconfigure the descriptor, and executes the transfer according to the selected descriptor.
ハードウェアによる論理回路で構成した場合、前記通信制御機器は、前記データの転送に「利用可能なディスクリプタ」を予め複数用意されたディスクリプタの中から選択する処理を極めて高速に実行することができる。また、ハードウェアによる論理回路で構成した場合、前記通信制御機器は、予め複数用意されたディスクリプタの中から選択したディスクリプタに従って、極めて高速に転送を実行することができる。 When configured with a hardware logic circuit, the communication control device can extremely quickly select an "available descriptor" for the data transfer from among a number of descriptors prepared in advance. Also, when configured with a hardware logic circuit, the communication control device can extremely quickly perform transfer according to a descriptor selected from a number of descriptors prepared in advance.
したがって、前記通信制御機器をハードウェアによる論理回路で構成した場合、前記通信制御機器は、ディスクリプタによる誤ったデータ転送を防止しつつ、ネットワークから受信したデータを極めて高速に転送することができるとの効果を奏する。 Therefore, when the communication control device is configured with a hardware logic circuit, the communication control device has the effect of being able to transfer data received from the network at extremely high speeds while preventing erroneous data transfer due to the descriptor.
本発明の一態様に係る通信制御機器において、前記判定部は、(A)前記読込部によって読み込まれた前記ディスクリプタに規定されている前記開始アドレスが、前記許可領域内にあり、かつ、(B)受信した前記データのデータサイズと、前記読込部によって読み込まれた前記ディスクリプタに規定されている前記開始アドレスとから算出する、前記データを転送した場合の転送後の領域の末尾アドレスが前記許可領域内にある場合に、前記読込部によって読み込まれた前記ディスクリプタを利用可能であると判定してもよい。 In a communication control device according to one aspect of the present invention, the determination unit may determine that the descriptor read by the reading unit is available if (A) the start address specified in the descriptor read by the reading unit is within the permitted area, and (B) the end address of the area after the data is transferred, calculated from the data size of the received data and the start address specified in the descriptor read by the reading unit, is within the permitted area.
前記の構成によれば、前記通信制御機器は、受信した前記データのデータサイズと、前記読込部によって読み込まれた前記ディスクリプタの規定する前記開始アドレスとから、前記末尾アドレスを算出する。そして、前記通信制御機器は、「読み込んだディスクリプタの規定する開始アドレスが前記許可領域内にあり」、かつ、「前記末尾アドレスが前記許可領域内にある」と判定すると、読み込んだ前記ディスクリプタを利用可能であると判定する。 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 specified 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 within the permitted area" and "the end address is within the permitted area," it determines that the read descriptor is available for use.
ここで、「読み込んだディスクリプタの規定する開始アドレスが前記許可領域内にある」場合であっても、「前記末尾アドレスが前記許可領域内にない」時がある。そのような時には、読み込んだディスクリプタは、受信したデータの転送先を決定するディスクリプタとしては不適切であり、つまり、受信したデータの転送先を決定するディスクリプタとしては利用することができない(利用不能である)。 Here, even if "the start address specified by the read descriptor is within the permitted area," there may be times when "the end address is not within the permitted area." In such cases, the read descriptor is inappropriate as a descriptor for determining the transfer destination of the received data, that is, it cannot be used (is unusable) as a descriptor for determining the transfer destination of the received data.
そこで、前記通信制御機器は、「読み込んだディスクリプタの規定する開始アドレス」に加えて、受信したデータのデータサイズをも考慮して、「読み込んだディスクリプタが利用可能か否か」を判定する。 Therefore, the communication control device determines whether the read descriptor is available by taking into account the data size of the received data in addition to the starting address specified by the read descriptor.
したがって、前記通信制御機器は、開始アドレスに加えて、受信したデータのデータサイズをも考慮することで、予め複数用意されたディスクリプタの中から、受信したデータの転送に「利用可能なディスクリプタ」を、より正確に選択できるとの効果を奏する。 Therefore, by taking into account the data size of the received data in addition to the starting address, the communication control device can more accurately select an "available descriptor" for transferring the received data from among multiple descriptors prepared in advance.
本発明の一態様に係る通信制御機器は、予め取得した、前記許可領域の先頭アドレスと前記許可領域のデータサイズとから、前記許可領域を算出してもよい。 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, which are obtained 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 calculates the permission area from the acquired start address of the permission area and the data size of the permission area.
したがって、前記通信制御機器は、予め取得した、前記許可領域の先頭アドレスと前記許可領域のデータサイズとから、前記許可領域を算出することができるとの効果を奏する。 Therefore, the communication control device has the effect of being able to calculate the permission area from the start address of the permission area and the data size of the permission area, which are previously acquired.
本発明の一態様に係る通信制御機器は、前記データを受信しようとする都度、前記データを受信する前に前記メインメモリに設定される前記ディスクリプタを格納する格納部をさらに備え、前記第一ディスクリプタは前記格納部に格納されており、前記転送部は、(A)前記第一ディスクリプタが前記判定部によって利用可能でないと判定され、かつ、(B)前記格納部に格納されていた前記第一ディスクリプタとは異なる前記ディスクリプタであって、前記読込部によって前記第一ディスクリプタよりも後に読み込まれた前記ディスクリプタである後行ディスクリプタが、前記判定部によって利用可能であると判定されると、前記後行ディスクリプタを前記第二ディスクリプタとして、前記後行ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送してもよい。 The communication control device according to one aspect of the present invention further includes a storage unit that stores the descriptor set in the main memory before receiving the data each time the data is to be received, the first descriptor being stored in the storage unit, and the transfer unit may transfer the data to an area having the start address specified in the subsequent descriptor as the second descriptor when (A) the determination unit determines that the first descriptor is not available, and (B) the determination unit determines that a subsequent descriptor, which is different from the first descriptor stored in the storage unit and is read by the reading unit after the first descriptor, is available.
前記の構成によれば、前記通信制御機器は、前記格納部に格納された第一ディスクリプタを「利用可能である」と判定すると、前記第一ディスクリプタの規定する開始アドレスを先頭アドレスとする領域にデータを転送する。 According to the above configuration, when the communication control device determines that the first descriptor stored in the storage unit is "available," it transfers data to an area whose top address is the start address specified by the first descriptor.
また、前記通信制御機器は、前記第一ディスクリプタを「利用可能でない」と判定し、かつ、前記後行ディスクリプタを「利用可能である」と判定すると、前記後行ディスクリプタを前記第二ディスクリプタとして、前記後行ディスクリプタに従って転送を実行する。例えば、前記通信制御機器は、前記第一ディスクリプタを「利用可能でない」と判定すると、前記格納部に格納されている前記後行ディスクリプタをさらに読み込む。そして、前記通信制御機器は、読み込んだ前記後行ディスクリプタが「利用可能である」と判定すると、前記後行ディスクリプタの規定する前記開始アドレスを先頭アドレスとする領域に、前記データを転送する。 Furthermore, when the communication control device determines that the first descriptor is "unavailable" and the subsequent descriptor is "available," the communication control device sets the subsequent descriptor as the second descriptor and executes a transfer according to the subsequent descriptor. For example, when the communication control device determines that the first descriptor is "unavailable," it further reads the subsequent descriptor stored in the storage unit. Then, when the communication control device determines that the read subsequent descriptor is "available," it transfers the data to an area whose leading address is the start address specified by the subsequent descriptor.
ここで一般に、或る情報(例えば、数メガバイト(Mbyte)の画像情報)が、何個の前記データ(より正確には、何個のフレームデータ)として送信されるのかを、CPU等(ソフトウェア)は計算していない。例えば、1個の前記データ(フレームデータ)のデータサイズが、通常は「1.5キロバイト(Kbyte)」である場合であっても、CPU等は、その或る情報が、何個の前記データとして送信されるのかを計算していない。 Generally, the CPU or the like (software) does not calculate how many pieces of data (more precisely, how many frames of data) a certain piece of information (e.g., image information of several megabytes (Mbytes)) will be transmitted as. For example, even if the data size of one piece of data (frame data) is normally "1.5 kilobytes (Kbytes)," the CPU or the like does not calculate how many pieces of data the certain piece of information will be transmitted as.
その代わりに、一般にCPU等は、或る情報を受信する前に、その或る情報を常に受信できるように(前記メインメモリへと転送できるように)、十分な数(個数)の前記ディスクリプタを、前記メインメモリに設定しておく。つまり、CPU等は、ネットワークから受信すべき前記データの個数に比して十分余裕のある個数の前記ディスクリプタを、前記データを受信する前に、予め前記メインメモリに設定しておく。 Instead, the CPU or the like generally sets a sufficient number (number) of the descriptors in the main memory before receiving certain information so that the certain information can always be received (transferred to the main memory). In other words, the CPU or the like sets in advance in the main memory a number of the descriptors that is sufficient compared to the number of pieces of data to be received from the network before receiving the data.
そして、CPU等によって前記メインメモリに設定された前記ディスクリプタは、前記格納部に格納される。そのため、ネットワークから受信すべき前記データの個数に比して、前記格納部に格納されている前記ディスクリプタの個数は、十分に多い。 The descriptors set in the main memory by the CPU or the like are then stored in the storage unit. Therefore, the number of the descriptors stored in the storage unit is sufficiently large compared to the number of pieces of data to be received from the network.
したがって、前記通信制御機器は、転送すべき前記データの個数に比して十分多い個数の前記ディスクリプタの中から、前記データの転送に「利用可能なディスクリプタ」を選択することができるとの効果を奏する。 Therefore, the communication control device can select "available descriptors" for transferring the data from among a number of descriptors that is sufficiently larger than the number of data to be transferred.
本発明の一態様に係る通信制御機器において、前記格納部に格納され、前記読込部によって読み込まれた前記ディスクリプタであって、前記判定部によって利用可能でないと判定された前記ディスクリプタの個数が、予め設定された基準個数を超えると、前記読込部は、前記格納部とは異なる第二格納部に予め格納されている前記ディスクリプタである退避用ディスクリプタを読み込み、前記転送部は、前記読込部によって読み込まれた前記退避用ディスクリプタを前記第二ディスクリプタとして、前記退避用ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送してもよい。 In a communication control device according to one aspect of the present invention, when the number of the descriptors stored in the storage unit and read by the reading unit that are determined by the determination unit to be unavailable exceeds a preset reference number, the reading unit may read a save descriptor that is the descriptor pre-stored in a second storage unit different from the storage unit, and the transfer unit may transfer the data to an area whose top address is the start address specified in the save descriptor, using the save descriptor read by the reading unit as the second descriptor.
前記の構成によれば、前記通信制御機器は、読み込んだ「前記格納部に格納されたディスクリプタ」であって、利用不能と判定したディスクリプタの個数が、前記基準個数を超えると、前記第二格納部に予め格納されている前記退避用ディスクリプタを読み込む。そして、前記通信制御機器は、前記退避用ディスクリプタを前記第二ディスクリプタとして、前記退避用ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する。 According to the above configuration, when the number of "descriptors stored in the storage unit" that are read and determined to be unavailable exceeds the reference number, the communication control device reads the save descriptor that is pre-stored in the second storage unit. Then, the communication control device transfers the data to an area whose top address is the start address specified in the save descriptor, using the save descriptor as the second descriptor.
ここで、読み込んだ「前記格納部に格納されたディスクリプタ」であって、利用不能と判定したディスクリプタの個数が、前記基準個数を超えている場合、以下の事象が発生している可能性がある。すなわち、「前記格納部に格納されたディスクリプタ」の全て、または、その大部分に、異常が発生している可能性がある。そして、「前記格納部に格納されたディスクリプタ」の全て、または、その大部分に、異常が発生している場合、「前記格納部に格納されたディスクリプタ」の中から「利用可能なディスクリプタ」を選択するのは不可能であり、または、多大の時間を要する。 If the number of "descriptors stored in the storage unit" that have been read and determined to be unavailable exceeds the reference number, the following event may have occurred. That is, an abnormality may have occurred in all or most of the "descriptors stored in the storage unit." If an abnormality has occurred in all or most of the "descriptors stored in the storage unit," it is impossible or takes a great deal of time to select a "usable descriptor" from the "descriptors stored in the storage unit."
そこで、前記通信制御機器は、「前記格納部に格納されており、利用不能と判定した」ディスクリプタの個数が、前記基準個数を超えると、「前記格納部に格納されたディスクリプタ」に代えて、前記退避用ディスクリプタに従って、前記データを転送する。 Therefore, when the number of "descriptors stored in the storage unit and determined to be unusable" exceeds the reference number, the communication control device transfers the data according to the backup descriptor instead of the "descriptors stored in the storage unit."
したがって、前記通信制御機器は、「前記格納部に格納されたディスクリプタ」の全て、または、その大部分について、異常が発生している場合にも、前記データを前記メインメモリへと、確実かつ高速に転送することができるとの効果を奏する。 Therefore, the communication control device has the effect of being able to reliably and quickly transfer the data to the main memory even if an abnormality occurs in all or most of the "descriptors stored in the storage unit."
本発明の一態様に係る通信制御機器において、前記退避用ディスクリプタの規定する開始アドレスは、前記メインメモリにおいて前記データを格納可能な領域であって、前記許可領域とは異なる領域内にあってもよい。 In a communication control device according to one aspect of the present invention, the start address specified by the save descriptor may be in an area in the main memory where the data can be stored, and may be in an area different from the permitted area.
前記の構成によれば、前記通信制御機器は、前記退避用ディスクリプタに従って前記データを前記メインメモリへと転送する場合、前記退避用ディスクリプタに従って前記データを、前記許可領域とは異なる領域へと転送する。言い換えれば、前記退避用ディスクリプタに従って前記データが転送される領域は、前記許可領域とは異なる。 According to the above configuration, when the communication control device transfers the data to the main memory in accordance with the save descriptor, the communication control device transfers the data to an area different from the permission area in accordance with the save descriptor. In other words, the area to which the data is transferred in accordance with the save descriptor is different from the permission area.
前記退避用ディスクリプタの規定する開始アドレスが前記許可領域内にある場合、以下の事象が発生し得る。すなわち、前記退避用ディスクリプタに従って前記許可領域内に転送された或るデータが、前記格納部に格納されている前記ディスクリプタに従って前記許可領域内に転送される別のデータによって、上書きされてしまう可能性がある。 If the start address specified by the save descriptor is within the permission area, the following event may occur. That is, data transferred into the permission area according to the save descriptor may be overwritten by other data transferred into the permission area according to the descriptor stored in the storage unit.
そして、上述のような事態を防ぐためには、例えば、「前記或るデータが転送された領域と、前記別のデータが転送される領域とが、重複するか」を判断する処理などの煩雑な処理が必要となる。 To prevent the above situation, complex processing is required, such as determining whether the area to which the certain data is transferred overlaps with the area to which the other data is transferred.
これに対して、前記退避用ディスクリプタの規定する開始アドレスが前記許可領域内にない場合、前記退避用ディスクリプタに従って前記メインメモリへと転送された前記或るデータが、前記別のデータによって上書きされてしまうことはない。 In contrast, if the start address specified by the save descriptor is not within the permitted area, the certain data transferred to the main memory according to the save descriptor will not be overwritten by the other data.
したがって、前記通信制御機器は、「前記退避用ディスクリプタに従って転送された或るデータが、前記格納部に格納されている前記ディスクリプタに従って転送される別のデータで上書きされる」といった事態を、煩雑な処理を要せず回避できるとの効果を奏する。 The communication control device therefore has the effect of being able to avoid a situation in which "certain data transferred according to the save descriptor is overwritten with other data transferred according to the descriptor stored in the storage unit" without the need for complex processing.
上記の課題を解決するために、本発明の一態様に係る制御方法は、ネットワークから受信したデータをメインメモリへと転送する通信制御機器の制御方法であって、前記データを格納すべき領域の開始アドレスを規定するディスクリプタを読み込む読込ステップと、前記読込ステップにて読み込まれた前記ディスクリプタに規定されている前記開始アドレスが、前記メインメモリにおいて前記データを格納可能な領域として予め設定された領域である許可領域内にあると、前記読込ステップにて読み込まれた前記ディスクリプタを利用可能であると判定する判定ステップと、前記読込ステップにて読み込まれた前記ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する転送ステップと、を含み、前記ディスクリプタは予め複数用意されており、前記転送ステップは、(A)前記予め複数用意されたディスクリプタの内、前記読込ステップにて読み込まれた第一ディスクリプタが、前記判定ステップにて利用可能であると判定されると、前記第一ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送し、(B)前記第一ディスクリプタが前記判定ステップにて利用可能でないと判定されると、前記予め複数用意されたディスクリプタの内、前記読込ステップにて前記第一ディスクリプタよりも後に読み込まれた第二ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する。 In order to solve the above problem, a 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, comprising: a read step of reading a descriptor that specifies a start address of an area in which the data is to be stored; a determination step of determining that the descriptor read in the read step is available if the start address specified in the descriptor read in the read step is within an allowed area that is a pre-set area in the main memory in which the data can be stored; and a determination step of storing the data in an area whose top address is the start address specified in the descriptor read in the read step. and a transfer step of transferring the data, where a plurality of the descriptors are prepared in advance, and the transfer step (A) transfers the data to an area having the start address specified in the first descriptor as a leading address when it is determined in the determination step that a first descriptor read in the read step among the plurality of the prepared descriptors is available, and (B) transfers the data to an area having the start address specified in a second descriptor read in the read step after the first descriptor as a leading address when it is determined in the determination step that the first descriptor is not available.
前記の構成によれば、前記制御方法は、前記予め複数用意されたディスクリプタの中から読み込んだ第一ディスクリプタを「利用可能である」と判定すると、前記第一ディスクリプタの規定する開始アドレスを先頭アドレスとする領域にデータを転送する。また、前記制御方法は、前記第一ディスクリプタを「利用可能でない」と判定すると、前記予め複数用意されたディスクリプタの中からさらに、前記第二ディスクリプタを読み込む。そして、前記制御方法は、前記第二ディスクリプタの規定する前記開始アドレスを先頭アドレスとする領域に、前記データを転送する。 According to the above configuration, when the control method determines that the first descriptor read from among the multiple prepared descriptors is "available," the control method transfers data to an area whose top address is the start address specified by the first descriptor. When the control method determines that the first descriptor is "unavailable," the control method further reads the second descriptor from among the multiple prepared descriptors. Then, the control method transfers the data to an area whose top address is the start address specified by the second descriptor.
つまり、前記制御方法は、読み込んだ前記第一ディスクリプタの規定する開始アドレスが前記許可領域内にないと判定した場合にも、その判定結果をCPU等に通知することはなく、CPU等に前記第一ディスクリプタを正しいものに再設定させることはない。前記制御方法は、前記第一ディスクリプタの規定する開始アドレスが前記許可領域内にないと判定すると、予め用意された前記第二ディスクリプタをさらに読み込み、読み込んだ前記第二ディスクリプタに従って、前記データをメインメモリへと転送する。 In other words, even if the control method determines that the start address specified by the read first descriptor is not within the permitted area, it does not notify the CPU or the like of the determination result, and does not cause the CPU to reset the first 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, it further reads the second descriptor prepared in advance and transfers the data to the main memory according to the read second descriptor.
前記制御方法は、前記予め複数用意されたディスクリプタの中から前記データの転送に「利用可能なディスクリプタ」を選択し、選択した「利用可能なディスクリプタ」に従って、前記データを転送する。 The control method involves selecting an "available descriptor" for the data transfer from among the multiple descriptors prepared in advance, and transferring the data according to the selected "available descriptor."
そのため、前記制御方法は、前記ディスクリプタによる誤ったデータ転送を防止することができ、また、前記データの転送に「利用可能なディスクリプタ」をCPU等に再設定させる場合に比べて、前記データの転送に要する時間を短縮することができる。 Therefore, the control method can prevent erroneous data transfer using the descriptor, and can also reduce the time required to transfer the data compared to a case in which the CPU or the like is forced to reset the "available descriptor" for the data transfer.
つまり、前記制御方法は、ディスクリプタによる誤ったデータ転送を防止しつつ、ネットワークから受信したデータを高速にメインメモリへと転送することができるとの効果を奏する。 In other words, the control method has the effect of preventing erroneous data transfer due to the descriptor while transferring data received from the network to the main memory at high speed.
特に、「読み込んだディスクリプタに規定されている開始アドレスが、前記許可領域内にあるか否か」の判定は、前記データをネットワークから受信する前であっても、実行可能である。そのため、前記制御方法は、「ディスクリプタによる誤ったデータ転送」を防止するための処理を、前記データを受信する前に実行することができる。 In particular, the determination of "whether or not the start address specified in the read descriptor is within the permitted area" can be performed even before the data is received from the network. Therefore, the control method can perform processing to prevent "erroneous data transfer due to a descriptor" before the data is received.
前記制御方法は、「ディスクリプタによる誤ったデータ転送」を防止するための処理を前記データの受信前に実行しておくことで、前記データを受信してから前記データを前記メインメモリへと転送するまでの時間を短縮できるという効果を奏する。 The control method has the effect of shortening the time from receiving the data to transferring the data to the main memory by executing a process to prevent "erroneous data transfer by a descriptor" before receiving the data.
ここで、前記通信制御機器は、NIC(Network Interface Card、ネットワーク・インターフェイス・カード)として実現されるのが望ましい。前記通信制御機器は、典型的には、FPGA(Field-Programmable gate array)またはASIC(Application Specific Integrated Circuit)等のハードウェアによる論理回路で構成される。 Here, it is preferable that the communication control device is realized as a NIC (Network Interface Card). The communication control device is typically configured with a hardware logic circuit such as an FPGA (Field-Programmable gate array) or an ASIC (Application Specific Integrated Circuit).
ディスクリプタの拒否を判定する前記通信制御機器を、ハードウェアによる論理回路で構成した場合、以下の効果を実現することができる。すなわち、一般的に、処理内容が同じであれば、ハードウェアによる処理の方が、ソフトウェア(具体的には、CPU)による処理よりも、高速で実行することができる。そのため、ハードウェアによる論理回路で構成された前記通信制御機器は、CPUにディスクリプタの拒否を判定させる場合に比べて高速に、ディスクリプタの拒否を判定することができるとの効果を奏する。 When the communication control device that determines whether to reject a descriptor is configured with a hardware logic circuit, the following effect can be achieved. That is, generally, if the processing content is the same, processing by hardware can be executed faster than processing by software (specifically, a CPU). Therefore, the communication control device configured with a hardware logic circuit has the effect of being able to determine whether to reject a descriptor faster than when the CPU is used to determine whether to reject a descriptor.
特に、前記制御方法は、CPU等によりディスクリプタの再設定を必要とせずに、予め複数用意されたディスクリプタの中から、前記データの転送に「利用可能なディスクリプタ」を選択し、選択したディスクリプタに従って転送を実行する。 In particular, the control method selects an "available descriptor" for the data transfer from among a number of previously prepared descriptors, without requiring a CPU or other device to reset the descriptor, and executes the transfer according to the selected descriptor.
ハードウェアによる論理回路で構成した場合、前記通信制御機器は、前記データの転送に「利用可能なディスクリプタ」を予め複数用意されたディスクリプタの中から選択する処理を極めて高速に実行することができる。また、ハードウェアによる論理回路で構成した場合、前記通信制御機器は、予め複数用意されたディスクリプタの中から選択したディスクリプタに従って、極めて高速に転送を実行することができる。 When configured with a hardware logic circuit, the communication control device can extremely quickly select an "available descriptor" for the data transfer from among a number of descriptors prepared in advance. Also, when configured with a hardware logic circuit, the communication control device can extremely quickly perform transfer according to a descriptor selected from a number of descriptors prepared in advance.
したがって、前記通信制御機器をハードウェアによる論理回路で構成した場合、前記制御方法は、ディスクリプタによる誤ったデータ転送を防止しつつ、ネットワークから受信したデータを極めて高速に転送することができるとの効果を奏する。 Therefore, when the communication control device is configured with a hardware logic circuit, the control method has the effect of preventing erroneous data transfer due to the descriptor while being able to transfer data received from the network at extremely high speeds.
本発明の一態様によれば、ディスクリプタによる誤ったデータ転送を防止しつつ、ネットワークから受信したデータを高速にメインメモリへと転送することができるとの効果を奏する。 According to one aspect of the present invention, it is possible to prevent erroneous data transfer due to the descriptor, while transferring data received from the network to the main memory at high speed.
〔実施形態1〕
以下、本発明の一側面に係る実施の形態(以下、「本実施形態」とも表記する)を、図面に基づいて説明する。なお、図中同一または相当部分には同一符号を付してその説明は繰返さない。本実施の形態においては、機械および設備等の制御対象を制御するPLC(Programmable Logic Controller)1の備える通信制御機器10を「ネットワークから受信したデータをメインメモリへと転送する通信制御機器」の典型例として説明を行なう。また、以下の説明において、「N」、「P」、「Q」、「X」、「Y」等は、各々、「1」以上の整数を示すものとする。
[Embodiment 1]
An embodiment according to one aspect of the present invention (hereinafter also referred to as "the present embodiment") will be described below with reference to the drawings. Note that the same or corresponding parts in the drawings are given the same reference numerals and their description will not be repeated. In this embodiment, a
§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 the control system)
Fig. 2 is a diagram showing an overview of a
図2に例示する制御システム0においては、ネットワークハブ2を介して、複数のネットワーク3が、PLC1に接続している。制御システム0における通信には、ギガ帯域が使用されてもよい。
In the
PLC1は、制御システム0の全体を制御する制御装置である。ネットワークハブ2は、PLC1と複数のネットワーク3との間の通信を管理するネットワークハブまたはネットワークスイッチである。図2に示す制御システム0においては、PLC1の1つのネットワークポート(すなわち、図1の受信ポート130)に対して、複数のネットワーク3が、例えば、ネットワーク3(1)および3(2)が、存在している。
ここで、ネットワーク3(1)および3(2)のいずれもが制御ネットワークであってもよいし、すなわち、PLC1と通信を行う全てのネットワーク3が制御ネットワークであってもよい。また、ネットワーク3(1)および3(2)のいずれか一方が制御ネットワークであり、他方がデータネットワークであってもよく、つまり、PLC1と通信を行うネットワーク3について、制御ネットワークとデータネットワークとが混在していてもよい。
Here, either network 3(1) or 3(2) may be a control network, i.e., all
例えば、ネットワーク3が制御ネットワークである場合、PLC1は、生産設備内の入力機器及び出力機器の制御を司る制御装置であり、また、ネットワークデバイスは、例えば、生産設備内の入力機器及び出力機器である。PLC1とネットワークデバイスとは、ネットワーク3を介してサイクリックに通信を行なうことで、INデータ及びOUTデータ(以下、「IOデータ」という)の送受信を行ない、PLC1は、生産設備の全体を制御する。すなわち、ネットワーク3が制御ネットワークである場合、制御システム0は、PLC1をマスタ装置(データ伝送を管理するマスタ装置)とし、ネットワークデバイスをスレーブ装置とするマスタ・スレーブ制御システムと捉えることができる。
For example, when
ネットワーク3が制御ネットワークである場合、ネットワーク3は、EtherCAT(Ethernet for Control Automation Technology:登録商標)規格等の産業用イーサネット(登録商標)規格に準拠するものであってもよい。ネットワーク3が制御ネットワークである場合、ネットワーク3は、EtherNet/IP(登録商標)規格に準拠するものであってもよい。
When
以下では、図2におけるPLC1とネットワークデバイスとの間の通信(以下、「ネットワーク通信」とも称する)がEthernet規格に準拠する例について説明する。また、CPU30と通信制御機器10とは、PCIe(Peripheral Component Interconnect Express)によって通信可能に接続されているものとする。
The following describes an example in which communication between the
なお、図2には、ネットワークハブ2を介して、複数のネットワーク3が、PLC1に接続する制御システム0を例示したが、制御システム0において、PLC1に、複数のネットワーク3がネットワークハブ2を介して接続することは必須ではない。制御システム0において、1つのネットワーク3(特に、1つの制御ネットワーク)が、ネットワークハブ2を介さずに、PLC1に接続してもよい。例えば、マスタ・スレーブ制御システムである制御システム0において、マスタ装置であるPLC1と、各々がスレーブ装置である1つ以上のネットワークデバイスとを、一筆書きの形式で通信可能に接続してもよい。
Note that while FIG. 2 illustrates a
(本実施形態に係る通信制御機器の概要)
詳細は図1を用いて後述するが、図2に例示したPLC1は、データ受信処理を実行する通信制御機器10と、PLC1の記憶手段であるメインメモリ20と、メインメモリ20に転送されたデータDtを用いて各種の処理を実行するCPU30とを備えている。
(Overview of the communication control device according to this embodiment)
Details will be described later using Figure 1, but the
(受信データのメインメモリへの転送に係る、一般的な処理について)
PLC1において、ネットワーク3から制御周期Cc(例えば、100μs)ごとに受信した各種のデータDtは、例えば以下のようにして、メインメモリ20へと転送される。すなわち、先ずCPU30は、「ネットワーク3からPLC1が受信したデータDtを格納すべき、メインメモリ20中の領域」の開始アドレスAsを規定するディスクリプタDcを、メインメモリ20に設定する。例えば、CPU30は、PLC1がデータDtを受信しようとする都度(例えば、制御周期Ccごとに)、データDtを受信する前に、通常ディスクリプタDcoを、メインメモリ20に設定する。
(General process for transferring 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)が上書きされる事態が発生し得る。
(Regarding data loss due to incorrect descriptors)
If the start address As defined in the descriptor Dc contains an error, the following situation may occur when data Dt is transferred to the main memory 20 in accordance with the descriptor Dc: That is, a situation may occur in which data Dt(X) transferred to the main memory 20 in accordance with a descriptor Dc that defines an incorrect start address As overwrites another data Dt(Y) transferred to the main memory 20 before the data Dt(X).
(ディスクリプタの許否の判定について)
誤った開始アドレスAsを規定した通常ディスクリプタDcoを利用することで、データDtを消失するといった事態が発生しないよう、通信制御機器10は、通常ディスクリプタDcoに従って転送を行う前に、通常ディスクリプタDcoの許否を判定する。
(Decision on whether a descriptor is acceptable)
To prevent a situation in which data Dt is lost due to the use of a normal descriptor Dco that specifies an incorrect start address As, 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の転送に用いることのできない「利用不能なディスクリプタ」と判定する。
If the start address As is within the standard receiving area Rgo and the end address Ae is within the standard receiving area Rgo, the
(予め準備しておいた複数のディスクリプタを用いて転送を実行する)
通信制御機器10は、ネットワーク3から受信したデータDtをメインメモリ20へと転送する際、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」であると判定すると、別のディスクリプタDc(Y)を用いて、転送を実行する。通信制御機器10は、複数のディスクリプタDcを予め準備しており、或る通常ディスクリプタDco(X)が「利用不能なディスクリプタ」であっても、別のディスクリプタDc(Y)を「利用可能なディスクリプタ」として用いて、転送を実行する。
(Transfer is performed 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)を、予め準備している。
In other words, in addition to a certain normal descriptor Dco(X), the
(複数の通常ディスクリプタの中から「利用可能なディスクリプタ」を選択する)
或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」と判定した場合に、通信制御機器10がデータDtの転送を実行するために「利用可能なディスクリプタ」として用いるディスクリプタDcは、例えば通常ディスクリプタDco(Y)である。
(Select an "available descriptor" from multiple normal descriptors)
When a certain normal descriptor Dco(X) is determined to be an "unavailable descriptor", the descriptor Dc that the
つまり、通信制御機器10は、或る通常ディスクリプタDco(X)以外に、別の通常ディスクリプタDco(Y)を予め準備しておく。そして、通信制御機器10は、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」と判定した場合、「利用可能なディスクリプタ」と判定した別の通常ディスクリプタDco(Y)を用いて、データDtの転送を実行する。
In other words, 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へと転送する。
When the
つまり、通信制御機器10は、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」であると判定すると、その或る通常ディスクリプタDco(X)をスキップし、その或る通常ディスクリプタDco(X)は、データDtの転送に用いない。通信制御機器10は、予め準備しておいた複数の通常ディスクリプタDcoの中から別の通常ディスクリプタDco(Y)をさらに読み込み、その別の通常ディスクリプタDco(Y)の拒否を判定する。通信制御機器10は、その別の通常ディスクリプタDco(Y)を「利用可能なディスクリプタ」であると判定すると、その別のディスクリプタDc(Y)の規定する開始アドレスAs(Y)を先頭アドレスとする領域に、データDtを転送する。
In other words, when the
以上の処理は、以下のように整理することができる。すなわち、通信制御機器10は、予め複数の通常ディスクリプタDcoを準備しておく。そして、通信制御機器10は、予め複数用意された通常ディスクリプタDcoの中から「利用可能なディスクリプタ」と判定する通常ディスクリプタDcoが現れるまで、予め複数用意された通常ディスクリプタDcoを順次読み込み、各々の許否を判定する。通信制御機器10は、予め複数用意された通常ディスクリプタDcoの中から「利用可能なディスクリプタ」と判定した通常ディスクリプタDcoが現れると、利用可能なディスクリプタ」と判定した通常ディスクリプタDcoに従って転送を実行する。
The above process can be summarized as follows. That is, the
つまり、通信制御機器10は、ネットワーク3から受信したデータDtをメインメモリ20へと転送する処理である受信処理において、以下のようにして、データDtの転送に用いるべき「利用可能なディスクリプタ」を選択してもよい。すなわち、通信制御機器10は、予め用意された複数の通常ディスクリプタDcoの中から、データDtの転送に用いるべき「利用可能なディスクリプタ」を選択してもよい。
In other words, in a receiving process in which 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の転送に要する時間を短縮することができる。
As a result, the
ここで、例えば、或る通常ディスクリプタDco(X)が「利用可能なディスクリプタ」であったため、その或る通常ディスクリプタDco(X)を用いて転送を行う場合に、転送までに要する時間が時間T(X)であったとする。また、或る通常ディスクリプタDco(X)が「利用不能なディスクリプタ」であったため、別の通常ディスクリプタDco(Y)を用いて転送を行うことになった場合に、転送までに要する時間が時間T(Y)であったとする。 For example, suppose that a certain normal descriptor Dco(X) is an "available descriptor" and therefore a transfer is performed using that certain normal descriptor Dco(X), and the time required until the transfer is complete is time T(X). Also, suppose that a certain normal descriptor Dco(X) is an "unavailable descriptor" and therefore a transfer is performed using another normal descriptor Dco(Y), and the time required until the transfer is complete is time T(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, if a certain normal descriptor Dco(X) and another normal descriptor Dco(Y) are prepared in advance, the difference between time T(X) and time T(Y) will be sufficiently small. In particular, if 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である。
(The saved descriptor is used as the "available descriptor")
When a certain normal descriptor Dco(X) is determined to be an "unavailable descriptor", the descriptor Dc that 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, when the number of errors Ct, which is the number of normal descriptors Dco determined to be "unavailable descriptors", exceeds a preset reference number Nr, the
基準個数Nrとして「0」が予め設定されていた場合、通信制御機器10は、以下の処理を実行する。すなわち、通信制御機器10は、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」と判定すると、他の通常ディスクリプタDcoの当否を判定することなく、退避用ディスクリプタDceを用いて、データDtの転送を実行する。
If the reference number Nr is preset to "0", the
ここで、例えば、或る通常ディスクリプタDco(X)が「利用可能なディスクリプタ」であったため、その或る通常ディスクリプタDco(X)を用いて転送を行う場合に、転送までに要する時間が時間T(X)であったとする。また、或る通常ディスクリプタDco(X)が「利用不能なディスクリプタ」であったため、退避用ディスクリプタDce(Y)を用いて転送を行うことになった場合に、転送までに要する時間が時間T(Y)であったとする。 For example, suppose that a certain normal descriptor Dco(X) is an "available descriptor" and therefore a transfer is performed using that certain normal descriptor Dco(X), and the time required until the transfer is complete is time T(X). Also, suppose that a certain normal descriptor Dco(X) is an "unavailable descriptor" and therefore a transfer is performed using a backup descriptor Dce(Y), and the time required until the transfer is complete is time T(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, if a certain normal descriptor Dco(X) and a save descriptor Dce(Y) are prepared in advance, the difference between time T(X) and time T(Y) will be sufficiently small. In particular, if 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 explained above, when transferring 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 a normal descriptor Dco determined to be an "available descriptor" appears among the normal descriptors Dco that have been read, the
そして、通信制御機器10は、「エラー個数Ctが基準個数Nrを超えた」と判定すると、退避用ディスクリプタDceを読み込み、退避用ディスクリプタDceの開始アドレスAsを先頭アドレスとする領域に、データDtを転送する。
When the
つまり、「エラー個数Ctが基準個数Nrを超える」、または、『「利用可能なディスクリプタ」と判定した通常ディスクリプタDcoが現れる』まで、通信制御機器10は、以下の処理を繰り返す。すなわち、通信制御機器10は、予め準備しておいた通常ディスクリプタDcoを順次読み込み、その許否を順次判定する。
In other words, 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を転送する。
When 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 receiving area Rgo and retreat receiving area Rge)
Although details will be described later, the start address As specified by the save descriptor Dce(Y) is in an area in the main memory 20 different from the standard receiving area Rgo (the "save receiving area Rge" described later). In other words, the save receiving area Rge, which is the area to which (storage area) the data Dt is transferred (storage destination) when the data Dt is transferred according to the save descriptor Dce(Y), and the standard receiving area Rgo are different areas in the main memory 20.
§2.構成例
これまでに図2を用いて概要を説明してきた通信制御機器10、および、通信制御機器10を含むPLC1について、次に、図1を用いてその詳細を説明していく。
§2. Configuration Example The
図1は、PLC1の構成例を示す図である。図1に例示する通り、PLC1は、ハードウェア構成として、通信制御機器10と、メインメモリ20と、CPU30とを含む。PLC1は、さらに、各種のプログラムおよびパラメータなどのデータを不揮発的に保持する不揮発性メモリと、外部装置とPLC1とを接続するためのUSBコネクタなどを含んでもよい。通信制御機器10と、メインメモリ20と、CPU30と、不揮発性メモリ(不図示)との間は、各種のバス(内部バス)を介してそれぞれ結合されている。
Figure 1 is a diagram showing an example of the configuration of PLC1. As shown in Figure 1, PLC1 includes, as a hardware configuration, a
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 in addition to storing data Dt received from the
図1に例示するメインメモリ20には、データDtと共に、PLC1がデータDtを受信しようとする都度(例えば、制御周期Ccごとに)、データDtを受信する前に、CPU30によって設定される通常ディスクリプタDcoが格納されている。通常ディスクリプタDcoは、例えば、PLCが受信する特定のデータDtに対応し、対応するデータDtのメインメモリ20中での格納先アドレス(つまり、開始アドレスAs)、対応するデータDtのメインメモリ20中でのデータサイズ等を示す情報を含む。
In the main memory 20 illustrated in FIG. 1, together with the data Dt, a normal descriptor Dco is stored which is set by the
前述の通り、PLC1は不図示の不揮発性メモリをさらに備えていてもよく、不揮発性メモリは、各種のプログラムおよびパラメータなどのデータを不揮発的に保持する。これらのデータは、必要に応じて、CPU30がアクセスできるようにメインメモリ20にコピーされる。このような不揮発性メモリは、フラッシュメモリのような半導体メモリを用いることができる。あるいは、ハードディスクドライブのような磁気記録媒体、DVD-RAM(Digital Versatile Disk Random Access Memory)のような光学記録媒体などを用いることもできる。
As mentioned 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の所望の領域へと転送することができるとの効果を奏する。
As will be described in more detail 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 through which the communication control device 10 (particularly the DMAC 121) communicates with each of the main memory 20, the
受信ポート130で受信されたデータDt(受信データ)は、データFIFO127へと格納される。
The data Dt (received data) received at the receiving
受信処理部120は、「ネットワーク3から受信したデータDt(具体的には、データFIFO127に格納されているデータDt)を、予め準備されたディスクリプタDcに従って、メインメモリ20へと転送する処理」である受信処理を実行する。受信処理部120は、DMAC121と、アドレス決定部122と、第一ディスクリプタFIFO125と、第二ディスクリプタFIFO126と、データFIFO127とを含んでいる。
The receiving
DMAC(Direct Memory Access Controller)121は、メインメモリ20と、第一ディスクリプタFIFO125、第二ディスクリプタFIFO126、および、データFIFO127の各々との間のデータ交換を実行する。
The DMAC (Direct Memory Access Controller) 121 performs 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, each time data Dt is received (e.g., every control period Cc), DMAC121 reads out the normal descriptor Dco set in the main memory 20 by 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を超えていないかを判定する。
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に通知する。
When the
読込部123は、エラー個数Ctが基準個数Nrを超えたと判定すると、第二ディスクリプタFIFO126に格納されている退避用ディスクリプタDceを読み込む。アドレス決定部122は、読込部123によって読み込まれた退避用ディスクリプタDceの規定する開始アドレスAsを、DMAC121に通知する。
When the
例えば、読込部123は、CPU30から、基準個数Nrを、予め取得しておく。
For example, the
(基準個数の値の一例)
基準個数Nrは、例えば「3」とするのが望ましい。
(Example of the reference number value)
It is desirable to set the reference number Nr to, for example, "3."
ここで、通常ディスクリプタDcoがデータDtの転送に「利用不能なディスクリプタ」であると判定される場合として、主に以下の2つのケースが想定される。すなわち、第一に、「通常ディスクリプタDcoの規定する開始アドレスAsが、標準受信領域Rgo内にない(例えば、開始アドレスAsが、標準受信領域Rgoの末尾アドレスを超えたアドレスを示している)」ケースである。第二に、「ネットワーク3から受信したデータDtのデータサイズが想定よりも大きく、末尾アドレスAeが、標準受信領域Rgo内にない」ケースである。
Here, the normal descriptor Dco is judged to be an "unavailable descriptor" for transferring data Dt in the following two cases. That is, the first case is when "the start address As specified by the normal descriptor Dco is not within the standard receiving area Rgo (for example, the start address As indicates an address beyond the end address of the standard receiving area Rgo)." The second case is when "the data size of the data Dt received from
上述の2つの典型的なケースのいずれもが発生したとしても、3つ目の通常ディスクリプタDcoは、データDtの転送に「利用可能なディスクリプタ」であると判定される可能性が高い。通常ディスクリプタDcoが3つ続けて「利用不能なディスクリプタ」であると判定される可能性は低く、通常ディスクリプタDcoが3つ続けて「利用不能なディスクリプタ」であると判定された場合には、何らかの異常が発生している可能性がある。 Even if either of the two typical cases described above occurs, the third normal descriptor Dco is likely to be determined to be an "available descriptor" for transferring data Dt. It is unlikely that three consecutive normal descriptors Dco are determined to be "unavailable descriptors", and if three consecutive normal descriptors Dco are determined to be "unavailable descriptors", some kind of 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」などの小さな値とするのが望ましい。 As mentioned above, the reference number Nr is the number of normal descriptors Dco that can be determined to be "unusable descriptors" for transferring data Dt. The interval between the start addresses As defined by each of the multiple normal descriptors Dco is, for example, "1.5 KByte (kilobytes)". Therefore, if the reference number Nr is set to "3", an area of "1.5 * 3 = 4.5 KByte" can become "area reserved for the data Dt to be transferred but not actually used", that is, "wasted area". Since this would increase the amount of "wasted area", it is preferable not to set the reference number Nr to a large value such as "10". Therefore, it is preferable to set the reference number Nr to 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 reference number)
The
例えば、個数Xが「1」である場合、判定部124が或る通常ディスクリプタDcoを「利用不能なディスクリプタ」と判定すると、判定部124が拒否を判定すべき次の通常ディスクリプタDcoは残っていない。そのため、読込部123は、基準個数Nrを「0」とするのが望ましい。
For example, if the number X is "1", when 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 preferable that the
例えば、第一ディスクリプタFIFO125に許否を未判定の4つの通常ディスクリプタDcoが格納されている場合、通信制御機器10は、上述の決定方法に基づいて、基準個数Nrを「2」に決定する。そして、通信制御機器10は、第一のデータDt(0)および第二のデータDt(1)の各々の転送に際して、以下の処理を実行し得る。
For example, if four normal descriptors Dco whose allowance or denial has not yet been determined are stored in the
すなわち、通信制御機器10は、第一の通常ディスクリプタDco(0)および第二の通常ディスクリプタDco(1)を、第一のデータDt(0)の転送に「利用不能なディスクリプタ」と判定しても、第三の通常ディスクリプタDco(2)の拒否を判定する。そして、通信制御機器10は、第三の通常ディスクリプタDco(2)を、第一のデータDt(0)の転送に「利用可能なディスクリプタ」と判定すると、第三の通常ディスクリプタDco(2)に従って、第一のデータDt(0)を転送する。
In other words, even if the
また、通信制御機器10は、第四の通常ディスクリプタDco(3)の拒否を判定する。そして、通信制御機器10は、第四の通常ディスクリプタDco(3)を、第二のデータDt(1)の転送に「利用可能なディスクリプタ」と判定すると、第四の通常ディスクリプタDco(3)に従って、第二のデータDt(1)を転送する。
The
上述の通り、「個数Xから、『2』を減じた値を基準個数Nrとする」という決定方法に基づいて基準個数Nrを決定することによって、通信制御機器10は、以下の効果を実現することができる。すなわち、通信制御機器10は、メインメモリ20へと転送すべきデータDtが複数あったとしても、それら複数のデータDtの各々を、通常ディスクリプタDcoに従って、メインメモリ20へと転送し得るという効果を実現することができる。
As described above, by determining the reference number Nr based on the determination method of "setting the reference number Nr as the value obtained by subtracting '2' from the number X," the
判定部124は、読込部123によって読み込まれた通常ディスクリプタDcoの拒否を判定し、例えば、その通常ディスクリプタDcoの規定する開始アドレスAsを用いて、第一判定処理FJおよび第二判定処理SJを実行する。
The
第一判定処理FJとして、判定部124は、読込部123から、「読込部123によって読み込まれた通常ディスクリプタDcoの開始アドレスAs」を通知されると、通知された開始アドレスAsが標準受信領域Rgo内にあるかを判定する。
As a first determination process FJ, when the
また、判定部124は、読込部123から通知された開始アドレスAsと、データDtのデータサイズとから、「開始アドレスAsを先頭アドレスとする領域に、データDtを転送した場合の転送後の領域」の末尾アドレスAeを算出する。そして、判定部124は、第二判定処理SJとして、算出した末尾アドレスAeが標準受信領域Rgo内にあるかを判定する。
The
判定部124は、開始アドレスAsが標準受信領域Rgo内にあり、かつ、末尾アドレスAeが標準受信領域Rgo内にあると、「読込部123によって読み込まれた通常ディスクリプタDco」を、データDtの転送に「利用可能なディスクリプタ」と判定する。アドレス決定部122は、判定部124によって「利用可能なディスクリプタ」である』と判定された通常ディスクリプタDcoの規定する開始アドレスAsを、DMAC121に通知する。
When the start address As is within the standard reception area Rgo and the end address Ae is within the standard reception 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 within the standard receiving 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
第二ディスクリプタFIFO126には、CPU30によってメインメモリ20に設定された退避用ディスクリプタDceが格納され、例えば、FIFO(first in, first out、先入れ先出し)方式で格納される。CPU30が、退避用ディスクリプタDceのメインメモリ20への設定を完了して、通信制御機器10に受信許可を発行すると、通信制御機器10(具体的には、DMAC121)は、メインメモリ20から退避用ディスクリプタDceを読み出す。そして、DMAC121は、読み出した退避用ディスクリプタDceを、第二ディスクリプタFIFO126に格納する。
The
データFIFO127には、PLC1(特に、通信制御機器10)がネットワーク3から受信したデータDt(受信データ)が一時的に格納され、例えば、FIFO方式で格納される。
The
(通常ディスクリプタと退避用ディスクリプタとの区別について)
本実施形態において、ディスクリプタDcは予め複数用意され、通常ディスクリプタDcoと、退避用ディスクリプタDceとに大別することができる。
(Regarding the distinction between normal and backup descriptors)
In this embodiment, a plurality of descriptors Dc are prepared in advance, and can be roughly divided into normal descriptors Dco and save descriptors Dce.
通常ディスクリプタDcoは、PLC1がデータDtを受信しようとする都度(例えば、制御周期Ccごとに)、データDtを受信する前に、CPU30によってメインメモリ20に設定される。CPU30によってメインメモリ20に設定された通常ディスクリプタDcoは、DMAC121によって第一ディスクリプタFIFO125に格納される。
The normal 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, before receiving certain data Dt(X), the
これに対して、退避用ディスクリプタDceは、PLCが受信する特定のデータDtには対応しないディスクリプタDcであり、PLCが受信する任意のデータDtについて、その転送先(特に、その先頭アドレス)を規定するディスクリプタDcである。「退避用ディスクリプタDceの規定する開始アドレスAs」を先頭アドレスとする、メインメモリ20中の領域は、退避用受信領域Rge(退避用領域)とも称される。退避用受信領域Rgeは、PLCが受信する任意のデータDtを格納可能な領域であり、「特定のデータDtを格納すべき領域としてCPU30が指定する領域(つまり、標準受信領域Rgo(許可領域))」とは異なる。
In contrast, the save descriptor Dce is a descriptor Dc that does not correspond to specific data Dt received by the PLC, and specifies the transfer destination (particularly, the starting address) of any data Dt received by the PLC. The area in the main memory 20 whose starting address is the "start address As specified by the save descriptor Dce" is also called the save receiving area Rge (save area). The save receiving area Rge is an area capable of storing any data Dt received by the PLC, and is different from the "area designated by the
これまで図1を用いてその構成例を説明してきた通信制御機器10について、次に、通信制御機器10が実行する受信処理の具体例等を、図3から図5を用いて説明していく。
Up until now, the configuration example of the
(『通常ディスクリプタの中から「利用可能なディスクリプタ」を選択する』例)
図3は、通信制御機器10が、予め準備された複数の通常ディスクリプタDcoを順次読み込み、「利用可能」と判定した通常ディスクリプタDcoに従って、データDtをメインメモリ20へと転送する例を説明する図である。図3に示す例では、データFIFO127に、データDt(0)およびデータDt(1)がFIFO方式で格納されている。また、第一ディスクリプタFIFO125には、通常ディスクリプタDco(0)、Dco(1)、Dco(2)、・・・、Dco(N)が予め格納されている。
(Example of "Selecting an available descriptor from the normal descriptors")
3 is a diagram illustrating an example in which the
(先頭のデータの転送例)
通信制御機器10は、データFIFO127の先頭に格納されたデータDt(0)を転送するために、先ず、第一ディスクリプタFIFO125の先頭に格納された通常ディスクリプタDco(0)の拒否を判定する。
(Example of first data transfer)
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)。
The
判定部124は、開始アドレスAs(0)が標準受信領域Rgo内にあり、かつ、末尾アドレスAe(0,0)が標準受信領域Rgo内にあると、通常ディスクリプタDco(0)が、データDt(0)の転送に「利用可能なディスクリプタ」であると判定する。アドレス決定部122は、判定部124によってデータDt(0)の転送に「利用可能なディスクリプタ」であると判定された通常ディスクリプタDco(0)に規定されている開始アドレスAs(0)を、DMAC121に通知する。
When the start address As(0) is within the standard receiving area Rgo and the end address Ae(0,0) is within the standard receiving area Rgo, the
DMAC121は、アドレス決定部122から通知される『データDtの転送に「利用可能なディスクリプタ」に規定されている開始アドレスAs』を先頭アドレスとするメインメモリ20中の領域に、データDtを転送する。DMAC121は、『データDt(0)の転送に「利用可能なディスクリプタ」である通常ディスクリプタDco(0)に規定されている開始アドレスAs(0)』を先頭アドレスとするメインメモリ20中の領域に、データDt(0)を転送する。
DMAC121 transfers data Dt to an area in main memory 20 whose starting address is the "start address As specified in the 'available descriptor' for transferring data Dt" notified by
DMAC121は、データDt(0)のメインメモリ20への転送を完了すると、メインメモリ20中の通常ディスクリプタDco(0)をライトバックディスクリプタで上書きする。その結果、メインメモリ20中の通常ディスクリプタDco(0)には、「データDt(0)のデータサイズを示す情報」と、「データDt(0)の転送に用いられたことを示す情報」とが追記される。
When
(次のデータの転送例)
通信制御機器10は、データDt(1)を転送するために、第一ディスクリプタFIFO125において通常ディスクリプタDco(0)の次に格納されている通常ディスクリプタDco(1)の拒否を判定する。つまり、通信制御機器10は、第一ディスクリプタFIFO125に格納されている通常ディスクリプタDcoであって、その拒否を判定していない通常ディスクリプタDcoの先頭である、通常ディスクリプタDco(1)の拒否を判定する。
(Example of data transfer)
In order to transfer the data Dt(1), 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)。
The
図3に示すように、通常ディスクリプタDco(1)には、CPU30が通常ディスクリプタDco(1)で設定したつもりの、標準受信領域Rgo内の開始アドレスAs’(1)に代えて、標準受信領域Rgo外の開始アドレスAs(1)が規定されている。
As shown in FIG. 3, the normal descriptor Dco(1) specifies a start address As(1) outside the standard receiving area Rgo, instead of the start address As'(1) within the standard receiving 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)。
The
判定部124は、開始アドレスAs(2)が標準受信領域Rgo内にあり、かつ、末尾アドレスAe(1,2)が標準受信領域Rgo内にあると、通常ディスクリプタDco(2)がデータDt(1)の転送に「利用可能なディスクリプタ」であると判定する。アドレス決定部122は、判定部124によってデータDt(1)の転送に「利用可能なディスクリプタ」であると判定された通常ディスクリプタDco(2)に規定されている開始アドレスAs(2)を、DMAC121に通知する。
When the start address As(2) is within the standard reception area Rgo and the end address Ae(1,2) is within the standard reception area Rgo, the
DMAC121は、アドレス決定部122から通知される『データDtの転送に「利用可能なディスクリプタ」に規定されている開始アドレスAs』を先頭アドレスとするメインメモリ20中の領域に、データDtを転送する。DMAC121は、『データDt(1)の転送に「利用可能なディスクリプタ」である通常ディスクリプタDco(2)に規定されている開始アドレスAs(2)』を先頭アドレスとするメインメモリ20中の領域に、データDt(1)を転送する。
DMAC121 transfers data Dt to an area in main memory 20 whose starting address is the "start address As specified in the 'available descriptor' for transferring data Dt" notified by
DMAC121は、データDt(1)のメインメモリ20への転送を完了すると、メインメモリ20中の通常ディスクリプタDco(2)をライトバックディスクリプタで上書きする。その結果、メインメモリ20中の通常ディスクリプタDco(2)には、「データDt(1)のデータサイズを示す情報」と、「データDt(1)の転送に用いられたことを示す情報」とが追記される。
When
(通常ディスクリプタの個数について)
ここで一般に、或る情報(例えば、数メガバイト(Mbyte)の画像情報)が、何個のデータDt(より正確には、何個のフレームデータ)として送信されるのかを、CPU30(ソフトウェア)は計算していない。例えば、1個のデータDt(フレームデータ)のデータサイズが、通常は「1.5キロバイト(Kbyte)」である場合であっても、CPU30は、その或る情報が、何個のデータDtとして送信されるのかを計算していない。
(Regarding the number of normal descriptors)
Generally, the CPU 30 (software) does not calculate how many pieces of data Dt (more precisely, how many frames of data) a certain piece of information (e.g., image information of several megabytes (Mbytes)) will be transmitted as. For example, even if the data size of one piece of data Dt (frame data) is normally "1.5 kilobytes (Kbytes)," the
その代わりに、一般にCPU30(ソフトウェア)は、或る情報を受信する前に、その或る情報を常に受信できるように、十分な数(個数)の通常ディスクリプタDcoを、メインメモリ20に設定しておく。 Instead, the CPU 30 (software) typically sets a sufficient number of normal descriptors Dco in the main memory 20 before receiving certain information so that the certain information can always be received.
つまり、CPU30は、例えば制御周期CcごとにPLC1が受信すべきデータDtの個数に比して十分余裕のある個数の通常ディスクリプタDcoを、PLC1がデータDtを受信する前に、予めメインメモリ20に設定しておく。そして、CPU30によってメインメモリ20に設定された通常ディスクリプタDcoは、DMAC121によって、第一ディスクリプタFIFO125に格納される。
In other words, 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 about the rejection of a descriptor)
As described above, when 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を把握することができる。
Furthermore,
(『退避用ディスクリプタを「利用可能なディスクリプタ」として用いる』例)
図4は、通信制御機器10が、退避用ディスクリプタDceを読み込み、退避用ディスクリプタDceに従ってデータDtをメインメモリ20へと転送する例を説明する図である。通信制御機器10(特に、DMAC121)は、判定部124によって「利用不能なディスクリプタ」であると判定された通常ディスクリプタDcoの個数であるエラー個数Ctが、予め設定しておいた基準個数Nrを超えると、以下の処理を実行する。すなわち、エラー個数Ctが基準個数Nrを超えると、DMAC121は、退避用ディスクリプタDceに規定されている開始アドレスAsを先頭アドレスとする領域に、データDtを転送する。
(Example of "Using a saved descriptor as an available descriptor")
4 is a diagram for explaining 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, data Dt(0) and 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 first data transfer)
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に通知する。
When the start address As(0) is within the standard receiving area Rgo and the end address Ae(0,0) is within the standard receiving area Rgo, the
DMAC121は、アドレス決定部122から通知された開始アドレスAs(0)を先頭アドレスとするメインメモリ20中の領域に、データDt(0)を転送する。
The
DMAC121は、データDt(0)のメインメモリ20への転送を完了すると、メインメモリ20中の通常ディスクリプタDco(0)をライトバックディスクリプタで上書きする。
When
(次のデータの転送例)
通信制御機器10は、データDt(1)を転送するために、第一ディスクリプタFIFO125に格納されており、かつ、その拒否を判定していない通常ディスクリプタDcoの先頭である、通常ディスクリプタDco(1)の拒否を判定する。すなわち、判定部124は、通常ディスクリプタDco(1)に対して、第一判定FJおよび第二判定SJを実行する。
(Example of data transfer)
In order to transfer data Dt(1), the
図4に示す例においても、図3に示したのと同様に、通常ディスクリプタDco(1)には、標準受信領域Rgo外の開始アドレスAs(1)が規定されている。 In the example shown in Figure 4, as in Figure 3, the normal descriptor Dco(1) specifies a 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". In addition, 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)を転送する。
DMAC121 transfers data Dt to an area in main memory 20 whose starting address is the "start address As specified in the 'available descriptor' for transferring data Dt" notified by
DMAC121は、データDt(1)のメインメモリ20への転送を完了すると、メインメモリ20中の退避用ディスクリプタDce(Z)をライトバックディスクリプタで上書きする。その結果、メインメモリ20中の退避用ディスクリプタDce(Z)には、「データDt(1)のデータサイズを示す情報」と、「データDt(1)の転送に用いられたことを示す情報」とが追記される。
When
(退避用ディスクリプタによって規定される転送領域について)
図4に示すように、退避用ディスクリプタDce(Y)の規定する開始アドレスAsが存在する退避用受信領域Rgeと、標準受信領域Rgoとは、メインメモリ20中の互いに異なる領域とするのが望ましい。
(Regarding the transfer area defined by the save descriptor)
As shown in FIG. 4, it is preferable that the save receiving area Rge, in which the start address As defined by the save descriptor Dce(Y) exists, and the standard receiving 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 save descriptor Dce(Y) is within the standard receiving area Rgo, the following event may occur. That is, the data Dt(1) transferred to the standard receiving area Rgo in accordance with the save descriptor Dce(Y) may be updated (overwritten) by other data Dt transferred to the standard receiving area Rgo in accordance with the normal descriptor Dco.
そして、CPU30がデータDt(1)を用いた処理を実行する前に、データDt(1)が他のデータDtによって上書きされてしまうと、当然、CPU30は、データDt(1)を用いた処理を実行することができない。
And if data Dt(1) is overwritten by other data Dt before
このような事象を回避するためには、例えば、「データDt(1)が転送された領域と、通常ディスクリプタDcoに従って別のデータDtが転送される領域とが重複するかを判断する処理」などの煩雑な処理が必要となる。 To avoid such an event, it is necessary to perform complicated processing such as determining whether the area to which data Dt(1) is transferred overlaps with the area to which other data Dt is transferred according to the normal descriptor Dco.
退避用受信領域Rgeと標準受信領域Rgoとを互いに異なる領域としておくことで、上述の煩雑な処理を要することなく、上述の事象を回避することができる。つまり、退避用受信領域Rgeと標準受信領域Rgoとを分けることで、「退避用ディスクリプタDceに従って転送された或るデータDtが、通常ディスクリプタDcoに従って転送される別のデータDtによって上書きされる」といった事象を簡易に回避できる。 By making the save receiving area Rge and the standard receiving area Rgo different areas, the above-mentioned phenomenon can be avoided without the need for the above-mentioned complicated processing. In other words, by separating the save receiving area Rge and the standard receiving area Rgo, it is possible to easily avoid a phenomenon in which "certain data Dt transferred according to the save descriptor Dce is overwritten by other data Dt transferred according to the normal descriptor Dco."
(本実施形態に係る通信制御装置が実現する効果について)
図5は、通信制御機器10の奏する効果を説明する図である。図5の(A)は、図8の(A)と同様であり、ディスクリプタDcに従ってデータDtをメインメモリ20へと転送する従来までの通信制御機器について、ディスクリプタDcの許否を判定してから、データDtを転送するまでに要する時間等を説明する図である。
(Effects achieved by the communication control device according to the present embodiment)
Fig. 5 is a diagram for explaining the effects of the
従来までの通信制御機器は、或るディスクリプタDc(X)について、アドレス(開始アドレスAs)等の異常を検知すると、以下の処理を実行する。
すなわち、従来までの通信制御機器は、或るディスクリプタDc(X)の誤りを検知すると、その検知結果をCPUへと通知し、CPU(ソフトウェア)に、その或るディスクリプタDc(X)を再設定させる。例えば、従来までの通信制御機器は、CPU30に、「異常なアドレスを規定した或るディスクリプタDc(X)」を、「正しいアドレスを規定した或るディスクリプタDc(X’)」に、書き換えさせる。
When a conventional communication control device detects an abnormality in an address (start address As) or the like for a certain descriptor Dc(X), the device executes the following process.
That is, when a conventional communication control device detects an error in a certain descriptor Dc(X), it notifies the CPU of the detection result and causes the CPU (software) to reset the certain descriptor Dc(X). For example, a conventional communication control device causes the
そのため、従来までの通信制御機器は、CPUによる或るディスクリプタDc(X)の再設定処理が完了するまで待機しなければならず、或るディスクリプタDc(X)の誤りを検知してから、データDtをメインメモリ20へと転送するまでに要する時間が長い。従来までの通信制御機器は、ディスクリプタDcの開始アドレスAs等の異常を検知してから、データDtの転送を実行するまでの間に、ソフトウェアによるディスクリプタDcの再設定処理の完了を待つ必要がある。 Therefore, conventional communication control devices must wait until the CPU has completed the reconfiguration process for a certain descriptor Dc(X), and it takes a long time from detecting an error in a certain descriptor Dc(X) to transferring the data Dt to the main memory 20. Conventional communication control devices must wait for the software to complete the reconfiguration process for the descriptor Dc after detecting an abnormality in the start address As of the descriptor Dc, etc., before transferring the data Dt.
図5の(B)は、通信制御機器10について、ディスクリプタDcの許否を判定してから、データDtを転送するまでに要する時間等を説明する図である。
Figure 5 (B) is a diagram 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)であったとする。 For example, suppose that a certain normal descriptor Dco(X) is an "available descriptor" and therefore a transfer is performed using that certain normal descriptor Dco(X), and the time required until the transfer is complete is time T(X). Also, suppose that a certain normal descriptor Dco(X) is an "unavailable descriptor" and therefore a transfer is performed using another descriptor Dc(Y), and the time required until the transfer is complete is time T(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, if a certain normal descriptor Dco(X) and another descriptor Dc(Y) are prepared in advance, the difference between time T(X) and time T(Y) will be sufficiently small. In particular, if the
(通信制御機器についての整理)
これまでに図1から図5を用いて説明してきた内容は、以下のように整理することができる。すなわち、通信制御機器10は、ネットワーク3から受信したデータDtをメインメモリ20へと転送する通信制御機器である。通信制御機器10は、読込部123と、判定部124と、DMAC121(転送部)とを備えている。
(Clarification of communication control devices)
The contents described above with reference to Figures 1 to 5 can be summarized as follows: 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) When the
(B)DMAC121は、第一のディスクリプタDc(X)が判定部124によって「利用可能でない」と判定されると、以下の転送を実行する。すなわち、DMAC121は、予め複数用意されたディスクリプタDcの内、読込部123によって第一のディスクリプタDc(X)よりも後に読み込まれた第二のディスクリプタDc(Y)に従って、データDtを転送する。具体例には、DMAC121は、第二のディスクリプタDc(Y)に規定されている開始アドレスAs(Y)を先頭アドレスとする領域に、データDtを転送する。
(B) When 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を転送する。
Furthermore, 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へと転送する。
In other words, even if the
通信制御機器10は、予め複数用意されたディスクリプタDcの中からデータDtの転送に「利用可能なディスクリプタ」を選択し、選択した「利用可能なディスクリプタ」に従って、データDtを転送する。
The
そのため、通信制御機器10は、ディスクリプタDcによる誤ったデータ転送を防止することができる。また、通信制御機器10は、データDtの転送に「利用可能なディスクリプタ」をCPU30等に再設定させる場合に比べて、データDtの転送に要する時間を短縮することができる。
Therefore, the
つまり、通信制御機器10は、ディスクリプタDcによる誤ったデータ転送を防止しつつ、ネットワーク3から受信したデータDtを高速にメインメモリ20へと転送することができるとの効果を奏する。
In other words, the
特に、「読み込んだディスクリプタDcに規定されている開始アドレスAsが、標準受信領域Rgo内にあるか否か」の判定は、データDtをネットワーク3から受信する前であっても、実行可能である。そのため、通信制御機器10は、「ディスクリプタDcによる誤ったデータ転送」を防止するための処理を、データDtを受信する前に実行することができる。
In particular, the determination of "whether or not the start address As defined in the read descriptor Dc is within the standard receiving area Rgo" can be performed 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 preferable 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 hardware logic circuit, 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 the data Dt is transferred in accordance with 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 if the "start address As specified by the read descriptor Dc is within the standard receiving area Rgo," there may be times when the "end address Ae is not within the standard receiving area Rgo." In such cases, the read descriptor Dc is inappropriate as a descriptor Dc for determining the transfer destination of the received data Dt, meaning that it cannot be used (is unusable) as a descriptor Dc for determining the transfer destination of the received data Dt.
そこで、通信制御機器10は、「読み込んだディスクリプタDcの規定する開始アドレスAs」に加えて、受信したデータDtのデータサイズをも考慮して、「読み込んだディスクリプタDcが利用可能か否か(つまり、ディスクリプタDcの許否)」を判定する。
Therefore, the
通信制御機器10は、開始アドレスAsに加えて、受信したデータDtのデータサイズを考慮することで、予め複数用意されたディスクリプタDcの中から、受信したデータDtの転送に「利用可能なディスクリプタ」を、より正確に選択できるとの効果を奏する。
By taking into account the data size of the received data Dt in addition to the starting address As, 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) that is read first by the
DMAC121は、(A)通常ディスクリプタDco(X)が「利用可能でない」と判定され、かつ、(B)別の通常ディスクリプタDco(Y)が「利用可能である」と判定されると、通常ディスクリプタDco(Y)に従って転送を実行する。 When DMAC121 (A) determines that normal descriptor Dco(X) is "unavailable" and (B) determines that another normal descriptor Dco(Y) is "available," it executes a transfer according to normal descriptor Dco(Y).
別の通常ディスクリプタDco(Y)は、読込部123によって第一のディスクリプタDc(X)(つまり、通常ディスクリプタDco(X))よりも後に読み込まれる通常ディスクリプタDcoである。つまり、通常ディスクリプタDco(Y)は、通常ディスクリプタDco(X)に後行する通常ディスクリプタDcoであり、通常ディスクリプタDco(X)の後行ディスクリプタDcである。
The other 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 "unavailable" and the normal descriptor Dco(Q) read after the normal descriptor Dco(P) is determined to be "available," the
例えば、通常ディスクリプタDco(P)およびDco(Q)が「利用可能でない」と判定され、通常ディスクリプタDco(Q)の次に読み込まれた通常ディスクリプタDco(R)が「利用可能である」と判定されると、DMAC121は、以下を実行する。すなわち、DMAC121は、読込部123によって通常ディスクリプタDco(Q)の次に読み込まれ、判定部124によって「利用可能である」と判定された通常ディスクリプタDco(R)に従って、データDtを転送する。
For example, if normal descriptors Dco(P) and Dco(Q) are determined to be "unavailable" and normal descriptor Dco(R) read after normal descriptor Dco(Q) is determined to be "available," DMAC121 executes the following. That is, DMAC121 transfers data Dt according to normal descriptor Dco(R) that is read by reading
前記の構成によれば、通信制御機器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を転送する。
Furthermore, when the
ここで一般に、或る情報(例えば、数メガバイト(Mbyte)の画像情報)が、何個のデータDt(より正確には、何個のフレームデータ)として送信されるのかを、CPU等(ソフトウェア)は計算していない。例えば、1個のデータDt(フレームデータ)のデータサイズが、通常は「1.5キロバイト(Kbyte)」である場合であっても、CPU等は、その或る情報が、何個のデータDtとして送信されるのかを計算していない。 Generally, the CPU or the like (software) does not calculate how many pieces of data Dt (more precisely, how many frames of data) a certain piece of information (e.g., image information of several megabytes (Mbytes)) will be transmitted as. For example, even if the data size of one piece of data Dt (frame data) is normally "1.5 kilobytes (Kbytes)," the CPU or the like does not calculate how many pieces of data Dt that piece of information will be transmitted as.
その代わりに、一般にCPU等は、或る情報を受信する前に、その或る情報を常に受信できるように(メインメモリ20へと転送できるように)、十分な数(個数)の通常ディスクリプタDcoを、メインメモリ20に設定しておく。つまり、CPU30等は、ネットワーク3から受信すべきデータDtの個数に比して十分余裕のある個数の通常ディスクリプタDcoを、データDtを受信する前に、予めメインメモリ20に設定しておく。
Instead, the CPU or the like generally sets a sufficient number (number) of normal descriptors Dco in the main memory 20 before receiving certain information so that the certain information can always be received (transferred to the main memory 20). In other words, the
そして、CPU30等によってメインメモリ20に設定された通常ディスクリプタDcoは、第一ディスクリプタFIFO125に格納される。そのため、ネットワーク3から受信すべきデータDtの個数に比して、第一ディスクリプタFIFO125に格納されている通常ディスクリプタDcoの個数は、十分に多い。
The normal descriptor Dco set in the main memory 20 by the
したがって、通信制御機器10は、転送すべきデータDtの個数に比して十分多い個数の通常ディスクリプタDcoの中から、データDtの転送に「利用可能なディスクリプタ」を選択することができるとの効果を奏する。
Therefore, 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 number of errors 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 number of errors Ct exceeds the reference number Nr, the
ここで、エラー個数Ctが基準個数Nrを超えている場合、「第一ディスクリプタFIFO125に格納されている通常ディスクリプタDco」の全て、または、その大部分に、異常が発生している可能性がある。そして、その場合、「第一ディスクリプタFIFO125に格納されている通常ディスクリプタDco」の中から「利用可能なディスクリプタ」を選択するのは不可能であり、または、多大の時間を要する。
If the number of errors Ct exceeds the reference number Nr, there is a possibility that an abnormality has occurred in all or most of the "normal descriptors Dco stored in the
そこで、通信制御機器10は、エラー個数Ctが基準個数Nrを超えると、「第一ディスクリプタFIFO125に格納されている通常ディスクリプタDco」に代えて、退避用ディスクリプタDceに従って、データDtを転送する。
Therefore, when the number of errors 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 save descriptor Dce is within the standard receiving area Rgo, the following event may occur with respect to certain data Dt(X) transferred to the standard receiving area Rgo according to the save descriptor Dce. That is, the certain data Dt(X) may be overwritten by other data Dt(Y) transferred to the standard receiving area Rgo according to the normal descriptor Dco stored in the
そして、上述のような事態を防ぐためには、例えば、「或るデータDt(X)が転送された領域と、別のデータDt(Y)が転送される領域とが、重複するか」を判断する処理などの煩雑な処理が必要となる。 To prevent the above situation, complex processing is required, such as determining whether the area to which a certain piece of data Dt (X) is transferred overlaps with the area to which another piece of data Dt (Y) is transferred.
これに対して、退避用ディスクリプタDceの規定する開始アドレスAsが標準受信領域Rgo内にない場合、退避用ディスクリプタDceに従って転送された上述の或るデータDt(X)が、上述の別のデータDt(Y)によって上書きされることはない。 In contrast, if the start address As specified by the save descriptor Dce is not within the standard receiving area Rgo, the above-mentioned certain data Dt(X) transferred in accordance with the save descriptor Dce will not be overwritten by the above-mentioned other data Dt(Y).
したがって、通信制御機器10は、「退避用ディスクリプタDceに従って転送されたデータDt(X)が、通常ディスクリプタDcoに従って転送されるデータDt(Y)で上書きされる」といった事態を、煩雑な処理を要せず回避できるとの効果を奏する。
Therefore, the
§3.動作例
(本実施形態に係る通信制御装置が実現する処理の全体概要について)
図6は、標準受信領域Rgo(許可領域)を特定する処理、および、判定処理の概要を説明する図である。通信制御機器10は、「受信したデータDtの転送先(特に、その開始アドレスAs)を決定し、決定した転送先にデータDtを転送する」処理であるデータ受信処理を実行する前に、標準受信領域Rgoを特定する処理を実行しておく。また、標準受信領域Rgoを特定した後に通信制御機器10が実行するデータ受信処理は、2つの判定処理を含み、具体的には、第一判定処理FJおよび第二判定処理SJを含む。
§3. Operational example (Overview of the process implemented by the communication control device according to this embodiment)
6 is a diagram for explaining an outline of the process of identifying the standard receiving area Rgo (permitted area) and the judgment process. The
図6の(A)は、通信制御機器10がデータ受信処理を実行する前に特定しておく標準受信領域Rgoについて、説明する図である。通信制御機器10は、予めCPU30から、「標準受信領域Rgoの先頭アドレス」を示す情報と、「標準受信領域Rgoのデータサイズ」を示す情報とを取得しておく。通信制御機器10は、CPU30から取得しておいた、「標準受信領域Rgoの先頭アドレス」と「標準受信領域Rgoのデータサイズ」とから、図6の(A)に示すように、標準受信領域Rgoを特定する。
Figure 6 (A) is a diagram explaining the standard receiving area Rgo that the
図6の(A)は、通信制御機器10が実行するデータ受信処理に含まれる第一判定処理FJおよび第二判定処理SJの概要を説明する図である。
(A) in FIG. 6 is a diagram outlining 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) determines whether "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内であるかを判定する。
In response to this, the second determination process SJ is executed by the communication control device 10 (particularly the determination unit 124) after the data Dt is received. When 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 necessary to execute the first determination process FJ before receiving the data Dt. For example, the first determination process FJ may be executed after the data Dt is received, 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)
7 is a flow diagram showing an example of a data reception process 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 number of errors Ct, which has been 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 that the error count Ct counted up by "1" in S180 does not exceed the reference number Nr (YES in S190), the
図7は、判定部124によって「読込部123から通知された開始アドレスAsが、標準受信領域Rgo内にある」と判定されてから、通信制御機器10がデータDtを受信する例を示している。しかしながら、通信制御機器10がデータDtを受信するタイミングが、判定部124によって「読込部123から通知された開始アドレスAsが、標準受信領域Rgo内にある」と判定された後であることは必須ではない。
Figure 7 shows an example in which the
前述の通り、第一判定処理FJを、データDtを受信する前に実行することは必須ではない。例えば、S130の判定(第一判定処理FJ)の前に、S140(データDtの受信)を実行してもよい。 As mentioned above, it is not essential to execute the first determination process FJ before receiving the data Dt. For example, S140 (receiving the 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 which timing occurs before the normal descriptor Dco whose "start address As is within the standard receiving area Rgo" is found in the first process FJ and the
これまで図7を用いて説明してきた通信制御機器10の実行する処理は、以下のように整理することができる。すなわち、通信制御機器10の実行する制御方法は、ネットワーク3から受信したデータDtをメインメモリ20へと転送する通信制御機器の制御方法である。前記制御方法は、読込ステップ(S120、S200、および、S210)と、判定ステップ(S130およびS160)と、転送ステップ(S170)とを含んでいる。
The process executed by the
読込ステップは、データDtを格納すべき領域の開始アドレスAsを規定するディスクリプタDcを読み込む。 The read step reads a descriptor Dc that specifies the starting address As of the area where 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 within the standard receiving area Rgo (permitted area), the descriptor Dc read in the read step is determined to be "available." The standard receiving area Rgo is preset as an area in the main memory 20 where data Dt can be stored.
転送ステップは、読込ステップにて読み込まれたディスクリプタDcの規定する開始アドレスAsを先頭アドレスとする領域に、データDtを転送する。 The transfer step transfers data Dt to an area whose top address is the start address As defined by the descriptor Dc read in the read step.
通信制御機器10において、ディスクリプタDcは予め複数用意されている。
In the
転送ステップは、(A)予め複数用意されたディスクリプタDcの内、読込ステップにて読み込まれた第一のディスクリプタDc(X)が、判定ステップにて「利用可能である」と判定されると、以下の転送を実行する。すなわち、読込ステップは、第一のディスクリプタDc(X)に規定されている開始アドレスAs(X)を先頭アドレスとする領域に、データDtを転送する。例えば、転送ステップは、予め複数用意されたディスクリプタDcの内、読込ステップにて読み込まれた第一の通常ディスクリプタDco(X)が、判定ステップにて「利用可能である」と判定されると、第一の通常ディスクリプタDco(X)に従って転送を行う。 In the transfer step, (A) when the first descriptor Dc(X) read in the read step among the multiple descriptors Dc prepared in advance is determined to be "available" in the determination step, the following transfer is executed. That is, in the read step, data Dt is transferred to an area whose top address is the start address As(X) defined in the first descriptor Dc(X). For example, in the transfer step, when the first normal descriptor Dco(X) read in the read step among the multiple descriptors Dc prepared in advance is determined to be "available" in the determination step, the transfer is executed 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 "unavailable" in the determination step, the following transfer is executed. That is, the transfer step transfers data Dt according to a second descriptor Dc(Y) that was read in the read step after the first descriptor Dc(X) from among a plurality of previously prepared descriptors Dc. As a specific example, the transfer step transfers data Dt to an area whose top address is the start address As(Y) defined in the second descriptor Dc(Y).
前記の構成によれば、前記制御方法は、予め複数用意されたディスクリプタDcの中から読み込んだ第一のディスクリプタDc(X)を「利用可能である」と判定すると、第一のディスクリプタDc(X)に従って、データDtを転送する。具体例には、前記制御方法は、第一のディスクリプタDc(X)の規定する開始アドレスAs(X)を先頭アドレスとする領域にデータDtを転送する。 According to the above configuration, when the control method determines that a first descriptor Dc(X) read from among a plurality of previously prepared descriptors Dc is "available," the control method transfers data Dt according to the first descriptor Dc(X). As a specific example, the control method transfers data Dt to an area whose leading address is a start address As(X) defined by the first descriptor Dc(X).
また、前記制御方法は、第一のディスクリプタDc(X)を「利用可能でない」と判定すると、予め複数用意されたディスクリプタDcの中からさらに、第二のディスクリプタDc(Y)を読み込む。そして、前記制御方法は、第二のディスクリプタDc(Y)の規定する開始アドレスAs(Y)を先頭アドレスとする領域に、データDtを転送する。 When the control method determines that the first descriptor Dc(X) is "unavailable," the control method further reads a second descriptor Dc(Y) from among a plurality of previously prepared descriptors Dc. The control method then transfers data Dt to an area whose leading address is the start address As(Y) defined by the second descriptor Dc(Y).
つまり、前記制御方法は、読み込んだ第一のディスクリプタDc(X)の規定する開始アドレスAs(X)が標準受信領域Rgo内にないと判定した場合にも、その判定結果をCPU30等に通知することはない。開始アドレスAs(X)が標準受信領域Rgo内にないと判定した場合にも、前記制御方法は、CPU30等に第一のディスクリプタDc(X)を正しいものに再設定させることはない。前記制御方法は、第一のディスクリプタDc(X)の規定する開始アドレスAs(X)が標準受信領域Rgo内にないと判定すると、予め用意された第二のディスクリプタDc(Y)をさらに読み込む。そして、前記制御方法は、読み込んだ第二のディスクリプタDc(Y)に従って、データDtをメインメモリ20へと転送する。
In other words, even if the control method determines that the start address As(X) specified by the read first descriptor Dc(X) is not within the standard receiving area Rgo, it does not notify the
前記制御方法は、予め複数用意されたディスクリプタDcの中からデータDtの転送に「利用可能なディスクリプタ」を選択し、選択した「利用可能なディスクリプタ」に従って、データDtを転送する。 The control method involves selecting an "available descriptor" for transferring data Dt from among a number of previously prepared descriptors Dc, and transferring the data Dt according to the selected "available descriptor."
そのため、前記制御方法は、ディスクリプタDcによる誤ったデータ転送を防止することができる。また、前記制御方法は、データDtの転送に「利用可能なディスクリプタ」をCPU30等に再設定させる場合に比べて、データDtの転送に要する時間を短縮することができる。
Therefore, the control method can prevent erroneous data transfer using the descriptor Dc. Furthermore, the control method can reduce the time required to transfer the data Dt compared to a case in which the
つまり、前記制御方法は、ディスクリプタDcによる誤ったデータ転送を防止しつつ、ネットワーク3から受信したデータDtを高速にメインメモリ20へと転送することができるとの効果を奏する。
In other words, the control method has the effect of preventing erroneous data transfer using the descriptor Dc while transferring data Dt received from the
特に、「読み込んだディスクリプタDcに規定されている開始アドレスAsが、標準受信領域Rgo内にあるか否か」の判定は、データDtをネットワーク3から受信する前であっても、実行可能である。そのため、前記制御方法は、「ディスクリプタDcによる誤ったデータ転送」を防止するための処理を、データDtを受信する前に実行することができる。
In particular, the determination of "whether the start address As defined in the read descriptor Dc is within the standard receiving area Rgo" can be performed even before the data Dt is received from the
前記制御方法は、「ディスクリプタDcによる誤ったデータ転送」を防止するための処理をデータDtの受信前に実行しておくことで、データDtを受信してからデータDtをメインメモリ20へと転送するまでの時間を短縮できるという効果を奏する。 The control method has the effect of shortening the time from receiving the data Dt to transferring the data Dt to the main memory 20 by executing a process for preventing "erroneous data transfer by the descriptor Dc" before receiving the data Dt.
ここで、通信制御機器10は、NIC(Network Interface Card、ネットワーク・インターフェイス・カード)として実現されるのが望ましい。通信制御機器10は、典型的には、FPGA(Field-Programmable gate array)またはASIC(Application Specific Integrated Circuit)等のハードウェアによる論理回路で構成される。
Here, it is preferable 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
ハードウェアによる論理回路で構成した場合、通信制御機器10は、データDtの転送に「利用可能なディスクリプタ」を予め複数用意されたディスクリプタDcの中から選択する処理を極めて高速に実行することができる。また、ハードウェアによる論理回路で構成した場合、通信制御機器10は、予め複数用意されたディスクリプタDcの中から選択したディスクリプタDcに従って、極めて高速に転送を実行することができる。
When configured with a hardware logic circuit, the
したがって、通信制御機器10をハードウェアによる論理回路で構成した場合、前記制御方法は、ディスクリプタDcによる誤ったデータ転送を防止しつつ、ネットワーク3から受信したデータDtを極めて高速に転送することができるとの効果を奏する。
Therefore, when the
§4.変形例
(ネットワーク構成例について)
図2に例示した制御システム0において、複数のネットワーク3が、ネットワークハブ2を介して、PLC1に接続している。しかしながら、制御システム0において、1つのネットワーク3がネットワークハブ2を介さずにPLC1に接続し、例えば、PLC1と、1つ以上のネットワークデバイスとが、一筆書きの形式で互いに通信可能に接続されていてもよい。
§4. Modifications (Network Configuration Examples)
2, a plurality of
本発明は上述した各実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。 The present invention is not limited to the above-described embodiments, and various modifications are possible within the scope of the claims. The technical scope of the present invention also includes embodiments obtained by appropriately combining the technical means disclosed in different embodiments.
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 unit)
123
126 Second Descriptor FIFO (Second Storage Unit)
Ae End address As Start address Ct Number of errors Dc Descriptor Dce Descriptor for saving Dco Normal descriptor Dt Data Nr Reference number Rgo Standard receiving area (permitted area)
S120 Reading step S130 Judgment step S160 Judgment step S170 Transfer step S200 Reading step S210 Reading step
Claims (7)
前記データを格納すべき領域の開始アドレスを規定するディスクリプタを読み込む読込部と、
前記読込部によって読み込まれた前記ディスクリプタに規定されている前記開始アドレスが、前記メインメモリにおいて前記データを格納可能な領域として予め設定された領域である許可領域内にあると、前記読込部によって読み込まれた前記ディスクリプタを利用可能であると判定する判定部と、
前記読込部によって読み込まれた前記ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する転送部と、
を備え、
前記ディスクリプタは予め複数用意されており、
前記転送部は、
(A)前記予め複数用意されたディスクリプタの内、前記読込部によって読み込まれた第一ディスクリプタが、前記判定部によって利用可能であると判定されると、前記第一ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送し、
(B)前記第一ディスクリプタが前記判定部によって利用可能でないと判定されると、前記予め複数用意されたディスクリプタの内、前記読込部によって前記第一ディスクリプタよりも後に読み込まれた第二ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する
通信制御機器。 A communication control device that transfers data received from a network to a main memory,
a reading unit that reads a descriptor that specifies a start address of an area in which the data is to be stored;
a determination unit that determines that the descriptor read by the reading unit is available when the start address defined in the descriptor read by the reading unit is within an allowed area that is a pre-defined area in the main memory in which the data can be stored;
a transfer unit that transfers the data to an area having a leading address equal to the start address defined in the descriptor read by the reading unit;
Equipped with
A plurality of the descriptors are prepared in advance,
The transfer unit is
(A) when the determination unit determines that a first descriptor read by the reading unit among the plurality of previously prepared descriptors is available, the data is transferred to an area having a starting address defined in the first descriptor as a top address;
(B) When the determination unit determines that the first descriptor is unavailable, the communication control device transfers the data to an area whose starting address is the start address specified in a second descriptor read by the reading unit after the first descriptor among the multiple descriptors prepared in advance.
請求項1に記載の通信制御機器。 2. The communication control device of claim 1, wherein the determination unit determines that the descriptor read by the reading unit is usable if (A) the starting address specified in the descriptor read by the reading unit is within the permitted area, and (B) the end address of the area after the data is transferred, calculated from the data size of the received data and the starting address specified in the descriptor read by the reading unit, is within the permitted area.
請求項1または2に記載の通信制御機器。 3. The communication control device according to claim 1, wherein the permission area is calculated from a start address of the permission area and a data size of the permission area, both of which are obtained in advance.
前記第一ディスクリプタは前記格納部に格納されており、
前記転送部は、(A)前記第一ディスクリプタが前記判定部によって利用可能でないと判定され、かつ、(B)前記格納部に格納されていた前記第一ディスクリプタとは異なる前記ディスクリプタであって、前記読込部によって前記第一ディスクリプタよりも後に読み込まれた前記ディスクリプタである後行ディスクリプタが、前記判定部によって利用可能であると判定されると、前記後行ディスクリプタを前記第二ディスクリプタとして、前記後行ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する
請求項1から3のいずれか1項に記載の通信制御機器。 a storage unit configured to store the descriptor set in the main memory before receiving the data each time the data is to be received;
the first descriptor is stored in the storage unit;
4. A communication control device as described in any one of claims 1 to 3, wherein when (A) the determination unit determines that the first descriptor is not available, and (B) the determination unit determines that a subsequent descriptor, which is different from the first descriptor stored in the storage unit and is the descriptor read by the reading unit after the first descriptor, is available, the transfer unit transfers the data to an area whose top address is the start address specified in the subsequent descriptor, with the subsequent descriptor as the second descriptor.
前記読込部は、前記格納部とは異なる第二格納部に予め格納されている前記ディスクリプタである退避用ディスクリプタを読み込み、
前記転送部は、前記読込部によって読み込まれた前記退避用ディスクリプタを前記第二ディスクリプタとして、前記退避用ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する
請求項4に記載の通信制御機器。 When the number of the descriptors that are stored in the storage unit and read by the reading unit and that are determined to be unavailable by the determining 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;
5. The communication control device according to claim 4, wherein the transfer unit transfers the data to an area having the start address defined in the save descriptor as a top address, using the save descriptor read by the reading unit as the second descriptor.
請求項5に記載の通信制御機器。 6. The communication control device according to claim 5, wherein a start address defined by the save descriptor is within an area in the main memory capable of storing the data, the area being different from the permitted area.
前記データを格納すべき領域の開始アドレスを規定するディスクリプタを読み込む読込ステップと、
前記読込ステップにて読み込まれた前記ディスクリプタに規定されている前記開始アドレスが、前記メインメモリにおいて前記データを格納可能な領域として予め設定された領域である許可領域内にあると、前記読込ステップにて読み込まれた前記ディスクリプタを利用可能であると判定する判定ステップと、
前記読込ステップにて読み込まれた前記ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する転送ステップと、
を含み、
前記ディスクリプタは予め複数用意されており、
前記転送ステップは、
(A)前記予め複数用意されたディスクリプタの内、前記読込ステップにて読み込まれた第一ディスクリプタが、前記判定ステップにて利用可能であると判定されると、前記第一ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送し、
(B)前記第一ディスクリプタが前記判定ステップにて利用可能でないと判定されると、前記予め複数用意されたディスクリプタの内、前記読込ステップにて前記第一ディスクリプタよりも後に読み込まれた第二ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する
制御方法。 A method for controlling a communication control device that transfers data received from a network to a main memory, comprising the steps of:
a reading step of reading a descriptor defining a start address of an area in which the data is to be stored;
a determining step of determining that the descriptor read in the read step is available when the start address defined in the descriptor read in the read step is within an allowed area that is a pre-defined area in the main memory in which the data can be stored;
a transfer step of transferring the data to an area having a top address equal to the start address defined in the descriptor read in the read step;
Including,
A plurality of the descriptors are prepared in advance,
The transferring step includes:
(A) when it is determined in the determination step that a first descriptor read in the read step is available among the plurality of previously prepared descriptors, the data is transferred to an area having a start address defined in the first descriptor as a top address;
(B) A control method for transferring, when it is determined in the determination step that the first descriptor is unavailable, the data to an area having a starting address that is the start address specified in a second descriptor that was read in the reading step after the first descriptor among the plurality of descriptors prepared in advance.
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 JP2022044302A (en) | 2022-03-17 |
JP7476733B2 true 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) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030233497A1 (en) | 2002-06-18 | 2003-12-18 | Chien-Yi Shih | DMA controller and method for checking address of data to be transferred with DMA |
JP2006178795A (en) | 2004-12-24 | 2006-07-06 | Fujitsu Ltd | DMA circuit and disk array device using the same |
JP2009032053A (en) | 2007-07-27 | 2009-02-12 | Sony Corp | Data reception system |
JP2010176442A (en) | 2009-01-30 | 2010-08-12 | Fujitsu Ltd | Descriptor transfer device, i/o controller and descriptor transfer method |
US7921237B1 (en) | 2008-09-29 | 2011-04-05 | Network Appliance, Inc. | Preserving data integrity of DMA descriptors |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010004262A (en) * | 2008-06-19 | 2010-01-07 | Sony Corp | Information reception device and information reception 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
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030233497A1 (en) | 2002-06-18 | 2003-12-18 | Chien-Yi Shih | DMA controller and method for checking address of data to be transferred with DMA |
JP2006178795A (en) | 2004-12-24 | 2006-07-06 | Fujitsu Ltd | DMA circuit and disk array device using the same |
JP2009032053A (en) | 2007-07-27 | 2009-02-12 | Sony Corp | Data reception system |
US7921237B1 (en) | 2008-09-29 | 2011-04-05 | Network Appliance, Inc. | Preserving data integrity of DMA descriptors |
JP2010176442A (en) | 2009-01-30 | 2010-08-12 | Fujitsu Ltd | Descriptor transfer device, i/o controller and descriptor transfer method |
Also Published As
Publication number | Publication date |
---|---|
JP2022044302A (en) | 2022-03-17 |
WO2022049801A1 (en) | 2022-03-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110300040B (en) | Communication method and related equipment | |
US9703736B2 (en) | Data transmission apparatus, communication control method, and communication control program | |
EP0311187B1 (en) | Interface device for interfacing a network station to a physical network medium | |
JPH02246444A (en) | Data transmission method and system | |
JP7476733B2 (en) | COMMUNICATION CONTROL DEVICE AND METHOD FOR CONTROLLING COMMUNICATION CONTROL DEVICE | |
CN111694508B (en) | Method and system for managing LBA overlap checking in NVMe-based SSDs | |
CN113688076A (en) | EPA-based data communication method, computing device and medium | |
JP5456434B2 (en) | Pipe arbitration circuit, pipe arbitration method | |
JPH11272609A (en) | Serial data transfer method and synchronous serial bus interface mounted with the method | |
KR20170117326A (en) | Direct memory access control device for at least one processing unit having a random access memory | |
JP3790653B2 (en) | Shared memory access management device | |
EP3754918B1 (en) | Packet backpressure detection method, apparatus, and device | |
US20230099487A1 (en) | Communication control device and method for controlling communication control device | |
JP3489456B2 (en) | Real-time communication device and system | |
JP2520905B2 (en) | Serial communication controller | |
JP5756738B2 (en) | COMMUNICATION SYSTEM, COMMUNICATION DEVICE, AND COMMUNICATION METHOD | |
CN116094904B (en) | Main/standby switching method and device based on quantum entanglement and storage medium | |
US11327908B2 (en) | Method and system for facilitating communication between interconnect and system memory on system-on-chip | |
TWI763612B (en) | Transaction layer circuit of peripheral component interconnect express and operation method thereof | |
KR950001513B1 (en) | How to send an acknowledgment at the data link layer of a Mini-MAP network | |
CN115118671B (en) | Method and device, electronic equipment, and storage medium for token ring scheduling | |
JPS63228856A (en) | Communication controller | |
JPS63228855A (en) | Communication controller | |
JP2000299716A (en) | Data receiver and data receiving method | |
CN108255770B (en) | Processing method based on 1394 bus event message response mechanism |
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 |