JP2019213163A - Communication control unit - Google Patents
Communication control unit Download PDFInfo
- Publication number
- JP2019213163A JP2019213163A JP2018110496A JP2018110496A JP2019213163A JP 2019213163 A JP2019213163 A JP 2019213163A JP 2018110496 A JP2018110496 A JP 2018110496A JP 2018110496 A JP2018110496 A JP 2018110496A JP 2019213163 A JP2019213163 A JP 2019213163A
- Authority
- JP
- Japan
- Prior art keywords
- transfer data
- message
- data generation
- transfer
- time
- 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.)
- Pending
Links
Images
Landscapes
- Small-Scale Networks (AREA)
Abstract
Description
本発明は、通信制御装置に関する。 The present invention relates to a communication control apparatus.
近年、コネクテッドカー及び自動運転車など、車載通信における通信の情報量が多い自動車の開発が進んでいる。現在、車載通信では主にCAN(Controller Area Network)通信が使われている。例えば特許文献1には、CAN通信において、送信優先度を制御することで送信データの送信機会を均等化させる発明が開示されている。
In recent years, development of automobiles having a large amount of communication information in in-vehicle communication such as connected cars and autonomous driving cars has been progressing. Currently, CAN (Controller Area Network) communication is mainly used for in-vehicle communication. For example,
車載通信における通信の情報量が多くなると、通信バスの負荷が大きくなる。これに対し、複数の通信バスを設けることで、通信の情報量の増加に対応することが考えられている。 As the amount of communication information in in-vehicle communication increases, the load on the communication bus increases. On the other hand, providing a plurality of communication buses is considered to cope with an increase in the amount of communication information.
複数の通信バスを設けた場合、通信バス間のメッセージの送受信は、通信バス間におけるメッセージの転送処理を制御する通信制御装置によって行われる。ここで、「メッセージ」とは、CAN通信などの車載通信において送受信されるデータのまとまりである。「メッセージ」は、「フレーム」とも呼ばれる。 When a plurality of communication buses are provided, messages are transmitted and received between the communication buses by a communication control device that controls message transfer processing between the communication buses. Here, the “message” is a group of data transmitted and received in in-vehicle communication such as CAN communication. A “message” is also called a “frame”.
通信バス間におけるメッセージの転送処理において、データの内容に応じて定められた優先度のみに基づいて、転送処理用の転送データを生成する順番を決定すると、優先度の低いメッセージの転送処理を許容遅延時間内に完了できない事態が起こりうる。 In the message transfer process between communication buses, if the order of generating transfer data for transfer processing is determined based only on the priority determined according to the data content, the transfer process of low priority messages is allowed. A situation that cannot be completed within the delay time may occur.
かかる観点に鑑みてなされた本発明の目的は、通信バス間におけるメッセージの転送処理を許容遅延時間内に完了できない事態を低減しうる通信制御装置を提供することにある。 An object of the present invention made in view of such a viewpoint is to provide a communication control apparatus capable of reducing a situation in which a message transfer process between communication buses cannot be completed within an allowable delay time.
上記課題を解決するために、第1の観点に係る通信制御装置は、
複数の通信バス間に接続され、該通信バス間におけるメッセージの転送処理を行う通信制御装置であって、
前記メッセージを受信すると、転送先の前記通信バスに適合した転送データを、設定された転送データ生成順番に基づいて生成する制御部と、
前記メッセージの転送処理を完了するまでの時間である転送処理完了時間を算出するためのパラメータと、前記転送処理完了時間として許容可能な遅延時間である許容遅延時間とを、前記メッセージのデータIDに紐付けて格納する記憶部と、を備え、
前記制御部は、
前記メッセージを受信すると、該メッセージの前記転送データ生成順番を最後に設定し、
前記パラメータを読み出して、受信した前記メッセージの前記転送処理完了時間を算出し、
算出した前記転送処理完了時間が前記許容遅延時間を超える場合、受信した前記メッセージの前記転送データ生成順番を、転送データ生成順番が1つ前のメッセージの転送データ生成順番と入れ替える。
In order to solve the above problem, a communication control apparatus according to a first aspect
A communication control device that is connected between a plurality of communication buses and performs message transfer processing between the communication buses,
Upon receipt of the message, a control unit that generates transfer data suitable for the communication bus of the transfer destination based on the set transfer data generation order;
A parameter for calculating a transfer process completion time which is a time until the transfer process of the message is completed and an allowable delay time which is an allowable delay time as the transfer process completion time are set in the data ID of the message. A storage unit for linking and storing,
The controller is
When the message is received, the transfer data generation order of the message is set last,
Read the parameter, calculate the transfer processing completion time of the received message,
When the calculated transfer processing completion time exceeds the allowable delay time, the transfer data generation order of the received message is replaced with the transfer data generation order of the message having the previous transfer data generation order.
第1の観点に係る通信制御装置によれば、通信バス間におけるメッセージの転送処理を許容遅延時間内に完了できない事態を低減しうる。 According to the communication control device according to the first aspect, it is possible to reduce the situation in which the message transfer process between the communication buses cannot be completed within the allowable delay time.
以下、本開示の実施形態について、図面を参照して説明する。 Hereinafter, embodiments of the present disclosure will be described with reference to the drawings.
図1に示すように、通信制御装置100は、複数の通信バス1〜3の間に接続されている。図1に示す例では、通信バス1、通信バス2及び通信バス3の通信プロトコルは、それぞれ、CAN、CAN FD(CAN with Flexible Data rate)及びイーサネット(登録商標)(Ethernet)である。CAN FD及びイーサネットは、CANよりも通信速度の速い通信プロトコルである。
As shown in FIG. 1, the
なお、通信バス1、通信バス2及び通信バス3の通信プロトコルを、それぞれ、CAN、CAN FD及びイーサネットとしたのは一例であり、通信バス1〜3の通信プロトコルは、これに限定されない。
Note that the communication protocols of the
また、本実施形態においては、通信制御装置100が3つの通信バス1〜3の間に接続されている場合を例に挙げて説明するが、通信制御装置100が接続される通信バスの数はこれに限定されない。通信制御装置100が接続される通信バスの数は、2つでもよいし、4つ以上でもよい。
Moreover, in this embodiment, although the case where the
通信バス1には、電子制御ユニット(ECU:Electronic Control Unit)201が接続されている。通信バス2には、電子制御ユニット202が接続されている。通信バス3には、電子制御ユニット203が接続されている。電子制御ユニット201〜203は、自動車などの車両に搭載されている電装品を制御する制御ユニットである。
An electronic control unit (ECU) 201 is connected to the
図1においては、通信バス1に2つの電子制御ユニット201が接続されているが、通信バス1に接続される電子制御ユニット201の個数はこれに限定されない。通信バス1には、1つ又は3つ以上の電子制御ユニット201が接続されてよい。通信バス2に接続される電子制御ユニット202の個数、及び、通信バス3に接続される電子制御ユニット203の個数についても同様である。
Although two
通信制御装置100は、自動車などの車両に搭載されていてよい。通信制御装置100は、通信バス1〜3の間におけるメッセージの転送処理を行う。
The
図2に示すように、一実施形態に係る通信制御装置100は、受信部10−1〜10−3と、受信バッファ20−1〜20−3と、送信バッファ30−1〜30−3と、送信部40−1〜40−3と、記憶部50と、制御部60と、タイムカウンタ70とを備える。
As illustrated in FIG. 2, the
受信部10−1〜10−3は、それぞれ、通信バス1〜3に接続されている。
The receiving units 10-1 to 10-3 are connected to the
受信部10−1は、図1に示す電子制御ユニット201から通信バス1を介してメッセージを受信すると、通信バス1の通信プロトコルに応じた処理を行い、該メッセージを受信バッファ20−1に格納する。通信プロトコルに応じた処理は、例えば、受信したメッセージのCRCチェックなどである。
When receiving a message from the
受信部10−2及び10−3の機能は、受信部10−1の機能と同様であるため、受信部10−2及び10−3の説明は省略する。以後、受信部10−1〜10−3について、特に区別する必要がない場合は、受信部10と総称する場合がある。 Since the functions of the receiving units 10-2 and 10-3 are the same as the functions of the receiving unit 10-1, description of the receiving units 10-2 and 10-3 is omitted. Hereinafter, the receiving units 10-1 to 10-3 may be collectively referred to as the receiving unit 10 when it is not necessary to distinguish between them.
受信バッファ20−1〜20−3は、それぞれ、受信部10−1〜10−3に接続されている。 The reception buffers 20-1 to 20-3 are connected to the reception units 10-1 to 10-3, respectively.
受信バッファ20−1は、受信部10−1からメッセージを受け取ると、該メッセージを格納する。また、受信バッファ20−1は、受信部10−1から受け取ったメッセージを、制御部60の転送データ生成部66に出力する。
When receiving a message from the reception unit 10-1, the reception buffer 20-1 stores the message. In addition, the reception buffer 20-1 outputs the message received from the reception unit 10-1 to the transfer
受信バッファ20−2及び20−3の機能は、受信バッファ20−1の機能と同様であるため、受信バッファ20−2及び20−3の説明は省略する。以後、受信バッファ20−1〜20−3について、特に区別する必要がない場合は、受信バッファ20と総称する場合がある。 Since the functions of the reception buffers 20-2 and 20-3 are the same as the functions of the reception buffer 20-1, the description of the reception buffers 20-2 and 20-3 is omitted. Hereinafter, the reception buffers 20-1 to 20-3 may be collectively referred to as the reception buffer 20 when it is not necessary to distinguish them.
送信バッファ30−1〜30−3は、それぞれ、送信部40−1〜40−3に接続されている。 The transmission buffers 30-1 to 30-3 are connected to the transmission units 40-1 to 40-3, respectively.
送信バッファ30−1は、転送データ生成部66から転送データを受け取ると、該転送データを格納する。また、送信バッファ30−1は、転送データ生成部66から受け取った転送データを、送信部40−1に出力する。ここで、「転送データ」とは、転送先の通信プロトコルに適合するように転送データ生成部66によって処理されたデータである。送信バッファ30−1は、通信バス1の通信プロトコルに適合するように処理されたデータを、転送データ生成部66から受け取る。
When receiving the transfer data from the transfer
送信バッファ30−2及び30−3の機能は、送信バッファ30−1の機能と同様であるため、送信バッファ30−2及び30−3の説明は省略する。以後、送信バッファ30−1〜30−3について、特に区別する必要がない場合は、送信バッファ30と総称する場合がある。 Since the functions of the transmission buffers 30-2 and 30-3 are the same as the functions of the transmission buffer 30-1, the description of the transmission buffers 30-2 and 30-3 is omitted. Hereinafter, the transmission buffers 30-1 to 30-3 may be collectively referred to as the transmission buffer 30 when it is not necessary to distinguish between them.
送信部40−1〜40−3は、それぞれ、通信バス1〜3に接続されている。
The transmission units 40-1 to 40-3 are connected to the
送信部40−1は、送信バッファ30−1から転送データを受け取ると、通信バス1の通信プロトコルに応じた送信制御を行い、該転送データを、通信バス1を介して図1に示す電子制御ユニット201に送信する。通信プロトコルに応じた送信制御は、例えば、通信バス1の状態のチェックなどである。
When receiving the transfer data from the transmission buffer 30-1, the transmission unit 40-1 performs transmission control according to the communication protocol of the
送信部40−2及び40−3の機能は、送信部40−1の機能と同様であるため、送信部40−2及び40−3の説明は省略する。以後、送信部40−1〜40−3について、特に区別する必要がない場合は、送信部40と総称する場合がある。 Since the functions of the transmission units 40-2 and 40-3 are the same as the function of the transmission unit 40-1, the description of the transmission units 40-2 and 40-3 is omitted. Hereinafter, the transmitting units 40-1 to 40-3 may be collectively referred to as the transmitting unit 40 when it is not necessary to distinguish between them.
記憶部50は、制御部60に接続され、制御部60から取得した情報を格納する。記憶部50は、制御部60のワーキングメモリとして機能してよい。記憶部50は、制御部60で実行されるプログラムを格納してよい。記憶部50は、例えば、半導体メモリで構成されるが、これには限られず、磁気記憶媒体で構成されてよいし、他の記憶媒体で構成されてよい。記憶部50は、制御部60の一部として制御部60に含まれてよい。
The
記憶部50は、メッセージが含むデータIDに、転送先ポートと、許容遅延時間と、各種パラメータとを紐付けたテーブルを格納している。図3に、記憶部50が格納しているテーブルの一例を示す。
The
図3に示す例においては、記憶部50は、「データID」に、「転送先ポート」と、「許容遅延時間」と、「転送データ生成時間」と、「転送速度」と、「ヘッダとフッタの合計ビット数」とを紐付けたテーブルを格納している。
In the example illustrated in FIG. 3, the
データIDは、各メッセージに含まれるIDであり、メッセージがどのような内容のデータを含むメッセージであるかを示す。データIDは、例えば、メッセージに含まれるデータが車速であることを示す。 The data ID is an ID included in each message and indicates what kind of data the message contains. The data ID indicates that the data included in the message is the vehicle speed, for example.
転送先ポートは、メッセージの転送先がどの通信バスであるかを示す。例えば、転送先ポートが1chであるとき、メッセージの転送先は、通信バス1である。
The transfer destination port indicates which communication bus the message transfer destination is. For example, when the transfer destination port is 1ch, the message transfer destination is the
許容遅延時間は、通信制御装置100がメッセージの転送処理完了時間として、許容可能な遅延時間である。ここで、「転送処理完了時間」とは、通信制御装置100がメッセージを受信してからメッセージの転送処理を完了するまでの時間である。
The allowable delay time is an allowable delay time as a message transfer processing completion time by the
転送データ生成時間は、転送データ生成部66が転送データを生成する際にかかる時間である。転送データ生成時間は、例えば予め測定した値を、記憶部50に格納しておいてよい。
The transfer data generation time is a time required for the transfer
転送速度は、送信部40がメッセージを通信バスに送信する際にデータを送信できる速度である。 The transfer rate is a rate at which data can be transmitted when the transmission unit 40 transmits a message to the communication bus.
ヘッダとフッタの合計ビット数は、メッセージが含むヘッダのビット数と、メッセージが含むフッタのビット数とを合計したビット数である。 The total number of bits of the header and footer is the total number of bits of the header included in the message and the number of bits of the footer included in the message.
制御部60は、通信制御装置100の各構成部を制御する。制御部60は、例えば、制御手順を規定したプログラムを実行するCPU(Central Processing Unit)等のプロセッサで構成されてよい。制御部60は、例えば、記憶部50に格納されているプログラムを読み込み、各種プログラムを実行する。
The
制御部60は、フレーム情報抽出部61と、スケジューリング部62と、転送データ生成部66とを備える。フレーム情報抽出部61、スケジューリング部62及び転送データ生成部66により実行される処理は、制御部60を構成するプロセッサにより実行される。なお、制御部60を構成するプロセッサは、単一のプロセッサで構成される必要はなく、複数のプロセッサにより構成されていてもよい。
The
フレーム情報抽出部61は、受信バッファ20に格納されているメッセージから、フレーム情報として、メッセージのデータIDと、メッセージのデータサイズとを抽出し、スケジューリング部62に出力する。
The frame
スケジューリング部62は、受信部10が受信したメッセージから転送先の通信バスに適合した転送データを生成する際の順番をスケジューリングする。以後、転送データを生成する際の順番を、「転送データ生成順番」とも称する。
The
スケジューリング部62は、スケジューラ63と、算出部64と、判定部65とを備える。
The
スケジューラ63は、転送データ生成部66が受信バッファ20からメッセージを受け取ると、受け取ったメッセージの転送データ生成順番を最後に設定する。
When the transfer
スケジューラ63は、判定部65から転送データ生成順番の入れ替えの指示を受け取ると、受け取った指示に基づいて、転送データ生成順番を入れ替える。
When the
スケジューラ63は、現状の転送データ生成順番を記憶している。
The
算出部64は、記憶部50が格納しているテーブルから「転送データ生成時間」と、「転送速度」と、「ヘッダとフッタの合計ビット数」とを読み出して、受信バッファ20が受け取ったメッセージの転送処理完了時間を算出する。算出部64による転送処理完了時間の具体的な算出方法の一例については、図5に示すフローチャートの説明において後述する。
The
判定部65は、転送データ生成部66が受け取ったメッセージに対して算出部64が算出した転送処理完了時間と、該メッセージの許容遅延時間とを比較し、転送処理完了時間が許容遅延時間を超えているかを判定する。この際、判定部65は、転送データ生成部66が受け取ったメッセージの許容遅延時間を、記憶部50から、該メッセージのデータIDに紐付けられている許容遅延時間を読み出すことにより取得してよい。
The
判定部65は、メッセージの転送処理完了時間が許容遅延時間を超えていると判定した場合、該メッセージの転送データ生成順番を、転送データ生成順番が1つ前のメッセージの転送データ生成順番と入れ替えるようにスケジューラ63に指示する。
When the
転送データ生成部66は、受信バッファ20からメッセージを受け取る。転送データ生成部66は、スケジューラ63が記憶している転送データ生成順番に基づいて、転送データを生成する。
The transfer
転送データ生成部66は、転送データを生成すると、記憶部50が格納しているテーブルを参照し、転送データの転送先ポートに対応する送信バッファ30に、生成した転送データを格納する。
When the transfer data is generated, the transfer
転送データ生成部66は、受信バッファ20から新たなメッセージを受け取ると、転送データの生成処理を中断する。
When the transfer
タイムカウンタ70は、転送データ生成部66がメッセージの転送データを生成する処理を開始してからの経過時間をカウントする。以後、転送データ生成部66が転送データを生成する処理のことを、「転送データ生成処理」とも称する。
The time counter 70 counts an elapsed time after the transfer
図4を参照して、タイムカウンタ70の動作について説明する。図4においては、転送データ生成部66は、時間t0において、受信したメッセージの転送データ生成処理を開始するものとする。
The operation of the
転送データ生成部66は、時間t0において開始した転送データ生成処理を、時間t2に完了し、生成した転送データを送信バッファ30に格納する。図4に示す時間aは、時間t2から時間t0を引いた時間を表す。すなわち、時間aは、転送データ生成部66が転送データ生成処理を開始してから、生成した転送データを送信バッファ30に格納するまでの時間を示す。
The transfer
送信バッファ30は、時間t2に、転送データ生成部66からの転送データの受け取りを開始し、受け取った転送データを、送信部40に出力する。送信部40は、送信バッファ30から受け取った転送データを、送信部40が接続している通信バスに送信する。送信部40は、転送データの送信処理を、時間t3に完了する。図4に示す時間bは、時間t3から時間t2を引いた時間を表す。すなわち、時間bは、送信バッファ30が転送データ生成部66から転送データを受け取ってから、送信部40が転送データの送信処理を完了するまでの時間を示す。
The transmission buffer 30 starts receiving transfer data from the transfer
タイムカウンタ70は、図4に示す時間Tをカウントする。図4において、時間t1は、現在、転送データ生成部66による転送データ生成処理が時間t1まで進んでいることを意味する。すなわち、タイムカウンタ70は、転送データ生成部66が転送データ生成処理を開始してから、現時点で転送データ生成処理が進んでいる部分までの時間Tをカウントする。
The time counter 70 counts the time T shown in FIG. In FIG. 4, time t1 means that the transfer data generation process by the transfer
タイムカウンタ70は、転送データ生成部66が受信バッファ20から受け取ったそれぞれのメッセージごとに、転送データ生成部66がメッセージの転送データ生成処理を開始してからの経過時間をカウントする。
For each message received by the transfer
タイムカウンタ70は、転送データ生成部66が新たなメッセージを受信バッファ20から受け取ると、制御部60から、経過時間のカウントの停止指示を受け取る。タイムカウンタ70は、カウントの停止指示を受け取ると、現在転送データを生成していたメッセージのカウントの値を記憶し、経過時間のカウントを停止する。
When the transfer
タイムカウンタ70は、制御部60から、経過時間のカウントの再開指示を受け取ると、記憶していたカウントの値から、経過時間のカウントを再開する。
When the
タイムカウンタ70は、転送データ生成部66が現在転送データを生成しているメッセージについての転送データ生成処理を完了すると、転送データ生成部66からの指示を受けて、カウントの値をクリアする。
When the transfer
図5に示すフローチャートを参照して、一実施形態に係る通信制御装置100の動作の一例について説明する。図5に示すフローチャートの説明においては、図6〜図12を適宜参照して説明する。
With reference to the flowchart shown in FIG. 5, an example of operation | movement of the
図5に示すフローチャートの説明においては、転送データ生成部66が、2つのメッセージを受信バッファ20から受け取っている状態において、新たなメッセージを受信バッファ20から受け取った場合を例に挙げて説明する。
In the description of the flowchart illustrated in FIG. 5, a case where the transfer
通信制御装置100の制御部60は、受信バッファ20が新たなメッセージを受信したかを常時監視している(ステップS101)。
The
受信バッファ20が新たなメッセージを受信していない場合(ステップS101のNo)、制御部60は、ステップS101の処理を繰り返す。
When the reception buffer 20 has not received a new message (No in step S101), the
受信バッファ20が新たなメッセージを受信した場合(ステップS101のYes)、フレーム情報抽出部61は、受信バッファ20に格納されたメッセージからフレーム情報を抽出する(ステップS102)。以後、新たに受信したメッセージのことを「受信メッセージ」と称して説明する。フレーム情報抽出部61は、フレーム情報として、受信メッセージのデータIDと、受信メッセージのデータサイズとを抽出し、スケジューリング部62に出力する。また、受信バッファ20は、受信メッセージを転送データ生成部66に出力する。
When the reception buffer 20 receives a new message (Yes in step S101), the frame
スケジューラ63は、受信メッセージの転送データ生成順番を一番最後に設定する(ステップS103)。本説明においては、2つのメッセージが転送データ生成部66において処理中であるため、スケジューラ63は、受信メッセージの転送データ生成順番を、3番目に設定する。この様子を、図6に示す。なお、既に転送データ生成部66において処理中であった2つのメッセージは、「メッセージ1」及び「メッセージ2」であるものとする。
The
算出部64は、受信メッセージの転送処理完了時間を算出する(ステップS104)。図7を参照して、算出部64による受信メッセージの転送処理完了時間の算出について説明する。
The
図7において、受信部10は、時間t1に受信メッセージを受信し、送信部40は、時間t2に、受信メッセージから生成した転送データの送信を完了するものとする。この場合、転送処理完了時間は、図7において、cRXとして表される時間である。 In FIG. 7, it is assumed that the reception unit 10 receives a reception message at time t1, and the transmission unit 40 completes transmission of transfer data generated from the reception message at time t2. In this case, the transfer processing completion time is a time represented as c RX in FIG.
算出部64は、受信メッセージの転送処理完了時間cRXを、以下の数式(1)により算出する。
cRX=(a1−T1)+(a2−T2)+aRX+bRX (1)
ここで、a1は、メッセージ1の転送データ生成時間である。a2は、メッセージ2の転送データ生成時間である。aRXは、受信メッセージの転送データ生成時間である。算出部64は、図3に示すような記憶部50が格納するテーブルを参照して、各メッセージのデータIDに紐付けられた転送データ生成時間を読み出す。
The
c RX = (a 1 −T 1 ) + (a 2 −T 2 ) + a RX + b RX (1)
Here, a 1 is the transfer data generation time of
また、式(1)において、T1は、メッセージ1について、タイムカウンタ70が記憶しているカウントの値である。すなわち、T1は、メッセージ1の転送データ生成処理がT1だけ進んでいることを意味する。T2は、メッセージ2について、タイムカウンタ70が記憶しているカウントの値である。図7に示す例においては、T2はゼロである。算出部64は、タイムカウンタ70からT1及びT2を読み出す。
In Expression (1), T 1 is a count value stored in the
また、式(1)において、bRXは、転送データ生成部66が受信メッセージから生成した転送データが送信部40によって送信される際にかかる時間である。以後、転送データが送信部40によって送信される際にかかる時間を「転送データ送信時間」と称して説明する。
In the equation (1), b RX is a time taken when the transmission data generated by the transfer
算出部64は、転送データ送信時間bRXを、以下の数式(2)により算出する。
bRX=(転送データ全体のビット数)/(転送先の通信バスの転送速度) (2)
ここで、算出部64は、式(2)における「転送データ全体のビット数」を、フレーム情報抽出部61が抽出した受信メッセージのデータサイズと、記憶部50が格納するテーブルから読み出した「ヘッダとフッタの合計ビット数」とを足し合わせることにより算出する。また、算出部64は、式(2)における「転送先の通信バスの転送速度」を、記憶部50が格納しているテーブルの「転送速度」を参照して読み出す。
The
b RX = (number of bits of the entire transfer data) / (transfer speed of the destination communication bus) (2)
Here, the
なお、送信部40による転送データの送信処理は、転送データ生成部66による転送データ生成処理と独立して実行しうる。そのため、数式(1)によるcRXの算出において、図7に示すb1及びb2は足し合わされていない。
The transfer data transmission process by the transmission unit 40 can be executed independently of the transfer data generation process by the transfer
判定部65は、算出部64が算出した受信メッセージの転送処理完了時間cRXが、受信メッセージの許容遅延時間を超えるかを判定する(ステップS105)。判定部65は、受信メッセージの許容遅延時間を、記憶部50が格納するテーブルから読み出す。図7において、受信メッセージの許容遅延時間を、WRXとして示す。図7に示す例では、受信メッセージの転送処理完了時間cRXは、受信メッセージの許容遅延時間WRXを超えている。なお、図7において、メッセージ1及びメッセージ2の許容遅延時間を、それぞれ、W1及びW2として示している。図7に示す例では、メッセージ1の転送データの送信は、W1を超えずに完了している。また、メッセージ2の転送データの送信は、W2を超えずに完了している。
The
判定部65が、算出部64が算出した受信メッセージの転送処理完了時間cRXが、受信メッセージの許容遅延時間を超えていると判定すると(ステップS105のYes)、スケジューラ63は、受信メッセージの転送データ生成順番を、転送データ生成順番が1つ前のメッセージであるメッセージ2の転送データ生成順番と入れ替える(ステップS106)。この様子を図8に示す。図8に示すように、スケジューラ63は、受信メッセージの転送データ生成順番を2番目にし、メッセージ2の転送データ生成順番を3番目にする。
When the
図9に、受信メッセージとメッセージ2の転送データ生成順番を入れ替え、受信メッセージの転送データ生成順番を2番目にしたときの様子を示す。この状態で、算出部64は、再度ステップS104を実行し、受信メッセージの転送処理完了時間を算出する。
FIG. 9 shows a state when the transfer data generation order of the received message and the
算出部64は、受信メッセージの転送データ生成順番を2番目にしたときの受信メッセージの転送処理完了時間cRXを、以下の数式(3)により算出する。
cRX=(a1−T1)+aRX+bRX (3)
The calculating
c RX = (a 1 −T 1 ) + a RX + b RX (3)
判定部65は、算出部64が数式(3)により算出した受信メッセージの転送処理完了時間cRXが、受信メッセージの許容遅延時間を超えるかを判定する(ステップS105)。図9に示す例では、数式(3)により算出した受信メッセージの転送処理完了時間cRXは、依然として、受信メッセージの許容遅延時間WRXを超えている。
The
したがって、判定部65は、再度ステップS106に進み、スケジューラ63は、受信メッセージの転送データ生成順番を、転送データ生成順番がさらに1つ前のメッセージであるメッセージ1の転送データ生成順番と入れ替える。この様子を図10に示す。図10に示すように、スケジューラ63は、受信メッセージの転送データ生成順番を1番目にし、メッセージ1の転送データ生成順番を2番目にする。
Accordingly, the
図11に、受信メッセージとメッセージ1の転送データ生成順番を入れ替え、受信メッセージの転送データ生成順番を1番目にしたときの様子を示す。この状態で、算出部64は、再度ステップS104を実行し、受信メッセージの転送処理完了時間を算出する。
FIG. 11 shows a state in which the transfer data generation order of the received message and the
算出部64は、受信メッセージの転送データ生成順番を1番目にしたときの受信メッセージの転送処理完了時間cRXを、以下の数式(4)により算出する。
cRX=aRX+bRX (4)
The calculating
c RX = a RX + b RX (4)
判定部65は、算出部64が数式(4)により算出した受信メッセージの転送処理完了時間cRXが、受信メッセージの許容遅延時間を超えるかを判定する(ステップS105)。図11に示す例では、数式(4)により算出した受信メッセージの転送処理完了時間cRXは、受信メッセージの許容遅延時間WRXを超えていない。したがって、ステップS105の判定はNoとなり、判定部65は、ステップS107に進む。
The
転送データ生成部66は、タイムカウンタ70から受信メッセージのカウントの値を読み出し、読み出したカウントの値を再開位置として、転送データ生成処理を開始する(ステップS107)。受信メッセージに対しては、これまで転送データ生成処理が実行されていなかったため、タイムカウンタ70によるカウントの値はゼロである。したがって、転送データ生成部66は、受信メッセージの最初の部分から転送データ生成処理を開始する。転送データ生成部66は、転送データ生成処理を開始すると、経過時間のカウントを開始するように、カウント開始のトリガをタイムカウンタ70に送信する。転送データ生成部66は、転送データを生成すると、記憶部50が格納するテーブルから転送先ポートを読み出し、対応する送信バッファ30に、生成した転送データを格納する。
The transfer
制御部60は、転送データ生成部66が転送データ生成処理を実行している間も、受信バッファ20が新たなメッセージを受信したかを監視している(ステップS108)。
The
受信バッファ20が新たなメッセージを受信した場合(ステップS108のYes)、転送データ生成部66は、転送データ生成処理を中断する。タイムカウンタ70は、転送データ生成処理の中断時点でのカウントの値を記憶し、経過時間のカウントを停止する(ステップS109)。制御部60は、ステップS109を実行した後、ステップS102に戻る。
When the reception buffer 20 receives a new message (Yes in step S108), the transfer
受信バッファ20が新たなメッセージを受信していない場合(ステップS108のNo)、転送データ生成部66は、転送データ生成処理が完了したか判定する(ステップS110)。転送データ生成処理が完了していない場合(ステップS110のNo)、転送データ生成部66は、ステップS110の処理を繰り返す。転送データ生成処理が完了した場合(ステップS110のYes)、転送データ生成部66は、転送データ生成処理が完了した旨を、スケジューリング部62に通知する。また、転送データ生成部66は、転送データ生成処理が完了したメッセージのカウントの値をクリアするように、タイムカウンタ70に指示する。
When the reception buffer 20 has not received a new message (No in step S108), the transfer
スケジューラ63は、転送データ生成処理が完了していないメッセージがあるか判定する(ステップS111)。
The
転送データ生成処理が完了していないメッセージがない場合(ステップS111のNo)、制御部60は、スケジューラ63が記憶している転送データ生成順番をクリアして(ステップS112)、ステップS101に戻る。
If there is no message for which transfer data generation processing has not been completed (No in step S111), the
転送データ生成処理が完了していないメッセージがある場合(ステップS111のYes)、スケジューラ63は、転送データ生成処理が完了していない待機中のメッセージの転送データ生成順番を1つ繰り上げる(ステップS113)。図12に、メッセージ1及びメッセージ2の転送データ生成順番を繰り上げる様子を示す。スケジューラ63は、待機中のメッセージの転送データ生成順番を繰り上げると、転送データ生成順番が1番目のメッセージを転送データ生成部66に通知する。転送データ生成部66は、転送データ生成順番が1番目のメッセージに対し、ステップS107の処理を実行する。
If there is a message for which transfer data generation processing has not been completed (Yes in step S111), the
本実施形態に係る通信制御装置100によれば、制御部60は、メッセージを受信すると、該メッセージの転送データ生成順番を最後に設定する。その後、制御部60は、記憶部50からパラメータを読み出して、受信したメッセージの転送処理完了時間を算出する。そして、制御部60は、算出した転送処理完了時間が許容遅延時間を超える場合、受信したメッセージの転送データ生成順番を、転送データ生成順番が1つ前のメッセージの転送データ生成順番と入れ替える。これにより、本実施形態に係る通信制御装置100は、通信バス間におけるメッセージの転送処理を許容遅延時間内に完了できない事態を低減しうる。また、本実施形態に係る通信制御装置100の制御部60の処理において、制御部60は、クロック周波数の高いプロセッサで構成されることを要求しないため、プロセッサのコストを低減しうる。
According to the
また、本実施形態に係る通信制御装置100によれば、制御部60は、転送データ生成順番を入れ替えると、入れ替えた後の転送データ生成順番において、転送処理完了時間を算出する。そして、制御部60は、入れ替えた後の転送データ生成順番において算出した転送処理完了時間が許容遅延時間を超える場合、受信したメッセージの転送データ生成順番を、転送データ生成順番がさらに1つ前のメッセージの転送データ生成順番と入れ替える。これにより、本実施形態に係る通信制御装置100は、通信バス間におけるメッセージの転送処理を許容遅延時間内に完了できない事態をさらに低減しうる。
Further, according to the
また、本実施形態に係る通信制御装置100によれば、制御部60は、受信したメッセージの転送処理完了時間が許容遅延時間を超えなくなるまで、転送データ生成順番を入れ替える処理を繰り返す。これにより、本実施形態に係る通信制御装置100は、通信バス間におけるメッセージの転送処理を許容遅延時間内に完了できない事態をさらに低減しうる。
Also, according to the
本開示に係る一実施形態について、諸図面及び実施例に基づき説明してきたが、当業者であれば本開示に基づき種々の変形又は修正を行うことが容易であることに注意されたい。従って、これらの変形又は修正は本開示の範囲に含まれることに留意されたい。例えば、各手段に含まれる機能等は論理的に矛盾しないように再配置可能であり、複数の手段等を1つに組み合わせたり、あるいは分割したりすることが可能である。 Although one embodiment according to the present disclosure has been described based on the drawings and examples, it should be noted that those skilled in the art can easily make various changes or modifications based on the present disclosure. Accordingly, it should be noted that these variations or modifications are included in the scope of the present disclosure. For example, the functions included in each means can be rearranged so as not to be logically contradictory, and a plurality of means can be combined into one or divided.
1、2、3 通信バス
10 受信部
20 受信バッファ
30 送信バッファ
40 送信部
50 記憶部
60 制御部
61 フレーム情報抽出部
62 スケジューリング部
63 スケジューラ
64 算出部
65 判定部
66 転送データ生成部
70 タイムカウンタ
100 通信制御装置
201、202、203 電子制御ユニット(ECU)
1, 2, 3 Communication bus 10 Reception unit 20 Reception buffer 30 Transmission buffer 40
Claims (7)
前記メッセージを受信すると、転送先の前記通信バスに適合した転送データを、設定された転送データ生成順番に基づいて生成する制御部と、
前記メッセージの転送処理を完了するまでの時間である転送処理完了時間を算出するためのパラメータと、前記転送処理完了時間として許容可能な遅延時間である許容遅延時間とを、前記メッセージのデータIDに紐付けて格納する記憶部と、を備え、
前記制御部は、
前記メッセージを受信すると、該メッセージの前記転送データ生成順番を最後に設定し、
前記パラメータを読み出して、受信した前記メッセージの前記転送処理完了時間を算出し、
算出した前記転送処理完了時間が前記許容遅延時間を超える場合、受信した前記メッセージの前記転送データ生成順番を、転送データ生成順番が1つ前のメッセージの転送データ生成順番と入れ替える、通信制御装置。 A communication control device that is connected between a plurality of communication buses and performs message transfer processing between the communication buses,
Upon receipt of the message, a control unit that generates transfer data suitable for the communication bus of the transfer destination based on the set transfer data generation order;
A parameter for calculating a transfer process completion time that is a time until the transfer process of the message is completed and an allowable delay time that is an allowable delay time as the transfer process completion time are set in the data ID of the message. A storage unit for linking and storing,
The controller is
When the message is received, the transfer data generation order of the message is set last,
Read the parameter, calculate the transfer processing completion time of the received message,
When the calculated transfer processing completion time exceeds the allowable delay time, the communication control device replaces the transfer data generation order of the received message with the transfer data generation order of the message whose transfer data generation order is one previous.
前記制御部は、
前記転送データ生成順番を入れ替えると、入れ替えた後の前記転送データ生成順番において、前記転送処理完了時間を算出し、
前記入れ替えた後の前記転送データ生成順番において算出した前記転送処理完了時間が前記許容遅延時間を超える場合、受信した前記メッセージの前記転送データ生成順番を、転送データ生成順番がさらに1つ前のメッセージの転送データ生成順番と入れ替える、通信制御装置。 The communication control device according to claim 1,
The controller is
When the transfer data generation order is changed, the transfer process completion time is calculated in the transfer data generation order after the change,
When the transfer processing completion time calculated in the transfer data generation order after the replacement exceeds the allowable delay time, the transfer data generation order of the received message is changed to a message whose transfer data generation order is one before. The communication control device is switched with the transfer data generation order.
前記制御部は、受信した前記メッセージの前記転送処理完了時間が前記許容遅延時間を超えなくなるまで、前記転送データ生成順番を入れ替える処理を繰り返す、通信制御装置。 The communication control device according to claim 2,
The communication control device, wherein the control unit repeats the process of changing the transfer data generation order until the transfer process completion time of the received message does not exceed the allowable delay time.
前記制御部は、受信した前記メッセージよりも前記転送データ生成順番が前のメッセージの前記転送データを生成する時間と、受信した前記メッセージの前記転送データを生成する時間と、受信した前記メッセージの前記転送データを転送先の前記通信バスに送信する時間と、を足し合わせて、前記転送処理完了時間を算出する、通信制御装置。 In the communication control device according to any one of claims 1 to 3,
The control unit is configured to generate the transfer data of the message whose transfer data generation order is earlier than the received message, the time to generate the transfer data of the received message, and the time of the received message. A communication control device that calculates the transfer process completion time by adding together the time for transmitting transfer data to the transfer destination communication bus.
受信した各メッセージについて、前記転送データの生成処理を開始してからの経過時間をカウントするタイムカウンタをさらに備える、通信制御装置。 In the communication control device according to any one of claims 1 to 4,
A communication control device, further comprising a time counter that counts an elapsed time from the start of the transfer data generation process for each received message.
前記制御部は、前記メッセージを受信すると、前記転送データを生成中のメッセージに対する前記転送データの生成処理を中断し、
前記タイムカウンタは、前記転送データの生成処理が中断すると、前記経過時間のカウントの値を記憶して前記経過時間のカウントを停止する、通信制御装置。 The communication control device according to claim 5, wherein
The control unit, upon receiving the message, interrupts the generation process of the transfer data for the message for which the transfer data is being generated,
When the transfer data generation process is interrupted, the time counter stores a value of the elapsed time and stops counting the elapsed time.
前記制御部は、前記転送データ生成順番の入れ替えが完了すると、前記タイムカウンタが記憶している前記経過時間のカウントの値から、前記転送データの生成処理を開始する、通信制御装置。 The communication control device according to claim 6,
The control unit starts the transfer data generation processing from the count value of the elapsed time stored in the time counter when the transfer data generation order is changed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018110496A JP2019213163A (en) | 2018-06-08 | 2018-06-08 | Communication control unit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018110496A JP2019213163A (en) | 2018-06-08 | 2018-06-08 | Communication control unit |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2019213163A true JP2019213163A (en) | 2019-12-12 |
Family
ID=68847122
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018110496A Pending JP2019213163A (en) | 2018-06-08 | 2018-06-08 | Communication control unit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2019213163A (en) |
-
2018
- 2018-06-08 JP JP2018110496A patent/JP2019213163A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5362668B2 (en) | In-car data relay device | |
KR101247483B1 (en) | Generating, at least in part, and/or receiving, at least in part, at least one request | |
JP2009527168A (en) | Gateway for automatic routing of messages between buses | |
US8510403B2 (en) | Self clocking interrupt generation in a network interface card | |
CN112711550B (en) | DMA automatic configuration module and system-on-chip SOC | |
JP2002135257A (en) | Data processor for serial communication | |
CN107517167B (en) | Data transmission control method and device and SoC chip | |
WO2017052961A1 (en) | Technologies for network round-trip time estimation | |
CN112486112A (en) | EtherCAT master station control system and control method thereof | |
JP2014021887A (en) | Numerical control device communicating with io units | |
US20110188520A1 (en) | Method for operating a time-controlled bus system | |
JP2019213163A (en) | Communication control unit | |
JP6402576B2 (en) | COMMUNICATION DEVICE, INFORMATION PROCESSING DEVICE, INFORMATION PROCESSING SYSTEM, AND COMMUNICATION DEVICE CONTROL METHOD | |
JP2019133206A (en) | Motor drive system, motor control system and mobile robot | |
CN104468404A (en) | Buffer configuration method and device | |
US9619005B2 (en) | Apparatus and method for saving power of USB device | |
CN111385219B (en) | Method for realizing high-performance high-precision software TCP speed limit by hardware interrupt | |
JP6328324B2 (en) | Wireless communication apparatus, wireless communication method, and wireless communication program | |
CN103873386A (en) | Method for managing network transmission sequence | |
JP2015126499A (en) | Transmitting device, receiving device, packet transmitting method, and packet receiving method | |
JP2006345171A (en) | Data transmitting method and data transmission system | |
CN106301712A (en) | A kind of synchronized communication method and application apparatus, system | |
CN117748556A (en) | Energy storage parallel operation system | |
CN116886641A (en) | Data transmission method and device for network cluster | |
CN116578509A (en) | DMA special for reconfigurable network security processor and design method |