JP2006319759A - Gateway device - Google Patents

Gateway device Download PDF

Info

Publication number
JP2006319759A
JP2006319759A JP2005141321A JP2005141321A JP2006319759A JP 2006319759 A JP2006319759 A JP 2006319759A JP 2005141321 A JP2005141321 A JP 2005141321A JP 2005141321 A JP2005141321 A JP 2005141321A JP 2006319759 A JP2006319759 A JP 2006319759A
Authority
JP
Japan
Prior art keywords
transmission
communication
time
communication frame
frame
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.)
Granted
Application number
JP2005141321A
Other languages
Japanese (ja)
Other versions
JP4457407B2 (en
Inventor
Katsuhiko Furuta
克彦 古田
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.)
Denso Corp
Original Assignee
Denso Corp
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 Denso Corp filed Critical Denso Corp
Priority to JP2005141321A priority Critical patent/JP4457407B2/en
Publication of JP2006319759A publication Critical patent/JP2006319759A/en
Application granted granted Critical
Publication of JP4457407B2 publication Critical patent/JP4457407B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a gateway device which can effectively relay communication frames within a limited time, even under the condition where the relayed amount of the communication frames is large. <P>SOLUTION: In the vehicle-mounted gateway device in which a plurality of networks are formed by connecting a plurality of control units using communication lines, and receiving processing, and transmitting processing of the communication frames are performed connecting the plurality of networks, the gateway device can be provided which includes a receiving means which receives the receiving frames, and stores in a communication frame buffer; an actual receiving processing time measuring means which measures the actual processing time of receiving and storing of the communication frames by the receiving means; and a transmission processing possible time calculation means which calculates transmission processing possible time, in which transmission processing is executable based on the real receiving processing time. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、複数の制御ユニットが通信線により接続されたネットワークが複数形成され、前記複数のネットワーク間を接続して通信フレームの受信処理および送信処理を行なうゲートウェイ装置に関するものである。   The present invention relates to a gateway apparatus in which a plurality of networks in which a plurality of control units are connected by communication lines are formed, and the plurality of networks are connected to perform communication frame reception processing and transmission processing.

例えば車両において搭載機器を電子的に制御する制御ユニットが多数採用されるにしたがい、その制御ユニット間においてデータを共有化し、各制御ユニットにおいて分散制御や協調制御を行なう要求が高まっている。例えば、車両において、シートやドア等のボディ系、エンジン,電子スロットル等のパワートレイン系、さらにナビゲーション装置,VICS,ETC等のマルチメディア系といった区分けでそれぞれの制御ユニットをネットワーク化し、さらに各ネットワーク間をデータである通信フレームの中継が可能なゲートウェイ装置を介して接続することが検討されている。   For example, as a large number of control units that electronically control on-board equipment are adopted in a vehicle, there is an increasing demand for sharing data among the control units and performing distributed control and cooperative control in each control unit. For example, in a vehicle, each control unit is networked according to the classification of body systems such as seats and doors, power train systems such as engines and electronic throttles, and multimedia systems such as navigation devices, VICS, and ETC. Are being considered to be connected via a gateway device capable of relaying communication frames as data.

このゲートウェイ装置を介して通信フレームを中継する場合、ゲートウェイ装置では通信フレーム中継処理が一定時間ごとに動作し、かつ処理時間に規定がある場合、単位時間内の通信フレームの最大受信量による処理時間を算出し、通信フレーム処理時間から受信処理時間を減算した時間内で、中継する通信フレームの送信可能時間を算出し、通信フレーム中継量を決定している。   When relaying communication frames via this gateway device, if the gateway device operates communication frame relay processing at regular intervals and the processing time is specified, the processing time based on the maximum received amount of communication frames within a unit time Is calculated, and within the time obtained by subtracting the reception processing time from the communication frame processing time, the transmittable time of the relayed communication frame is calculated to determine the communication frame relay amount.

特開2000−124941号公報JP 2000-124941 A

図5のように、従来の通信フレーム中継処理では、通信フレーム中継処理が例えば5msec周期で動作し、通信フレーム送受信処理時間が例えば0.5msecと規定されるとすると、データの受信漏れを防ぐためにネットワークの通信量を基に、まず通信フレーム受信処理時間TRn,TRn+1が例えば0.3msecと規定される。そして、通信フレーム送信処理時間TSn,TSn+1は通信フレーム送受信処理時間の0.5msecから通信フレーム受信処理時間TRn,TRn+1を差し引いた0.2msecというように、通信フレームの受信処理送信処理にそれぞれ固定時間枠を割り付けている。   As shown in FIG. 5, in the conventional communication frame relay processing, if the communication frame relay processing operates at a cycle of, for example, 5 msec and the communication frame transmission / reception processing time is specified to be, for example, 0.5 msec, Based on the network traffic, the communication frame reception processing times TRn and TRn + 1 are first defined as 0.3 msec, for example. The communication frame transmission processing times TSn and TSn + 1 are fixed times for the communication frame reception processing transmission processing, such as 0.2 msec obtained by subtracting the communication frame reception processing times TRn and TRn + 1 from the communication frame transmission / reception processing time 0.5 msec. A frame is assigned.

この場合、n回目の周回の通信フレーム送受信処理において、通信フレーム受信量が少なく実際の通信フレーム受信処理時間が0.1msec程度と短くても、データ送信処理時間TSnは0.2msecのままであるため、送信すべきデータが0.2msec分以上あっても、n回目の周回の通信フレーム送受信処理内では送信すべき通信フレームを全て送信することはできない。送信できなかった通信フレームは次のn+1回目の周回の通信フレーム送受信処理で送信しなければならなくなる。   In this case, in the communication frame transmission / reception process of the nth round, even if the communication frame reception amount is small and the actual communication frame reception processing time is as short as about 0.1 msec, the data transmission processing time TSn remains 0.2 msec. Therefore, even if the data to be transmitted is 0.2 msec or more, it is not possible to transmit all the communication frames to be transmitted within the communication frame transmission / reception process of the nth round. Communication frames that could not be transmitted must be transmitted in the next (n + 1) th communication frame transmission / reception process.

しかし、n+1回目の周回の通信フレーム送受信処理においても、送信すべき通信フレームが0.2msec分以上あると、さらに通信フレーム送信の積み残しが発生してしまう。   However, even in the communication frame transmission / reception processing of the (n + 1) th round, if there are more than 0.2 msec of communication frames to be transmitted, further communication frame transmissions are left.

このように通信フレームの中継量が少ない状況では、通信フレーム受信から送信までにかかる時間が長くなることはないが、中継通信フレーム量が多い状況では、通信フレームを受信した次の周期の通信フレーム中継処理で、前回の処理で送信できなかった通信フレームを送信しなくてはならず、通信フレーム受信から送信までにかかる時間が延び、その結果、ゲートウェイ装置およびゲートウェイ装置に接続されるネットワークの動作に影響を及ぼすこともあり得る。   In such a situation where the relay amount of the communication frame is small, it does not take a long time to receive and transmit the communication frame. However, in a situation where the amount of relay communication frame is large, the communication frame of the next cycle after receiving the communication frame In the relay process, the communication frame that could not be transmitted in the previous process must be transmitted, and the time taken from the reception to the transmission of the communication frame is increased. As a result, the gateway device and the operation of the network connected to the gateway device May also affect.

上記問題を背景として、本発明の課題は、通信フレームの中継量が多い状況においても限られた時間内に効率よく通信フレームを中継することが可能なゲートウェイ装置を提供することにある。   With the above problem as a background, an object of the present invention is to provide a gateway device that can relay a communication frame efficiently within a limited time even in a situation where the communication frame relay amount is large.

課題を解決するための手段および発明の効果Means for Solving the Problems and Effects of the Invention

本発明は、上記課題を解決するためのゲートウェイ装置を提供するものである。即ち、請求項1によれば、複数の制御ユニットが通信線により接続されたネットワークが複数形成され、複数のネットワーク間を接続して通信フレームの受信処理および送信処理を行なうゲートウェイ装置において、通信フレームを受信して通信フレームバッファに格納する受信手段と、受信手段による通信フレームの受信および格納の実受信処理時間を計測する実受信処理時間計測手段と、実受信処理時間に基づいて送信処理が実行可能である送信処理可能時間を算出する送信処理可能時間算出手段と、を備えることを特徴とするゲートウェイ装置として構成される。   The present invention provides a gateway device for solving the above problems. That is, according to the first aspect of the present invention, in the gateway device in which a plurality of networks in which a plurality of control units are connected by communication lines are formed and the plurality of networks are connected to perform communication frame reception processing and transmission processing, Is received and stored in the communication frame buffer, the actual reception processing time measuring means for measuring the actual reception processing time of receiving and storing the communication frame by the receiving means, and the transmission processing is executed based on the actual reception processing time A transmission processable time calculating means for calculating a possible transmission processable time, and configured as a gateway device.

図5の従来技術では、受信処理に割り当てられた0.3msecの処理時間のうち実受信処理時間が0.2msecであっても残りの0.1msecは送信処理に転用することはできない。しかし、本発明の構成では、通信フレーム受信量が少ない場合は通信フレーム送信量を増やし、通信フレーム受信量が多い場合は通信フレーム送信量を減らすことができ、効率よく通信フレームを中継することが可能となる。   In the prior art of FIG. 5, even if the actual reception processing time is 0.2 msec out of the 0.3 msec processing time allocated to the reception processing, the remaining 0.1 msec cannot be diverted to the transmission processing. However, in the configuration of the present invention, the communication frame transmission amount can be increased when the communication frame reception amount is small, and the communication frame transmission amount can be decreased when the communication frame reception amount is large, so that the communication frame can be relayed efficiently. It becomes possible.

請求項2によれば、本発明のゲートウェイ装置における受信処理および送信処理は所定の周期で繰り返し実行される構成をとることができる。   According to the second aspect, the reception process and the transmission process in the gateway device of the present invention can be configured to be repeatedly executed at a predetermined cycle.

一般的に、ゲートウェイ装置の処理は様々な処理が周期的に行なわれることが多く、全体の処理負荷を低減するために、これらの処理の処理時間は短いことが望ましい。本発明は実受信処理時間に基づいて送信処理が実行可能である送信処理可能時間を算出する構成であるため、効率よくデータを中継することができ、所定の周期で繰り返し実行されても全体の処理負荷の増大を抑制することが可能となる。   In general, the gateway apparatus often performs various processes periodically. In order to reduce the overall processing load, it is desirable that the processing time of these processes be short. Since the present invention is configured to calculate the transmission processable time during which the transmission process can be performed based on the actual reception processing time, the data can be relayed efficiently, and even if it is repeatedly executed at a predetermined cycle, the entire process An increase in processing load can be suppressed.

請求項3によれば、本発明のゲートウェイ装置における受信処理および送信処理は所定制約時間内で繰り返し行なわれる構成をとることができる。   According to the third aspect, it is possible to adopt a configuration in which the reception process and the transmission process in the gateway device of the present invention are repeatedly performed within a predetermined constraint time.

ゲートウェイ装置の処理負荷の面から、通信フレームの中継を行なうための受信処理および送信処理は所定制約時間内で行なわなければならない場合がある。本発明の構成では限られた時間内に効率よく通信フレームを中継することが可能であるため、所定の周期で繰り返し実行されても全体の処理負荷の増大を抑制することが可能となる。   From the viewpoint of the processing load of the gateway device, the reception process and the transmission process for relaying the communication frame may have to be performed within a predetermined constraint time. With the configuration of the present invention, it is possible to relay a communication frame efficiently within a limited time, so that it is possible to suppress an increase in the overall processing load even if it is repeatedly executed at a predetermined period.

請求項4によれば、本発明のゲートウェイ装置における実受信処理時間計測手段は、通信フレームの1フレームあたりの受信および格納の処理時間を基に実受信処理時間を算出する構成をとることができる。   According to claim 4, the actual reception processing time measuring means in the gateway device of the present invention can be configured to calculate the actual reception processing time based on the reception and storage processing time per frame of the communication frame. .

通信フレームの1フレームあたりの受信処理時間は、フレーム長によって変動はあるものの一定の範囲内にある。上記構成によって、受信処理における全ての通信フレームの受信処理時間を測定する必要がないので、受信処理の処理負荷を低減することが可能となる。   The reception processing time per frame of communication frames is within a certain range although it varies depending on the frame length. With the above-described configuration, it is not necessary to measure the reception processing time of all communication frames in the reception process, so that it is possible to reduce the processing load of the reception process.

請求項5によれば、本発明のゲートウェイ装置における送信処理可能時間算出手段は所定制約時間から実受信処理時間を差し引いたものを送信処理可能時間とする構成をとることができる。   According to the fifth aspect, the transmission processable time calculating means in the gateway device of the present invention can be configured such that the transmission processable time is obtained by subtracting the actual reception processing time from the predetermined constraint time.

上記構成によって、通信フレーム受信量が少ない場合は通信フレーム送信量を増やし、通信フレーム受信量が多い場合は通信フレーム送信量を減らすことができ、所定制約時間内に効率よく通信フレームを中継することが可能となる。   With the above configuration, the communication frame transmission amount can be increased when the communication frame reception amount is small, and the communication frame transmission amount can be decreased when the communication frame reception amount is large. Is possible.

請求項6によれば、本発明のゲートウェイ装置は、実受信処理時間と送信処理可能時間との関係を定義したマップデータを有し、送信処理可能時間算出手段はマップデータから送信処理可能時間を算出する構成をとることができる。   According to claim 6, the gateway device of the present invention has map data defining the relationship between the actual reception processing time and the transmission processable time, and the transmission processable time calculating means calculates the transmission processable time from the map data. The structure to calculate can be taken.

上記構成によって、マップデータ参照処理のみによって送信処理可能時間を算出することが可能となり、計算式を用いた演算処理を行なう必要はなくなるので、送信処理可能時間算出処理の処理負荷を低減することが可能となる。   With the above configuration, it is possible to calculate the transmission processable time only by the map data reference process, and it is not necessary to perform an arithmetic process using a calculation formula, so the processing load of the transmission processable time calculation process can be reduced. It becomes possible.

請求項7によれば、本発明のゲートウェイ装置におけるマップデータは受信した通信フレーム数と送信可能な通信フレーム数との関係が定義される構成をとることができる。   According to the seventh aspect, the map data in the gateway device of the present invention can take a configuration in which the relationship between the number of received communication frames and the number of transmittable communication frames is defined.

通信フレームの1フレームあたりの受信処理時間および送信処理時間はフレーム長によって変動はあるものの一定の範囲内にある。よって、受信処理における全てのフレームの実受信処理時間を時間ではなく受信フレーム数として計測することができる。上記構成によって、通信フレーム受信処理時間を実測あるいは換算する必要もなく、通信フレーム受信処理の処理負荷を低減することが可能となる。さらに、送信処理可能時間もマップデータから送信処理可能フレーム数として算出できるので、計算式を用いた演算処理を行なう必要はなくなるので、送信処理可能時間算出処理の処理負荷を低減することが可能となる。   The reception processing time and transmission processing time per frame of the communication frame are within a certain range although they vary depending on the frame length. Therefore, the actual reception processing time of all frames in the reception processing can be measured as the number of received frames instead of time. With the above configuration, it is not necessary to actually measure or convert the communication frame reception processing time, and the processing load of the communication frame reception processing can be reduced. Furthermore, since the transmission processable time can also be calculated from the map data as the number of frames that can be transmitted, it is not necessary to perform a calculation process using a calculation formula, so the processing load of the transmission processable time calculation process can be reduced. Become.

図4は、本発明の構成の受信処理および送信処理を例えば5msecの所定の周期で繰り返し実行され、例えば0.5msecのような一定時間すなわち所定制約時間内で行なう例である。n回目の周回の処理では受信処理の実受信処理時間TRnは約0.22msecである。図5の従来技術では受信処理は0.3msecの固定時間枠が設定されているため、送信処理は0.2msecしか割り当てることができないが、図4の本発明の構成では0.28msecを送信処理TSnに割り当てることができるため、従来よりも多くの通信フレームを送信することが可能となる。つまり、従来は0.2msecを超える分の通信フレームが送信できず、次のn+1回目の周回の処理で送信しなければならなかったが、本発明では0.08msec分の通信フレームを当n回目の周回の処理で送信できるので、ゲートウェイ装置およびゲートウェイ装置に接続されるネットワークの処理効率の向上につながる。   FIG. 4 shows an example in which the reception process and the transmission process of the configuration of the present invention are repeatedly executed at a predetermined cycle of, for example, 5 msec, and are performed within a certain time, for example, a predetermined constraint time such as 0.5 msec. In the n-th round process, the actual reception processing time TRn of the reception process is about 0.22 msec. In the prior art of FIG. 5, since a fixed time frame of 0.3 msec is set for the reception process, only 0.2 msec can be assigned for the transmission process, but in the configuration of the present invention of FIG. 4, 0.28 msec is the transmission process. Since it can be assigned to TSn, more communication frames than before can be transmitted. In other words, conventionally, a communication frame exceeding 0.2 msec could not be transmitted and had to be transmitted in the next n + 1 round processing, but in the present invention, a communication frame corresponding to 0.08 msec was transmitted for the nth time. Therefore, it is possible to improve the processing efficiency of the gateway device and the network connected to the gateway device.

n回目の周回の処理の5msec後に実行されるn+1回目の周回の処理では、受信処理の実受信処理時間TRn+1は約0.25msecであるため、通信フレーム送信処理時間TSn+1として従来よりもさらに0.05msecを使用することができ、より多くのフレームを送信することができる。   In the (n + 1) -th round processing executed 5 msec after the n-th round processing, the actual reception processing time TRn + 1 of the reception processing is about 0.25 msec. 05 msec can be used and more frames can be transmitted.

同様に、n+1回目の周回の処理の5msec後に実行されるn+2回目の周回の処理では、受信処理の実受信処理時間TRn+2は約0.17msecであるため、通信フレーム送信処理時間TSn+2として0.33msecを使用でき、従来よりも約1.5倍のフレームを送信することができる。   Similarly, in the (n + 2) -th round processing executed 5 msec after the (n + 1) -th round processing, since the actual reception processing time TRn + 2 of the reception processing is about 0.17 msec, the communication frame transmission processing time TSn + 2 is 0.33 msec. Can be used, and about 1.5 times as many frames as before can be transmitted.

なお、通信バスの通信速度や通信フレームの最小/最大長といった物理的制約と、ゲートウェイ装置の処理構成によって決められる例えば5ms周期の処理タイミングといった時間的制約とから、最大実受信処理時間を例えば0.3msecのように設定することができる。そして、送受信処理の合計時間は、理論上最大時間の受信処理が連続して発生した場合でも、その周回の処理で少なくとも1フレームの通信フレームを送信できるように、例えば0.5msのように設定されている。   Note that the maximum actual reception processing time is set to 0, for example, based on physical restrictions such as the communication speed of the communication bus and the minimum / maximum length of the communication frame, and time restrictions such as a processing timing of a 5 ms cycle determined by the processing configuration of the gateway device. .3 msec can be set. The total transmission / reception processing time is set to, for example, 0.5 ms so that at least one communication frame can be transmitted by the cyclic processing even when the reception processing of the maximum time theoretically occurs continuously. Has been.

中継データ量が多い状況においても限られた時間内に効率よくデータを中継することが可能なゲートウェイ装置を提供するという目的を、データ受信量が少ないタイミングではデータ送信量を増やし、データ受信量が多いタイミングではデータ送信量を減らすといった動的に処理量を可変とする構成により実現した。   The purpose is to provide a gateway device that can relay data efficiently within a limited time even when there is a large amount of relay data. This was realized by a configuration in which the amount of processing was dynamically variable, such as reducing the amount of data transmission at many timings.

以下、本発明の実施の形態を、本発明のゲートウェイ装置を車両に適用した一例をもとに説明する。なお、本発明のゲートウェイ装置の適用範囲を車両に限定するものではなく、例えばネットワーク通信機器にも適用可能である。   Hereinafter, embodiments of the present invention will be described based on an example in which the gateway device of the present invention is applied to a vehicle. The scope of application of the gateway device of the present invention is not limited to a vehicle, and can be applied to, for example, a network communication device.

図1は、本発明のゲートウェイ装置および周辺ネットワークの構成の全体構成を示すブロック図である。車両の搭載機器を電子的に制御する各種の制御ユニットがネットワークを形成し、通信バス、さらにはゲートウェイ装置を介して相互に接続されている。   FIG. 1 is a block diagram showing the overall configuration of the gateway device and peripheral network of the present invention. Various control units that electronically control on-vehicle equipment form a network, and are connected to each other via a communication bus and further a gateway device.

図1の例では、通信バス−1にボディ系のネットワークが構成され、ドアロックを制御するECU−A,シートの位置を調整するECU−Bが接続されている。また、通信バス−2にパワートレイン系のネットワークが構成され、エンジンを制御するECU−C,変速機を制御するECU−D,ブレーキを制御するECU−Eが接続されている。   In the example of FIG. 1, a body system network is configured on the communication bus 1, and an ECU-A that controls the door lock and an ECU-B that adjusts the position of the seat are connected. In addition, a powertrain network is configured on the communication bus-2, and an ECU-C that controls the engine, an ECU-D that controls the transmission, and an ECU-E that controls the brake are connected.

図2のように、ゲートウェイ装置10は、通信バス−1,通信バス−2がそれぞれ接続される本発明の受信手段である第1通信I/F16,第2通信I/F17と、通信バス−1および通信バス−2間のデータ伝送を制御するMPU11とを備え、ゲートウェイ装置10で行なう各種処理をMPU11で実行する。本発明の受信処理時間計測手段,送信処理可能時間算出手段であるMPU11には、データ伝送処理を含む各種処理の実行時に使用するデータまたはプログラムなどが記憶されるRAM12、フラッシュメモリ13およびROM14が接続されている。   As shown in FIG. 2, the gateway device 10 includes a first communication I / F 16 and a second communication I / F 17 which are receiving means of the present invention to which the communication bus-1 and the communication bus-2 are connected, and a communication bus- 1 and the MPU 11 that controls data transmission between the communication buses 2, and the MPU 11 executes various processes performed by the gateway device 10. Connected to the MPU 11 which is a reception processing time measuring means and a transmission processable time calculating means of the present invention are a RAM 12, a flash memory 13 and a ROM 14 which store data or programs used when executing various processes including a data transmission process. Has been.

ROM14には、例えば、ゲートウェイ装置10で行なう各種処理を実行するためのメインプログラム14p、およびゲートウェイ装置10の機器番号などの機器識別情報14bが記憶されている。フラッシュメモリ13には、例えば、ゲートウェイ装置10で行なう各種処理を実行するための処理プログラム13pが記憶されている。MPU11は、ROM14に記憶されているメインプログラム14pを実行すると共に、フラッシュメモリ13から必要な処理プログラム13pを読出して実行する。フラッシュメモリ13に記憶されている処理プログラムは、MPU11により、更新することが可能である。更新処理は、例えばインストルメントパネルに設けられたスイッチ等の入力操作部(図示せず)によって実施する。   The ROM 14 stores, for example, a main program 14p for executing various processes performed by the gateway device 10 and device identification information 14b such as a device number of the gateway device 10. The flash memory 13 stores, for example, a processing program 13p for executing various processes performed by the gateway device 10. The MPU 11 executes the main program 14p stored in the ROM 14, and reads and executes a necessary processing program 13p from the flash memory 13. The processing program stored in the flash memory 13 can be updated by the MPU 11. The update process is performed by an input operation unit (not shown) such as a switch provided on the instrument panel, for example.

各種処理の実行に必要なデータは、MPU11により、RAM12、フラッシュメモリ13、およびROM14から読み出される。また、処理結果は、MPU11により、RAM12またはフラッシュメモリ13に記憶される。例えば、ECU−A〜ECU−Eのアドレスを含むアドレステーブルがRAM12に記憶され、データの転送をブロックする送信元および/または送信先などのフィルタリングポリシがフラッシュメモリ13に記憶される。MPU11は、前記アドレステーブルおよびフィルタリングポリシを参照して、通信フレーム中継処理を行なう。なお、RAM12を使用せずにフラッシュメモリ13のみを使用することも可能である。   Data necessary for executing various processes is read from the RAM 12, the flash memory 13, and the ROM 14 by the MPU 11. The processing result is stored in the RAM 12 or the flash memory 13 by the MPU 11. For example, an address table including addresses of ECU-A to ECU-E is stored in the RAM 12, and a filtering policy such as a transmission source and / or a transmission destination that blocks data transfer is stored in the flash memory 13. The MPU 11 performs communication frame relay processing with reference to the address table and the filtering policy. It is also possible to use only the flash memory 13 without using the RAM 12.

通信バス−1,通信バス−2で用いる通信プロトコルは、公知のトークンパッシング方式,CSMA/CD(Carrier Sense Multiple Access with Collision Detection:衝突検出型搬送波検知多重アクセス)方式やTDMA(Time Division Multiple Access:時分割多元接続)方式等、公知の各種プロトコルを採用してもよい。また、各ネットワークで異なる通信プロトコルを採用することも可能である。第1通信I/F16,第2通信I/F17は、それぞれのネットワークの通信プロトコルに対応した周知の通信LSI16a,17a等を含む回路構成となっている。   The communication protocols used in the communication bus-1 and the communication bus-2 are known token passing systems, CSMA / CD (Carrier Sense Multiple Access with Collision Detection) systems, and TDMA (Time Division Multiple Access: Various known protocols such as a time division multiple access method may be employed. It is also possible to employ different communication protocols for each network. The first communication I / F 16 and the second communication I / F 17 have a circuit configuration including known communication LSIs 16a and 17a corresponding to the communication protocols of the respective networks.

通信バス1あるいは2からの通信フレームの受信は以下の(1)あるいは(2)の少なくとも一方を用いて行なう。
(1)通信バス1あるいは2から受信した通信フレームを、通信I/F16,第2通信I/F17に含まれてRAM等で構成されるバッファ16b,17bに蓄積する。受信した通信フレームを各バッファに蓄積する方法は、通信LSI16a,17aから通信フレームを各バッファに直接転送する方法、通信I/F16,17の全体制御を行なう図示しないCPUにより動作する制御プログラムにより通信LSI16a,17aから通信フレームをバッファ16b,17bに転送する方法のいずれを用いてもよい。
(2)通信バス1あるいは2から受信した通信フレームを、メインプログラム14pに含まれる通信ドライバプログラムにより、通信I/F16あるいは第2通信I/F17から取り込んでRAM12に領域が確保されるバッファ12aに蓄積する。
なお、通信バス1あるいは2から通信フレームを受信した場合には、通信フレームを受信した旨を示す通信フレーム受信フラグをセットする。通信フレーム受信フラグは通信フレーム毎に領域が確保される。
Reception of a communication frame from the communication bus 1 or 2 is performed using at least one of the following (1) or (2).
(1) The communication frame received from the communication bus 1 or 2 is stored in the buffers 16b and 17b that are included in the communication I / F 16 and the second communication I / F 17 and configured by a RAM or the like. The received communication frame is stored in each buffer by a method of directly transferring the communication frame from the communication LSIs 16a and 17a to each buffer, or by a control program operated by a CPU (not shown) that performs overall control of the communication I / Fs 16 and 17. Any method of transferring communication frames from the LSIs 16a and 17a to the buffers 16b and 17b may be used.
(2) The communication frame received from the communication bus 1 or 2 is fetched from the communication I / F 16 or the second communication I / F 17 by the communication driver program included in the main program 14p and stored in the buffer 12a whose area is secured in the RAM 12. accumulate.
When a communication frame is received from the communication bus 1 or 2, a communication frame reception flag indicating that the communication frame has been received is set. An area for the communication frame reception flag is secured for each communication frame.

なお、接続される通信バスの数には制約はなく、パワートレイン系,ボディ系のネットワークの他に、マルチメディア系、およびエアバック等のセイフティ系のネットワークを構成に含めてもよい。この場合、これら追加されるネットワークの通信プロトコルに対応した通信I/Fも追加される。   The number of communication buses to be connected is not limited, and a safety network such as a multimedia system and an air bag may be included in the configuration in addition to a power train system and a body system network. In this case, a communication I / F corresponding to the communication protocol of the added network is also added.

図6のように、通信フレームは、ヘッダーフィールドとデータフィールドを有し、データフィールドにはデータ本体が書き込まれている。ヘッダーフィールドには、ECU−A〜ECU−Eの機器識別情報であったり、車両速度やエンジン回転数といった通信フレームの意味合いを示したりするIDと、データ本体の長さを示すデータレングスコード(DLC)とが含まれる。   As shown in FIG. 6, the communication frame has a header field and a data field, and a data body is written in the data field. The header field includes device identification information of ECU-A to ECU-E, an ID indicating the meaning of the communication frame such as the vehicle speed and the engine speed, and a data length code (DLC) indicating the length of the data body. ) And

