JP2013012914A - Communication node, communication system, and communication method - Google Patents

Communication node, communication system, and communication method Download PDF

Info

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
Application number
JP2011144408A
Other languages
Japanese (ja)
Inventor
Shinichi Iiyama
真一 飯山
Hideki Goto
英樹 後藤
Ryuji Kosaka
龍児 高坂
Yasuhiro Miyazaki
康弘 宮崎
Noritoshi Hino
紀敏 日野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toyota Motor Corp
Otsl Inc
Original Assignee
Toyota Motor Corp
Otsl Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toyota Motor Corp, Otsl Inc filed Critical Toyota Motor Corp
Priority to JP2011144408A priority Critical patent/JP2013012914A/en
Publication of JP2013012914A publication Critical patent/JP2013012914A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

PROBLEM TO BE SOLVED: To operate a communication system employing a master-slave system as a communication system employing a multi-master system.SOLUTION: A communication node for performing communication with a slave node connected via a communication bus includes: a time interval setting unit for setting a time interval between message frames exchanged with the slave node; a completion detection unit for detecting completion of a message frame transmitted or received by another communication node communicating with the slave node; a time interval elapse determination unit for determining whether the time interval between message frames has passed since the completion of the message frame was detected; a bus occupancy determination unit for determining whether a communication bus is occupied by the other communication node by the time it has been determined that the time interval between message frames passed; and a message frame transmission control unit for performing control of transmitting a message frame if it has not been determined the communication bus is occupied by the other communication node.

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).

特開2010−28793号公報JP 2010-28793 A

既存の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 master node 1 performs scheduling for transmitting the message 1 (M1) on the communication bus. The message includes a plurality of frames, and each frame is represented by ID1, ID2, ID3, and ID4. The master node 2 performs scheduling for transmitting the message 2 (M2) on the communication bus. The message includes a plurality of frames, and each frame is represented by ID1, ID2, ID3, and ID4. The master node N performs scheduling for transmitting the message N (MN) on the communication bus. The message includes a plurality of frames, and each frame is represented by ID1, ID2, ID3, and ID4.

マスターノード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 message 1 is transmitted on the communication bus by scheduling by master node 1. Since ID1 of message 1 is transmitted on the communication bus, a plurality of messages are scheduled in duplicate on the communication bus. In this state, when ID1 of message 2 is transmitted according to the scheduling by master node 2, ID1 of message 2 collides with ID1 of message 1.

また、マスターノード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 message 1 is transmitted on the communication bus by scheduling by master node 1. Since ID3 of message 1 is transmitted on the communication bus, a plurality of messages are scheduled redundantly on the communication bus. In this state, when ID2 of message 2 is transmitted according to the scheduling by master node 2, ID2 of message 2 collides with ID3 of message 1.

また、マスターノード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 message 1 is transmitted on the communication bus by scheduling by master node 1. Since ID2 of message 1 is transmitted on the communication bus, a plurality of messages are scheduled redundantly on the communication bus. In this state, when ID1 of message N is transmitted according to the scheduling by master node N, ID1 of message N collides with ID2 of message 1.

また、マスターノード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 message 1 is transmitted on the communication bus by scheduling by master node 1. Since ID3 of message 1 is transmitted on the communication bus, a plurality of messages are scheduled redundantly on the communication bus. In this state, when ID2 of message N is transmitted according to the scheduling by master node N, ID2 of message N collides with ID3 of message 1.

また、マスターノード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.

同一バス上に接続された複数のマスターノードによるスケジューリングの一例を示す図である。It is a figure which shows an example of the scheduling by the some master node connected on the same bus | bath. 通信システムの一実施例を示す図である。It is a figure which shows one Example of a communication system. フレームフォーマットの一例を示す図である。It is a figure which shows an example of a frame format. マスターノードの一実施例(その1)を示す図である。It is a figure which shows one Example (the 1) of a master node. バスアービトレーションの一実施例を示す図である。It is a figure which shows one Example of bus arbitration. マスターノードの一実施例を示す機能ブロック図である。It is a functional block diagram which shows one Example of a master node. アービトレーション処理の一実施例を示す図である。It is a figure which shows one Example of an arbitration process. アービトレーション処理の一実施例を示す図である。It is a figure which shows one Example of an arbitration process. マスターノードの動作の一実施例を示すフローチャートである。It is a flowchart which shows one Example of operation | movement of a master node. バスアービトレーションの一実施例(その2)を示す図である。It is a figure which shows one Example (the 2) of bus arbitration. マスターノードの一実施例を示す機能ブロック図である。It is a functional block diagram which shows one Example of a master node. アービトレーション処理の一実施例を示す図である。It is a figure which shows one Example of an arbitration process. アービトレーション処理の一実施例を示す図である。It is a figure which shows one Example of an arbitration process. マスターノードの動作の一実施例を示すフローチャートである。It is a flowchart which shows one Example of operation | movement of a master node.

次に、本発明を実施するための形態を、以下の実施例に基づき図面を参照しつつ説明する。
なお、実施例を説明するための全図において、同一機能を有するものは同一符号を用い、繰り返しの説明は省略する。
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.

複数の通信ノードには、マスターノード100(lは、l>1の整数)と、スレーブノード200(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).

マスターノード100−マスターノード100は、メッセージを送信すべきタイミングを制御する。具体的には、マスターノード100−マスターノード100は、メッセージに含まれるヘッダーを送信すべきタイミングをスケジューリングする。該スケジューリングの際に、送信すべきメッセージのID、送信の順番、送信する時間間隔などが設定される。 Master node 100 1 -Master node 100 l controls when to send a message. Specifically, the master node 100 1 to the master node 100 l schedule the timing for transmitting the header included in the message. During the scheduling, an ID of a message to be transmitted, a transmission order, a transmission time interval, and the like are set.

マスターノード100−マスターノード100、スレーブノード200−スレーブノード200は、通信バス300を介して有線接続される。マスターノード100−マスターノード100と、スレーブノード200−スレーブノード200との間は、通信バス300を介して所定の通信プロトコルに従って通信を行う。具体的には、LINに従って通信を行う。 The master node 100 1 -master node 100 l and the slave node 200 1 -slave node 200 m are connected by wire via the communication bus 300. The master node 100 1 -master node 100 l and the slave node 200 1 -slave node 200 m communicate via the communication bus 300 according to a predetermined communication protocol. Specifically, communication is performed according to LIN.

通信バス300を流れる信号は、2つの論理レベルのどちらかの状態を有する。該2つの論理レベルの状態は、「ドミナント(dominant)」と、「リセッシブ(recessive)」と呼ばれる。ドミナントは、グラウンド電位に近い、論理レベル0の状態である。リセッシブは、バッテリの+(プラス)端子の電位に近い、論理レベル1の状態である。   A signal flowing through the communication bus 300 has one of two logic levels. The two logic level states are called "dominant" and "recessive". Dominant is a logic level 0 state that is close to ground potential. Recessive is a logic level 1 state that is close to the potential of the + (plus) terminal of the battery.

マスターノード100−マスターノード100は、所定のフレームフォーマットに従ってメッセージを送信する。 The master node 100 1 -master node 100 l transmits a message according to a predetermined frame format.

<フレームフォーマット>
図3は、マスターノード100−マスターノード100と、スレーブノード200−スレーブノード200との間で送受信されるフレームフォーマットの一例を示す。
<Frame format>
FIG. 3 shows an example of a frame format transmitted / received between master node 100 1 -master node 100 l and slave node 200 1 -slave node 200 m .

フレームは、ヘッダーと、レスポンスを含む。ヘッダーはマスターノードから送信され、レスポンスはスレーブノードから送信される。   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は、マスターノードを示す。マスターノード100−マスターノード100は略同一の構成であるため、代表してマスターノード100について説明する。
<Master node>
FIG. 4 shows a master node. Since the master node 100 1 -master node 100 l have substantially the same configuration, the master node 100 l will be described as a representative.

マスターノード100は、マイクロコントローラユニット(MCU: Micro−Control Unit)102と、トランシーバ106とを有する。 The master node 100 l has a micro-control unit (MCU) 102 l and a transceiver 106 l .

MCU102には、1又は複数のマイコンが含まれる。マイコンの代わりにCPUが含まれてもよいし、MCUとCPUとが混在していてもよい。さらに、MCU102には、通信装置104が含まれる。通信装置104はトランシーバ106との間で、シリアル通信を行う。具体的には、該通信装置104は、UARTであってもよい。 The MCU 102 l includes one or a plurality of microcomputers. A CPU may be included instead of the microcomputer, and MCU and CPU may be mixed. Further, the MCU 102 l, include communication devices 104 l is. The communication device 104 l performs serial communication with the transceiver 106 l . Specifically, the communication device 104 l may be a UART.

トランシーバ106は、MCU102、通信バス300と接続される。トランシーバ106は、MCU102から入力されたデータを通信バス300に送信し、通信バス300からのデータをMCU102に入力する。 The transceiver 106 l is connected to the MCU 102 l and the communication bus 300. The transceiver 106 l transmits data input from the MCU 102 l to the communication bus 300, and inputs data from the communication bus 300 to the MCU 102 l .

<マスターノードの機能>
マスターノード100は、他のマスターノードが、メッセージ送出中である場合には、次のフレームまで待機する。具体的には、他のマスターノードにより送信されるべきメッセージに含まれるブレークフィールドの立ち上がりエッジを基点とする、フレームスロット長の経過を基点として、マスターノード100は、送信しようとするフレームの保護識別子(PID: Protected identifier)に対応したAIFS長の計測を行う。マスターノード100は、AIFS長が経過した場合にブレークフィールドの送出を行う。
<Master node function>
When the other master node is sending a message, the master node 100 l waits until the next frame. Specifically, the master node 100 l protects the frame to be transmitted based on the passage of the frame slot length based on the rising edge of the break field included in the message to be transmitted by another master node. The AIFS length corresponding to the identifier (PID: Protected identifier) is measured. The master node 100 l transmits a break field when the AIFS length has elapsed.

当該マスターノード100の他にメッセージを送信しようとするマスターノードがいる場合には、当該マスターノード100のAIFS長が先に経過した場合には、当該マスターノード100は、ブレークフィールドの送出を行うことにより通信バスを占有できる。 If the master node trying to send messages to other the master node 100 l is present, if AIFS length of the master node 100 l has passed earlier, the master node 100 l, the transmission of the brake field Can occupy the communication bus.

一方、他のマスターノードのAIFS長が先に経過した場合には、当該マスターノード100は次のフレームまで待機する。この場合、当該マスターノード100は、通信バス300の状態がドミナント状態になったことにより、他のマスターノードにより、通信バス300を占有されたことを検出できる。 On the other hand, when the AIFS length of another master node has passed first, the master node 100 l waits until the next frame. In this case, the master node 100 l can detect that the communication bus 300 has been occupied by another master node when the state of the communication bus 300 becomes the dominant state.

図5は、バスアービトレーションの一実施例を示す。   FIG. 5 shows an example of bus arbitration.

図5に示される例では、3個のマスターノード(マスターノード100、100、及び100)におけるバスアービトレーションの例を示す。2個の場合、4個以上のマスターノードの場合においても同様である。 The example shown in FIG. 5 shows an example of bus arbitration in three master nodes (master nodes 100 1 , 100 2 , and 100 3 ). In the case of two, the same applies to the case of four or more master nodes.

図5に示される例では、マスターノード100はメッセージ送出中である。この状態で、マスターノード100、マスターノード100に、送信すべきデータが発生する。 In the example shown in FIG. 5, the master node 100 1 is in message delivery. In this state, data to be transmitted is generated in the master node 100 2 and the master node 100 3 .

マスターノード100、マスターノード100は、マスターノード100によりデータが送出されているので、次のフレームまで待機する。 Since the master node 100 2 and the master node 100 3 are sending data by the master node 100 1, they wait until the next frame.

マスターノード100、マスターノード100は、マスターノード100のブレークフィールドの立ち上がりを基点としたフレームスロット長が経過するまで待機する。マスターノード100、マスターノード100は、マスターノード100のフレームスロット長の経過を基点として、次のフレームのPIDに対応したAIFS長を計測する。具体的には、マスターノード100は、マスターノード100により送信されるべき次のフレームのPIDに対応したAIFS長を計測する。マスターノード100は、マスターノード100により送信されるべき次のフレームのPIDに対応したAIFS長を計測する。 The master node 100 2 and the master node 100 3 wait until the frame slot length from the start of the break field of the master node 100 1 elapses. The master node 100 2 and the master node 100 3 measure the AIFS length corresponding to the PID of the next frame based on the passage of the frame slot length of the master node 100 1 . Specifically, the master node 100 2 measures the AIFS length corresponding to the PID of the next frame to be transmitted by the master node 100 2. The master node 100 3 measures the AIFS length corresponding to the PID of the next frame to be transmitted by the master node 100 3.

図5には、マスターノード100により設定されたAIFS長の方が、マスターノード100により設定されたAIFS長よりも短い時間である例が示される。つまり、マスターノード100により設定されたAIFS長の方が先に満了する。この場合、マスターノード100は、ブレークフィールドを送出し、バスを占有する。 5 shows, towards the AIFS length set by the master node 100 2 is an example a short time is shown than AIFS length set by the master node 100 3. In other words, towards the AIFS length set by the master node 100 2 expires first. In this case, the master node 100 2 sends a break field, occupying the bus.

図6は、マスターノード100を示す機能ブロック図である。図6には、本実施例に関する部分について主に説明される。従って、スレーブノードとしての機能や、診断機能等については省略される。 FIG. 6 is a functional block diagram showing the master node 100 l . FIG. 6 mainly describes the part related to the present embodiment. Therefore, the function as a slave node, the diagnostic function, etc. are omitted.

マスターノード100は、マスター機能部110を有する。マスター機能部110は、インターフレームスペース長設定部112と、フレームスロット計測部114と、インターフレームスペース計測部116と、ブレークフィールド送信制御部118と、バスアービトレーション判定部120と、フレーム送信制御部122とを有する。MCU102が、所定のプログラムに従って機能することにより、マスター機能部110として機能するようにしてもよい。該所定のプログラムは、MCU102に格納されていてもよい。 The master node 100 l has a master function unit 110. The master function unit 110 includes an interframe space length setting unit 112, a frame slot measurement unit 114, an interframe space measurement unit 116, a break field transmission control unit 118, a bus arbitration determination unit 120, and a frame transmission control unit 122. And have. The MCU 102 l may function as the master function unit 110 by functioning according to a predetermined program. The predetermined program may be stored in the MCU 102 l .

インターフレームスペース長設定部112は、送信すべきデータが発生し、かつ他のマスターノードにより通信バス300が占有されている場合に、機能する。インターフレームスペース設定部112は、通信バス300がドミナント状態である場合に、他のマスターノードにより通信バス300が占有されていると判定してもよい。インターフレームスペース長設定部112は、通信バス300を占有している他のマスターノードにより送信されるべきブレークフィールドの立ち上がりを基点としたフレームスロット長の経過後に計測すべきAIFS長を設定する。該AIFS長は、フレーム毎に設定されてもよいし、PID毎に設定されてもよい。   The interframe space length setting unit 112 functions when data to be transmitted is generated and the communication bus 300 is occupied by another master node. The inter frame space setting unit 112 may determine that the communication bus 300 is occupied by another master node when the communication bus 300 is in a dominant state. The inter-frame space length setting unit 112 sets the AIFS length to be measured after the frame slot length has elapsed from the rise of the break field to be transmitted by another master node that occupies the communication bus 300. The AIFS length may be set for each frame or may be set for each PID.

<AIFS長の設定方法(その1)>
インターフレームスペース長設定部112は、乱数を発生させることにより、AIFS長を設定するようにしてもよい。具体的には、式(1)に従って設定する。
<Setting method of AIFS length (1)>
The inter frame space length setting unit 112 may set the AIFS length by generating a random number. Specifically, it is set according to equation (1).

AIFS=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 communication bus 300 can be distributed among the master nodes.

<AIFS長の設定方法(その2)>
インターフレームスペース長設定部112は、AIFS長に、固定値を設定するようにしてもよい。具体的には、式(2)に従って設定する。
<AIFS length setting method (2)>
The inter frame space length setting unit 112 may set a fixed value for the AIFS length. Specifically, it is set according to the equation (2).

AIFS=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 length setting unit 112 inputs information indicating the AIFS length to the inter frame space measurement unit 114.

フレームスロット計測部114は、トランシーバ106と接続される。フレームスロット計測部114は、トランシーバ106を介して、通信バス300の状態をモニターする。フレームスロット計測部114は、当該マスターノード100に送信すべきデータが発生した際の通信バス300の状態がドミナント状態である場合、該通信バス300の状態がリセッシブ状態となるまでモニターし続ける。フレームスロット計測部114は、該通信バス300の状態がリセッシブ状態となる際に、フレームスロット長を計測するタイマー(以下、「フレームスロット長計測タイマー」という)を起動する。具体的には、フレームスロット計測部114は、通信バス300を占有する他のマスターノードによりブレークフィールドの送信が終了することにより通信バス300の状態がドミナント状態からリセッシブ状態へとなる立ち上がりのエッジが検出された際に、該フレームスロット長計測タイマーを起動する。フレームスロット計測部114は、該フレームスロット長計測タイマーが満了すると、インターフレームスペース計測部116に、フレームスロット長計測タイマーが満了したことを表す情報を入力する。 The frame slot measurement unit 114 is connected to the transceiver 106 l . The frame slot measurement unit 114 monitors the state of the communication bus 300 via the transceiver 106 l . If the state of the communication bus 300 when the data to be transmitted to the master node 100 l is in a dominant state, the frame slot measurement unit 114 continues to monitor until the state of the communication bus 300 becomes a recessive state. The frame slot measurement unit 114 activates a timer for measuring the frame slot length (hereinafter referred to as “frame slot length measurement timer”) when the state of the communication bus 300 becomes a recessive state. Specifically, the frame slot measurement unit 114 has a rising edge at which the state of the communication bus 300 changes from the dominant state to the recessive state when the transmission of the break field is completed by another master node that occupies the communication bus 300. When detected, the frame slot length measurement timer is started. When the frame slot length measurement timer expires, the frame slot measurement unit 114 inputs information indicating that the frame slot length measurement timer has expired to the inter frame space measurement unit 116.

インターフレームスペース計測部116は、インターフレームスペース長設定部112、フレームスロット計測部114と接続される。インターフレームスペース計測部116は、フレームスロット計測部114によりフレームスロット長計測タイマーが満了したことを表す情報が入力された際に、インターフレームスペース長設定部112により入力されるべきAIFS長を表す情報に従って、AIFS長を計測するためのタイマー(以下、「AIFS長計測タイマー」という)を起動する。インターフレームスペース計測部116は、AIFS長計測タイマーが満了した際に、ブレークフィールド送信制御部118に、AIFS長計測タイマーが満了したことを表す情報を入力する。   The inter frame space measurement unit 116 is connected to the inter frame space length setting unit 112 and the frame slot measurement unit 114. The inter-frame space measurement unit 116 is information indicating the AIFS length to be input by the inter-frame space length setting unit 112 when the frame slot measurement unit 114 receives information indicating that the frame slot length measurement timer has expired. Accordingly, a timer for measuring the AIFS length (hereinafter referred to as “AIFS length measurement timer”) is started. When the AIFS length measurement timer expires, the inter-frame space measurement unit 116 inputs information indicating that the AIFS length measurement timer has expired to the break field transmission control unit 118.

