JP7476733B2 - COMMUNICATION CONTROL DEVICE AND METHOD FOR CONTROLLING COMMUNICATION CONTROL DEVICE - Google Patents

COMMUNICATION CONTROL DEVICE AND METHOD FOR CONTROLLING COMMUNICATION CONTROL DEVICE Download PDF

Info

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
Application number
JP2020149861A
Other languages
Japanese (ja)
Other versions
JP2022044302A (en
Inventor
俊規 玉井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Omron Corp
Original Assignee
Omron Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Omron Corp filed Critical Omron Corp
Priority to JP2020149861A priority Critical patent/JP7476733B2/en
Priority to PCT/JP2021/006542 priority patent/WO2022049801A1/en
Publication of JP2022044302A publication Critical patent/JP2022044302A/en
Application granted granted Critical
Publication of JP7476733B2 publication Critical patent/JP7476733B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/10Packet switching elements characterised by the switching fabric construction
    • H04L49/111Switch 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 Patent Document 1 discloses a DMA circuit that checks whether the descriptor is correct when reading it and determines whether or not a DMA transfer of data from memory is possible. If the DMA circuit determines that the descriptor is incorrect, it does not perform the DMA transfer and notifies the CPU of an error. Then, after the CPU that has been notified of the error makes appropriate settings, the DMA circuit executes the transfer.

特開2006-178795号公報JP 2006-178795 A

しかしながら、上述のような従来技術は、「受信したデータを、ディスクリプタに従ってメインメモリへと転送する」というデータ受信処理を、高速に実行することができないという問題がある。例えば、上述のような従来技術は、高速な制御周期(例えば、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 data 1, the communication control device according to the conventional technology further receives data 2 and data 3, and stores the received data 1, data 2, and data 3 in a buffer. The communication control device then keeps data 1 stored in the buffer until the transfer of data 1 to the main memory is complete, that is, until the CPU (software) has completed the descriptor resetting process. However, because the buffer has a limited storage capacity, the buffer storing data 1, data 2, and data 3 received by the communication control device does not have enough room to store new data.

そのため、ソフトウェアによるディスクリプタの再設定処理が完了し、データ1のメインメモリへの転送が完了するまでに、前記通信制御機器がさらにデータ4を受信すると、前記通信制御機器は、データ4を、バッファに格納することができない。そのため、前記通信制御機器は、受信したデータ4をメインメモリへと転送することができず、データ4は失われる。 Therefore, if the communication control device further receives data 4 before the software completes the descriptor reconfiguration process and the transfer of data 1 to the main memory is completed, the communication control device will not be able to store data 4 in the buffer. Therefore, the communication control device will not be able to transfer the received data 4 to the main memory, and data 4 will be lost.

図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の要部構成を示す図である。1 is a diagram showing a configuration of a main part of a PLC including a communication control device according to a first embodiment of the present invention; 図1のPLCを含む制御システムの概要を示す図である。FIG. 2 is a diagram showing an overview of a control system including the PLC of FIG. 1. 本発明の実施形態1に係る通信制御機器が、通常ディスクリプタを順次読み込み、通常ディスクリプタに従ってデータをメインメモリへと転送する例を説明する図である。11 is a diagram illustrating an example in which the communication control device according to the first embodiment of the present invention sequentially reads normal descriptors and transfers data to a main memory in accordance with the normal descriptors. FIG. 本発明の実施形態1に係る通信制御機器が、退避用ディスクリプタを読み込み、退避用ディスクリプタに従ってデータをメインメモリへと転送する例を説明する図である。11 is a diagram illustrating an example in which the communication control device according to the first embodiment of the present invention reads a save descriptor and transfers data to a main memory in accordance with the save descriptor. FIG. 本発明の実施形態1に係る通信制御機器の奏する効果を説明する図である。4A to 4C are diagrams illustrating the effects of the communication control device according to the first embodiment of the present invention. 標準受信領域を特定する処理、および、判定処理の概要を説明する図である。11A and 11B are diagrams for explaining an overview of a process for identifying a standard receiving area and a determination process. データ受信処理の一例を示すフロー図である。FIG. 11 is a flow diagram illustrating an example of a data receiving process. 従来の通信制御機器が、ディスクリプタの許否を判定してから、データをメインメモリへと転送するまでに要する時間等を説明する図である。1 is a diagram for explaining the time required for a conventional communication control device to transfer data to a main memory after determining whether a descriptor is permissible;

〔実施形態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 communication control device 10 provided in a PLC (Programmable Logic Controller) 1 that controls controlled objects such as machines and equipment will be described as a typical example of a "communication control device that transfers data received from a network to a main memory." In the following description, "N,""P,""Q,""X,""Y," etc. each represent an integer equal to or greater than "1."

§1.適用例
本発明の一態様に係る通信制御機器10についての理解を容易にするため、先ず、本発明が適用される場面の一例について、具体的には、通信制御機器10を備えるPLC1を含む制御システム0の概要について、図2を用いて説明する。
§1. Application Example In order to facilitate understanding of the communication control device 10 according to one aspect of the present invention, first, an example of a situation in which the present invention is applied, specifically, an overview of a control system 0 including a PLC 1 equipped with the communication control device 10, will be described with reference to FIG.

(制御システムの概要)
図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 control system 0 including a PLC 1. As shown in Fig. 2, the control system 0 includes a PLC 1, a network hub 2, and networks 3(1) and 3(2) each connected to the PLC 1 via the network hub 2. Hereinafter, when there is no need to particularly distinguish between the networks 3(1) and 3(2), they may be simply referred to as "network 3." The network 3 includes one or more network devices.

図2に例示する制御システム0においては、ネットワークハブ2を介して、複数のネットワーク3が、PLC1に接続している。制御システム0における通信には、ギガ帯域が使用されてもよい。 In the control system 0 illustrated in FIG. 2, multiple networks 3 are connected to the PLC 1 via a network hub 2. Gigabit bandwidth may be used for communication in the control system 0.

PLC1は、制御システム0の全体を制御する制御装置である。ネットワークハブ2は、PLC1と複数のネットワーク3との間の通信を管理するネットワークハブまたはネットワークスイッチである。図2に示す制御システム0においては、PLC1の1つのネットワークポート(すなわち、図1の受信ポート130)に対して、複数のネットワーク3が、例えば、ネットワーク3(1)および3(2)が、存在している。 PLC 1 is a control device that controls the entire control system 0. Network hub 2 is a network hub or network switch that manages communication between PLC 1 and multiple networks 3. In the control system 0 shown in FIG. 2, multiple networks 3, for example networks 3(1) and 3(2), exist for one network port of PLC 1 (i.e., receiving port 130 in FIG. 1).

ここで、ネットワーク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 networks 3 that communicate with PLC 1 may be control networks. Also, either one of networks 3(1) or 3(2) may be a control network and the other a data network, i.e., the networks 3 that communicate with PLC 1 may be a mixture of control networks and data networks.

例えば、ネットワーク3が制御ネットワークである場合、PLC1は、生産設備内の入力機器及び出力機器の制御を司る制御装置であり、また、ネットワークデバイスは、例えば、生産設備内の入力機器及び出力機器である。PLC1とネットワークデバイスとは、ネットワーク3を介してサイクリックに通信を行なうことで、INデータ及びOUTデータ(以下、「IOデータ」という)の送受信を行ない、PLC1は、生産設備の全体を制御する。すなわち、ネットワーク3が制御ネットワークである場合、制御システム0は、PLC1をマスタ装置(データ伝送を管理するマスタ装置)とし、ネットワークデバイスをスレーブ装置とするマスタ・スレーブ制御システムと捉えることができる。 For example, when network 3 is a control network, PLC 1 is a control device that controls input and output devices in the production equipment, and the network devices are, for example, input and output devices in the production equipment. PLC 1 and the network devices send and receive IN data and OUT data (hereinafter referred to as "IO data") by cyclically communicating via network 3, and PLC 1 controls the entire production equipment. In other words, when network 3 is a control network, control system 0 can be considered as a master-slave control system in which PLC 1 is the master device (the master device that manages data transmission) and the network devices are the slave devices.

ネットワーク3が制御ネットワークである場合、ネットワーク3は、EtherCAT(Ethernet for Control Automation Technology:登録商標)規格等の産業用イーサネット(登録商標)規格に準拠するものであってもよい。ネットワーク3が制御ネットワークである場合、ネットワーク3は、EtherNet/IP(登録商標)規格に準拠するものであってもよい。 When network 3 is a control network, network 3 may conform to an industrial Ethernet (registered trademark) standard such as the EtherCAT (Ethernet for Control Automation Technology: registered trademark) standard. When network 3 is a control network, network 3 may conform to the EtherNet/IP (registered trademark) standard.

以下では、図2におけるPLC1とネットワークデバイスとの間の通信(以下、「ネットワーク通信」とも称する)がEthernet規格に準拠する例について説明する。また、CPU30と通信制御機器10とは、PCIe(Peripheral Component Interconnect Express)によって通信可能に接続されているものとする。 The following describes an example in which communication between the PLC 1 and the network device in FIG. 2 (hereinafter also referred to as "network communication") complies with the Ethernet standard. In addition, the CPU 30 and the communication control device 10 are connected to each other so that they can communicate with each other via PCIe (Peripheral Component Interconnect Express).

なお、図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 control system 0 in which multiple networks 3 are connected to the PLC 1 via a network hub 2, it is not essential that multiple networks 3 are connected to the PLC 1 via a network hub 2 in the control system 0. In the control system 0, one network 3 (particularly, one control network) may be connected to the PLC 1 without going through a network hub 2. For example, in the control system 0, which is a master-slave control system, the PLC 1, which is a master device, and one or more network devices, each of which is a slave device, may be communicatively connected in a unicursal format.

(本実施形態に係る通信制御機器の概要)
詳細は図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 PLC 1 illustrated in Figure 2 includes a communication control device 10 that executes data reception processing, a main memory 20 which is the storage means of the PLC 1, and a CPU 30 that executes various processes using the data Dt transferred to the main memory 20.

(受信データのメインメモリへの転送に係る、一般的な処理について)
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 PLC 1, various data Dt received from the network 3 at each control period Cc (e.g., 100 μs) are transferred to the main memory 20, for example, as follows. That is, first, the CPU 30 sets a descriptor Dc that specifies a start address As of "an area in the main memory 20 in which the data Dt received by the PLC 1 from the network 3 should be stored" in the main memory 20. For example, every time the PLC 1 attempts to receive data Dt (e.g., at each control period Cc), the CPU 30 sets a normal descriptor Dco in the main memory 20 before receiving the data Dt.

CPU30は、通常ディスクリプタDcoのメインメモリ20への設定を完了すると、その旨を通信制御機器10へと通知する。CPU30から通常ディスクリプタDcoの設定完了を通知された通信制御機器10は、通知に従ってメインメモリ20を参照し、CPU30によって設定された通常ディスクリプタDcoを読み込む。具体的には、通信制御機器10は、CPU30によってメインメモリ20に設定された通常ディスクリプタDcoを、第一ディスクリプタFIFO125へと格納する。第一ディスクリプタFIFO125は、通常ディスクリプタDcoを格納しておくための格納領域であり、例えばFIFO(First In First Out)方式の格納領域である。 When the CPU 30 completes setting the normal descriptor Dco in the main memory 20, it notifies the communication control device 10 accordingly. The communication control device 10, which has been notified by the CPU 30 that the normal descriptor Dco has been set, refers to the main memory 20 in accordance with the notification and reads the normal descriptor Dco set by the CPU 30. Specifically, the communication control device 10 stores the normal descriptor Dco set in the main memory 20 by the CPU 30 in the first descriptor FIFO 125. The first descriptor FIFO 125 is a storage area for storing the normal descriptor Dco, and is, for example, a storage area of the FIFO (First In First Out) type.

PLC1がネットワーク3からデータDtを受信すると、通信制御機器10は、データ受信処理を実行する。すなわち、通信制御機器10は、先ず、PLC1がネットワーク3から受信したデータDtを、データFIFO127に格納する。データFIFO127は、データDtを一時的に格納しておくバッファ(格納領域)であり、例えばFIFO方式の格納領域である。 When the PLC 1 receives the data Dt from the network 3, the communication control device 10 executes a data reception process. That is, the communication control device 10 first stores the data Dt that the PLC 1 receives from the network 3 in the data FIFO 127. The data FIFO 127 is a buffer (storage area) that temporarily stores the data Dt, and is, for example, a storage area using the FIFO method.

通信制御機器10は、データFIFO127に格納されているデータDtを、ディスクリプタDcに従ってメインメモリ20に転送し、例えば、第一ディスクリプタFIFO125に格納されている通常ディスクリプタDcoに従ってメインメモリ20に転送する。具体的には、通信制御機器10は、ディスクリプタDcに規定されている開始アドレスAsを先頭アドレスとするメインメモリ20中の領域に、データDtを転送する。 The communication control device 10 transfers the data Dt stored in the data FIFO 127 to the main memory 20 according to the descriptor Dc, for example, to the main memory 20 according to the normal descriptor Dco stored in the first descriptor FIFO 125. Specifically, the communication control device 10 transfers the data Dt to an area in the main memory 20 whose top address is the start address As specified in the descriptor Dc.

データ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 communication control device 10 updates the descriptor Dc in the main memory 20 corresponding to the descriptor Dc used to transfer the data Dt to the main memory 20 with the following information. That is, the communication control device 10 updates with "information indicating the data size of the data Dt transferred to the main memory 20" and "information indicating that it was used in the transfer of the data Dt". Therefore, "information indicating the data size of the data Dt" and "information indicating that it was used in the data transfer" are added to the descriptor Dc in the main memory 20 corresponding to the descriptor Dc used to transfer the data Dt to the main memory 20.

(誤ったディスクリプタによるデータの消失等について)
ディスクリプタ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 communication control device 10 determines whether the normal descriptor Dco is permissible before performing a transfer in accordance with the normal descriptor Dco.

具体的には、通信制御機器10は、「データDtの転送が許可されている領域」として予め設定しておいた標準受信領域Rgoを用いて、データDtをメインメモリへと転送する際に用いる通常ディスクリプタDcoの許否を判断する。例えば、通信制御機器10は、標準受信領域Rgoの先頭アドレスと標準受信領域Rgoのデータサイズとを予め取得しておき、取得した標準受信領域Rgoの先頭アドレスと標準受信領域Rgoのデータサイズとから、標準受信領域Rgoを算出(設定)しておく。 Specifically, the communication control device 10 uses the standard receiving area Rgo that has been set in advance as the "area in which the transfer of data Dt is permitted" to determine whether or not the normal descriptor Dco used when transferring data Dt to the main memory is permitted. For example, the communication control device 10 acquires in advance the start address of the standard receiving area Rgo and the data size of the standard receiving area Rgo, and calculates (sets) the standard receiving area Rgo from the acquired start address of the standard receiving area Rgo and the data size of the standard receiving area Rgo.

そして、通信制御機器10は、通常ディスクリプタDcoに規定されている開始アドレスAsが標準受信領域Rgo内にあるかを判定する(第一判定処理FJ)。また、通信制御機器10は、データDtのデータサイズと、通常ディスクリプタDcoに規定されている開始アドレスAsとから、「データDtを転送した場合の転送後の領域」の末尾アドレスAeを算出する。そして、通信制御機器10は、算出した末尾アドレスAeが標準受信領域Rgo内にあるかを判定する(第二判定処理SJ)。 Then, the communication control device 10 determines whether the start address As defined in the normal descriptor Dco is within the standard receiving area Rgo (first determination process FJ). The communication control device 10 also calculates the end address Ae of the "area after transfer when data Dt is transferred" from the data size of the data Dt and the start address As defined in the normal descriptor Dco. The communication control device 10 then determines whether the calculated end address Ae is within the standard receiving area Rgo (second determination process SJ).

通信制御機器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 communication control device 10 determines that the normal descriptor Dco is an "available descriptor" that can be used to transfer data Dt. If at least one of the start address As and the end address Ae is not within the standard receiving area Rgo, the communication control device 10 determines that the normal descriptor Dco is an "unavailable descriptor" that cannot be used to transfer data Dt.

(予め準備しておいた複数のディスクリプタを用いて転送を実行する)
通信制御機器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 communication control device 10 transfers data Dt received from the network 3 to the main memory 20, if it determines that a certain normal descriptor Dco(X) is an "unavailable descriptor", it executes the transfer using another descriptor Dc(Y). The communication control device 10 prepares a plurality of descriptors Dc in advance, and even if a certain normal descriptor Dco(X) is an "unavailable descriptor", it executes the transfer using another descriptor Dc(Y) as an "available descriptor".

通信制御機器10は、先ずその或る通常ディスクリプタDco(X)について、上述の判定を実行し、つまり、その或る通常ディスクリプタDco(X)の当否を判定する。 The communication control device 10 first performs the above-mentioned judgment on the certain normal descriptor Dco(X), that is, judges whether the certain normal descriptor Dco(X) is correct or not.

通信制御機器10は、その或る通常ディスクリプタDco(X)を「利用可能なディスクリプタ」であると判定すると、その通常ディスクリプタDco(X)に従って、データDtのメインメモリ20への転送を実行する。 When the communication control device 10 determines that a certain normal descriptor Dco(X) is an "available descriptor," it transfers the data Dt to the main memory 20 in accordance with that normal descriptor Dco(X).

通信制御機器10は、その或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」であると判定すると、以下の処理を実行する。すなわち、通信制御機器10は、その或る通常ディスクリプタDco(X)が「利用不能なディスクリプタ」であるとの判定結果をCPU30に通知することなく、予め準備しておいた別のディスクリプタDc(Y)に従って、データDtの転送を実行する。 When the communication control device 10 determines that the certain normal descriptor Dco(X) is an "unavailable descriptor," it executes the following process. That is, the communication control device 10 executes the transfer of the data Dt according to another previously prepared descriptor Dc(Y) without notifying the CPU 30 of the result of the determination that the certain normal descriptor Dco(X) is an "unavailable descriptor."

つまり、通信制御機器10は、或る通常ディスクリプタDco(X)に加えて、その或る通常ディスクリプタDco(X)が「利用不能なディスクリプタ」である場合のために、別のディスクリプタDc(Y)を、予め準備している。 In other words, in addition to a certain normal descriptor Dco(X), the communication control device 10 prepares another descriptor Dc(Y) in advance for the case where the certain normal descriptor Dco(X) is an "unavailable descriptor."

(複数の通常ディスクリプタの中から「利用可能なディスクリプタ」を選択する)
或る通常ディスクリプタ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 communications control device 10 uses as an "available descriptor" to execute the transfer of data Dt is, for example, the normal descriptor Dco(Y).

つまり、通信制御機器10は、或る通常ディスクリプタDco(X)以外に、別の通常ディスクリプタDco(Y)を予め準備しておく。そして、通信制御機器10は、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」と判定した場合、「利用可能なディスクリプタ」と判定した別の通常ディスクリプタDco(Y)を用いて、データDtの転送を実行する。 In other words, the communication control device 10 prepares in advance another normal descriptor Dco(Y) in addition to a certain normal descriptor Dco(X). Then, when the communication control device 10 determines that a certain normal descriptor Dco(X) is an "unavailable descriptor," it executes the transfer of data Dt using another normal descriptor Dco(Y) that it has determined to be an "available descriptor."

例えば、通信制御機器10は、ネットワーク3から受信したデータDtをメインメモリ20へと転送する際に従うべきディスクリプタDcとして、或る通常ディスクリプタDco(X)を含む複数の通常ディスクリプタDcoを、予め準備している。 For example, the communication control device 10 prepares in advance multiple normal descriptors Dco, including a certain normal descriptor Dco(X), as the descriptor Dc to be followed when transferring data Dt received from the network 3 to the main memory 20.

そして、通信制御機器10は、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」であると判定すると、その判定結果をCPU30に通知することなく、別の通常ディスクリプタDco(Y)について、その許否を判定する。通信制御機器10は、その別の通常ディスクリプタDco(Y)を「利用可能なディスクリプタ」であると判定すると、その別のディスクリプタDc(Y)に従って、データDtをメインメモリ20へと転送する。 When the communication control device 10 determines that a certain normal descriptor Dco(X) is an "unavailable descriptor," it determines whether or not another normal descriptor Dco(Y) is permitted without notifying the CPU 30 of the determination result. When the communication control device 10 determines that the other normal descriptor Dco(Y) is an "available descriptor," it transfers the data Dt to the main memory 20 in accordance with the other descriptor Dco(Y).

つまり、通信制御機器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 communication control device 10 determines that a certain normal descriptor Dco(X) is an "unavailable descriptor," it skips that certain normal descriptor Dco(X) and does not use that certain normal descriptor Dco(X) for transferring data Dt. The communication control device 10 further reads another normal descriptor Dco(Y) from among a plurality of normal descriptors Dco prepared in advance and determines whether to reject that other normal descriptor Dco(Y). When the communication control device 10 determines that the other normal descriptor Dco(Y) is an "available descriptor," it transfers data Dt to an area whose leading address is the start address As(Y) specified by that other descriptor Dc(Y).

以上の処理は、以下のように整理することができる。すなわち、通信制御機器10は、予め複数の通常ディスクリプタDcoを準備しておく。そして、通信制御機器10は、予め複数用意された通常ディスクリプタDcoの中から「利用可能なディスクリプタ」と判定する通常ディスクリプタDcoが現れるまで、予め複数用意された通常ディスクリプタDcoを順次読み込み、各々の許否を判定する。通信制御機器10は、予め複数用意された通常ディスクリプタDcoの中から「利用可能なディスクリプタ」と判定した通常ディスクリプタDcoが現れると、利用可能なディスクリプタ」と判定した通常ディスクリプタDcoに従って転送を実行する。 The above process can be summarized as follows. That is, the communication control device 10 prepares multiple normal descriptors Dco in advance. Then, the communication control device 10 sequentially reads the multiple normal descriptors Dco prepared in advance until a normal descriptor Dco that the communication control device 10 determines to be an "available descriptor" appears from among the multiple normal descriptors Dco prepared in advance, and determines whether each one is acceptable or not. When a normal descriptor Dco that the communication control device 10 determines to be an "available descriptor" appears from among the multiple normal descriptors Dco prepared in advance, the communication control device 10 executes the transfer according to the normal descriptor Dco that it determined to be an "available descriptor."

つまり、通信制御機器10は、ネットワーク3から受信したデータDtをメインメモリ20へと転送する処理である受信処理において、以下のようにして、データDtの転送に用いるべき「利用可能なディスクリプタ」を選択してもよい。すなわち、通信制御機器10は、予め用意された複数の通常ディスクリプタDcoの中から、データDtの転送に用いるべき「利用可能なディスクリプタ」を選択してもよい。 In other words, in a receiving process in which data Dt received from the network 3 is transferred to the main memory 20, the communication control device 10 may select an "available descriptor" to be used for transferring the data Dt as follows. That is, the communication control device 10 may select an "available descriptor" to be used for transferring the data Dt from among a plurality of normal descriptors Dco prepared in advance.

通信制御機器10は、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」であると判定しても、その判定結果をCPU30に通知することはなく、CPU30にその或る通常ディスクリプタDco(X)を正しい内容に再設定させることもない。その代わりに、通信制御機器10は、予め用意された複数の通常ディスクリプタDcoの中から別の通常ディスクリプタDco(Y)を読み込む。そして、通信制御機器10は、別の通常ディスクリプタDco(Y)の許否を判定し、その別の通常ディスクリプタDco(Y)を「利用可能なディスクリプタ」であると判定すると、その別の通常ディスクリプタDco(Y)に従ってデータDtを転送する。 Even if the communication control device 10 determines that a certain normal descriptor Dco(X) is an "unavailable descriptor," it does not notify the CPU 30 of the determination result, nor does it cause the CPU 30 to reset the certain normal descriptor Dco(X) to the correct content. Instead, the communication control device 10 reads another normal descriptor Dco(Y) from among a plurality of normal descriptors Dco prepared in advance. The communication control device 10 then determines whether the other normal descriptor Dco(Y) is acceptable, and if it determines that the other normal descriptor Dco(Y) is an "available descriptor," it transfers the data Dt according to the other normal descriptor Dco(Y).

通信制御機器10は、或る通常ディスクリプタDco(X)について「利用不能」と判定しても、データDtの転送に用いるべき「利用可能なディスクリプタ」をCPU30に再設定させず、例えば、別の通常ディスクリプタDco(Y)に従って転送を実行する。つまり、通信制御機器10は、予め用意された複数の通常ディスクリプタDcoの中から「利用可能なディスクリプタ」を選択し、選択した「利用可能なディスクリプタ」に従って、データDtを転送する。 Even if the communication control device 10 determines that a certain normal descriptor Dco (X) is "unavailable," it does not cause the CPU 30 to reset the "available descriptor" to be used for transferring the data Dt, and executes the transfer according to, for example, another normal descriptor Dco (Y). In other words, the communication control device 10 selects an "available descriptor" from a plurality of normal descriptors Dco prepared in advance, and transfers the data Dt according to the selected "available descriptor."

そのため、通信制御機器10は、「利用可能なディスクリプタ」をCPU30に再設定させる場合に比べて、データDtの転送に要する時間を短縮することができる。 As a result, the communication control device 10 can reduce the time required to transfer the data Dt compared to when the CPU 30 is forced to reconfigure the "available descriptors."

ここで、例えば、或る通常ディスクリプタ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 communication control device 10 is configured with a hardware logic circuit, the difference between time T(X) and time T(Y) can be made small enough to be negligible. In other words, even if the communication control device 10 has to use another normal descriptor Dco(Y) for transfer because a certain normal descriptor Dco(X) is an "unavailable descriptor," it can transfer data Dt in approximately the same time as time T(X).

通信制御機器10は、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」であると判定しても、その或る通常ディスクリプタDco(X)をスキップし、別のディスクリプタDc(Y)に従って転送を実行する。通信制御機器10は、CPU30による「利用可能なディスクリプタ」の再設定を待たずに、予め準備しておいた別のディスクリプタDc(Y)に従って転送を実行するため、時間T(X)とほぼ同じ時間である時間T(Y)で、データDtを転送することができる。 Even if the communication control device 10 determines that a certain normal descriptor Dco(X) is an "unavailable descriptor," it skips the certain normal descriptor Dco(X) and executes the transfer according to another descriptor Dc(Y). Since the communication control device 10 executes the transfer according to another previously prepared descriptor Dc(Y) without waiting for the CPU 30 to reset the "available descriptor," it is possible to transfer the data Dt in a time T(Y) that is approximately the same as the time T(X).

(退避用ディスクリプタを「利用可能なディスクリプタ」として用いる)
或る通常ディスクリプタ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 communications control device 10 uses as an "available descriptor" for executing the transfer of data Dt is, for example, a save descriptor Dce.

例えば、CPU30は、通常ディスクリプタDcoとは別に、退避用ディスクリプタDceを、データDtを受信する前に、メインメモリ20に設定しておく。そして、CPU30によってメインメモリ20に設定された退避用ディスクリプタDceは、退避用ディスクリプタDceを格納しておくための、FIFO方式の格納領域である第二ディスクリプタFIFO126に格納される。すなわち、本実施形態において、ディスクリプタDcは、通常ディスクリプタDcoと退避用ディスクリプタDceとに大別される。 For example, the CPU 30 sets a save descriptor Dce in the main memory 20 separately from the normal descriptor Dco before receiving the data Dt. The save descriptor Dce set in the main memory 20 by the CPU 30 is then stored in the second descriptor FIFO 126, which is a FIFO-based storage area for storing the save descriptor Dce. That is, in this embodiment, the descriptor Dc is broadly divided into a normal descriptor Dco and a save descriptor Dce.

具体的には、通信制御機器10は、或る通常ディスクリプタDco(X)以外に、退避用ディスクリプタDceを予め準備している。通信制御機器10は、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」と判定した場合、退避用ディスクリプタDceを「利用可能なディスクリプタ」として、退避用ディスクリプタDceを用いて、データDtの転送を実行してもよい。 Specifically, the communication control device 10 prepares a save descriptor Dce in advance in addition to a certain normal descriptor Dco(X). When the communication control device 10 determines that a certain normal descriptor Dco(X) is an "unavailable descriptor," it may determine that the save descriptor Dce is an "available descriptor" and use the save descriptor Dce to transfer the data Dt.

例えば、通信制御機器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 communication control device 10 executes the following process. That is, when the number of errors Ct exceeds the reference number Nr, the communication control device 10 transfers the data Dt to the main memory 20 according to the save descriptor Dce(Y). Specifically, the communication control device 10 may transfer the data Dt to an area in the main memory 20 whose top address is the start address As defined in the save descriptor Dce(Y).

基準個数Nrとして「0」が予め設定されていた場合、通信制御機器10は、以下の処理を実行する。すなわち、通信制御機器10は、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」と判定すると、他の通常ディスクリプタDcoの当否を判定することなく、退避用ディスクリプタDceを用いて、データDtの転送を実行する。 If the reference number Nr is preset to "0", the communication control device 10 executes the following process. That is, when the communication control device 10 judges a certain normal descriptor Dco (X) to be an "unavailable descriptor", it executes the transfer of data Dt using the evacuation descriptor Dce without judging the validity of other normal descriptors Dco.

ここで、例えば、或る通常ディスクリプタ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 communication control device 10 is configured with a hardware logic circuit, the difference between time T(X) and time T(Y) can be made small enough to be negligible. In other words, even if the communication control device 10 has to use the save descriptor Dce(Y) to transfer data because a certain normal descriptor Dco(X) is an "unavailable descriptor," it can transfer data Dt in approximately the same time as time T(X).

これまで説明してきたように、通信制御機器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 communication control device 10 first reads a certain normal descriptor Dco (X) and determines whether to reject it. If the communication control device 10 determines that a certain normal descriptor Dco (X) is an "unavailable descriptor", it determines whether the number of normal descriptors Dco determined to be "unavailable descriptors" (number of errors Ct) exceeds a reference number Nr. If it determines that the number of errors Ct does not exceed the reference number Nr, the communication control device 10 reads another normal descriptor Dco from among multiple normal descriptors Dco prepared in advance and determines whether to accept it. The normal descriptor Dco(Y) that the communication control device 10 reads next to a certain normal descriptor Dco(X) is the normal descriptor Dco that follows the certain normal descriptor Dco(X) and is also called the following descriptor Dc.

(A)通信制御機器10は、読み込んだ別の通常ディスクリプタDcoを「利用可能なディスクリプタ」であると判定すると、「利用可能なディスクリプタ」と判定したその別の通常ディスクリプタDcoに従って、データDtの転送を実行する。 (A) When the communication control device 10 determines that the other normal descriptor Dco that it has read is an "available descriptor," it executes the transfer of data Dt in accordance with the other normal descriptor Dco that it has determined to be an "available descriptor."

(B)通信制御機器10は、読み込んだ別の通常ディスクリプタDcoを「利用不能なディスクリプタ」であると判定すると、さらに、「エラー個数Ctが基準個数Nrを超えていないか」を判定する。エラー個数Ctが基準個数Nrを超えていないと判定すると、通信制御機器10は、予め準備しておいた複数の通常ディスクリプタDcoの中から、さらに別の通常ディスクリプタDcoを読み込み、その許否を判定する。通信制御機器10は、読み込んだ通常ディスクリプタDcoを「利用不能なディスクリプタ」であると判定すると、「エラー個数Ctが基準個数Nrを超えた」と判定するまで、さらに別の通常ディスクリプタDcoを読み込み、その許否を判定する。 (B) When the communication control device 10 determines that the read normal descriptor Dco is an "unavailable descriptor," it further determines whether the "number of errors Ct exceeds the reference number Nr." When it determines that the number of errors Ct does not exceed the reference number Nr, the communication control device 10 reads yet another normal descriptor Dco from among the multiple normal descriptors Dco prepared in advance and determines whether it is acceptable. When the communication control device 10 determines that the read normal descriptor Dco is an "unavailable descriptor," it reads yet another normal descriptor Dco and determines whether it is acceptable until it determines that the "number of errors Ct exceeds the reference number Nr."

読み込んだ通常ディスクリプタ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 communication control device 10 executes the transfer of data Dt according to the normal descriptor Dco determined to be an "available descriptor."

そして、通信制御機器10は、「エラー個数Ctが基準個数Nrを超えた」と判定すると、退避用ディスクリプタDceを読み込み、退避用ディスクリプタDceの開始アドレスAsを先頭アドレスとする領域に、データDtを転送する。 When the communication control device 10 determines that the number of errors Ct has exceeded the reference number Nr, it reads the save descriptor Dce and transfers the data Dt to an area whose top address is the start address As of the save descriptor Dce.

つまり、「エラー個数Ctが基準個数Nrを超える」、または、『「利用可能なディスクリプタ」と判定した通常ディスクリプタDcoが現れる』まで、通信制御機器10は、以下の処理を繰り返す。すなわち、通信制御機器10は、予め準備しておいた通常ディスクリプタDcoを順次読み込み、その許否を順次判定する。 In other words, the communication control device 10 repeats the following process until the "number of errors Ct exceeds the reference number Nr" or "a normal descriptor Dco determined to be an 'available descriptor' appears." In other words, the communication control device 10 sequentially reads the normal descriptors Dco that have been prepared in advance and sequentially determines whether or not they are acceptable.

「エラー個数Ctが基準個数Nrを超える」と、通信制御機器10は、退避用ディスクリプタDceを読み込み、退避用ディスクリプタDceの規定する開始アドレスAsを先頭アドレスとする領域に、データDtを転送する。 When the "number of errors Ct exceeds the reference number Nr," the communication control device 10 reads the save descriptor Dce and transfers the data Dt to an area whose top address is the start address As specified in the save descriptor Dce.

『「利用可能なディスクリプタ」と判定した通常ディスクリプタDcoが現れる』と、通信制御機器10は、「利用可能なディスクリプタ」と判定した通常ディスクリプタDcoの規定する開始アドレスAsを先頭アドレスとする領域に、データDtを転送する。 When a normal descriptor Dco determined to be an "available descriptor" appears, the communication control device 10 transfers data Dt to an area whose leading address is the start address As specified by the normal descriptor Dco determined to be an "available descriptor."

(標準受信領域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 communication control device 10 and the PLC 1 including the communication control device 10, the outline of which has been explained above with reference to Fig. 2, will now be explained in detail with reference to Fig. 1.

図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 communication control device 10, a main memory 20, and a CPU 30. PLC1 may further include a non-volatile memory that stores various programs, parameters, and other data in a non-volatile manner, and a USB connector for connecting an external device to PLC1. The communication control device 10, the main memory 20, the CPU 30, and the non-volatile memory (not shown) are each connected via various buses (internal buses).

CPU30は、典型的には、汎用的なコンピュータアーキテクチャに準じて構成され、内部クロックに従って順次命令コードを解釈して実行する。CPU30は、ハードウェア構成としては、1つ以上のCPUコアと、ネットワーク制御部とを含んでいる。 The CPU 30 is typically configured according to a general-purpose computer architecture, and interprets and executes instruction codes sequentially according to an internal clock. The hardware configuration of the CPU 30 includes one or more CPU cores and a network control unit.

メインメモリ20は、PLC1の記憶手段であり、例えば、PLC1(特に、通信制御機器10)がネットワーク3から受信したデータDtが格納される。CPU30は、メインメモリ20に格納されているデータDtに対して、各種の演算処理を実行する。 The main memory 20 is a storage means of the PLC 1, and stores, for example, data Dt that the PLC 1 (particularly the communication control device 10) receives from the network 3. The CPU 30 executes various types of arithmetic processing on the data Dt stored in the main memory 20.

メインメモリ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 network 3 and subject to various arithmetic processing by the CPU 30, it also holds various programs to be executed by the CPU 30 after the PLC 1 is powered on. The main memory 20 is also used as a working memory when the CPU 30 executes various programs. For example, a DRAM (Dynamic Random Access Memory), an SRAM (Static Random Access Memory), etc. can be used as this type of main memory 20.

図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 CPU 30 each time the PLC 1 attempts to receive the data Dt (e.g., every control period Cc) before receiving the data Dt. The normal descriptor Dco corresponds to, for example, specific data Dt received by the PLC, and includes information indicating the storage address of the corresponding data Dt in the main memory 20 (i.e., the starting address As), the data size of the corresponding data Dt in the main memory 20, etc.

前述の通り、PLC1は不図示の不揮発性メモリをさらに備えていてもよく、不揮発性メモリは、各種のプログラムおよびパラメータなどのデータを不揮発的に保持する。これらのデータは、必要に応じて、CPU30がアクセスできるようにメインメモリ20にコピーされる。このような不揮発性メモリは、フラッシュメモリのような半導体メモリを用いることができる。あるいは、ハードディスクドライブのような磁気記録媒体、DVD-RAM(Digital Versatile Disk Random Access Memory)のような光学記録媒体などを用いることもできる。 As mentioned above, the PLC 1 may further include a non-volatile memory (not shown), which stores various programs, parameters, and other data in a non-volatile manner. This data is copied to the main memory 20 so that the CPU 30 can access it as necessary. Such non-volatile memory may be a semiconductor memory such as a flash memory. Alternatively, a magnetic recording medium such as a hard disk drive or an optical recording medium such as a DVD-RAM (Digital Versatile Disk Random Access Memory) may also be used.

通信制御機器10は、ネットワーク3からのデータDtを受信し、受信したデータDtをメインメモリ20へと格納(転送)するデータ転送装置であり、例えば、NIC(Network Interface Card)として実現される。通信制御機器10は、典型的には、FPGA(Field-Programmable gate array)またはASIC(Application Specific Integrated Circuit)等のハードウェアによる論理回路で構成される。通信制御機器10は、メインメモリ20、CPU30、および、不揮発性メモリ(不図示)の各々と、データの送受信が可能に構成されている。 The communication control device 10 is a data transfer device that receives data Dt from the network 3 and stores (transfers) the received data Dt to the main memory 20, and is realized, for example, as a NIC (Network Interface Card). The communication control device 10 is typically configured with a hardware logic circuit such as an FPGA (Field-Programmable gate array) or an ASIC (Application Specific Integrated Circuit). The communication control device 10 is configured to be able to transmit and receive data to and from each of the main memory 20, the CPU 30, and a non-volatile memory (not shown).

通信制御機器10は、受信ポート130を介してネットワーク3と接続され、ネットワーク3とのデータの遣り取りを制御し、特に、データDtの受信を制御する。通信制御機器10は、例えば、ネットワーク3における物理層およびデータリンク層の機能を提供する。すなわち、通信制御機器10は、ネットワーク3の準拠する規格に従い、送信データの送信およびデータDtの受信を制御する。具体的には、通信制御機器10は、ネットワーク3に接続されているネットワークデバイスからデータDtを受信し、受信したデータDtをデータFIFO127に格納する。 The communication control device 10 is connected to the network 3 via the receiving port 130, and controls data exchange with the network 3, in particular, the reception of data Dt. The communication control device 10 provides, for example, the functions of the physical layer and data link layer in the network 3. That is, the communication control device 10 controls the transmission of transmission data and the reception of data Dt in accordance with the standards to which the network 3 conforms. Specifically, the communication control device 10 receives data Dt from a network device connected to the network 3, and stores the received data Dt in the data FIFO 127.

詳細は後述するが、PLC1は、CPU30ではなく、ハードウェアによる論理回路で構成した通信制御機器10によって、ネットワーク3から受信したデータDtの、メインメモリ20への転送を制御し、特に、転送先を決定する。したがって、PLC1は、CPU30の処理負荷を増大させることなく、ハードウェアによる論理回路で構成した通信制御機器10によって、データDtを、メインメモリ20の所望の領域へと転送することができるとの効果を奏する。 As will be described in more detail later, the PLC 1 controls the transfer of data Dt received from the network 3 to the main memory 20, and in particular determines the transfer destination, not by the CPU 30 but by the communication control device 10 configured with a hardware logic circuit. Therefore, the PLC 1 has the effect of being able to transfer data Dt to a desired area in the main memory 20 by the communication control device 10 configured with a hardware logic circuit, without increasing the processing load of the CPU 30.

図1に例示する通信制御機器10は、機能ブロックとして、IF110と、受信処理部120と、受信ポート130とを備えている。図1に例示する通信制御機器10について、記載の簡潔性を担保するため、送信ポートを介してネットワーク3へと送信データを送信する構成などの、本実施の形態に直接関係のない構成は、省略している。ただし、実施の実情に則して、通信制御機器10は、当該省略された構成を備えてもよい。 The communication control device 10 illustrated in FIG. 1 includes, as functional blocks, an IF 110, a receiving processing unit 120, and a receiving port 130. In order to ensure conciseness in the description of the communication control device 10 illustrated in FIG. 1, configurations that are not directly related to this embodiment, such as a configuration for transmitting transmission data to the network 3 via a transmitting port, have been omitted. However, depending on the actual implementation situation, the communication control device 10 may include the omitted configurations.

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 CPU 30, and the non-volatile memory (not shown).

受信ポート130で受信されたデータDt(受信データ)は、データFIFO127へと格納される。 The data Dt (received data) received at the receiving port 130 is stored in the data FIFO 127.

受信処理部120は、「ネットワーク3から受信したデータDt(具体的には、データFIFO127に格納されているデータDt)を、予め準備されたディスクリプタDcに従って、メインメモリ20へと転送する処理」である受信処理を実行する。受信処理部120は、DMAC121と、アドレス決定部122と、第一ディスクリプタFIFO125と、第二ディスクリプタFIFO126と、データFIFO127とを含んでいる。 The receiving processing unit 120 executes a receiving process, which is a process of "transferring data Dt received from the network 3 (specifically, data Dt stored in the data FIFO 127) to the main memory 20 according to a previously prepared descriptor Dc." The receiving processing unit 120 includes a DMAC 121, an address determination unit 122, a first descriptor FIFO 125, a second descriptor FIFO 126, and a data FIFO 127.

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 first descriptor FIFO 125, the second descriptor FIFO 126, and the data FIFO 127.

例えば、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 CPU 30 before receiving the data Dt, and stores it in the first descriptor FIFO125. In addition, DMAC121 reads out the save descriptor Dce set in the main memory 20 by the CPU 30, unrelated to the specific data Dt, and stores it in the second descriptor FIFO126.

DMAC121は、データFIFO127に格納されている受信データ(データDt)を、先頭から順に、メインメモリ20へと格納する。DMAC121は、アドレス決定部122から通知される『データDtの転送に「利用可能なディスクリプタ」に規定されている開始アドレスAs』を先頭アドレスとするメインメモリ20中の領域に、データFIFO127に格納されているデータDtを転送する。 The DMAC 121 stores the received data (data Dt) stored in the data FIFO 127 in the main memory 20, starting from the top. The DMAC 121 transfers the data Dt stored in the data FIFO 127 to an area in the main memory 20 whose starting address is the "start address As specified in the 'available descriptor' for transferring the data Dt" notified by the address determination unit 122.

DMAC121は、データDtのメインメモリ20への転送を完了すると、ライトバックディスクリプタをメインメモリ20へと転送し、つまり、メインメモリ20中のディスクリプタをライトバックディスクリプタで上書きする。具体的には、DMAC121は、データDtのメインメモリ20への転送に用いたディスクリプタDcに対応する、メインメモリ20中のディスクリプタDcを、ライトバックディスクリプタで上書きする。ライトバックディスクリプタとは、データDtのメインメモリ20への転送に用いたディスクリプタDcに、以下の2つの情報を追記したディスクリプタDcである。すなわち、「そのディスクリプタDcに従ってメインメモリ20へと転送したデータDtの、データサイズを示す情報」と、「データDtの転送に用いられたことを示す情報」とを追記したディスクリプタDcである。 When the DMAC 121 completes the transfer of the data Dt to the main memory 20, it transfers the write-back descriptor to the main memory 20, i.e., it overwrites the descriptor in the main memory 20 with the write-back descriptor. Specifically, the DMAC 121 overwrites the descriptor Dc in the main memory 20 that corresponds to the descriptor Dc used to transfer the data Dt to the main memory 20 with the write-back descriptor. The write-back descriptor is a descriptor Dc to which the following two pieces of information have been added to the descriptor Dc used to transfer the data Dt to the main memory 20. That is, the descriptor Dc is a descriptor Dc to which "information indicating the data size of the data Dt transferred to the main memory 20 according to that descriptor Dc" and "information indicating that it has been used to transfer the data Dt" have been added.

アドレス決定部122は、予め準備しておいた複数のディスクリプタDcの中から、データDtの転送に用いることが可能な「利用可能なディスクリプタ」を選択し、選択した「利用可能なディスクリプタ」の開始アドレスAsを、DMAC121に通知する。アドレス決定部122は、読込部123と、判定部124とを含む。 The address determination unit 122 selects an "available descriptor" that can be used to transfer data Dt from among a plurality of previously prepared descriptors Dc, and notifies the DMAC 121 of the start address As of the selected "available descriptor." The address determination unit 122 includes a reading unit 123 and a determination unit 124.

判定部124によって、或る通常ディスクリプタDcoが『データDtの転送に用いることが可能な「利用可能なディスクリプタ」である』と判定されると、アドレス決定部122は、以下の情報をDMAC121に通知する。すなわち、アドレス決定部122は、『データDtの転送に用いることが可能な「利用可能なディスクリプタ」である』と判定された、その或る通常ディスクリプタDcoの規定する開始アドレスAsを、DMAC121に通知する。 When the determination unit 124 determines that a certain normal descriptor Dco is an "available descriptor" that can be used to transfer data Dt, the address determination unit 122 notifies the DMAC 121 of the following information. That is, the address determination unit 122 notifies the DMAC 121 of the start address As specified by the certain normal descriptor Dco that has been determined to be an "available descriptor" that can be used to transfer data Dt.

アドレス決定部122は、読込部123によって退避用ディスクリプタDceが読み込まれると、読込部123によって読み込まれた退避用ディスクリプタDceの規定する開始アドレスAsを、DMAC121に通知する。すなわち、アドレス決定部122は、退避用ディスクリプタDceを、データDtの転送に用いることが可能な「利用可能なディスクリプタ」であるとし、退避用ディスクリプタDceの規定する開始アドレスAsを、DMAC121に通知する。 When the save descriptor Dce is read by the read unit 123, the address determination unit 122 notifies the DMAC 121 of the start address As specified by the save descriptor Dce read by the read unit 123. In other words, the address determination unit 122 determines that the save descriptor Dce is an "available descriptor" that can be used to transfer data Dt, and notifies the DMAC 121 of the start address As specified by the save descriptor Dce.

読込部123は、ディスクリプタDcを読み込み、読み込んだディスクリプタDcの規定する開始アドレスAsを判定部124に通知する。例えば、読込部123は、データDtの転送の転送に際して先ず、第一ディスクリプタFIFO125に格納されている通常ディスクリプタDcoを読み込み、読み込んだ通常ディスクリプタDcoの規定する開始アドレスAsを、判定部124に通知する。 The reading unit 123 reads the descriptor Dc and notifies the determination unit 124 of the start address As specified by the read descriptor Dc. For example, when transferring data Dt, the reading unit 123 first reads the normal descriptor Dco stored in the first descriptor FIFO 125 and notifies the determination unit 124 of the start address As specified by the read normal descriptor Dco.

また、読込部123は、判定部124から、或る通常ディスクリプタDcoが「利用不能なディスクリプタ」であるとの判定結果を通知されると、以下の判定を実行する。すなわち、読込部123は、判定部124によって「利用不能なディスクリプタ」であると判定された通常ディスクリプタDcoの個数(エラー個数Ct)が、基準個数Nrを超えていないかを判定する。 When the reading unit 123 is notified by the determination unit 124 that a certain normal descriptor Dco is an "unavailable descriptor," the reading unit 123 executes the following determination. That is, the reading unit 123 determines whether the number of normal descriptors Dco determined by the determination unit 124 to be "unavailable descriptors" (number of errors Ct) exceeds a reference number Nr.

読込部123は、エラー個数Ctが基準個数Nrを超えていないと判定すると、第一ディスクリプタFIFO125を参照して別の通常ディスクリプタDcoを読み込み、その別の通常ディスクリプタDcoの規定する開始アドレスAsを判定部124に通知する。例えば、読込部123は、第一ディスクリプタFIFO125において、或る通常ディスクリプタDcoの次に格納されている通常ディスクリプタDco(つまり、或る通常ディスクリプタDcoの後行ディスクリプタ)を読み込む。 When the reading unit 123 determines that the number of errors Ct does not exceed the reference number Nr, it refers to the first descriptor FIFO 125 to read another normal descriptor Dco, and notifies the determination unit 124 of the start address As specified by the other normal descriptor Dco. For example, the reading unit 123 reads the normal descriptor Dco stored next to a certain normal descriptor Dco in the first descriptor FIFO 125 (i.e., the succeeding descriptor of a certain normal descriptor Dco).

或る通常ディスクリプタDcoが「利用不能なディスクリプタ」であるとの判定結果を通知された読込部123は、エラー個数Ctが基準個数Nrを超えるまで、第一ディスクリプタFIFO125に格納されている通常ディスクリプタDcoを順次読み込む。そして、読込部123は、読み込んだ通常ディスクリプタDcoの規定する開始アドレスAsを、判定部124に通知する。 When the reading unit 123 is notified of the result of the determination that a certain normal descriptor Dco is an "unavailable descriptor," the reading unit 123 sequentially reads the normal descriptor Dco stored in the first descriptor FIFO 125 until the number of errors Ct exceeds the reference number Nr. Then, the reading unit 123 notifies the determination unit 124 of the start address As specified by the read normal descriptor Dco.

読込部123は、エラー個数Ctが基準個数Nrを超えたと判定すると、第二ディスクリプタFIFO126に格納されている退避用ディスクリプタDceを読み込む。アドレス決定部122は、読込部123によって読み込まれた退避用ディスクリプタDceの規定する開始アドレスAsを、DMAC121に通知する。 When the reading unit 123 determines that the number of errors Ct exceeds the reference number Nr, it reads the save descriptor Dce stored in the second descriptor FIFO 126. The address determination unit 122 notifies the DMAC 121 of the start address As specified by the save descriptor Dce read by the reading unit 123.

例えば、読込部123は、CPU30から、基準個数Nrを、予め取得しておく。 For example, the reading unit 123 obtains the reference number Nr in advance from the CPU 30.

(基準個数の値の一例)
基準個数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 network 3 is larger than expected, and the end address Ae is not within the standard receiving area Rgo."

上述の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 communication control device 10 can achieve the following two effects. That is, first, even if either of the two typical cases described above occurs, the communication control device 10 can transfer the data Dt according to the normal descriptor Dco (the third normal descriptor Dco) rather than according to the save descriptor Dce. Second, even if some kind of abnormality occurs, the communication control device 10 can reliably transfer the data Dt according to the save descriptor Dce.

また、前述の通り、基準個数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 reading unit 123 may acquire in advance from the CPU 30 a method for determining the reference number Nr instead of the reference number Nr itself. For example, the reading unit 123 may acquire in advance a determination method in which "the reference number Nr is a value obtained by subtracting "2" from the number X of normal descriptors Dco set by the CPU 30 and for which the determination unit 124 has not yet determined whether the descriptors are permitted or not." However, the reference number Nr is an integer equal to or greater than "0." The reading unit 123 may determine the reference number Nr based on the previously acquired determination method and use the determined reference number Nr. The number X may be rephrased as "the number of normal descriptors Dco stored in the first descriptor FIFO 125 and for which the determination unit 124 has not yet determined whether the descriptors are permitted or not."

例えば、個数Xが「1」である場合、判定部124が或る通常ディスクリプタDcoを「利用不能なディスクリプタ」と判定すると、判定部124が拒否を判定すべき次の通常ディスクリプタDcoは残っていない。そのため、読込部123は、基準個数Nrを「0」とするのが望ましい。 For example, if the number X is "1", when the determination unit 124 determines that a certain normal descriptor Dco is an "unavailable descriptor", there is no next normal descriptor Dco remaining for which the determination unit 124 should determine whether to reject it. Therefore, it is preferable for the reading unit 123 to set the reference number Nr to "0".

例えば、個数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 reading unit 123 sets the reference number Nr to "2 = 4 - 2". When the number X is "4", even if there are multiple pieces of data Dt (e.g., two pieces) to be transferred to the main memory 20, the communication control device 10 can set the reference number Nr to "2" and transfer each of the multiple pieces of data Dt according to the normal descriptor Dco.

例えば、第一ディスクリプタ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 first descriptor FIFO 125, the communication control device 10 determines the reference number Nr to be "2" based on the above-mentioned determination method. Then, the communication control device 10 may execute the following process when transferring each of the first data Dt(0) and the second data Dt(1).

すなわち、通信制御機器10は、第一の通常ディスクリプタDco(0)および第二の通常ディスクリプタDco(1)を、第一のデータDt(0)の転送に「利用不能なディスクリプタ」と判定しても、第三の通常ディスクリプタDco(2)の拒否を判定する。そして、通信制御機器10は、第三の通常ディスクリプタDco(2)を、第一のデータDt(0)の転送に「利用可能なディスクリプタ」と判定すると、第三の通常ディスクリプタDco(2)に従って、第一のデータDt(0)を転送する。 In other words, even if the communication control device 10 determines that the first normal descriptor Dco(0) and the second normal descriptor Dco(1) are "unusable descriptors" for the transfer of the first data Dt(0), it still determines to reject the third normal descriptor Dco(2). Then, when the communication control device 10 determines that the third normal descriptor Dco(2) is "usable descriptor" for the transfer of the first data Dt(0), it transfers the first data Dt(0) in accordance with the third normal descriptor Dco(2).

また、通信制御機器10は、第四の通常ディスクリプタDco(3)の拒否を判定する。そして、通信制御機器10は、第四の通常ディスクリプタDco(3)を、第二のデータDt(1)の転送に「利用可能なディスクリプタ」と判定すると、第四の通常ディスクリプタDco(3)に従って、第二のデータDt(1)を転送する。 The communication control device 10 also determines to reject the fourth normal descriptor Dco(3). Then, when the communication control device 10 determines that the fourth normal descriptor Dco(3) is an "available descriptor" for transferring the second data Dt(1), it transfers the second data Dt(1) in accordance with the fourth normal descriptor Dco(3).

上述の通り、「個数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 communication control device 10 can achieve the following effect. That is, even if there are multiple pieces of data Dt to be transferred to the main memory 20, the communication control device 10 can achieve the effect of being able to transfer each of the multiple pieces of data Dt to the main memory 20 in accordance with the normal descriptor Dco.

判定部124は、読込部123によって読み込まれた通常ディスクリプタDcoの拒否を判定し、例えば、その通常ディスクリプタDcoの規定する開始アドレスAsを用いて、第一判定処理FJおよび第二判定処理SJを実行する。 The determination unit 124 determines whether to reject the normal descriptor Dco read by the reading unit 123, and executes a first determination process FJ and a second determination process SJ, for example, using the start address As specified by the normal descriptor Dco.

第一判定処理FJとして、判定部124は、読込部123から、「読込部123によって読み込まれた通常ディスクリプタDcoの開始アドレスAs」を通知されると、通知された開始アドレスAsが標準受信領域Rgo内にあるかを判定する。 As a first determination process FJ, when the determination unit 124 is notified by the reading unit 123 of the "start address As of the normal descriptor Dco read by the reading unit 123," the determination unit 124 determines whether the notified start address As is within the standard reception area Rgo.

また、判定部124は、読込部123から通知された開始アドレスAsと、データDtのデータサイズとから、「開始アドレスAsを先頭アドレスとする領域に、データDtを転送した場合の転送後の領域」の末尾アドレスAeを算出する。そして、判定部124は、第二判定処理SJとして、算出した末尾アドレスAeが標準受信領域Rgo内にあるかを判定する。 The determination unit 124 also calculates the end address Ae of the "area after the data Dt is transferred to the area whose leading address is the start address As" from the start address As notified by the reading unit 123 and the data size of the data Dt. Then, as a second determination process SJ, the determination unit 124 determines whether the calculated end address Ae is within the standard receiving area Rgo.

判定部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 determination unit 124 determines that the "normal descriptor Dco read by the reading unit 123" is an "available descriptor" for transferring data Dt. The address determination unit 122 notifies the DMAC 121 of the start address As specified by the normal descriptor Dco that the determination unit 124 has determined to be an "available descriptor."

判定部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 determination unit 124 determines that the "normal descriptor Dco read by the reading unit 123" is an "unusable descriptor" for transferring data Dt. The determination unit 124 notifies the reading unit 123 of the determination result that the "normal descriptor Dco read by the reading unit 123" is an "unusable descriptor."

例えば、判定部124は、CPU30から、標準受信領域Rgoの先頭アドレスと標準受信領域Rgoのデータサイズとを、予め取得しておく。そして、判定部124は、取得した標準受信領域Rgoの先頭アドレスと標準受信領域Rgoのデータサイズとから、標準受信領域Rgoを算出する。 For example, the determination unit 124 acquires in advance the start address of the standard receiving area Rgo and the data size of the standard receiving area Rgo from the CPU 30. The determination unit 124 then calculates the standard receiving area Rgo from the acquired start address of the standard receiving area Rgo and the data size of the standard receiving area Rgo.

第一ディスクリプタFIFO125には、CPU30によってメインメモリ20に設定された通常ディスクリプタDcoが格納され、例えば、FIFO(first in, first out、先入れ先出し)方式で格納される。CPU30が、通常ディスクリプタDcoのメインメモリ20への設定を完了して、通信制御機器10に受信許可を発行すると、通信制御機器10(具体的には、DMAC121)は、メインメモリ20から通常ディスクリプタDcoを読み出す。そして、DMAC121は、読み出した通常ディスクリプタDcoを、第一ディスクリプタFIFO125に格納する。 The first descriptor FIFO 125 stores the normal descriptor Dco set in the main memory 20 by the CPU 30, for example, in a FIFO (first in, first out) format. When the CPU 30 completes setting the normal descriptor Dco in the main memory 20 and issues a receive permission to the communication control device 10, the communication control device 10 (specifically, the DMAC 121) reads the normal descriptor Dco from the main memory 20. Then, the DMAC 121 stores the read normal descriptor Dco in the first descriptor FIFO 125.

第二ディスクリプタFIFO126には、CPU30によってメインメモリ20に設定された退避用ディスクリプタDceが格納され、例えば、FIFO(first in, first out、先入れ先出し)方式で格納される。CPU30が、退避用ディスクリプタDceのメインメモリ20への設定を完了して、通信制御機器10に受信許可を発行すると、通信制御機器10(具体的には、DMAC121)は、メインメモリ20から退避用ディスクリプタDceを読み出す。そして、DMAC121は、読み出した退避用ディスクリプタDceを、第二ディスクリプタFIFO126に格納する。 The second descriptor FIFO 126 stores the save descriptor Dce set in the main memory 20 by the CPU 30, for example, in a FIFO (first in, first out) format. When the CPU 30 completes setting the save descriptor Dce in the main memory 20 and issues a receive permission to the communication control device 10, the communication control device 10 (specifically, the DMAC 121) reads the save descriptor Dce from the main memory 20. Then, the DMAC 121 stores the read save descriptor Dce in the second descriptor FIFO 126.

データFIFO127には、PLC1(特に、通信制御機器10)がネットワーク3から受信したデータDt(受信データ)が一時的に格納され、例えば、FIFO方式で格納される。 The data FIFO 127 temporarily stores data Dt (received data) received by the PLC 1 (particularly the communication control device 10) from the network 3, for example, in a FIFO manner.

(通常ディスクリプタと退避用ディスクリプタとの区別について)
本実施形態において、ディスクリプタ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 CPU 30 each time the PLC 1 attempts to receive data Dt (e.g., every control period Cc) before receiving the data Dt. The normal descriptor Dco set in the main memory 20 by the CPU 30 is stored in the first descriptor FIFO 125 by the DMAC 121.

退避用ディスクリプタDceは、データDtの受信とは無関係に、CPU30によってメインメモリ20に予め設定される。
CPU30によってメインメモリ20に設定された退避用ディスクリプタDceは、DMAC121によって第二ディスクリプタFIFO126に格納される。
The save descriptor Dce is preset in the main memory 20 by the CPU 30, regardless of the reception of the data Dt.
The save descriptor Dce set in the main memory 20 by the CPU 30 is stored in the second descriptor FIFO 126 by the DMAC 121 .

例えば、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 CPU 30 sets a normal descriptor Dco(X) in the main memory 20 to indicate an area in the main memory 20 (particularly, the starting address) to which the certain data Dt(X) should be transferred. The CPU 30 may set normal descriptors Dco(X1), Dco(X2), Dco(X3), ..., Dco(Xn) in the main memory 20 to indicate an area in the main memory 20 to which the certain data Dt(X) should be transferred. The normal descriptor Dco(X) (or normal descriptors Dco(X1), Dco(X2), Dco(X3), ..., Dco(Xn)) set in the main memory 20 by the CPU 30 is stored in the first descriptor FIFO 125. In other words, the normal descriptor Dco is a descriptor Dc that corresponds (or should correspond) to specific data Dt received by the PLC; for example, the normal descriptor Dco(X) corresponds to a certain specific data Dt(X) received by the PLC.

これに対して、退避用ディスクリプタ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 CPU 30 as an area in which to store specific data Dt (i.e., the standard receiving area Rgo (permitted area))."

これまで図1を用いてその構成例を説明してきた通信制御機器10について、次に、通信制御機器10が実行する受信処理の具体例等を、図3から図5を用いて説明していく。 Up until now, the configuration example of the communication control device 10 has been explained using FIG. 1. Next, specific examples of the reception processing executed by the communication control device 10 will be explained using FIG. 3 to FIG. 5.

(『通常ディスクリプタの中から「利用可能なディスクリプタ」を選択する』例)
図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 communication control device 10 sequentially reads a plurality of normal descriptors Dco prepared in advance and transfers data Dt to the main memory 20 according to the normal descriptor Dco determined to be "available." In the example shown in FIG. 3, data Dt(0) and data Dt(1) are stored in the data FIFO 127 in a FIFO manner. Also, normal descriptors Dco(0), Dco(1), Dco(2), ..., Dco(N) are stored in advance in the first descriptor FIFO 125.

(先頭のデータの転送例)
通信制御機器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 data FIFO 127, the communication control device 10 first determines whether the normal descriptor Dco(0) stored at the head of the first descriptor FIFO 125 is rejected.

具体的には、先ず、読込部123は、第一ディスクリプタFIFO125の先頭に格納された通常ディスクリプタDco(0)を読み込み、通常ディスクリプタDco(0)に規定されている開始アドレスAs(0)を、判定部124に通知する。 Specifically, first, the reading unit 123 reads the normal descriptor Dco(0) stored at the beginning of the first descriptor FIFO 125, and notifies the determination unit 124 of the start address As(0) defined in the normal descriptor Dco(0).

判定部124は、開始アドレスAs(0)が、予め設定しておいた標準受信領域Rgo内にあるかを判定する(第一判定FJ)。 The determination unit 124 determines whether the start address As(0) is within the standard reception area Rgo that has been set in advance (first determination FJ).

また、判定部124は、データDt(0)のデータサイズと、開始アドレスAs(0)とから、「通常ディスクリプタDco(0)に従ってデータDt(0)を転送した場合の転送後の領域」の末尾アドレスAe(0,0)を算出する。そして、通信制御機器10は、算出した末尾アドレスAe(0,0)が、予め設定しておいた標準受信領域Rgo内にあるかを判定する(第二判定SJ)。 The determination unit 124 also calculates the end address Ae(0,0) of the "area after transfer when data Dt(0) is transferred according to normal descriptor Dco(0)" from the data size of data Dt(0) and the start address As(0).The communication control device 10 then determines whether the calculated end address Ae(0,0) is within the standard receiving area Rgo that has been set in advance (second determination SJ).

判定部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 determination unit 124 determines that the normal descriptor Dco(0) is a "usable descriptor" for transferring data Dt(0). The address determination unit 122 notifies the DMAC 121 of the start address As(0) specified in the normal descriptor Dco(0) that the determination unit 124 has determined to be a "usable descriptor" for transferring data Dt(0).

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 address determination unit 122. DMAC121 transfers data Dt(0) to an area in main memory 20 whose starting address is the "start address As(0) specified in normal descriptor Dco(0), which is the 'available descriptor' for transferring data Dt(0)."

DMAC121は、データDt(0)のメインメモリ20への転送を完了すると、メインメモリ20中の通常ディスクリプタDco(0)をライトバックディスクリプタで上書きする。その結果、メインメモリ20中の通常ディスクリプタDco(0)には、「データDt(0)のデータサイズを示す情報」と、「データDt(0)の転送に用いられたことを示す情報」とが追記される。 When DMAC 121 completes the transfer of data Dt(0) to main memory 20, it overwrites normal descriptor Dco(0) in main memory 20 with a write-back descriptor. As a result, "information indicating the data size of data Dt(0)" and "information indicating that it has been used to transfer data Dt(0)" are added to normal descriptor Dco(0) in main memory 20.

(次のデータの転送例)
通信制御機器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 communication control device 10 determines whether to reject the normal descriptor Dco(1) stored next to the normal descriptor Dco(0) in the first descriptor FIFO 125. In other words, the communication control device 10 determines whether to reject the normal descriptor Dco(1), which is the first of the normal descriptors Dco stored in the first descriptor FIFO 125 and for which rejection has not been determined.

具体的には、先ず、読込部123は、通常ディスクリプタDco(1)を読み込み、通常ディスクリプタDco(1)に規定されている開始アドレスAs(1)を、判定部124に通知する。 Specifically, first, the reading unit 123 reads the normal descriptor Dco(1) and notifies the determination unit 124 of the start address As(1) defined in the normal descriptor Dco(1).

判定部124は、開始アドレスAs(1)が、予め設定しておいた標準受信領域Rgo内にあるかを判定する(第一判定FJ)。 The determination unit 124 determines whether the start address As(1) is within the standard reception area Rgo that has been set in advance (first determination FJ).

また、判定部124は、データDt(1)のデータサイズと、開始アドレスAs(1)とから、「通常ディスクリプタDco(1)に従ってデータDt(1)を転送した場合の転送後の領域」の末尾アドレスAe(1,1)を算出する。そして、通信制御機器10は、算出した末尾アドレスAe(1,1)が、予め設定しておいた標準受信領域Rgo内にあるかを判定する(第二判定SJ)。 The determination unit 124 also calculates the end address Ae(1,1) of the "area after transfer when data Dt(1) is transferred according to normal descriptor Dco(1)" from the data size of data Dt(1) and the start address As(1).The communication control device 10 then determines whether the calculated end address Ae(1,1) is within the standard receiving area Rgo that has been set in advance (second determination SJ).

図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 CPU 30 intended to set in the normal descriptor Dco(1).

判定部124は、開始アドレスAs(1)が標準受信領域Rgo内にないことを確認すると、通常ディスクリプタDco(1)を「利用不能なディスクリプタ」であると判定する。判定部124は、この判定結果を、CPU30に通知することなく、読込部123に通知する。 When the determination unit 124 confirms that the start address As(1) is not within the standard receiving area Rgo, it determines that the normal descriptor Dco(1) is an "unavailable descriptor." The determination unit 124 notifies the reading unit 123 of this determination result without notifying the CPU 30.

通常ディスクリプタDco(1)が「利用不能なディスクリプタ」であるとの判定結果を通知された読込部123は、第一ディスクリプタFIFO125において通常ディスクリプタDco(1)の次に格納されている通常ディスクリプタDco(2)を読み込む。そして、読込部123は、読み込んだ通常ディスクリプタDco(2)に規定されている開始アドレスAs(2)を、判定部124に通知する。 The reading unit 123, which has been notified of the determination result that the normal descriptor Dco(1) is an "unavailable descriptor," reads the normal descriptor Dco(2) stored next to the normal descriptor Dco(1) in the first descriptor FIFO 125. The reading unit 123 then notifies the determination unit 124 of the start address As(2) defined in the read normal descriptor Dco(2).

判定部124は、開始アドレスAs(2)が、予め設定しておいた標準受信領域Rgo内にあるかを判定する(第一判定FJ)。 The determination unit 124 determines whether the start address As(2) is within the standard reception area Rgo that has been set in advance (first determination FJ).

また、判定部124は、データDt(1)のデータサイズと、開始アドレスAs(2)とから、「通常ディスクリプタDco(2)に従ってデータDt(1)を転送した場合の転送後の領域」の末尾アドレスAe(1,2)を算出する。そして、通信制御機器10は、算出した末尾アドレスAe(1,2)が、予め設定しておいた標準受信領域Rgo内にあるかを判定する(第二判定SJ)。 The determination unit 124 also calculates the end address Ae(1,2) of the "area after transfer when data Dt(1) is transferred according to normal descriptor Dco(2)" from the data size of data Dt(1) and the start address As(2).The communication control device 10 then determines whether the calculated end address Ae(1,2) is within the standard receiving area Rgo that has been set in advance (second determination SJ).

判定部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 determination unit 124 determines that the normal descriptor Dco(2) is an "available descriptor" for the transfer of data Dt(1). The address determination unit 122 notifies the DMAC 121 of the start address As(2) specified in the normal descriptor Dco(2) that the determination unit 124 has determined to be an "available descriptor" for the transfer of data Dt(1).

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 address determination unit 122. DMAC121 transfers data Dt(1) to an area in main memory 20 whose starting address is the "start address As(2) specified in normal descriptor Dco(2), which is an 'available descriptor' for transferring data Dt(1)."

DMAC121は、データDt(1)のメインメモリ20への転送を完了すると、メインメモリ20中の通常ディスクリプタDco(2)をライトバックディスクリプタで上書きする。その結果、メインメモリ20中の通常ディスクリプタDco(2)には、「データDt(1)のデータサイズを示す情報」と、「データDt(1)の転送に用いられたことを示す情報」とが追記される。 When DMAC 121 completes the transfer of data Dt(1) to main memory 20, it overwrites normal descriptor Dco(2) in main memory 20 with a write-back descriptor. As a result, "information indicating the data size of data Dt(1)" and "information indicating that it has been used to transfer data Dt(1)" are added to normal descriptor Dco(2) in main memory 20.

(通常ディスクリプタの個数について)
ここで一般に、或る情報(例えば、数メガバイト(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 CPU 30 does not calculate how many pieces of data Dt the certain piece of information will be transmitted as.

その代わりに、一般に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 CPU 30 sets in advance in the main memory 20 a number of normal descriptors Dco that is sufficiently larger than the number of data Dt that the PLC 1 should receive for each control period Cc, for example, before the PLC 1 receives the data Dt. Then, the normal descriptors Dco set in the main memory 20 by the CPU 30 are stored in the first descriptor FIFO 125 by the DMAC 121.

そのため、データFIFO127に格納されているデータDtの個数に比して、第一ディスクリプタFIFO125に格納されている通常ディスクリプタDcoの個数は、十分に多い。したがって、アドレス決定部122(特に、判定部124)は、転送すべきデータDtの個数に比して十分多い個数の通常ディスクリプタDcoの中から、データDtの転送に「利用可能なディスクリプタ」を選択することができる。 Therefore, the number of normal descriptors Dco stored in the first descriptor FIFO 125 is sufficiently large compared to the number of data Dt stored in the data FIFO 127. Therefore, the address determination unit 122 (particularly the judgment unit 124) can select "available descriptors" for transferring the data Dt from among the number of normal descriptors Dco that is sufficiently large compared to the number of data Dt to be transferred.

(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 DMAC 121 completes the transfer of the data Dt, it overwrites the normal descriptor Dco in the main memory 20 corresponding to the normal descriptor Dco used in the transfer with a write-back descriptor. As a result, "information indicating the data size of the data Dt" and "information indicating that it has been used in the transfer of the data Dt" are added to the normal descriptor Dco in the main memory 20 corresponding to the normal descriptor Dco used in the transfer.

したがって、CPU30は、「データDtの転送に用いられたことを示す情報」を参照することによって、メインメモリ20中の通常ディスクリプタDcoについて、その許否を把握することができる。 Therefore, the CPU 30 can determine whether the normal descriptor Dco in the main memory 20 is permitted or not by referring to the "information indicating that it has been used to transfer the data Dt."

例えば、DMAC121は、転送に用いられた通常ディスクリプタDcoに対応する、メインメモリ20中の通常ディスクリプタDcoについて、通常ディスクリプタDco中の項目の一つである「結果フラグ」を、「0」から「1」へと更新する。CPU30は、「結果フラグ」によって、メインメモリ20中の通常ディスクリプタDcoの内、どの通常ディスクリプタDcoが転送に用いられ、どの通常ディスクリプタDcoが転送に用いられなかったかを把握することができる。 For example, the DMAC 121 updates the "result flag," which is one of the items in the normal descriptor Dco in the main memory 20 that corresponds to the normal descriptor Dco used in the transfer, from "0" to "1." The CPU 30 can determine from the "result flag" which of the normal descriptors Dco in the main memory 20 were used in the transfer and which were not used in the transfer.

また、DMAC121は、転送に用いられなかった通常ディスクリプタDcoに対応する、メインメモリ20中の通常ディスクリプタDcoについて、通常ディスクリプタDco中の項目の一つである「破棄フラグ」を、「0」から「1」へと更新してもよい。CPU30は、「破棄フラグ」によって、メインメモリ20中の通常ディスクリプタDcoの内、データDtの転送に用いられなかった通常ディスクリプタDcoを把握することができる。 Furthermore, DMAC 121 may update the "discard flag," which is one of the items in the normal descriptor Dco, from "0" to "1" for the normal descriptor Dco in main memory 20 that corresponds to the normal descriptor Dco that was not used in the transfer. The "discard flag" allows CPU 30 to identify the normal descriptor Dco in main memory 20 that was not used in the transfer of data Dt.

(『退避用ディスクリプタを「利用可能なディスクリプタ」として用いる』例)
図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 communication control device 10 reads the save descriptor Dce and transfers the data Dt to the main memory 20 in accordance with the save descriptor Dce. The communication control device 10 (particularly, the DMAC 121) executes the following process when the error count Ct, which is the number of normal descriptors Dco determined by the determination unit 124 to be "unavailable descriptors," exceeds a preset reference count Nr. That is, when the error count Ct exceeds the reference count Nr, the DMAC 121 transfers the data Dt to an area whose leading address is the start address As defined in the save descriptor Dce.

図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 data FIFO 127 in a FIFO manner. Furthermore, normal descriptors Dco(0), Dco(1), Dco(2), ..., Dco(N) are pre-stored in the first descriptor FIFO 125. Furthermore, a save descriptor Dce(Z) is pre-stored in the second descriptor FIFO 126. Furthermore, the reference number Nr is preset to "0" by the CPU 30.

(先頭のデータの転送例)
図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 communication control device 10 when transferring data Dt(0) is similar to the process exemplified in Fig. 3. That is, in order to transfer data Dt(0) stored at the head of the data FIFO 127, the communication control device 10 first determines whether to reject the normal descriptor Dco(0) stored at the head of the first descriptor FIFO 125, as in the example shown in Fig. 3. That is, the determination unit 124 executes a first determination FJ and a second determination SJ on the normal descriptor Dco(0).

判定部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 determination unit 124 determines that the normal descriptor Dco(0) is a "usable descriptor" for transferring data Dt(0). The address determination unit 122 notifies the DMAC 121 of the start address As(0) specified in the normal descriptor Dco(0) that the determination unit 124 has determined to be a "usable descriptor" for transferring data Dt(0).

DMAC121は、アドレス決定部122から通知された開始アドレスAs(0)を先頭アドレスとするメインメモリ20中の領域に、データDt(0)を転送する。 The DMAC 121 transfers the data Dt(0) to an area in the main memory 20 whose leading address is the start address As(0) notified by the address determination unit 122.

DMAC121は、データDt(0)のメインメモリ20への転送を完了すると、メインメモリ20中の通常ディスクリプタDco(0)をライトバックディスクリプタで上書きする。 When DMAC 121 completes the transfer of data Dt(0) to main memory 20, it overwrites the normal descriptor Dco(0) in main memory 20 with a write-back descriptor.

(次のデータの転送例)
通信制御機器10は、データDt(1)を転送するために、第一ディスクリプタFIFO125に格納されており、かつ、その拒否を判定していない通常ディスクリプタDcoの先頭である、通常ディスクリプタDco(1)の拒否を判定する。すなわち、判定部124は、通常ディスクリプタDco(1)に対して、第一判定FJおよび第二判定SJを実行する。
(Example of data transfer)
In order to transfer data Dt(1), the communication control device 10 determines whether to reject the normal descriptor Dco(1), which is stored in the first descriptor FIFO 125 and is the first of the normal descriptors Dco for which rejection has not been determined. That is, the determination unit 124 executes the first determination FJ and the second determination SJ for the normal descriptor Dco(1).

図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 determination unit 124 confirms that the start address As(1) is not within the standard receiving area Rgo, and determines that the normal descriptor Dco(1) is an "unavailable descriptor." The determination unit 124 notifies the reading unit 123 of this determination result without notifying the CPU 30.

通常ディスクリプタDco(1)が「利用不能なディスクリプタ」であるとの判定結果を通知された読込部123は、以下の処理を実行する。すなわち、読込部123は、判定部124によって「利用不能なディスクリプタ」であると判定された通常ディスクリプタDcoの個数であるエラー個数Ctが、基準個数Nrを超えたか否かを判定する。 The reading unit 123, which has been notified of the result of the determination that the normal descriptor Dco(1) is an "unavailable descriptor," executes the following process. That is, the reading unit 123 determines whether the error count Ct, which is the number of normal descriptors Dco that have been determined by the determination unit 124 to be "unavailable descriptors," exceeds the reference count Nr.

前述の通り、図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 determination unit 124 determines that the normal descriptor Dco(1) is an "unavailable descriptor", the error number Ct, which is the number of normal descriptors Dco that the determination unit 124 has determined to be "unavailable descriptors", is "1".

そのため、読込部123は、「エラー個数Ctが基準個数Nrを超えた」と判定する。そして、「エラー個数Ctが基準個数Nrを超えた」と判定した読込部123は、第二ディスクリプタFIFO126に格納されている退避用ディスクリプタDce(Z)を読み込む。 Therefore, the reading unit 123 determines that "the number of errors Ct has exceeded the reference number Nr." Then, the reading unit 123, which has determined that "the number of errors Ct has exceeded the reference number Nr," reads the evacuation descriptor Dce(Z) stored in the second descriptor FIFO 126.

アドレス決定部122は、読込部123によって読み込まれた退避用ディスクリプタDce(Z)に規定されている開始アドレスAs(Z)を、DMAC121に通知する。 The address determination unit 122 notifies the DMAC 121 of the start address As(Z) defined in the save descriptor Dce(Z) read by the reading unit 123.

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 address determination unit 122. DMAC121 transfers data Dt(0) to an area in main memory 20 whose starting address is the "start address As(Z) specified in the save descriptor Dce(Z), which is the 'available descriptor' for transferring data Dt(1)."

DMAC121は、データDt(1)のメインメモリ20への転送を完了すると、メインメモリ20中の退避用ディスクリプタDce(Z)をライトバックディスクリプタで上書きする。その結果、メインメモリ20中の退避用ディスクリプタDce(Z)には、「データDt(1)のデータサイズを示す情報」と、「データDt(1)の転送に用いられたことを示す情報」とが追記される。 When DMAC 121 completes the transfer of data Dt(1) to main memory 20, it overwrites the save descriptor Dce(Z) in main memory 20 with a write-back descriptor. As a result, "information indicating the data size of data Dt(1)" and "information indicating that it has been used to transfer data Dt(1)" are added to the save descriptor Dce(Z) in main memory 20.

(退避用ディスクリプタによって規定される転送領域について)
図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 CPU 30 executes processing using data Dt(1), naturally CPU 30 will not be able to execute processing using data Dt(1).

このような事象を回避するためには、例えば、「データ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 communication control device 10. Fig. 5(A) is similar to Fig. 8(A), and is a diagram for explaining the time required from determining whether or not the descriptor Dc is permissible until the data Dt is transferred, for a conventional communication control device that transfers data Dt to the main memory 20 in accordance with the descriptor Dc.

従来までの通信制御機器は、或るディスクリプタ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 30 to rewrite "a certain descriptor Dc(X) that specifies an abnormal address" to "a certain descriptor Dc(X') that specifies a correct address."

そのため、従来までの通信制御機器は、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 communication control device 10 to transfer data Dt after determining whether or not the descriptor Dc is acceptable.

通信制御機器10は、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」であると判定すると、別のディスクリプタDc(Y)を「利用可能なディスクリプタ」として用いて、データDtの転送を実行する。そのため、図5の(B)に示すように、通信制御機器10は、ディスクリプタDcの開始アドレスAs等の異常を検知してから、データDtの転送を実行するまでの間に、CPU30によるディスクリプタDcの再設定処理の完了を待つ必要がない。 When the communication control device 10 determines that a certain normal descriptor Dco (X) is an "unavailable descriptor," it uses another descriptor Dc (Y) as an "available descriptor" to transfer the data Dt. Therefore, as shown in FIG. 5B, the communication control device 10 does not need to wait for the completion of the reconfiguration process of the descriptor Dc by the CPU 30 between detecting an abnormality in the start address As of the descriptor Dc and executing the transfer of the data Dt.

ここで、例えば、或る通常ディスクリプタ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 communication control device 10 is configured with a hardware logic circuit, the difference between time T(X) and time T(Y) can be made small enough to be negligible. In other words, even if the communication control device 10 has to use another descriptor Dc(Y) to transfer data because a certain normal descriptor Dco(X) is an "unavailable descriptor," it can transfer data Dt in approximately the same time as time T(X).

(通信制御機器についての整理)
これまでに図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 communication control device 10 is a communication control device that transfers data Dt received from the network 3 to the main memory 20. The communication control device 10 includes a reading unit 123, a determination unit 124, and a DMAC 121 (transfer unit).

読込部123は、データDtを格納すべき領域の開始アドレスAsを規定するディスクリプタDcを読み込む。 The reading unit 123 reads a descriptor Dc that specifies the starting address As of the area in which the data Dt should be stored.

判定部124は、読込部123によって読み込まれたディスクリプタDcに規定されている開始アドレスAsが、メインメモリ20においてデータDtを格納可能な領域として予め設定された領域である標準受信領域Rgo(許可領域)内にあるかを判定する。判定部124は、開始アドレスAsが標準受信領域Rgo内にあると、読込部123によって読み込まれたディスクリプタDcを「利用可能である」と判定する。 The determination unit 124 determines whether the start address As defined in the descriptor Dc read by the reading unit 123 is within the standard receiving area Rgo (permitted area), which is an area that is preset in the main memory 20 as an area in which data Dt can be stored. If the start address As is within the standard receiving area Rgo, the determination unit 124 determines that the descriptor Dc read by the reading unit 123 is "available."

DMAC121は、読込部123によって読み込まれたディスクリプタDcに規定されている開始アドレスAsを先頭アドレスとする領域に、データDtを転送する。 The DMAC 121 transfers the data Dt to an area whose leading address is the start address As defined in the descriptor Dc read by the reading unit 123.

通信制御機器10において、ディスクリプタDcは予め複数用意されている。そして、読込部123は、予め複数用意されたディスクリプタDcの中から先ず、例えば第一のディスクリプタDc(X)(特に、第一の通常ディスクリプタDco(X))を読み込む。 In the communication control device 10, a plurality of descriptors Dc are prepared in advance. The reading unit 123 first reads, for example, a first descriptor Dc(X) (particularly, a first normal descriptor Dco(X)) from among the plurality of descriptors Dc prepared in advance.

(A)DMAC121は、第一のディスクリプタDc(X)が、判定部124によって「利用可能である」と判定されると、以下の転送を実行する。すなわち、DMAC121は、第一のディスクリプタDc(X)に規定されている開始アドレスAs(X)を先頭アドレスとする領域に、データDtを転送する。 (A) When the determination unit 124 determines that the first descriptor Dc(X) is "available," the DMAC 121 executes the following transfer. That is, the DMAC 121 transfers data Dt to an area whose top address is the start address As(X) defined in the first descriptor Dc(X).

(B)DMAC121は、第一のディスクリプタDc(X)が判定部124によって「利用可能でない」と判定されると、以下の転送を実行する。すなわち、DMAC121は、予め複数用意されたディスクリプタDcの内、読込部123によって第一のディスクリプタDc(X)よりも後に読み込まれた第二のディスクリプタDc(Y)に従って、データDtを転送する。具体例には、DMAC121は、第二のディスクリプタDc(Y)に規定されている開始アドレスAs(Y)を先頭アドレスとする領域に、データDtを転送する。 (B) When the determination unit 124 determines that the first descriptor Dc(X) is "unavailable," the DMAC 121 executes the following transfer. That is, the DMAC 121 transfers the data Dt according to the second descriptor Dc(Y) that was read by the reading unit 123 after the first descriptor Dc(X) among the multiple descriptors Dc prepared in advance. As a specific example, the DMAC 121 transfers the data Dt to an area whose leading address is the start address As(Y) defined in the second descriptor Dc(Y).

前記の構成によれば、通信制御機器10は、予め複数用意されたディスクリプタDcの中から読み込んだ第一のディスクリプタDc(X)を「利用可能である」と判定すると、第一のディスクリプタDc(X)に従って、データDtを転送する。具体例には、通信制御機器10は、第一のディスクリプタDc(X)の規定する開始アドレスAs(X)を先頭アドレスとする領域にデータDtを転送する。 According to the above configuration, when the communication control device 10 determines that the first descriptor Dc(X) read from among the multiple descriptors Dc prepared in advance is "available," it transfers the data Dt according to the first descriptor Dc(X). As a specific example, the communication control device 10 transfers the data Dt to an area whose leading address is the start address As(X) specified by the first descriptor Dc(X).

また、通信制御機器10は、第一のディスクリプタDc(X)を「利用可能でない」と判定すると、予め複数用意されたディスクリプタDcの中からさらに、第二のディスクリプタDc(Y)を読み込む。そして、通信制御機器10は、第二のディスクリプタDc(Y)の規定する開始アドレスAs(Y)を先頭アドレスとする領域に、データDtを転送する。 Furthermore, when the communication control device 10 determines that the first descriptor Dc(X) is "unavailable," it further reads the second descriptor Dc(Y) from among the multiple descriptors Dc prepared in advance. Then, the communication control device 10 transfers the data Dt to an area whose top address is the start address As(Y) specified by the second descriptor Dc(Y).

つまり、通信制御機器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 communication control device 10 determines that the start address As(X) specified by the first descriptor Dc(X) that it has read is not within the standard receiving area Rgo, it does not notify the CPU 30 or the like of the result of this determination. Even if it determines that the start address As(X) is not within the standard receiving area Rgo, the communication control device 10 does not cause the CPU 30 or the like to reset the first descriptor Dc(X) to the correct one. When the communication control device 10 determines that the start address As(X) specified by the first descriptor Dc(X) is not within the standard receiving area Rgo, it further reads the second descriptor Dc(Y) that has been prepared in advance. Then, the communication control device 10 transfers the data Dt to the main memory 20 according to the second descriptor Dc(Y) that it has read.

通信制御機器10は、予め複数用意されたディスクリプタDcの中からデータDtの転送に「利用可能なディスクリプタ」を選択し、選択した「利用可能なディスクリプタ」に従って、データDtを転送する。 The communication control device 10 selects an "available descriptor" for transferring data Dt from among a plurality of descriptors Dc prepared in advance, and transfers data Dt according to the selected "available descriptor."

そのため、通信制御機器10は、ディスクリプタDcによる誤ったデータ転送を防止することができる。また、通信制御機器10は、データDtの転送に「利用可能なディスクリプタ」をCPU30等に再設定させる場合に比べて、データDtの転送に要する時間を短縮することができる。 Therefore, the communication control device 10 can prevent erroneous data transfer using the descriptor Dc. Furthermore, the communication control device 10 can reduce the time required to transfer the data Dt, compared to when the CPU 30 or the like is caused to reset the "available descriptor" for the transfer of the data Dt.

つまり、通信制御機器10は、ディスクリプタDcによる誤ったデータ転送を防止しつつ、ネットワーク3から受信したデータDtを高速にメインメモリ20へと転送することができるとの効果を奏する。 In other words, the communication control device 10 has the effect of being able to transfer data Dt received from the network 3 to the main memory 20 at high speed while preventing erroneous data transfer due to the descriptor Dc.

特に、「読み込んだディスクリプタ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 network 3. Therefore, the communication control device 10 can perform processing to prevent "erroneous data transfer by the descriptor Dc" before receiving the data Dt.

通信制御機器10は、「ディスクリプタDcによる誤ったデータ転送」を防止するための処理をデータDtの受信前に実行しておくことで、データDtを受信してからデータDtをメインメモリ20へと転送するまでの時間を短縮できるという効果を奏する。 The communication control device 10 performs processing to prevent "erroneous data transfer using the descriptor Dc" before receiving the data Dt, thereby achieving the effect of shortening the time from receiving the data Dt to transferring the data Dt to the main memory 20.

ここで、通信制御機器10は、NIC(Network Interface Card、ネットワーク・インターフェイス・カード)として実現されるのが望ましい。通信制御機器10は、典型的には、FPGA(Field-Programmable gate array)またはASIC(Application Specific Integrated Circuit)等のハードウェアによる論理回路で構成される。 Here, it is preferable that the communication control device 10 is realized as a NIC (Network Interface Card). The communication control device 10 is typically configured with a hardware logic circuit such as an FPGA (Field-Programmable gate array) or an ASIC (Application Specific Integrated Circuit).

ディスクリプタDcの拒否を判定する通信制御機器10を、ハードウェアによる論理回路で構成した場合、以下の効果を実現することができる。すなわち、一般的に、処理内容が同じであれば、ハードウェアによる処理の方が、ソフトウェア(具体的には、CPU)による処理よりも、高速で実行することができる。そのため、ハードウェアによる論理回路で構成された通信制御機器10は、CPU30等にディスクリプタDcの拒否を判定させる場合に比べて高速に、ディスクリプタDcの拒否を判定することができるとの効果を奏する。 When the communication control device 10 that determines whether to reject the descriptor Dc is configured with a hardware logic circuit, the following effects 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 10 configured with a hardware logic circuit has the effect of being able to determine whether to reject the descriptor Dc faster than when the CPU 30 or the like is made to determine whether to reject the descriptor Dc.

特に、通信制御機器10は、CPU30等によるディスクリプタDcの再設定を必要とせずに、予め複数用意されたディスクリプタDcの中から、データDtの転送に「利用可能なディスクリプタ」を選択し、選択したディスクリプタDcに従って転送を実行する。 In particular, the communication control device 10 selects an "available descriptor" for transferring data Dt from among a plurality of descriptors Dc prepared in advance, without requiring the CPU 30 or the like to reconfigure the descriptor Dc, and executes the transfer according to the selected descriptor Dc.

ハードウェアによる論理回路で構成した場合、通信制御機器10は、データDtの転送に「利用可能なディスクリプタ」を予め複数用意されたディスクリプタDcの中から選択する処理を極めて高速に実行することができる。また、ハードウェアによる論理回路で構成した場合、通信制御機器10は、予め複数用意されたディスクリプタDcの中から選択したディスクリプタDcに従って、極めて高速に転送を実行することができる。 When configured with a hardware logic circuit, the communication control device 10 can extremely quickly execute the process of selecting an "available descriptor" for transferring data Dt from among a plurality of descriptors Dc prepared in advance. Also, when configured with a hardware logic circuit, the communication control device 10 can extremely quickly execute the transfer according to the descriptor Dc selected from a plurality of descriptors Dc prepared in advance.

したがって、通信制御機器10をハードウェアによる論理回路で構成した場合、通信制御機器10は、ディスクリプタDcによる誤ったデータDt転送を防止しつつ、ネットワーク3から受信したデータDtを極めて高速に転送することができるとの効果を奏する。 Therefore, when the communication control device 10 is configured with a hardware logic circuit, the communication control device 10 has the effect of being able to transfer data Dt received from the network 3 at extremely high speeds while preventing erroneous data Dt transfer due to the descriptor Dc.

通信制御機器10において、判定部124は、以下の2つの条件が共に満たされる場合に、読込部123によって読み込まれたディスクリプタDcを「利用可能である」と判定する。すなわち、判定部124は、(A)ディスクリプタDcの規定する開始アドレスAsが、標準受信領域Rgo内にあるという条件と、(B)末尾アドレスAeが標準受信領域Rgo内にあるという条件とが共に満たされる場合に、「利用可能である」と判定する。 In the communication control device 10, the determination unit 124 determines that the descriptor Dc read by the reading unit 123 is "available" if both of the following two conditions are satisfied. That is, the determination unit 124 determines that the descriptor Dc is "available" if both of the following conditions are satisfied: (A) the start address As specified by the descriptor Dc is within the standard reception area Rgo, and (B) the end address Ae is within the standard reception area Rgo.

末尾アドレス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 reading unit 123. The end address Ae is calculated from the data size of the received data Dt and the start address As specified by the descriptor Dc read by the reading unit 123.

前記の構成によれば、通信制御機器10は、受信したデータDtのデータサイズと、読込部123によって読み込まれたディスクリプタDcの規定する開始アドレスAsとから、末尾アドレスAeを算出する。そして、通信制御機器10は、「読み込んだディスクリプタDcの規定する開始アドレスAsが標準受信領域Rgo内にあり」、かつ、「末尾アドレスAeが標準受信領域Rgo内にある」と、読み込んだディスクリプタDcを「利用可能である」と判定する。 According to the above configuration, the communication control device 10 calculates the end address Ae from the data size of the received data Dt and the start address As specified by the descriptor Dc read by the reading unit 123. The communication control device 10 then determines that the read descriptor Dc is "available" because "the start address As specified by the read descriptor Dc is within the standard receiving area Rgo" and "the end address Ae is within the standard receiving area Rgo."

ここで、「読み込んだディスクリプタ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 communication control device 10 determines whether the read descriptor Dc is usable (i.e., whether the descriptor Dc is acceptable) by taking into consideration the data size of the received data Dt in addition to the start address As specified by the read descriptor Dc.

通信制御機器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 communication control device 10 can more accurately select an "available descriptor" for transferring the received data Dt from among a number of previously prepared descriptors Dc.

通信制御機器10は、予め取得した、標準受信領域Rgoの先頭アドレスと標準受信領域Rgoのデータサイズとから、標準受信領域Rgoを算出する。例えば、通信制御機器10は、CPU30から、標準受信領域Rgoの先頭アドレスと標準受信領域Rgoのデータサイズとを、予め取得しておく。 The communication control device 10 calculates the standard receiving area Rgo from the start address of the standard receiving area Rgo and the data size of the standard receiving area Rgo, which were previously acquired. For example, the communication control device 10 acquires the start address of the standard receiving area Rgo and the data size of the standard receiving area Rgo from the CPU 30 in advance.

前記の構成によれば、通信制御機器10は、標準受信領域Rgoの先頭アドレスと標準受信領域Rgoのデータサイズとを予め取得しておく。そして、通信制御機器10は、取得した標準受信領域Rgoの先頭アドレスと標準受信領域Rgoのデータサイズとから、標準受信領域Rgoを算出する。 According to the above configuration, the communication control device 10 acquires the start address of the standard receiving area Rgo and the data size of the standard receiving area Rgo in advance. Then, the communication control device 10 calculates the standard receiving area Rgo from the acquired start address of the standard receiving area Rgo and the data size of the standard receiving area Rgo.

したがって、通信制御機器10は、予め取得した、標準受信領域Rgoの先頭アドレスと標準受信領域Rgoのデータサイズとから、標準受信領域Rgoを算出することができるとの効果を奏する。 Therefore, the communication control device 10 has the effect of being able to calculate the standard receiving area Rgo from the starting address of the standard receiving area Rgo and the data size of the standard receiving area Rgo, which are previously obtained.

通信制御機器10は、第一ディスクリプタFIFO125(格納部)をさらに備えている。第一ディスクリプタFIFO125には、「データDtを受信しようとする都度(例えば、制御周期Ccごとに)、データDtを受信する前にメインメモリ20に設定されるディスクリプタDc」である通常ディスクリプタDcoが格納される。 The communication control device 10 further includes a first descriptor FIFO 125 (storage unit). The first descriptor FIFO 125 stores a normal descriptor Dco, which is a "descriptor Dc that is set in the main memory 20 before receiving data Dt each time data Dt is to be received (e.g., every control period Cc)."

データ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 reading unit 123 when transferring data Dt and that is first judged as to whether it is correct or not by the judgment unit 124 is the normal descriptor Dco stored in the first descriptor FIFO 125. For example, the first descriptor Dc(X) that is read first by the reading unit 123 when transferring data Dt and that is first judged as to whether it is correct or not by the judgment unit 124 is the normal descriptor Dco(X).

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 reading unit 123 after the first descriptor Dc(X) (i.e., normal descriptor Dco(X)). In other words, the normal descriptor Dco(Y) is a normal descriptor Dco that follows the normal descriptor Dco(X) and is a succeeding descriptor Dc of the normal descriptor Dco(X).

通常ディスクリプタDco(Y)が判定部124によって「利用可能である」と判定されると、DMAC121は、通常ディスクリプタDco(Y)を「利用可能なディスクリプタ」として、通常ディスクリプタDco(Y)に従って転送を実行する。具体的には、DMAC121は、通常ディスクリプタDco(Y)に規定されている開始アドレスAs(Y)を先頭アドレスとする領域に、データDtを転送する。 When the determination unit 124 determines that the normal descriptor Dco(Y) is "available," the DMAC 121 performs a transfer according to the normal descriptor Dco(Y), treating the normal descriptor Dco(Y) as an "available descriptor." Specifically, the DMAC 121 transfers data Dt to an area whose top address is the start address As(Y) specified in the normal descriptor Dco(Y).

例えば、通常ディスクリプタ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 DMAC 121 executes the following transfer. That is, the DMAC 121 transfers the data Dt according to the normal descriptor Dco(Q) that is read after the normal descriptor Dco(P) by the reading unit 123 and that is determined to be "available" by the determining unit 124.

例えば、通常ディスクリプタ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 unit 123 after normal descriptor Dco(Q) and that is determined by determination unit 124 to be "available."

前記の構成によれば、通信制御機器10は、第一ディスクリプタFIFO125に格納された通常ディスクリプタDco(X)を「利用可能である」と判定すると、通常ディスクリプタDco(X)に従って転送を実行する。具体的には、通信制御機器10は、「利用可能である」と判定した通常ディスクリプタDco(X)の規定する開始アドレスAs(X)を先頭アドレスとする領域に、データDtを転送する。 According to the above configuration, when the communication control device 10 determines that the normal descriptor Dco(X) stored in the first descriptor FIFO 125 is "available," it executes a transfer according to the normal descriptor Dco(X). Specifically, the communication control device 10 transfers data Dt to an area whose leading address is the start address As(X) specified by the normal descriptor Dco(X) determined to be "available."

また、通信制御機器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 communication control device 10 determines that the normal descriptor Dco(X) is "unavailable" and determines that the normal descriptor Dco(Y) is "available," it executes a transfer according to the normal descriptor Dco(Y). For example, when the communication control device 10 determines that the normal descriptor Dco(X) is "unavailable," it further reads the normal descriptor Dco(Y), which is the following descriptor Dc stored in the first descriptor FIFO 125. Then, when the communication control device 10 determines that the read normal descriptor Dco(Y) is "available," it transfers the data Dt to an area whose leading address is the start address As(Y) specified by the normal descriptor Dco(Y).

ここで一般に、或る情報(例えば、数メガバイト(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 CPU 30 or the like sets a sufficient number of normal descriptors Dco in the main memory 20 in advance, before receiving the data Dt, in comparison with the number of data Dt to be received from the network 3.

そして、CPU30等によってメインメモリ20に設定された通常ディスクリプタDcoは、第一ディスクリプタFIFO125に格納される。そのため、ネットワーク3から受信すべきデータDtの個数に比して、第一ディスクリプタFIFO125に格納されている通常ディスクリプタDcoの個数は、十分に多い。 The normal descriptor Dco set in the main memory 20 by the CPU 30 or the like is stored in the first descriptor FIFO 125. Therefore, the number of normal descriptors Dco stored in the first descriptor FIFO 125 is sufficiently large compared to the number of pieces of data Dt to be received from the network 3.

したがって、通信制御機器10は、転送すべきデータDtの個数に比して十分多い個数の通常ディスクリプタDcoの中から、データDtの転送に「利用可能なディスクリプタ」を選択することができるとの効果を奏する。 Therefore, the communication control device 10 has the effect of being able to select "available descriptors" for transferring data Dt from among a number of normal descriptors Dco that is sufficiently greater than the number of data Dt to be transferred.

通信制御機器10は、第一ディスクリプタFIFO125とは異なる第二ディスクリプタFIFO126をさらに備えている。通信制御機器10において、エラー個数Ctが、予め設定された基準個数Nrを超えると、読込部123は、第二ディスクリプタFIFO126に予め格納されているディスクリプタDcである退避用ディスクリプタDceを読み込む。DMAC121は、読込部123によって読み込まれた退避用ディスクリプタDceを、データDtの転送に「利用可能なディスクリプタ」として、退避用ディスクリプタDceに規定されている開始アドレスAsを先頭アドレスとする領域に、データDtを転送する。 The communication control device 10 further includes a second descriptor FIFO 126 different from the first descriptor FIFO 125. In the communication control device 10, when the number of errors Ct exceeds a preset reference number Nr, the reading unit 123 reads a save descriptor Dce, which is a descriptor Dc prestored in the second descriptor FIFO 126. The DMAC 121 regards the save descriptor Dce read by the reading unit 123 as an "available descriptor" for transferring data Dt, and transfers data Dt to an area whose leading address is the start address As specified in the save descriptor Dce.

エラー個数Ctは、第一ディスクリプタFIFO125に格納され、読込部123によって読み込まれた通常ディスクリプタDcoであって、判定部124によって「利用可能でない」と判定された通常ディスクリプタDcoの個数である。 The number of errors Ct is the number of normal descriptors Dco stored in the first descriptor FIFO 125 and read by the reading unit 123 that have been determined to be "unusable" by the determination unit 124.

前記の構成によれば、通信制御機器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 communication control device 10 reads the save descriptor Dce that is pre-stored in the second descriptor FIFO 126. Then, the communication control device 10 treats the save descriptor Dce as an "available descriptor" for transferring data Dt, and transfers the data Dt to an area whose top address is the start address As specified in the save descriptor Dce.

ここで、エラー個数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 first descriptor FIFO 125." In that case, it is impossible or takes a great deal of time to select an "available descriptor" from the "normal descriptors Dco stored in the first descriptor FIFO 125."

そこで、通信制御機器10は、エラー個数Ctが基準個数Nrを超えると、「第一ディスクリプタFIFO125に格納されている通常ディスクリプタDco」に代えて、退避用ディスクリプタDceに従って、データDtを転送する。 Therefore, when the number of errors Ct exceeds the reference number Nr, the communication control device 10 transfers the data Dt according to the backup descriptor Dce instead of the "normal descriptor Dco stored in the first descriptor FIFO 125."

したがって、通信制御機器10は、「第一ディスクリプタFIFO125に格納されている通常ディスクリプタDco」の全て、または、その大部分について、異常が発生している場合にも、データDtを確実かつ高速に転送することができるとの効果を奏する。 Therefore, the communication control device 10 has the effect of being able to reliably and quickly transfer data Dt even when an abnormality has occurred in all or most of the "normal descriptors Dco stored in the first descriptor FIFO 125."

通信制御機器10において、退避用ディスクリプタDceの規定する開始アドレスAsは、メインメモリ20においてデータDtを格納可能な領域であって、標準受信領域Rgoとは異なる領域(退避用受信領域Rge)内にある。 In the communication control device 10, the start address As specified by the save descriptor Dce is an area in the main memory 20 where data Dt can be stored, and is within an area (the save receiving area Rge) that is different from the standard receiving area Rgo.

前記の構成によれば、通信制御機器10は、退避用ディスクリプタDceに従ってデータDtをメインメモリ20へと転送する場合、以下の領域にデータDtを転送する。すなわち、通信制御機器10は、退避用ディスクリプタDceに従ってデータDtを、標準受信領域Rgoとは異なる領域である退避用受信領域Rgeへと転送する。言い換えれば、退避用ディスクリプタDceに従ってデータDtが転送される領域である退避用受信領域Rgeは、標準受信領域Rgoとは異なる。 According to the above configuration, when the communication control device 10 transfers data Dt to the main memory 20 in accordance with the save descriptor Dce, the communication control device 10 transfers the data Dt to the following area. That is, the communication control device 10 transfers the data Dt to the save receiving area Rge, which is an area different from the standard receiving area Rgo, in accordance with the save descriptor Dce. In other words, the save receiving area Rge, which is the area to which the data Dt is transferred in accordance with the save descriptor Dce, is different from the standard receiving area Rgo.

退避用ディスクリプタ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 first descriptor FIFO 125.

そして、上述のような事態を防ぐためには、例えば、「或るデータ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 communication control device 10 has the effect of being able to avoid a situation in which "data Dt(X) transferred according to the backup descriptor Dce is overwritten with data Dt(Y) transferred according to the normal descriptor Dco" without requiring complicated processing.

§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 communication control device 10 executes a process of identifying the standard receiving area Rgo before executing a data receiving process, which is a process of "determining the transfer destination (particularly, the start address As) of the received data Dt and transferring the data Dt to the determined transfer destination." In addition, the data receiving process executed by the communication control device 10 after identifying the standard receiving area Rgo includes two judgment processes, specifically, a first judgment process FJ and a second judgment process SJ.

図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 communication control device 10 identifies before executing the data receiving process. The communication control device 10 acquires information indicating the "start address of the standard receiving area Rgo" and information indicating the "data size of the standard receiving area Rgo" from the CPU 30 in advance. The communication control device 10 identifies the standard receiving area Rgo from the "start address of the standard receiving area Rgo" and the "data size of the standard receiving area Rgo" acquired from the CPU 30, as shown in Figure 6 (A).

図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 communication control device 10.

第一判定処理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 reading unit 123 is within the standard receiving area Rgo." The determination unit 124 can execute the first determination process FJ after the normal descriptor Dco is set in the main memory 20 by the CPU 30. More precisely, the determination unit 124 can execute the first determination process FJ after the normal descriptor Dco set in the main memory 20 by the CPU 30 is stored in the first descriptor FIFO 125. In other words, the determination unit 124 can execute the first determination process FJ even before receiving the data Dt, as long as it is after the normal descriptor Dco is stored in the first descriptor FIFO 125.

これに対して、第二判定処理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 PLC 1 receives the data Dt, or more precisely, when the data Dt received by the PLC 1 is stored in the data FIFO 127, the determination unit 124 measures the data size of the data Dt. From the measured data size of the data Dt and the start address As specified in the normal descriptor Dco, the determination unit 124 calculates the end address Ae of the "area after transfer when the data Dt is transferred according to the normal descriptor Dco". Then, in the second determination process SJ, the determination unit 124 determines whether the end address Ae is within the standard receiving area Rgo.

ここで、第一判定処理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 communication control device 10. The address determination unit 122 sets the error count Ct, which is the number of normal descriptors Dco determined by the determination unit 124 to be "unavailable descriptors," to "0" (S110). The reading unit 123 refers to the first descriptor FIFO 125 and reads normal descriptors Dco whose validity has not yet been determined by the determination unit 124 (S120). The reading unit 123 notifies the determination unit 124 of the start address As defined in the read normal descriptor Dco. The determination unit 124 determines whether "the start address As notified by the reading unit 123 is within the standard reception area Rgo" (S130) (first determination process FJ).

判定部124によって「読込部123から通知された開始アドレスAsが、標準受信領域Rgo内にある」と判定されると(S130でYES)、通信制御機器10はデータDtを受信し(S140)、受信したデータDtをデータFIFO127に格納する。 When the determination unit 124 determines that "the start address As notified by the reading unit 123 is within the standard receiving area Rgo" (YES in S130), the communication control device 10 receives the data Dt (S140) and stores the received data Dt in the data FIFO 127.

データ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 data FIFO 127, the determination unit 124 measures the data size of the data Dt stored in the data FIFO 127. The determination unit 124 calculates the end address Ae of the "area after transfer when the data Dt is transferred according to the normal descriptor Dco" from the measured data size of the data Dt and the start address As notified by the reading unit 123 (S150). Then, the determination unit 124 determines whether "the end address Ae calculated in S140 is within the standard receiving area Rgo" (S160) (second determination process SJ).

判定部124によって「S140にて算出した末尾アドレスAeが、標準受信領域Rgo内にある」と判定されると(S160でYES)、アドレス決定部122は、以下の処理を実行する。すなわち、アドレス決定部122は、読込部123によって最後に読み込まれたディスクリプタDcに規定されている開始アドレスAsを、DMAC121に通知する。 When the determination unit 124 determines that "the end address Ae calculated in S140 is within the standard receiving area Rgo" (YES in S160), the address determination unit 122 executes the following process. That is, the address determination unit 122 notifies the DMAC 121 of the start address As defined in the descriptor Dc last read by the reading unit 123.

DMAC121は、読込部123が最後に読み込んだディスクリプタDcに従ってデータDtを転送する(S170)。つまり、DMAC121は、アドレス決定部122から通知された「読込部123によって最後に読み込まれたディスクリプタDcに規定されている開始アドレスAs」を先頭アドレスとするメインメモリ20中の領域に、データDtを転送する。 The DMAC 121 transfers the data Dt according to the descriptor Dc last read by the reading unit 123 (S170). That is, the DMAC 121 transfers the data Dt to an area in the main memory 20 whose top address is the "start address As specified in the descriptor Dc last read by the reading unit 123" notified by the address determination unit 122.

判定部124によって「読込部123から通知された開始アドレスAsが、標準受信領域Rgo内にない」と判定されると(S130でNO)、アドレス決定部122は、エラー個数Ctを「1」だけカウントアップする(S180)。読込部123は、S180で「1」だけカウントアップされたエラー個数Ctについて、「基準個数Nrを超えたか」を判定する(S190)。 When the determination unit 124 determines that "the start address As notified by the reading unit 123 is not within the standard receiving area Rgo" (NO in S130), the address determination unit 122 counts up the number of errors Ct by "1" (S180). The reading unit 123 determines whether the number of errors Ct counted up by "1" in S180 "exceeds the reference number Nr" (S190).

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 reading unit 123 reads the save descriptor Dce that is pre-stored in the second descriptor FIFO 126 (S200). Then, the address determination unit 122 notifies the DMAC 121 of the start address As defined in the descriptor Dc last read by the reading unit 123. In other words, the address determination unit 122 notifies the DMAC 121 of the start address As defined in the save descriptor Dce read by the reading unit 123 in S200.

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 reading unit 123 reads the next normal descriptor Dco stored in the first descriptor FIFO 125 (S210). That is, the reading unit 123 reads the first normal descriptor Dco among the normal descriptors Dco stored in the first descriptor FIFO 125 and whose validity has not yet been determined by the determination unit 124. The reading unit 123 notifies the determination unit 124 of the start address As defined in the normal descriptor Dco that was read. When the determination unit 124 is notified of the start address As defined in the normal descriptor Dco that was read by the reading unit 123 from the reading unit 123, the determination unit 124 executes the process of S130.

図7は、判定部124によって「読込部123から通知された開始アドレスAsが、標準受信領域Rgo内にある」と判定されてから、通信制御機器10がデータDtを受信する例を示している。しかしながら、通信制御機器10がデータDtを受信するタイミングが、判定部124によって「読込部123から通知された開始アドレスAsが、標準受信領域Rgo内にある」と判定された後であることは必須ではない。 Figure 7 shows an example in which the communication control device 10 receives data Dt after the determination unit 124 determines that "the start address As notified by the reading unit 123 is within the standard receiving area Rgo." However, it is not essential that the timing at which the communication control device 10 receives data Dt is after the determination unit 124 determines that "the start address As notified by the reading unit 123 is within the standard receiving area Rgo."

前述の通り、第一判定処理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 communication control device 10 receives data Dt after the determination unit 124 determines that "the start address As notified by the reading unit 123 is within the standard receiving area Rgo." In the first process FJ, it is sufficient for the determination unit 124 to find a normal descriptor Dco that determines that "the start address As is within the standard receiving area Rgo" from among the normal descriptors Dco read by the reading unit 123.

第一処理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 communication control device 10 receives the data Dt. For example, the communication control device 10 may receive the data Dt before the normal descriptor Dco whose "start address As is within the standard receiving area Rgo" is found in the first process FJ. For example, after the determination in S130 is "NO" for a certain descriptor Dc, the communication control device 10 may receive the data Dt before another descriptor Dc is read or before the determination in S130 is performed for another descriptor Dc.

これまで図7を用いて説明してきた通信制御機器10の実行する処理は、以下のように整理することができる。すなわち、通信制御機器10の実行する制御方法は、ネットワーク3から受信したデータDtをメインメモリ20へと転送する通信制御機器の制御方法である。前記制御方法は、読込ステップ(S120、S200、および、S210)と、判定ステップ(S130およびS160)と、転送ステップ(S170)とを含んでいる。 The process executed by the communication control device 10, which has been described using FIG. 7, can be summarized as follows. That is, the control method executed by the communication control device 10 is a communication control device control method for transferring data Dt received from the network 3 to the main memory 20. The control method includes a reading step (S120, S200, and S210), a determination step (S130 and S160), and a transfer step (S170).

読込ステップは、データ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 communication control device 10, multiple descriptors Dc are prepared in advance.

転送ステップは、(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 CPU 30 or the like of the determination result. Even if the control method determines that the start address As(X) is not within the standard receiving area Rgo, it does not cause the CPU 30 or the like to reset the first descriptor Dc(X) to the correct one. When the control method determines that the start address As(X) specified by the first descriptor Dc(X) is not within the standard receiving area Rgo, it further reads the second descriptor Dc(Y) prepared in advance. Then, the control method transfers the data Dt to the main memory 20 according to the read second descriptor Dc(Y).

前記制御方法は、予め複数用意されたディスクリプタ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 CPU 30 or the like is caused to reset the "available descriptor" for the transfer of the data Dt.

つまり、前記制御方法は、ディスクリプタ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 network 3 to the main memory 20 at high speed.

特に、「読み込んだディスクリプタ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 network 3. Therefore, the control method can perform processing to prevent "erroneous data transfer by the descriptor Dc" before the data Dt is received.

前記制御方法は、「ディスクリプタ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 communication control device 10 is realized as a NIC (Network Interface Card). The communication control device 10 is typically configured with a hardware logic circuit such as an FPGA (Field-Programmable gate array) or an ASIC (Application Specific Integrated Circuit).

ディスクリプタDcの拒否を判定する通信制御機器10を、ハードウェアによる論理回路で構成した場合、以下の効果を実現することができる。すなわち、一般的に、処理内容が同じであれば、ハードウェアによる処理の方が、ソフトウェア(具体的には、CPU)による処理よりも、高速で実行することができる。そのため、ハードウェアによる論理回路で構成された通信制御機器10は、CPU30等にディスクリプタDcの拒否を判定させる場合に比べて高速に、ディスクリプタDcの拒否を判定することができるとの効果を奏する。 When the communication control device 10 that determines whether to reject the descriptor Dc is configured with a hardware logic circuit, the following effects 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 10 configured with a hardware logic circuit has the effect of being able to determine whether to reject the descriptor Dc faster than when the CPU 30 or the like is made to determine whether to reject the descriptor Dc.

特に、前記制御方法は、CPU30等によるディスクリプタDcの再設定を必要とせずに、予め複数用意されたディスクリプタDcの中から、データDtの転送に「利用可能なディスクリプタ」を選択し、選択したディスクリプタDcに従って転送を実行する。 In particular, the control method does not require the CPU 30 or the like to reset the descriptor Dc, but instead selects an "available descriptor" for transferring data Dt from among a plurality of descriptors Dc prepared in advance, and executes the transfer according to the selected descriptor Dc.

ハードウェアによる論理回路で構成した場合、通信制御機器10は、データDtの転送に「利用可能なディスクリプタ」を予め複数用意されたディスクリプタDcの中から選択する処理を極めて高速に実行することができる。また、ハードウェアによる論理回路で構成した場合、通信制御機器10は、予め複数用意されたディスクリプタDcの中から選択したディスクリプタDcに従って、極めて高速に転送を実行することができる。 When configured with a hardware logic circuit, the communication control device 10 can extremely quickly execute the process of selecting an "available descriptor" for transferring data Dt from among a plurality of descriptors Dc prepared in advance. Also, when configured with a hardware logic circuit, the communication control device 10 can extremely quickly execute the transfer according to the descriptor Dc selected from a plurality of descriptors Dc prepared in advance.

したがって、通信制御機器10をハードウェアによる論理回路で構成した場合、前記制御方法は、ディスクリプタDcによる誤ったデータ転送を防止しつつ、ネットワーク3から受信したデータDtを極めて高速に転送することができるとの効果を奏する。 Therefore, when the communication control device 10 is configured with a hardware logic circuit, the control method has the effect of preventing erroneous data transfer using the descriptor Dc while transferring data Dt received from the network 3 at extremely high speed.

§4.変形例
(ネットワーク構成例について)
図2に例示した制御システム0において、複数のネットワーク3が、ネットワークハブ2を介して、PLC1に接続している。しかしながら、制御システム0において、1つのネットワーク3がネットワークハブ2を介さずにPLC1に接続し、例えば、PLC1と、1つ以上のネットワークデバイスとが、一筆書きの形式で互いに通信可能に接続されていてもよい。
§4. Modifications (Network Configuration Examples)
2, a plurality of networks 3 are connected to the PLC 1 via a network hub 2. However, in the control system 0, one network 3 may be connected to the PLC 1 without going through the network hub 2, and for example, the PLC 1 and one or more network devices may be connected to each other in a unicursal manner so as to be able to communicate with each other.

本発明は上述した各実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。 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 network 10 communication control device 20 main memory 30 CPU
121 DMAC (transfer unit)
123 Reading unit 124 Determination unit 125 First descriptor FIFO (storage unit)
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.
前記判定部は、(A)前記読込部によって読み込まれた前記ディスクリプタに規定されている前記開始アドレスが、前記許可領域内にあり、かつ、(B)受信した前記データのデータサイズと、前記読込部によって読み込まれた前記ディスクリプタに規定されている前記開始アドレスとから算出する、前記データを転送した場合の転送後の領域の末尾アドレスが前記許可領域内にある場合に、前記読込部によって読み込まれた前記ディスクリプタを利用可能であると判定する
請求項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.
JP2020149861A 2020-09-07 2020-09-07 COMMUNICATION CONTROL DEVICE AND METHOD FOR CONTROLLING COMMUNICATION CONTROL DEVICE Active JP7476733B2 (en)

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)

* Cited by examiner, † Cited by third party
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 it
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (5)

* Cited by examiner, † Cited by third party
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 it
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
US5289469A (en) Communication control unit with lower layer protocol control and higher layer protocol control
US9703736B2 (en) Data transmission apparatus, communication control method, and communication control program
CN109491958B (en) Error processing system and error processing method
US20120327950A1 (en) Method for Transmitting Data Packets
EP0311187B1 (en) Interface device for interfacing a network station to a physical network medium
CN111694508B (en) Method and system for managing LBA overlap checking in NVMe-based SSDs
JP7476733B2 (en) COMMUNICATION CONTROL DEVICE AND METHOD FOR CONTROLLING COMMUNICATION CONTROL DEVICE
CN113688076B (en) EPA-based data communication method, computing device and medium
WO2022017052A1 (en) Method and apparatus for shared device instruction control and device
KR20170117326A (en) Direct memory access control device for at least one processing unit having a random access memory
JP5456434B2 (en) Pipe arbitration circuit, pipe arbitration method
JPH11272609A (en) Serial data transfer method and synchronous serial bus interface mounted with the method
JP3790653B2 (en) Shared memory access management device
US20230099487A1 (en) Communication control device and method for controlling communication control device
JP2520905B2 (en) Serial communication controller
JP3489456B2 (en) Real-time communication device and system
KR950001513B1 (en) Acknowledgement transmission method in data link layer of mini-map network
US7600041B2 (en) Industrial or domestic local network
US11327908B2 (en) Method and system for facilitating communication between interconnect and system memory on system-on-chip
EP3328009A1 (en) Method, device, and apparatus for detecting message backpressure
TWI763612B (en) Transaction layer circuit of peripheral component interconnect express and operation method thereof
JP2006195607A (en) Method and circuit for determining bulk-out transfer end
JPS63228856A (en) Communication controller
CN108255770B (en) Processing method based on 1394 bus event message response mechanism
JP6509071B2 (en) Engineering tool

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