上記のような構成により、ゲートウェイ装置10は、通信バス−1から第1通信I/F16により受信した通信フレームをフレームバッファに格納し、第2通信I/F17を介して通信バス−2へ送信すなわち中継する。例えば、ECU−Aからの通信フレームをECU−C〜ECU−Eに中継する。また、ECU−Aからの通信フレームを同じ通信バス−1に接続されるECU−Bに中継してもよい。逆に、通信バス−2に接続されるECU−Eからの通信フレームを通信バス−1に接続されるECU−A,ECU−Bに中継する。同様に、ECU−Eからの通信フレームを同じ通信バス−1に接続されるECU−Cに中継してもよい。   With the configuration as described above, the gateway device 10 stores the communication frame received from the communication bus-1 through the first communication I / F 16 in the frame buffer and transmits it to the communication bus-2 via the second communication I / F17. That is, it relays. For example, the communication frame from ECU-A is relayed to ECU-C to ECU-E. Moreover, you may relay the communication frame from ECU-A to ECU-B connected to the same communication bus-1. Conversely, the communication frame from ECU-E connected to communication bus-2 is relayed to ECU-A and ECU-B connected to communication bus-1. Similarly, the communication frame from ECU-E may be relayed to ECU-C connected to the same communication bus-1.

図3にゲートウェイ装置10のROM14に記憶され、MPU11で実行されるメインプログラム14pに含まれるメイン処理のフロー図を示す。メイン処理は例えば5msec周期のような一定周期で実行される。タイマ等によりメイン処理の起動タイミングを生成し、メイン処理の起動タイミングとなった場合(S1:Yes)には、メイン処理として、例えば通信フレーム送受信処理以外の他処理(S2),通信フレーム受信処理(S3),通信フレーム送信処理(S4)の順に実行される。   FIG. 3 shows a flowchart of the main process stored in the ROM 14 of the gateway apparatus 10 and included in the main program 14p executed by the MPU 11. The main process is executed at a constant cycle such as a 5 msec cycle. When the start timing of the main process is generated by a timer or the like and the start timing of the main process is reached (S1: Yes), for example, other processes other than the communication frame transmission / reception process (S2), the communication frame reception process, etc. (S3) and communication frame transmission processing (S4) are executed in this order.

図8に、図3のステップS3で示される通信フレーム受信処理の詳細を説明するフロー図を示す。まず、今回のデータ受信処理で受信する通信フレームのフレーム数を計数する受信フレームカウンタを初期化すなわちゼロクリアする(S11)。   FIG. 8 is a flowchart illustrating the details of the communication frame reception process shown in step S3 of FIG. First, a reception frame counter that counts the number of communication frames received in the current data reception process is initialized, that is, cleared to zero (S11).

通信フレームを受信した場合、すなわちバッファ16b,17bあるいはバッファ12aに通信フレームが蓄積されている場合(S12:Yes)、受信した通信フレームを通信フレームのID毎にRAM12に領域が確保されるフレームバッファに格納する(S13)。そして、該当する通信フレーム受信フラグをクリアする。このとき、バッファ16b,17bあるいはバッファ12aの内容をゼロクリアしてもよい。   When a communication frame is received, that is, when a communication frame is accumulated in the buffers 16b, 17b or the buffer 12a (S12: Yes), a frame buffer in which an area is secured in the RAM 12 for each ID of the communication frame. (S13). Then, the corresponding communication frame reception flag is cleared. At this time, the contents of the buffers 16b and 17b or the buffer 12a may be cleared to zero.

図7にフレームバッファの一例を示す。フレームバッファの構成は、以下の(1)〜(4)のうちのいずれを用いてもよい。
(1)データ領域の領域番号が通信フレームのIDに対応する。すなわち、DATA0には通信フレームのIDが0のデータ本体の内容が、DATAnには通信フレームのIDがnのデータ本体の内容が全て格納される。
(2)受信した通信フレームを例えば1バイト毎に分割してデータ領域に格納する。例えば、通信フレームのデータ本体が8バイトならば、図7のデータ領域のmは7となり、データ領域の0から7に1バイトずつ格納される。この場合フラグ領域は一つでもよい。つまり、フレームバッファはID毎に領域が確保される。
(3)受信した通信フレームを送信先の通信フレームの書式に変換してデータ領域に格納する。送信する通信フレームのID毎に一括して格納しても1バイトずつ分割して格納してもよい。
(4)通信フレームのID毎にフレームバッファを確保するのではなく、通信フレームの受信順に中継処理を行なうのに適した周知のFIFO(First-In,First-Out:先入れ・先出し方式)バッファ、あるいは通信フレームの受信順とは逆の順序で中継処理を行なうのに適した周知のLIFO(Last-In,First-Out:後入れ・先出し方式)バッファを用いてもよい。この場合、通信フレームのIDとデータの両方を格納する。
FIG. 7 shows an example of the frame buffer. Any of the following (1) to (4) may be used for the configuration of the frame buffer.
(1) The area number of the data area corresponds to the ID of the communication frame. That is, the contents of the data body whose communication frame ID is 0 are stored in DATA0, and the contents of the data body whose communication frame ID is n are all stored in DATAn.
(2) The received communication frame is divided into bytes, for example, and stored in the data area. For example, if the data body of the communication frame is 8 bytes, m in the data area in FIG. 7 is 7, and 1 byte is stored in 0 to 7 in the data area. In this case, there may be one flag area. That is, the frame buffer has an area for each ID.
(3) The received communication frame is converted into the format of the destination communication frame and stored in the data area. You may store collectively for every ID of the communication frame to transmit, or you may divide and store 1 byte at a time.
(4) A well-known FIFO (First-In, First-Out) buffer suitable for performing relay processing in the order of reception of communication frames, instead of securing a frame buffer for each communication frame ID. Alternatively, a well-known LIFO (Last-In, First-Out) buffer suitable for performing relay processing in the reverse order of the communication frame reception order may be used. In this case, both the ID and data of the communication frame are stored.

受信した通信フレームをフレームバッファに格納したら、該当するフラグ領域の内容を受信データ有すなわち送信要求有を示す1とするとともに、受信フレームカウンタをインクリメントする(S14)。そして、バッファ16b,17bあるいはバッファ12aに蓄積されている全ての通信フレームを取り出したら(S15:No)、送信可能な通信フレーム数を算出する(S16)。   When the received communication frame is stored in the frame buffer, the content of the corresponding flag area is set to 1 indicating the presence of reception data, that is, the presence of a transmission request, and the reception frame counter is incremented (S14). When all the communication frames stored in the buffers 16b and 17b or the buffer 12a are extracted (S15: No), the number of communication frames that can be transmitted is calculated (S16).

なお、受信した通信フレームを全てフレームバッファに格納したかどうかの判定は、バッファ16b,17bあるいはバッファ12aに内に蓄積されている全ての通信フレームを取り込んだ場合、すなわち上述の通信フレーム受信フラグが全てクリアされた状態であれば、受信した通信フレームを全てフレームバッファに格納したと判定する。なお、フレームバッファに格納時にバッファ16b,17bあるいはバッファ12aの内容をゼロクリアする場合は、バッファ16b,17bあるいはバッファ12aの内容が全てゼロクリアされた状態であれば通信フレームを全てフレームバッファに格納したと判定してもよい。   Whether or not all received communication frames are stored in the frame buffer is determined when all the communication frames stored in the buffers 16b and 17b or the buffer 12a are fetched, that is, the above-described communication frame reception flag is set. If all are cleared, it is determined that all received communication frames are stored in the frame buffer. When the contents of the buffers 16b, 17b or the buffer 12a are cleared to zero when stored in the frame buffer, all the communication frames are stored in the frame buffer as long as the contents of the buffers 16b, 17b or the buffer 12a are all cleared to zero. You may judge.

