JP7419889B2 - Communication control equipment and control method for communication control equipment - Google Patents
Communication control equipment and control method for communication control equipment Download PDFInfo
- Publication number
- JP7419889B2 JP7419889B2 JP2020039984A JP2020039984A JP7419889B2 JP 7419889 B2 JP7419889 B2 JP 7419889B2 JP 2020039984 A JP2020039984 A JP 2020039984A JP 2020039984 A JP2020039984 A JP 2020039984A JP 7419889 B2 JP7419889 B2 JP 7419889B2
- Authority
- JP
- Japan
- Prior art keywords
- descriptor
- transmission
- time
- data
- priority
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000004891 communication Methods 0.000 title claims description 291
- 238000000034 method Methods 0.000 title claims description 91
- 230000005540 biological transmission Effects 0.000 claims description 923
- 239000000872 buffer Substances 0.000 claims description 221
- 230000015654 memory Effects 0.000 claims description 151
- 238000012546 transfer Methods 0.000 claims description 130
- 238000012545 processing Methods 0.000 description 59
- 101100408464 Caenorhabditis elegans plc-1 gene Proteins 0.000 description 37
- 238000010586 diagram Methods 0.000 description 30
- 239000013256 coordination polymer Substances 0.000 description 14
- 230000000694 effects Effects 0.000 description 12
- 230000000737 periodic effect Effects 0.000 description 10
- 101100524516 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) RFA2 gene Proteins 0.000 description 5
- 238000004519 manufacturing process Methods 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 2
- 230000007812 deficiency Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000003936 working memory Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/04—Programme control other than numerical control, i.e. in sequence controllers or logic controllers
- G05B19/05—Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Communication Control (AREA)
Description
本発明は、読み込んだディスクリプタに従ってメインメモリから送信バッファへとデータを転送し、前記送信バッファに転送された前記データを送信する通信制御機器等に関する。 The present invention relates to a communication control device, etc. that transfers data from a main memory to a transmission buffer according to a read descriptor, and transmits the data transferred to the transmission buffer.
従来、PLC(Programmable Logic Controller;以下、PLCとも称す)などの産業用制御装置について、プロセッサの負荷を分散させるための各種の試みが知られている。例えば、下掲の特許文献1には、複数のコアからなるプロセッサと、複数のキューと、複数の通信ポートとを備え、各キューを各コアに対応付け、各コアにおける処理結果を、各コアに対応する各キューに格納するコントローラが開示されている。特許文献1のコントローラでは、コアの数と同数のキューが設けられ、また、キューの数と同数の通信ポートが設けられて、各コアに対応する各キューが、各コアにおける処理結果の出力等を制御することによって、プロセッサの負担を軽減しようとしている。
Conventionally, various attempts have been known to distribute the load on processors of industrial control devices such as PLCs (Programmable Logic Controllers; hereinafter also referred to as PLCs). For example,
しかしながら、上述のような従来技術は、ネットワークセグメントごとに送信キューを分けるため、ネットワークセグメントが多くなると、それに合わせて送信キューが複数必要になり、実現が困難になるとの問題がある。すなわち、ネットワーク・インターフェイス・カード(Network Interface Card、NIC)の半導体、FPGA(Field-programmable gate array)のゲート使用量などを考慮すると、増やすことができる送信キューの個数には限界がある。 However, in the conventional technology as described above, since transmission queues are divided for each network segment, there is a problem that as the number of network segments increases, a plurality of transmission queues are required, making it difficult to implement. That is, there is a limit to the number of transmission queues that can be increased, taking into account the amount of semiconductors in network interface cards (NICs), the amount of gates used in field-programmable gate arrays (FPGAs), and the like.
本発明の一態様は、実装サイズを抑制しつつ、ソフトウェア(プロセッサ)の処理負荷を低減することのできる通信制御機器を実現することを目的とする。 One aspect of the present invention aims to realize a communication control device that can reduce the processing load on software (processor) while suppressing the implementation size.
上記の課題を解決するために、本発明の一態様に係る通信制御機器は、読み込んだディスクリプタに従ってメインメモリから送信バッファへとデータを転送し、前記送信バッファに転送された前記データを送信する通信制御機器であって、複数の前記ディスクリプタの各々において規定されている、送信予定時刻および実行優先度の少なくとも一方に基づいて、複数の前記ディスクリプタの中から、読み込むディスクリプタを選択する選択部と、前記選択部によって選択された前記ディスクリプタを読み込む読込部と、を備えている。 In order to solve the above problems, a communication control device according to one aspect of the present invention provides a communication control device that transfers data from a main memory to a transmission buffer according to a read descriptor, and transmits the data transferred to the transmission buffer. a selection unit that is a control device and selects a descriptor to be read from among the plurality of descriptors based on at least one of a scheduled transmission time and an execution priority defined in each of the plurality of descriptors; and a reading section that reads the descriptor selected by the selection section.
前記の構成によれば、前記通信制御機器は、複数の前記ディスクリプタの各々において規定されている、送信予定時刻および実行優先度の少なくとも一方に基づいて、複数の前記ディスクリプタの中から、読み込むディスクリプタを選択する。そして、前記通信制御機器は、選択した前記ディスクリプタを読み込み、読み込んだ前記ディスクリプタに従って、前記メインメモリから前記送信バッファへと前記データを転送する。つまり、前記通信制御機器は、複数の前記ディスクリプタの中から、読み込むべきディスクリプタを、複数の前記ディスクリプタの各々の送信予定時刻および実行優先度の少なくとも一方に基づいて、1つずつ選択する。 According to the above configuration, the communication control device selects a descriptor to read from among the plurality of descriptors based on at least one of the scheduled transmission time and the execution priority defined in each of the plurality of descriptors. select. Then, the communication control device reads the selected descriptor and transfers the data from the main memory to the transmission buffer according to the read descriptor. That is, the communication control device selects one descriptor to read from among the plurality of descriptors based on at least one of the scheduled transmission time and execution priority of each of the plurality of descriptors.
そのため、前記通信制御機器は、各々がDMAC(Direct Memory Access Controller)および送信バッファを含む、複数の送信キューを備える必要がなく、実装サイズを小さくすることができる。 Therefore, the communication control device does not need to include a plurality of transmission queues each including a DMAC (Direct Memory Access Controller) and a transmission buffer, and the implementation size can be reduced.
また、前記通信制御機器は、複数の前記ディスクリプタの読込順序を制御することによって、ソフトウェア(プロセッサ)による処理結果の出力等を、具体的には、前記データの送信順序を制御する。つまり、ソフトウェアは、前記通信制御機器を、「送信データの、送信順序および実際の送信時刻(実送信時刻)」の管理を行う送信キューを複数備えた、1つのハードウェアとして扱うことができる。そのため、前記通信制御機器は、処理結果の出力制御(例えば、「送信データの、送信順序および実送信時刻」の管理)等に係るソフトウェアの処理負荷を低減することができる。 Furthermore, the communication control device controls the output of processing results by software (processor), specifically, the transmission order of the data, by controlling the reading order of the plurality of descriptors. In other words, the software can treat the communication control device as one piece of hardware that includes a plurality of transmission queues that manage the "transmission order and actual transmission time (actual transmission time) of transmission data." Therefore, the communication control device can reduce the processing load of software related to output control of processing results (for example, management of "transmission order and actual transmission time of transmission data").
したがって、前記通信制御機器は、実装サイズを抑制しつつ、ソフトウェアの処理負荷を低減することができるとの効果を奏する。 Therefore, the communication control device has the effect of being able to reduce the processing load of software while suppressing the implementation size.
本発明の一態様に係る通信制御機器について、複数の前記ディスクリプタの中の或るディスクリプタの前記実行優先度が、別のディスクリプタの前記実行優先度よりも高い場合、前記選択部は、(A)現在時刻に、前記或るディスクリプタに対応するデータを前記メインメモリから前記送信バッファへと転送するのに要する転送時間と、前記別のディスクリプタに対応するデータを前記メインメモリから前記送信バッファへと転送するのに要する転送時間とを加えた時刻である予定合計時刻と、(B)前記或るディスクリプタの前記送信予定時刻とを比較し、前記或るディスクリプタの前記送信予定時刻が、前記予定合計時刻よりも後だと、前記或るディスクリプタに優先して前記別のディスクリプタを選択し、前記或るディスクリプタの前記送信予定時刻が、前記予定合計時刻以前だと、前記別のディスクリプタに優先して前記或るディスクリプタを選択してもよい。 Regarding the communication control device according to one aspect of the present invention, when the execution priority of a certain descriptor among the plurality of descriptors is higher than the execution priority of another descriptor, the selection unit (A) Transfer time required to transfer data corresponding to the certain descriptor from the main memory to the transmission buffer and transfer data corresponding to the other descriptor from the main memory to the transmission buffer at the current time (B) the scheduled transmission time of the certain descriptor is compared, and the scheduled transmission time of the certain descriptor is determined to be equal to the scheduled total time. If the scheduled transmission time of the certain descriptor is before the scheduled total time, the other descriptor is selected in preference to the other descriptor. A certain descriptor may be selected.
前記の構成によれば、前記通信制御機器は、前記或る送信ディスクリプタの実行優先度が、前記別のディスクリプタの実行優先度よりも高いと、前記予定合計時刻と前記或るディスクリプタの前記送信予定時刻とを比較する。そして、前記或るディスクリプタの前記送信予定時刻が、前記予定合計時刻よりも後だと、前記通信制御機器は、前記或るディスクリプタに優先して前記別のディスクリプタを選択する。また、前記或るディスクリプタの前記送信予定時刻が、前記予定合計時刻以前だと、前記通信制御機器は、前記別のディスクリプタに優先して前記或るディスクリプタを選択する。 According to the above configuration, when the execution priority of the certain transmission descriptor is higher than the execution priority of the other descriptor, the communication control device determines the scheduled total time and the transmission schedule of the certain descriptor. Compare with the time. If the scheduled transmission time of the certain descriptor is later than the scheduled total time, the communication control device selects the other descriptor in preference to the certain descriptor. Further, if the scheduled transmission time of the certain descriptor is before the scheduled total time, the communication control device selects the certain descriptor in preference to the other descriptor.
ここで、複数の前記ディスクリプタの各々において規定されている実行優先度のみに基づいて、読み込むべきディスクリプタを選択した場合、実行優先度が低いディスクリプタは、常に、実行優先度が高いディスクリプタよりも後に読み込まれることになる。 Here, if a descriptor to be read is selected based only on the execution priority specified in each of the plurality of descriptors, the descriptor with a lower execution priority is always read after the descriptor with a higher execution priority. It will be.
しかし、前記或るディスクリプタより実行優先度が低い前記別のディスクリプタの送信予定時刻が、前記或るディスクリプタの送信予定時刻よりも十分に早い場合、実行優先度のみに従ってディスクリプタの読込順序を決定することは、必ずしも適切ではない。 However, if the scheduled transmission time of the other descriptor whose execution priority is lower than that of the certain descriptor is sufficiently earlier than the scheduled transmission time of the certain descriptor, the reading order of the descriptors may be determined only according to the execution priority. is not necessarily appropriate.
例えば、前記別のディスクリプタに対応する送信データを前記メインメモリに転送した後であっても、前記或る送信ディスクリプタに対応する送信データを、前記或る送信ディスクリプタの送信予定時刻よりも前に、前記メインメモリへと転送できる場合がある。そのような場合、前記別のディスクリプタを読み込んだ(実行した)後に、前記或るディスクリプタを読み込めばよく、つまり、前記別のディスクリプタを、前記或る送信ディスクリプタよりも先に読み込むべきである。 For example, even after the transmission data corresponding to the other descriptor has been transferred to the main memory, the transmission data corresponding to the certain transmission descriptor may be transferred before the scheduled transmission time of the certain transmission descriptor. In some cases, the data can be transferred to the main memory. In such a case, the certain descriptor may be read after reading (executing) the other descriptor; that is, the other descriptor should be read before the certain transmission descriptor.
また、複数の前記ディスクリプタの各々において規定されている送信予定時刻のみに基づいて、読み込むべきディスクリプタを選択した場合、送信予定時刻が遅いディスクリプタは、常に、送信予定時刻が早いディスクリプタよりも後に読み込まれることになる。 Furthermore, if a descriptor to be read is selected based only on the scheduled transmission time specified in each of the plurality of descriptors, a descriptor with a later scheduled transmission time is always read after a descriptor with an earlier scheduled transmission time. It turns out.
しかし、前記或るディスクリプタよりも実行優先度が低い前記別のディスクリプタの送信予定時刻が、前記或るディスクリプタの送信予定時刻の直前である場合、送信予定時刻のみに従ってディスクリプタの読込順序を決定することは、必ずしも適切ではない。 However, if the scheduled transmission time of the other descriptor, which has a lower execution priority than the certain descriptor, is immediately before the scheduled transmission time of the certain descriptor, the reading order of the descriptors is determined only according to the scheduled transmission time. is not necessarily appropriate.
例えば、前記別のディスクリプタに対応する送信データを前記メインメモリに転送した後では、前記或る送信ディスクリプタに対応する送信データを、前記或る送信ディスクリプタの送信予定時刻よりも前に、前記メインメモリへと転送できない場合がある。そのような場合、前記別のディスクリプタを読み込む(実行する)前に、前記或るディスクリプタを読み込まなくてはならず、つまり、前記或るディスクリプタを、前記別の送信ディスクリプタよりも先に読み込むべきである。 For example, after the transmission data corresponding to the other descriptor is transferred to the main memory, the transmission data corresponding to the certain transmission descriptor is transferred to the main memory before the scheduled transmission time of the certain transmission descriptor. It may not be possible to transfer to. In such a case, the certain descriptor must be read before reading (executing) the other descriptor, that is, the certain descriptor should be read before the other send descriptor. be.
前記通信制御機器は、実行優先度のみに従ったディスクリプタの読込順序の決定、および、送信予定時刻のみに従ったディスクリプタの読込順序の決定の各々が有する上述の不備を補う。すなわち、複数の前記ディスクリプタの中の或るディスクリプタの前記実行優先度が、別のディスクリプタの前記実行優先度よりも高い場合、前記通信制御機器は、前記予定合計時刻と前記或るディスクリプタの前記送信予定時刻とを比較する。そして、前記通信制御機器は、前記予定合計時刻と前記或るディスクリプタの前記送信予定時刻との比較結果に基づいて、読み込むべきディスクリプタを選択する。 The communication control device compensates for the above-mentioned deficiencies in determining the descriptor reading order based only on the execution priority and determining the descriptor reading order based only on the scheduled transmission time. That is, when the execution priority of a certain descriptor among the plurality of descriptors is higher than the execution priority of another descriptor, the communication control device determines the scheduled total time and the transmission of the certain descriptor. Compare with the scheduled time. Then, the communication control device selects a descriptor to be read based on a comparison result between the scheduled total time and the scheduled transmission time of the certain descriptor.
したがって、前記通信制御機器は、実行優先度および送信予定時刻のいずれか一方にのみ従って読み込むべきディスクリプタを選択する方法に比べて、読み込むべきディスクリプタを適切に選択することができるとの効果を奏する。 Therefore, the communication control device has the effect of being able to appropriately select a descriptor to be read, compared to a method of selecting a descriptor to be read based only on either the execution priority or the scheduled transmission time.
本発明の一態様に係る通信制御機器において、判定時間が予め設定されており、前記読込部は、前記ディスクリプタの送信予定時刻から前記判定時間を遡った時刻になってから、前記ディスクリプタを読み込んでもよい。 In the communication control device according to one aspect of the present invention, a determination time is set in advance, and the reading unit reads the descriptor after the determination time has elapsed from the scheduled transmission time of the descriptor. good.
前記の構成によれば、前記通信制御機器は、前記ディスクリプタの送信予定時刻から前記判定時間を遡った時刻になってから、前記ディスクリプタを読み込む。 According to the above configuration, the communication control device reads the descriptor after the determination time has elapsed from the scheduled transmission time of the descriptor.
ここで、或るディスクリプタを読み込んだ後に、前記或るディスクリプタの送信予定時刻よりも現在時刻に近い時刻を送信予定時刻とする別のディスクリプタが生成された場合、以下の問題が発生する。すなわち、前記或るディスクリプタに対応するデータが障害となって、前記別のディスクリプタに対応するデータを、前記別のディスクリプタの送信予定時刻で送信することができないという問題が発生する。 Here, after reading a certain descriptor, if another descriptor is generated whose scheduled transmission time is closer to the current time than the scheduled transmission time of the certain descriptor, the following problem occurs. That is, a problem arises in that the data corresponding to the certain descriptor becomes a failure and the data corresponding to the other descriptor cannot be transmitted at the scheduled transmission time of the other descriptor.
これは、前記送信バッファに格納されたデータは、格納された順で送信されるからである。つまり、前記或るディスクリプタに対応するデータが前記別のディスクリプタに対応するデータより先に格納されたなら、前記或るディスクリプタに対応するデータが送信されてからでないと、前記別のディスクリプタに対応するデータは送信されない。そして、前記或るディスクリプタに対応するデータは、前記或るディスクリプタの送信予定時刻にならなければ送信されない。しかしながら、前記或るディスクリプタの送信予定時刻は、前記別のディスクリプタの送信予定時刻よりも後であるから、前記別のディスクリプタに対応するデータを、前記別のディスクリプタの送信予定時刻で送信することはできない。 This is because the data stored in the transmission buffer is transmitted in the order in which it was stored. In other words, if the data corresponding to the certain descriptor is stored before the data corresponding to the another descriptor, the data corresponding to the other descriptor must be stored after the data corresponding to the certain descriptor is transmitted. No data is sent. The data corresponding to the certain descriptor is not transmitted until the scheduled transmission time of the certain descriptor. However, since the scheduled transmission time of the certain descriptor is later than the scheduled transmission time of the other descriptor, it is impossible to transmit the data corresponding to the other descriptor at the scheduled transmission time of the other descriptor. Can not.
そこで、前記通信制御機器は、前記ディスクリプタの送信予定時刻から前記判定時間を遡った時刻になってから、前記ディスクリプタを読み込むことによって、上述の問題が発生する可能性を抑制する。すなわち、前記或るディスクリプタの送信予定時刻よりも現在時刻に近い時刻を送信予定時刻とする前記別のディスクリプタを読み込む前に、前記或るディスクリプタを読み込むことがないよう、前記通信制御機器は、前記或るディスクリプタの読込時刻を調整する。具体的には、前記通信制御機器は、前記或るディスクリプタの送信予定時刻から前記判定時間を遡った時刻になってから、前記或るディスクリプタを読み込む。 Therefore, the communication control device suppresses the possibility that the above-mentioned problem will occur by reading the descriptor after the determination time has elapsed from the scheduled transmission time of the descriptor. That is, the communication control device is configured to read the certain descriptor before reading the other descriptor whose scheduled transmission time is closer to the current time than the scheduled transmission time of the certain descriptor. Adjust the read time of a certain descriptor. Specifically, the communication control device reads the certain descriptor after the determination time has elapsed from the scheduled transmission time of the certain descriptor.
したがって、前記通信制御機器は、前記或るディスクリプタの送信予定時刻よりも現在時刻に近い時刻を送信予定時刻とする前記別のディスクリプタを読み込む前に、前記或るディスクリプタを読み込むことを防ぐことができるとの効果を奏する。 Therefore, the communication control device can prevent the certain descriptor from being read before reading the other descriptor whose scheduled transmission time is closer to the current time than the scheduled transmission time of the certain descriptor. It has the effect of
本発明の一態様に係る通信制御機器において、前記送信バッファは、前記読込部が読み込んだ前記ディスクリプタの順に、前記ディスクリプタに対応する前記データが格納される通常送信バッファと、前記通常送信バッファに格納されている前記データに対応する前記ディスクリプタを前記選択部が選択してから、前記通常送信バッファに格納されている前記データが送信されるまでの間に前記読込部が読み込んだディスクリプタであって、前記通常送信バッファに格納されている前記データに対応する前記ディスクリプタよりも前記実行優先度が高いディスクリプタに対応する前記データが格納される特別送信バッファと、を含んでもよい。 In the communication control device according to one aspect of the present invention, the transmission buffer includes a normal transmission buffer in which the data corresponding to the descriptor is stored, and a normal transmission buffer in which the data is stored in the order of the descriptors read by the reading unit. A descriptor read by the reading unit after the selection unit selects the descriptor corresponding to the data stored in the normal transmission buffer and before the data stored in the normal transmission buffer is transmitted, A special transmission buffer may be included in which the data corresponding to the descriptor having a higher execution priority than the descriptor corresponding to the data stored in the normal transmission buffer is stored.
前記の構成によれば、前記通信制御機器は、前記通常送信バッファと前記特別送信バッファとを含む前記送信バッファを備えている。そして、前記通信制御機器は、通常は、読み込んだ前記ディスクリプタの順に、読み込んだ前記ディスクリプタに対応するデータを、前記通常送信バッファに格納する。 According to the above configuration, the communication control device includes the transmission buffer including the normal transmission buffer and the special transmission buffer. Then, the communication control device normally stores data corresponding to the read descriptors in the normal transmission buffer in the order of the read descriptors.
前記通信制御機器は、「前記通常送信バッファに格納されている前記データに対応する前記ディスクリプタを選択してから、前記通常送信バッファに格納されている前記データを送信するまで」の間に新たなディスクリプタを読み込むと、以下の判定を実行する。すなわち、前記通信制御機器は、前記新たなディスクリプタの前記実行優先度が、前記通常送信バッファに格納されている前記データに対応する前記ディスクリプタの前記実行優先度よりも高いかを判定する。 The communication control device transmits new data during the period from "selecting the descriptor corresponding to the data stored in the normal transmission buffer to transmitting the data stored in the normal transmission buffer". When a descriptor is read, the following judgments are performed. That is, the communication control device determines whether the execution priority of the new descriptor is higher than the execution priority of the descriptor corresponding to the data stored in the normal transmission buffer.
そして、前記新たなディスクリプタの前記実行優先度の方が高い場合、前記通信制御機器は、前記新たなディスクリプタに対応するデータを、前記特別送信バッファに格納する。前記新たなディスクリプタの前記実行優先度の方が低い、または、前記実行優先度が同じ場合、前記通信制御機器は、前記新たなディスクリプタに対応するデータを、前記普通送信バッファに格納する。 If the execution priority of the new descriptor is higher, the communication control device stores data corresponding to the new descriptor in the special transmission buffer. If the execution priorities of the new descriptor are lower or the execution priorities are the same, the communication control device stores data corresponding to the new descriptor in the normal transmission buffer.
ここで、前記選択部が或るディスクリプタを選択してから、前記或るディスクリプタに対応するデータが送信されるまでの間に、前記或るディスクリプタより前記実行優先度が高い別のディスクリプタを前記読込部が読み込む可能性がある。そのような場合、送信バッファが1つしかなかったとしたら、前記別のディスクリプタに対応するデータは、1つしかない送信バッファに、前記或るディスクリプタに対応するデータよりも後に格納されざるを得ない。その結果、前記別のディスクリプタに対応するデータを、前記或るディスクリプタに対応するデータよりも先に送信することは不可能となる。 Here, after the selection unit selects a certain descriptor and until data corresponding to the certain descriptor is transmitted, another descriptor having a higher execution priority than the certain descriptor is read. may be read. In such a case, if there is only one transmission buffer, the data corresponding to the other descriptor must be stored in the only one transmission buffer after the data corresponding to the certain descriptor. . As a result, it becomes impossible to transmit data corresponding to the other descriptor before data corresponding to the certain descriptor.
これに対して、前記通信制御機器は、前記通常送信バッファと前記特別送信バッファとを含む前記送信バッファを備えている。そして、前記通信制御機器は、上述の通り、前記通常送信バッファに格納されているデータよりも優先して送信すべきデータが新たに発生すると、そのようなデータを前記特別送信バッファに格納する。 On the other hand, the communication control device includes the transmission buffer including the normal transmission buffer and the special transmission buffer. Then, as described above, when new data that should be transmitted with priority over data stored in the normal transmission buffer is generated, the communication control device stores such data in the special transmission buffer.
したがって、前記通信制御機器は、前記或るディスクリプタを選択してから、前記或るディスクリプタに対応するデータを送信するまでに発生した、前記或るディスクリプタに対応するデータより優先送信すべきデータを、優先送信できるとの効果を奏する。 Therefore, the communication control device prioritizes data that is generated between selecting the certain descriptor and transmitting the data corresponding to the certain descriptor and should be transmitted with priority over data corresponding to the certain descriptor. This has the effect of allowing priority transmission.
上記の課題を解決するために、本発明の一態様に係る制御方法は、読み込んだディスクリプタに従ってメインメモリから送信バッファへとデータを転送し、前記送信バッファに転送された前記データを送信する通信制御機器の制御方法であって、複数の前記ディスクリプタの各々において規定されている、送信予定時刻および実行優先度の少なくとも一方に基づいて、複数の前記ディスクリプタの中から、読み込むディスクリプタを選択する選択ステップと、前記選択ステップにて選択された前記ディスクリプタを読み込む読込ステップと、を含んでいる。 In order to solve the above problems, a control method according to one aspect of the present invention provides communication control that transfers data from a main memory to a transmission buffer according to a read descriptor, and transmits the data transferred to the transmission buffer. A method for controlling a device, the method comprising: selecting a descriptor to read from a plurality of descriptors based on at least one of a scheduled transmission time and an execution priority defined in each of the plurality of descriptors; , a reading step of reading the descriptor selected in the selection step.
前記の構成によれば、前記制御方法は、複数の前記ディスクリプタの各々において規定されている、送信予定時刻および実行優先度の少なくとも一方に基づいて、複数の前記ディスクリプタの中から、読み込むディスクリプタを選択する。そして、前記制御方法は、選択した前記ディスクリプタを読み込み、読み込んだ前記ディスクリプタに従って、前記メインメモリから前記送信バッファへと前記データを転送する。つまり、前記制御方法は、複数の前記ディスクリプタの中から、読み込むべきディスクリプタを、複数の前記ディスクリプタの各々の送信予定時刻および実行優先度の少なくとも一方に基づいて、1つずつ選択する。 According to the above configuration, the control method selects a descriptor to be read from among the plurality of descriptors based on at least one of a scheduled transmission time and an execution priority defined in each of the plurality of descriptors. do. The control method reads the selected descriptor and transfers the data from the main memory to the transmission buffer according to the read descriptor. That is, the control method selects one descriptor to be read from among the plurality of descriptors based on at least one of the scheduled transmission time and execution priority of each of the plurality of descriptors.
そのため、前記制御方法を実行する通信制御機器は、各々がDMACおよび送信バッファを含む、複数の送信キューを備える必要がなく、前記制御方法を実行する通信制御機器の実装サイズを小さくすることができる。 Therefore, the communication control device that executes the control method does not need to include multiple transmission queues, each including a DMAC and a transmission buffer, and the implementation size of the communication control device that executes the control method can be reduced. .
また、前記制御方法は、複数の前記ディスクリプタの読込順序を制御することによって、ソフトウェア(プロセッサ)による処理結果の出力等を、具体的には、前記データの送信順序を制御する。つまり、ソフトウェアは、前記通信制御機器を、「送信データの、送信順序および実送信時刻」の管理を行う送信キューを複数備えた、1つのハードウェアとして扱うことができる。そのため、前記通信制御機器は、処理結果の出力制御(例えば、「送信データの、送信順序および実送信時刻」の管理)等に係るソフトウェアの処理負荷を低減することができる。 Furthermore, the control method controls the output of processing results by software (processor), specifically, the transmission order of the data, by controlling the reading order of the plurality of descriptors. In other words, the software can treat the communication control device as one piece of hardware that includes a plurality of transmission queues that manage "the transmission order and actual transmission time of transmission data." Therefore, the communication control device can reduce the processing load of software related to output control of processing results (for example, management of "transmission order and actual transmission time of transmission data").
したがって、前記制御方法は、前記制御方法を実行する通信制御機器の実装サイズを抑制しつつ、ソフトウェアの処理負荷を低減することができるとの効果を奏する。 Therefore, the control method has the effect of being able to reduce the processing load of software while suppressing the implementation size of a communication control device that executes the control method.
本発明の一態様によれば、実装サイズを抑制しつつ、ソフトウェア(プロセッサ)の処理負荷を低減することができるとの効果を奏する。 According to one aspect of the present invention, it is possible to reduce the processing load on software (processor) while suppressing the implementation size.
〔実施形態1〕
以下、本発明の一側面に係る実施の形態(以下、「本実施形態」とも表記する)を、図面に基づいて説明する。なお、図中同一または相当部分には同一符号を付してその説明は繰返さない。本実施の形態においては、機械および設備等の制御対象を制御するPLC(プログラマブル・ロジック・コントローラ、Programmable Logic Controller)1の備える通信コントローラ10を通信制御機器の典型例として説明を行なう。
[Embodiment 1]
DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment (hereinafter also referred to as "this embodiment") according to one aspect of the present invention will be described below based on the drawings. In addition, the same reference numerals are attached to the same or corresponding parts in the drawings, and the description thereof will not be repeated. In this embodiment, a
以下の説明において、「n」は「1」以上の整数を示すものとし、また、「バッファ」を「BUF」と略記し、送信ディスクリプタを格納する「ディスクリプタメモリ」をTXと略記することがある。例えば、第一バッファ162(0)を「BUF0」と略記し、第二バッファ162(1)を「BUF1」と略記し、第nバッファ162(n-1)を「BUFn-1」と略記することがある。第一バッファ162(0)、第二バッファ162(1)、第nバッファ162(n-1)の各々を特に区別する必要がない場合には、単に「バッファ162」または「BUF」とすることがある。
In the following explanation, "n" indicates an integer greater than or equal to "1", and "buffer" is sometimes abbreviated as "BUF", and "descriptor memory" that stores transmission descriptors is sometimes abbreviated as TX. . For example, the first buffer 162(0) is abbreviated as "BUF0," the second buffer 162(1) is abbreviated as "BUF1," and the nth buffer 162(n-1) is abbreviated as "BUFn-1." Sometimes. If there is no particular need to distinguish between the first buffer 162(0), the second buffer 162(1), and the n-th buffer 162(n-1), they may simply be referred to as "
同様に、第一ディスクリプタメモリ14(0)を「TX0」と略記し、第二ディスクリプタメモリ14(1)を「TX1」と略記し、第nディスクリプタメモリ14(n-1)を「TXn-1」と略記することがある。第一ディスクリプタメモリ14(0)、第二ディスクリプタメモリ14(1)、第nディスクリプタメモリ14(n-1)の各々を特に区別する必要がない場合には、単に「ディスクリプタメモリ14」または「TX」とすることがある。
Similarly, the first descriptor memory 14(0) is abbreviated as "TX0", the second descriptor memory 14(1) is abbreviated as "TX1", and the n-th descriptor memory 14(n-1) is abbreviated as "TXn-1". ” is sometimes abbreviated as “. If there is no particular need to distinguish between the first descriptor memory 14 (0), the second descriptor memory 14 (1), and the n-th descriptor memory 14 (n-1), simply "
さらに、第一リクエスタ15(0)、第二リクエスタ15(1)、第nリクエスタ15(n-1)の各々を特に区別する必要がない場合には、単に「リクエスタ15」とすることがある。 Furthermore, if there is no particular need to distinguish between the first requester 15(0), the second requester 15(1), and the n-th requester 15(n-1), they may be simply referred to as "requester 15." .
§1.適用例
本発明の一態様に係る通信コントローラ10(通信制御機器)についての理解を容易にするため、先ず、本発明が適用される場面の一例について、具体的には、通信コントローラ10を備えるPLC1を含む制御システム0の概要について、図2を用いて説明する。
§1. Application Example To facilitate understanding of the communication controller 10 (communication control device) according to one aspect of the present invention, first, an example of a scene to which the present invention is applied will be described, specifically, a
(制御システムの概要)
図2は、制御システム0の概要を示す図である。制御システム0は、PLC1と、ネットワークハブ2と、各々がネットワークハブ2を介してPLC1に接続されているネットワーク3(1)および3(2)とを含んでいる。以下、ネットワーク3(1)と、ネットワーク3(2)とを特に区別する必要がない場合には、単に「ネットワーク3」と称することがある。ネットワーク3は、1つ以上のネットワークデバイスを含んでいる。
(Overview of control system)
FIG. 2 is a diagram showing an overview of the
図2に例示する制御システム0においては、ネットワークハブ2を介して、複数のネットワーク3が、PLC1に接続している。制御システム0における通信には、ギガ帯域が使用されてもよい。
In the
PLC1は、制御システム0の全体を制御する制御装置であり、ネットワークハブ2は、PLC1と複数のネットワーク3との間の通信を管理するネットワークハブまたはネットワークスイッチである。図2に示す制御システム0においては、PLC1の1つのネットワークポート(すなわち、図1の送信ポート18)に対して、複数のネットワーク3が、例えば、ネットワーク3(1)および3(2)が、存在している。
The
ここで、ネットワーク3(1)および3(2)のいずれもが制御ネットワークであってもよいし、すなわち、PLC1と通信を行う全てのネットワーク3が制御ネットワークであってもよい。また、ネットワーク3(1)および3(2)のいずれか一方が制御ネットワークであり、他方がデータネットワークであってもよく、つまり、PLC1と通信を行うネットワーク3について、制御ネットワークとデータネットワークとが混在していてもよい。
Here, both networks 3(1) and 3(2) may be control networks, or in other words, all networks 3 that communicate with
例えば、ネットワーク3が制御ネットワークである場合、PLC1は、生産設備内の入力機器及び出力機器の制御を司る制御装置であり、また、ネットワークデバイスは、例えば、生産設備内の入力機器及び出力機器である。PLC1とネットワークデバイスとは、ネットワーク3を介してサイクリックに通信を行なうことで、INデータ及びOUTデータ(以下、「IOデータ」という)の送受信を行ない、PLC1は、生産設備の全体を制御する。すなわち、ネットワーク3が制御ネットワークである場合、制御システム0は、PLC1をマスタ装置(データ伝送を管理するマスタ装置)とし、ネットワークデバイスをスレーブ装置とするマスタ・スレーブ制御システムと捉えることができる。
For example, if the network 3 is a control network, the
ネットワーク3が制御ネットワークである場合、ネットワーク3は、EtherCAT(Ethernet for Control Automation Technology:登録商標)規格等の産業用イーサネット(登録商標)規格に準拠するものであってもよい。ネットワーク3が制御ネットワークである場合、ネットワーク3は、EtherNet/IP(登録商標)規格に準拠するものであってもよい。 When the network 3 is a control network, the network 3 may be compliant with an industrial Ethernet standard such as an EtherCAT (Ethernet for Control Automation Technology) standard. If the network 3 is a control network, the network 3 may be compliant with the EtherNet/IP (registered trademark) standard.
以下では、図2におけるPLC1とネットワークデバイスとの間の通信(以下、「ネットワーク通信」とも称する)がEthernet規格に準拠する例について説明する。また、CPU30と通信コントローラ10とは、PCIe(Peripheral Component Interconnect Express)によって通信可能に接続されているものとする。
Below, an example will be described in which communication between the
なお、図2には、ネットワークハブ2を介して、複数のネットワーク3が、PLC1に接続する制御システム0を例示したが、制御システム0において、PLC1に、複数のネットワーク3がネットワークハブ2を介して接続することは必須ではない。制御システム0において、1つのネットワーク3(特に、1つの制御ネットワーク)が、ネットワークハブ2を介さずに、PLC1に接続してもよい。例えば、マスタ・スレーブ制御システムである制御システム0において、マスタ装置であるPLC1と、各々がスレーブ装置である1つ以上のネットワークデバイスとを、一筆書きの形式で通信可能に接続してもよい。
Although FIG. 2 illustrates a
(本実施形態に係る通信コントローラが実行する処理の概要)
以下に図1等を用いて詳細を説明していく通信コントローラ10について、その理解を容易にするため、通信コントローラ10が実行する処理を、以下のように整理しておく。
(Summary of processing executed by the communication controller according to this embodiment)
In order to facilitate understanding of the
すなわち、通信コントローラ10がソフトウェア(つまり、CPU30)から複数の送信要求(つまり、複数の送信ディスクリプタの実行要求)を略同時に受け付けると、通信コントローラ10のディスクリプタ実行管理部13は、選択処理を実行する。
That is, when the
選択処理において、先ず、ディスクリプタ実行管理部13(特に、選択部131)は、実行すべき複数の送信ディスクリプタ(ディスクリプタ)の各々について、「送信時刻TT」および「ソフトウェアが指定する優先度P」を取得する。そして、ディスクリプタ実行管理部13は、取得した「複数のディスクリプタの各々の、送信時刻TTおよび優先度P」を用いて、実行するディスクリプタを選択し、つまり、読み込むディスクリプタを選択する。詳細は後述するが、ディスクリプタ実行管理部13は、読み込むディスクリプタを選択する際に、「複数のディスクリプタの各々の、データサイズ(つまり、データ転送サイズ)」を利用してもよい。
In the selection process, first, the descriptor execution management unit 13 (in particular, the selection unit 131) determines the "transmission time TT" and "priority P specified by software" for each of the plurality of transmission descriptors (descriptors) to be executed. get. Then, the descriptor
ここで、CPUの処理負荷を軽減するため、ハードウェアによる論理回路で構成したNIC等によって、「送信データの、送信順序および実際の送信時刻(実送信時刻RTT)」の管理を行う構成が知られている。「実送信時刻RTT」とは、その送信データが実際に送信される時刻であり、実送信時刻RTTを送信時刻TTに一致させる送信を「時刻送信」とも称する。 Here, in order to reduce the processing load on the CPU, a configuration is known in which the "transmission order and actual transmission time (actual transmission time RTT) of transmission data" is managed by a NIC etc. configured with a hardware logic circuit. It is being The "actual transmission time RTT" is the time at which the transmission data is actually transmitted, and the transmission that matches the actual transmission time RTT with the transmission time TT is also referred to as "time transmission."
「送信データの、送信順序および実送信時刻RTT」の管理を行うNICの一例において、「送信データの、送信順序および実送信時刻RTT」の管理を行う送信キューは、DMAC(Direct Memory Access Controller)および送信BUFを備えている。そして、そのようなNICの一例においては、「送信データの、送信順序および実送信時刻RTT」の管理を行うべき通信ネットワークごとに、「DMACおよび送信BUFを備える、送信キュー」が設けられている。 In an example of a NIC that manages "transmission order and actual transmission time RTT of transmission data," the transmission queue that manages "transmission order and actual transmission time RTT of transmission data" is a DMAC (Direct Memory Access Controller). and a transmission BUF. In an example of such a NIC, a ``transmission queue equipped with a DMAC and a transmission BUF'' is provided for each communication network that should manage ``the transmission order and actual transmission time RTT of transmission data.'' .
ただし、「送信データの、送信順序および実送信時刻RTT」の管理を行うべき通信ネットワークごとに、「DMACおよび送信BUFを備える、送信キュー」をNICに設けようとすると、以下の問題が発生する。すなわち、上述の管理を行うべき通信ネットワークの数が増えるにしたがって、「DMACおよび送信BUFを含む、送信キュー」の数も増えるため、NICの実装サイズが大きくなってしまう。 However, if you try to set up a ``transmission queue equipped with a DMAC and a transmission BUF'' in the NIC for each communication network that should manage the ``transmission order and actual transmission time RTT of transmission data,'' the following problem will occur. . That is, as the number of communication networks to be managed as described above increases, the number of "transmission queues including DMAC and transmission BUF" also increases, resulting in an increase in the implementation size of the NIC.
これに対して、通信コントローラ10は、上述の選択処理(特に、読み込むディスクリプタの選択処理)を実行することにより、「DMACおよび送信BUFを含む、送信キュー」を複数備える必要がない。
On the other hand, the
例えば、図1に例示する通信コントローラ10は、メインメモリ20から読み出した送信データを送信する前に一時的に保持しておくためのバッファ162を「2つ」備えているが、通信コントローラ10が備えるバッファ162は、「1つ」であってもよい。すなわち、通信コントローラ10は、実行すべき複数のディスクリプタを、望ましい順序で1つずつ実行するので、通信コントローラ10は、送信データを一時的に保持しておくためのバッファ162を、「1つ」備えていればよい。ただし、バッファ162を「2つ」以上備えることにより、通信コントローラ10は、或るディスクリプタを実行後に、それよりも優先度Pの高い別のディスクリプタを実行した場合に、その別のディスクリプタに対応するデータを優先して送信することができる。通信コントローラ10がバッファ162を「2つ」以上備える構成について、詳細は後述する。
For example, the
また、図1に例示するように、通信コントローラ10は、実行すべき複数のディスクリプタを、望ましい順序で1つずつ実行することができるので、メインメモリ20とバッファ162との間のデータ交換を実現するDMAC12を、「1つ」備えていればよい。
Further, as illustrated in FIG. 1, the
したがって、通信コントローラ10は、「DMACおよび送信BUFを含む、送信キュー」を複数備える必要がないため、実装サイズを小さくすることができる。特に、「送信データの、送信順序および実送信時刻RTT」の管理を行うべき通信ネットワーク(ネットワーク3)の数が増えても、通信コントローラ10は、実装サイズの拡大を抑制することができる。
Therefore, the
詳細は図1を用いて後述するが、通信コントローラ10は、「1つ」の送信ポート18、「1つ」のDMAC12を備えている。そして、通信コントローラ10は、「1つ」の送信ポート18、「1つ」のDMAC12に対して、「送信データの、送信順序および実送信時刻RTT」の管理を行う送信キューを複数備えている。具体的には、通信コントローラ10は、ディスクリプタメモリ14およびリクエスタ15の各々を、複数備え、また、実行すべき複数のディスクリプタを、望ましい順序で1つずつ実行するためのディスクリプタ実行管理部13を「1つ」備えている。通信コントローラ10は、複数のディスクリプタメモリ14と、複数のリクエスタ15と、ディスクリプタ実行管理部13とによって、「送信データの、送信順序および実送信時刻RTT」の管理を行う送信キューを複数備えているのと同様の効果を実現する。したがって、通信コントローラ10は、実装サイズを抑制しつつ、送信キューを複数備えているのと同様に、「送信データの、送信順序および実送信時刻RTT」を管理することができる。
Although details will be described later using FIG. 1, the
例えば、通信コントローラ10は、FPGA(Field-Programmable gate array)またはASIC(Application Specific Integrated Circuit)等のハードウェアによる論理回路で構成される。その場合、ソフトウェア(つまり、CPU30)は、通信コントローラ10を、「送信データの、送信順序および実送信時刻RTT」を管理する送信キューを複数備えたハードウェアとして取り扱うことができる。したがって、通信コントローラ10をハードウェアによる論理回路で構成することにより、「送信データの、送信順序および実送信時刻RTT」の管理を行う通信コントローラ10は、ソフトウェア(つまり、CPU30)の処理負荷を低減することができる。
For example, the
したがって、通信コントローラ10は以下のように整理することができる。すなわち、通信コントローラ10(通信制御機器)は、読み込んだ送信ディスクリプタに従ってメインメモリ20からバッファ162(送信バッファ)へとデータ(送信データ)を転送し、バッファ162に転送されたデータを送信する通信制御機器である。
Therefore, the
通信コントローラ10は、選択部131および読込部132を備えている。選択部131は、複数の送信ディスクリプタの各々において規定されている、「送信時刻TT(送信予定時刻)」および「優先度P(実行優先度)」の少なくとも一方に基づいて、複数の送信ディスクリプタの中から、読み込む送信ディスクリプタを選択する。すなわち、選択部131は、複数の送信ディスクリプタの各々において規定されている、「送信時刻TTおよび優先度Pの少なくとも一方」に基づいて、複数の送信ディスクリプタの中から、実行する送信ディスクリプタを選択する。また、読込部132は、選択部131によって選択された送信ディスクリプタを読み込み、つまり、選択部131によって選択された送信ディスクリプタを実行する。
The
前記の構成によれば、通信コントローラ10は、複数の送信ディスクリプタの各々において規定されている、送信時刻TTおよび優先度Pの少なくとも一方に基づいて、複数の送信ディスクリプタの中から、読み込むディスクリプタを選択する。そして、通信コントローラ10は、選択した送信ディスクリプタを読み込み、読み込んだ送信ディスクリプタに従って、メインメモリ20からバッファ162へと送信データを転送する。つまり、通信コントローラ10は、複数の送信ディスクリプタの中から、読み込むべきディスクリプタを、複数の送信ディスクリプタの各々の送信時刻TTおよび優先度Pの少なくとも一方に基づいて、1つずつ選択する。
According to the above configuration, the
そのため、通信コントローラ10は、各々がDMACおよび送信バッファを含む、複数の送信キューを備える必要がなく、実装サイズを小さくすることができる。
Therefore, the
また、通信コントローラ10は、複数の送信ディスクリプタの読込順序を制御することによって、ソフトウェア(プロセッサ、つまり、CPU30)による処理結果の出力等を、具体的には、「送信データの、送信順序および実送信時刻RTT」を制御する。つまり、ソフトウェアは、通信コントローラ10を、「送信データの、送信順序および実送信時刻RTT」の管理を行う送信キューを複数備えた、1つのハードウェアとして扱うことができる。そのため、通信コントローラ10は、処理結果の出力制御(例えば、「送信データの、送信順序および実送信時刻RTT」の管理)等に係るソフトウェアの処理負荷を低減することができる。
In addition, the
したがって、通信コントローラ10は、実装サイズを抑制しつつ、ソフトウェアの処理負荷を低減することができるとの効果を奏する。
Therefore, the
通信コントローラ10において、バッファ162は、通常送信バッファと特別送信バッファとに大別される。通常送信バッファには、読込部132が読み込んだ送信ディスクリプタの順に、送信ディスクリプタに対応するデータが格納される。特別送信バッファには、「以下の2つの条件を共に満たすディスクリプタ」に対応するデータが格納される。条件1は、「『通常送信バッファに格納されているデータに対応する送信ディスクリプタを選択部131が選択してから、そのデータが送信されるまで』の間に、読込部132が読み込んだディスクリプタであること」である。条件2は、「通常送信バッファに格納されているデータに対応する送信ディスクリプタよりも、優先度Pが高い」である。
In the
第一バッファ162(0)、第二バッファ162(1)、・・・、第nバッファ162(n-1)のうち、少なくとも1つを特別送信バッファとし、それ以外のバッファ162を、通常送信バッファとしてもよい。
At least one of the first buffer 162 (0), second buffer 162 (1), ..., n-th buffer 162 (n-1) is used as a special transmission buffer, and the
前記の構成によれば、通信コントローラ10は、前記通常送信バッファと前記特別送信バッファとを含むバッファ162を備えている。そして、通信コントローラ10は、通常は、読み込んだ送信ディスクリプタの順に、読み込んだ送信ディスクリプタに対応するデータを、前記通常送信バッファに格納する。
According to the above configuration, the
通信コントローラ10は、「前記通常送信バッファに格納されているデータに対応する送信ディスクリプタを選択してから、前記通常送信バッファに格納されているデータを送信するまで」の間に新たなディスクリプタを読み込むと、以下の判定を実行する。すなわち、通信コントローラ10は、その新たなディスクリプタの優先度Pが、前記通常送信バッファに格納されているデータに対応する送信ディスクリプタの優先度Pよりも高いかを判定する。
The
そして、その新たなディスクリプタの優先度Pの方が高い場合、通信コントローラ10は、その新たなディスクリプタに対応するデータを、前記特別送信バッファに格納する。これに対して、その新たなディスクリプタの優先度Pの方が低い、または、両者の優先度Pが同じ場合、通信コントローラ10は、その新たなディスクリプタに対応するデータを、前記普通送信バッファに格納する。
If the new descriptor has a higher priority P, the
ここで、選択部131が或る送信ディスクリプタを選択してから、その或る送信ディスクリプタに対応するデータが送信されるまでの間に、その或る送信ディスクリプタより優先度Pが高い別のディスクリプタを読込部132が読み込む可能性がある。そのような場合、送信バッファが1つしかなかったとしたら、その別のディスクリプタに対応するデータは、1つしかない送信バッファに、その或る送信ディスクリプタに対応するデータよりも後に格納されざるを得ない。その結果、その別のディスクリプタに対応するデータを、その或る送信ディスクリプタに対応するデータよりも先に送信することは不可能となる。
Here, after the
これに対して、通信コントローラ10は、前記通常送信バッファと前記特別送信バッファとを含むバッファ162を備えている。そして、通信コントローラ10は、上述の通り、前記通常送信バッファに格納されているデータよりも優先して送信すべきデータが新たに発生すると、そのようなデータを前記特別送信バッファに格納する。
On the other hand, the
したがって、通信コントローラ10は、或る送信ディスクリプタの選択後、その或る送信ディスクリプタに対応するデータを送信するまでに発生した、その或る送信ディスクリプタに対応するデータより優先送信すべきデータを、優先送信できるとの効果を奏する。
Therefore, the
§2.構成例
これまでに概要を説明してきた通信コントローラ10、および、通信コントローラ10を含むPLC1について、次に、図1を用いてその詳細を説明していく。
§2. Configuration Example Next, details of the
図1は、PLC1の構成例を示す図である。図1に例示する通り、PLC1は、ハードウェア構成として、通信コントローラ10と、メインメモリ20と、CPU30とを含む。PLC1は、さらに、不図示の不揮発性メモリ、および、外部装置とPLC1とを接続するためのUSBコネクタなどを含んでもよい。通信コントローラ10と、メインメモリ20と、CPU30と、不揮発性メモリとの間は、各種のバス(内部バス)を介してそれぞれ結合されている。
FIG. 1 is a diagram showing an example of the configuration of the
CPU30は、典型的には、汎用的なコンピュータアーキテクチャに準じて構成され、内部クロックに従って順次命令コードを解釈して実行する。CPU30は、ハードウェア構成としては、1つ以上のCPUコアと、ネットワーク制御部とを含んでいる。
CPU30は、各種の演算処理を実行し、実行結果として生成したデータを、送信データとしてメインメモリ20に格納する。また、CPU30は、送信データとしてメインメモリ20に格納したデータについて、その送信データの優先度P、送信時刻TT、メインメモリ20中のアドレス、データサイズ等を規定したディスクリプタデータを、メインメモリ20に格納する。送信データの優先度P、送信時刻TT、メインメモリ20中のアドレス、データサイズ等を規定したディスクリプタデータは、「送信ディスクリプタ」、または、単に「ディスクリプタ」と略記することがある。
The
The
送信データの「送信時刻TT」は、CPU30によって付与され、通信コントローラ10がその送信データをネットワーク3へと送信する時刻を示しており、つまり、その送信データがネットワーク3へと送信されるべき、送信予定時刻を示している。また、送信データの「優先度P」は、CPU30によって付与され、「その送信データを『送信時刻TT』に送信する」必要性の高さを示し、例えば、「その送信データを、送信周期を維持して、ネットワーク3へと周期的に送信する」必要性の高さを示している。
The "transmission time TT" of the transmission data is given by the
ここで、一般的に、PLC1などの産業用コントローラとデバイス(例えば、図2の「ネットワークデバイス」)とは、一定周期でデータ交換を実行する。制御システム0においては、1つ以上のネットワークデバイスを含むユニット群について、1つ以上のデータ交換周期、および、そのユニット群の通信優先度CPが設定されていてもよい。
Here, in general, an industrial controller such as the
そして、通信優先度CPと優先度Pとは対応付けられていてもよい。また、或るユニット群(例、ユニット群U1)の通信優先度CPが、別のユニット群(例、ユニット群U2)の通信優先度CPよりも高いことは、その或るユニット群の通信周期を維持する必要が、その別のユニット群より高いことを意味してもよい。さらに、或るユニット群(例、ユニット群U1)の通信優先度CPが、別のユニット群(例、ユニット群U2)の通信優先度CPよりも高いことは、その或るユニット群の通信周期が、その別のユニット群の通信周期よりも早い(短い)ことを意味してもよい。 The communication priority CP and the priority P may be associated with each other. Furthermore, the fact that the communication priority CP of a certain unit group (e.g., unit group U1) is higher than the communication priority CP of another unit group (e.g., unit group U2) means that the communication cycle of that certain unit group may mean that the need to maintain the unit is higher than that of another group of units. Furthermore, the fact that the communication priority CP of a certain unit group (e.g., unit group U1) is higher than the communication priority CP of another unit group (e.g., unit group U2) means that the communication cycle of that certain unit group may also mean that the communication cycle is faster (shorter) than the communication cycle of that other unit group.
例えば、「PLC1(特に、通信コントローラ10)が或るネットワークデバイスとの間で実行する周期的な通信」は、「PLC1が別のネットワークデバイスとの間で実行する周期的な通信」よりも、通信周期を維持する必要が高いことがある。そのような場合には、「その或るネットワークデバイスとの間で実行する周期的な通信」の通信優先度CPは、「その別のネットワークデバイスとの間で実行する周期的な通信」の通信優先度CPよりも高い。
For example, "periodic communication that the PLC 1 (particularly the communication controller 10) performs with a certain network device" is more important than "periodic communication that the
また、「PLC1(特に、通信コントローラ10)が或るネットワークデバイスとの間で実行する周期的な通信」は、「PLC1が別のネットワークデバイスとの間で実行する周期的な通信」よりも、通信周期が短い(早い)ことがある。そのような場合には、「その或るネットワークデバイスとの間で実行する周期的な通信」の通信優先度CPは、「その別のネットワークデバイスとの間で実行する周期的な通信」の通信優先度CPよりも高い。
Furthermore, "periodic communication that the PLC 1 (particularly the communication controller 10) performs with a certain network device" is more important than "periodic communication that the
そして、「或るネットワークデバイスとの間で実行する周期的な通信」の通信優先度CPが「別のネットワークデバイスとの間で実行する周期的な通信」の通信優先度CPより高い場合、CPU30は、送信データに対し、以下のように優先度Pを付与する。すなわち、CPU30は、「その或るネットワークデバイスを宛先とする送信データ」には、「その別のネットワークデバイスを宛先とする送信データ」に付与する優先度Pよりも高い優先度Pを付与する。
If the communication priority CP of "periodic communication performed with a certain network device" is higher than the communication priority CP of "periodic communication performed with another network device", the
メインメモリ20は、PLC1の記憶手段であり、例えば、PLC1(特に、通信コントローラ10)がネットワーク3へと送信するデータ(送信データ)が格納される。メインメモリ20は、揮発性の記憶領域(RAM)であり、「CPU30による各種の演算処理によって生成され、ネットワーク3へと送信される」送信データの格納に加えて、PLC1へ電源投入後にCPU30で実行されるべき各種プログラムを保持する。また、メインメモリ20は、CPU30による各種プログラムの実行時の作業用メモリとしても使用される。このようなメインメモリ20として、例えば、DRAM(Dynamic Random Access Memory)、SRAM(Static Random Access Memory)等を用いることができる。
The
図1に例示するメインメモリ20には、送信データと共に、送信データに対応するディスクリプタデータ(送信ディスクリプタ)が格納されている。送信ディスクリプタは、対応する送信データの送信時刻TT、優先度P、および、データサイズ等を示す情報を含んでいる。
The
PLC1は、各種のプログラムおよびパラメータなどのデータを不揮発的に保持する不揮発性メモリを備えていてもよい。不揮発性メモリに格納されるこれらのデータは、必要に応じて、CPU30がアクセスできるようにメインメモリ20にコピーされる。このような不揮発性メモリは、フラッシュメモリのような半導体メモリを用いることができる。あるいは、ハードディスクドライブのような磁気記録媒体、DVD-RAM(Digital Versatile Disk Random Access Memory)のような光学記録媒体などを用いることもできる。
The
通信コントローラ10は、メインメモリ20に格納されているデータ(送信データ)をネットワーク3へと送信する通信制御機器であり、例えば、NIC(Network Interface Card、ネットワーク・インターフェイス・カード)として実現される。通信コントローラ10は、典型的には、FPGA(Field-Programmable gate array)またはASIC(Application Specific Integrated Circuit)等のハードウェアによる論理回路で構成される。通信コントローラ10は、メインメモリ20およびCPU30の各々と、データの送受信が可能に構成されている。
The
通信コントローラ10は、送信ポート18を介してネットワーク3と接続され、ネットワーク3とのデータの遣り取りを制御し、特に、送信データの送信を制御し、例えば、「送信データの、送信順序および実送信時刻RTT」を制御する。通信コントローラ10は、例えば、ネットワーク3における物理層およびデータリンク層の機能を提供する。すなわち、通信コントローラ10は、ネットワーク3の準拠する規格に従い、送信データの送信および受信データの受信を制御する。具体的には、通信コントローラ10は、メインメモリ20に格納されているデータ(送信データ)を自装置内のバッファ162へと転送し、バッファ162に格納した送信データを、ネットワーク3に接続されているネットワークデバイスへと送信する。
The
通信コントローラ10は、送信ディスクリプタに規定されている内容に従って送信データを送信し、例えば、送信ディスクリプタに規定されている送信時刻TTに、その送信ディスクリプタに対応する送信データを送信する。通信コントローラ10が、送信データを、その送信データについて設定されている送信時刻TT(つまり、その送信データに対応する送信ディスクリプタで規定されている送信時刻TT)で送信することを「時刻送信」とも称する。
The
ここで、通信コントローラ10は、複数の送信データの送信順序を、それら複数の送信データをバッファ162に格納する順序によって制御し、具体的には、それら複数の送信データに対応する複数のディスクリプタの読込順序(実行順序)を制御する。特に、通信コントローラ10は、複数の送信ディスクリプタの各々において規定されている、送信時刻TTおよび優先度Pの少なくとも一方に基づいて、優先的に読み込む送信ディスクリプタを選択する。
Here, the
詳細は後述するが、PLC1は、CPU30ではなく、ハードウェアによる論理回路で構成した通信コントローラ10によって、メインメモリ20に格納されているデータ(送信データ)の、ネットワーク3への送信順序および実送信時刻RTTを制御する。したがって、PLC1は、CPU30の処理負荷を増大させることなく、ハードウェアによる論理回路で構成した通信コントローラ10によって、送信データの、ネットワーク3への送信順序および実送信時刻RTTを制御することができるとの効果を奏する。
Although details will be described later, the
図1に例示する通信コントローラ10は、機能ブロックとして、IF11、DMAC12、ディスクリプタ実行管理部13、2つ以上のディスクリプタメモリ14、2つ以上のリクエスタ15、BUF管理部16、調停部17、および、送信ポート18を備える。
The
IF11は、通信コントローラ10(特に、DMAC12)が、メインメモリ20およびCPU30の各々と通信するためのインターフェースである。
The IF 11 is an interface through which the communication controller 10 (particularly the DMAC 12) communicates with each of the
DMAC12は、メインメモリ20と、ディスクリプタメモリ14およびバッファ162の各々との間のデータ交換を実行する。例えば、DMAC12は、CPU30によってメインメモリ20に設定されたディスクリプタデータ(送信ディスクリプタ)を読み出して、ディスクリプタメモリ14に格納する。
また、DMAC12は、送信ディスクリプタに規定されている内容に従って、メインメモリ20からバッファ162へと送信データを転送し、つまり、メインメモリ20に格納されているデータを取得して、取得したデータをバッファ162に格納する。例えば、DMAC12は、送信ディスクリプタに規定されている、「メインメモリ20のアドレス」および「送信データのデータサイズ」によって特定される送信データを、メインメモリ20から取得する。DMAC12は、送信ディスクリプタに対応する送信データを、その送信ディスクリプタに規定されている「送信時刻TT」と共に、バッファ162へと転送する。
Further, the
DMAC12は、「ディスクリプタメモリ14に格納されている送信ディスクリプタであって、ディスクリプタ実行管理部13によって読み出された(実行された)送信ディスクリプタ」に従って、メインメモリ20からバッファ162へと送信データを転送する。
The
ディスクリプタ実行管理部13は、CPU30からの送信要求があると、その送信要求に従って、メインメモリ20からバッファ162へと送信データを転送する。具体的には、ディスクリプタ実行管理部13は、リクエスタ15から「実行すべき(読み込むべき)送信ディスクリプタがある」ことを通知されると、ディスクリプタメモリ14を参照して、送信ディスクリプタを読み込む(実行する)。そして、ディスクリプタ実行管理部13は、読み込んだ送信ディスクリプタに規定されている内容をDMAC12に設定し、読み込んだ送信ディスクリプタに従って、DMAC12に、送信データをメインメモリ20からバッファ162へと転送させる。ディスクリプタ実行管理部13は、選択部131および読込部132を含んでいる。
When receiving a transmission request from the
選択部131は、リクエスタ15から「実行すべき(読み込むべき)送信ディスクリプタがある」旨を通知されると、そのリクエスタ15に対応するディスクリプタメモリ14を参照し、ディスクリプタメモリ14に格納されている送信ディスクリプタを取得する。例えば、選択部131は、第一リクエスタ15(0)から「読み込むべき送信ディスクリプタがある」ことを通知されると、第一リクエスタ15(0)に対応する第一ディスクリプタメモリ14(0)に格納されている送信ディスクリプタを取得する。同様に、選択部131は、第nリクエスタ15(n-1)から「読み込むべき送信ディスクリプタがある」ことを通知されると、第nリクエスタ15(n-1)に対応する第nディスクリプタメモリ14(n-1)に格納されている送信ディスクリプタを取得する。
When the
選択部131は、リクエスタ15からの「読み込むべき送信ディスクリプタがある」旨の通知に応じて、そのリクエスタ15に対応するディスクリプタメモリ14から送信ディスクリプタを取得し、取得した送信ディスクリプタを読込部132に通知する。
In response to a notification from the requester 15 that there is a transmission descriptor to be read, the
選択部131は、複数のリクエスタ15の各々から略同時に「読み込むべき送信ディスクリプタがある」ことを通知されると、読み込む(実行する)送信ディスクリプタの順序を決定し、つまり、優先的に読み込む送信ディスクリプタを1つずつ選択する。そして、選択部131は、選択した送信ディスクリプタを読込部132に通知する。
When the
具体的には、選択部131は、複数のリクエスタ15の各々から略同時に「読み込むべき送信ディスクリプタがある」ことを通知されると、複数のリクエスタ15の各々に対応するディスクリプタメモリ14を参照する。そして、選択部131は、「各々が、複数のリクエスタ15の各々に対応する」複数のディスクリプタメモリ14の各々に格納されている送信ディスクリプタを取得する。
Specifically, when the
選択部131は、「各々が、複数のディスクリプタメモリ14の各々に格納されている」複数の送信ディスクリプタの各々の、「送信時刻TTおよび優先度Pの少なくとも一方」を取得する。そして、選択部131は、複数の送信ディスクリプタの各々の「送信時刻TTおよび優先度Pの少なくとも一方」に基づいて、それら複数の送信ディスクリプタの読込順序を決定し、つまり、それら複数の送信ディスクリプタの実行順序を決定する。具体的には、選択部131は、複数の送信ディスクリプタの各々の「送信時刻TTおよび優先度Pの少なくとも一方」に基づいて、それら複数の送信ディスクリプタの中から、優先的に(つまり、より早く)読み込む送信ディスクリプタを1つずつ選択する。
The
例えば、選択部131は、第一リクエスタ15(0)および第二リクエスタ15(1)の各々から、略同時に、「読み込むべき送信ディスクリプタがある」ことを通知されると、以下の処理を実行する。すなわち、選択部131は、第一リクエスタ15(0)に対応する第一ディスクリプタメモリ14(0)を参照して、第一ディスクリプタメモリ14(0)に格納されている送信ディスクリプタ(例えば、ディスクリプタA)を取得する。同様に、選択部131は、第二リクエスタ15(1)に対応する第二ディスクリプタメモリ14(1)を参照して、第二ディスクリプタメモリ14(1)に格納されている送信ディスクリプタ(例えば、ディスクリプタB)を取得する。
For example, when the
選択部131は、ディスクリプタAおよびディスクリプタBの各々の「送信時刻TTおよび優先度Pの少なくとも一方」を取得する。そして、選択部131は、ディスクリプタAおよびディスクリプタBの各々の「送信時刻TTおよび優先度Pの少なくとも一方」に基づいて、ディスクリプタAおよびディスクリプタBの読込順序を決定する。
The
具体的には、選択部131は、ディスクリプタAおよびディスクリプタBの各々の「送信時刻TTおよび優先度Pの少なくとも一方」に基づいて、ディスクリプタAおよびディスクリプタBのうち、先に読み込む送信ディスクリプタを選択する。そして、選択部131は、選択した送信ディスクリプタを読込部132に通知する。選択部131は、ディスクリプタAおよびディスクリプタBのうち、先に読み込む送信ディスクリプタとしてディスクリプタAを選択すると、ディスクリプタAを読込部132に通知する。また、選択部131は、ディスクリプタAおよびディスクリプタBのうち、先に読み込む送信ディスクリプタとしてディスクリプタBを選択すると、ディスクリプタBを読込部132に通知する。
Specifically, the
読込部132は、選択部131から送信ディスクリプタを通知されると、通知された送信ディスクリプタを読み込み、つまり、選択部131から通知された送信ディスクリプタを実行する。読込部132は、読み込んだ送信ディスクリプタに規定されている内容をDMAC12に設定し、つまり、読み込んだ送信ディスクリプタに規定されている内容をDMAC12に通知する。そして、読込部132は、DMAC12に、読み込んだ送信ディスクリプタに規定されている内容に従った転送処理を実行させ、つまり、DMAC12に、読み込んだ送信ディスクリプタに従って送信データをメインメモリ20からバッファ162へと転送させる。
When the
ディスクリプタメモリ14には、送信ディスクリプタ(ディスクリプタデータ)が、FIFO(first in, first out、先入れ先出し)方式で格納される。CPU30が、ディスクリプタデータのメインメモリ20への設定(格納)を完了して、通信コントローラ10に送信要求を発行すると、通信コントローラ10は、メインメモリ20からディスクリプタデータを読み出してディスクリプタメモリ14に格納する。
The
リクエスタ15は、要求レジスタを含んでおり、対応するディスクリプタメモリ14に送信ディスクリプタが格納されると、リクエスタ15の要求レジスタには「1」が格納される。要求レジスタに「1」が格納されている間、リクエスタ15は、ディスクリプタ実行管理部13(特に、選択部131)に、「実行すべき(読み込むべき)送信ディスクリプタがある」ことを通知し続ける。
The requester 15 includes a request register, and when a transmission descriptor is stored in the
また、対応するディスクリプタメモリ14に格納されている送信ディスクリプタが読み込まれ、その送信ディスクリプタに対応するデータのバッファ162への転送が完了すると、リクエスタ15の要求レジスタには「0」が格納される。要求レジスタに「0」が格納されている間、リクエスタ15は、ディスクリプタ実行管理部13(特に、選択部131)に、「実行すべき送信ディスクリプタがない」ことを通知し、または、「実行すべき送信ディスクリプタがある」ことを通知しない。
Further, when the transmission descriptor stored in the
例えば、ディスクリプタAが第一ディスクリプタメモリ14(0)に格納されると、第一ディスクリプタメモリ14(0)に対応する第一リクエスタ15(0)の要求レジスタには「1」が格納される。そして、ディスクリプタAが読み込まれ、ディスクリプタAに対応するデータのバッファ162への転送が完了すると、第一ディスクリプタメモリ14(0)の要求レジスタには「0」が格納される。
For example, when descriptor A is stored in the first descriptor memory 14(0), "1" is stored in the request register of the first requester 15(0) corresponding to the first descriptor memory 14(0). Then, when descriptor A is read and the transfer of the data corresponding to descriptor A to the
同様に、ディスクリプタBが第二ディスクリプタメモリ14(1)に格納されると、第二ディスクリプタメモリ14(1)に対応する第二リクエスタ15(1)の要求レジスタには「1」が格納される。そして、ディスクリプタBが読み込まれ、ディスクリプタBに対応するデータのバッファ162への転送が完了すると、第二ディスクリプタメモリ14(1)の要求レジスタには「0」が格納される。
Similarly, when descriptor B is stored in the second descriptor memory 14(1), "1" is stored in the request register of the second requester 15(1) corresponding to the second descriptor memory 14(1). . Then, when descriptor B is read and the transfer of the data corresponding to descriptor B to the
リクエスタ15はさらに、設定レジスタ151を含んでいる。設定レジスタ151には、CPU30から通信コントローラ10へと通知される、「実行個数」および「実行番号」が格納される。「実行個数」および「実行番号」について、詳細は後述する。
BUF管理部16は、送信データの送信順序および実送信時刻RTTを制御し、具体的には、送信データを、その送信データについて設定されている送信時刻TTに、ネットワーク3へと送信し、または、送信しようとする。BUF管理部16は、時刻指定送信管理部161およびバッファ162を含んでいる。
The
時刻指定送信管理部161は、バッファ162に格納されている送信データを、その送信データについて設定されている送信時刻TTで送信し、つまり、その送信データに対応する送信ディスクリプタで規定されている送信時刻TTで送信する。具体的には、時刻指定送信管理部161は、データ(送信データ)がバッファ162に格納されていると、その送信データに対応する送信ディスクリプタで規定されている送信時刻TTを確認する。そして、時刻指定送信管理部161は、現在時刻CTが確認した送信時刻TTになると、送信リクエストを調停部17に出力する。時刻指定送信管理部161は、送信リクエストを受け付けた調停部17からのレスポンスとして、アクセス許可があると、その送信データをネットワーク3に送信する。
The time-specified
バッファ162は、メインメモリ20に格納されているデータ(送信データ)をネットワーク3へと送信するために、送信データ(受信データ)を一時的に保持しておく。バッファ162には、ネットワーク3へと送信される送信データが、DMAC12によってFIFO(first in, first out、先入れ先出し)方式で格納される。
The
調停部17は、ネットワーク3への複数の送信リクエストを調整し、つまり、複数のバッファ162の各々に格納されている送信データの送信時刻TTが略同時となった場合に、いずれの送信データの時刻送信を優先すべきかを決定する。
言い換えれば、調停部17は、複数のバッファ162の各々に格納されている送信データに係る送信リクエストを略同時に受け付けると、アクセス許可を与える送信リクエストを選択する。
The
In other words, upon receiving transmission requests related to transmission data stored in each of the plurality of
ここで、バッファ162が、通常送信バッファと特別送信バッファとに大別され、通常送信バッファおよび特別送信バッファの各々に格納されている送信データに係る送信リクエストを略同時に受け付けると、調停部17は、以下の処理を実行する。すなわち、調停部17は、特別送信バッファに格納されている送信データに係る送信リクエストを、通常送信バッファに格納されている送信データに係る送信リクエストよりも優先する。つまり、調停部17は、特別送信バッファに格納されている送信データに係る送信リクエストにアクセス許可を与える。
Here, when the
§3.動作例
(通信コントローラによって実行される処理の全体概要)
図3は、通信コントローラ10の実行する処理の概要を説明するフロー図である。
図3に示すように、先ず、ディスクリプタ実行管理部13(特に、選択部131)は、複数のディスクリプタの各々において規定されている、送信時刻TTおよび優先度Pの少なくとも一方を取得する(S10)。そして、選択部131は、取得した「複数のディスクリプタの各々の、送信時刻TTおよび優先度Pの少なくとも一方」に基づいて、複数のディスクリプタの中から、読み込むディスクリプタを選択する(S20)。選択部131は、読み込むディスクリプタを選択すると、選択したディスクリプタを、読込部132に通知する。
§3. Operation example (Overview of processing executed by the communication controller)
FIG. 3 is a flow diagram illustrating an overview of processing executed by the
As shown in FIG. 3, first, the descriptor execution management unit 13 (in particular, the selection unit 131) acquires at least one of the transmission time TT and priority P defined in each of the plurality of descriptors (S10). . Then, the
読込部132は、選択部131によって選択されたディスクリプタを読み込む(S30)。読込部132は、読み込んだディスクリプタに規定されているアドレス(メインメモリ20における格納先アドレス)、送信データのデータサイズ等を、DMAC12に設定する(S40)。
The
DMAC12は、S40において設定された内容に従って、メインメモリ20に格納されている送信データをバッファ162へと転送する(すなわち、送信データをバッファ162に格納する)(S50)。そして、BUF管理部16は、バッファ162に格納されている送信データを送信する(S60)。
The
これまで図3を用いて説明してきた通信コントローラ10の実行する処理は、以下のように整理することができる。すなわち、通信コントローラ10の実行する処理(制御方法)は、読み込んだ送信ディスクリプタに従ってメインメモリ20からバッファ162へとデータ(送信データ)を転送し、バッファ162に転送されたデータを送信する通信制御機器の制御方法である。
The processing executed by the
通信コントローラ10の実行する制御方法は、選択ステップ(S20)と、読込ステップ(S30)と、を含んでいる。選択ステップは、複数の送信ディスクリプタの各々において規定されている、「送信時刻TT」および「優先度P」の少なくとも一方に基づいて、複数の送信ディスクリプタの中から、読み込むディスクリプタを選択する処理である。すなわち、選択ステップは、複数の送信ディスクリプタの各々において規定されている、「送信時刻TTおよび優先度Pの少なくとも一方」に基づいて、複数の送信ディスクリプタの中から、実行する送信ディスクリプタを選択する処理である。また、読込ステップは、選択ステップにて選択された送信ディスクリプタを読み込む処理であり、つまり、選択ステップにて選択された送信ディスクリプタを実行する処理である。
The control method executed by the
前記の構成によれば、通信コントローラ10の実行する制御方法は、複数の送信ディスクリプタの各々において規定されている、送信時刻TTおよび優先度Pの少なくとも一方に基づいて、複数の送信ディスクリプタの中から、読み込むディスクリプタを選択する。そして、通信コントローラ10の実行する制御方法は、選択した送信ディスクリプタを読み込み、読み込んだ送信ディスクリプタに従って、メインメモリ20からバッファ162へと送信データを転送する。つまり、通信コントローラ10の実行する制御方法は、複数の送信ディスクリプタの中から、読み込むべきディスクリプタを、複数の送信ディスクリプタの各々の送信時刻TTおよび優先度Pの少なくとも一方に基づいて、1つずつ選択する。
According to the above configuration, the control method executed by the
そのため、前記制御方法を実行する通信コントローラ10は、各々がDMACおよび送信バッファを含む、複数の送信キューを備える必要がなく、通信コントローラ10の実装サイズを小さくすることができる。
Therefore, the
また、前記制御方法(つまり、通信コントローラ10の実行する制御方法)は、複数の送信ディスクリプタの読込順序を制御することによって、ソフトウェア(プロセッサ)による処理結果の出力等を、具体的には、前記データの送信順序を制御する。つまり、ソフトウェアは、前記制御方法を実行する通信コントローラ10を、「送信データの、送信順序および実送信時刻RTT」の管理を行う送信キューを複数備えた、1つのハードウェアとして扱うことができる。そのため、前記制御方法は、処理結果の出力制御(例えば、「送信データの、送信順序および実送信時刻RTT」の管理)等に係るソフトウェアの処理負荷を低減することができる。
Further, the control method (that is, the control method executed by the communication controller 10) controls the output of processing results by software (processor) by controlling the reading order of a plurality of transmission descriptors. Control the order in which data is sent. That is, the software can treat the
したがって、通信コントローラ10の実行する制御方法は、通信コントローラ10の実装サイズを抑制しつつ、ソフトウェアの処理負荷を低減することができるとの効果を奏する。
Therefore, the control method executed by the
上述の通り、通信コントローラ10は、送信時刻TTおよび優先度Pの少なくとも一方を用いて、読み込むべきディスクリプタ(つまり、実行すべきディスクリプタ)を選択し、つまり、複数のディスクリプタの読込順序(実行順序)を制御する。したがって、通信コントローラ10は、実装サイズを抑制しつつ、ソフトウェア(つまり、CPU30)の処理負荷を、特に、「送信データの、送信順序および実送信時刻RTT」の管理に係る処理負荷を、低減することができる。
As described above, the
ここで、通信コントローラ10の開発者はさらに、以下のケース1、ケース2、および、ケース3を想定して、通信コントローラ10がこれら3つのケースに直面した場合にも、読み込むべきディスクリプタを好適に選択できるように工夫した。以下、詳細を説明する。
Here, the developer of the
(ケース1において、優先度のみでディスクリプタを選択した場合について)
図4は、ケース1において、ディスクリプタ中の優先度Pのみに基づいて、先に実行すべき(つまり、先に読み込むべき)ディスクリプタを選択した場合に発生する状況を説明する図である。ケース1では、低い優先度Pが設定されているディスクリプタの規定する送信時刻TT(低優先)が、高い優先度Pが設定されているディスクリプタの規定する送信時刻TT(高優先)より早く、かつ、両者の送信時刻TTの間の時間間隔が大きい。以下では、低い優先度Pが設定されているディスクリプタを「低優先ディスクリプタ」と称し、また、高い優先度Pが設定されているディスクリプタを「高優先ディスクリプタ」と称することがある。図4において、通信コントローラ10は、「NIC(Network Interface Card、ネットワーク・インターフェイス・カード)」と略記されている。
(In
FIG. 4 is a diagram illustrating a situation that occurs when, in
図4に例示するケース1において、TX0、つまり、第一ディスクリプタメモリ14(0)には、送信データD(0)の送信時刻TT(0)として「9:05」を規定し、送信データD(0)の優先度Pとして「1」を規定したディスクリプタが格納されている。また、TX1、つまり、第二ディスクリプタメモリ14(1)には、送信データD(1)の送信時刻TT(1)として「9:00」を規定し、送信データD(1)の優先度Pとして「2」を規定したディスクリプタが格納されている。
In
つまり、ケース1において、TX0には高優先ディスクリプタが格納され、TX1には低優先ディスクリプタが格納されている。TX0に格納されている高優先ディスクリプタが規定する、送信データD(0)の「送信時刻TT(0)」は「9:05」であり、TX1に格納されている低優先ディスクリプタが規定する、送信データD(1)の「送信時刻TT(1)」は「9:00」である。低優先ディスクリプタの規定する送信時刻TT(1):「9:00」は、高優先ディスクリプタの規定する送信時刻TT(0):「9:05」より早い。また、送信データD(1)の送信時刻TT(1):「9:00」と、送信データD(0)の送信時刻TT(0):「9:05」との間の時間間隔は「5」であり、両者の送信時刻TTの間の時間間隔は大きい。つまり、低優先ディスクリプタの規定する送信時刻TT(低優先)が、高優先ディスクリプタの規定する送信時刻TT(高優先)よりも早く、かつ、送信時刻TT(低優先)と送信時刻TT(高優先)との間の時間間隔が大きい。
That is, in
ケース1において、ディスクリプタの規定する「優先度P」だけで、先に実行するディスクリプトを選択した場合、TX0に格納されている高優先ディスクリプタが、TX1に格納されている低優先ディスクリプタよりも先に実行される。
In
低優先ディスクリプタよりも先に高優先ディスクリプタが実行されることで、高優先ディスクリプタに対応するデータD(0)は、低優先ディスクリプタに対応するデータD(1)よりも先に、バッファ162(BUF)に格納される。 Since the high-priority descriptor is executed before the low-priority descriptor, data D(0) corresponding to the high-priority descriptor is stored in the buffer 162 (BUF) before data D(1) corresponding to the low-priority descriptor. ).
図4に示す例では、データD(0)がBUF0、つまり、第一バッファ162(0)に格納された後に、データD(1)は、BUF1、つまり、第二バッファ162(1)に格納されている。なお、データD(0)を格納するバッファ162と、データD(1)を格納するバッファ162とを分けることは必須ではなく、両者は同じバッファ162に格納されてもよい。例えば、データD(0)とデータD(1)とは、各々に対応するディスクリプタが実行された(読み込まれた)順で、同じバッファ162に格納されてもよい。図4では、データD(0)が、データD(1)よりも先に、バッファ162(BUF)に格納されることを理解しやすいように、データD(0)をBUF0に格納し、データD(1)をBUF1に格納する例を示したに過ぎない。
In the example shown in FIG. 4, after data D(0) is stored in BUF0, that is, the first buffer 162(0), data D(1) is stored in BUF1, that is, the second buffer 162(1). has been done. Note that it is not essential to separate the
データD(1)よりも先にデータD(0)がバッファ162に格納されることで、データD(1)のネットワーク3への送信は、データD(0)がネットワーク3へと送信された後に実行される。つまり、送信データD(0)が、その送信時刻TT(0):「9:05」にネットワーク3へと送信された後に、データD(1)のネットワーク3への送信が実行される。そのため、送信データD(1)を、その送信時刻TT(1)である「9:00」に、ネットワーク3へと送信することはできない。
Since data D(0) is stored in the
(ケース2において、送信時刻のみでディスクリプタを選択した場合について)
図5は、ケース2において、ディスクリプタ中の送信時刻TTのみに基づいて、先に実行すべき(つまり、先に読み込むべき)ディスクリプタを選択した場合に発生する状況を説明する図である。ケース2では、低優先ディスクリプタの規定する送信時刻TT(低優先)が、高優先ディスクリプタの規定する送信時刻TT(高優先)より早く、かつ、送信時刻TT(低優先)と送信時刻TT(高優先)との間の時間間隔が小さい。図5において、通信コントローラ10は、「NIC」と略記されている。
(In
FIG. 5 is a diagram illustrating a situation that occurs when, in
図5に例示するケース2において、TX0には、送信データD(0)の「送信時刻TT(0)」として「9:01」を規定し、送信データD(0)の「優先度P」として「1」を規定したディスクリプタが格納されている。また、TX1には、送信データD(1)の「送信時刻TT(1)」として「9:00」を規定し、送信データD(1)の「優先度P」として「2」を規定したディスクリプタが格納されている。
In
つまり、ケース2において、TX0には高優先ディスクリプタが格納され、TX1には低優先ディスクリプタが格納されている。TX0に格納されている高優先ディスクリプタが規定する、送信データD(0)の「送信時刻TT(0)」は「9:01」であり、TX1に格納されている低優先ディスクリプタが規定する、送信データD(1)の「送信時刻TT(1)」は「9:00」である。低優先ディスクリプタの規定する送信時刻TT(0):「9:00」は、高優先ディスクリプタの規定する送信時刻TT(1):「9:01」より早い。また、送信データD(1)の送信時刻TT(1):「9:00」と送信データD(0)の送信時刻TT(0):「9:01」との間の時間間隔は「1」であり、送信時刻TT(1)と送信時刻TT(0)との間の時間間隔は小さい。つまり、低優先ディスクリプタの規定する送信時刻TT(低優先)が、高優先ディスクリプタの規定する送信時刻TT(高優先)よりも早く、かつ、送信時刻TT(低優先)と送信時刻TT(高優先)との間の時間間隔が小さい。
That is, in
ケース2において、ディスクリプタの規定する「送信時刻TT」だけで、実行するディスクリプトを選択した場合、TX1に格納されている低優先ディスクリプタが、TX0に格納されている高優先ディスクリプタよりも先に実行される。
In
高優先ディスクリプタよりも先に低優先ディスクリプタが実行されることで、低優先ディスクリプタに対応するデータD(1)は、高優先ディスクリプタに対応するデータD(0)よりも先に、バッファ162(BUF)に格納される。 Since the low priority descriptor is executed before the high priority descriptor, data D(1) corresponding to the low priority descriptor is transferred to the buffer 162 (BUF) before data D(0) corresponding to the high priority descriptor. ).
図5に示す例では、データD(1)がBUF1、つまり、第二バッファ162(1)に格納された後に、データD(0)は、BUF0、つまり、第一バッファ162(0)に格納されている。なお、データD(0)を格納するバッファ162と、データD(1)を格納するバッファ162とを分けることは必須ではなく、両者は同じバッファ162に格納されてもよい。例えば、データD(0)とデータD(1)とは、各々に対応するディスクリプタが実行された(読み込まれた)順で、同じバッファ162に格納されてもよい。図5では、データD(1)が、データD(0)よりも先に、バッファ162(BUF)に格納されることを理解しやすいように、データD(0)をBUF0に格納し、データD(1)をBUF1に格納する例を示したに過ぎない。
In the example shown in FIG. 5, after data D(1) is stored in BUF1, that is, the second buffer 162(1), data D(0) is stored in BUF0, that is, the first buffer 162(0). has been done. Note that it is not essential to separate the
データD(0)よりも先にデータD(1)がバッファ162に格納されることで、データD(0)のネットワーク3への送信は、データD(1)がネットワーク3へと送信された後に実行される。つまり、送信データD(1)が、その送信時刻TT(1):「9:00」にネットワーク3へと送信された後に、データD(0)のネットワーク3への送信が実行される。そのため、送信データD(0)を、その送信時刻TT(0)である「9:01」に、ネットワーク3へと送信することはできない。
By storing data D(1) in the
(ケース1およびケース2を想定した工夫)
通信コントローラ10の開発者は、上述のケース1およびケース2のいずれにおいても、通信コントローラ10が読み込むべきディスクリプタを好適に選択できるように、通信コントローラ10について、更なる工夫を施した。
(
The developer of the
具体的には、通信コントローラ10は、「低優先ディスクリプタの規定する送信時刻TT(低優先)が、高優先ディスクリプタの規定する送信時刻TT(高優先)より早い」場合、以下の処理を実行する。すなわち、通信コントローラ10は、現在時刻CTに、高優先ディスクリプタに対応するデータ(高優先データ)の転送時間RTと、低優先ディスクリプタに対応するデータ(低優先データ)の転送時間RTとを加えた時刻(予定合計時刻ERT)を算出する。言い換えれば、通信コントローラ10は、「予定合計時刻ERT = 現在時刻CT +高優先データの転送時間RT + 低優先データの転送時間RT」を算出する。「転送時間RT」とは、或るデータ(或る送信データ)を、メインメモリ20からバッファ162へと転送するのに要する時間(期間)である。
Specifically, the
次に、通信コントローラ10は、算出した予定合計時刻ERTと、高優先データの送信時刻TT(高優先)とを比較する。
Next, the
ここで、予定合計時刻ERTが送信時刻TT(高優先)より大きい(遅い)場合、通信コントローラ10は、低優先データをバッファ162へ転送した後であっても、高優先データのバッファ162への転送を、送信時刻TT(高優先)に間に合わせられる。つまり、予定合計時刻ERTが送信時刻TT(高優先)より遅い場合、通信コントローラ10は、低優先データをバッファ162へ転送した後であっても、送信時刻TT(高優先)前に、高優先データをバッファ162へ転送することができる。
Here, if the scheduled total time ERT is larger (later) than the transmission time TT (high priority), the
したがって、予定合計時刻ERTが送信時刻TT(高優先)より遅い場合、通信コントローラ10は、低優先ディスクリプタを選択して低優先ディスクリプタを実行した(読み込んだ)後、高優先ディスクリプタを実行する(読み込む)。
Therefore, if the scheduled total time ERT is later than the transmission time TT (high priority), the
また、予定合計時刻ERTが送信時刻TT(高優先)より小さい(早い)場合、通信コントローラ10は、低優先データをバッファ162へ転送した後では、高優先データのバッファ162への転送を、送信時刻TT(高優先)に間に合わせることができない。つまり、予定合計時刻ERTが送信時刻TT(高優先)より早い場合、通信コントローラ10は、低優先データをバッファ162へ転送した後では、送信時刻TT(高優先)前に、高優先データをバッファ162へ転送することができない。
Further, if the scheduled total time ERT is smaller (earlier) than the transmission time TT (high priority), the
したがって、予定合計時刻ERTが送信時刻TT(高優先)より早い場合、通信コントローラ10は、高優先ディスクリプタを選択して高優先ディスクリプタを実行した(読み込んだ)後、低優先ディスクリプタを実行する(読み込む)。
Therefore, if the scheduled total time ERT is earlier than the transmission time TT (high priority), the
図6は、選択部131が優先度Pと送信時刻TTとの双方を考慮して実行する選択処理(読み込むべきディスクリプタを、つまり、実行すべきディスクリプタを、選択する処理)の一例を示すフロー図である。具体的には、図6は、選択部131の実行する、「高優先ディスクリプタと低優先ディスクリプタとのうち、どちらのディスクリプタを先に実行すべきか(先に読み込むべきか)を選択する」処理の詳細を説明するフロー図である。
FIG. 6 is a flow diagram illustrating an example of a selection process (process of selecting a descriptor to be read, that is, a descriptor to be executed) executed by the
図6に示すように、先ず、選択部131は、高優先ディスクリプタの送信時刻TT(高優先)と比べて、低優先ディスクリプタの送信時刻TT(低優先)の方が早いかを判定する(S110)。「送信時刻TT(高優先)の方が、送信時刻TT(低優先)よりも早い、または、両者が同じ」場合(S110でNO)、選択部131は、高優先ディスクリプタと低優先ディスクリプタとのうち、高優先ディスクリプタを選択する(S140)。
As shown in FIG. 6, the
「送信時刻TT(低優先)の方が、送信時刻TT(高優先)よりも早い」場合(S110でYES)、選択部131は予定合計時刻ERTを算出する(S120)。前述の通り、予定合計時刻ERTは、現在時刻CTに、低優先ディスクリプタに対応するデータの転送時間RT(低優先)と、高優先ディスクリプタに対応するデータの転送時間RT(高優先)とを加えた時刻である。
If "the transmission time TT (low priority) is earlier than the transmission time TT (high priority)" (YES in S110), the
そして、選択部131は、「高優先ディスクリプタに規定されている送信時刻TT(高優先)よりも、予定合計時刻ERTが大きいか(予定合計時刻ERTが遅い)」を判定する(S130)。「送信時刻TT(高優先)よりも、予定合計時刻ERTが遅い」場合(S130でYES)、選択部131は、高優先ディスクリプタと低優先ディスクリプタとのうち、高優先ディスクリプタを選択する(S140)。
Then, the
「送信時刻TT(高優先)よりも、予定合計時刻ERTが早い、または、両者が同じ」場合(S130でNO)、選択部131は、高優先ディスクリプタと低優先ディスクリプタとのうち、低優先ディスクリプタを選択する(S140)。
If "the scheduled total time ERT is earlier than the transmission time TT (high priority), or the two are the same" (NO in S130), the
(ケース1およびケース2について、本実施形態に係る通信コントローラの選択結果)
図7は、選択部131が図6に例示したフローを実行することにより、選択部131によって選択されるディスクリプタを説明する図である。
(Results of selection of communication controller according to this embodiment for
FIG. 7 is a diagram illustrating descriptors selected by the
前述の通り、ケース1において、TX0には、送信データD(0)の「送信時刻TT(0)」として「9:05」を規定し、送信データD(0)の「優先度P」として「1」を規定した高優先ディスクリプタが格納されている。また、TX1には、送信データD(1)の「送信時刻TT(1)」として「9:00」を規定し、送信データD(1)の「優先度P」として「2」を規定した低優先ディスクリプタが格納されている。
As mentioned above, in
ここで、高優先ディスクリプタに対応するデータ(高優先データ)の、メインメモリ20からバッファ162への転送に要する転送時間RT(高優先)は、「2」である。また、低優先ディスクリプタに対応するデータ(低優先データ)の、メインメモリ20からバッファ162への転送に要する転送時間RT(低優先)は、「2」である。そして、現在時刻CTは「08:58」である。そのため、低優先ディスクリプタを実行した後に高優先ディスクリプタを実行した場合に、高優先データの、メインメモリ20からバッファ162への転送が完了する時刻(すなわち、予定合計時刻ERT)は、「09:02」となる。
Here, the transfer time RT (high priority) required to transfer the data corresponding to the high priority descriptor (high priority data) from the
ここで、予定合計時刻ERT「09:02」は、送信時刻TT(高優先):「9:05」よりも早い。したがって、選択部131は、高優先ディスクリプタと低優先ディスクリプタとのうち、低優先ディスクリプタ(TX1に格納されているディスクリプタ)を選択し、通信コントローラ10は、先ず、低優先ディスクリプタを実行する(読み込む)。
Here, the scheduled total time ERT "09:02" is earlier than the transmission time TT (high priority): "9:05". Therefore, the
前述の通り、ケース2において、TX0には、送信データD(0)の「送信時刻TT(0)」として「9:01」を規定し、送信データD(0)の「優先度P」として「1」を規定した高優先ディスクリプタが格納されている。また、TX1には、送信データD(1)の「送信時刻TT(1)」として「9:00」を規定し、送信データD(1)の「優先度P」として「2」を規定した低優先ディスクリプタが格納されている。
As mentioned above, in
ここで、高優先ディスクリプタに対応するデータ(高優先データ)の、メインメモリ20からバッファ162への転送に要する転送時間RT(高優先)は、「2」である。また、低優先ディスクリプタに対応するデータ(低優先データ)の、メインメモリ20からバッファ162への転送に要する転送時間RT(低優先)は、「2」である。そして、現在時刻CTは「08:58」である。そのため、低優先ディスクリプタを実行した後に高優先ディスクリプタを実行した場合に、高優先データの、メインメモリ20からバッファ162への転送が完了する時刻(すなわち、予定合計時刻ERT)は、「09:02」となる。
Here, the transfer time RT (high priority) required to transfer the data corresponding to the high priority descriptor (high priority data) from the
ここで、予定合計時刻ERT「09:02」は、送信時刻TT(高優先):「9:01」よりも遅い。したがって、選択部131は、高優先ディスクリプタと低優先ディスクリプタとのうち、高優先ディスクリプタ(TX0に格納されているディスクリプタ)を選択し、通信コントローラ10は、先ず、高優先ディスクリプタを実行する(読み込む)。
Here, the scheduled total time ERT "09:02" is later than the transmission time TT (high priority): "9:01". Therefore, the
(ケース1について、優先度と送信時刻とを考慮してディスクリプタを選択した場合)
図8は、ケース1について、図6に例示したフローを実行した場合の具体的処理例を示す図である。前述の通り、低優先ディスクリプタを実行した後に高優先ディスクリプタを実行した場合に、高優先データの、メインメモリ20からバッファ162への転送が完了する時刻(すなわち、予定合計時刻ERT)は、「09:02」となる。そして、予定合計時刻ERT「09:02」は、ケース1において高優先ディスクリプタに規定されている送信時刻TT(高優先):「9:05」よりも早い。
(For
FIG. 8 is a diagram showing a specific example of processing when the flow illustrated in FIG. 6 is executed for
したがって、選択部131は、高優先ディスクリプタと低優先ディスクリプタとのうち、低優先ディスクリプタ(TX1に格納されているディスクリプタ)を選択し、通信コントローラ10は、先ず、低優先ディスクリプタを実行する(読み込む)。
Therefore, the
高優先ディスクリプタよりも先に低優先ディスクリプタが実行されることで、低優先ディスクリプタに対応するデータD(1)は、高優先ディスクリプタに対応するデータD(0)よりも先に、バッファ162(BUF)に格納される。 Since the low priority descriptor is executed before the high priority descriptor, data D(1) corresponding to the low priority descriptor is transferred to the buffer 162 (BUF) before data D(0) corresponding to the high priority descriptor. ).
したがって、バッファ162に先に格納されたデータD(1)が送信された後に、データD(1)よりも後にバッファ162に格納されたデータD(0)が送信される。具体的には、通信コントローラ10(特に、時刻指定送信管理部161)は、バッファ162に先に格納されたデータD(1)を、送信データD(1)の「送信時刻TT(1)」である「9:00」に、送信する。そして、通信コントローラ10(特に、時刻指定送信管理部161)は、データD(1)の送信後、データD(1)よりも後にバッファ162に格納されたデータD(0)を、送信データD(0)の「送信時刻TT(0)」である「9:05」に、送信する。
Therefore, after the data D(1) stored in the
したがって、ケース1において、通信コントローラ10は、低優先ディスクリプタの送信時刻TT(低優先)通りに、低優先データを送信し、かつ、高優先ディスクリプタの送信時刻TT(高優先)通りに、高優先データを送信することができる。
Therefore, in
(ケース2について、優先度と送信時刻とを考慮してディスクリプタを選択した場合)
図9は、ケース2について、図6に例示したフローを実行した場合の具体的処理例を示す図である。前述の通り、低優先ディスクリプタを実行した後に高優先ディスクリプタを実行した場合に、高優先データの、メインメモリ20からバッファ162への転送が完了する時刻(すなわち、予定合計時刻ERT)は、「09:02」となる。そして、予定合計時刻ERT「09:02」は、ケース2において高優先ディスクリプタに規定されている送信時刻TT(高優先):「9:01」よりも遅い。
(For
FIG. 9 is a diagram showing a specific example of processing when the flow illustrated in FIG. 6 is executed for
したがって、選択部131は、高優先ディスクリプタと低優先ディスクリプタとのうち、高優先ディスクリプタ(TX0に格納されているディスクリプタ)を選択し、通信コントローラ10は、先ず、高優先ディスクリプタを実行する(読み込む)。
Therefore, the
低優先ディスクリプタよりも先に高優先ディスクリプタが実行されることで、高優先ディスクリプタに対応するデータD(0)は、低優先ディスクリプタに対応するデータD(1)よりも先に、バッファ162(BUF)に格納される。 Since the high-priority descriptor is executed before the low-priority descriptor, data D(0) corresponding to the high-priority descriptor is stored in the buffer 162 (BUF) before data D(1) corresponding to the low-priority descriptor. ).
したがって、バッファ162に先に格納されたデータD(0)が送信された後に、データD(0)よりも後にバッファ162に格納されたデータD(1)が送信される。具体的には、通信コントローラ10(特に、時刻指定送信管理部161)は、バッファ162に先に格納されたデータD(0)を、送信データD(0)の「送信時刻TT(0)」である「9:01」に、送信する。そして、通信コントローラ10(特に、時刻指定送信管理部161)は、データD(0)の送信後、データD(0)よりも後にバッファ162に格納されたデータD(1)を、できるだけ早いタイミングで、送信する。
Therefore, after the data D(0) stored in the
したがって、ケース2において、通信コントローラ10は、高優先ディスクリプタの送信時刻TT(高優先)通りに、高優先データを送信し、また、低優先データについても、できるだけ早い時間に送信することができる。
Therefore, in
これまで図4から図9を用いて説明してきた内容は、以下のように整理することができる。すなわち、通信コントローラ10について、複数の送信ディスクリプタの中の或る送信ディスクリプタの優先度Pが、別のディスクリプタの優先度Pよりも高い場合、選択部131は、以下の処理を実行する。先ず選択部131は、「現在時刻CTに、その或る送信ディスクリプタに対応するデータの転送時間RTと、その別のディスクリプタに対応するデータの転送時間RTとを加えた時刻」である予定合計時刻ERTを算出する。転送時間RTとは、データ(送信データ)をメインメモリ20からバッファ162へと転送するのに要する時間である。そして、選択部131は、算出した予定合計時刻ERTと、その或る送信ディスクリプタの送信時刻TTとを比較する。
The contents that have been explained using FIGS. 4 to 9 can be summarized as follows. That is, regarding the
その或る送信ディスクリプタの送信時刻TTが、予定合計時刻ERTよりも後だと(遅いと)、選択部131は、その或る送信ディスクリプタに優先して、その別のディスクリプタを選択する。また、その或る送信ディスクリプタの送信時刻TTが、予定合計時刻ERT以前だと、選択部131は、その別のディスクリプタに優先して、その或る送信ディスクリプタを選択する。
If the transmission time TT of the certain transmission descriptor is later (later) than the scheduled total time ERT, the
前記の構成によれば、通信コントローラ10は、或る送信ディスクリプタの優先度Pが、別のディスクリプタの優先度Pよりも高いと、予定合計時刻ERTと、その或る送信ディスクリプタの送信時刻TTとを比較する。そして、その或る送信ディスクリプタの送信時刻TTが、予定合計時刻ERTよりも後だと(遅いと)、通信コントローラ10は、その或る送信ディスクリプタに優先して、その別のディスクリプタを選択する。また、その或る送信ディスクリプタの送信時刻TTが、予定合計時刻ERT以前だと、通信コントローラ10は、その別のディスクリプタに優先して、その或る送信ディスクリプタを選択する。
According to the above configuration, when the priority P of a certain transmission descriptor is higher than the priority P of another descriptor, the
ここで、複数の送信ディスクリプタの各々において規定されている優先度Pのみに基づいて読み込むべきディスクリプタを選択した場合、優先度Pが低いディスクリプタは、常に、優先度Pが高いディスクリプタよりも後に読み込まれる(実行される)ことになる。 Here, if a descriptor to be read is selected based only on the priority P specified for each of the plurality of transmission descriptors, the descriptor with a lower priority P is always read after the descriptor with a higher priority P. (to be carried out).
しかし、或る送信ディスクリプタより優先度Pが低い別のディスクリプタの送信時刻TTが、その或る送信ディスクリプタの送信時刻TTよりも十分に早い場合、優先度Pのみに従ってディスクリプタの読込順序を決定することは、必ずしも適切ではない。 However, if the transmission time TT of another descriptor whose priority P is lower than that of a certain transmission descriptor is sufficiently earlier than the transmission time TT of that certain transmission descriptor, the reading order of descriptors may be determined only according to the priority P. is not necessarily appropriate.
例えば、その別のディスクリプタに対応する送信データをメインメモリに転送した後であっても、その或る送信ディスクリプタに対応する送信データを、その或る送信ディスクリプタの送信時刻TTよりも前に、メインメモリ20へと転送できる場合がある。そのような場合、その別のディスクリプタを読み込んだ(実行した)後に、その或るディスクリプタを読み込めばよく、つまり、その別のディスクリプタを、その或る送信ディスクリプタよりも先に読み込むべきである。
For example, even after transmitting data corresponding to another descriptor is transferred to the main memory, transmitting data corresponding to a certain transmitting descriptor is transferred to the main memory before the transmitting time TT of that transmitting descriptor. In some cases, the data can be transferred to the
また、複数のディスクリプタの各々において規定されている送信時刻TTのみに基づいて、読み込むべきディスクリプタを選択した場合、送信時刻TTが遅いディスクリプタは、常に、送信時刻TTが早いディスクリプタよりも後に読み込まれることになる。 Furthermore, if a descriptor to be read is selected based only on the transmission time TT specified for each of a plurality of descriptors, a descriptor with a later transmission time TT will always be read after a descriptor with an earlier transmission time TT. become.
しかし、或るディスクリプタよりも優先度Pが低い別のディスクリプタの送信時刻TTが、その或るディスクリプタの送信時刻TTの直前である場合、送信時刻TTのみに従ってディスクリプタの読込順序を決定することは、必ずしも適切ではない。 However, if the transmission time TT of another descriptor whose priority P is lower than that of a certain descriptor is immediately before the transmission time TT of that certain descriptor, determining the reading order of descriptors only according to the transmission time TT is not possible. Not necessarily appropriate.
例えば、その別のディスクリプタに対応する送信データをメインメモリ20に転送した後では、その或る送信ディスクリプタに対応する送信データを、その或る送信ディスクリプタの送信時刻TTよりも前に、メインメモリ20へと転送できない場合がある。そのような場合、その別のディスクリプタを読み込む(実行する)前に、その或るディスクリプタを読み込まなくてはならず、つまり、その或るディスクリプタを、その別の送信ディスクリプタよりも先に読み込むべきである。
For example, after the transmission data corresponding to another descriptor is transferred to the
通信コントローラ10は、優先度Pのみに従ったディスクリプタの読込順序の決定、および、送信時刻TTのみに従ったディスクリプタの読込順序の決定の各々が有する上述の不備を補う。すなわち、複数の送信ディスクリプタの中の或る送信ディスクリプタの優先度Pが、別のディスクリプタの優先度Pよりも高い場合、通信コントローラ10は、予定合計時刻ERTと或る送信ディスクリプタの送信時刻TTとを比較する。そして、通信コントローラ10は、予定合計時刻ERTと或る送信ディスクリプタの送信時刻TTとの比較結果に基づいて、読み込むべきディスクリプタを選択し、つまり、実行するディスクリプタを選択する。
The
したがって、通信コントローラ10は、優先度Pおよび送信時刻TTのいずれか一方にのみ従って読み込むべきディスクリプタを選択する方法に比べて、読み込むべきディスクリプタを適切に選択することができるとの効果を奏する。
Therefore, the
(転送時間の算出例)
図10は、通信コントローラ10が、或る送信データについて、その転送時間RTを算出する際に用いる情報を整理した表である。具体的には、通信コントローラ10(特に、選択部131)は、或る送信データのデータサイズと、「通信コントローラ10が、データを、メインメモリ20からバッファ162へと転送する際の転送速度」とから、或る送信データの転送時間RTを計算する。
(Example of calculation of transfer time)
FIG. 10 is a table in which the
通信コントローラ10は、メインメモリ20と通信コントローラ10(特に、バッファ162)との間のデータ転送に係る理論値速度(転送レート)を、PLC1の起動時(特に、プロトコル確立時)に取得することができる。例えば、メインメモリ20と通信コントローラ10とがPCIe(Peripheral Component Interconnect Express)で接続する場合、通信コントローラ10は、PCIeの規格で保証されているレート(理論値)を、レジスタを参照して確認する。
The
ここで、「実行率」および「オーバーヘッド」の各々は、レート(理論値)ごとに、予め準備されている。具体的には、「実行率」は、通信コントローラ10の生産時(開発時)に、レート(理論値)ごとにチューニングされている。「実行率」は、PLC1の起動時に、ソフトウェア(つまり、CPU30)によって設定されてもよい。同様に、「オーバーヘッド」は、通信コントローラ10の生産時(開発時)に、レート(理論値)ごとにチューニングされている。
Here, each of the "execution rate" and "overhead" is prepared in advance for each rate (theoretical value). Specifically, the "execution rate" is tuned for each rate (theoretical value) during production (development) of the
通信コントローラ10は、確認したレート(理論値)に対応する「実行率」を取得し、レート(理論値)と実行率とから「転送速度」を算出する。また、通信コントローラ10は、レート(理論値)ごとに予め準備しておいた「オーバーヘッド」を、或るデータの転送時間RTを算出するのに利用する。
The
送信データのデータサイズ(転送サイズ)は、送信ディスクリプタに記載されているため、通信コントローラ10は、送信ディスクリプタを読み出すごとに、送信データの転送サイズを取得することができる。
Since the data size (transfer size) of the transmission data is written in the transmission descriptor, the
通信コントローラ10(特に、選択部131)は、取得した送信データの転送サイズと、レート(理論値)ごとの、「転送速度」および「オーバーヘッド」とから、以下の式を用いて、その送信データの転送時間RTを算出する。すなわち、通信コントローラ10は、「転送時間RT = {オーバーヘッド + (転送サイズ / 転送速度)}」から、送信データの転送時間RTを算出する。
The communication controller 10 (in particular, the selection unit 131) uses the following formula to select the transmission data based on the transmission size of the acquired transmission data and the "transfer speed" and "overhead" for each rate (theoretical value). Calculate the transfer time RT. That is, the
(ケース3について)
図11は、ケース3において、判定時間JT(詳細は後述する)を設けない場合に発生する状況を説明する図である。ケース3において、或るディスクリプタは、現在時刻CTから所定時間以上離れた時刻を「送信時刻TT」として規定している。図11において、通信コントローラ10は、「NIC」と略記されている。
(About case 3)
FIG. 11 is a diagram illustrating a situation that occurs when the determination time JT (details will be described later) is not provided in case 3. In case 3, a certain descriptor defines a time that is a predetermined time or more away from the current time CT as a "transmission time TT." In FIG. 11, the
図11に例示するケース3において、TX0には、送信データD(0)の「送信時刻TT(0)」として「9:10」を規定し、送信データD(0)の「優先度P」として「1」を規定したディスクリプタが格納されている。また、TX1には、送信データD(1)の「送信時刻TT(1)」として「9:00」を規定し、送信データD(1)の「優先度P」として「1」を規定したディスクリプタが格納されている。さらに、TX2、つまり、第三ディスクリプタメモリ14(2)には、送信データD(2)の「送信時刻TT(2)」として「9:00」を規定し、送信データD(2)の「優先度P」として「2」を規定したディスクリプタが格納されている。 In case 3 illustrated in FIG. 11, in TX0, "9:10" is defined as the "transmission time TT(0)" of the transmission data D(0), and "priority P" of the transmission data D(0) is specified. A descriptor that specifies "1" as "1" is stored. Furthermore, in TX1, "9:00" is defined as the "transmission time TT(1)" of the transmission data D(1), and "1" is defined as the "priority P" of the transmission data D(1). Descriptors are stored. Further, in TX2, that is, the third descriptor memory 14(2), "9:00" is defined as the "transmission time TT(2)" of the transmission data D(2), and "9:00" is defined as the "transmission time TT(2)" of the transmission data D(2). A descriptor that defines "2" as "Priority P" is stored.
ここで、「TX0に格納されている高優先ディスクリプタ」を実行した(読み込んだ)後に、「TX1に格納されている高優先ディスクリプタ」および「TX2に格納されている低優先ディスクリプタ」の各々を実行すると、図11に示す状況が発生する。なお、「TX0に格納されている高優先ディスクリプタ」を実行した後に実行されるのは、「TX1に格納されている高優先ディスクリプタ」が先でも、「TX2に格納されている低優先ディスクリプタ」が先でもよい。 Here, after executing (reading) the "high priority descriptor stored in TX0", each of the "high priority descriptor stored in TX1" and "low priority descriptor stored in TX2" is executed. Then, the situation shown in FIG. 11 occurs. Note that even if the "high priority descriptor stored in TX1" is executed after the "high priority descriptor stored in TX0" is executed, the "low priority descriptor stored in TX2" is executed first. It's okay if it's ahead.
すなわち、「TX0に格納されている高優先ディスクリプタ」を最初に実行した場合、「TX0に格納されている高優先ディスクリプタ」に対応する高優先データD(0)が、バッファ162の最初に格納される。
That is, when the "high priority descriptor stored in TX0" is executed first, the high priority data D(0) corresponding to the "high priority descriptor stored in TX0" is stored at the beginning of the
そして、「TX1に格納されている高優先ディスクリプタ」は、「TX0に格納されている高優先ディスクリプタ」よりも後に実行される。そのため、「TX1に格納されている高優先ディスクリプタ」に対応する高優先データD(1)は、高優先データD(0)よりも後に、バッファ162に格納される。
The "high priority descriptor stored in TX1" is executed after the "high priority descriptor stored in TX0". Therefore, the high priority data D(1) corresponding to the "high priority descriptor stored in TX1" is stored in the
バッファ162には、高優先データD(1)の前に高優先データD(0)が格納されているため、高優先データD(0)をネットワーク3に送信してからでないと、送信高優先データD(1)をネットワーク3に送信することはできない。
Since high-priority data D(0) is stored in the
ここで、前述の通り、送信データD(1)の「送信時刻TT(1)」は「9:00」であるのに対して、送信データD(0)の「送信時刻TT(0)」は「9:10」である。そのため、「9:00」に送信データD(1)をネットワーク3に送信することはできず、送信データD(1)をネットワーク3に送信できるタイミングは、送信データD(0)を「9:10」にネットワーク3に送信した後になる。 Here, as mentioned above, the "transmission time TT(1)" of the transmission data D(1) is "9:00", whereas the "transmission time TT(0)" of the transmission data D(0) is "9:00". is "9:10". Therefore, transmission data D(1) cannot be transmitted to network 3 at "9:00", and transmission data D(0) cannot be transmitted to network 3 at "9:00". 10” after sending it to network 3.
図11に示すように、ケース3においては、現在時刻CTから所定時間以上離れた時刻(例えば、送信時刻TT(0))を、「送信時刻TT」として規定するディスクリプタ(例、図11の「TX0に格納されている高優先ディスクリプタ」)が発生している。ケース3では、さらに、送信時刻TT(0)を「送信時刻TT」として規定するディスクリプタの後に、「送信時刻TT(0)より現在時刻CTに近い送信時刻TT(例、送信時刻TT(1))を、『送信時刻TT』として規定する」ディスクリプタが発生している。 As shown in FIG. 11, in case 3, a descriptor (for example, "transmission time TT" in FIG. "High priority descriptor stored in TX0") has occurred. In case 3, after the descriptor that defines the transmission time TT(0) as the "transmission time TT", "transmission time TT (for example, transmission time TT(1)) which is closer to the current time CT than the transmission time TT(0)" is added. ) is generated as the "transmission time TT."
ケース3において、先に発生した「送信時刻TT(0)を『送信時刻TT』として規定するディスクリプタ」を、「送信時刻TT(1)を、『送信時刻TT』として規定するディスクリプタ」よりも先に実行した場合、図11に示す状況が生じてしまいう。すなわち、「送信時刻TT(0)を、『送信時刻TT』として規定するディスクリプタ」に対応するデータが邪魔となって、「送信時刻TT(1)を、『送信時刻TT』として規定するディスクリプタ」に対応するデータを、送信時刻TT(1)に送信できない。 In case 3, the "descriptor that specifies transmission time TT (0) as 'transmission time TT'" that occurred earlier is placed before the 'descriptor that specifies transmission time TT (1) as 'transmission time TT'''. If this is executed, the situation shown in FIG. 11 will occur. In other words, the data corresponding to the "descriptor that defines the transmission time TT(0) as the 'transmission time TT'" becomes an obstacle, and the data corresponding to the "descriptor that defines the transmission time TT(1) as the 'transmission time TT'" gets in the way. cannot be transmitted at transmission time TT(1).
(ケース3を想定した工夫)
通信コントローラ10の開発者は、上述のケース3においても、通信コントローラ10が読み込むべきディスクリプタを好適に選択できるように、通信コントローラ10について、更に以下の工夫を施した。
(Devices assuming Case 3)
The developer of the
すなわち、通信コントローラ10には、予め判定時間JTが設けられており、通信コントローラ10は、判定時間JTを用いて、ディスクリプタを実行する(読み込む)タイミングを調整する。具体的には、通信コントローラ10は、「ディスクリプタで規定された送信時刻TTから、判定時間JTを遡った時刻」になってから、そのディスクリプタを読み込む(実行する)。
That is, the
通信コントローラ10は、「ディスクリプタで規定された送信時刻TT」から「現在時刻CT」を差し引いた期間が判定時間JTよりも大きいと、つまり、「(送信時刻TT - 現在時刻CT) > 判定時間JT」なら、そのディスクリプタを実行しない。通信コントローラ10は、「ディスクリプタで規定された送信時刻TT」から「現在時刻CT」を差し引いた期間が判定時間JT以下となると、つまり、「(送信時刻TT - 現在時刻CT) ≦ 判定時間JT」となると、そのディスクリプタを実行する。
The
図12は、ケース3について、判定時間JTを設けた通信コントローラ10によって実現される具体的な処理例を示す図である。前述の通り、ケース3において、TX0には、送信データD(0)の「送信時刻TT(0)」として「9:10」を規定し、送信データD(0)の「優先度P」として「1」を規定したディスクリプタが格納されている。また、TX1には、送信データD(1)の「送信時刻TT(1)」として「9:00」を規定し、送信データD(1)の「優先度P」として「1」を規定したディスクリプタが格納されている。さらに、TX2には、送信データD(2)の「送信時刻TT(2)」として「9:00」を規定し、送信データD(2)の「優先度P」として「2」を規定したディスクリプタが格納されている。
FIG. 12 is a diagram showing a specific example of processing implemented by the
通信コントローラ10は、送信データD(0)の「送信時刻TT(0)」として「9:10」を規定したディスクリプタを、「『9:10』から判定時間JTを遡った時刻」になるまで、実行しない。つまり、「送信時刻TTから現在時刻CTを差し引いた時間(期間)が、判定時間JTよりも大きい」間は、通信コントローラ10は、送信時刻TTを規定するディスクリプタを読み込まない(実行しない)。
The
そして、通信コントローラ10は、送信データD(1)の「送信時刻TT(1)」として「9:00」を規定したディスクリプタを、「『9:00』から現在時刻CTを差し引いた期間」が判定時間JT以下となると、実行する。つまり、「送信時刻TTから現在時刻CTを差し引いた時間が、判定時間JT以下」となると、通信コントローラ10は、送信時刻TTを規定するディスクリプタを、読み込むべきディスクリプタとみなし、言い換えれば、選択部131による選択処理の対象とする。
Then, the
そのため、通信コントローラ10は、「TX1に格納されている高優先ディスクリプタ」を、「TX0に格納されている高優先ディスクリプタ」よりも先に実行する。したがって、通信コントローラ10は、「TX1に格納されている高優先ディスクリプタ」に対応する高優先データD(1)を、高優先データD(0)よりも先に、バッファ162に格納する。
Therefore, the
バッファ162には、高優先データD(0)の前に高優先データD(1)が格納されているため、通信コントローラ10は、高優先データD(0)をネットワーク3に送信する前に、送信高優先データD(1)をネットワーク3に送信することができる。具体的には、通信コントローラ10は、送信高優先データD(1)を、送信時刻TT(1):「9:00」にネットワーク3に送信した後、送信高優先データD(0)を、送信時刻TT(0):「9:10」にネットワーク3に送信する。
Since the high priority data D(1) is stored in the
これまで図11および図12を用いて説明してきた内容は、以下のように整理することができる。すなわち、通信コントローラ10において、判定時間JTが予め設定されており、読込部132は、送信ディスクリプタの送信時刻TTから判定時間JTを遡った時刻になってから、送信ディスクリプタを読み込む。
The content that has been explained using FIGS. 11 and 12 can be summarized as follows. That is, in the
前記の構成によれば、通信コントローラ10は、送信ディスクリプタの送信時刻TTから判定時間JTを遡った時刻になってから、その送信ディスクリプタを読み込む。
According to the above configuration, the
ここで、或る送信ディスクリプタを読み込んだ後に、その或る送信ディスクリプタの送信時刻TTよりも現在時刻CTに近い時刻を送信時刻TTとする別のディスクリプタが生成された場合、以下の問題が発生する。すなわち、その或る送信ディスクリプタに対応するデータが障害となって、その別のディスクリプタに対応するデータを、その別のディスクリプタの送信時刻TTで送信することができないという問題が発生する。 Here, after reading a certain transmission descriptor, if another descriptor is generated whose transmission time TT is closer to the current time CT than the transmission time TT of that certain transmission descriptor, the following problem will occur. . That is, a problem arises in that the data corresponding to that certain transmission descriptor becomes a failure and the data corresponding to that other descriptor cannot be transmitted at the transmission time TT of that other descriptor.
これは、バッファ162に格納されたデータは、格納された順で送信されるからである。つまり、或る送信ディスクリプタに対応するデータが別のディスクリプタに対応するデータより先に格納されたなら、その或る送信ディスクリプタに対応するデータが送信されてからでないと、その別のディスクリプタに対応するデータは送信されない。そして、その或る送信ディスクリプタに対応するデータは、その或る送信ディスクリプタの送信時刻TTにならなければ送信されない。しかしながら、その或る送信ディスクリプタの送信時刻TTは、その別のディスクリプタの送信時刻TTよりも後であるから、その別のディスクリプタに対応するデータを、その別のディスクリプタの送信時刻TTで送信することはできない。
This is because the data stored in the
そこで、通信コントローラ10は、送信ディスクリプタの送信時刻TTから判定時間JTを遡った時刻になってから、その送信ディスクリプタを読み込むことによって、上述の問題が発生する可能性を抑制する。すなわち、或る送信ディスクリプタの送信時刻TTより現在時刻CTに近い時刻を送信時刻TTとする別のディスクリプタを読み込む前に、その或る送信ディスクリプタを読み込むことがないよう、通信コントローラ10は、上述の調整を実行する。言い換えれば、通信コントローラ10は、その或る送信ディスクリプタの読込時刻(実行時刻)を調整し、具体的には、その或る送信ディスクリプタの送信時刻TTから判定時間JTを遡った時刻になってから、その或る送信ディスクリプタを読み込む(実行する)。
Therefore, the
したがって、通信コントローラ10は、或る送信ディスクリプタの送信時刻TTよりも現在時刻CTに近い時刻を送信時刻TTとする別のディスクリプタを読み込む前に、その或る送信ディスクリプタを読み込むことを防ぐことができるとの効果を奏する。
Therefore, the
(ケース1、2、および、3に対応する通信コントローラの実行する処理について)
これまで、ケース1、ケース2、および、ケース3の各々において、通信コントローラ10が、実行すべき複数のディスクリプタについて、望ましい順序、望ましいタイミングで実行する(読み込む)ことができることを説明してきた。このような通信コントローラ10が実行する処理について、以下、図13から図17を参照して説明していく。
(Regarding the processing executed by the communication controller corresponding to
So far, it has been explained that in each of
(CPUおよびリクエスタが実行する処理例)
図13は、CPU30およびリクエスタ15が実行する処理例を示すフロー図であり、特に、図13の(A)はCPU30が実行する処理例を示しており、図13の(B)はリクエスタ15が実行する処理例を示している。
(Example of processing executed by CPU and requester)
FIG. 13 is a flowchart showing an example of processing executed by the
図13の(A)に示すように、送信要求があると、CPU30は、送信データをメインメモリ20に設定し(S210)、つまり、送信データをメインメモリ20に格納する。また、CPU30は、送信ディスクリプタをメインメモリ20に設定し(S220)、つまり、送信ディスクリプタをメインメモリ20に格納する。そして、CPU30は、通信コントローラ10に送信要求を出力し(S230)、具体的には、送信ディスクリプタの実行番号および実行個数を、通信コントローラ10に通知する。
As shown in FIG. 13A, when there is a transmission request, the
「実行個数」は、CPU30が通信コントローラ10に送信の実行を要求する送信データの個数であり、言い換えれば、通信コントローラ10によって実行されるべき送信ディスクリプタの個数である。また、「実行番号」は、リクエスタ15の番号を示しており、また、ディスクリプタメモリ14の番号を示している。例えば、実行個数が「n」であると、実行番号として、「0」から「n-1」が通信コントローラ10に通知される。実行番号および実行個数は、例えば、リクエスタ15の設定レジスタ151に格納される(設定される)。
“Number of executions” is the number of transmission data that the
送信処理は通信コントローラ10が実行するので、CPU30が実行すべき処理は、S230で終了する。送信要求が別途あれば、CPU30は、S210からS230までの処理を都度実行してもよい。
Since the
図13の(B)に示すように、先ず、リクエスタ15は、CPU30からの送信要求があるかを判定する(S310)。CPU30からの送信要求がないと(S310でNO)、リクエスタ15は、CPU30からの送信要求があるまで待機しておく。
As shown in FIG. 13B, first, the requester 15 determines whether there is a transmission request from the CPU 30 (S310). If there is no transmission request from the CPU 30 (NO in S310), the requester 15 waits until there is a transmission request from the
CPU30からの送信要求があると(S310でYES)、通信コントローラ10(特に、リクエスタ15)は、以下の処理を実行する。すなわち、CPU30からの送信要求を受け付けた通信コントローラ10は、受け付けた送信要求に従って、メインメモリ20に格納されているディスクリプタを取得し、取得したディスクリプタをディスクリプタメモリ14に格納する。具体的には、CPU30によってリクエスタ15の設定レジスタ151に設定された「実行個数」に基づいて、メインメモリ20から取得すべきディスクリプタを特定し、特定したディスクリプタをメインメモリ20から取得する。そして、通信コントローラ10(特に、リクエスタ15)は、取得したディスクリプタを、「リクエスタ15の設定レジスタ151に設定された『実行番号』に対応する、ディスクリプタメモリ14(ディスクリプタメモリ14の領域)」に格納する。例えば、実行個数が「n」であると、メインメモリ20から取得された「n」個のディスクリプタは、ディスクリプタメモリ14中の、第一ディスクリプタメモリ14(0)から第nディスクリプタメモリ14(n-1)の各々に格納される。
When there is a transmission request from the CPU 30 (YES in S310), the communication controller 10 (in particular, the requester 15) executes the following process. That is, the
また、CPU30からの送信要求を受け付けた通信コントローラ10は、受け付けた送信要求に従ってディスクリプタを格納したディスクリプタメモリ14に対応するリクエスタ15の要求レジスタに「1」を格納する。例えば、通信コントローラ10は、送信要求に従って取得したディスクリプタAを第一ディスクリプタメモリ14(0)に格納すると、第一ディスクリプタメモリ14(0)に対応する第一リクエスタ15(0)の要求レジスタに「1」を格納する。また、通信コントローラ10は、送信要求に従って取得したディスクリプタBを第二ディスクリプタメモリ14(1)に格納すると、第二ディスクリプタメモリ14(1)に対応する第二リクエスタ15(1)の要求レジスタに「1」を格納する。
Further, the
要求レジスタに「1」が格納されたリクエスタ15は、ディスクリプタ実行管理部13に、「実行すべき(読み込むべき)送信ディスクリプタがある」ことを通知する「要求信号=1」を出力する(S320)。そして、リクエスタ15は、ディスクリプタ実行管理部13から、転送完了通知があるかを判定する(S330)。
The requester 15 in which "1" is stored in the request register outputs "request signal = 1" to the descriptor
ディスクリプタ実行管理部13からの転送完了通知がないと(S330でNO)、リクエスタ15は、ディスクリプタ実行管理部13からの転送完了通知があるまで待機しておく。
If there is no transfer completion notification from the descriptor execution management unit 13 (NO in S330), the requester 15 waits until there is a transfer completion notification from the descriptor
ディスクリプタ実行管理部13からの転送完了通知があると(S330でYES)、リクエスタ15は、要求レジスタに「0」を格納し、また、ディスクリプタ実行管理部13に「要求信号=0」を出力する(S340)。「要求信号=0」は、「実行すべきディスクリプタがない」ことをディスクリプタ実行管理部13に通知する信号である。
When receiving the transfer completion notification from the descriptor execution management unit 13 (YES in S330), the requester 15 stores “0” in the request register and also outputs “request signal = 0” to the descriptor
(ディスクリプタ実行管理部およびBUF管理部等が実行する処理例)
図14は、ディスクリプタ実行管理部13およびBUF管理部16等が実行する処理例を示すフロー図であり、特に、図14の(A)はディスクリプタ実行管理部13が実行する処理例を示しており、図14の(B)はリクエスタ15が実行する処理例を示している。
(Example of processing executed by the descriptor execution management unit, BUF management unit, etc.)
FIG. 14 is a flowchart showing an example of processing executed by the descriptor
図14の(A)に示すように、ディスクリプタ実行管理部13は、リクエスタ15からの要求(「要求信号=1」。具体的には、送信ディスクリプタの実行要求(読込要求))があるかを判定する(S410)。リクエスタ15からの要求がないと(S410でNO)、ディスクリプタ実行管理部13は、リクエスタ15からの要求があるまで待機しておく。
As shown in FIG. 14A, the descriptor
リクエスタ15からの要求があると(S410でYES)、ディスクリプタ実行管理部13は、実行すべき送信ディスクリプタ(つまり、読み込むべき送信ディスクリプタ)を選択する選択処理を実行する(S420)。選択処理の詳細については、図15から図17を参照して、後述する。
When there is a request from the requester 15 (YES in S410), the descriptor
ディスクリプタ実行管理部13は、S420の選択処理で選択した送信ディスクリプタを実行し、つまり、選択した送信ディスクリプタを読み込む。そして、ディスクリプタ実行管理部13は、読み込んだ送信ディスクリプタに規定されている内容に従って、DMAC12に転送リクエストを出力する(S430)。転送リクエストは、DMAC12への転送指示であり、具体的には、「読み込んだ送信ディスクリプタに規定されている内容に従ってメインメモリ20から送信データを取得し、取得した送信データを、バッファ162へと転送する」ことをDMAC12に指示する。
The descriptor
ディスクリプタ実行管理部13は、DMAC12から、「転送リクエストに対応する送信データの転送処理を、DMAC12が完了した」ことを示す転送完了報告があるかを判定する(S440)。DMAC12からの転送完了報告がないと(S440でNO)、ディスクリプタ実行管理部13は、DMAC12からの転送完了報告があるまで待機しておく。
The descriptor
DMAC12からの転送完了報告があると(S440でYES)、ディスクリプタ実行管理部13は、リクエスタ15に、転送完了通知を発行する(S450)。「転送完了通知」は、「送信ディスクリプタに規定されている内容に従って、メインメモリ20からバッファ162への送信データの転送処理が完了した」ことを示す情報である。
When receiving the transfer completion report from the DMAC 12 (S440: YES), the descriptor
図14の(B)に示すように、先ず、BUF管理部16は、バッファ162に送信データがあるかを判定する(S510)。バッファ162に送信データがないと(S510でNO)、BUF管理部16は、バッファ162に送信データが存在するようになるまで待機しておく。
As shown in FIG. 14B, first, the
バッファ162に送信データがあると(S510でYES)、時刻指定送信管理部161は、「現在時刻CTが、バッファ162に存在する送信データの送信時刻TTであるか」を判定する(S520)。現在時刻CTがバッファ162に存在する送信データの送信時刻TTでないと(S520でNO)、時刻指定送信管理部161は、現在時刻CTがバッファ162に存在する送信データの送信時刻TTになるまで待機しておく。
If there is transmission data in the buffer 162 (S510: YES), the time-specific
現在時刻CTがバッファ162に存在する送信データの送信時刻TTになると(S520でYES)、時刻指定送信管理部161は、送信リクエストを、調停部17に発行する(S530)。「送信リクエスト」は、「バッファ162に存在する送信データの送信を、調停部17に指示する」情報である。
When the current time CT reaches the transmission time TT of the transmission data existing in the buffer 162 (S520: YES), the time-specified
調停部17は、「他の送信データの送信を実行中ではないか」を確認し、他の送信データの送信を実行中ではないことを確認すると、時刻指定送信管理部161にアクセス許可を出力する。調停部17は、他の送信データの送信を実行中だと、時刻指定送信管理部161にアクセス許可を出力しない。
The
時刻指定送信管理部161は、調停部17からのアクセス許可があるかを判定する(S540)。調停部17からのアクセス許可がないと(S540でNO)、時刻指定送信管理部161(BUF管理部16)は、調停部17からのアクセス許可があるまで待機しておく。
The time-specific
調停部17からのアクセス許可があると(S540でYES)、時刻指定送信管理部161(BUF管理部16)は、バッファ162に存在する送信データの送信を実行する(S550)。 If there is access permission from the arbitration unit 17 (YES in S540), the time-specific transmission management unit 161 (BUF management unit 16) executes transmission of the transmission data existing in the buffer 162 (S550).
(選択処理の詳細例)
図15は、図14の(A)に例示した選択処理(S420)の一例を示すフロー図である。前述の通り、ディスクリプタ実行管理部13は、実行すべき(読み込むべき)、1つ以上の送信ディスクリプタについて実行順序を決定し、例えば、実行すべき複数の送信ディスクリプタの中から、実行する送信ディスクリプタを1つ1つ選択していく(選択処理)。ディスクリプタ実行管理部13の実行する、この選択処理について、以下、図15から図17を参照して、その詳細を説明していく。
(Detailed example of selection process)
FIG. 15 is a flow diagram illustrating an example of the selection process (S420) illustrated in FIG. 14(A). As mentioned above, the descriptor
図15に示すように、ディスクリプタ実行管理部13は、例えば、カレント送信時刻CST、カレント優先度CPR、カレント転送時間CRTの3つの変数の各々に、「0」を設定する(S1100)。以下、カレント送信時刻CST、カレント優先度CPR、および、カレント転送時間CRTを総称して、「カレント変数」と称することがある。
As shown in FIG. 15, the descriptor
次に、ディスクリプタ実行管理部13は、各々が送信要求に対応する、1つ以上のディスクリプタの中から、任意のディスクリプタ(=対象ディスクリプタ)を1つ選択し、その対象ディスクリプタの優先度P、送信時刻TT等を取得する(S1200)。「各々が送信要求に対応する、1つ以上のディスクリプタ」とは、「図13の(B)において、送信要求のあった(S310でYES)ディスクリプタ」である。
Next, the descriptor
以下の説明において、対象ディスクリプタの規定している「送信時刻TT」を「NST」と略記し、対象ディスクリプタの規定している「優先度P」を「NPR」と略記し、対象ディスクリプタに対応する送信データの「転送時間RT」を「NRT」と略記する。また、対象ディスクリプタに対応する送信データを「対象データ」と略記することがある。同様に、カレント送信時刻CST、カレント優先度CPR、カレント転送時間CRTに対応する内容を規定しているディスクリプタを、「カレントディスクリプタ」と略記し、カレントディスクリプタに対応する送信データを「カレント」と略記することがある。 In the following explanation, the "transmission time TT" specified by the target descriptor is abbreviated as "NST", and the "priority P" specified by the target descriptor is abbreviated as "NPR", which corresponds to the target descriptor. "Transfer time RT" of transmission data is abbreviated as "NRT". Further, transmission data corresponding to a target descriptor may be abbreviated as "target data." Similarly, the descriptor that defines the contents corresponding to the current transmission time CST, current priority CPR, and current transfer time CRT is abbreviated as "current descriptor", and the transmission data corresponding to the current descriptor is abbreviated as "current". There are things to do.
そして、ディスクリプタ実行管理部13は、「『対象ディスクリプタの送信時刻NSTから現在時刻CTを差し引いた時間(期間)』が、判定時間JT以下であるか」を判定する(S1300)。対象ディスクリプタの送信時刻NSTから現在時刻CTを差し引いた時間が、判定時間JTより大きいと(S1300でNO)、ディスクリプタ実行管理部13は、「送信要求のあったディスクリプタを全て判定したか」を確認する(S1600)。対象ディスクリプタの送信時刻NSTから現在時刻CTを差し引いた時間が、判定時間JT以下であると(S1300でYES)、ディスクリプタ実行管理部13は、カレント優先度CPRと対象ディスクリプタの優先度NPRとを比較する(S1400)。
Then, the descriptor
ここで、S1300の処理は、図12を用いて説明した、「通信コントローラ10は、『ディスクリプタで規定された送信時刻TTから、判定時間JTを遡った時刻』以降に、そのディスクリプタを読み込む(実行する)」との処理に対応する。
Here, the process of S1300 is explained using FIG. 12, "The
つまり、S1300において、現在時刻CTが「或るディスクリプタの規定する送信時刻TTから、判定時間JTを差し引いた時間」より小さいと、ディスクリプタ実行管理部13は、現在時刻CTでは、その或るディスクリプタを選択処理の対象から除外する。現在時刻CTが「或るディスクリプタの規定する送信時刻TTから、判定時間JTを遡った時刻」より早いと、ディスクリプタ実行管理部13は、現在時刻CTでは、その或るディスクリプタに対し選択処理を実行せず、その或るディスクリプタを読み込まない。
That is, in S1300, if the current time CT is smaller than "the time obtained by subtracting the determination time JT from the transmission time TT specified by a certain descriptor", the descriptor
S1300において、現在時刻CTが「或るディスクリプタの規定する送信時刻TTから、判定時間JTを差し引いた時間」以上であると、ディスクリプタ実行管理部13は、現在時刻CTにおいて、その或るディスクリプタを選択処理の対象とする。現在時刻CTが「或るディスクリプタの規定する送信時刻TTから、判定時間JTを遡った時刻」以降であると、ディスクリプタ実行管理部13は、現在時刻CTにおいて、その或るディスクリプタに対し選択処理を実行する。
In S1300, if the current time CT is equal to or greater than "the time obtained by subtracting the determination time JT from the transmission time TT specified by a certain descriptor", the descriptor
S1400においてカレント優先度CPRと対象ディスクリプタの優先度NPRとを比較したディスクリプタ実行管理部13は、カレント優先度CPRと対象ディスクリプタの優先度NPRとの関係ごとに、更新処理を実行する(S1500)。具体的には、ディスクリプタ実行管理部13は、対象ディスクリプタの優先度NPRが、(1)カレント優先度CPRと同じ場合、(2)カレント優先度CPRより高い場合、(3)カレント優先度CPRより低い場合の各々について、更新処理を実行する。カレント優先度CPRと対象ディスクリプタの優先度NPRとの関係ごとに、ディスクリプタ実行管理部13が実行する更新処理について、その詳細は、図16および図17を参照して説明する。
The descriptor
S1500の更新処理を実行後、ディスクリプタ実行管理部13は、「送信要求のあったディスクリプタを全て判定したか」を確認する(S1600)。例えば、ディスクリプタ実行管理部13は、「送信要求のあったディスクリプタを全てについて、S1200(またはS1700)からS1500までの処理を実行したか」を確認する。
After executing the update process in S1500, the descriptor
送信要求のあったディスクリプタを全て判定していないと(S1600でNO)、ディスクリプタ実行管理部13は、送信要求のあったディスクリプタの中から、未判定のディスクリプタの1つを「対象ディスクリプタ」として選択する。そして、ディスクリプタ実行管理部13は、選択した対象ディスクリプタの優先度NPR、送信時刻NST等を取得する(S1700)。そして、ディスクリプタ実行管理部13は、S1300以降の処理を実行する。
If all descriptors requested to be transmitted have not been determined (NO in S1600), the descriptor
つまり、ディスクリプタ実行管理部13は、送信要求のあったディスクリプタの中に、S1200(またはS1700)からS1500までの処理を実行していないディスクリプタがないかを確認する。S1200(またはS1700)からS1500までの処理を実行していないディスクリプタがあると、ディスクリプタ実行管理部13は、そのディスクリプタについて、S1700からS1500までの処理を実行する。
That is, the descriptor
最後に、ディスクリプタ実行管理部13は、カレント送信時刻CST、カレント優先度CPR、カレント転送時間CRTに対応するディスクリプタを、現在時刻CTにおいて実行する(読み込む)ディスクリプタとして、選択する(S1800)。
Finally, the descriptor
(更新処理の詳細例)
図16は、図15に例示した更新処理(S1500)について、対象ディスクリプタの優先度NPRがカレント優先度CPRと同じ場合、および、対象ディスクリプタの優先度NPRがカレント優先度CPRより高い場合の例を示すフロー図である。
(Detailed example of update process)
FIG. 16 shows an example of the update process (S1500) illustrated in FIG. 15 when the priority NPR of the target descriptor is the same as the current priority CPR and when the priority NPR of the target descriptor is higher than the current priority CPR. FIG.
(対象ディスクリプタの優先度がカレント優先度と同じ場合の更新処理例)
対象ディスクリプタの優先度NPRがカレント優先度CPRと同じ場合、ディスクリプタ実行管理部13は、図16の(A)に例示する更新処理を実行する。すなわち、ディスクリプタ実行管理部13は先ず、「カレント送信時刻CSTより、対象ディスクリプタの送信時刻NSTの方が早いか」を判定する(S1511)。
(Example of update processing when the priority of the target descriptor is the same as the current priority)
If the priority NPR of the target descriptor is the same as the current priority CPR, the descriptor
カレント送信時刻CSTより対象ディスクリプタの送信時刻NSTの方が早いと(S1511でYES)、ディスクリプタ実行管理部13は、カレント送信時刻CST、カレント優先度CPR、カレント転送時間CRTの各々の値を更新する(S1512)。具体的には、ディスクリプタ実行管理部13は、カレント送信時刻CSTの値を、対象ディスクリプタの送信時刻NSTの値によって更新する。また、ディスクリプタ実行管理部13は、カレント優先度CPRの値を、対象ディスクリプタの優先度NPRの値によって更新する。さらに、ディスクリプタ実行管理部13は、カレント転送時間CRTの値を、対象ディスクリプタに対応する送信データの転送時間NRTの値によって更新する。
If the transmission time NST of the target descriptor is earlier than the current transmission time CST (YES in S1511), the descriptor
S1511の判定において、「カレント送信時刻CST=0」の場合、ディスクリプタ実行管理部13は、「S1511でYES」であるとして次の処理へ遷移し、つまり、S1512を実行する。
In the determination of S1511, if "current transmission time CST=0", the descriptor
カレント送信時刻CSTより対象ディスクリプタの送信時刻NSTの方が遅い、または、カレント送信時刻CSTと対象ディスクリプタの送信時刻NSTとが同じ場合(S1511でNO)、ディスクリプタ実行管理部13は、更新処理を終了する。
If the transmission time NST of the target descriptor is later than the current transmission time CST, or if the current transmission time CST and the transmission time NST of the target descriptor are the same (NO in S1511), the descriptor
(対象ディスクリプタの優先度がカレント優先度より高い場合の更新処理例)
対象ディスクリプタの優先度NPRがカレント優先度CPRより高い場合、ディスクリプタ実行管理部13は、図16の(B)に例示する更新処理を実行する。すなわち、ディスクリプタ実行管理部13は先ず、「カレント送信時刻CSTより、対象ディスクリプタの送信時刻NSTの方が早いか、または、カレント送信時刻CSTと対象ディスクリプタの送信時刻NSTとが同じか」を判定する(S1521)。
(Example of update processing when the priority of the target descriptor is higher than the current priority)
If the priority NPR of the target descriptor is higher than the current priority CPR, the descriptor
カレント送信時刻CSTより対象ディスクリプタの送信時刻NSTの方が早い、または、両者が同じであると(S1521でYES)、ディスクリプタ実行管理部13は、カレント変数を更新する(S1525)。具体的には、ディスクリプタ実行管理部13は、カレント送信時刻CSTの値を、対象ディスクリプタの送信時刻NSTの値によって更新する。また、ディスクリプタ実行管理部13は、カレント優先度CPRの値を、対象ディスクリプタの優先度NPRの値によって更新する。さらに、ディスクリプタ実行管理部13は、カレント転送時間CRTの値を、対象ディスクリプタに対応する送信データの転送時間NRTの値によって更新する。
If the transmission time NST of the target descriptor is earlier than the current transmission time CST, or if they are the same (YES in S1521), the descriptor
S1521の判定において、「カレント送信時刻CST=0」の場合、ディスクリプタ実行管理部13は、「S1521でYES」であるとして次の処理へ遷移し、つまり、S1525を実行する。
In the determination of S1521, if "current transmission time CST=0", the descriptor
カレント送信時刻CSTより対象ディスクリプタの送信時刻NSTの方が遅いと(S1521でNO)、ディスクリプタ実行管理部13は、カレントの転送実行後に対象データを転送した場合の終了時刻(つまり、予定合計時刻ERT)を計算する(S1523)。すなわち、ディスクリプタ実行管理部13は、「予定合計時刻ERT = 現在時刻CT +カレント転送時間CRT + 対象ディスクリプタの転送時間NRT」を算出する。
If the transmission time NST of the target descriptor is later than the current transmission time CST (NO in S1521), the descriptor
ディスクリプタ実行管理部13は、「対象ディスクリプタの送信時刻NST < 予定合計時刻ERT」であるかを判定し、つまり、「対象ディスクリプタの送信時刻NSTが予定合計時刻ERTより小さい(早い)か」を判定する(S1524)。
The descriptor
対象ディスクリプタの送信時刻NSTが予定合計時刻ERTより早い場合(S1524でYES)、ディスクリプタ実行管理部13は、カレント変数を更新する(S1525)。対象ディスクリプタの送信時刻NSTが予定合計時刻ERTと同じ、または、対象ディスクリプタの送信時刻NSTが予定合計時刻ERTより大きい(遅い)場合(S1524でNO)、ディスクリプタ実行管理部13は、更新処理を終了する。
If the transmission time NST of the target descriptor is earlier than the scheduled total time ERT (YES in S1524), the descriptor
ここで、図16の(B)では、対象ディスクリプタの優先度NPRがカレント優先度CPRより高いから、対象ディスクリプタは「図6の高優先ディスクリプタ」に対応し、カレントディスクリプタは「図6の低優先ディスクリプタ」に対応する。また、図16の(B)において、送信時刻NSTは、図6の「高優先ディスクリプタの規定する送信時刻TT(高優先)」に対応する。 Here, in (B) of FIG. 16, since the priority NPR of the target descriptor is higher than the current priority CPR, the target descriptor corresponds to the "high priority descriptor in FIG. 6", and the current descriptor corresponds to the "low priority descriptor in FIG. 6". descriptor”. Further, in FIG. 16(B), the transmission time NST corresponds to the "transmission time TT (high priority) specified by the high priority descriptor" in FIG.
したがって、図16の(B)のS1524は、図6のS130と同様の判定を行っている。すなわち、S1524でYESだと、ディスクリプタ実行管理部13は、高優先ディスクリプタに対応する対象ディスクリプタが、現在時刻CTにおいて実行されるディスクリプタとして選択されるように、カレントディスクリプタを更新する。
Therefore, S1524 in FIG. 16(B) performs the same determination as S130 in FIG. That is, if YES in S1524, the descriptor
また、S1524でNOだと、ディスクリプタ実行管理部13は、低優先ディスクリプタに対応するカレントディスクリプタが、現在時刻CTにおいて実行されるディスクリプタとして選択されるように、カレントディスクリプタの更新を実行しない。
If NO in S1524, the descriptor
(対象ディスクリプタの優先度がカレント優先度より低い場合の更新処理例)
図17は、図15に例示した更新処理(S1500)について、対象ディスクリプタの優先度NPRがカレント優先度CPRより低い場合の例を示すフロー図である。図17に示すように、ディスクリプタ実行管理部13は先ず、「カレント送信時刻CSTより、対象ディスクリプタの送信時刻NSTの方が早いか」を判定する(S1531)。
(Example of update processing when the priority of the target descriptor is lower than the current priority)
FIG. 17 is a flow diagram illustrating an example of the update process (S1500) illustrated in FIG. 15 when the priority NPR of the target descriptor is lower than the current priority CPR. As shown in FIG. 17, the descriptor
カレント送信時刻CSTより対象ディスクリプタの送信時刻NSTの方が早いと(S1531でYES)、ディスクリプタ実行管理部13は、カレントの転送実行後に対象データを転送した場合の終了時刻(つまり、予定合計時刻ERT)を計算する(S1523)。すなわち、ディスクリプタ実行管理部13は、「予定合計時刻ERT = 現在時刻CT +カレント転送時間CRT + 対象ディスクリプタの転送時間NRT」を算出する。
If the transmission time NST of the target descriptor is earlier than the current transmission time CST (YES in S1531), the descriptor
ディスクリプタ実行管理部13は、「カレント送信時刻CST < 予定合計時刻ERT」であるかを判定し、つまり、「カレント送信時刻CSTが予定合計時刻ERTより小さい(早い)か」を判定する(S1533)。カレント送信時刻CSTが予定合計時刻ERTより早い場合(S1533でYES)、ディスクリプタ実行管理部13は、更新処理を終了する。
The descriptor
カレント送信時刻CSTが予定合計時刻ERTと同じ、または、カレント送信時刻CSTが予定合計時刻ERTより大きい(遅い)場合(S1533でNO)、ディスクリプタ実行管理部13は、カレント変数を更新する(S1534)。
If the current transmission time CST is the same as the scheduled total time ERT, or if the current transmission time CST is greater (later) than the scheduled total time ERT (NO in S1533), the descriptor
ここで、図17では、対象ディスクリプタの優先度NPRがカレント優先度CPRより低いから、対象ディスクリプタは「図6の低優先ディスクリプタ」に対応し、カレントディスクリプタは「図6の高優先ディスクリプタ」に対応する。また、図17において、カレント送信時刻CSTは、図6の「高優先ディスクリプタの規定する送信時刻TT(高優先)」に対応する。 Here, in FIG. 17, since the priority NPR of the target descriptor is lower than the current priority CPR, the target descriptor corresponds to the "low priority descriptor in FIG. 6", and the current descriptor corresponds to the "high priority descriptor in FIG. 6". do. Further, in FIG. 17, the current transmission time CST corresponds to the "transmission time TT (high priority) defined by the high priority descriptor" in FIG.
したがって、図17のS1533は、図6のS130と同様の判定を行っている。すなわち、S1533でYESだと、ディスクリプタ実行管理部13は、高優先ディスクリプタに対応するカレントディスクリプタが、現在時刻CTにおいて実行されるディスクリプタとして選択されるように、カレントディスクリプタの更新を実行しない。
Therefore, S1533 in FIG. 17 performs the same determination as S130 in FIG. That is, if YES in S1533, the descriptor
また、S1533でNOだと、ディスクリプタ実行管理部13は、低優先ディスクリプタに対応する対象ディスクリプタが、現在時刻CTにおいて実行されるディスクリプタとして選択されるように、カレントディスクリプタを更新する。
If NO in S1533, the descriptor
§4.変形例
(ネットワーク構成例について)
図2に例示した制御システム0において、複数のネットワーク3が、ネットワークハブ2を介して、PLC1に接続している。しかしながら、制御システム0において、1つのネットワーク3がネットワークハブ2を介さずにPLC1に接続し、例えば、PLC1と、1つ以上のネットワークデバイスとが、一筆書きの形式で互いに通信可能に接続されていてもよい。
§4. Modified example (About network configuration example)
In the
本発明は上述した各実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。 The present invention is not limited to the embodiments described above, and various modifications can be made within the scope of the claims, and embodiments obtained by appropriately combining technical means disclosed in different embodiments. are also included within the technical scope of the present invention.
10 通信コントローラ(通信制御機器)
20 メインメモリ
162 バッファ(送信バッファ)
131 選択部
132 読込部
CT 現在時刻
ERT 予定合計時刻
JT 判定時間
P 優先度(実行優先度)
RT 転送時間
S20 選択ステップ
S30 読込ステップ
TT 送信時刻(送信予定時刻)
10 Communication controller (communication control equipment)
20
131
RT Transfer time S20 Selection step S30 Reading step TT Transmission time (scheduled transmission time)
Claims (8)
複数の前記ディスクリプタの各々において規定されている、送信予定時刻と実行優先度との双方に基づいて、複数の前記ディスクリプタの中から、読み込むディスクリプタを選択する選択部と、
前記選択部によって選択された前記ディスクリプタを読み込む読込部と
を備える通信制御機器。 A communication control device that transfers data from a main memory to a transmission buffer according to a read descriptor, and transmits the data transferred to the transmission buffer,
a selection unit that selects a descriptor to read from among the plurality of descriptors based on both a scheduled transmission time and an execution priority defined in each of the plurality of descriptors;
A communication control device comprising: a reading section that reads the descriptor selected by the selection section.
複数の前記ディスクリプタの各々において規定されている、送信予定時刻および実行優先度の少なくとも一方に基づいて、複数の前記ディスクリプタの中から、読み込むディスクリプタを選択する選択部と、
前記選択部によって選択された前記ディスクリプタを読み込む読込部と
を備え、
複数の前記ディスクリプタの中の或るディスクリプタの前記実行優先度が、別のディスクリプタの前記実行優先度よりも高い場合、前記選択部は、
(A)現在時刻に、前記或るディスクリプタに対応するデータを前記メインメモリから前記送信バッファへと転送するのに要する転送時間と、前記別のディスクリプタに対応するデータを前記メインメモリから前記送信バッファへと転送するのに要する転送時間とを加えた時刻である予定合計時刻と、(B)前記或るディスクリプタの前記送信予定時刻とを比較し、
前記或るディスクリプタの前記送信予定時刻が、前記予定合計時刻よりも後だと、前記或るディスクリプタに優先して前記別のディスクリプタを選択し、
前記或るディスクリプタの前記送信予定時刻が、前記予定合計時刻以前だと、前記別のディスクリプタに優先して前記或るディスクリプタを選択する通信制御機器。 A communication control device that transfers data from a main memory to a transmission buffer according to a read descriptor, and transmits the data transferred to the transmission buffer,
a selection unit that selects a descriptor to be read from among the plurality of descriptors based on at least one of a scheduled transmission time and an execution priority defined in each of the plurality of descriptors;
a reading unit that reads the descriptor selected by the selection unit;
Equipped with
When the execution priority of a certain descriptor among the plurality of descriptors is higher than the execution priority of another descriptor, the selection unit:
(A) Transfer time required to transfer data corresponding to the certain descriptor from the main memory to the transmission buffer and transfer data corresponding to the another descriptor from the main memory to the transmission buffer at the current time; (B) compare the scheduled transmission time of the certain descriptor with the scheduled total time, which is the time obtained by adding the transfer time required to transfer
If the scheduled transmission time of the certain descriptor is later than the scheduled total time, selecting the other descriptor in preference to the certain descriptor;
If the scheduled transmission time of the certain descriptor is before the scheduled total time, the communication control device selects the certain descriptor with priority over the other descriptor.
複数の前記ディスクリプタの各々において規定されている、送信予定時刻および実行優先度の少なくとも一方に基づいて、複数の前記ディスクリプタの中から、読み込むディスクリプタを選択する選択部と、
前記選択部によって選択された前記ディスクリプタを読み込む読込部と
を備え、
判定時間が予め設定されており、
前記読込部は、前記ディスクリプタの送信予定時刻から前記判定時間を遡った時刻になってから、前記ディスクリプタを読み込む通信制御機器。 A communication control device that transfers data from a main memory to a transmission buffer according to a read descriptor, and transmits the data transferred to the transmission buffer,
a selection unit that selects a descriptor to read from among the plurality of descriptors based on at least one of a scheduled transmission time and an execution priority defined in each of the plurality of descriptors;
a reading section that reads the descriptor selected by the selection section;
Equipped with
Judgment time is preset,
The reading unit is a communication control device that reads the descriptor after the determination time has elapsed from the scheduled transmission time of the descriptor.
複数の前記ディスクリプタの各々において規定されている、送信予定時刻および実行優先度の少なくとも一方に基づいて、複数の前記ディスクリプタの中から、読み込むディスクリプタを選択する選択部と、
前記選択部によって選択された前記ディスクリプタを読み込む読込部と
を備え、
前記送信バッファは、
前記読込部が読み込んだ前記ディスクリプタの順に、前記ディスクリプタに対応する前記データが格納される通常送信バッファと、
前記通常送信バッファに格納されている前記データに対応する前記ディスクリプタを前記選択部が選択してから、前記通常送信バッファに格納されている前記データが送信されるまでの間に前記読込部が読み込んだディスクリプタであって、前記通常送信バッファに格納されている前記データに対応する前記ディスクリプタよりも前記実行優先度が高いディスクリプタに対応する前記データが格納される特別送信バッファと
を含む通信制御機器。 A communication control device that transfers data from a main memory to a transmission buffer according to a read descriptor, and transmits the data transferred to the transmission buffer,
a selection unit that selects a descriptor to be read from among the plurality of descriptors based on at least one of a scheduled transmission time and an execution priority defined in each of the plurality of descriptors;
a reading unit that reads the descriptor selected by the selection unit;
Equipped with
The transmission buffer is
a normal transmission buffer in which the data corresponding to the descriptors are stored in the order of the descriptors read by the reading unit;
The reading unit reads the descriptor corresponding to the data stored in the normal transmission buffer after the selection unit selects the descriptor and before the data stored in the normal transmission buffer is transmitted. a special transmission buffer in which the data corresponding to the descriptor having a higher execution priority than the descriptor corresponding to the data stored in the normal transmission buffer is stored. device.
複数の前記ディスクリプタの各々において規定されている、送信予定時刻と実行優先度との双方に基づいて、複数の前記ディスクリプタの中から、読み込むディスクリプタを選択する選択ステップと、
前記選択ステップにて選択された前記ディスクリプタを読み込む読込ステップと
を含む制御方法。 A control method for a communication control device that transfers data from a main memory to a transmission buffer according to a read descriptor, and transmits the data transferred to the transmission buffer, the method comprising:
a selection step of selecting a descriptor to be read from among the plurality of descriptors based on both the scheduled transmission time and the execution priority defined in each of the plurality of descriptors;
a reading step of reading the descriptor selected in the selecting step.
複数の前記ディスクリプタの各々において規定されている、送信予定時刻および実行優先度の少なくとも一方に基づいて、複数の前記ディスクリプタの中から、読み込むディスクリプタを選択する選択ステップと、 a selection step of selecting a descriptor to be read from among the plurality of descriptors based on at least one of a scheduled transmission time and an execution priority defined in each of the plurality of descriptors;
前記選択ステップにて選択された前記ディスクリプタを読み込む読込ステップと a reading step of reading the descriptor selected in the selection step;
を含み、including;
複数の前記ディスクリプタの中の或るディスクリプタの前記実行優先度が、別のディスクリプタの前記実行優先度よりも高い場合、前記選択ステップにおいては、 If the execution priority of a certain descriptor among the plurality of descriptors is higher than the execution priority of another descriptor, in the selection step,
(A)現在時刻に、前記或るディスクリプタに対応するデータを前記メインメモリから前記送信バッファへと転送するのに要する転送時間と、前記別のディスクリプタに対応するデータを前記メインメモリから前記送信バッファへと転送するのに要する転送時間とを加えた時刻である予定合計時刻と、(B)前記或るディスクリプタの前記送信予定時刻とを比較し、 (A) Transfer time required to transfer data corresponding to the certain descriptor from the main memory to the transmission buffer and transfer data corresponding to the another descriptor from the main memory to the transmission buffer at the current time; (B) compare the scheduled transmission time of the certain descriptor with the scheduled total time, which is the time obtained by adding the transfer time required to transfer
前記或るディスクリプタの前記送信予定時刻が、前記予定合計時刻よりも後だと、前記或るディスクリプタに優先して前記別のディスクリプタを選択し、 If the scheduled transmission time of the certain descriptor is later than the scheduled total time, selecting the other descriptor in preference to the certain descriptor;
前記或るディスクリプタの前記送信予定時刻が、前記予定合計時刻以前だと、前記別のディスクリプタに優先して前記或るディスクリプタを選択する制御方法。 If the scheduled transmission time of the certain descriptor is before the scheduled total time, the certain descriptor is selected with priority over the other descriptor.
複数の前記ディスクリプタの各々において規定されている、送信予定時刻および実行優先度の少なくとも一方に基づいて、複数の前記ディスクリプタの中から、読み込むディスクリプタを選択する選択ステップと、 a selection step of selecting a descriptor to be read from among the plurality of descriptors based on at least one of a scheduled transmission time and an execution priority defined in each of the plurality of descriptors;
前記選択ステップにて選択された前記ディスクリプタを読み込む読込ステップと a reading step of reading the descriptor selected in the selection step;
を含み、including;
判定時間が予め設定されており、 Judgment time is preset,
前記読込ステップにおいては、前記ディスクリプタの送信予定時刻から前記判定時間を遡った時刻になってから、前記ディスクリプタを読み込む制御方法。 In the reading step, the control method reads the descriptor after the determination time has elapsed from the scheduled transmission time of the descriptor.
複数の前記ディスクリプタの各々において規定されている、送信予定時刻および実行優先度の少なくとも一方に基づいて、複数の前記ディスクリプタの中から、読み込むディスクリプタを選択する選択ステップと、 a selection step of selecting a descriptor to be read from among the plurality of descriptors based on at least one of a scheduled transmission time and an execution priority defined in each of the plurality of descriptors;
前記選択ステップにて選択された前記ディスクリプタを読み込む読込ステップと a reading step of reading the descriptor selected in the selection step;
を含み、including;
前記送信バッファは、 The transmission buffer is
前記読込ステップにおいて読み込んだ前記ディスクリプタの順に、前記ディスクリプタに対応する前記データが格納される通常送信バッファと、 a normal transmission buffer in which the data corresponding to the descriptors are stored in the order of the descriptors read in the reading step;
前記通常送信バッファに格納されている前記データに対応する前記ディスクリプタを前記選択ステップにおいて選択してから、前記通常送信バッファに格納されている前記データが送信されるまでの間に前記読込ステップにおいて読み込んだディスクリプタであって、前記通常送信バッファに格納されている前記データに対応する前記ディスクリプタよりも前記実行優先度が高いディスクリプタに対応する前記データが格納される特別送信バッファと After the descriptor corresponding to the data stored in the normal transmission buffer is selected in the selection step and before the data stored in the normal transmission buffer is transmitted, the descriptor is read in the reading step. a special transmission buffer in which the data corresponding to the descriptor having a higher execution priority than the descriptor corresponding to the data stored in the normal transmission buffer is stored.
を含む制御方法。control methods including.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020039984A JP7419889B2 (en) | 2020-03-09 | 2020-03-09 | Communication control equipment and control method for communication control equipment |
PCT/JP2021/001404 WO2021181875A1 (en) | 2020-03-09 | 2021-01-18 | Communication control device and method for controlling communication control device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020039984A JP7419889B2 (en) | 2020-03-09 | 2020-03-09 | Communication control equipment and control method for communication control equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2021141537A JP2021141537A (en) | 2021-09-16 |
JP7419889B2 true JP7419889B2 (en) | 2024-01-23 |
Family
ID=77669693
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020039984A Active JP7419889B2 (en) | 2020-03-09 | 2020-03-09 | Communication control equipment and control method for communication control equipment |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP7419889B2 (en) |
WO (1) | WO2021181875A1 (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004343734A (en) | 2003-04-23 | 2004-12-02 | Sumitomo Electric Ind Ltd | Optical subscriber line terminal station device and frame scheduling method |
JP2005258509A (en) | 2004-03-09 | 2005-09-22 | Fujitsu Ltd | Storage device |
WO2018146899A1 (en) | 2017-02-07 | 2018-08-16 | オムロン株式会社 | Control device and communication device |
-
2020
- 2020-03-09 JP JP2020039984A patent/JP7419889B2/en active Active
-
2021
- 2021-01-18 WO PCT/JP2021/001404 patent/WO2021181875A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004343734A (en) | 2003-04-23 | 2004-12-02 | Sumitomo Electric Ind Ltd | Optical subscriber line terminal station device and frame scheduling method |
JP2005258509A (en) | 2004-03-09 | 2005-09-22 | Fujitsu Ltd | Storage device |
WO2018146899A1 (en) | 2017-02-07 | 2018-08-16 | オムロン株式会社 | Control device and communication device |
Also Published As
Publication number | Publication date |
---|---|
JP2021141537A (en) | 2021-09-16 |
WO2021181875A1 (en) | 2021-09-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3607445B1 (en) | System and method for timely and uniform distribution for real-time packet transmission | |
US10412017B2 (en) | Transfer device, transfer method, and computer program product | |
US7350004B2 (en) | Resource management device | |
US10778594B2 (en) | Transfer control device, transfer control method, and computer program product | |
US7490185B2 (en) | Data processing system, access control method, and access control device | |
EP4152166A2 (en) | Memory access technology and computer system | |
JPH09251437A (en) | Computer device and continuous data server device | |
JP7354361B2 (en) | Processing equipment, processing method and program | |
KR100708096B1 (en) | Bus system and execution scheduling method for access commands thereof | |
US11016829B2 (en) | Two-layered deterministic interprocess communication scheduler for input output determinism in solid state drives | |
US6728834B2 (en) | System and method for effectively implementing isochronous processor cache | |
JP7419889B2 (en) | Communication control equipment and control method for communication control equipment | |
JP2009181203A (en) | Bus arbitration device | |
WO2021181874A1 (en) | Communication control device and method for controlling communication control device | |
US6847650B1 (en) | System and method for utilizing a memory device to support isochronous processes | |
CN115884229B (en) | Transmission delay management method, electronic device and storage medium | |
US6438633B1 (en) | System for providing deterministic performance from a non-deterministic device | |
JP7259537B2 (en) | Information processing equipment | |
US10025730B2 (en) | Register device and method for software programming | |
WO2018146900A1 (en) | Control device and communication device | |
WO2021181897A1 (en) | Communication device, \method for controlling communication device, and integrated circuit | |
JP2007219925A (en) | Bus controller, bus control program and recording medium | |
US20200379798A1 (en) | Apparatus for transmitting packets using timer interrupt service routine | |
JP2024042538A (en) | controller |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20230111 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20231003 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20231124 |
|
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: 20231212 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20231225 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7419889 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |