JP2013012914A - Communication node, communication system, and communication method - Google Patents
Communication node, communication system, and communication method Download PDFInfo
- Publication number
- JP2013012914A JP2013012914A JP2011144408A JP2011144408A JP2013012914A JP 2013012914 A JP2013012914 A JP 2013012914A JP 2011144408 A JP2011144408 A JP 2011144408A JP 2011144408 A JP2011144408 A JP 2011144408A JP 2013012914 A JP2013012914 A JP 2013012914A
- Authority
- JP
- Japan
- Prior art keywords
- communication
- bus
- message frame
- time interval
- message
- 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.)
- Withdrawn
Links
Images
Landscapes
- Small-Scale Networks (AREA)
Abstract
Description
本発明は、通信システムに関する。 The present invention relates to a communication system.
車両には、1又は複数の通信システムが搭載されている。車両の主にボデー系に使用される車載LANの通信プロトコルとして、ローカルインターコネクトネットワーク(LIN: Local Interconnect Network)が知られている。 One or a plurality of communication systems are mounted on the vehicle. 2. Description of the Related Art A local interconnect network (LIN) is known as a communication protocol for an in-vehicle LAN mainly used for a vehicle system of a vehicle.
LINには、マスターとなる通信ノードと、スレーブとなる通信ノードが含まれる。マスターとなる通信ノードは、ネットワークの通信タイミング等を制御する。LINでは、1つの通信ノードがマスターとなる。 The LIN includes a communication node serving as a master and a communication node serving as a slave. The master communication node controls network communication timing and the like. In LIN, one communication node becomes a master.
LINに関して、マスタースレーブ方式を維持しながら、複数の通信ノードをマスターの候補とできる技術が知られている(例えば、特許文献1参照)。 Regarding LIN, a technique is known in which a plurality of communication nodes can be master candidates while maintaining a master-slave method (see, for example, Patent Document 1).
既存のLINクラスタに、新たに自発的に通信を行う通信ノードを追加できない。新たに通信ノードを追加するためには、該追加される通信ノードを制御するための通信スケジュールを設計したり、既存のLINクラスタに含まれる通信ノードを制御するための通信スケジュールを再設計したりする必要がある。 A new communication node for autonomous communication cannot be added to an existing LIN cluster. In order to newly add a communication node, a communication schedule for controlling the added communication node is designed, or a communication schedule for controlling a communication node included in an existing LIN cluster is redesigned. There is a need to.
また、動作が保証されている独立したLINクラスタが複数ある場合に、これらのLINクラスタを1つのLINクラスタとして結合できない。 Further, when there are a plurality of independent LIN clusters whose operations are guaranteed, these LIN clusters cannot be combined as one LIN cluster.
また、通信制御における通信ノード間の主従関係と、実際に通信制御を行う際の主従関係とを一致させようとする場合に、設計に制約がでる。 In addition, there is a restriction in design when trying to make the master-slave relationship between communication nodes in communication control coincide with the master-slave relationship in actual communication control.
LINは、マスタースレーブ方式を採用しているため、複数のマスターノードを1つのネットワークに配置できない。 Since LIN employs a master-slave method, a plurality of master nodes cannot be arranged in one network.
仮に、1つのネットワークに、複数のマスターノードを配置した場合について説明する。 A case where a plurality of master nodes are arranged in one network will be described.
図1は、1つのLINに複数のマスターノードを配置した場合に、各マスターノードにより独立してスケジューリングが実行された場合の一例を示す。図1には、1つのLINに、N(Nは、N>1の整数)個のマスターノードが配置される場合について示される。N個のマスターノードは、同一の通信バスに接続される。また、N個のマスターノードは独立に動作する。 FIG. 1 shows an example where scheduling is executed independently by each master node when a plurality of master nodes are arranged in one LIN. FIG. 1 shows a case where N (N is an integer of N> 1) master nodes are arranged in one LIN. N master nodes are connected to the same communication bus. Further, the N master nodes operate independently.
マスターノード1により、通信バス上に、メッセージ1(M1)を送信するためのスケジューリングが行われる。該メッセージは複数のフレームを含み、各フレームはID1、ID2、ID3、ID4により表される。マスターノード2により、通信バス上に、メッセージ2(M2)を送信するためのスケジューリングが行われる。該メッセージは複数のフレームを含み、各フレームはID1、ID2、ID3、ID4により表される。マスターノードNにより、通信バス上に、メッセージN(MN)を送信するためのスケジューリングが行われる。該メッセージは複数のフレームを含み、各フレームはID1、ID2、ID3、ID4により表される。
The
マスターノード2によるスケジューリングによりメッセージ2のID1が送信される時間は、マスターノード1によるスケジューリングにより、通信バス上に、メッセージ1のID1が送信されている。通信バス上に、メッセージ1のID1が送信されているため、通信バス上で、複数のメッセージが重複してスケジューリングされている。この状態で、マスターノード2によるスケジューリングに従って、メッセージ2のID1が送信された場合、メッセージ2のID1は、メッセージ1のID1と衝突する。
During the time when ID1 of message 2 is transmitted by scheduling by master node 2, ID1 of
また、マスターノード2によるスケジューリングにより、メッセージ2のID2が送信される時間は、マスターノード1によるスケジューリングにより、通信バス上に、メッセージ1のID3が送信されている。通信バス上に、メッセージ1のID3が送信されているため、通信バス上で、複数のメッセージが重複してスケジューリングされている。この状態で、マスターノード2によるスケジューリングに従って、メッセージ2のID2が送信された場合、メッセージ2のID2は、メッセージ1のID3と衝突する。
Also, during the time when ID2 of message 2 is transmitted by scheduling by master node 2, ID3 of
また、マスターノード2によるスケジューリングにより、メッセージ2のID3が送信される時間は、メッセージが送信される時間としてスケジューリングされていない。通信バス上に、メッセージが送信されていないため、マスターノード2によるスケジューリングに従って、メッセージ2のID3が送信される。 In addition, due to the scheduling by the master node 2, the time for transmitting ID3 of the message 2 is not scheduled as the time for transmitting the message. Since no message is transmitted on the communication bus, ID3 of message 2 is transmitted according to the scheduling by the master node 2.
また、マスターノード2によるスケジューリングにより、メッセージ2のID4が送信される時間は、マスターノードNによるスケジューリングにより、通信バス上に、メッセージNのID4が送信されている。通信バス上に、メッセージNのID4が送信されているため、通信バス上で、複数のメッセージが重複してスケジューリングされている。この状態で、マスターノード2によるスケジューリングに従って、メッセージ2のID4が送信された場合、メッセージ2のID4は、メッセージNのID4と衝突する。 The ID4 of the message 2 is transmitted on the communication bus by the scheduling by the master node N during the time when the ID4 of the message 2 is transmitted by the scheduling by the master node 2. Since ID4 of message N is transmitted on the communication bus, a plurality of messages are scheduled redundantly on the communication bus. In this state, when ID4 of message 2 is transmitted according to the scheduling by master node 2, ID4 of message 2 collides with ID4 of message N.
また、マスターノードNによるスケジューリングにより、メッセージNのID1が送信される時間は、マスターノード1によるスケジューリングにより、通信バス上に、メッセージ1のID2が送信されている。通信バス上に、メッセージ1のID2が送信されているため、通信バス上で、複数のメッセージが重複してスケジューリングされている。この状態で、マスターノードNによるスケジューリングに従って、メッセージNのID1が送信された場合、メッセージNのID1は、メッセージ1のID2と衝突する。
Also, during the time when ID1 of message N is transmitted by scheduling by master node N, ID2 of
また、マスターノードNによるスケジューリングにより、メッセージNのID2が送信される時間は、マスターノード1によるスケジューリングにより、通信バス上に、メッセージ1のID3が送信されている。通信バス上に、メッセージ1のID3が送信されているため、通信バス上で、複数のメッセージが重複してスケジューリングされている。この状態で、マスターノードNによるスケジューリングに従って、メッセージNのID2が送信された場合、メッセージNのID2は、メッセージ1のID3と衝突する。
Also, during the time when ID2 of message N is transmitted by scheduling by master node N, ID3 of
また、マスターノードNによるスケジューリングにより、メッセージNのID3が送信される時間は、マスターノード2によるスケジューリングにより、通信バス上に、メッセージ2のID3が送信されている。通信バス上に、メッセージ2のID3が送信されているため、通信バス上で、複数のメッセージが重複してスケジューリングされている。この状態で、マスターノードNによるスケジューリングに従って、メッセージNのID3が送信された場合、メッセージNのID3は、メッセージ2のID3と衝突する。 The ID3 of the message N is transmitted by the scheduling by the master node N. The ID3 of the message 2 is transmitted on the communication bus by the scheduling by the master node 2. Since ID3 of message 2 is transmitted on the communication bus, a plurality of messages are scheduled redundantly on the communication bus. In this state, when ID3 of message N is transmitted according to the scheduling by master node N, ID3 of message N collides with ID3 of message 2.
また、マスターノードNによるスケジューリングにより、メッセージNのID4が送信される時間は、メッセージが送信される時間としてスケジューリングされていない。通信バス上に、メッセージが送信されていないため、マスターノードNによるスケジューリングに従って、メッセージNのID4が送信される。 In addition, due to the scheduling by the master node N, the time when ID4 of the message N is transmitted is not scheduled as the time when the message is transmitted. Since no message is transmitted on the communication bus, ID4 of the message N is transmitted according to the scheduling by the master node N.
以上のように、マスタースレーブ方式が採用されている通信システムに、複数のマスターノードを配置した場合には、メッセージの衝突が生じることがある。 As described above, when a plurality of master nodes are arranged in a communication system adopting the master-slave method, message collision may occur.
本発明は、上述の点に鑑みてなされたものであり、マルチマスタ方式の通信システムとして、マスタースレーブ方式の通信システムを動作させることを目的とする。 The present invention has been made in view of the above points, and an object of the present invention is to operate a master-slave communication system as a multi-master communication system.
開示の一実施例の通信ノードは、
通信バスを介して接続されたスレーブノードとの間で、通信を行う通信ノードであって、
スレーブノードとの間で送受信されるべきメッセージフレーム間の時間間隔を設定するメッセージフレーム時間間隔設定部と、
前記通信バスを介してスレーブノードとの間で通信を行う他の通信ノードにより送受信されるべきメッセージフレームの終了を検出するメッセージフレーム終了検出部と、
前記メッセージフレーム終了検出部によりメッセージフレームが終了したことが検出されてから、前記メッセージフレーム時間間隔設定部により設定されるべきメッセージフレーム間の時間間隔が経過したかどうかを判定する時間間隔経過判定部と、
前記時間間隔経過判定部によりメッセージフレーム間の時間間隔が経過したと判定されるまでの間に、前記通信バスが他の通信ノードに占有されているかどうかを判定する第1のバス占有判定部と、
該第1のバス占有判定部により前記通信バスが他の通信ノードに占有されていないと判定された場合に、メッセージフレームを送信する制御を行うメッセージフレーム送信制御部と
を有する。
The communication node of one embodiment of the disclosure is
A communication node that communicates with a slave node connected via a communication bus,
A message frame time interval setting unit for setting a time interval between message frames to be transmitted to and received from the slave node;
A message frame end detection unit for detecting the end of a message frame to be transmitted / received by another communication node communicating with a slave node via the communication bus;
A time interval elapsed determination unit that determines whether a time interval between message frames to be set by the message frame time interval setting unit has elapsed since it was detected by the message frame end detection unit that the message frame has ended. When,
A first bus occupation determination unit that determines whether or not the communication bus is occupied by another communication node until the time interval determination unit determines that the time interval between message frames has elapsed; ,
A message frame transmission control unit that performs control to transmit a message frame when the first bus occupation determination unit determines that the communication bus is not occupied by another communication node.
開示の一実施例の通信システムは、
スレーブノードと、該スレーブノードと通信バスを介して接続された通信ノードとを有する通信システムであって、
通信ノードは、
スレーブノードとの間で送受信されるべきメッセージフレーム間の時間間隔を設定するメッセージフレーム時間間隔設定部と、
前記通信バスを介してスレーブノードとの間で通信を行う他の通信ノードにより送受信されるべきメッセージフレームの終了を検出するメッセージフレーム終了検出部と、
前記メッセージフレーム終了検出部によりメッセージフレームが終了したことが検出されてから、前記メッセージフレーム時間間隔設定部により設定されるべきメッセージフレーム間の時間間隔が経過したかどうかを判定する時間間隔経過判定部と、
前記時間間隔経過判定部によりメッセージフレーム間の時間間隔が経過したと判定されるまでの間に、前記通信バスが他の通信ノードに占有されているかどうかを判定する第1のバス占有判定部と、
該第1のバス占有判定部により前記通信バスが他の通信ノードに占有されていないと判定された場合に、メッセージフレームを送信する制御を行うメッセージフレーム送信制御部と
を有する。
A communication system according to an embodiment of the disclosure includes:
A communication system having a slave node and a communication node connected to the slave node via a communication bus,
The communication node is
A message frame time interval setting unit for setting a time interval between message frames to be transmitted to and received from the slave node;
A message frame end detection unit for detecting the end of a message frame to be transmitted / received by another communication node communicating with a slave node via the communication bus;
A time interval elapsed determination unit that determines whether a time interval between message frames to be set by the message frame time interval setting unit has elapsed since it was detected by the message frame end detection unit that the message frame has ended. When,
A first bus occupation determination unit that determines whether or not the communication bus is occupied by another communication node until the time interval determination unit determines that the time interval between message frames has elapsed; ,
A message frame transmission control unit that performs control to transmit a message frame when the first bus occupation determination unit determines that the communication bus is not occupied by another communication node.
開示の一実施例の通信方法は、
通信バスを介して接続されたスレーブノードとの間で、通信を行う通信ノードにおける通信方法であって、
スレーブノードとの間で送受信されるべきメッセージフレーム間の時間間隔を設定するメッセージフレーム時間間隔設定ステップと、
前記通信バスを介してスレーブノードとの間で通信を行う他の通信ノードにより送受信されるべきメッセージフレームの終了を検出するメッセージフレーム終了検出ステップと、
前記メッセージフレーム終了検出ステップによりメッセージフレームが終了したことが検出されてから、前記メッセージフレーム時間間隔設定ステップにより設定されるべきメッセージフレーム間の時間間隔が経過したかどうかを判定する時間間隔経過判定ステップと、
前記時間間隔経過判定ステップによりメッセージフレーム間の時間間隔が経過したと判定されるまでの間に、前記通信バスが他の通信ノードに占有されているかどうかを判定する第1のバス占有判定ステップと、
該第1のバス占有判定部により前記通信バスが他の通信ノードに占有されていないと判定された場合に、メッセージフレームを送信する制御を行うメッセージフレーム送信制御ステップと
を有する。
A communication method according to an embodiment of the disclosure is as follows.
A communication method in a communication node that performs communication with a slave node connected via a communication bus,
A message frame time interval setting step for setting a time interval between message frames to be transmitted to and received from the slave node;
A message frame end detection step for detecting the end of a message frame to be transmitted / received by another communication node that communicates with a slave node via the communication bus;
Time interval elapse determination step for determining whether or not the time interval between message frames to be set by the message frame time interval setting step has elapsed since the end of the message frame was detected by the message frame end detection step. When,
A first bus occupation determination step for determining whether or not the communication bus is occupied by another communication node until it is determined by the time interval elapsed determination step that a time interval between message frames has elapsed; ,
A message frame transmission control step for performing control to transmit a message frame when the first bus occupation determination unit determines that the communication bus is not occupied by another communication node.
開示の実施例によれば、マルチマスタ方式の通信システムとして、マスタースレーブ方式の通信システムを動作させることができる。 According to the disclosed embodiments, a master-slave communication system can be operated as a multi-master communication system.
次に、本発明を実施するための形態を、以下の実施例に基づき図面を参照しつつ説明する。
なお、実施例を説明するための全図において、同一機能を有するものは同一符号を用い、繰り返しの説明は省略する。
Next, the form for implementing this invention is demonstrated, referring drawings based on the following Examples.
In all the drawings for explaining the embodiments, the same reference numerals are used for those having the same function, and repeated explanation is omitted.
<第1の実施例>
<通信システム>
図2は、通信システムの一実施例を示す。
<First embodiment>
<Communication system>
FIG. 2 shows an embodiment of a communication system.
本通信システムは、複数の通信ノードを有する。本通信システムは、単線ネットワークであってもよい。該複数の通信ノードによりクラスタが構成されてもよい。 The communication system has a plurality of communication nodes. The communication system may be a single line network. A cluster may be configured by the plurality of communication nodes.
複数の通信ノードには、マスターノード100l(lは、l>1の整数)と、スレーブノード200m(mは、m>1の整数)とが含まれる。 The plurality of communication nodes include a master node 100 l (l is an integer of l> 1) and a slave node 200 m (m is an integer of m> 1).
マスターノード1001−マスターノード100lは、メッセージを送信すべきタイミングを制御する。具体的には、マスターノード1001−マスターノード100lは、メッセージに含まれるヘッダーを送信すべきタイミングをスケジューリングする。該スケジューリングの際に、送信すべきメッセージのID、送信の順番、送信する時間間隔などが設定される。
Master node 100 1 -
マスターノード1001−マスターノード100l、スレーブノード2001−スレーブノード200mは、通信バス300を介して有線接続される。マスターノード1001−マスターノード100lと、スレーブノード2001−スレーブノード200mとの間は、通信バス300を介して所定の通信プロトコルに従って通信を行う。具体的には、LINに従って通信を行う。
The master node 100 1 -
通信バス300を流れる信号は、2つの論理レベルのどちらかの状態を有する。該2つの論理レベルの状態は、「ドミナント(dominant)」と、「リセッシブ(recessive)」と呼ばれる。ドミナントは、グラウンド電位に近い、論理レベル0の状態である。リセッシブは、バッテリの+(プラス)端子の電位に近い、論理レベル1の状態である。
A signal flowing through the
マスターノード1001−マスターノード100lは、所定のフレームフォーマットに従ってメッセージを送信する。
The master node 100 1 -
<フレームフォーマット>
図3は、マスターノード1001−マスターノード100lと、スレーブノード2001−スレーブノード200mとの間で送受信されるフレームフォーマットの一例を示す。
<Frame format>
FIG. 3 shows an example of a frame format transmitted / received between master node 100 1 -
フレームは、ヘッダーと、レスポンスを含む。ヘッダーはマスターノードから送信され、レスポンスはスレーブノードから送信される。 The frame includes a header and a response. The header is transmitted from the master node, and the response is transmitted from the slave node.
ヘッダーには、ブレークフィールド(Break field)と、シンクフィールド(Sync field)と、プロテクテッドアイデンティファイアーフィールド(Protected identifier field)とが含まれる。 The header includes a break field (Break field), a sync field (Sync field), and a protected identifier field (Protected identifier field).
ブレークフィールドは、クラスタの全スレーブノードに、フレームの開始を通知するためのフィールドである。ブレークフィールドのドミナント継続時間は「tBreak」により表される。例えば、該ブレークフィールドのドミナント継続時間は、13ビット長以上である。本実施例では、各マスターノードのブレークフィールドのドミナント継続時間は、固定長であり、略同一である。該ブレークフィールドのドミナント継続時間は、優先制御に使用される。 The break field is a field for notifying all slave nodes of the cluster of the start of the frame. The dominant duration of the break field is represented by “t Break ”. For example, the dominant duration of the break field is 13 bits or longer. In this embodiment, the dominant duration of the break field of each master node has a fixed length and is substantially the same. The dominant duration of the break field is used for priority control.
シンクフィールドは、クラスタに含まれる通信ノード間のクロック誤差の補正に使用される。 The sync field is used to correct a clock error between communication nodes included in the cluster.
プロテクテッドアイデンティファイアーフィールドは、フレームの識別番号を表す6ビット(0〜5ビット)のフレームIDと、2ビット(6、7ビット)のパリティの合計8ビットで構成される。 The protected identifier field is composed of a total of 8 bits including a frame ID of 6 bits (0 to 5 bits) representing a frame identification number and a parity of 2 bits (6 and 7 bits).
レスポンスには、データフィールド(Data Field)と、チェックサム(Checksum)が含まれる。データフィールドと、チェックサムは、UART(Universal Asynchronous Receiver/Transmitter)フレームで送信される。データフィールドは、1個であってもよいし、複数であってもよい。各データフィールドには、最大8バイトのデータを格納できる。チェックサムは、データを正確に受信できたかどうかを判断する際に使用される。具体的には、チェックサムには、各データの値の総和を反転した値が格納される。 The response includes a data field (Data Field) and a checksum (Checksum). The data field and checksum are transmitted in a UART (Universal Asynchronous Receiver / Transmitter) frame. There may be one or more data fields. Each data field can store a maximum of 8 bytes of data. The checksum is used in determining whether data has been received correctly. Specifically, the checksum stores a value obtained by inverting the sum of the values of each data.
シンクフィールド長と、プロテクテッドアイデンティファイアーフィールド長と、データフィールド長の合計は「tFrame_Slot」により表される。具体的には、「tFrame_Slot」は、ブレークフィールドの立ち上がりエッジ(rising edge)を基点とする。以下、「tFrame_Slot」により表されるシンクフィールド長と、プロテクテッドアイデンティファイアーフィールド長と、データフィールド長の合計を「フレームスロット長」という。 The total of the sync field length, the protected identifier field length, and the data field length is represented by “t Frame_Slot ”. Specifically, “t Frame_Slot ” is based on the rising edge of the break field. Hereinafter, the total of the sync field length represented by “t Frame_Slot ”, the protected identifier field length, and the data field length is referred to as “frame slot length”.
また、隣接するフレーム間には、フレーム間間隔(Inter−frame space)が設定される。 In addition, an inter-frame space is set between adjacent frames.
また、図3に示される例では、ジッター(jitter)が示される。ジッターは、時間軸方向での信号波形の揺らぎを表す。本実施例では、該ジッターを利用してバスアービトレーション制御が行われる。該ジッター長をアービトレイションインターフレームスペース(AIFS: Arbitration Inter Frame Space)長(以下、「AIFS長」という)と呼ぶ。 Further, in the example shown in FIG. 3, jitter is shown. Jitter represents fluctuations in the signal waveform in the time axis direction. In this embodiment, bus arbitration control is performed using the jitter. The jitter length is referred to as an arbitration inter frame space (AIFS) length (hereinafter referred to as “AIFS length”).
また、ブレークフィールドからチェックサムまでの時間の合計は「TFrame_Maximum」により表される。具体的には、「TFrame_Maximum」は、ブレークフィールドの立ち上がりエッジ(rising edge)を基点とする。 The total time from the break field to the checksum is represented by “T Frame_Maximum ”. Specifically, “T Frame_Maximum ” is based on the rising edge of the break field.
<マスターノード>
図4は、マスターノードを示す。マスターノード1001−マスターノード100lは略同一の構成であるため、代表してマスターノード100lについて説明する。
<Master node>
FIG. 4 shows a master node. Since the master node 100 1 -
マスターノード100lは、マイクロコントローラユニット(MCU: Micro−Control Unit)102lと、トランシーバ106lとを有する。
The
MCU102lには、1又は複数のマイコンが含まれる。マイコンの代わりにCPUが含まれてもよいし、MCUとCPUとが混在していてもよい。さらに、MCU102lには、通信装置104lが含まれる。通信装置104lはトランシーバ106lとの間で、シリアル通信を行う。具体的には、該通信装置104lは、UARTであってもよい。
The
トランシーバ106lは、MCU102l、通信バス300と接続される。トランシーバ106lは、MCU102lから入力されたデータを通信バス300に送信し、通信バス300からのデータをMCU102lに入力する。
The transceiver 106 l is connected to the
<マスターノードの機能>
マスターノード100lは、他のマスターノードが、メッセージ送出中である場合には、次のフレームまで待機する。具体的には、他のマスターノードにより送信されるべきメッセージに含まれるブレークフィールドの立ち上がりエッジを基点とする、フレームスロット長の経過を基点として、マスターノード100lは、送信しようとするフレームの保護識別子(PID: Protected identifier)に対応したAIFS長の計測を行う。マスターノード100lは、AIFS長が経過した場合にブレークフィールドの送出を行う。
<Master node function>
When the other master node is sending a message, the
当該マスターノード100lの他にメッセージを送信しようとするマスターノードがいる場合には、当該マスターノード100lのAIFS長が先に経過した場合には、当該マスターノード100lは、ブレークフィールドの送出を行うことにより通信バスを占有できる。
If the master node trying to send messages to other the
一方、他のマスターノードのAIFS長が先に経過した場合には、当該マスターノード100lは次のフレームまで待機する。この場合、当該マスターノード100lは、通信バス300の状態がドミナント状態になったことにより、他のマスターノードにより、通信バス300を占有されたことを検出できる。
On the other hand, when the AIFS length of another master node has passed first, the
図5は、バスアービトレーションの一実施例を示す。 FIG. 5 shows an example of bus arbitration.
図5に示される例では、3個のマスターノード(マスターノード1001、1002、及び1003)におけるバスアービトレーションの例を示す。2個の場合、4個以上のマスターノードの場合においても同様である。
The example shown in FIG. 5 shows an example of bus arbitration in three master nodes (
図5に示される例では、マスターノード1001はメッセージ送出中である。この状態で、マスターノード1002、マスターノード1003に、送信すべきデータが発生する。
In the example shown in FIG. 5, the
マスターノード1002、マスターノード1003は、マスターノード1001によりデータが送出されているので、次のフレームまで待機する。
Since the
マスターノード1002、マスターノード1003は、マスターノード1001のブレークフィールドの立ち上がりを基点としたフレームスロット長が経過するまで待機する。マスターノード1002、マスターノード1003は、マスターノード1001のフレームスロット長の経過を基点として、次のフレームのPIDに対応したAIFS長を計測する。具体的には、マスターノード1002は、マスターノード1002により送信されるべき次のフレームのPIDに対応したAIFS長を計測する。マスターノード1003は、マスターノード1003により送信されるべき次のフレームのPIDに対応したAIFS長を計測する。
The
図5には、マスターノード1002により設定されたAIFS長の方が、マスターノード1003により設定されたAIFS長よりも短い時間である例が示される。つまり、マスターノード1002により設定されたAIFS長の方が先に満了する。この場合、マスターノード1002は、ブレークフィールドを送出し、バスを占有する。
5 shows, towards the AIFS length set by the
図6は、マスターノード100lを示す機能ブロック図である。図6には、本実施例に関する部分について主に説明される。従って、スレーブノードとしての機能や、診断機能等については省略される。
FIG. 6 is a functional block diagram showing the
マスターノード100lは、マスター機能部110を有する。マスター機能部110は、インターフレームスペース長設定部112と、フレームスロット計測部114と、インターフレームスペース計測部116と、ブレークフィールド送信制御部118と、バスアービトレーション判定部120と、フレーム送信制御部122とを有する。MCU102lが、所定のプログラムに従って機能することにより、マスター機能部110として機能するようにしてもよい。該所定のプログラムは、MCU102lに格納されていてもよい。
The
インターフレームスペース長設定部112は、送信すべきデータが発生し、かつ他のマスターノードにより通信バス300が占有されている場合に、機能する。インターフレームスペース設定部112は、通信バス300がドミナント状態である場合に、他のマスターノードにより通信バス300が占有されていると判定してもよい。インターフレームスペース長設定部112は、通信バス300を占有している他のマスターノードにより送信されるべきブレークフィールドの立ち上がりを基点としたフレームスロット長の経過後に計測すべきAIFS長を設定する。該AIFS長は、フレーム毎に設定されてもよいし、PID毎に設定されてもよい。
The interframe space
<AIFS長の設定方法(その1)>
インターフレームスペース長設定部112は、乱数を発生させることにより、AIFS長を設定するようにしてもよい。具体的には、式(1)に従って設定する。
<Setting method of AIFS length (1)>
The inter frame space
tAIFS=TUnit×Trunc(1+nPriority×Rnd(seed)) (1)
式(1)において、「tAIFS」はAIFS長を表す。「TUnit」はクロック誤差及びバスの状態認識における遅延(delay)に基づいて、tAIFSの時間差を認識できる最小時間を表す。「nPriority」は優先(Priority)レベルの個数を表す。「nPriority」は1以上の整数である。Trunc(独立変数(argument))は小数点以下切り捨てによる整数化関数を表す。「Rnd(seed)」は乱数発生関数を表す。Rnd(seed)は0以上1未満の一様分布乱数を生成する。マスターノード毎に、異なるseedを与えることにより、異なる系列の乱数を発生させる。
t AIFS = T Unit × T runc (1 + n Priority × Rnd (seed)) (1)
In the formula (1), “t AIFS ” represents the AIFS length. “T Unit ” represents a minimum time in which a time difference of t AIFS can be recognized based on a clock error and a delay in the bus state recognition. “N Priority ” represents the number of priority levels. “N Priority ” is an integer of 1 or more. T runc (independent variable) represents an integer function by rounding down the decimal point. “Rnd (seed)” represents a random number generation function. Rnd (seed) generates a uniformly distributed random number between 0 and 1. A different series of random numbers is generated by giving different seeds to each master node.
乱数によりAIFS長を発生させることにより、通信バス300の占有権を各マスターノード間で分散させることができる。
By generating the AIFS length with a random number, the occupation right of the
<AIFS長の設定方法(その2)>
インターフレームスペース長設定部112は、AIFS長に、固定値を設定するようにしてもよい。具体的には、式(2)に従って設定する。
<AIFS length setting method (2)>
The inter frame space
tAIFS=TUnit×n (2)
式(2)において、「tAIFS」はAIFS長を表す。「TUnit」はクロック誤差及びバスの状態認識における遅延(delay)に基づいて、tAIFSの時間差を認識できる最小時間を表す。「n」は、1、2、3、・・・の自然数を表す。「n」は、PID毎に異なる値が設定される
AIFS長に、固定値を設定することにより、特定フレームに通信バスの占有権を与えることができる。
t AIFS = T Unit × n (2)
In formula (2), “t AIFS ” represents the AIFS length. “T Unit ” represents a minimum time in which a time difference of t AIFS can be recognized based on a clock error and a delay in the bus state recognition. “N” represents a natural number of 1, 2, 3,. “N” is set to a different value for each PID. By setting a fixed value to the AIFS length, the occupation right of the communication bus can be given to a specific frame.
インターフレームスペース長設定部112は、インターフレームスペース計測部114に、AIFS長を表す情報を入力する。
The inter frame space
フレームスロット計測部114は、トランシーバ106lと接続される。フレームスロット計測部114は、トランシーバ106lを介して、通信バス300の状態をモニターする。フレームスロット計測部114は、当該マスターノード100lに送信すべきデータが発生した際の通信バス300の状態がドミナント状態である場合、該通信バス300の状態がリセッシブ状態となるまでモニターし続ける。フレームスロット計測部114は、該通信バス300の状態がリセッシブ状態となる際に、フレームスロット長を計測するタイマー(以下、「フレームスロット長計測タイマー」という)を起動する。具体的には、フレームスロット計測部114は、通信バス300を占有する他のマスターノードによりブレークフィールドの送信が終了することにより通信バス300の状態がドミナント状態からリセッシブ状態へとなる立ち上がりのエッジが検出された際に、該フレームスロット長計測タイマーを起動する。フレームスロット計測部114は、該フレームスロット長計測タイマーが満了すると、インターフレームスペース計測部116に、フレームスロット長計測タイマーが満了したことを表す情報を入力する。
The frame
インターフレームスペース計測部116は、インターフレームスペース長設定部112、フレームスロット計測部114と接続される。インターフレームスペース計測部116は、フレームスロット計測部114によりフレームスロット長計測タイマーが満了したことを表す情報が入力された際に、インターフレームスペース長設定部112により入力されるべきAIFS長を表す情報に従って、AIFS長を計測するためのタイマー(以下、「AIFS長計測タイマー」という)を起動する。インターフレームスペース計測部116は、AIFS長計測タイマーが満了した際に、ブレークフィールド送信制御部118に、AIFS長計測タイマーが満了したことを表す情報を入力する。
The inter frame
また、インターフレームスペース計測部116は、バスアービトレーション判定部120による命令に従って、AIFS長計測タイマーを終了する。AIFS長計測タイマーを終了した場合、フレームスロット計測部114によりフレームスロット長計測タイマーが満了したことを表す情報が入力された際に、AIFS長を表す情報に従って、AIFS長計測タイマーを再度起動する。
In addition, the interframe
ブレークフィールド送信制御部118は、インターフレームスペース計測部116、トランシーバ106lと接続される。ブレークフィールド送信制御部118は、インターフレームスペース計測部116から入力されるべき、AIFS長計測タイマーが満了したことを表す情報に従って、ブレークフィールドを生成する。AIFS長計測タイマーが満了したことにより、他のマスターノードにより通信バス300が占有されていない判定されるためである。ブレークフィールド送信制御部118は、トランシーバ106lを介して、ブレークフィールドを送信する。ブレークフィールド送信制御部118は、バスアービトレーション判定部120に、ブレークフィールドの送信を開始したことを表す情報を入力する。また、ブレークフィールド送信制御部118は、ブレークフィールドを送信する際に、ブレークフィールドを送信すべき時間を計測するためのタイマー(以下、「ブレークフィールド送信時間計測タイマー」という)を起動する。ブレークフィールド送信制御部118は、ブレークフィールド送信時間計測タイマーが満了した場合に、ブレークフィールドの送信を終了する。ブレークフィールド送信制御部118は、ブレークフィールドの送信を終了した際に、バスアービトレーション判定部120に、ブレークフィールドの送信を終了したことを表す情報を入力する。
The break field
バスアービトレーション判定部120は、ブレークフィールド送信制御部118、トランシーバ106l、インターフレームスペース計測部116と接続される。バスアービトレーション判定部120は、トランシーバ106lを介して、通信バス300をモニターする。バスアービトレーション判定部120は、当該マスターノード100lが通信バス300を占有できるかどうかを判定する。
The bus
<当該マスターノードにより通信バスを占有できると判定される場合>
図7は、当該マスターノード100lにより通信バス300を占有できると判定される場合のバスアービトレーション判定部120によりモニターされるべき通信バス300の状態を表す。
<When it is determined that the communication bus can be occupied by the master node>
FIG. 7 shows the state of the
バスアービトレーション判定部120は、ブレークフィールド送信制御部118から、ブレークフィールドの送信を開始したことを表す情報入力された場合に、当該マスターノード100lにより通信バス300を占有できると判定する。
The bus
ブレークフィールド送信制御部118によりブレークフィードを送信する制御が行われたことにより通信バス300はドミナント状態に変化する。該ブレークフィールドが送信されたことにより、バスアービトレーション判定部120により通信バス300がドミナント状態に変化したことが検出される。
When the break field
バスアービトレーション判定部120は、ブレークフィールド送信制御部118によりブレークフィールドの送信を終了したことを表す情報が入力された際に、フレーム送信制御部122に、ブレークフィールドの送信を終了したことを表す情報を入力する。
The bus
<当該マスターノードにより通信バスを占有できないと判定される場合>
図8は、当該マスターノード100lにより通信バス300を占有できないと判定される場合のバスアービトレーション判定部120によりモニターされるべき通信バス300の状態を表す。バスアービトレーション判定部120は、定期的又は不定期的に、通信バス300の状態をモニターする。
<When it is determined that the communication bus cannot be occupied by the master node>
FIG. 8 shows the state of the
インターフレームスペース計測部116によりAIFS長計測タイマーが起動され、該AIFS長計測タイマーが起動中であるにもかかわらず、バスアービトレーション判定部120により、通信バス300の状態がドミナント状態に変化したことが検出された場合に、当該マスターノード100lにより通信バスを占有できないと判定する。他のマスターノードによりブレークフィールドが送信されたと判定できるためである。この場合、バスアービトレーション判定部120は、インターフレームスペース計測部116に、AIFS長計測タイマーを終了するように命令する。
The interframe
フレーム送信制御部122は、バスアービトレーション判定部120と接続される。フレーム送信制御部122は、バスアービトレーション判定部120から、当該マスターノード100lにより通信バスを占有できることを表す情報が入力された場合に、フレームを送信するための制御を行う。具体的には、フレーム送信制御部122は、バスアービトレーション判定部120から、ブレークフィールドの送信を終了したことを表す情報が入力された後に、ヘッダーを送信するための制御を行う。
The frame transmission control unit 122 is connected to the bus
<マスターノードの動作>
図9は、マスターノード100lの動作の一実施例を示す。図9には、マスターノード100lに送信すべきメッセージが発生した際に、他のマスターノードにより通信バス300が占有されている場合の例が示される。
<Operation of master node>
FIG. 9 shows an embodiment of the operation of the
マスターノード100lは、上位から、メッセージ送信要求を受信する(ステップS902)。該上位は、他のネットワークであってもよい。
The
マスターノード100lは、AIFS長を設定する(ステップS904)。つまり、インターフレームスペース長設定部112は、AIFS長を設定する。
The
マスターノード100lは、フレームスロット長を計測する(ステップS906)。つまり、フレームスロット計測部114は、フレームスロット長計測タイマーを起動し、通信バス300を占有している他のマスターノードにより送信されるべきブレークフィールドの立ち上がりから、フレームスロット長を計測する。
The
マスターノード100lは、フレームスロット長計測タイマーが満了したかどうかを判定する(ステップS908)。つまり、フレームスロット長計測部114は、フレームスロット長計測タイマーが満了したかどうかを判定する。
The
フレームスロット長計測タイマーが満了していないと判定された場合(ステップS908:NO)、ステップS908に戻る。フレームスロット長計測タイマーが満了するまで継続される。 If it is determined that the frame slot length measurement timer has not expired (step S908: NO), the process returns to step S908. Continue until the frame slot length measurement timer expires.
フレームスロット長計測タイマーが満了していると判定された場合(ステップS908:YES)、マスターノード100lは、AIFS長を計測する(ステップS910)。つまり、インターフレームスペース長計測部116は、AIFS長計測タイマーを起動し、フレームスロット長の終了を基点として、AIFS長を計測する。
If the frame slot length measuring timer is determined to be expired (step S908: YES), the
マスターノード100lは、AIFS長計測タイマーが満了したかどうかを判定する(ステップS912)。つまり、インターフレームスペース計測部116は、AIFS長計測タイマーが満了したかどうかを判定する。
The
AIFS長計測タイマーが満了したと判定された場合(ステップS912:YES)、マスターノード100lは、ブレークフィールドを送信する(ステップS914)。つまり、ブレークフィールド送信制御部118は、インターフレームスペース計測部116により通知されるべきAIFS長計測タイマーが満了したことを表す情報に従って、ブレークフィールドを送信する。この場合、バスアービトレーション判定部120により当該マスターフレーム100lにより、通信バス300の占有ができると判定される。
When it is determined that the AIFS length measurement timer has expired (step S912: YES), the master node 1001 transmits a break field (step S914). That is, the break field
マスターノード100lは、フレームを送信する(ステップS916)。つまり、フレーム送信制御部122は、ヘッダーを送信するための制御を行う。
The
ステップS912により、AIFS長計測タイマーが満了したと判定されない場合(ステップS912:NO)、マスターノード100lは、通信バス300の状態がドミナントであるかどうかを判定する(ステップS918)。つまり、バスアービトレーション判定部120は、通信バス300の状態をモニターし、ブレークフィールド送信制御部118によりブレークフィールドの送信を終了したことを表す情報が入力される前に、通信バス300の状態がドミナント状態となったかどうかを判定する。
If it is not determined in step S912 that the AIFS length measurement timer has expired (step S912: NO), the master node 1001 determines whether the state of the
通信バス300の状態がドミナント状態となったと判定されない場合(ステップS918:NO)、ステップS912に戻る。AIFS長計測タイマーが満了するまで継続される。
If it is not determined that the state of the
通信バス300の状態がドミナント状態となったと判定された場合(ステップS918:NO)、ステップS906に戻る。通信バス300の状態がドミナント状態となったと判定された場合には、当該マスターノード100lと同様に送信すべきメッセージが発生した他のマスターノードによりブレークフィールドが送信されたと判定される。このため、メッセージを送信するためには、次のフレームまで待機する必要がある。
When it is determined that the state of the
本実施例によれば、複数のマスターノード間で、衝突を検知して、送信を実施したり、送信を保留したりすることができる。このため、シングルタスクの通信網であっても、複数のノードをマスターノードとして利用できる。つまり、マルチタスクを実施できる。 According to the present embodiment, a collision can be detected between a plurality of master nodes, and transmission can be performed or transmission can be suspended. Therefore, even in a single task communication network, a plurality of nodes can be used as master nodes. That is, multitasking can be performed.
具体的には、AIFS長を制御することにより、通信バスを占有するマスターノードを決定するためのアービトレーションを実現できる。アービトレーションを実現できるため、マスタースレーブ方式の通信システムをマルチマスタ方式の通信システムとして動作させることができる。この場合、マスターノードのハードウェアの変更は必要ない。このため、コストを増加させずに、通信スケジュールの設計の自由度を向上させることができる。 Specifically, arbitration for determining the master node that occupies the communication bus can be realized by controlling the AIFS length. Since arbitration can be realized, a master-slave communication system can be operated as a multi-master communication system. In this case, there is no need to change the hardware of the master node. For this reason, the freedom degree of the design of a communication schedule can be improved, without increasing cost.
<第2の実施例>
<通信システム>
本通信システムは、図2を参照して説明した通信システムと略同一である。
<Second embodiment>
<Communication system>
This communication system is substantially the same as the communication system described with reference to FIG.
<マスターノード>
マスターノード1001−100lは、図4を参照して説明したマスターノードと略同一の構成である。
<Master node>
The
<マスターノードの機能>
マスターノード100lは、当該マスターノード100lに送信すべきメッセージが発生した際に、他のマスターノードにより通信バス300が占有され、メッセージ送出中である場合には、次のフレームまで待機する。具体的には、通信バス300を占有している他のマスターノードのブレークフィールドの立ち上がりを基点とするフレームスロット長の経過を基点として、マスターノード100lは、送信しようとするフレームの保護識別子(PID: Protected identifier)に対応したAIFS長の計測を行う。AIFS長の計測が終了すると、マスターノード100lは、ブレークフィールドを送信する。
<Master node function>
When a message to be transmitted to the
当該マスターノード100lの他にメッセージを送信しようとするマスターノードがいる場合には、当該マスターノード100lのブレークフィールドの送出期間が長い場合には、当該マスターノード100lは通信バス300を占有できる。一方、他のマスターノードのブレークフィールドの送出期間が長い場合には、当該マスターノード100lは次のフレームまで待機する。
If the master node trying to send messages to other the
図10は、バスアービトレーションの一実施例を示す。 FIG. 10 shows an example of bus arbitration.
図10に示される例では、3個のマスターノード(マスターノード1001、1002、及び1003)におけるバスアービトレーションの例を示す。2個の場合、4個以上のマスターノードの場合においても同様である。
In the example shown in FIG. 10, an example of bus arbitration in three master nodes (
図10に示される例では、マスターノード1001はメッセージ送出中である。この状態で、マスターノード1002、マスターノード1003に、送信すべきデータが発生する。
In the example shown in FIG. 10, the
マスターノード1002、マスターノード1003は、マスターノード1001によりデータが送出されているので、次のフレームまで待機する。
Since the
マスターノード1002、マスターノード1003は、マスターノード1001のブレークフィールドの立ち上がりを基点とする、フレームスロット長が経過するまで待機する。マスターノード1002、マスターノード1003は、マスターノード1001のフレームスロット長の経過を基点として、次のフレームのPIDに対応したAIFS長を計測する。具体的には、マスターノード1002は、マスターノード1002により送信されるべき次のフレームのPIDに対応したAIFS長を計測する。マスターノード1003は、マスターノード1003により送信されるべき次のフレームのPIDに対応したAIFS長を計測する。
The
図10には、マスターノード1002により設定されたAIFS長と、マスターノード1003により設定されたAIFS長とが略同一の時間である例が示される。つまり、マスターノード1002により設定されたAIFS長の満了と、マスターノード1003により設定されたAIFS長の満了とは略同一のタイミングである。
Figure 10, AIFS and length set by the
例えば、AIFS長は、上述した第1の実施例と同様の方法により設定されてもよい。この場合、送信すべきメッセージが発生したマスターノード間で、AIFS長が同じ値となる場合もある。特に、AIFS長として、固定値が設定される場合には、同じ値となる確率が高いと想定される。このような場合に、送信すべきメッセージが発生したマスターノード間で、ブレークフィールド長を異ならせることにより、バスアービトレーションを行うことができる。 For example, the AIFS length may be set by the same method as in the first embodiment described above. In this case, the AIFS length may be the same between master nodes in which messages to be transmitted have occurred. In particular, when a fixed value is set as the AIFS length, it is assumed that the probability of having the same value is high. In such a case, bus arbitration can be performed by changing the break field length between master nodes in which messages to be transmitted have occurred.
また、例えば、AIFS長は、固定値が設定されてもよい。該固定値は、フレームのPIDに基づいて設定された値であってもよい。 For example, a fixed value may be set for the AIFS length. The fixed value may be a value set based on the PID of the frame.
AIFS長が経過したマスターノード1002、マスターノード1003は、ブレークフィールドを送出する。
The
図10には、マスターノード1002により送出されるブレークフィールドの送信時間の方が、マスターノード1003により送信されるブレークフィールドの送信時間よりも長い時間である例が示される。この場合、マスターノード1002はバスを占有する。
Figure 10 is towards the transmission time of break fields sent by the
図11は、マスターノード100lを示す機能ブロック図である。図11には、本実施例に関する部分について主に説明される。従って、スレーブノードとしての機能や、診断機能等については省略される。
FIG. 11 is a functional block diagram showing the
マスターノード100lは、マスター機能部110を有する。マスター機能部110は、インターフレームスペース長設定部112と、フレームスロット計測部114と、インターフレームスペース計測部116と、ブレークフィールド送信制御部118と、バスアービトレーション判定部120と、フレーム送信制御部122と、ブレークフィールド長設定部124とを有する。MCU102lが、所定のプログラムに従って機能することにより、マスター機能部110として機能するようにしてもよい。該所定のプログラムは、MCU102lに格納されたものであってもよい。
The
インターフレームスペース長設定部112、フレームスロット計測部114、インターフレームスペース計測部116、及びフレーム送信制御部122については、図6を参照して説明したマスターノード100lと同様である。
The interframe space
ブレークフィールド長設定部124は、ブレークフィールド送信制御部118と接続される。ブレークフィールド長設定部124は、ブレークフィールド長「tBreak」を設定する。具体的には、ブレークフィールド長設定部124は、式(3)に従って、ブレークフィールド長を設定してもよい。
The break field
tBreak=T13bit+TUnit×Trunc(1+mPriority×Rnd(seed))(3)
式(3)において、「tBreak」はブレークフィールド長を表す。「T13bit」は、13ビットビット幅を表す。「TUnit」はクロック誤差及び通信バスの状態認識における遅延(delay)に基づいて、tAIFSの時間差を認識できる最小時間を表す。「mPriority」は優先(Priority)レベルの個数を表す。「mPriority」は1以上の整数である。「mPriority」の値は、存在する優先レベルの個数に一致させる必要はない。「mPriority」の値を小さくすると、ブレークフィールドの衝突検出に失敗する確率が上がる。一方、「mPriority」の値を大きくすることにより、ブレークフィールドの衝突解除の成功率を100%に近づけることができる。Trunc(独立変数(argument))は小数点以下切り捨てによる整数化関数を表す。「Rnd(seed)」は乱数発生関数を表す。Rnd(seed)は0以上1未満の一様分布乱数を生成する。マスターノード毎に、異なるseedを与えることにより、異なる系列の乱数を発生させる。ブレークフィールド長設定部124は、ブレークフィールド送信制御部118に、ブレークフィールド長を表す情報を入力する。
t Break = T 13 bits + T Unit × T runc (1 + m Priority × Rnd (seed)) (3)
In Expression (3), “t Break ” represents a break field length. “T 13bit ” represents a 13-bit bit width. “T Unit ” represents a minimum time in which a time difference of t AIFS can be recognized based on a clock error and a delay in communication bus state recognition. “ M Priority ” represents the number of priority levels. “ M Priority ” is an integer of 1 or more. The value of “m Priority ” does not need to match the number of existing priority levels. Decreasing the value of “m Priority ” increases the probability of failure to detect a break field collision. On the other hand, by increasing the value of “m Priority ”, the success rate of break-field collision release can be brought close to 100%. T runc (independent variable) represents an integer function by rounding down the decimal point. “Rnd (seed)” represents a random number generation function. Rnd (seed) generates a uniformly distributed random number between 0 and 1. A different series of random numbers is generated by giving different seeds to each master node. The break field
ブレークフィールド送信制御部118は、インターフレームスペース計測部116、ブレークフィールド長設定部124、トランシーバ106lと接続される。ブレークフィールド送信制御部118は、インターフレームスペース計測部116から入力されるべき、AIFS長計測タイマーが満了したことを表す情報に従って、ブレークフィールド長設定部124により入力されるべきブレークフィールド長に従って、ブレークフィールドを生成する。ブレークフィールド送信制御部118は、トランシーバ106lを介して、ブレークフィールドを送信する。ブレークフィールド送信制御部118は、バスアービトレーション判定部120に、ブレークフィールドの送信を開始したことを表す情報を入力する。また、ブレークフィールド送信制御部118は、ブレークフィールドを送信する際に、ブレークフィールド送信時間計測タイマーを起動する。ブレークフィールド送信制御部118は、ブレークフィールド送信時間計測タイマーが満了した場合に、ブレークフィールドの送信を終了する。ブレークフィールド送信制御部118は、ブレークフィールドの送信を終了した際に、バスアービトレーション判定部120に、ブレークフィールドの送信を終了したことを表す情報を入力する。
Brake field
バスアービトレーション判定部120は、ブレークフィールド送信制御部118、トランシーバ106l、インターフレームスペース計測部116と接続される。バスアービトレーション判定部120は、トランシーバ106lを介して、通信バス300をモニターする。バスアービトレーション判定部120は、当該マスターノード100lが通信バスを占有できるかどうかを判定する。
The bus
<当該マスターノードにより通信バスを占有できると判定される場合>
図12は、当該マスターノード100lにより通信バス300が占有されると判定される場合のバスアービトレーション判定部120によりモニターされるべき通信バス300の状態を表す。
<When it is determined that the communication bus can be occupied by the master node>
FIG. 12 shows the state of the
ブレークフィールド送信制御部118によりブレークフィードを送信する制御が行われたことにより通信バス300はドミナント状態に変化する。該ブレークフィールドが送信されたことにより、バスアービトレーション判定部120により通信バス300がドミナント状態に変化したことが検出される。
When the break field
バスアービトレーション判定部120は、ブレークフィールド送信制御部118によりブレークフィールドの送信を終了したことを表す情報が入力された際に、通信バス300がリセッシブ状態となったかどうかを判定する。バスアービトレーション判定部120は、ブレークフィールド送信制御部118によりブレークフィールドの送信を終了したことを表す情報が入力された際に、通信バス300がリセッシブ状態となったと判定された場合に、当該マスターノード100lにより通信バス300を占有できると判定する。この場合、バスアービトレーション判定部120は、フレーム送信制御部122に、当該マスターノード100lにより通信バス300を占有できることを表す情報を入力する。
The bus
<当該マスターノードにより通信バスを占有できないと判定される場合>
図13は、当該マスターノード100lにより通信バス300を占有できないと判定される場合のバスアービトレーション判定部120によりモニターされるべき通信バス300の状態を表す。
<When it is determined that the communication bus cannot be occupied by the master node>
FIG. 13 shows the state of the
ブレークフィールド送信制御部118によりブレークフィードを送信する制御が行われたことにより通信バス300はドミナント状態に変化する。該ブレークフィールドが送信されたことにより、バスアービトレーション判定部120により通信バス300がドミナント状態に変化したことが検出される。
When the break field
バスアービトレーション判定部120は、ブレークフィールド送信制御部118によりブレークフィールドの送信を終了したことを表す情報が入力された際に、通信バス300がリセッシブ状態となったかどうかを判定する。バスアービトレーション判定部120は、ブレークフィールド送信制御部118によりブレークフィールドの送信を終了したことを表す情報が入力された際に、通信バス300がリセッシブ状態となったと判定されない場合、つまりドミナント状態のままであると判定された場合に、当該マスターノード100lにより通信バスを占有できないと判定する。他のマスターノードにより通信バス300が占有されたと判定できるためである。この場合、バスアービトレーション判定部120は、インターフレームスペース計測部116に、AIFS長計測タイマーを終了するように命令する。
The bus
<マスターノードの動作>
図14は、マスターノード100lの動作の一実施例を示す。
<Operation of master node>
FIG. 14 shows an example of the operation of the
図14のステップS1402−S1410は、図9のステップS902−S910と同様であるため、説明を省略する。 Steps S1402-S1410 in FIG. 14 are the same as steps S902-S910 in FIG.
マスターノード100lは、AIFS長計測タイマーが満了したかどうかを判定する(ステップS1412)。つまり、インターフレームスペース計測部116は、AIFS長計測タイマーが満了したかどうかを判定する。
The
AIFS長計測タイマーが満了したと判定された場合(ステップS1412:YES)、マスターノード100lは、ブレークフィールド長を設定する(ステップS1414)。つまり、ブレークフィールド長設定部124は、ブレークフィールド長を設定する。
When it is determined that the AIFS length measurement timer has expired (step S1412: YES), the master node 1001 sets a break field length (step S1414). That is, the break field
AIFS長計測タイマーが満了したと判定されない場合(ステップS1412:NO)、ステップS1412に戻る。AIFSタイマーが満了するまで継続される。 If it is not determined that the AIFS length measurement timer has expired (step S1412: NO), the process returns to step S1412. Continue until the AIFS timer expires.
マスターノード100lは、ブレークフィールド長を計測する(ステップS1416)。つまり、ブレークフィールド送信制御部118は、ブレークフィールド長計測タイマーを起動し、ブレークフィールドの送信期間を計測する。
The
マスターノード100lは、ブレークフィールド長計測タイマーが満了したかどうかを判定する(ステップS1418)。つまり、ブレークフィールド送信制御部118は、ブレークフィールド長計測タイマーが満了したかどうかを判定する。
The
ブレークフィールド長計測タイマーが満了していないと判定された場合(ステップS1418:NO)、ステップS1418に戻る。ブレークフィールド長計測タイマーが満了するまで継続される。 If it is determined that the break field length measurement timer has not expired (step S1418: NO), the process returns to step S1418. It continues until the break field length measurement timer expires.
ブレークフィールド長計測タイマーが満了していると判定された場合(ステップS1418:YES)、マスターノード100lは、通信バス300の状態がリセッシブ状態であるかどうかを判定する(ステップS1420)。つまり、バスアービトレーション判定部120は、通信バス300の状態をモニターし、ブレークフィールド送信制御部118からブレークフィールドの送信を終了したことを表す情報が入力された際に、通信バス300の状態がリセッシブ状態となったかどうかを判定する。
If it is determined that the break field length measurement timer has expired (step S1418: YES), the master node 1001 determines whether the state of the
通信バス300の状態がリセッシブ状態となったと判定されない場合(ステップS1420:NO)、ステップS1406に戻る。通信バス300の状態がリセッシブ状態となったと判定されない場合には、他のマスターノードにより通信バス300が占有されたと判定できるため、メッセージを送信するには、次のフレームまで待機する必要があるからである。
If it is not determined that the state of the
通信バス300の状態がドミナント状態となったと判定された場合(ステップS1420:YES)、マスターノード100lは、フレームを送信する(ステップS1422)。つまり、フレーム送信制御部122は、ヘッダーを送信するための制御を行う。
When it is determined that the state of the
インターフレームスペース長を固定値に設定した場合には、優先的にバスの占有権が付与されることになり、マルチタスク化とはならない。本実施例によれば、このような場合でも、インターフレームスペース時間に続くフィールド、つまりブレークフィールドでバスの占有権を振分けることができる。このため、複数のノードをマスターノードとして利用でき、マルチタスクを実施できる。 When the interframe space length is set to a fixed value, the bus occupation right is preferentially given, and multitasking is not achieved. According to the present embodiment, even in such a case, the right to occupy the bus can be assigned by the field following the interframe space time, that is, the break field. Therefore, a plurality of nodes can be used as master nodes, and multitasking can be performed.
具体的には、ブレークフィールド長を制御することにより、通信バスを占有するマスターノードを決定するためのアービトレーションを実現できる。アービトレーションを実現できるため、マスタースレーブ方式の通信システムをマルチマスタ方式の通信システムとして動作させることができる。この場合、マスターノードのハードウェアの変更は必要ない。このため、コストを増加させずに、通信スケジュールの設計の自由度を向上させることができる。 Specifically, arbitration for determining the master node that occupies the communication bus can be realized by controlling the break field length. Since arbitration can be realized, a master-slave communication system can be operated as a multi-master communication system. In this case, there is no need to change the hardware of the master node. For this reason, the freedom degree of the design of a communication schedule can be improved, without increasing cost.
以上、本発明は特定の実施例及び変形例を参照しながら説明されてきたが、各実施例及び変形例は単なる例示に過ぎず、当業者は様々な変形例、修正例、代替例、置換例等を理解するであろう。説明の便宜上、本発明の実施例に従った装置は機能的なブロック図を用いて説明されたが、そのような装置はハードウェアで、ソフトウエアで又はそれらの組み合わせで実現されてもよい。本発明は上記実施例に限定されず、本発明の精神から逸脱することなく、様々な変形例、修正例、代替例、置換例等が包含される。 Although the present invention has been described above with reference to specific embodiments and modifications, each embodiment and modification is merely illustrative, and those skilled in the art will recognize various modifications, modifications, alternatives, and substitutions. You will understand examples. For convenience of explanation, an apparatus according to an embodiment of the present invention has been described using a functional block diagram, but such an apparatus may be implemented in hardware, software, or a combination thereof. The present invention is not limited to the above-described embodiments, and various variations, modifications, alternatives, substitutions, and the like are included without departing from the spirit of the present invention.
100l(lは、l>1の整数) マスターノード
102l(lは、l>1の整数) MCU
104l(lは、l>1の整数) 通信装置
106l(lは、l>1の整数) トランシーバ
112 インターフレームスペース長設定部
114 フレームスロット計測部
116 インターフレームスペース計測部
118 ブレークフィールド送信制御部
120 バスアービトレーション判定部
122 フレーム送信制御部
124 ブレークフィールド長設定部
200m(mは、l>1の整数) スレーブノード
300 通信バス
100 l (l is an integer of l> 1) Master node 102 l (l is an integer of l> 1) MCU
104 l (l is an integer of l> 1) Communication device 106 l (l is an integer of l> 1)
Claims (11)
スレーブノードとの間で送受信されるべきメッセージフレーム間の時間間隔を設定するメッセージフレーム時間間隔設定部と、
前記通信バスを介してスレーブノードとの間で通信を行う他の通信ノードにより送受信されるべきメッセージフレームの終了を検出するメッセージフレーム終了検出部と、
前記メッセージフレーム終了検出部によりメッセージフレームが終了したことが検出されてから、前記メッセージフレーム時間間隔設定部により設定されるべきメッセージフレーム間の時間間隔が経過したかどうかを判定する時間間隔経過判定部と、
前記時間間隔経過判定部によりメッセージフレーム間の時間間隔が経過したと判定されるまでの間に、前記通信バスが他の通信ノードに占有されているかどうかを判定する第1のバス占有判定部と、
該第1のバス占有判定部により前記通信バスが他の通信ノードに占有されていないと判定された場合に、メッセージフレームを送信する制御を行うメッセージフレーム送信制御部と
を有する、通信ノード。 A communication node that communicates with a slave node connected via a communication bus,
A message frame time interval setting unit for setting a time interval between message frames to be transmitted to and received from the slave node;
A message frame end detection unit for detecting the end of a message frame to be transmitted / received by another communication node communicating with a slave node via the communication bus;
A time interval elapsed determination unit that determines whether a time interval between message frames to be set by the message frame time interval setting unit has elapsed since it was detected by the message frame end detection unit that the message frame has ended. When,
A first bus occupation determination unit that determines whether or not the communication bus is occupied by another communication node until the time interval determination unit determines that the time interval between message frames has elapsed; ,
A communication node comprising: a message frame transmission control unit that performs control to transmit a message frame when the first bus occupation determination unit determines that the communication bus is not occupied by another communication node.
前記メッセージフレーム時間間隔設定部は、前記メッセージフレーム間の時間間隔として、乱数に基づいて生成されるべき値を設定する、通信ノード。 The communication node according to claim 1,
The message frame time interval setting unit is a communication node that sets a value to be generated based on a random number as a time interval between the message frames.
前記メッセージフレーム時間間隔設定部は、前記メッセージフレーム間の時間間隔として、固定された値を設定する、通信ノード。 The communication node according to claim 1,
The message frame time interval setting unit is a communication node that sets a fixed value as a time interval between the message frames.
前記メッセージフレームに含まれるべきブレークフィールド長を設定するブレークフィールド長設定部と、
該ブレークフィールド長設定部により設定されるべきブレークフィールド長に従って、ブレークフィールドを送信する制御を行うブレークフィールド送信制御部と、
前記ブレークフィールド送信制御部によりブレークフィールドの送信が終了したと判定された際に、前記通信バスが他の通信ノードに占有されているかどうかを判定する第2のバス占有判定部と
を有し、
前記メッセージフレーム送信制御部は、前記第2のバス占有判定部により前記通信バスが他の通信ノードに占有されていないと判定された場合に、メッセージフレームの送信を継続する制御を行う、通信ノード。 The communication node according to claim 3, wherein
A break field length setting unit for setting a break field length to be included in the message frame;
A break field transmission control unit for controlling the transmission of the break field according to the break field length to be set by the break field length setting unit;
A second bus occupation determination unit that determines whether or not the communication bus is occupied by another communication node when the break field transmission control unit determines that transmission of the break field has ended,
The message frame transmission control unit performs control to continue transmission of the message frame when the second bus occupation determination unit determines that the communication bus is not occupied by another communication node. .
前記メッセージフレーム終了検出部は、前記通信バスを介してスレーブノードとの間で通信を行う他の通信ノードにより送信されるべきブレークフィールドの立ち上がりからの経過時間に基づいて、メッセージフレームの終了を検出する、通信ノード。 The communication node according to claim 1,
The message frame end detection unit detects the end of the message frame based on the elapsed time from the rise of the break field to be transmitted by another communication node that communicates with the slave node via the communication bus. A communication node.
前記第1のバス占有判定部は、前記時間間隔経過判定部によりメッセージフレーム間の時間間隔が経過したと判定されるまでの間に、前記通信バスがドミナント状態であることが検出された場合に、該通信バスが他の通信ノードに占有されていると判定する、通信ノード。 The communication node according to claim 1,
The first bus occupancy determination unit detects that the communication bus is in a dominant state before the time interval elapse determination unit determines that the time interval between message frames has elapsed. A communication node that determines that the communication bus is occupied by another communication node.
前記第2のバス占有判定部は、前記ブレークフィールド送信制御部によりブレークフィールドの送信が終了したと判定された際に、前記通信バスがドミナント状態であることが検出された場合に、該通信バスが他の通信ノードに占有されていると判定する、通信ノード。 The communication node according to claim 4, wherein
The second bus occupancy determination unit determines that the communication bus is in a dominant state when the break field transmission control unit determines that the transmission of the break field has been completed. A communication node that determines that is occupied by another communication node.
通信ノードは、
スレーブノードとの間で送受信されるべきメッセージフレーム間の時間間隔を設定するメッセージフレーム時間間隔設定部と、
前記通信バスを介してスレーブノードとの間で通信を行う他の通信ノードにより送受信されるべきメッセージフレームの終了を検出するメッセージフレーム終了検出部と、
前記メッセージフレーム終了検出部によりメッセージフレームが終了したことが検出されてから、前記メッセージフレーム時間間隔設定部により設定されるべきメッセージフレーム間の時間間隔が経過したかどうかを判定する時間間隔経過判定部と、
前記時間間隔経過判定部によりメッセージフレーム間の時間間隔が経過したと判定されるまでの間際に、前記通信バスが他の通信ノードに占有されているかどうかを判定する第1のバス占有判定部と、
該第1のバス占有判定部により前記通信バスが他の通信ノードに占有されていないと判定された場合に、メッセージフレームを送信する制御を行うメッセージフレーム送信制御部と
を有する、通信システム。 A communication system having a slave node and a communication node connected to the slave node via a communication bus,
The communication node is
A message frame time interval setting unit for setting a time interval between message frames to be transmitted to and received from the slave node;
A message frame end detection unit for detecting the end of a message frame to be transmitted / received by another communication node communicating with a slave node via the communication bus;
A time interval elapsed determination unit that determines whether a time interval between message frames to be set by the message frame time interval setting unit has elapsed since it was detected by the message frame end detection unit that the message frame has ended. When,
A first bus occupation determination unit that determines whether or not the communication bus is occupied by another communication node immediately before the time interval determination unit determines that the time interval between message frames has elapsed; ,
A message frame transmission control unit that performs control to transmit a message frame when the first bus occupation determination unit determines that the communication bus is not occupied by another communication node.
前記メッセージフレームに含まれるべきブレークフィールド長を設定するブレークフィールド長設定部と、
該ブレークフィールド長設定部により設定されるべきブレークフィールド長に従って、ブレークフィールドを送信する制御を行うブレークフィールド送信制御部と、
前記ブレークフィールド送信制御部によりブレークフィールドの送信が終了したと判定された際に、前記通信バスが他の通信ノードに占有されているかどうかを判定する第2のバス占有判定部と
を有し、
前記メッセージフレーム送信制御部は、前記第2のバス占有判定部により前記通信バスが他の通信ノードに占有されていないと判定された場合に、メッセージフレームの送信を継続する制御を行う、通信システム。 The communication system according to claim 8,
A break field length setting unit for setting a break field length to be included in the message frame;
A break field transmission control unit for controlling the transmission of the break field according to the break field length to be set by the break field length setting unit;
A second bus occupation determination unit that determines whether or not the communication bus is occupied by another communication node when the break field transmission control unit determines that transmission of the break field has ended,
The message frame transmission control unit performs control to continue message frame transmission when the second bus occupation determination unit determines that the communication bus is not occupied by another communication node. .
スレーブノードとの間で送受信されるべきメッセージフレーム間の時間間隔を設定するメッセージフレーム時間間隔設定ステップと、
前記通信バスを介してスレーブノードとの間で通信を行う他の通信ノードにより送受信されるべきメッセージフレームの終了を検出するメッセージフレーム終了検出ステップと、
前記メッセージフレーム終了検出ステップによりメッセージフレームが終了したことが検出されてから、前記メッセージフレーム時間間隔設定ステップにより設定されるべきメッセージフレーム間の時間間隔が経過したかどうかを判定する時間間隔経過判定ステップと、
前記時間間隔経過判定ステップによりメッセージフレーム間の時間間隔が経過したと判定されるまでの間に、前記通信バスが他の通信ノードに占有されているかどうかを判定する第1のバス占有判定ステップと、
該第1のバス占有判定部により前記通信バスが他の通信ノードに占有されていないと判定された場合に、メッセージフレームを送信する制御を行うメッセージフレーム送信制御ステップと
を有する、通信方法。 A communication method in a communication node that performs communication with a slave node connected via a communication bus,
A message frame time interval setting step for setting a time interval between message frames to be transmitted to and received from the slave node;
A message frame end detection step for detecting the end of a message frame to be transmitted / received by another communication node that communicates with a slave node via the communication bus;
Time interval elapse determination step for determining whether or not the time interval between message frames to be set by the message frame time interval setting step has elapsed since the end of the message frame was detected by the message frame end detection step. When,
A first bus occupation determination step for determining whether or not the communication bus is occupied by another communication node until it is determined by the time interval elapsed determination step that a time interval between message frames has elapsed; ,
A message frame transmission control step for performing control to transmit a message frame when the first bus occupation determination unit determines that the communication bus is not occupied by another communication node.
前記メッセージフレームに含まれるべきブレークフィールド長を設定するブレークフィールド長設定ステップと、
該ブレークフィールド長設定ステップにより設定されるべきブレークフィールド長に従って、ブレークフィールドを送信する制御を行うブレークフィールド送信制御ステップと、
前記ブレークフィールド送信制御ステップによりブレークフィールドの送信が終了したと判定された際に、前記通信バスが他の通信ノードに占有されているかどうかを判定する第2のバス占有判定ステップと
を有し、
前記メッセージフレーム送信制御ステップは、前記第2のバス占有判定部により前記通信バスが他の通信ノードに占有されていないと判定された場合に、メッセージフレームの送信を継続する制御を行う、通信方法。 The communication method according to claim 10,
A break field length setting step for setting a break field length to be included in the message frame;
A break field transmission control step for controlling the transmission of the break field according to the break field length to be set by the break field length setting step;
A second bus occupancy determination step for determining whether or not the communication bus is occupied by another communication node when it is determined by the break field transmission control step that transmission of the break field has ended,
The message frame transmission control step performs control to continue transmission of a message frame when the second bus occupation determination unit determines that the communication bus is not occupied by another communication node. .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011144408A JP2013012914A (en) | 2011-06-29 | 2011-06-29 | Communication node, communication system, and communication method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011144408A JP2013012914A (en) | 2011-06-29 | 2011-06-29 | Communication node, communication system, and communication method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2013012914A true JP2013012914A (en) | 2013-01-17 |
Family
ID=47686423
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011144408A Withdrawn JP2013012914A (en) | 2011-06-29 | 2011-06-29 | Communication node, communication system, and communication method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2013012914A (en) |
-
2011
- 2011-06-29 JP JP2011144408A patent/JP2013012914A/en not_active Withdrawn
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103155492B (en) | Communication system and communicator | |
JP6093031B2 (en) | Data transmission using protocol exception status | |
EP3358788B1 (en) | Illegality detection electronic control unit, vehicle onboard network system, and communication method | |
JP5664799B2 (en) | Communication system and communication method | |
JP5852382B2 (en) | Data transmission method | |
JP5267598B2 (en) | Data rewrite support system and data rewrite support method for vehicle control device | |
CN103782283B (en) | Method and device for serial data transmission having a flexible message size and a variable bit length | |
JP4571668B2 (en) | Method and communication system for establishing a global time base in a time-controlled communication system | |
US20160080168A1 (en) | Can fd | |
JP5770925B2 (en) | Method and apparatus for increasing data transmission capacity in a serial bus system | |
JP5902799B2 (en) | Method and apparatus for adjusting the reliability of data transmission in a serial bus system | |
CN103890747A (en) | Method and device for serial data transmission having a flexible message size and a variable bit length | |
WO2012045875A1 (en) | Method for digital communication between a plurality of nodes connected by a serial field bus and corresponding system, in particular a field control system or field surveyance system | |
JP6121563B2 (en) | Data transmission protocol using protocol exception state | |
JP4594124B2 (en) | Communication system and communication method | |
JP2010081152A (en) | Communication device, communication system, communication method, and can node | |
JP6410914B1 (en) | Serial communication system | |
JP2007195040A (en) | Node abnormality determination method | |
JP5958335B2 (en) | Communication node and communication system | |
JP6028717B2 (en) | COMMUNICATION SYSTEM, GATEWAY DEVICE, AND COMMUNICATION METHOD | |
JP5892890B2 (en) | Communication control device | |
JP2013012914A (en) | Communication node, communication system, and communication method | |
JP2010141819A (en) | Communication device, communication method, and communication program | |
JP2017092856A (en) | Communication equipment and communication system | |
JP2013012915A (en) | Communication node, communication system, and communication method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20140902 |