受信した通信フレーム数と送信可能な通信フレーム数には所定の関係があり、ROM14,RAM12あるいはフラッシュメモリ13に図10のようなマップデータとして記憶されている。通信フレームの1フレームあたりの受信処理時間はMPU11および通信I/F16,17等の周辺回路の性能によって予め求めることができる。その通信フレームの1フレームあたりの受信処理時間に受信した通信フレーム数を乗じたものが実受信処理時間とすることができる。よって、通信フレームの送信処理が可能な時間は、図4のように0.5msecのような所定制約時間から実受信処理時間を減じたものとなる。ここで、1フレームあたりの送信処理時間もMPU11の性能によって予め求めることができるので、通信フレームの送信処理可能時間を通信フレームの送信可能個数に置き換えることができる。また、受信した通信フレーム数と送信可能な通信フレーム数をマップデータとして記憶することで、演算処理時間を短縮することが可能となる。よって、マップデータを参照して受信した通信フレーム数から送信可能な通信フレーム数を求めることができる。   There is a predetermined relationship between the number of received communication frames and the number of communication frames that can be transmitted, and is stored in the ROM 14, RAM 12, or flash memory 13 as map data as shown in FIG. The reception processing time per frame of the communication frame can be obtained in advance by the performance of peripheral circuits such as the MPU 11 and the communication I / Fs 16 and 17. The actual reception processing time can be obtained by multiplying the reception processing time per frame of the communication frame by the number of received communication frames. Therefore, the time during which the communication frame can be transmitted is obtained by subtracting the actual reception processing time from a predetermined constraint time such as 0.5 msec as shown in FIG. Here, since the transmission processing time per frame can also be obtained in advance by the performance of the MPU 11, the transmission processing time of the communication frame can be replaced with the number of communication frames that can be transmitted. In addition, by storing the number of received communication frames and the number of communication frames that can be transmitted as map data, it is possible to shorten the calculation processing time. Therefore, the number of communication frames that can be transmitted can be obtained from the number of communication frames received with reference to the map data.

図9に、図3のステップS4で示される通信フレーム送信処理の詳細を説明するフロー図を示す。ポインタの内容が示すフレームバッファのフラグ領域すなわち送信要求フラグを参照し、送信要求があるかどうかを調べる。フラグ領域の内容が1で送信要求がある場合(S21:Yes)、当該データ領域に記憶されている通信フレームを送信する(S22)。そして、フラグ領域の内容をゼロクリアして(S23)、送信可能フレーム数をデクリメントする(S24)。   FIG. 9 is a flowchart for explaining details of the communication frame transmission process shown in step S4 of FIG. It is checked whether there is a transmission request by referring to the flag area of the frame buffer indicated by the pointer content, that is, the transmission request flag. When the content of the flag area is 1 and there is a transmission request (S21: Yes), the communication frame stored in the data area is transmitted (S22). Then, the contents of the flag area are cleared to zero (S23), and the number of transmittable frames is decremented (S24).

次いで、ポインタの内容をインクリメントして次のフレームバッファの位置とし(S25)、送信可能フレーム数がゼロなるまで、ステップS21〜S25までの処理を繰り返す。一方、送信要求がない場合(S21:No)は、ポインタの内容をインクリメントして次のフレームバッファの送信要求の有無を調べる(S25→S21)。   Next, the contents of the pointer are incremented to the position of the next frame buffer (S25), and the processes from step S21 to S25 are repeated until the number of transmittable frames becomes zero. On the other hand, if there is no transmission request (S21: No), the contents of the pointer are incremented to check whether there is a transmission request for the next frame buffer (S25 → S21).

ポインタは、フレームバッファに格納されるデータIDの示すデータ本体あるいは個別のデータのうちで、送信待ちのフレームバッファの位置すなわちアドレスを示している。ポインタの初期値はフレームバッファの先頭アドレスで、ポインタの内容がフレームバッファの末尾アドレスのときにインクリメントされる場合はフレームバッファの先頭アドレスに戻る。   The pointer indicates the position of the frame buffer waiting for transmission, that is, the address, of the data body or individual data indicated by the data ID stored in the frame buffer. The initial value of the pointer is the start address of the frame buffer. If the pointer is incremented when the content of the pointer is the end address of the frame buffer, the pointer returns to the start address of the frame buffer.

フレームバッファとしてFIFOあるいはLIFOを用いる場合は、ポインタが示すフレームバッファに送信要求がないときは、以降のフレームバッファにデータが格納されていないので、ポインタの内容をフレームバッファの先頭アドレスに戻してもよい。   When a FIFO or LIFO is used as the frame buffer, if there is no transmission request in the frame buffer indicated by the pointer, no data is stored in the subsequent frame buffer, so even if the pointer contents are returned to the start address of the frame buffer. Good.

送信要求の有無を判別する方法として、上述のポインタを用いる方法の他に、以下に説明する送信キューを用いてもよい。通信フレームをフレームバッファに格納する際、受信データ有すなわち送信要求有のフラグをセットする代わりに、そのIDによって示されるフレームバッファの位置(1,2,・・・,n,・・・m)情報を、RAM12に領域が確保されるFIFO方式の送信キューに格納するとともに、送信キューカウンタをインクリメントする。送信キューカウンタの最大値はmである。例えば、送信キューカウンタ値が1の場合は、既に送信キューが1個格納されているので、送信キューの2番目の領域にフレームバッファの位置情報が格納され、送信キューカウンタ値は2に更新される。   As a method for determining the presence or absence of a transmission request, a transmission queue described below may be used in addition to the method using the pointer described above. When a communication frame is stored in the frame buffer, instead of setting a flag indicating that there is reception data, that is, a transmission request, the position of the frame buffer indicated by the ID (1, 2,..., N,... M) The information is stored in a FIFO transmission queue whose area is secured in the RAM 12, and the transmission queue counter is incremented. The maximum value of the transmission queue counter is m. For example, when the transmission queue counter value is 1, since one transmission queue is already stored, the position information of the frame buffer is stored in the second area of the transmission queue, and the transmission queue counter value is updated to 2. The

通信フレーム送信処理の際には、まず送信キューカウンタの値を参照し、値がゼロでなければ送信キュー領域の先頭の内容を参照し、格納されているフレームバッファの位置情報に基づいて通信フレームを送信する。そして、送信キューカウンタをデクリメントし、送信キューの内容を送信キュー領域の先頭方向へ1個分シフトする。例えば、送信キューカウンタ値が3すなわち送信キューが3個ある場合は、送信キューの1番目の領域の内容に対応する通信フレームを送信した後、送信キューカウンタ値を2とし、送信キューの2番目の領域の内容を送信キューの1番目の領域に移動し、送信キューの3番目の領域の内容を送信キューの2番目の領域に移動する。このとき、送信キューの3番目の領域をゼロクリアしてもよい。送信キューを用いると、フレームバッファ全体について送信要求の有無を調べる必要がなく、フレーム送信を効率よく行なうことが可能となる。   At the time of communication frame transmission processing, the value of the transmission queue counter is first referred to. If the value is not zero, the content at the head of the transmission queue area is referred to, and the communication frame is determined based on the stored position information of the frame buffer. Send. Then, the transmission queue counter is decremented, and the content of the transmission queue is shifted by one in the head direction of the transmission queue area. For example, if the transmission queue counter value is 3, that is, if there are three transmission queues, after transmitting a communication frame corresponding to the contents of the first area of the transmission queue, the transmission queue counter value is set to 2, and the second transmission queue counter value Is moved to the first area of the transmission queue, and the content of the third area of the transmission queue is moved to the second area of the transmission queue. At this time, the third area of the transmission queue may be cleared to zero. When the transmission queue is used, it is not necessary to check whether or not there is a transmission request for the entire frame buffer, and frame transmission can be performed efficiently.