また、インターフレームスペース計測部116は、バスアービトレーション判定部120による命令に従って、AIFS長計測タイマーを終了する。AIFS長計測タイマーを終了した場合、フレームスロット計測部114によりフレームスロット長計測タイマーが満了したことを表す情報が入力された際に、AIFS長を表す情報に従って、AIFS長計測タイマーを再度起動する。   In addition, the interframe space measurement unit 116 ends the AIFS length measurement timer according to the instruction from the bus arbitration determination unit 120. When the AIFS length measurement timer ends, when the information indicating that the frame slot length measurement timer has expired is input by the frame slot measurement unit 114, the AIFS length measurement timer is restarted according to the information indicating the AIFS length.

ブレークフィールド送信制御部118は、インターフレームスペース計測部116、トランシーバ106と接続される。ブレークフィールド送信制御部118は、インターフレームスペース計測部116から入力されるべき、AIFS長計測タイマーが満了したことを表す情報に従って、ブレークフィールドを生成する。AIFS長計測タイマーが満了したことにより、他のマスターノードにより通信バス300が占有されていない判定されるためである。ブレークフィールド送信制御部118は、トランシーバ106を介して、ブレークフィールドを送信する。ブレークフィールド送信制御部118は、バスアービトレーション判定部120に、ブレークフィールドの送信を開始したことを表す情報を入力する。また、ブレークフィールド送信制御部118は、ブレークフィールドを送信する際に、ブレークフィールドを送信すべき時間を計測するためのタイマー(以下、「ブレークフィールド送信時間計測タイマー」という)を起動する。ブレークフィールド送信制御部118は、ブレークフィールド送信時間計測タイマーが満了した場合に、ブレークフィールドの送信を終了する。ブレークフィールド送信制御部118は、ブレークフィールドの送信を終了した際に、バスアービトレーション判定部120に、ブレークフィールドの送信を終了したことを表す情報を入力する。 The break field transmission control unit 118 is connected to the inter frame space measurement unit 116 and the transceiver 106 l . The break field transmission control unit 118 generates a break field according to information indicating that the AIFS length measurement timer has expired, which should be input from the interframe space measurement unit 116. This is because it is determined that the communication bus 300 is not occupied by another master node due to the expiration of the AIFS length measurement timer. The break field transmission control unit 118 transmits the break field via the transceiver 106 l . The break field transmission control unit 118 inputs information indicating that transmission of the break field has started to the bus arbitration determination unit 120. Further, the break field transmission control unit 118 activates a timer (hereinafter referred to as “break field transmission time measurement timer”) for measuring the time for transmitting the break field when transmitting the break field. The break field transmission control unit 118 ends the transmission of the break field when the break field transmission time measurement timer expires. When the break field transmission control unit 118 ends the transmission of the break field, the break field transmission control unit 118 inputs information indicating that the transmission of the break field has ended to the bus arbitration determination unit 120.

バスアービトレーション判定部120は、ブレークフィールド送信制御部118、トランシーバ106、インターフレームスペース計測部116と接続される。バスアービトレーション判定部120は、トランシーバ106を介して、通信バス300をモニターする。バスアービトレーション判定部120は、当該マスターノード100が通信バス300を占有できるかどうかを判定する。 The bus arbitration determination unit 120 is connected to the break field transmission control unit 118, the transceiver 106 l , and the interframe space measurement unit 116. The bus arbitration determination unit 120 monitors the communication bus 300 via the transceiver 106 l . The bus arbitration determination unit 120 determines whether the master node 100 l can occupy the communication bus 300.

<当該マスターノードにより通信バスを占有できると判定される場合>
図7は、当該マスターノード100により通信バス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 communication bus 300 to be monitored by the bus arbitration determination unit 120 when it is determined that the communication bus 300 can be occupied by the master node 100 l .

バスアービトレーション判定部120は、ブレークフィールド送信制御部118から、ブレークフィールドの送信を開始したことを表す情報入力された場合に、当該マスターノード100により通信バス300を占有できると判定する。 The bus arbitration determination unit 120 determines that the communication bus 300 can be occupied by the master node 100 l when information indicating that the break field transmission is started is input from the break field transmission control unit 118.

ブレークフィールド送信制御部118によりブレークフィードを送信する制御が行われたことにより通信バス300はドミナント状態に変化する。該ブレークフィールドが送信されたことにより、バスアービトレーション判定部120により通信バス300がドミナント状態に変化したことが検出される。   When the break field transmission control unit 118 performs control to transmit a break feed, the communication bus 300 changes to a dominant state. When the break field is transmitted, the bus arbitration determination unit 120 detects that the communication bus 300 has changed to a dominant state.

バスアービトレーション判定部120は、ブレークフィールド送信制御部118によりブレークフィールドの送信を終了したことを表す情報が入力された際に、フレーム送信制御部122に、ブレークフィールドの送信を終了したことを表す情報を入力する。   The bus arbitration determination unit 120 receives information indicating that transmission of the break field has been completed to the frame transmission control unit 122 when information indicating completion of transmission of the break field is input by the break field transmission control unit 118. Enter.

<当該マスターノードにより通信バスを占有できないと判定される場合>
図8は、当該マスターノード100により通信バス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 communication bus 300 to be monitored by the bus arbitration determination unit 120 when it is determined that the communication bus 300 cannot be occupied by the master node 100 l . The bus arbitration determination unit 120 monitors the state of the communication bus 300 regularly or irregularly.

インターフレームスペース計測部116によりAIFS長計測タイマーが起動され、該AIFS長計測タイマーが起動中であるにもかかわらず、バスアービトレーション判定部120により、通信バス300の状態がドミナント状態に変化したことが検出された場合に、当該マスターノード100により通信バスを占有できないと判定する。他のマスターノードによりブレークフィールドが送信されたと判定できるためである。この場合、バスアービトレーション判定部120は、インターフレームスペース計測部116に、AIFS長計測タイマーを終了するように命令する。 The interframe space measurement unit 116 activates the AIFS length measurement timer, and the bus arbitration determination unit 120 changes the state of the communication bus 300 to the dominant state even though the AIFS length measurement timer is activated. If detected, it is determined that the communication bus cannot be occupied by the master node 100 l . This is because it can be determined that the break field has been transmitted by another master node. In this case, the bus arbitration determination unit 120 instructs the interframe space measurement unit 116 to end the AIFS length measurement timer.

フレーム送信制御部122は、バスアービトレーション判定部120と接続される。フレーム送信制御部122は、バスアービトレーション判定部120から、当該マスターノード100により通信バスを占有できることを表す情報が入力された場合に、フレームを送信するための制御を行う。具体的には、フレーム送信制御部122は、バスアービトレーション判定部120から、ブレークフィールドの送信を終了したことを表す情報が入力された後に、ヘッダーを送信するための制御を行う。 The frame transmission control unit 122 is connected to the bus arbitration determination unit 120. The frame transmission control unit 122 performs control for transmitting a frame when information indicating that the master node 100 l can occupy the communication bus is input from the bus arbitration determination unit 120. Specifically, the frame transmission control unit 122 performs control for transmitting the header after information indicating that the transmission of the break field is completed is input from the bus arbitration determination unit 120.

<マスターノードの動作>
図9は、マスターノード100の動作の一実施例を示す。図9には、マスターノード100に送信すべきメッセージが発生した際に、他のマスターノードにより通信バス300が占有されている場合の例が示される。
<Operation of master node>
FIG. 9 shows an embodiment of the operation of the master node 100 l . FIG. 9 shows an example in which the communication bus 300 is occupied by another master node when a message to be transmitted to the master node 100 l is generated.

マスターノード100は、上位から、メッセージ送信要求を受信する(ステップS902)。該上位は、他のネットワークであってもよい。 The master node 100 l receives the message transmission request from the upper level (step S902). The higher level may be another network.

マスターノード100は、AIFS長を設定する(ステップS904)。つまり、インターフレームスペース長設定部112は、AIFS長を設定する。 The master node 100 l sets the AIFS length (step S904). That is, the interframe space length setting unit 112 sets the AIFS length.

マスターノード100は、フレームスロット長を計測する(ステップS906)。つまり、フレームスロット計測部114は、フレームスロット長計測タイマーを起動し、通信バス300を占有している他のマスターノードにより送信されるべきブレークフィールドの立ち上がりから、フレームスロット長を計測する。 The master node 100 l measures the frame slot length (step S906). That is, the frame slot measurement unit 114 starts the frame slot length measurement timer and measures the frame slot length from the rise of the break field to be transmitted by another master node occupying the communication bus 300.

マスターノード100は、フレームスロット長計測タイマーが満了したかどうかを判定する(ステップS908)。つまり、フレームスロット長計測部114は、フレームスロット長計測タイマーが満了したかどうかを判定する。 The master node 100 l determines whether or not the frame slot length measurement timer has expired (step S908). That is, the frame slot length measurement unit 114 determines whether or not the frame slot length measurement timer has expired.

フレームスロット長計測タイマーが満了していないと判定された場合(ステップ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)、マスターノード100は、AIFS長を計測する(ステップS910)。つまり、インターフレームスペース長計測部116は、AIFS長計測タイマーを起動し、フレームスロット長の終了を基点として、AIFS長を計測する。 If the frame slot length measuring timer is determined to be expired (step S908: YES), the master node 100 l measures the AIFS length (step S910). That is, the inter-frame space length measurement unit 116 activates the AIFS length measurement timer and measures the AIFS length based on the end of the frame slot length.

マスターノード100は、AIFS長計測タイマーが満了したかどうかを判定する(ステップS912)。つまり、インターフレームスペース計測部116は、AIFS長計測タイマーが満了したかどうかを判定する。 The master node 100 l determines whether the AIFS length measurement timer has expired (step S912). That is, the inter frame space measurement unit 116 determines whether or not the AIFS length measurement timer has expired.

AIFS長計測タイマーが満了したと判定された場合(ステップS912:YES)、マスターノード100は、ブレークフィールドを送信する(ステップS914)。つまり、ブレークフィールド送信制御部118は、インターフレームスペース計測部116により通知されるべきAIFS長計測タイマーが満了したことを表す情報に従って、ブレークフィールドを送信する。この場合、バスアービトレーション判定部120により当該マスターフレーム100により、通信バス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 transmission control unit 118 transmits the break field according to information indicating that the AIFS length measurement timer to be notified by the inter frame space measurement unit 116 has expired. In this case, the bus arbitration determination unit 120 determines that the communication bus 300 can be occupied by the master frame 100 l .

マスターノード100は、フレームを送信する(ステップS916)。つまり、フレーム送信制御部122は、ヘッダーを送信するための制御を行う。 The master node 100 l transmits the frame (step S916). That is, the frame transmission control unit 122 performs control for transmitting the header.

ステップS912により、AIFS長計測タイマーが満了したと判定されない場合(ステップS912:NO)、マスターノード100は、通信バス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 communication bus 300 is dominant (step S918). That is, the bus arbitration determination unit 120 monitors the state of the communication bus 300, and before the break field transmission control unit 118 inputs information indicating that transmission of the break field is completed, the state of the communication bus 300 is determined to be dominant. Determine if it is in a state.

通信バス300の状態がドミナント状態となったと判定されない場合(ステップS918:NO)、ステップS912に戻る。AIFS長計測タイマーが満了するまで継続される。   If it is not determined that the state of the communication bus 300 has become a dominant state (step S918: NO), the process returns to step S912. Continue until the AIFS length measurement timer expires.

通信バス300の状態がドミナント状態となったと判定された場合(ステップS918:NO)、ステップS906に戻る。通信バス300の状態がドミナント状態となったと判定された場合には、当該マスターノード100と同様に送信すべきメッセージが発生した他のマスターノードによりブレークフィールドが送信されたと判定される。このため、メッセージを送信するためには、次のフレームまで待機する必要がある。 When it is determined that the state of the communication bus 300 has become a dominant state (step S918: NO), the process returns to step S906. When it is determined that the state of the communication bus 300 has become a dominant state, it is determined that the break field has been transmitted by another master node that has generated a message to be transmitted, as in the case of the master node 100 l . Therefore, in order to transmit a message, it is necessary to wait until the next frame.

本実施例によれば、複数のマスターノード間で、衝突を検知して、送信を実施したり、送信を保留したりすることができる。このため、シングルタスクの通信網であっても、複数のノードをマスターノードとして利用できる。つまり、マルチタスクを実施できる。   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.

<マスターノード>
マスターノード100−100は、図4を参照して説明したマスターノードと略同一の構成である。
<Master node>
The master nodes 100 1 to 100 l have substantially the same configuration as the master node described with reference to FIG.

<マスターノードの機能>
マスターノード100は、当該マスターノード100に送信すべきメッセージが発生した際に、他のマスターノードにより通信バス300が占有され、メッセージ送出中である場合には、次のフレームまで待機する。具体的には、通信バス300を占有している他のマスターノードのブレークフィールドの立ち上がりを基点とするフレームスロット長の経過を基点として、マスターノード100は、送信しようとするフレームの保護識別子(PID: Protected identifier)に対応したAIFS長の計測を行う。AIFS長の計測が終了すると、マスターノード100は、ブレークフィールドを送信する。
<Master node function>
When a message to be transmitted to the master node 100 l occurs, the master node 100 l waits until the next frame if the communication bus 300 is occupied by another master node and the message is being transmitted. Specifically, based on the passage of the frame slot length from the rise of the break field of another master node occupying the communication bus 300 as a base point, the master node 100 l transmits the protection identifier ( The AIFS length corresponding to PID: Protected Identifier) is measured. When the measurement of the AIFS length is completed, the master node 100 l transmits a break field.

当該マスターノード100の他にメッセージを送信しようとするマスターノードがいる場合には、当該マスターノード100のブレークフィールドの送出期間が長い場合には、当該マスターノード100は通信バス300を占有できる。一方、他のマスターノードのブレークフィールドの送出期間が長い場合には、当該マスターノード100は次のフレームまで待機する。 If the master node trying to send messages to other the master node 100 l is present, if delivery duration of the break field of the master node 100 l is long, occupying the master node 100 l communication bus 300 it can. On the other hand, when the transmission period of the break field of another master node is long, the master node 100 l waits until the next frame.

図10は、バスアービトレーションの一実施例を示す。   FIG. 10 shows an example of bus arbitration.

図10に示される例では、3個のマスターノード(マスターノード100、100、及び100)におけるバスアービトレーションの例を示す。2個の場合、4個以上のマスターノードの場合においても同様である。 In the example shown in FIG. 10, an example of bus arbitration in three master nodes (master nodes 100 1 , 100 2 , and 100 3 ) is shown. In the case of two, the same applies to the case of four or more master nodes.

図10に示される例では、マスターノード100はメッセージ送出中である。この状態で、マスターノード100、マスターノード100に、送信すべきデータが発生する。 In the example shown in FIG. 10, the master node 100 1 is in message delivery. In this state, data to be transmitted is generated in the master node 100 2 and the master node 100 3 .

マスターノード100、マスターノード100は、マスターノード100によりデータが送出されているので、次のフレームまで待機する。 Since the master node 100 2 and the master node 100 3 are sending data by the master node 100 1, they wait until the next frame.

マスターノード100、マスターノード100は、マスターノード100のブレークフィールドの立ち上がりを基点とする、フレームスロット長が経過するまで待機する。マスターノード100、マスターノード100は、マスターノード100のフレームスロット長の経過を基点として、次のフレームのPIDに対応したAIFS長を計測する。具体的には、マスターノード100は、マスターノード100により送信されるべき次のフレームのPIDに対応したAIFS長を計測する。マスターノード100は、マスターノード100により送信されるべき次のフレームのPIDに対応したAIFS長を計測する。 The master node 100 2 and the master node 100 3 wait until the frame slot length elapses starting from the rising edge of the break field of the master node 100 1 . The master node 100 2 and the master node 100 3 measure the AIFS length corresponding to the PID of the next frame based on the passage of the frame slot length of the master node 100 1 . Specifically, the master node 100 2 measures the AIFS length corresponding to the PID of the next frame to be transmitted by the master node 100 2. The master node 100 3 measures the AIFS length corresponding to the PID of the next frame to be transmitted by the master node 100 3.

図10には、マスターノード100により設定されたAIFS長と、マスターノード100により設定されたAIFS長とが略同一の時間である例が示される。つまり、マスターノード100により設定されたAIFS長の満了と、マスターノード100により設定されたAIFS長の満了とは略同一のタイミングである。 Figure 10, AIFS and length set by the master node 100 2, examples and AIFS length set by the master node 100 3 are substantially the same time is shown. That is, the AIFS length expiry set by the master node 100 2 is substantially the same timing from the set AIFS length of expiration by the master node 100 3.

例えば、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長が経過したマスターノード100、マスターノード100は、ブレークフィールドを送出する。 The master node 100 2 and the master node 100 3 whose AIFS length has passed send out a break field.

図10には、マスターノード100により送出されるブレークフィールドの送信時間の方が、マスターノード100により送信されるブレークフィールドの送信時間よりも長い時間である例が示される。この場合、マスターノード100はバスを占有する。 Figure 10 is towards the transmission time of break fields sent by the master node 100 2, example is longer than the transmission time of the break field transmitted by the master node 100. 3 is shown. In this case, the master node 100 2 occupies the bus.

図11は、マスターノード100を示す機能ブロック図である。図11には、本実施例に関する部分について主に説明される。従って、スレーブノードとしての機能や、診断機能等については省略される。 FIG. 11 is a functional block diagram showing the master node 100 l . FIG. 11 mainly describes portions related to the present embodiment. Therefore, the function as a slave node, the diagnostic function, etc. are omitted.

マスターノード100は、マスター機能部110を有する。マスター機能部110は、インターフレームスペース長設定部112と、フレームスロット計測部114と、インターフレームスペース計測部116と、ブレークフィールド送信制御部118と、バスアービトレーション判定部120と、フレーム送信制御部122と、ブレークフィールド長設定部124とを有する。MCU102が、所定のプログラムに従って機能することにより、マスター機能部110として機能するようにしてもよい。該所定のプログラムは、MCU102に格納されたものであってもよい。 The master node 100 l has a master function unit 110. The master function unit 110 includes an interframe space length setting unit 112, a frame slot measurement unit 114, an interframe space measurement unit 116, a break field transmission control unit 118, a bus arbitration determination unit 120, and a frame transmission control unit 122. And a break field length setting unit 124. The MCU 102 l may function as the master function unit 110 by functioning according to a predetermined program. The predetermined program may be stored in the MCU 102 l .

インターフレームスペース長設定部112、フレームスロット計測部114、インターフレームスペース計測部116、及びフレーム送信制御部122については、図6を参照して説明したマスターノード100と同様である。 The interframe space length setting unit 112, the frame slot measurement unit 114, the interframe space measurement unit 116, and the frame transmission control unit 122 are the same as the master node 1001 described with reference to FIG.

ブレークフィールド長設定部124は、ブレークフィールド送信制御部118と接続される。ブレークフィールド長設定部124は、ブレークフィールド長「tBreak」を設定する。具体的には、ブレークフィールド長設定部124は、式(3)に従って、ブレークフィールド長を設定してもよい。 The break field length setting unit 124 is connected to the break field transmission control unit 118. The break field length setting unit 124 sets the break field length “t Break ”. Specifically, the break field length setting unit 124 may set the break field length according to Expression (3).

Break=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 length setting unit 124 inputs information representing the break field length to the break field transmission control unit 118.

ブレークフィールド送信制御部118は、インターフレームスペース計測部116、ブレークフィールド長設定部124、トランシーバ106と接続される。ブレークフィールド送信制御部118は、インターフレームスペース計測部116から入力されるべき、AIFS長計測タイマーが満了したことを表す情報に従って、ブレークフィールド長設定部124により入力されるべきブレークフィールド長に従って、ブレークフィールドを生成する。ブレークフィールド送信制御部118は、トランシーバ106を介して、ブレークフィールドを送信する。ブレークフィールド送信制御部118は、バスアービトレーション判定部120に、ブレークフィールドの送信を開始したことを表す情報を入力する。また、ブレークフィールド送信制御部118は、ブレークフィールドを送信する際に、ブレークフィールド送信時間計測タイマーを起動する。ブレークフィールド送信制御部118は、ブレークフィールド送信時間計測タイマーが満了した場合に、ブレークフィールドの送信を終了する。ブレークフィールド送信制御部118は、ブレークフィールドの送信を終了した際に、バスアービトレーション判定部120に、ブレークフィールドの送信を終了したことを表す情報を入力する。 Brake field transmission control section 118, interframe space measuring unit 116, a break field length setting unit 124, is connected to the transceiver 106 l. The break field transmission control unit 118 performs the break according to the break field length to be input by the break field length setting unit 124 according to the information indicating that the AIFS length measurement timer has expired, which should be input from the interframe space measurement unit 116. Generate a field. The break field transmission control unit 118 transmits the break field via the transceiver 106 l . The break field transmission control unit 118 inputs information indicating that transmission of the break field has started to the bus arbitration determination unit 120. The break field transmission control unit 118 activates a break field transmission time measurement timer when transmitting a break field. The break field transmission control unit 118 ends the transmission of the break field when the break field transmission time measurement timer expires. When the break field transmission control unit 118 ends the transmission of the break field, the break field transmission control unit 118 inputs information indicating that the transmission of the break field has ended to the bus arbitration determination unit 120.

バスアービトレーション判定部120は、ブレークフィールド送信制御部118、トランシーバ106、インターフレームスペース計測部116と接続される。バスアービトレーション判定部120は、トランシーバ106を介して、通信バス300をモニターする。バスアービトレーション判定部120は、当該マスターノード100が通信バスを占有できるかどうかを判定する。 The bus arbitration determination unit 120 is connected to the break field transmission control unit 118, the transceiver 106 l , and the interframe space measurement unit 116. The bus arbitration determination unit 120 monitors the communication bus 300 via the transceiver 106 l . The bus arbitration determination unit 120 determines whether or not the master node 100 l can occupy the communication bus.

<当該マスターノードにより通信バスを占有できると判定される場合>
図12は、当該マスターノード100により通信バス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 communication bus 300 to be monitored by the bus arbitration determination unit 120 when it is determined that the communication bus 300 is occupied by the master node 100 l .

ブレークフィールド送信制御部118によりブレークフィードを送信する制御が行われたことにより通信バス300はドミナント状態に変化する。該ブレークフィールドが送信されたことにより、バスアービトレーション判定部120により通信バス300がドミナント状態に変化したことが検出される。   When the break field transmission control unit 118 performs control to transmit a break feed, the communication bus 300 changes to a dominant state. When the break field is transmitted, the bus arbitration determination unit 120 detects that the communication bus 300 has changed to a dominant state.

バスアービトレーション判定部120は、ブレークフィールド送信制御部118によりブレークフィールドの送信を終了したことを表す情報が入力された際に、通信バス300がリセッシブ状態となったかどうかを判定する。バスアービトレーション判定部120は、ブレークフィールド送信制御部118によりブレークフィールドの送信を終了したことを表す情報が入力された際に、通信バス300がリセッシブ状態となったと判定された場合に、当該マスターノード100により通信バス300を占有できると判定する。この場合、バスアービトレーション判定部120は、フレーム送信制御部122に、当該マスターノード100により通信バス300を占有できることを表す情報を入力する。 The bus arbitration determination unit 120 determines whether or not the communication bus 300 is in a recessive state when information indicating that the transmission of the break field is finished is input by the break field transmission control unit 118. When it is determined that the communication bus 300 is in a recessive state when the information indicating that the transmission of the break field is finished is input by the break field transmission control unit 118, the bus arbitration determination unit 120 100 l determines that the communication bus 300 can be occupied. In this case, the bus arbitration determination unit 120 inputs information indicating that the communication bus 300 can be occupied by the master node 100 l to the frame transmission control unit 122.

<当該マスターノードにより通信バスを占有できないと判定される場合>
図13は、当該マスターノード100により通信バス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 communication bus 300 to be monitored by the bus arbitration determination unit 120 when it is determined that the communication bus 300 cannot be occupied by the master node 100 l .

ブレークフィールド送信制御部118によりブレークフィードを送信する制御が行われたことにより通信バス300はドミナント状態に変化する。該ブレークフィールドが送信されたことにより、バスアービトレーション判定部120により通信バス300がドミナント状態に変化したことが検出される。   When the break field transmission control unit 118 performs control to transmit a break feed, the communication bus 300 changes to a dominant state. When the break field is transmitted, the bus arbitration determination unit 120 detects that the communication bus 300 has changed to a dominant state.

バスアービトレーション判定部120は、ブレークフィールド送信制御部118によりブレークフィールドの送信を終了したことを表す情報が入力された際に、通信バス300がリセッシブ状態となったかどうかを判定する。バスアービトレーション判定部120は、ブレークフィールド送信制御部118によりブレークフィールドの送信を終了したことを表す情報が入力された際に、通信バス300がリセッシブ状態となったと判定されない場合、つまりドミナント状態のままであると判定された場合に、当該マスターノード100により通信バスを占有できないと判定する。他のマスターノードにより通信バス300が占有されたと判定できるためである。この場合、バスアービトレーション判定部120は、インターフレームスペース計測部116に、AIFS長計測タイマーを終了するように命令する。 The bus arbitration determination unit 120 determines whether or not the communication bus 300 is in a recessive state when information indicating that the transmission of the break field is finished is input by the break field transmission control unit 118. The bus arbitration determination unit 120 is not determined that the communication bus 300 is in the recessive state when the information indicating that the transmission of the break field is finished is input by the break field transmission control unit 118, that is, the bus arbitration determination unit 120 remains in the dominant state. If it is determined that the judges that can not occupy the communication bus by the master node 100 l. This is because it can be determined that the communication bus 300 is occupied by another master node. In this case, the bus arbitration determination unit 120 instructs the interframe space measurement unit 116 to end the AIFS length measurement timer.

<マスターノードの動作>
図14は、マスターノード100の動作の一実施例を示す。
<Operation of master node>
FIG. 14 shows an example of the operation of the master node 100 l .

図14のステップS1402−S1410は、図9のステップS902−S910と同様であるため、説明を省略する。   Steps S1402-S1410 in FIG. 14 are the same as steps S902-S910 in FIG.

マスターノード100は、AIFS長計測タイマーが満了したかどうかを判定する(ステップS1412)。つまり、インターフレームスペース計測部116は、AIFS長計測タイマーが満了したかどうかを判定する。 The master node 100 l determines whether or not the AIFS length measurement timer has expired (step S1412). That is, the inter frame space measurement unit 116 determines whether or not the AIFS length measurement timer has expired.

AIFS長計測タイマーが満了したと判定された場合(ステップS1412:YES)、マスターノード100は、ブレークフィールド長を設定する(ステップ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 length setting unit 124 sets the break field length.

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.

マスターノード100は、ブレークフィールド長を計測する(ステップS1416)。つまり、ブレークフィールド送信制御部118は、ブレークフィールド長計測タイマーを起動し、ブレークフィールドの送信期間を計測する。 The master node 100 l measures the break field length (step S1416). That is, the break field transmission control unit 118 activates a break field length measurement timer and measures the break field transmission period.

マスターノード100は、ブレークフィールド長計測タイマーが満了したかどうかを判定する(ステップS1418)。つまり、ブレークフィールド送信制御部118は、ブレークフィールド長計測タイマーが満了したかどうかを判定する。 The master node 100 l determines whether or not the break field length measurement timer has expired (step S1418). That is, the break field transmission control unit 118 determines whether or not the break field length measurement timer has expired.

ブレークフィールド長計測タイマーが満了していないと判定された場合(ステップ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)、マスターノード100は、通信バス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 communication bus 300 is a recessive state (step S1420). That is, the bus arbitration determination unit 120 monitors the state of the communication bus 300, and when the information indicating that the transmission of the break field is completed is input from the break field transmission control unit 118, the state of the communication bus 300 is set to the recessive state. Determine if it is in a state.

通信バス300の状態がリセッシブ状態となったと判定されない場合(ステップS1420:NO)、ステップS1406に戻る。通信バス300の状態がリセッシブ状態となったと判定されない場合には、他のマスターノードにより通信バス300が占有されたと判定できるため、メッセージを送信するには、次のフレームまで待機する必要があるからである。   If it is not determined that the state of the communication bus 300 is in the recessive state (step S1420: NO), the process returns to step S1406. If it is not determined that the state of the communication bus 300 has become a recessive state, it can be determined that the communication bus 300 has been occupied by another master node. Therefore, in order to transmit a message, it is necessary to wait until the next frame. It is.

通信バス300の状態がドミナント状態となったと判定された場合(ステップS1420:YES)、マスターノード100は、フレームを送信する(ステップS1422)。つまり、フレーム送信制御部122は、ヘッダーを送信するための制御を行う。 When it is determined that the state of the communication bus 300 has become a dominant state (step S1420: YES), the master node 1001 transmits a frame (step S1422). That is, the frame transmission control unit 122 performs control for transmitting the header.

インターフレームスペース長を固定値に設定した場合には、優先的にバスの占有権が付与されることになり、マルチタスク化とはならない。本実施例によれば、このような場合でも、インターフレームスペース時間に続くフィールド、つまりブレークフィールドでバスの占有権を振分けることができる。このため、複数のノードをマスターノードとして利用でき、マルチタスクを実施できる。   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.

100(lは、l>1の整数) マスターノード
102(lは、l>1の整数) MCU
104(lは、l>1の整数) 通信装置
106(lは、l>1の整数) トランシーバ
112 インターフレームスペース長設定部
114 フレームスロット計測部
116 インターフレームスペース計測部
118 ブレークフィールド送信制御部
120 バスアービトレーション判定部
122 フレーム送信制御部
124 ブレークフィールド長設定部
200(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) transceiver 112 interframe space length setting unit 114 frame slot measurement unit 116 interframe space measurement unit 118 break field transmission control Unit 120 bus arbitration determination unit 122 frame transmission control unit 124 break field length setting unit 200 m (m is an integer of l> 1) slave node 300 communication bus

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.
請求項1に記載の通信ノードにおいて、
前記メッセージフレーム時間間隔設定部は、前記メッセージフレーム間の時間間隔として、乱数に基づいて生成されるべき値を設定する、通信ノード。
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.
請求項1に記載の通信ノードにおいて、
前記メッセージフレーム時間間隔設定部は、前記メッセージフレーム間の時間間隔として、固定された値を設定する、通信ノード。
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.
請求項3に記載の通信ノードにおいて、
前記メッセージフレームに含まれるべきブレークフィールド長を設定するブレークフィールド長設定部と、
該ブレークフィールド長設定部により設定されるべきブレークフィールド長に従って、ブレークフィールドを送信する制御を行うブレークフィールド送信制御部と、
前記ブレークフィールド送信制御部によりブレークフィールドの送信が終了したと判定された際に、前記通信バスが他の通信ノードに占有されているかどうかを判定する第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. .
請求項1に記載の通信ノードにおいて、
前記メッセージフレーム終了検出部は、前記通信バスを介してスレーブノードとの間で通信を行う他の通信ノードにより送信されるべきブレークフィールドの立ち上がりからの経過時間に基づいて、メッセージフレームの終了を検出する、通信ノード。
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に記載の通信ノードにおいて、
前記第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.
請求項4に記載の通信ノードにおいて、
前記第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.
請求項8に記載の通信システムにおいて、
前記メッセージフレームに含まれるべきブレークフィールド長を設定するブレークフィールド長設定部と、
該ブレークフィールド長設定部により設定されるべきブレークフィールド長に従って、ブレークフィールドを送信する制御を行うブレークフィールド送信制御部と、
前記ブレークフィールド送信制御部によりブレークフィールドの送信が終了したと判定された際に、前記通信バスが他の通信ノードに占有されているかどうかを判定する第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.
請求項10に記載の通信方法において、
前記メッセージフレームに含まれるべきブレークフィールド長を設定するブレークフィールド長設定ステップと、
該ブレークフィールド長設定ステップにより設定されるべきブレークフィールド長に従って、ブレークフィールドを送信する制御を行うブレークフィールド送信制御ステップと、
前記ブレークフィールド送信制御ステップによりブレークフィールドの送信が終了したと判定された際に、前記通信バスが他の通信ノードに占有されているかどうかを判定する第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. .
JP2011144408A 2011-06-29 2011-06-29 Communication node, communication system, and communication method Withdrawn JP2013012914A (en)

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)

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