JP2008072328A - Evaluating device for gateway ecu - Google Patents
Evaluating device for gateway ecu Download PDFInfo
- Publication number
- JP2008072328A JP2008072328A JP2006248146A JP2006248146A JP2008072328A JP 2008072328 A JP2008072328 A JP 2008072328A JP 2006248146 A JP2006248146 A JP 2006248146A JP 2006248146 A JP2006248146 A JP 2006248146A JP 2008072328 A JP2008072328 A JP 2008072328A
- Authority
- JP
- Japan
- Prior art keywords
- frame
- relay
- microcomputer
- channel
- frames
- 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
本発明は、ゲートウェイECUの評価装置に関する。詳しくは、ゲートウェイECUの中継機能を精度良く評価する評価装置に関する。 The present invention relates to an evaluation apparatus for a gateway ECU. Specifically, the present invention relates to an evaluation device that accurately evaluates a relay function of a gateway ECU.
従来、自動車の車載ネットワークとしてCAN(Controller Area Network)と呼ばれる通信プロトコルがある(例えば、以下の非特許文献1、2)。CANは、ISO(International Organization for Standardization)で国際的に標準化されたシリアル通信プロトコルである(ISO11891、ISO11519)。
Conventionally, there is a communication protocol called CAN (Controller Area Network) as an in-vehicle network of an automobile (for example, Non-Patent
CANを利用した車内LANでは、自動車のハードウェアを制御するECU(Electric Control Unit)がCANバスを介して接続され、更に、各CANバス間がゲートウェイ装置を介して接続される。 In an in-vehicle LAN using CAN, an ECU (Electric Control Unit) for controlling the hardware of the automobile is connected via a CAN bus, and each CAN bus is connected via a gateway device.
例えば、エンジン等を制御するエンジン系のECUが接続されるCANバスと、ナビゲーションシステム等を制御する情報系のECUが接続されるCANバスとがゲートウェイ装置を介して接続される。 For example, a CAN bus to which an engine ECU for controlling an engine or the like is connected and a CAN bus to which an information ECU for controlling a navigation system or the like is connected are connected via a gateway device.
CANプロトコルの特徴は、バスが空いているときにすべてのノード(ECU)がメッセージ(以下、「フレーム」を称す。CANにおける一通信単位)の送信を始めることができるマルチマスタ方式等がある。 A feature of the CAN protocol is a multi-master system in which all nodes (ECUs) can start transmitting messages (hereinafter referred to as “frames”, one communication unit in CAN) when the bus is free.
一方、ゲートウェイ装置は、あるECUからのフレームを他のCANバスに接続された別のECUに転送する等、CANバス間でフレームを中継している。 On the other hand, the gateway device relays the frame between the CAN buses such as transferring a frame from a certain ECU to another ECU connected to another CAN bus.
このようにCANを利用した車内LANでは、ゲートウェイ装置を介して所定の時間内でフレームを中継させることが重要である。従って、ゲートウェイ装置を介したフレームの中継時間がどれだけかかるかを予め評価することが重要である。そのため、その中継時間を評価する評価装置の提案が望まれていた。
しかしながら、既存の計測機械を用いて中継時間を評価した場合、同時に複数チャンネルの計測を行うとチャンネル毎に各々計測機械を設ける必要があり、各計測機械間で同期を取らなければならなかった。そのため、設備が複雑になるとともに高価になる。 However, when the relay time is evaluated using an existing measuring machine, if a plurality of channels are measured at the same time, it is necessary to provide each measuring machine for each channel, and the measuring machines must be synchronized. Therefore, the equipment becomes complicated and expensive.
また、既存の計測機械は、例えば「100μs」など、中継時間を計測するときの精度が低い問題もあった。例えば、「1μs」程度など、高精度で評価できる評価装置が望まれている。 Further, the existing measuring machine has a problem that the accuracy when measuring the relay time is low, such as “100 μs”. For example, an evaluation apparatus capable of evaluating with high accuracy such as “1 μs” is desired.
本発明は上記問題点に鑑みてなされたもので、その目的は、ゲートウェイ装置の中継機能を精度良く評価する評価装置を提供することにある。 The present invention has been made in view of the above problems, and an object thereof is to provide an evaluation device that accurately evaluates a relay function of a gateway device.
また、本発明の他の目的は、安価にかつ高精度にゲートウェイ装置の中継機能を評価する評価装置を提供することにある。 Another object of the present invention is to provide an evaluation device that evaluates the relay function of a gateway device at low cost and with high accuracy.
上記目的を達成するために、本発明の一実施態様によれば、複数のCANバス間を接続して前記CANバスに転送されるフレームを中継するゲートウェイ装置に対する評価装置において、前記フレームを送信する送信部と、前記送信部から送信された前記フレームのうち、前記ゲートウェイ装置を中継した第1のフレームと、前記ゲートウェイ装置を中継しない第2のフレームとを受信し、前記第1のフレーム及び前記第2のフレームに基づいて前記ゲートウェイ装置を評価する評価部とを備えることを特徴とする。 In order to achieve the above object, according to an embodiment of the present invention, an evaluation device for a gateway device that connects a plurality of CAN buses and relays a frame transferred to the CAN bus transmits the frame. Of the frames transmitted from the transmitter, the transmitter receives the first frame relayed through the gateway device and the second frame not relayed through the gateway device, and receives the first frame and the frame And an evaluation unit that evaluates the gateway device based on a second frame.
また、本発明の他の実施態様によれば、前記評価装置において前記評価部には、前記第1のフレームを受信する第1のチャンネル部と、前記第2のフレームを受信する第2のチャンネル部とを備えることを特徴とする。 According to another embodiment of the present invention, in the evaluation device, the evaluation unit includes a first channel unit that receives the first frame and a second channel that receives the second frame. And a section.
更に、本発明の他の実施態様によれば、前記評価装置において前記評価部は、前記第1のフレームの受信時刻と前記第2のフレームの受信時刻とを比較することで前記ゲートウェイ装置に対する中継時間を評価することを特徴とする。 Further, according to another embodiment of the present invention, in the evaluation device, the evaluation unit relays the gateway device by comparing the reception time of the first frame and the reception time of the second frame. It is characterized by evaluating time.
更に、本発明の他の実施態様によれば、前記評価装置において、前記第1及び第2のフレームを前記ゲートウェイ装置に中継するか否かを示すデータ配列テーブルを更に備え、前記ゲートウェイ装置は前記データ配列テーブルに基づいて前記第1のフレームを中継し前記第2のフレームを中継しないようにすることを特徴とする。 Furthermore, according to another embodiment of the present invention, the evaluation apparatus further includes a data arrangement table indicating whether or not the first and second frames are relayed to the gateway apparatus, The first frame is relayed based on a data arrangement table, and the second frame is not relayed.
更に、本発明の他の実施態様によれば、前記評価装置において前記送信部は、前記ゲートウェイ装置を中継する前記第1のフレームのデータフィールドに、予め決められたルールに従って、前記第1のフレーム毎に識別符号を挿入して前記第1のフレームを送信することを特徴とする。 Furthermore, according to another embodiment of the present invention, in the evaluation device, the transmission unit adds the first frame to the data field of the first frame relaying the gateway device according to a predetermined rule. An identification code is inserted every time and the first frame is transmitted.
更に、本発明の他の実施態様によれば、前記評価装置において前記送信部は、少なくとも2つの送信チャンネル部を備え、
前記ゲートウェイ装置を中継しない同一IDの前記第2のフレームが存在したとき、前記送信部は一方の送信チャンネル部から、前記第2のフレームのデータフィールドに挿入されたデータ値を反転させた値をデータ値とする前記第2のフレームを送信することを特徴とする。
Furthermore, according to another embodiment of the present invention, in the evaluation apparatus, the transmission unit includes at least two transmission channel units,
When there is the second frame with the same ID that does not relay the gateway device, the transmission unit obtains a value obtained by inverting the data value inserted in the data field of the second frame from one transmission channel unit. The second frame as a data value is transmitted.
本発明によれば、ゲートウェイ装置の中継機能を精度良く評価する評価装置を提供することができる。また、本発明によれば、安価にかつ高精度にゲートウェイ装置の中継機能を評価する評価装置を提供することができる。 ADVANTAGE OF THE INVENTION According to this invention, the evaluation apparatus which evaluates the relay function of a gateway apparatus accurately can be provided. Furthermore, according to the present invention, it is possible to provide an evaluation device that evaluates the relay function of the gateway device at low cost and with high accuracy.
本発明を実施するための最良の形態について、以下図面を参照しながら説明する。 The best mode for carrying out the present invention will be described below with reference to the drawings.
図1は、本発明が適用される評価装置10の構成例と、評価装置10がゲートウェイ(G/W)ECU30に接続された例を示す図である。
FIG. 1 is a diagram illustrating a configuration example of an
評価装置10は、ホストPC40とLANを介して接続されるとともに、CANバス21、22を介してゲートウェイECU30に接続される。評価装置10は、ゲートウェイECU30にフレームを送信してその後のCANバス上のフレームを計測する。ホストPC40は評価装置10によって計測されたフレーム等に基づいて解析等を行う。
The
評価装置10はマザーボード11と、CANボード12を備える。マザーボード11は内部にCPU、ROM、RAM等を備え、評価装置10全体の制御等を行う。
The
CANボード12は、3つのマイクロコントローラ(以下、「マイコン」)13、14、15を備え、ゲートウェイECU30に対してフレームの送受信を行う。また、CANボード12はPCIバスを介してマザーボード11と接続され、受信結果等をマザーボード11に出力する。
The CAN
第1のマイコン(CPU_1)13は、ゲートウェイECU30に中継される中継データ(中継フレーム)をCAN1バス21に送信する。第1のマイコン13は中継フレームを送信する送信専用のマイコンである。
The first microcomputer (CPU_1) 13 transmits relay data (relay frame) relayed to the
第2のマイコン(CPU_2)14は、ゲートウェイECU30に中継されないフレーム(中継外データ)を送信する。第2のマイコン14は中継外フレームを送信する送信専用のマイコンである。
The second microcomputer (CPU_2) 14 transmits a frame (data not relayed) that is not relayed to the
第3のマイコン(CPU_3)15は第1及び第2のマイコン13、14から送信されたフレームを受信し、そのフレームを記憶する(ロギングする)。第3のマイコン15は、ロギングしたフレームから中継時間等を評価する。第3のマイコン15は受信専用のマイコンである。詳細は後述する。
The third microcomputer (CPU_3) 15 receives the frames transmitted from the first and
各マイコン13、14、15は、各々2チャンネル分の出力段又は入力段を有し、以下のように接続される。
Each
即ち、第1のマイコン13の1チャンネル目(図1で上段側)は、CAN1バス21を介してゲートウェイECU30に接続される。また、ゲートウェイECU30はCAN2バス22を介して第3のマイコン15の2チャンネル目に接続される。
That is, the first channel (upper side in FIG. 1) of the
第1のマイコン13の1チャンネル目の出力段には、ゲートウェイECU30に向けて順に第1の接続点24、第2の接続点25がある。
At the output stage of the first channel of the
第1の接続点24は、第2のマイコン14の1チャンネル目に接続され、第2の接続点25は第3のマイコン15の1チャンネル目に接続される。
The
一方、第3のマイコン15の2チャンネル目にはゲートウェイECU30に向けて順に第3の接続点26と第4の接続点27がある。
On the other hand, on the second channel of the
第3の接続点26は、第2のマイコン14の2チャンネル目に接続され、第4の接続点27は第1のマイコン13の2チャンネル目に接続される。
The
このようにゲートウェイECU30と接続された評価装置10から以下のようにフレームが送受信される。
Thus, a frame is transmitted / received from the
第1のマイコン13は1チャンネル目から「フレームA」、2チャンネル目から「フレームB」が送信される。
The
「フレームA」は、第1及び第2の接続24、25を介してゲートウェイECU30に送信される。ゲートウェイECU30は「フレームA」を中継して、CAN2バス22、第4及び第3の接続点27、26を介して第3のマイコン15の2チャンネル目に送信する。
“Frame A” is transmitted to the gateway ECU 30 via the first and
尚、本実施例においてゲートウェイECU30を中継したフレームに「’」を付加して他と区別している。従って、「フレームA」はゲートウェイECU30に中継されると「フレームA’」となる。
In this embodiment, “′” is added to the frame relayed by the gateway ECU 30 to distinguish it from the others. Therefore, “frame A” becomes “frame A ′” when relayed to the
また、「フレームA」は第2の接続点25から第3のマイコン15の1チャンネル目にも送信される。
“Frame A” is also transmitted from the
更に、「フレームA」は第1の接続点24から第2のマイコン14の1チャンネル目にも送信されるが、第2のマイコン14では受信フレームを破棄するようにしているため、「フレームA」は受信しても破棄される。
Furthermore, “frame A” is transmitted from the
一方、「フレームB」は、第4の接続点27から第3の接続点26を介して第3のマイコン15の2チャンネル目に送信される。
On the other hand, “frame B” is transmitted from the
更に、「フレームB」は、第4の接続点27からゲートウェイECU30に送信される。「フレームB」はゲートウェイECU30に中継されて、「フレームB’」として第2の接続点25から第3のマイコン15に1チャンネル目に転送される。
Further, “frame B” is transmitted from the
第2のマイコン14の1チャンネル目からは「フレームX」、2チャンネル目から「フレームY」が送信される。
“Frame X” is transmitted from the first channel of the
「フレームX」は第1及び第2の接続点24、25を介して、第3のマイコン15の1チャンネル目に転送される。「フレームX」は第2の接続点25からゲートウェイECU30に向かうが、ゲートウェイECU30では「フレームX」が送信されても中継しないように設定されているため、「フレームX」は破棄される。同様に、「フレームX」は第1の接続点24から第1のマイコン13にも転送されるが、第1のマイコン13ではかかる「フレームX」を受信しても破棄する。
“Frame X” is transferred to the first channel of the
また、「フレームY」は第3の接続点26から第3のマイコン15の2チャンネル目に送信される。「フレームY」も第3の接続点26から第4の接続点27を介してゲートウェイECU30に向かうが「フレームY」は中継されてないように設定されているため破棄される。
“Frame Y” is transmitted from the
「フレームX」と「フレームY」は共に「中継外フレーム」としてゲートウェイECU30に中継されない。
Neither “frame X” nor “frame Y” is relayed to
こうして、第3のマイコン15は、「フレームA」と「フレームA’」、「フレームB’」と「フレームB」、「フレームX」と「フレームY」を、夫々1チャンネル目と2チャンネル目で受信する。第3のマイコン15は受信したこれらのフレームからゲートウェイECU30を評価する。
In this way, the
図2は、第3のマイコン15の構成例を示す図である。第3のマイコン15は、CPU151とI/O(Input/Output)バス152、及びCANコントローラ153を備える。
FIG. 2 is a diagram illustrating a configuration example of the
CPU151は、I/Oバス152を介してCANコントローラ153と接続され、CANコントローラ153からのデータに対してフレームの中継時間の計測等を行う。詳細は後述する。
The
CANコントローラ153は、2つのCANモジュール154、155(1チャンネル目がCANモジュール1(154)、2チャンネル目がCANモジュール2(155))と、メモリアクセスコントローラ156と、RAM157、及びインターフェース回路158を備える。
The
2つのCANモジュール154、155はCAN2バス22と接続され、転送されたフレームを各々メモリアクセスコントローラ156に転送する。
The two CAN
メモリアクセスコントローラ156は、RAM157と接続され、CANモジュール154、155からのフレームをRAM157に記憶する。RAM157は、受信フレーム(受信データ又は、メッセージ)が記憶されるメッセージバッファとして機能する。
The
インターフェース回路158は、I/Oバス152を介してCPU151とのインターフェースの役割を果たす。CPU151で読み出し可能なデータ形式等に変換する。
The
このように構成された第3のマイコン15の動作は以下のようになる。即ち、2つのCANモジュール154、155に転送されたフレームは、メモリアクセスコントローラ156に転送される。
The operation of the
メモリアクセスコントローラ156は、例えば、フレームに挿入されたID等のフレーム識別情報に基づいて、識別されたフレーム毎にフレームをメッセージバッファに記憶する。フレーム毎に各エントリが構成される。図2の例では、「N」個のエントリからなる。
The
このとき、メモリアクセスコントローラ156はフレームをキャプチャした時間情報(タイムスタンプ情報)も同一エントリに記憶する。従って、フレームごとに各フレームの時間情報も記憶される。
At this time, the
更に、メモリアクセスコントローラ156は、CANバスからメッセージを受信すると、CPU151に対して割り込み要求を出力する。割り込み要求は、インターフェース回路158を介してCPU151に転送される。
Furthermore, when the
CPU151は、この割り込み要求に基づいて、メモリアクセスコントローラ156にメッセージバッファに記憶された各フレームとそのタイムスタンプを読み出すように制御する。そして、CPU151はインターフェース回路158、I/Oバス152を介して、これらの情報を得る。CPU151はこれらの情報に基づいて中継時間を評価する。
Based on this interrupt request, the
このように本評価装置10では、予めメモリコントローラ156によってキャプチャした時間情報がメッセージバッファに記憶され、その情報に基づいて評価を行うようにしている。
As described above, in the
従って、割り込み要求に対してCPU151がキャプチャ処理を行って時間情報(タイムスタンプ情報)を得る場合と比較して、フレーム受信後から割り込み要求までのタイムラグがない分、精度の高い時間情報を得ることができる。
Therefore, as compared with the case where the
次に、CPU151がゲートウェイECU30の評価を行う場合の具体的な処理について説明する。図3(A)乃至図4は具体的な評価の処理例を示すフローチャートである。
Next, specific processing when the
図3(A)は中継時間の算出・判定処理を示し、同図(B)はゲートウェイECU30へのフレームの中継漏れがあるか否かを判定する中継漏れ処理を示し、図4は中継外フレーム(「フレームX」、「フレームY」)が他方のチャンネルに中継されているか否かを判定する中継過分判定処理を示す。
3A shows the relay time calculation / determination process, FIG. 3B shows the relay leak process for determining whether or not there is a frame relay leak to the
まず、図3(A)に示す中継時間の算出・判定処理について説明する。 First, the relay time calculation / determination process shown in FIG.
本処理が開始されると(S10)、CPU151は取得したタイムスタンプ情報から中継時間を算出する(S11)。
When this process is started (S10), the
例えば、「フレームA」と「フレームA’」に対して、夫々の受信時刻(タイムスタンプ情報)の差を演算し、中継時間を得る。 For example, for “frame A” and “frame A ′”, the difference between the reception times (time stamp information) is calculated to obtain the relay time.
次いで、CPU151は演算した中継時間が一定時間範囲内(数μs〜数十μs)か否か判断する(S12)。範囲内であれば(YES)、中継時間は問題ないものとして(S13)、処理を終了する(S14)。一方、範囲外のとき(S12でNO)、中継時間に問題が生じたものとして(S15)、処理を終了する(S14)。
Next, the
このように、「フレームA」と「フレームA’」、即ち、ゲートウェイECU30を中継せずに受信されたフレームと中継して受信されたフレームの受信時刻から差分を取って中継時間を算出するようにしたので、ゲートウェイECU30に対するフレームの中継時間を簡単に評価することができる。また、「フレームA」の評価と「フレームA’」の評価など別々の装置を利用する場合と比較して夫々の装置間で同期をとる必要もなく、簡易な構成で評価できるため安価に評価装置を提供できる。更に、中継時間が一定の範囲内か否かを判定するようにしているため高精度に評価することができる。
Thus, the relay time is calculated by taking the difference from the reception time of “frame A” and “frame A ′”, that is, the frame received without relaying through the
図3(A)の例では、「フレームA」と「フレームA’」の中継時間の算出・判定処理を示しているが、「フレームB」と「フレームB’」の中継時間の算出等の処理も同様に実現できる。この2つを組み合わせることで更に信頼性の高い高精度の評価装置を提供できる。更に、一定時間内で何度も繰り返すことで更に精度の高い、かつ信頼性の向上した評価装置を提供できる。 In the example of FIG. 3A, the calculation / determination processing of the relay times of “frame A” and “frame A ′” is shown, but the calculation of the relay times of “frame B” and “frame B ′”, etc. Processing can be realized in the same way. By combining these two, a highly reliable and highly accurate evaluation apparatus can be provided. Furthermore, it is possible to provide an evaluation device with higher accuracy and improved reliability by repeating the operation many times within a predetermined time.
次に、図3(B)に示す中継漏れ判定処理について説明する。処理が開始されると(S20)、「フレームA’」内のデータ値と「フレームA」内のデータ値とを比較し(S21)、両者が同じとき(YES)は中継漏れがなく(S22)、処理を終了する(S23)。一方、両者が異なるとき(S21でNO)、中継漏れが発生したものとして(S24)、処理を終了する(S23)。 Next, the relay leakage determination process shown in FIG. When the process is started (S20), the data value in “frame A ′” is compared with the data value in “frame A” (S21). If they are the same (YES), there is no relay omission (S22). ), The process is terminated (S23). On the other hand, when they are different (NO in S21), it is determined that relay leakage has occurred (S24), and the process is terminated (S23).
このように、本評価装置10では、「フレームA」と「フレームA’」のデータ値を比較して中継漏れが生じたか否かを判定しているため、簡易な構成により中継漏れを評価できる。上述の中継時間の算出・判定処理と組み合わせることで、信頼性の高い、かつ高精度の評価装置を提供できる。
As described above, the
尚、上述した中継時間の算出・判定処理と同様に、「フレームB」と「フレームB’」のデータ値を比較してもよいし、一定時間処理を繰り返すようにしてもよい。 As in the above-described relay time calculation / determination process, the data values of “frame B” and “frame B ′” may be compared, or the process may be repeated for a certain period of time.
次に、図4に示す中継過分判定処理について説明する。処理が開始されると(S30)、第3のマイコン(CPU_3)15の他方のチャンネルに「フレームX」のIDを有するフレームを受信したか否か判断する(S31)。 Next, the relay excess determination process shown in FIG. 4 will be described. When the process is started (S30), it is determined whether or not the frame having the ID of “Frame X” is received in the other channel of the third microcomputer (CPU — 3) 15 (S31).
図1等で説明したように、第3のマイコン15の1チャンネル目には、ゲートウェイECU30を中継しない「フレームX」が転送される。例えば、メッセージバッファにどのチャンネルで受信したかも記憶しておき、「フレームX」と同一IDのフレームが2チャンネル目で受信されたか否かを確認することで判断できる。
As described with reference to FIG. 1 and the like, the “frame X” that does not relay the
「フレームX」と同一のIDがあれば(YES)、CPU151はその同一IDを有するフレーム内のデータ値と「フレームX」内のデータ値とを比較する(S32)。一致すれば(YES)、他方のチャンネルに「フレームX」が中継されていることを確認し(S33)、処理を終了する(S34)。
If there is the same ID as “frame X” (YES), the
一方、データ値が一致しないとき(S32でNO)、他方のチャンネルには「フレームX」が中継されていないことを確認し(S35)、処理を終了する(S34)。 On the other hand, when the data values do not match (NO in S32), it is confirmed that “frame X” is not relayed to the other channel (S35), and the process is terminated (S34).
また、他方のチャンネルに「フレームX」と同一IDを有するフレームがないときも(S31でNO)、「フレームX」が他方のチャンネルに中継されていないことを確認し(S35)、処理を終了する(S34)。 Also, when there is no frame having the same ID as “Frame X” in the other channel (NO in S31), it is confirmed that “Frame X” is not relayed to the other channel (S35), and the process is terminated. (S34).
このように、本評価装置10では、中継フレームのみならず、それ以外の中継外フレームを確実に所定チャンネルで受信したかも確認するようにしているため、更に高精度の評価を行い得る。上述の各処理(図3(A)及び同図(B))と組み合わせてもよい。
As described above, in the
次に、中継順序に入れ替わりが発生しているか否かを評価する例について説明する。図5(A)及び同図(B)は共に中継順序に入れ替わりが発生したときの概念を示す図である。 Next, an example of evaluating whether or not the relay order has changed will be described. FIG. 5A and FIG. 5B are diagrams showing a concept when the relay order is changed.
まず、図5(A)について説明する。中継処理の優先順位が同じとなる同一IDのフレーム間で入れ替わりが生じていないかを検出したいが、「フレーム1」、「フレーム2」、「フレーム3」の各フレームのIDが同一で、挿入されたデータフィールドの値も同じ(0x00)フレームを連続してゲートウェイECU30が受信し、ゲートウェイECU30においてフレーム順が入れ替わり、「フレーム2」、「フレーム1」、「フレーム3」の順でCAN2バス22に転送される場合を考える。
First, FIG. 5A will be described. I want to detect whether or not there is a change between frames with the same ID with the same priority for relay processing, but the IDs of the frames “Frame 1”, “
ゲートウェイECU30においてフレームの入れ替わりが発生していないか評価するとき、上述した例では、各フレームのIDが同一では第3のマイコン15側で「フレーム1」等の違いを識別することができない。従って、中継順序の入れ替えが発生してもこれを判断できない。
When the
これを解消するため、本実施例では、ゲートウェイECU30に中継される各フレームに対して、そのデータフィールドの先頭(1バイト目)に自動的にインクリメントした識別符号を付与する。フレームのIDが同一でもデータ領域を確認することで、フレームの入れ替えが発生しても各フレームを識別することができる。
In order to solve this problem, in the present embodiment, an automatically incremented identification code is assigned to each frame relayed to the
図5(B)に示す例では、データフィールドに「フレーム1」から順に「0x01」、「0x02」、「0x03」を付与している。 In the example shown in FIG. 5B, “0x01”, “0x02”, and “0x03” are assigned to the data field sequentially from “frame 1”.
具体的には、評価装置10の第1のマイコン13において、インクリメントした識別符号をフレームのデータフィールド先頭に付与して各フレームが送信されるようにすればよい。勿論、各フレームの入れ替わりを受信側である第3のマイコン15で識別できればよいので、デクリメントした識別符号や、1つずつインクリメント等ではなく2つずつインクリメント等でもよく、所定のルールに従って、フレームごとにユニークなデータ値(データフィールドの値)を付与すればよい。
Specifically, the
また、フレーム毎に変更するフィールドとしては、データフィールドのみならず、IDフィールド等の、その他のフィールドを修正するようにしてもよい。なお、IDフィールドを変更していく場合には、IDを変更することによって、フレームの優先順位が異なってくる。CANプロトコルでは、IDに基づいてアービトレーションを行うため、IDを変更する場合には、送信順序が近いフレーム間で、フレームの優先順位の関係が変化しないように行う必要がある。 Further, as a field to be changed for each frame, not only the data field but also other fields such as an ID field may be corrected. When the ID field is changed, the priority order of the frames is changed by changing the ID. In the CAN protocol, arbitration is performed based on the ID. Therefore, when the ID is changed, it is necessary to change the relationship of the priority order of the frames between the frames having the similar transmission order.
このように本評価装置10では、中継時間の算出等の他にも、中継順序の入れ替えも評価できるため、高精度で信頼性の高い評価装置を提供できる。
As described above, the
次の例について説明する。例えば、図6に示す車内LANネットワークを考える。CAN1バス21にはノードA101〜ノードC103が接続され、CAN2バス22にはノードD104からノードF106が接続される。そして、CAN1バス21とCAN2バス22はゲートウェイECU30に接続される。尚、ゲートウェイECU30のチャンネル1側にCAN1バス21が、チャンネル2側にCAN2バス22が接続される。
The following example will be described. For example, consider the in-vehicle LAN network shown in FIG. Nodes A101 to C103 are connected to the
ゲートウェイECU30にはデータ配列テーブルが記憶され、ゲートウェイECU30はこの表に基づいて、各フレームを各ノードA101等に転送する。図7(A)にCAN1バスにおけるデータ配列テーブルの例を、図7(B)にCAN2バスにおけるデータ配列テーブルの例を示す。
The
図7(A)に示すように、「ID1」のフレームはノードA101から送信され(データ配列テーブルの「Tx」)、ノードB102、ノードC103、及びゲートウェイECU30のチャンネル1で受信する(「Rx」)。 As shown in FIG. 7A, the frame of “ID1” is transmitted from the node A101 (“Tx” in the data arrangement table), and is received by the channel 1 of the node B102, the node C103, and the gateway ECU 30 (“Rx”). ).
一方、「ID2」のフレームもノードA101から送信され、ノードB102、ノードC103で受信するものの、ゲートウェイECU30では受信しない(受信しても破棄する)。即ち、「ID2」のフレームはゲートウェイECU30を中継しない、「中継外フレーム」である。
On the other hand, the frame of “ID2” is also transmitted from the node A101 and received by the node B102 and the node C103, but is not received by the gateway ECU 30 (even if received, it is discarded). That is, the frame of “ID2” is an “outside relay frame” that does not relay the
また、図7(B)に示すように、「ID1」のフレームはゲートウェイECU30のチャンネル2側から送信され(「Tx」)、ノードD104〜ノードF105で受信する(「Rx」)。
As shown in FIG. 7B, the frame of “ID1” is transmitted from the
一方、「ID2」のフレームは、ノードD104から送信され、ノードE105、ノードF105で受信するものの、ゲートウェイECU30のチャンネル2側で受信しない。即ち、「ID2」のフレームはゲートウェイECU30を中継しない「中継外フレーム」である。
On the other hand, the frame of “ID2” is transmitted from the node D104 and received by the node E105 and the node F105, but is not received on the
このように「ID1」のフレームはゲートウェイECU30を中継するものの、「ID2」のフレームは「中継外フレーム」にも拘わらず、CAN1バス21とCAN2バス22とで同一IDの「中継外フレーム」が使用されているため、例えば評価装置10の第3のマイコン15の1チャンネル目にCAN1バス21が、2チャンネル目にCAN2バス22が接続されている状態で「ID2」のフレームを受信したとき、評価装置10ではこのフレームがノードA101から送信されたフレームなのか、ノードD104から送信されたフレームがゲートウェイECU30によって誤って中継されたフレームなのかを判断することができない。
In this way, although the “ID1” frame relays to the
そこで、本実施例では、ゲートウェイECU30で中継されないIDであるが、CAN1バスとCAN2バスの両方でそれぞれ用いられているIDを付与したフレームを送信して評価を行う場合には、どちらのCANバスのものとして送信したフレームであるかを区別できればよいため、データ値を異ならせる(例えば、データ値を反転させる)ようにしてもよい。例えば、CAN1バス側の「ID2」のフレームのデータ値を「0x00」としたとき、CAN2バス側の同一IDのフレームのデータ値を反転させて「0xFF」としてもよい。
Therefore, in this embodiment, the ID is not relayed by the
図8は、かかる処理の例を示すフローチャートである。評価装置10の第2のマイコン14で処理される。
FIG. 8 is a flowchart showing an example of such processing. Processing is performed by the
処理が開始されると(S40)、第2のマイコン14は送信チャンネルを判断する(S41)。1チャンネル目のとき(ch1)、フレームのデータフィールドに挿入される送信データ値を「0x00」に設定する(S42)。2チャンネル目のときは(S41でch2)、送信データ値を反転させ「0xFF」とする(S43)。
When the process is started (S40), the
そして、DLC(Data Length Code)データ長をフレームにセットし(S44)、CANバス21、22に送信し(S45)、処理を終了する(S46)。
Then, a DLC (Data Length Code) data length is set in the frame (S44), transmitted to the
このように、本評価装置10は、中継外フレームのデータ値をチャンネルごとにユニークな値にして送信する。送信チャンネル双方とも同一IDのフレームが存在しても、データ値を確認することで、中継外フレームを判定することができる。従って、高精度で信頼性の高い評価装置を提供できる。
Thus, the
尚、かかるデータ配列テーブルはゲートウェイECU30にあってもよいし、評価装置30の各マイコン13、14、15ごとに保持してもよい。
The data arrangement table may be stored in the
上述したいずれの例においても、各マイコン13、14、15は2つのチャンネル部を備えてフレームの送受信を行うものとして説明した。勿論、3チャンネル以上等、複数チャンネルから各マイコン13、14、15が構成されてもよい。この場合でも全く同様に実施可能で同様の作用効果を奏する。
In any of the above-described examples, each of the
10 評価装置、 12 CANボード、 13 第1のマイコン(CPU_1)、 14 第2のマイコン(CPU_2)、 15 第3のマイコン(CPU_3)、 21 CAN1バス、 22 CAN2バス、 30 ゲートウェイECU、 151 CPU、 153 CANコントローラ、 156 メモリアクセスコントローラ、 157 RAM(メッセージバッファ)
DESCRIPTION OF
Claims (5)
フレームを送信する送信部と、
前記送信部から送信された前記フレームが前記ゲートウェイ装置によって中継された第1のフレームと、前記送信部から送信された前記フレームが前記ゲートウェイ装置を介さなかった第2のフレームとを受信する受信部と、
前記第1のフレーム及び前記第2のフレームに基づいて前記ゲートウェイ装置を評価する評価部と、
を備えることを特徴とする評価装置。 In an evaluation device for a gateway device that relays frames that need to be connected between a plurality of buses and transferred to different buses,
A transmission unit for transmitting a frame;
A receiving unit that receives a first frame in which the frame transmitted from the transmitting unit is relayed by the gateway device and a second frame in which the frame transmitted from the transmitting unit does not pass through the gateway device When,
An evaluation unit that evaluates the gateway device based on the first frame and the second frame;
An evaluation apparatus comprising:
前記送信部は、送信する複数のフレームに同一のIDを持つフレームが存在する場合は、前記同一のIDを持つフレームのデータフィールドの内容を異なるものにすることを特徴とする請求項1記載の評価装置。 The bus relayed by the gateway device is a CAN protocol bus,
2. The transmission unit according to claim 1, wherein when a frame having the same ID exists in a plurality of frames to be transmitted, the transmission unit changes contents of a data field of the frame having the same ID. Evaluation device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006248146A JP2008072328A (en) | 2006-09-13 | 2006-09-13 | Evaluating device for gateway ecu |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006248146A JP2008072328A (en) | 2006-09-13 | 2006-09-13 | Evaluating device for gateway ecu |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008072328A true JP2008072328A (en) | 2008-03-27 |
Family
ID=39293542
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006248146A Withdrawn JP2008072328A (en) | 2006-09-13 | 2006-09-13 | Evaluating device for gateway ecu |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008072328A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2013171829A1 (en) * | 2012-05-14 | 2013-11-21 | トヨタ自動車 株式会社 | Vehicle-specific network communication management device and communication management method |
CN105893194A (en) * | 2016-04-01 | 2016-08-24 | 浪潮电子信息产业股份有限公司 | Nanosecond testing method of computer real-time clock and system clock |
US9834107B2 (en) | 2012-08-01 | 2017-12-05 | Toyota Jidosha Kabushiki Kaisha | External power supply connector, vehicle, and external power supply system |
-
2006
- 2006-09-13 JP JP2006248146A patent/JP2008072328A/en not_active Withdrawn
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2013171829A1 (en) * | 2012-05-14 | 2013-11-21 | トヨタ自動車 株式会社 | Vehicle-specific network communication management device and communication management method |
JPWO2013171829A1 (en) * | 2012-05-14 | 2016-01-07 | トヨタ自動車株式会社 | Communication management apparatus and communication management method for vehicle network |
US9843523B2 (en) | 2012-05-14 | 2017-12-12 | Toyota Jidosha Kabushiki Kaisha | Communication management apparatus and communication management method for vehicle network |
US9834107B2 (en) | 2012-08-01 | 2017-12-05 | Toyota Jidosha Kabushiki Kaisha | External power supply connector, vehicle, and external power supply system |
CN105893194A (en) * | 2016-04-01 | 2016-08-24 | 浪潮电子信息产业股份有限公司 | Nanosecond testing method of computer real-time clock and system clock |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20170134358A1 (en) | Communication system, communication control device, and fraudulent information-transmission preventing method | |
RU2665890C2 (en) | Data management and transmission system, gateway module, input/output module and process control method | |
US10523462B2 (en) | Communication network for transmission of messages | |
CN105700510A (en) | Error variance detection method of CAN communication system and the CAN communication system | |
KR101526413B1 (en) | Transceiver ic and operationg mwethod thereof | |
CN104620541A (en) | Data recording device for a vehicle network | |
CN111264051B (en) | Method for checking data transmission between two data processing devices via a first communication connection between two first interface units, and motor vehicle | |
US20200204396A1 (en) | On-board communication system, on-board relay apparatus, and message relay method | |
CN104683126B (en) | Network management based on CAN | |
JP2006333007A (en) | Vehicle communication system and data communication method | |
JP2008072328A (en) | Evaluating device for gateway ecu | |
JP6410914B1 (en) | Serial communication system | |
JP2006020038A (en) | Physical quantity sensor device and inspecting device therefor | |
JP2008112224A (en) | Error detection device and error detection method | |
KR20170122483A (en) | System for detecting communication network | |
US20230147005A1 (en) | Onboard device and sleep control method | |
KR20190071465A (en) | Evaluation method of vehicle network time synchronization | |
US7802150B2 (en) | Ensuring maximum reaction times in complex or distributed safe and/or nonsafe systems | |
CN103257648A (en) | Automobile calibration system | |
JP2017120960A (en) | Communication path abnormality monitoring device | |
CN105577427A (en) | Detection method and device for communication connection between household appliance and mobile terminal | |
US20050169189A1 (en) | Method and device for testing a monitoring function of a bus system and a corresponding bus system | |
CN116155861B (en) | Wired communication system and configuration method of device ID thereof | |
US11736318B2 (en) | Initialization of data bus subscribers | |
US12007919B2 (en) | In-vehicle communication device and vehicle communication method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20090820 |
|
A761 | Written withdrawal of application |
Free format text: JAPANESE INTERMEDIATE CODE: A761 Effective date: 20100426 |
|
A072 | Dismissal of procedure [no reply to invitation to correct request for examination] |
Free format text: JAPANESE INTERMEDIATE CODE: A073 Effective date: 20100922 |
|
A300 | Application deemed to be withdrawn because no request for examination was validly filed |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20110201 |