また、送信キューとして静的に1番目,2番目といった上記のような送信順FIFOのデータ構造ではなく、周知のリングバッファ構造やリスト構造を用いてもよい。この場合、次に送信すべきフレームバッファの位置情報が格納される送信キューの位置の情報を、送信キューとは別領域に確保されるポインタとして持つ。そして、送信キューカウンタがゼロでない、すなわち未中継の通信フレームがある場合には、そのポインタに対応する送信キューに格納されたフレームバッファの位置情報に基づいて通信フレームを送信した後、ポインタを更新する。この際、リングバッファ構成であればポインタをインクリメントして次のる送信キューの位置とする。なお、ポインタ値が送信キューすなわちリングバッファの末尾まで達したら、先頭のバッファ位置にセットする。リスト構造であればポインタ値はそのデータ構造内で次の送信キューが含まれるリスト位置となる。いずれの構造であっても、フェールセーフとして、送信キューがない場合には、ポインタをバッファあるいはリストの先頭位置である初期値にすることもある。   In addition, a known ring buffer structure or list structure may be used instead of the data structure of the transmission order FIFO such as the first and second statically as the transmission queue. In this case, the position information of the transmission queue in which the position information of the frame buffer to be transmitted next is stored as a pointer secured in a separate area from the transmission queue. If the transmission queue counter is not zero, that is, there is an unrelayed communication frame, the communication frame is transmitted based on the position information of the frame buffer stored in the transmission queue corresponding to the pointer, and then the pointer is updated. To do. At this time, if the ring buffer configuration is used, the pointer is incremented to the position of the next transmission queue. When the pointer value reaches the end of the transmission queue, that is, the ring buffer, it is set at the top buffer position. In the case of a list structure, the pointer value is a list position including the next transmission queue in the data structure. In any structure, as a fail safe, when there is no transmission queue, the pointer may be set to an initial value which is the head position of the buffer or the list.

送信要求のないフレームバッファが連続すると、送信要求の有無の判定のみで通信フレーム送信処理の時間の限度を超えてしまうことがある。この場合は、MPU11の性能からステップS21:No→S25→S26までの送信要求なし時の処理時間を予め求めることができ、例えば「送信要求なし時の処理時間×3=送信要求あり時の処理時間」というような関係を定義できるので、ステップS21:NoとS25との間に、以下のような処理を追加すればよい。
(1)送信要求なし発生カウンタをインクリメント。
(2)送信要求なし発生カウンタが例えば3のような所定値となった場合は、送信可能フレーム数をデクリメントして、送信要求なし発生カウンタをゼロクリア。
If frame buffers without transmission requests continue, the time limit of communication frame transmission processing may be exceeded only by determining whether there is a transmission request. In this case, the processing time when there is no transmission request from step S21: No → S25 → S26 can be obtained in advance from the performance of the MPU 11, for example, “processing time when there is no transmission request × 3 = processing when there is a transmission request” Since a relationship such as “time” can be defined, the following processing may be added between step S21: No and S25.
(1) Increment the no transmission request occurrence counter.
(2) When the transmission request absence occurrence counter reaches a predetermined value such as 3, for example, the number of transmittable frames is decremented and the transmission request no occurrence counter is cleared to zero.

ROM14,RAM12あるいはフラッシュメモリ13に通信フレームの1フレームあたりの受信処理時間を予め記憶しておき、全通信フレームを受信した後に受信フレームカウンタと1フレームあたりの受信処理時間との積を実受信処理時間とし、所定制約時間の0.5msecから実受信処理時間を差し引いたものを送信処理可能時間としてもよい。そして、通信フレーム送信処理において、通信フレームを1個送る毎に、送信処理可能時間から1フレームあたりの送信処理時間を減じ、減じた値が1フレームあたりの送信処理時間の値よりも大きい場合は次の通信フレームを送信する。   The ROM 14, RAM 12 or flash memory 13 stores in advance the reception processing time per frame of communication frames, and after receiving all communication frames, the product of the reception frame counter and the reception processing time per frame is the actual reception processing. The transmission processing time may be a time obtained by subtracting the actual reception processing time from the predetermined constraint time of 0.5 msec. In the communication frame transmission process, every time one communication frame is sent, the transmission processing time per frame is subtracted from the transmission processable time, and the reduced value is larger than the value of the transmission processing time per frame. Send the next communication frame.

また、実受信処理時間と送信処理可能時間の関係をマップデータとして記憶し、上記のように算出した実受信処理時間を基にマップデータから送信処理可能時間を求めてもよい。   Further, the relationship between the actual reception processing time and the transmission processing available time may be stored as map data, and the transmission processing available time may be obtained from the map data based on the actual reception processing time calculated as described above.

また、MPU11にはMPU11内部の基準時間を生成するためのフリーランカウンタが内蔵されているので、通信フレームの受信処理終了時(S16)のフリーランカウンタ値から通信フレームの受信処理開始時(S11)のフリーランカウンタ値を差し引いたものを、実受信処理時間としてもよい。そして、所定制約時間の0.5msecから実受信処理時間を差し引いたものを送信処理可能時間としてもよい。そして、通信フレーム送信処理において、通信フレームを送信したときのフリーランカウンタ値から、通信フレーム送信処理開始時のフリーランカウンタ値を差し引いた値が、1フレームあたりの送信処理時間に相当するフリーランカウンタ値よりも大きい場合は次の通信フレームの送信を行なう。   In addition, since the MPU 11 has a built-in free run counter for generating a reference time inside the MPU 11, the communication frame reception process starts from the free run counter value at the end of the communication frame reception process (S16) (S11). ) Minus the free-run counter value may be used as the actual reception processing time. Then, the transmission processable time may be obtained by subtracting the actual reception processing time from the predetermined constraint time of 0.5 msec. In the communication frame transmission process, a value obtained by subtracting the free run counter value at the start of the communication frame transmission process from the free run counter value at the time of transmitting the communication frame is a free run corresponding to the transmission processing time per frame. If it is larger than the counter value, the next communication frame is transmitted.

以上、本発明の実施の形態を説明したが、これらはあくまで例示にすぎず、本発明はこれらに限定されるものではなく、特許請求の範囲の趣旨を逸脱しない限りにおいて、当業者の知識に基づく種々の変更が可能である。   Although the embodiments of the present invention have been described above, these are merely examples, and the present invention is not limited to these embodiments, and the knowledge of those skilled in the art can be used without departing from the spirit of the claims. Various modifications based on this are possible.

ゲートウェイ装置および周辺ネットワークの構成を示すブロック図。The block diagram which shows the structure of a gateway apparatus and a periphery network. ゲートウェイ装置の構成を示すブロック図。The block diagram which shows the structure of a gateway apparatus. メイン処理の概略を説明するフロー図。The flowchart explaining the outline of a main process. 本発明による通信フレーム受信処理と通信フレーム送信処理の時間配分を示す図。The figure which shows the time distribution of the communication frame reception process and communication frame transmission process by this invention. 従来技術によるによる通信フレーム受信処理と通信フレーム送信処理の時間配分を示す図。The figure which shows the time distribution of the communication frame reception process by the prior art, and a communication frame transmission process. 通信フレームのデータ構成の一例を示す図。The figure which shows an example of the data structure of a communication frame. フレームバッファの構成の一例を示す図。The figure which shows an example of a structure of a frame buffer. 通信フレーム受信処理を説明するフロー図。The flowchart explaining a communication frame reception process. 通信フレーム送信処理を説明するフロー図。The flowchart explaining a communication frame transmission process. マップデータの構成の一例を示す図。The figure which shows an example of a structure of map data.

符号の説明Explanation of symbols

10 ゲートウェイ装置
11 MPU(受信処理時間計測手段,送信処理可能時間算出手段)
12 RAM
13 フラッシュメモリ
14 ROM
16 第1通信I/F(受信手段)
17 第2通信I/F(受信手段)
10 gateway device 11 MPU (reception processing time measuring means, transmission processing possible time calculating means)
12 RAM
13 Flash memory 14 ROM
16 1st communication I / F (reception means)
17 Second communication I / F (receiving means)

Claims (7)

複数の制御ユニットが通信線により接続されたネットワークが複数形成され、前記複数のネットワーク間を接続して通信フレームの受信処理および送信処理を行なうゲートウェイ装置において、
前記通信フレームを受信して通信フレームバッファに格納する受信手段と、
前記受信手段による前記通信フレームの受信および格納の実受信処理時間を計測する実受信処理時間計測手段と、
前記実受信処理時間に基づいて前記送信処理が実行可能である送信処理可能時間を算出する送信処理可能時間算出手段と、
を備えることを特徴とするゲートウェイ装置。
In a gateway apparatus in which a plurality of networks in which a plurality of control units are connected by communication lines are formed, and the plurality of networks are connected to perform communication frame reception processing and transmission processing.
Receiving means for receiving the communication frame and storing it in a communication frame buffer;
Actual reception processing time measuring means for measuring the actual reception processing time of receiving and storing the communication frame by the receiving means;
A transmission processable time calculating means for calculating a transmission processable time during which the transmission process can be executed based on the actual reception processing time;
A gateway device comprising:
前記受信処理および前記送信処理は所定の周期で繰り返し実行される請求項1に記載のゲートウェイ装置。   The gateway apparatus according to claim 1, wherein the reception process and the transmission process are repeatedly executed at a predetermined cycle. 前記受信処理および前記送信処理は所定制約時間内で行なわれる請求項1または2に記載のゲートウェイ装置。   The gateway apparatus according to claim 1, wherein the reception process and the transmission process are performed within a predetermined restriction time. 前記実受信処理時間計測手段は、前記通信フレームの1フレームあたりの受信および格納の処理時間を基に前記実受信処理時間を算出する請求項1ないし3のいずれか1項に記載のゲートウェイ装置。   4. The gateway device according to claim 1, wherein the actual reception processing time measurement unit calculates the actual reception processing time based on reception and storage processing times per frame of the communication frame. 5. 前記送信処理可能時間算出手段は前記所定制約時間から前記実受信処理時間を差し引いたものを前記送信処理可能時間とする請求項1ないし4のいずれか1項に記載のゲートウェイ装置。   5. The gateway device according to claim 1, wherein the transmission processable time calculating unit sets the transmission processable time as a value obtained by subtracting the actual reception processing time from the predetermined constraint time. 6. 前記実受信処理時間と前記送信処理可能時間との関係を定義したマップデータを有し、
前記送信処理可能時間算出手段は前記マップデータから前記送信処理可能時間を算出する請求項1ないし4のいずれか1項に記載のゲートウェイ装置。
Having map data defining a relationship between the actual reception processing time and the transmission processable time;
The gateway apparatus according to claim 1, wherein the transmission processable time calculating unit calculates the transmission processable time from the map data.
前記マップデータは前記受信した通信フレーム数と送信可能な通信フレーム数との関係が定義される請求項6に記載のゲートウェイ装置。
The gateway apparatus according to claim 6, wherein the map data defines a relationship between the number of received communication frames and the number of communication frames that can be transmitted.
JP2005141321A 2005-05-13 2005-05-13 Gateway device Expired - Fee Related JP4457407B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005141321A JP4457407B2 (en) 2005-05-13 2005-05-13 Gateway device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005141321A JP4457407B2 (en) 2005-05-13 2005-05-13 Gateway device

Publications (2)

Publication Number Publication Date
JP2006319759A true JP2006319759A (en) 2006-11-24
JP4457407B2 JP4457407B2 (en) 2010-04-28

Family

ID=37540004

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005141321A Expired - Fee Related JP4457407B2 (en) 2005-05-13 2005-05-13 Gateway device

Country Status (1)

Country Link
JP (1) JP4457407B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017072869A (en) * 2015-10-05 2017-04-13 株式会社コンテック Communication terminal and communication resource distribution optimization method
KR20180066372A (en) * 2016-12-08 2018-06-19 현대오트론 주식회사 Method for transmitting and receiving periodic message of gateway device for vehicle
KR101956604B1 (en) * 2017-12-08 2019-03-11 현대오트론 주식회사 Dynamic routing apparatus for can message of vehicle and method thereof
JP7480675B2 (en) 2020-10-29 2024-05-10 株式会社デンソー Repeater

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017072869A (en) * 2015-10-05 2017-04-13 株式会社コンテック Communication terminal and communication resource distribution optimization method
KR20180066372A (en) * 2016-12-08 2018-06-19 현대오트론 주식회사 Method for transmitting and receiving periodic message of gateway device for vehicle
KR101907438B1 (en) * 2016-12-08 2018-10-15 현대오트론 주식회사 Method for transmitting and receiving periodic message of gateway device for vehicle
KR101956604B1 (en) * 2017-12-08 2019-03-11 현대오트론 주식회사 Dynamic routing apparatus for can message of vehicle and method thereof
US11115321B2 (en) 2017-12-08 2021-09-07 Hyundai Autron Co., Ltd. Dynamic routing apparatus and method for can message of vehicle
JP7480675B2 (en) 2020-10-29 2024-05-10 株式会社デンソー Repeater

Also Published As

Publication number Publication date
JP4457407B2 (en) 2010-04-28

Similar Documents

Publication Publication Date Title
JP5255579B2 (en) In-car data relay device, vehicle control system
US7801173B2 (en) Communication message conversion apparatus and communication message conversion method
JP4926648B2 (en) In-vehicle gateway device
JP6500875B2 (en) In-vehicle network system and communication control method in in-vehicle network system
JP4410661B2 (en) Distributed control system
US7826479B2 (en) Communication message conversion device, communication method and communication system
US7907623B2 (en) Gateway for automatically routing messages between buses
JP2008227798A (en) On-vehicle gateway device and data transfer method
JP5987810B2 (en) In-vehicle diagnostic system
JP4457407B2 (en) Gateway device
EP3996337A1 (en) Service data transmission method and device
JP2006340099A (en) Gateway unit
US20040162653A1 (en) Electrical control unit and control system comprising plural electrical control units
JP5233360B2 (en) MEMORY CONTROL DEVICE, MEMORY CONTROL DEVICE CONTROL METHOD, AND INFORMATION PROCESSING DEVICE
KR20110035247A (en) Method for id transformation in can-based network
US7283553B2 (en) Data relay device and multiplex communication system
JP2009089286A (en) Relay connection unit
JP2007295081A (en) Electronic control unit and method of setting frame priority
JP5521741B2 (en) Gateway device
EP4040735A1 (en) Vehicle control device and data transfer control method
JP2010103648A (en) Gateway device and gateway method
JP4372110B2 (en) Data transfer circuit, multiprocessor system using the same, and data transfer method
JP2009017154A (en) On-vehicle gateway device
JP2000047977A (en) Bidirectional bus control system
JP2008131481A (en) Data relay apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070702

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090918

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091019

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091214

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20100118

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100131

R151 Written notification of patent or utility model registration

Ref document number: 4457407

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130219

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140219

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees