JP7122871B2 - VEHICLE GATEWAY DEVICE, METHOD AND PROGRAM - Google Patents

VEHICLE GATEWAY DEVICE, METHOD AND PROGRAM Download PDF

Info

Publication number
JP7122871B2
JP7122871B2 JP2018107324A JP2018107324A JP7122871B2 JP 7122871 B2 JP7122871 B2 JP 7122871B2 JP 2018107324 A JP2018107324 A JP 2018107324A JP 2018107324 A JP2018107324 A JP 2018107324A JP 7122871 B2 JP7122871 B2 JP 7122871B2
Authority
JP
Japan
Prior art keywords
message
processing
storage unit
messages
routing
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.)
Active
Application number
JP2018107324A
Other languages
Japanese (ja)
Other versions
JP2019213043A (en
Inventor
カミーユ ヴィオム
勇河 水梨
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.)
Bosch Corp
Original Assignee
Bosch 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 Bosch Corp filed Critical Bosch Corp
Priority to JP2018107324A priority Critical patent/JP7122871B2/en
Publication of JP2019213043A publication Critical patent/JP2019213043A/en
Application granted granted Critical
Publication of JP7122871B2 publication Critical patent/JP7122871B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、車載用ゲートウェイ装置、方法及びプログラムに関する。 The present invention relates to an in-vehicle gateway device, method and program.

近年、自動車には、電子制御ユニット(ECU:Electronic Control Unit)と呼ばれる装置が多数搭載されている。これらのECUは、ネットワークにより互いに接続され、メッセージを送受信する。異なるネットワークに属するECU間でメッセージを送受信するためには、ネットワーク同士を接続しメッセージを中継する中継装置(車載用ゲートウェイ装置、又は単にゲートウェイとも称される)が用いられる。近年の自動車の高機能化及び高性能化に伴い、ECUの数、ECU間で送受信されるメッセージ、及びゲートウェイにより中継されるメッセージの数は急増している。 In recent years, automobiles are equipped with a large number of devices called electronic control units (ECUs). These ECUs are connected to each other by a network to send and receive messages. In order to transmit and receive messages between ECUs belonging to different networks, a relay device (also referred to as an in-vehicle gateway device or simply a gateway) that connects networks and relays messages is used. 2. Description of the Related Art In recent years, the number of ECUs, the number of messages transmitted and received between ECUs, and the number of messages relayed by gateways have increased rapidly as automobiles have become more sophisticated and sophisticated.

ゲートウェイに関する技術は盛んに提案されている。例えば、特許文献1では、送信バッファと受信バッファとを備えるゲートウェイが、送信バッファにバッファされた未送信データを優先度順に送信する技術が開示されている。 Many technologies related to gateways have been proposed. For example, Patent Literature 1 discloses a technique in which a gateway having a transmission buffer and a reception buffer transmits unsent data buffered in the transmission buffer in order of priority.

特開2017-212728号公報Japanese Unexamined Patent Application Publication No. 2017-212728

ゲートウェイは、メッセージを受信すると、そのメッセージの送信先を決定するルーティング処理を行うと共に、どのメッセージをどの順序で送信するかを決定する。ゲートウェイは、これらの処理に計算リソースを割り当てて、メッセージの送信が完了するまでの間、当該メッセージを一時的に記憶する。既存のメッセージの処理が終了するよりも前に新たなメッセージが到来すると、バッファーオーバーランが発生し、新たに到来したメッセージが失われ得る。 Upon receiving a message, the gateway performs routing processing to determine the destination of the message and determines which messages to send and in what order. The gateway allocates computational resources to these operations and temporarily stores the message until its transmission is complete. If a new message arrives before an existing message has finished processing, a buffer overrun can occur and the newly arrived message can be lost.

民生用アプリケーションでは、メッセージの損失が許容される場合がある。例えば、インターネットのTCP/IPプロトコルでは、メッセージの再送信が行われることから、メッセージの損失は許容されている。一方で、車載システムのようなリアルタイムシステムでは、メッセージの損失は許容されない。再送信に伴う過度の遅延が許容されないためである。 Message loss may be acceptable in consumer applications. For example, the Internet's TCP/IP protocol tolerates message loss because of message retransmission. On the other hand, real-time systems, such as in-vehicle systems, cannot tolerate message loss. This is because excessive delay associated with retransmission is not allowed.

メッセージの損失を回避するための単純な解決策としては、ゲートウェイに十分に強力な計算機(例えば、CPU)を搭載することが考えられる。しかし、メッセージの数及びサイズが今後さらに増加し得ることを考慮すれば、単に強力な計算機を搭載する解決策は望ましいものとは言えない。 A simple solution to avoid message loss would be to equip the gateway with a sufficiently powerful computer (eg CPU). However, considering that the number and size of messages may increase further in the future, a solution that simply includes a powerful computer is not desirable.

その上、十分に強力な計算機が採用されて、メッセージの損失が回避されたとしても、メッセージの送信に遅延が生じるおそれが残る。なぜならば、ネットワークの負荷が高い状態においては、ゲートウェイは、メッセージの受信を送信よりも優先して、受信したメッセージを送信せずに蓄積し得るためである。メッセージの遅延は、車載システムのようなリアルタイム性が求められるシステムにおいては許容され難い。上記特許文献1では、未送信データが優先度順に送信されることが開示されている一方で、メッセージの損失を回避するための工夫は何ら開示されていなかった。 Moreover, even if sufficiently powerful computers were employed to avoid message loss, there would still be the possibility of delays in sending messages. This is because, under conditions of high network load, the gateway may prioritize receiving messages over sending and accumulate received messages without sending them. Message delay is not acceptable in a system such as an in-vehicle system that requires real-time performance. While the above Patent Document 1 discloses that unsent data is transmitted in order of priority, it does not disclose any device for avoiding message loss.

そこで、本発明は、上記問題に鑑みてなされたものであり、本発明の目的とするところは、到来したメッセージの損失回避と送信機会の確保とを両立することが可能な、新規かつ改良された車載用ゲートウェイ装置、方法及びプログラムを提供することにある。 SUMMARY OF THE INVENTION Accordingly, the present invention has been made in view of the above problems. It is another object of the present invention to provide an in-vehicle gateway device, method and program.

上記課題を解決するために、本発明のある観点によれば、N個のネットワークに接続され、異なるネットワーク間でメッセージを中継する車載用ゲートウェイ装置(100)であって、N個の前記ネットワークの各々から受信したメッセージのうちルーティング処理待ちのメッセージを記憶するN個の第1の記憶部(120)と、前記ルーティング処理後であって送信処理待ちのメッセージを示す情報を記憶する1つ以上の第2の記憶部(130)と、前記ルーティング処理待ちのメッセージ及び前記送信処理待ちのメッセージの中から1つのメッセージを処理対象として選択し、前記処理対象のメッセージの前記ルーティング処理又は前記送信処理に計算リソースを割り当てる制御部(150)と、を備える車載用ゲートウェイ装置(100)が提供される。 In order to solve the above problems, according to one aspect of the present invention, there is provided an in-vehicle gateway device (100) connected to N networks and relaying messages between different networks, comprising: N first storage units (120) for storing messages awaiting routing processing among messages received from each; a second storage unit (130), selecting one message as a processing object from the messages waiting for the routing processing and the messages waiting for the transmission processing, and executing the routing processing or the transmission processing of the message to be processed; and a controller (150) for allocating computational resources.

また、上記課題を解決するために、本発明の別の観点によれば、N個のネットワークに接続され、異なるネットワーク間でメッセージを中継する車載用ゲートウェイ装置(100)により実行される方法であって、N個の前記ネットワークの各々から受信したメッセージのうちルーティング処理待ちのメッセージをN個の第1の記憶部(120)に記憶するステップ(S104又はS306)と、前記ルーティング処理後であって送信処理待ちのメッセージを示す情報を1つ以上の第2の記憶部(130)に記憶するステップ(S212、S214、S412、又はS414)と、前記ルーティング処理待ちのメッセージ及び前記送信処理待ちのメッセージの中から1つのメッセージを処理対象として選択し、前記処理対象のメッセージの前記ルーティング処理又は前記送信処理に計算リソースを割り当てるステップ(S208、S218、S222、S408、S434又はS436、及びS212、S214、S224、S412、S414、又はS438)と、を含む方法が提供される。 In order to solve the above problems, according to another aspect of the present invention, there is provided a method executed by an in-vehicle gateway device (100) connected to N networks and relaying messages between different networks. a step (S104 or S306) of storing messages awaiting routing processing among messages received from each of the N networks in N first storage units (120); a step (S212, S214, S412, or S414) of storing information indicating messages awaiting transmission processing in one or more second storage units (130); and said messages awaiting routing processing and said messages awaiting transmission processing. A step of selecting one message from among the messages to be processed and allocating computational resources to the routing process or the transmission process of the message to be processed (S208, S218, S222, S408, S434 or S436, and S212, S214, S224, S412, S414, or S438).

また、上記課題を解決するために、本発明の別の観点によれば、N個のネットワークに接続され、異なるネットワーク間でメッセージを中継する車載用ゲートウェイ装置(100)を制御するコンピュータに、N個の前記ネットワークの各々から受信したメッセージのうちルーティング処理待ちのメッセージをN個の第1の記憶部(120)に記憶するステップ(S104又はS306)と、前記ルーティング処理後であって送信処理待ちのメッセージを示す情報を1つ以上の第2の記憶部(130)に記憶するステップ(S212、S214、S412、又はS414)と、前記ルーティング処理待ちのメッセージ及び前記送信処理待ちのメッセージの中から1つのメッセージを処理対象として選択し、前記処理対象のメッセージの前記ルーティング処理又は前記送信処理に計算リソースを割り当てるステップ(S208、S218、S222、S408、S434又はS436、及びS212、S214、S224、S412、S414、又はS438)と、を実行させるためのプログラムが提供される。 In order to solve the above problems, according to another aspect of the present invention, a computer that controls an in-vehicle gateway device (100) that is connected to N networks and relays messages between different networks includes N a step (S104 or S306) of storing messages awaiting routing processing among messages received from each of said networks in N first storage units (120); a step (S212, S214, S412, or S414) of storing in one or more second storage units (130) information indicating messages of; A step of selecting one message to be processed and allocating computational resources to the routing process or the transmission process of the message to be processed (S208, S218, S222, S408, S434 or S436, and S212, S214, S224, S412 , S414, or S438) are provided.

以上説明したように本発明によれば、到来したメッセージの損失回避と送信機会の確保とを両立することが可能な、新規かつ改良された車載用ゲートウェイ装置、方法及びプログラムが提供される。 As described above, according to the present invention, there is provided a new and improved in-vehicle gateway device, method, and program capable of both avoiding incoming message loss and securing transmission opportunities.

本発明の一実施形態に係るゲートウェイの構成の一例を示す図である。It is a figure which shows an example of a structure of the gateway based on one Embodiment of this invention. 第1の実施形態に係るゲートウェイによるメッセージの受信処理の一例を説明するための図である。FIG. 7 is a diagram for explaining an example of message reception processing by the gateway according to the first embodiment; 同実施形態に係るゲートウェイによるメッセージのルーティング処理の一例を説明するための図である。FIG. 4 is a diagram for explaining an example of message routing processing by a gateway according to the embodiment; 同実施形態に係るゲートウェイによるメッセージの送信処理の一例を説明するための図である。It is a figure for demonstrating an example of the transmission processing of the message by the gateway which concerns on the same embodiment. 同実施形態に係るゲートウェイにおいて実行される受信処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of the reception process performed in the gateway which concerns on the same embodiment. 同実施形態に係るゲートウェイにおいて実行される優先順位付け処理、ルーティング処理及び送信処理の流れの一例を示すフローチャートである4 is a flowchart showing an example of the flow of prioritization processing, routing processing, and transmission processing executed in the gateway according to the same embodiment; 第2の実施形態に係るゲートウェイによるメッセージの受信処理の一例を説明するための図である。FIG. 11 is a diagram for explaining an example of message reception processing by a gateway according to the second embodiment; 同実施形態に係るゲートウェイによるメッセージのルーティング処理の一例を説明するための図である。FIG. 4 is a diagram for explaining an example of message routing processing by a gateway according to the embodiment; 同実施形態に係るゲートウェイによるメッセージの送信処理の一例を説明するための図である。It is a figure for demonstrating an example of the transmission processing of the message by the gateway which concerns on the same embodiment. 同実施形態に係るゲートウェイにおいて実行される受信処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of the reception process performed in the gateway which concerns on the same embodiment. 同実施形態に係るゲートウェイにおいて実行される優先順位付け処理、ルーティング処理及び送信処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of a prioritization process, a routing process, and a transmission process which are performed in the gateway which concerns on the same embodiment. 同実施形態に係るゲートウェイにおいて実行される優先順位付け処理、ルーティング処理及び送信処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of a prioritization process, a routing process, and a transmission process which are performed in the gateway which concerns on the same embodiment. 比較例に係るゲートウェイの構成の一例を示す図である。FIG. 10 is a diagram illustrating an example of a configuration of a gateway according to a comparative example;

以下に添付図面を参照しながら、本発明の好適な実施の形態について詳細に説明する。なお、本明細書及び図面において、実質的に同一の機能構成を有する構成要素については、同一の符号を付することにより重複説明を省略する。 Preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings. In the present specification and drawings, constituent elements having substantially the same functional configuration are denoted by the same reference numerals, thereby omitting redundant description.

<<1.構成例>>
図1は、本発明の一実施形態に係るゲートウェイ100の構成の一例を示す図である。ゲートウェイ100は、複数のネットワークに接続され、異なるネットワーク間でメッセージを中継する車載用ゲートウェイ装置である。図1に示すように、ゲートウェイ100は、ネットワークインタフェース110、N個の第1の記憶部120(キュー#1~#N)、1つ以上の第2の記憶部130(キュー#N+1~#M)、第3の記憶部140及び制御部150を含む。
<<1. Configuration example >>
FIG. 1 is a diagram showing an example of the configuration of a gateway 100 according to one embodiment of the invention. The gateway 100 is an in-vehicle gateway device that is connected to multiple networks and relays messages between different networks. As shown in FIG. 1, the gateway 100 includes a network interface 110, N first storage units 120 (queues #1 to #N), and one or more second storage units 130 (queues #N+1 to #M). ), a third storage unit 140 and a control unit 150 .

(1)ネットワークインタフェース110
ネットワークインタフェース110は、ゲートウェイ100と他の装置との通信を仲介するインタフェースである。ネットワークインタフェース110は、CAN(Controller Area Network)又はCAN-FD(CAN with Flexible Data rate)等の任意の車載ネットワークに接続される。ネットワークインタフェース110は、複数のチャネルを有し、各々のチャネルは互いに異なるネットワークに接続される。図1に示した例では、ネットワークインタフェース110は、チャネル#1~#NのN個のチャネルを有する。なお、図1において「#」の後に付された数字は、インデックスである。即ち、ゲートウェイ100は、N個のネットワークに接続される。なお、Nは2以上の整数である。
(1) Network interface 110
The network interface 110 is an interface that mediates communication between the gateway 100 and other devices. The network interface 110 is connected to any in-vehicle network such as CAN (Controller Area Network) or CAN-FD (CAN with Flexible Data rate). Network interface 110 has a plurality of channels, each channel connected to a different network. In the example shown in FIG. 1, network interface 110 has N channels, channels #1 through #N. In addition, the number attached after "#" in FIG. 1 is an index. That is, the gateway 100 is connected to N networks. Note that N is an integer of 2 or more.

ネットワークインタフェース110は、N個のネットワークの各々から受信したメッセージを記憶するN個の受信バッファ111(111#1~111#N)(第4の記憶部に相当)を有する。受信バッファ111は、チャネル(例えば、CANチャネル)に1対1に対応付けられ、対応付けられたチャネルに到来したメッセージ(例えば、CANメッセージ)を記憶する。例えば、受信バッファ111#1は、チャネル#1に到来したメッセージを記憶する。 The network interface 110 has N receive buffers 111 (111#1 to 111#N) (corresponding to a fourth storage unit) that store messages received from each of the N networks. The reception buffer 111 is associated one-to-one with a channel (eg, CAN channel) and stores messages (eg, CAN message) that have arrived at the associated channel. For example, receive buffer 111#1 stores messages arriving on channel #1.

ネットワークインタフェース110は、N個のネットワークの各々に送信されるメッセージを記憶するN個の送信バッファ112#1~112#N(第5の記憶部に相当)を有する。送信バッファ112#1~112#Nを、送信バッファ112とも総称する。送信バッファ112は、チャネルに1対1に対応付けられ、対応付けられたチャネルから送信されるメッセージを記憶する。例えば、送信バッファ112#1は、チャネル#1から送信されるメッセージを記憶する。 The network interface 110 has N transmission buffers 112#1 to 112#N (corresponding to fifth storage units) for storing messages to be transmitted to each of the N networks. The transmission buffers 112#1 to 112#N are also collectively referred to as the transmission buffers 112. FIG. The transmission buffer 112 is associated with a channel on a one-to-one basis and stores messages transmitted from the associated channel. For example, transmission buffer 112#1 stores messages transmitted from channel #1.

(2)第1の記憶部120
N個の第1の記憶部120は、N個のネットワークの各々から受信したメッセージのうちルーティング処理待ちのメッセージを記憶する。ルーティング処理とは、受信したメッセージをルーティングテーブルに照合して送信先のネットワーク(即ち、チャネル)を決定する処理である。ルーティング処理は、メッセージのヘッダ及びペイロードに基づくセキュリティ関連のフィルタリング等の様々な処理をさらに含み得る。第1の記憶部120は、例えばキューとして実装され得る。第1の記憶部120を、以下ではルーティング処理待ちキュー120とも称する。図1では、キュー#1~#Nが、ルーティング処理待ちキュー120に相当する。
(2) First storage unit 120
The N first storage units 120 store messages awaiting routing processing among messages received from each of the N networks. The routing process is a process of checking a received message against a routing table to determine a destination network (that is, a channel). The routing process may further include various processes such as security-related filtering based on message headers and payloads. The first storage unit 120 can be implemented as a queue, for example. The first storage unit 120 is hereinafter also referred to as a routing queue 120 . In FIG. 1, queues #1 to #N correspond to the routing process waiting queue 120. FIG.

(3)第2の記憶部130
1つ以上の第2の記憶部130は、ルーティング処理後であって送信処理待ちのメッセージを示す情報を記憶する。送信処理とは、ルーティング処理後のメッセージを、決定された送信先のネットワークにメッセージを送信する処理を含む。第2の記憶部130は、例えばキューとして実装され得る。第2の記憶部130を、以下では送信処理待ちキュー130とも称する。図1では、キュー#N+1~#Mが、ルーティング処理待ちキュー120に相当する。なお、M≧N+1である。
(3) Second storage unit 130
One or more second storage units 130 store information indicating messages that have undergone routing processing and are waiting for transmission processing. The transmission process includes the process of transmitting the message after the routing process to the determined destination network. The second storage unit 130 can be implemented as a queue, for example. The second storage unit 130 is hereinafter also referred to as a transmission processing waiting queue 130 . In FIG. 1, queues #N+1 to #M correspond to the routing process waiting queue 120. FIG. Note that M≧N+1.

ここで、「送信処理待ちのメッセージを示す情報」とは、送信処理待ちのメッセージへのポインタ又は送信処理待ちのメッセージを記憶する記憶部(後述する第3の記憶部140)を示す情報であり、例えばポインタである。送信処理待ちキュー130は、送信処理待ちのメッセージそのものを記憶してもよい。 Here, "information indicating a message waiting for transmission processing" is information indicating a pointer to a message waiting for transmission processing or a storage unit (a third storage unit 140 described later) that stores a message waiting for transmission processing. , for example pointers. The transmission processing waiting queue 130 may store the messages themselves that are waiting for transmission processing.

(4)第3の記憶部140
第3の記憶部140は、ルーティング処理後であって送信処理待ちのメッセージを記憶する。第3の記憶部140は、メッセージを記憶するための任意のデータ構造により実現される。第3の記憶部140は、MPFO(Most Priority First Out)リスト141又はFIFO(First In First Out)リスト142の少なくともいずれかを含む。図1に示した例では、第3の記憶部140は、MPFOリスト141及びFIFOリスト142の双方を含む。MPFOリストとは、記憶されたメッセージのうち優先度が最も高いメッセージから順に取り出されるデータ構造である。FIFOリストとは、先に記憶されたメッセージから順に取り出されるデータ構造である。例えば、CANの制御メッセージは、MPFOリスト141に記憶されて優先度順に送信される。一方で、CANの診断メッセージは、FIFOリスト142に記憶されて先着順に送信される。
(4) Third storage unit 140
The third storage unit 140 stores messages that have undergone routing processing and are waiting for transmission processing. The third storage unit 140 is implemented by any data structure for storing messages. The third storage unit 140 includes at least one of an MPFO (Most Priority First Out) list 141 or a FIFO (First In First Out) list 142 . In the example shown in FIG. 1, the third storage unit 140 contains both the MPFO list 141 and the FIFO list 142. FIG. An MPFO list is a data structure in which stored messages are retrieved in order of highest priority. A FIFO list is a data structure in which previously stored messages are retrieved in order. For example, CAN control messages are stored in the MPFO list 141 and transmitted in order of priority. CAN diagnostic messages, on the other hand, are stored in a FIFO list 142 and sent on a first-come, first-served basis.

(5)制御部150
制御部150は、演算処理装置及び制御装置として機能し、各種プログラムに従ってゲートウェイ100の動作全般を制御する。制御部150は、CPU、マイクロプロセッサ、電気回路、DSP及び/又はASICにより実現される。
(5) Control unit 150
The control unit 150 functions as an arithmetic processing device and a control device, and controls the overall operation of the gateway 100 according to various programs. The control unit 150 is implemented by a CPU, microprocessor, electric circuit, DSP and/or ASIC.

制御部150は、ゲートウェイ100に到来したメッセージを受信し、転送するための各種処理を行う。詳しくは、制御部150は、受信処理、優先順位付け処理、ルーティング処理、及び送信処理を行う。制御部150は、計算リソース(例えば、CPUの処理時間)をこれらの処理に割り当てる。即ち、制御部150は、これらの処理の中から計算リソースを割り当てる処理を選択し、選択した処理を実行する。ルーティング処理及び送信処理に関しては、制御部150は、ルーティング処理待ちのメッセージ及び送信処理待ちのメッセージの中から1つのメッセージを処理対象として選択し、処理対象のメッセージのルーティング処理又は前記送信処理に計算リソースを割り当てる。処理対象のメッセージの選択は、優先順位付け処理の結果に従って行われる。 The control unit 150 receives messages arriving at the gateway 100 and performs various processes for forwarding the messages. Specifically, the control unit 150 performs reception processing, prioritization processing, routing processing, and transmission processing. The control unit 150 allocates computational resources (for example, CPU processing time) to these processes. That is, the control unit 150 selects a process for allocating computational resources from these processes, and executes the selected process. Regarding the routing process and the transmission process, the control unit 150 selects one message from among the messages waiting for the routing process and the messages waiting for the transmission process as a processing target, and calculates the routing process or the transmission process for the message to be processed. Allocate resources. The selection of messages for processing is made according to the results of the prioritization process.

以上、以下に説明する第1の実施形態及び第2の実施形態に共通するゲートウェイ100の構成の一例を説明した。 An example of the configuration of the gateway 100 common to the first embodiment and the second embodiment described below has been described above.

<<2.第1の実施形態>>
本実施形態では、優先順位付け処理にラウンドロビン方式が採用される。詳しくは、ゲートウェイ100は、ルーティング処理待ちキュー120及び送信処理待ちキュー130からラウンドロビン戦略により選択したキューに対応するメッセージを、処理対象として選択する。キューがラウンドロビン方式で順番に選択されて、計算リソースが割り当てられるので、ルーティング処理及び送信処理に公平に計算リソースが割り当てられることとなる。これにより、到来したメッセージの損失回避と送信機会の確保とを両立することが可能となる。
<<2. First Embodiment>>
In this embodiment, a round-robin method is adopted for the prioritization process. Specifically, the gateway 100 selects messages corresponding to queues selected by a round-robin strategy from the queue 120 waiting for routing processing and the queue 130 waiting for transmission processing, to be processed. Since the queues are selected in order in a round-robin fashion and allocated computational resources, routing and transmission processes are equally allocated computational resources. As a result, it is possible to achieve both avoidance of incoming message loss and securing transmission opportunities.

<2.1.各種処理>
以下、本実施形態に係るゲートウェイ100により実行される各種処理について詳細に説明する。本実施形態に係るゲートウェイ100の構成は、図1を参照して上記説明した通りである。以下では、N=6とし、M=8として説明する。この場合、ルーティング処理及び送信処理に使用可能な計算リソースの25%((M-N)/M)が送信処理のために割り当てられ、残りの75%(N/M))がルーティング処理に割り当てられる。
<2.1. Various processing>
Various processes executed by the gateway 100 according to this embodiment will be described in detail below. The configuration of the gateway 100 according to this embodiment is as described above with reference to FIG. In the following description, it is assumed that N=6 and M=8. In this case, 25% ((M−N)/M) of the computational resources available for routing and transmission processing are allocated for transmission processing, and the remaining 75% (N/M)) is allocated for routing processing. be done.

(1)受信処理
受信処理とは、受信バッファ111に記憶されたメッセージをルーティング処理待ちキュー120に移動させる処理である。なお、メッセージの移動とは、移動先へのメッセージのコピー及び移動元からのメッセージの削除を含む概念である。制御部150は、受信処理に、優先順位付け処理、ルーティング処理及び送信処理に優先して計算リソースを割り当てる。これにより、到来したメッセージの損失を極力回避することが可能となる。
(1) Reception Processing Reception processing is processing for moving messages stored in the reception buffer 111 to the routing processing waiting queue 120 . Note that moving a message is a concept that includes copying a message to the destination and deleting the message from the source. The control unit 150 allocates computational resources to the reception process prior to the prioritization process, the routing process, and the transmission process. This makes it possible to avoid loss of incoming messages as much as possible.

ネットワークからメッセージが到来してネットワークインタフェース110の受信バッファ111に記憶されると、割り込みがトリガされる。割り込みは、受信したメッセージを、メッセージが到来したチャネルに対応するルーティング処理待ちキュー120の最後尾に移動させる。以下、図2を参照して、受信処理の一例を説明する。 When a message arrives from the network and is stored in receive buffer 111 of network interface 110, an interrupt is triggered. The interrupt moves the received message to the end of the routing queue 120 corresponding to the channel through which the message arrived. An example of the reception process will be described below with reference to FIG.

図2は、本実施形態に係るゲートウェイ100によるメッセージの受信処理の一例を説明するための図である。図2では、ゲートウェイ100内のデータ構造及びデータの流れについて図示されている。なお、キュー#1~#6はルーティング処理待ちキュー120であり、キュー#7及び#8は送信処理待ちキュー130である。キュー#1にはメッセージ10-1が記憶され、キュー#2にはメッセージ10-2が記憶され、キュー#6にはメッセージ10-3が記憶されている。また、MPFOリスト141にはメッセージ10-4が記憶され、FIFOリスト142にはメッセージ10-5が記憶されている。 FIG. 2 is a diagram for explaining an example of message reception processing by the gateway 100 according to this embodiment. FIG. 2 illustrates the data structure and data flow within gateway 100 . Queues #1 to #6 are queues 120 waiting for routing processing, and queues #7 and #8 are queues 130 waiting for transmission processing. Queue #1 stores message 10-1, queue #2 stores message 10-2, and queue #6 stores message 10-3. Also, the MPFO list 141 stores the message 10-4, and the FIFO list 142 stores the message 10-5.

図2に示した例では、チャネル#1に到来したメッセージ10-6がチャネル#1の受信バッファ111#1に記憶される。その後、メッセージ10-6は、キュー#1の最後に移動されて、チャネル#1の受信バッファ111#1から削除される。 In the example shown in FIG. 2, message 10-6 arriving on channel #1 is stored in receive buffer 111#1 of channel #1. Message 10-6 is then moved to the end of queue #1 and deleted from receive buffer 111#1 of channel #1.

なお、各キュー及びリストにおいて、下方に記載されたメッセージほど出力順が早く、再下端のメッセージは先頭のメッセージである。例えば、キュー#1の先頭はメッセージ10-1であり、2番目がメッセージ10―6である。 In each queue and list, the lower the message is, the earlier the message is output, and the message at the bottom is the first message. For example, the head of queue #1 is message 10-1 and the second is message 10-6.

(2)優先順位付け処理
優先順位付け処理とは、処理対象のキューを選択することである。詳しくは、制御部150は、ルーティング処理待ちキュー120及び送信処理待ちキュー130からひとつのキューを処理対象のキューとして選択する。優先順位付け処理において選択されたキューに対応する処理が、その後行われる。即ち、選択されたキューがルーティング処理待ちキュー120であれば、ルーティング処理が行われ、選択されたキューが送信処理待ちキュー130であれば、送信処理が行われる。
(2) Prioritization process Prioritization process is to select a queue to be processed. Specifically, the control unit 150 selects one queue from the routing processing waiting queue 120 and the transmission processing waiting queue 130 as a queue to be processed. Processing corresponding to the queue selected in the prioritization process is then performed. That is, if the selected queue is the routing process waiting queue 120, the routing process is performed, and if the selected queue is the transmission process waiting queue 130, the transmission process is performed.

本実施形態では、優先順位付け処理は、ラウンドロビン方式に従って行われる。詳しくは、制御部150は、空でないルーティング処理待ちキュー120及び送信処理待ちキュー130からラウンドロビン方式で1つのキューを処理対象のキューとして選択する。即ち、空でないキューが順番に処理対象のキューとして選択される。ここで、空でないキューとは、メッセージを1つ以上記憶しているルーティング処理待ちキュー120、及びMPFOリスト141又はFIFOリスト142にメッセージが記憶されている場合の送信処理待ちキュー130である。MPFOリスト141又はFIFOリスト142が空でない場合、送信処理待ちキュー130は、MPFOリスト141又はFIFOリスト142に記憶されたメッセージへのポインタを記憶していてもよい。そして、ポインタの有無により、送信処理待ちキュー130が空であるか否かが判定されてもよい。以下では、空でないキューを、アクティブなキューとも称する。図2に示した例において、キュー#5が前回選択された場合、次回はキュー#6が選択される。 In this embodiment, the prioritization process is performed according to a round-robin scheme. Specifically, the control unit 150 selects one queue from the non-empty routing processing waiting queue 120 and transmission processing waiting queue 130 as a processing target queue in a round-robin manner. That is, non-empty queues are selected in order as queues to be processed. Here, non-empty queues are the routing processing waiting queue 120 storing one or more messages, and the transmission processing waiting queue 130 when messages are stored in the MPFO list 141 or FIFO list 142 . If MPFO list 141 or FIFO list 142 is not empty, transmission queue 130 may store pointers to messages stored in MPFO list 141 or FIFO list 142 . Then, whether or not the transmission processing waiting queue 130 is empty may be determined based on the presence or absence of the pointer. In the following, non-empty queues are also referred to as active queues. In the example shown in FIG. 2, if queue #5 was selected last time, queue #6 is selected next time.

ラウンドロビン方式でアクティブなキューが順番に処理対象のキューとして選択されることにより、ルーティング処理又は送信処理の一方に過度の計算リソースが割り当てられることが防止される。従って、ルーティング処理及び送信処理に公平に計算リソースを分配することが可能となる。N及びMは任意に設定可能である。N及びMのバランスにより、ルーティング処理と送信処理とに分配される計算リソースのバランスが決定される。 The active queues are selected for processing in a round-robin fashion in order to prevent excessive computational resources being allocated to either the routing or transmission processing. Therefore, it is possible to fairly distribute computational resources to routing processing and transmission processing. N and M can be set arbitrarily. The balance of N and M determines the balance of computing resources distributed between routing and transmission processing.

なお、このような優先順位付け処理に関する技術として、参考文献[2]に、ラウンドロビン方式で選択したキューからパケットを取り出して送信するパケットスイッチが開示されている。ただし、本文献での分配対象は、チャネルの帯域幅であり、本発明のように計算リソースではない。 As a technique related to such prioritization processing, Reference [2] discloses a packet switch that extracts packets from queues selected by a round-robin method and transmits the packets. However, the object of distribution in this document is channel bandwidth, not computational resources as in the present invention.

(3)ルーティング処理
制御部150は、優先順位付け処理により選択された処理対象のキューに対応するメッセージを処理対象のメッセージとして選択する。詳しくは、制御部150は、優先順位付け処理により選択された処理対象のキューがルーティング処理待ちキュー120である場合、選択されたルーティング処理待ちキュー120の先頭の(即ち、最も先に記憶された)メッセージを、処理対象のメッセージとして選択する。そして、制御部150は、処理対象のメッセージのルーティング処理に計算リソースを割り当てる。
(3) Routing Processing The control unit 150 selects the message corresponding to the processing target queue selected by the prioritization processing as the processing target message. More specifically, when the queue to be processed selected by the prioritization process is the routing process waiting queue 120, the control unit 150 selects the routing process waiting queue 120 at the head of the selected routing process waiting queue 120 (that is, the first stored queue). ) message as the message to be processed. Then, the control unit 150 allocates computational resources to the routing process of the message to be processed.

ルーティング処理は、メッセージをルーティングテーブルに照合して、送信先のチャネルを決定することを含む。また、ルーティング処理は、ファイアウォールによるメッセージのセキュリティチェック等の様々なチェックを含む。また、ルーティング処理は、ルーティング処理待ちキュー120からMPFOリスト141又はFIFO142リストへのメッセージの移動を含む。制御部150は、メッセージの内容に応じて、移動先のデータ構造を決定する。例えば、制御部150は、CANの制御メッセージをMPFOリスト141に移動させ、CANの診断メッセージをFIFOリスト142に移動させる。また、制御部150は、MPFOリスト141又はFIFOリスト142に記憶されたメッセージへのポインタを、送信処理待ちキュー130に記憶させ得る。 The routing process involves matching the message to a routing table to determine the channel to send it to. The routing process also includes various checks such as security checks of messages by firewalls. The routing process also includes moving messages from the routing process waiting queue 120 to the MPFO list 141 or FIFO 142 list. The control unit 150 determines the data structure of the destination according to the content of the message. For example, the control unit 150 moves CAN control messages to the MPFO list 141 and CAN diagnostic messages to the FIFO list 142 . In addition, the control unit 150 can store pointers to messages stored in the MPFO list 141 or the FIFO list 142 in the transmission queue 130 .

以下、図3を参照して、ルーティング処理の一例を説明する。図3は、本実施形態に係るゲートウェイ100によるメッセージのルーティング処理の一例を説明するための図である。図3では、ゲートウェイ100内のデータ構造及び図2の続きのデータの流れについて図示されている。図3に示した例では、優先順位付け処理によりキュー#6が選択されたものとする。この場合、キュー#6の先頭のメッセージ10-3のルーティング処理が実行される。これにより、メッセージ10-3は、関連するMPFOリスト141に記憶され、キュー#6から削除される。メッセージ10-3の優先度はMPFOリスト141の既存のメッセージ10-4よりも低いものとする。なお、MPFOリスト又はFIFOリストへのCANメッセージの記憶については、参考文献[1]に詳しく開示されている。 An example of routing processing will be described below with reference to FIG. FIG. 3 is a diagram for explaining an example of message routing processing by the gateway 100 according to the present embodiment. FIG. 3 shows the data structure in the gateway 100 and the data flow following FIG. In the example shown in FIG. 3, queue #6 is assumed to be selected by the prioritization process. In this case, the routing process for message 10-3 at the head of queue #6 is executed. Message 10-3 is thereby stored in the associated MPFO list 141 and deleted from queue #6. Assume that message 10-3 has a lower priority than existing message 10-4 in MPFO list 141. The storage of CAN messages in MPFO lists or FIFO lists is disclosed in detail in reference [1].

(4)送信処理
制御部150は、優先順位付け処理により選択された処理対象のキューに対応するメッセージを処理対象のメッセージとして選択する。詳しくは、制御部150は、優先順位付け処理により選択された処理対象のキューが送信処理待ちキュー130である場合、選択された送信処理待ちキュー130に対応するメッセージを、処理対象のメッセージとして選択する。そして、制御部150は、処理対象のメッセージの送信処理に計算リソースを割り当てる。
(4) Transmission Processing The control unit 150 selects the message corresponding to the processing target queue selected by the prioritization processing as the processing target message. Specifically, when the processing target queue selected by the prioritization process is the transmission processing waiting queue 130, the control unit 150 selects the message corresponding to the selected transmission processing waiting queue 130 as the processing target message. do. Then, the control unit 150 allocates computational resources to the transmission process of the message to be processed.

ここで、送信処理待ちキュー130に対応するメッセージとは、第3の記憶部140に記憶されたメッセージである。詳しくは、制御部150は、MPFOリスト141が空ではない場合、MPFOリスト141で最も優先度が高いメッセージを処理対象のメッセージとして選択する。一方で、MPFOリスト141が空である場合、制御部150は、FIFOリスト142の先頭のメッセージを処理対象のメッセージとして選択する。なお、MPFOリスト141もFIFOリスト142も空であれば、その後の送信処理は実行されない。 Here, the messages corresponding to the queue 130 waiting for transmission processing are messages stored in the third storage unit 140 . Specifically, when the MPFO list 141 is not empty, the control unit 150 selects the message with the highest priority in the MPFO list 141 as the message to be processed. On the other hand, when the MPFO list 141 is empty, the control unit 150 selects the first message in the FIFO list 142 as the message to be processed. Note that if both the MPFO list 141 and the FIFO list 142 are empty, subsequent transmission processing is not executed.

選択された処理対象のメッセージは、ルーティング処理により決定された送信先のチャネルに対応する送信バッファ112に記憶され、MPFOリスト141又はFIFOリスト142から削除される。そして、送信バッファ112に記憶されたメッセージは送信される。 The selected message to be processed is stored in the transmission buffer 112 corresponding to the destination channel determined by the routing process, and deleted from the MPFO list 141 or FIFO list 142 . The messages stored in transmission buffer 112 are then transmitted.

以下、図4を参照して、送信処理の一例を説明する。図4は、本実施形態に係るゲートウェイ100によるメッセージの送信処理の一例を説明するための図である。図4では、ゲートウェイ100内のデータ構造及び図3の続きのデータの流れについて図示されている。図4に示した例では、優先順位付け処理によりキュー#7が選択されたものとする。その場合、MPFOリスト141が空ではないため、MPFOリスト141に記憶された中で最も優先度が高いメッセージ10-4が、送信先であるチャネル#5の送信バッファ112#5に記憶され、チャネル#5から送信される。また、MPFOリスト141から送信済みのメッセージ10-4が削除される。 An example of the transmission process will be described below with reference to FIG. FIG. 4 is a diagram for explaining an example of message transmission processing by the gateway 100 according to this embodiment. FIG. 4 shows the data structure in gateway 100 and the flow of data following FIG. In the example shown in FIG. 4, queue #7 is assumed to be selected by the prioritization process. In this case, since the MPFO list 141 is not empty, the message 10-4 with the highest priority among those stored in the MPFO list 141 is stored in the transmission buffer 112#5 of the channel #5, which is the transmission destination, and the channel Sent from #5. Also, the transmitted message 10-4 is deleted from the MPFO list 141. FIG.

(5)補足
優先順位付け処理、ルーティング処理及び送信処理は、割り込みとして又はタスクとして実行され得るが、低遅延の実現のためには、割り込みとして実行されることが望ましい。タスクよりも割り込みの方が優先して実行されるためである。ただし、受信処理の割り込みの方が、優先順位付け処理、ルーティング処理及び送信処理のための割り込み及びタスクよりも、優先して実行される。
(5) Supplement Prioritization processing, routing processing, and transmission processing can be executed as interrupts or as tasks, but in order to achieve low latency, they are preferably executed as interrupts. This is because interrupts are executed with priority over tasks. However, interrupts for receive processing take precedence over interrupts and tasks for prioritization, routing and transmit processing.

優先順位付け処理、ルーティング処理又は送信処理のトリガは、タスク又は割り込みのフラグを用いて設定され得る。当該フラグは、例えば、ルーティング処理待ちキュー120、送信処理待ちキュー130、MPFOリスト141及びFIFOリスト142に空でないキュー又はリストがあるか否かを示す。この場合、受信処理の割り込みは、フラグを確認し、空でないことを示すフラグが立っていれば、優先順位付け処理、ルーティング処理又は送信処理の割り込み又はタスクを起動する。さらに、優先順位付け処理、ルーティング処理又は送信処理の割り込み又はタスクは、優先順位付け処理、ルーティング処理又は送信処理を実行後、ルーティング処理待ちキュー120、送信処理待ちキュー130、MPFOリスト141及びFIFOリスト142が空であるか否かを確認し、空でない場合は自身を再度呼び出す。 Triggers for prioritization, routing or sending processes can be set using task or interrupt flags. The flag indicates, for example, whether or not there is a non-empty queue or list in the routing queue 120, transmission queue 130, MPFO list 141, and FIFO list 142. In this case, the receive processing interrupt checks the flag and, if the non-empty flag is set, activates the prioritization processing, routing processing, or transmit processing interrupt or task. Furthermore, the interrupts or tasks of the prioritization processing, the routing processing, or the transmission processing are placed in the routing processing waiting queue 120, the transmission processing waiting queue 130, the MPFO list 141, and the FIFO list after executing the prioritization processing, routing processing, or transmission processing. 142 is empty, and if not, call itself again.

<2.2.処理の流れ>
(1)受信処理の流れ
図5は、本実施形態に係るゲートウェイ100において実行される受信処理の流れの一例を示すフローチャートである。図5に示すように、まず、チャネル#Xにメッセージが到来すると、制御部150は、到来したメッセージを到来したチャネル#Xに対応する受信バッファ111#Xにバッファする(ステップS102)。次いで、制御部150は、受信バッファ111#Xにバッファされたメッセージを、チャネル#Xに対応するルーティング処理待ちキュー120(キュー#X)に移動させる(ステップS104)。そして、制御部150は、優先順位付け処理、ルーティング処理又は送信処理をトリガする(ステップS106)。
<2.2. Process Flow>
(1) Flow of Reception Processing FIG. 5 is a flowchart showing an example of the flow of reception processing executed in the gateway 100 according to this embodiment. As shown in FIG. 5, when a message arrives on channel #X, the controller 150 buffers the incoming message in the receive buffer 111#X corresponding to channel #X (step S102). Next, the control unit 150 moves the message buffered in the reception buffer 111#X to the routing process waiting queue 120 (queue #X) corresponding to the channel #X (step S104). Then, the control unit 150 triggers prioritization processing, routing processing, or transmission processing (step S106).

(2)優先順位付け処理、ルーティング処理及び送信処理の流れ
図6は、本実施形態に係るゲートウェイ100において実行される優先順位付け処理、ルーティング処理及び送信処理の流れの一例を示すフローチャートである。図6に示すように、まず、優先順位付け処理、ルーティング処理及び送信処理が受信処理によりトリガされると(ステップS202)、制御部150は、ルーティング処理待ちキュー120及び送信処理待ちキュー130のうち、前回選択したキューの次の空でないキューを選択する(ステップS204)。選択されるキューのインデックスをXとする。次いで、制御部150は、選択されたキュー#Xはルーティング処理待ちキュー120又は送信処理待ちキュー130のいずれであるかを判定する(ステップS206)。選択されたキュー#Xがルーティング処理待ちキュー120である場合、処理はステップS208に進む。一方で、選択されたキュー#Xが送信処理待ちキュー130である場合、処理はステップS226に進む。なお、これらの処理は、優先順位付け処理に相当する。
(2) Flow of Prioritization Processing, Routing Processing, and Transmission Processing FIG. 6 is a flowchart showing an example of the flow of prioritization processing, routing processing, and transmission processing executed by the gateway 100 according to the present embodiment. As shown in FIG. 6, first, when the prioritization process, the routing process, and the transmission process are triggered by the reception process (step S202), the control unit 150 , selects a non-empty queue next to the previously selected queue (step S204). Let X be the index of the queue to be selected. Next, the control unit 150 determines whether the selected queue #X is the routing process waiting queue 120 or the transmission process waiting queue 130 (step S206). If the selected queue #X is the routing process waiting queue 120, the process proceeds to step S208. On the other hand, if the selected queue #X is the transmission process waiting queue 130, the process proceeds to step S226. Note that these processes correspond to prioritization processes.

ステップS208においては、制御部150は、キュー#Xから先頭のメッセージを選択する。次いで、制御部150は、選択したメッセージがMPFOメッセージ又はFIFOメッセージのいずれであるかを判定する(ステップS210)。選択したメッセージがFIFOメッセージである場合、制御部150は、ルーティングを行い、メッセージをFIFOリスト142に移動させる(ステップS212)。一方で、選択したメッセージがMPFOメッセージである場合、制御部150は、ルーティングを行い、メッセージをMPFOリスト141に移動させる(ステップS214)。ここで、MPFOリスト141又はFIFOリスト142に記憶されたメッセージへのポインタが、送信処理待ちキュー130に記憶され得る。ステップS212又はS214の後、処理はステップS216に進む。なお、これらの処理は、ルーティング処理に相当する。 In step S208, control unit 150 selects the top message from queue #X. Next, the control unit 150 determines whether the selected message is an MPFO message or a FIFO message (step S210). If the selected message is a FIFO message, the control unit 150 performs routing and moves the message to the FIFO list 142 (step S212). On the other hand, if the selected message is an MPFO message, the control unit 150 performs routing and moves the message to the MPFO list 141 (step S214). Here, pointers to messages stored in MPFO list 141 or FIFO list 142 can be stored in queue 130 waiting to be processed. After step S212 or S214, the process proceeds to step S216. Note that these processes correspond to routing processes.

ステップS216においては、制御部150は、MPFOリスト141が空であるか否かを判定する。MPFOリスト141が空でないと判定された場合、制御部150は、MPFOリスト141から最も優先度の高いメッセージを選択する(ステップS218)。その後、処理はステップS224に進む。一方で、MPFOリストが空であると判定された場合、制御部150は、FIFOリスト142が空であるか否かを判定する(ステップS220)。FIFOリスト142が空であると判定された場合、処理は再度ステップS204に戻る。一方で、FIFOリスト142が空でないと判定された場合、制御部150は、FIFOリスト142から先頭のメッセージを選択する(ステップS222)。その後、処理はステップS224に進む。ステップS224においては、制御部150は、ルーティング処理により決定された送信先のチャネルへメッセージを送信し、MPFOリスト141又はFIFOリスト142から送信済みのメッセージを削除する。これに伴い、削除された送信済みのメッセージへのポインタが、送信処理待ちキュー130から削除される。その後、処理はステップS226に進む。なお、これらの処理は、送信処理に相当する。 In step S216, control unit 150 determines whether MPFO list 141 is empty. If it is determined that the MPFO list 141 is not empty, the control unit 150 selects the highest priority message from the MPFO list 141 (step S218). After that, the process proceeds to step S224. On the other hand, when it is determined that the MPFO list is empty, the control unit 150 determines whether the FIFO list 142 is empty (step S220). If the FIFO list 142 is determined to be empty, the process returns to step S204 again. On the other hand, if it is determined that FIFO list 142 is not empty, controller 150 selects the first message from FIFO list 142 (step S222). After that, the process proceeds to step S224. In step S<b>224 , the control unit 150 transmits the message to the destination channel determined by the routing process, and deletes the transmitted message from the MPFO list 141 or FIFO list 142 . Along with this, the pointer to the deleted transmitted message is deleted from the queue 130 waiting for transmission processing. After that, the process proceeds to step S226. Note that these processes correspond to the transmission process.

ステップS226においては、制御部150は、キュー、MPFOリスト141及びFIFOリスト142が空であるか否かを判定する。少なくともひとつが空でないと判定された場合、処理はステップS204に戻る。一方で、全てが空であると判定された場合、処理は終了する。 In step S226, control unit 150 determines whether or not the queue, MPFO list 141 and FIFO list 142 are empty. If it is determined that at least one is not empty, the process returns to step S204. On the other hand, if it is determined that all are empty, the process ends.

<<3.第2の実施形態>>
<3.1.概要>
第1の実施形態では、空でないキューがラウンドロビン方式で順番に選択されて、計算リソースが割り当てられていた。このような割り当て方式は、2つの理由で完全に公平であるとは言い難い。
<<3. Second Embodiment>>
<3.1. Overview>
In the first embodiment, non-empty queues were selected in order in a round-robin fashion to allocate computing resources. Such an allocation scheme is not completely fair for two reasons.

第1の理由は、長いメッセージの処理時間は短いメッセージの処理時間と比較して長いにも関わらず、ラウンドロビン方式ではメッセージの長短によらずに処理対象が選択されることである。このことは、長いメッセージは短いメッセージと比較して多い計算リソースを獲得できることを意味し、換言すると、長いメッセージは短いメッセージと比較して優先されることを意味する。 The first reason is that the processing target is selected regardless of the length of the message in the round-robin method, although the processing time for long messages is longer than the processing time for short messages. This means that long messages can get more computational resources compared to short messages, in other words long messages have priority over short messages.

第2の理由は、ルーティング処理の処理時間は送信処理の処理時間と比較して長いにも関わらず、ラウンドロビン方式ではこの処理時間の差によらずに処理対象が選択されることである。このことは、ルーティング処理は送信処理と比較して多い計算リソースを獲得できることを意味し、換言すると、ルーティング処理は送信処理と比較して優先されることを意味する。 The second reason is that although the processing time for routing processing is longer than the processing time for transmission processing, in the round robin method, processing targets are selected regardless of the difference in processing time. This means that the routing process can acquire more computational resources than the transmission process, in other words, the routing process has priority over the transmission process.

そこで、第2の実施形態では、メッセージのサイズ及び適用される処理の種類に応じた処理時間が発生する場合であっても、計算リソースの割り当ての公平性を確立することが可能な仕組みを提供する。具体的には、制御部150は、メッセージの処理時間に応じて計算リソースの割り当てを行う。 Therefore, in the second embodiment, a mechanism is provided that can establish fairness in allocation of computational resources even when a processing time occurs depending on the size of the message and the type of processing applied. do. Specifically, the control unit 150 allocates computational resources according to the message processing time.

ここで、計算リソース(例えば、CPUの処理時間)の共有の粒度は、1クロックの時間であることが理想的であると考えられる。換言すると、クロックサイクルごとに処理対象のキューを切り替えながら、アクティブなキューの先頭のメッセージを処理すること、即ち並列的に処理することが理想的であると言える。しかしながら、このような理想的な仕組みは現実的ではない。なぜならば、少なくともルーティング処理は、1クロックサイクルで完了するものではない上に、分割が困難なためである(即ち、不可分操作(atomic operation)である)。メッセージの送信処理もまた、不可分操作(atomic operation)である。ルーティング処理を中断して数クロック後に復帰したり、メッセージの送信を中断して数クロック後に復帰したりすることは、現実的ではない。 Here, it is considered ideal that the granularity of sharing the computational resource (for example, the processing time of the CPU) is the time of one clock. In other words, it can be said that it is ideal to process the message at the top of the active queue while switching the queue to be processed every clock cycle, that is, to process in parallel. However, such an ideal mechanism is not realistic. This is because at least the routing process cannot be completed in one clock cycle and is difficult to divide (ie, it is an atomic operation). The process of sending a message is also an atomic operation. Interrupting the routing process and returning after several clocks, or interrupting message transmission and returning after several clocks, is not realistic.

そこで、本実施形態に係る制御部150は、優先順位付け処理において、メッセージの処理が終了する予定の時刻(以下、終了予定時刻とも称する)に基づいて、処理対象のキューを選択する。具体的には、制御部150は、ルーティング処理待ちのメッセージ及び送信処理待ちのメッセージの各々の処理の終了予定時刻を計算し、終了予定時刻が最も早いメッセージを処理対象のメッセージとして選択する。制御部150は、キュー#Xに新たなメッセージi(又はメッセージiへのポインタ)が記憶されると、メッセージiよりも前にキュー#Xに記憶されたメッセージの終了予定時刻を加味して、メッセージiの終了予定時刻を計算する。詳しくは、制御部150は、終了予定時刻の計算対象のメッセージと同一のキューに記憶されるメッセージであって計算対象のメッセージの前に処理されるメッセージの終了予定時刻又は計算対象のメッセージがキューに記憶された時刻のうち遅い方に、計算対象のメッセージの処理時間を加算することで、計算対象のメッセージの終了予定時刻を計算する。数式で表すと、制御部150は、終了予定時刻F[i]を次式に従って計算する。
[i]=Max(F[i-1],A[i])+P[i] …(1)
Therefore, in the priority ranking process, the control unit 150 according to the present embodiment selects queues to be processed based on the scheduled time at which message processing ends (hereinafter also referred to as the scheduled end time). Specifically, the control unit 150 calculates the scheduled end time of each process of the message waiting for routing processing and the message waiting for transmission processing, and selects the message with the earliest scheduled end time as the message to be processed. When a new message i (or a pointer to message i) is stored in queue #X, control unit 150 takes into consideration the scheduled end time of messages stored in queue #X before message i, Calculate the expected end time of message i. Specifically, the control unit 150 determines whether the scheduled end time of a message processed before the message whose scheduled end time is to be calculated is stored in the same queue as the message whose scheduled end time is to be calculated, or the message whose scheduled end time is to be calculated is queued. By adding the processing time of the message to be calculated to the later one of the times stored in , the estimated end time of the message to be calculated is calculated. Expressed as a formula, the control unit 150 calculates the expected end time F X [i] according to the following formula.
F X [i]=Max(F X [i−1], A X [i])+P X [i] (1)

ここで、Xはキューのインデックスであり、iは、キュー#Xにおけるメッセージのインデックスである。F[i-1]は、キュー#Xに記憶された、メッセージiのひとつ前のメッセージの終了予定時刻である。A[i]は、メッセージiがキュー#Xに記憶された時刻である。P[i]は、メッセージの処理時間である。ただし、処理時間は、計算対象のメッセージのサイズ及び適用される処理の種類に依存する。即ち、P[i]は、メッセージのサイズが大きいほど大きい値であり、サイズが小さいほど小さい値である。また、P[i]は、メッセージに適用される処理がルーティング処理であるか送信処理であるか(即ち、キュー#Xがルーティング処理待ちキュー120であるか送信処理待ちキュー130であるか)に応じて決定される。なお、P[i]は、図示しない記憶部に予め記憶されたルックアップテーブルを参照することで、求められ得る。かかるルックアップテーブルは、メッセージのサイズ及び適用される処理の種類と処理時間との対応付けを複数含むテーブルである。 where X is the queue index and i is the message index in queue #X. F X [i−1] is the scheduled end time of the message immediately before message i stored in queue #X. A X [i] is the time when message i was stored in queue #X. P X [i] is the message processing time. However, the processing time depends on the size of the message to be calculated and the type of processing applied. That is, P X [i] has a larger value as the size of the message is larger, and a smaller value as the size of the message is smaller. Also, P X [i] indicates whether the processing applied to the message is routing processing or transmission processing (that is, whether queue #X is the routing processing waiting queue 120 or the transmission processing waiting queue 130). determined according to Note that P X [i] can be obtained by referring to a lookup table stored in advance in a storage unit (not shown). Such a lookup table is a table containing a plurality of correspondences between message size and type of processing to be applied and processing time.

なお、メッセージiが記憶される前はキュー#Xが空であった場合(即ち、i=1である場合)、制御部150は、終了予定時刻F[1]を次式に従って計算する。 If queue #X is empty before message i is stored (i.e., i=1), control unit 150 calculates expected end time F X [1] according to the following equation.

[1]=A[1]+P[1] …(2) F X [1] = A X [1] + P X [1] (2)

制御部150は、上記数式(1)又は(2)に従い、アクティブなキューの各々に記憶されたメッセージについてF[i]を計算する。そして、制御部150は、各キューの先頭のメッセージのうち、終了予定時刻F[i]が最も早いメッセージを処理対象のメッセージとして選択する。 The control unit 150 calculates F X [i] for the messages stored in each of the active queues according to equation (1) or (2) above. Then, the control unit 150 selects the message with the earliest scheduled end time F X [i] among the messages at the top of each queue as the message to be processed.

終了予定時刻に基づいて処理対象のメッセージが選択されることにより、以下に説明するように、ゲートウェイ100は、上述した理想的な仕組みと同様にメッセージを処理することができる。 By selecting messages to be processed based on the scheduled end time, the gateway 100 can process the messages in the same manner as the ideal mechanism described above, as described below.

詳しくは、P[i]が、メッセージのサイズに依存するので、長いメッセージ及び短いメッセージに、公平に計算リソースを割り当てることができる。また、P[i]が、メッセージに適用される処理の種類に依存するので、ルーティング処理及び送信処理に、公平に計算リソースを割り当てることができる。このように、第2の実施形態では、上述した2つの理由による割り当て方式の不公平性を、解消することができる。 Specifically, since P X [i] depends on the size of the message, long and short messages can be fairly allocated computational resources. Also, since P X [i] depends on the type of processing applied to the message, it is possible to fairly allocate computational resources to the routing and transmission processes. Thus, in the second embodiment, the unfairness of the allocation method due to the two reasons described above can be resolved.

また、F[i]の計算にF[i-1]又はA[i]が加味されるので、メッセージiの処理が開始される予定の時刻に基づいて終了予定時刻が計算される。これにより、キュー毎に異なり得るメッセージの処理ペースを反映した、メッセージの終了予定時刻を計算することが可能となる。 Also, since F X [i−1] or A X [i] is added to the calculation of F X [i], the scheduled end time is calculated based on the scheduled start time of processing message i. . This makes it possible to calculate an estimated end time of a message that reflects the pace of message processing, which may vary from queue to queue.

以上説明したように、本実施系形態では、終了予定時刻は、処理が開始される予定の時刻にメッセージの処理時間を加算することで計算される。従って、本実施形態では、メッセージの処理が終了する順番は、上述した理想的な仕組みにおいてメッセージの処理が終了する順番と同様となる。つまり、終了予定時刻に基づいて処理対象のメッセージを選択することは、上述した理想的な仕組みにおける、あるキューから他のキューへクロックサイクルごとに処理対象を移しながらメッセージを処理することをモデル化している、と言える。実際、終了予定時刻に基づいて処理対象のメッセージを選択する場合、上述した理想的な仕組みと本質的に同一の振る舞いが実現されることが、先行文献[3]において数学的に証明されている。 As described above, in this embodiment, the scheduled end time is calculated by adding the message processing time to the scheduled start time of the process. Therefore, in this embodiment, the order in which message processing ends is the same as the order in which message processing ends in the ideal mechanism described above. In other words, selecting a message to be processed based on the estimated end time models the message processing while shifting the processing target from one queue to another queue at each clock cycle in the ideal mechanism described above. It can be said that there is In fact, it is mathematically proven in prior literature [3] that essentially the same behavior as the ideal mechanism described above is achieved when selecting messages for processing based on expected end time. .

ただし、上述した理想的な仕組みのように、アクティブなキューの先頭のメッセージが並列的に処理される場合、アクティブなキューの数によってメッセージの処理速度は変化する。この概念を優先順位付け処理に反映するために、本実施形態では、仮想時刻(virtual Time)が導入される。仮想時刻は、適宜更新される。仮想時刻は、現在の実時刻と前回更新時の実時刻との差を、ルーティング処理待ちキュー120及び送信処理待ちキュー130のうち空でないキューの数で割った値を、前回更新時の仮想時刻に加算することで更新される。数式で表すと、制御部150は、仮想時刻Tvirを次式に従って計算する。
Tvir=Tvirold+(Tnow-Told)/Q …(3)
However, when messages at the top of active queues are processed in parallel as in the ideal mechanism described above, the message processing speed changes depending on the number of active queues. To reflect this concept in the prioritization process, virtual time is introduced in the present embodiment. The virtual time is updated accordingly. The virtual time is obtained by dividing the difference between the current real time and the real time of the previous update by the number of non-empty queues in the routing process waiting queue 120 and the transmission process waiting queue 130, and the virtual time of the previous update. is updated by adding to Expressing it numerically, the control unit 150 calculates the virtual time Tvir according to the following equation.
Tvir=Tvirold+(Tnow-Told)/Q (3)

ここで、Tviroldは、前回更新時の仮想時刻である。Tnowは、現在の実時刻である。Toldは、仮想時刻の前回更新時の実時刻である。Qは、アクティブなキューの数である。上記数式(3)を参照すると、アクティブなキューの数に応じて仮想時刻の更新幅が増減し得る。例えば、アクティブなキューが1つである場合、仮想時刻は実時刻と同一である。一方で、アクティブなキューが2つである場合、仮想時刻は実時刻と比較して2倍遅く(即ち、1/2の早さで)進む。このことは、上述した理想的な仕組みにおいて、アクティブなキューの増減により、並列的に処理されるメッセージの処理速度が増減することに対応する。 Here, Tvirold is the virtual time of the previous update. Tnow is the current real time. Told is the real time when the virtual time was last updated. Q is the number of active queues. Referring to Equation (3) above, the update width of the virtual time can increase or decrease according to the number of active queues. For example, if there is one active queue, the virtual time is the same as the real time. On the other hand, if there are two active queues, virtual time advances twice as slow (ie, half as fast) as compared to real time. This corresponds to an increase or decrease in the processing speed of messages processed in parallel due to an increase or decrease in the number of active queues in the ideal scheme described above.

仮想時刻は、ルーティング処理待ちキュー120又は送信処理待ちキュー130に新たなメッセージ(又は新たなポインタ)が追加される度に、更新される。他に、仮想時刻は、ルーティング処理待ちキュー120及び送信処理待ちキュー130のうち空でない、即ちアクティブなキューの数が増減する度に更新されてもよい。 The virtual time is updated each time a new message (or a new pointer) is added to the routing queue 120 or transmission queue 130 . Alternatively, the virtual time may be updated each time the number of non-empty, ie active queues in the routing queue 120 and transmission queue 130 increases or decreases.

仮想時刻は、終了予定時刻の計算において、計算対象のメッセージがキューに記憶された時刻A[i]に代えて用いられる。即ち、制御部150は、計算対象のメッセージと同一のキューに記憶されるメッセージであって計算対象のメッセージより先に処理されるメッセージの終了予定時刻又は仮想時刻のうち遅い方に、計算対象のメッセージの処理時間を加算することで、計算対象のメッセージの終了予定時刻を計算する。数式で表すと、制御部150は、終了予定時刻F[i]を次式に従って計算する。
[i]=Max(F[i-1],Tvir)+P[i] …(4)
The virtual time is used instead of the time A X [i] at which the message to be calculated was stored in the queue in calculating the expected end time. That is, the control unit 150 sets the calculation target message to the scheduled end time or the virtual time of the message that is stored in the same queue as the calculation target message and is processed before the calculation target message, whichever is later. By adding the processing time of the message, the estimated end time of the message to be calculated is calculated. Expressed as a formula, the control unit 150 calculates the expected end time F X [i] according to the following formula.
F X [i]=Max(F X [i−1], Tvir)+P X [i] (4)

なお、メッセージiが記憶される前はキュー#Xが空であった場合(即ち、i=1である場合)、制御部150は、終了予定時刻F[1]を次式に従って計算する。 If queue #X is empty before message i is stored (i.e., i=1), control unit 150 calculates expected end time F X [1] according to the following equation.

[1]=Tvir+P[1] …(5) F X [1]=Tvir+P X [1] (5)

仮想時刻の導入により、アクティブなキューの増減に起因するメッセージの処理速度の増減を、終了予定時刻に反映することができる。これにより、ゲートウェイ100は、上述した理想的な仕組みにより近い、計算リソースの割り当てを実現することができる。 By introducing virtual time, changes in message processing speed caused by changes in the number of active queues can be reflected in the scheduled end time. This allows the gateway 100 to achieve allocation of computational resources that is closer to the ideal mechanism described above.

<3.2.各種処理>
以下、本実施形態に係るゲートウェイ100により実行される各種処理について詳細に説明する。本実施形態に係るゲートウェイ100の構成は、図1を参照して上記説明した通りである。以下では、N=6とし、M=7として説明する。この場合、ルーティング処理及び送信処理に使用可能な計算リソースの約14%((M-N)/M)が送信処理のために割り当てられ、残りの約86%(N/M))がルーティング処理に割り当てられる。
<3.2. Various processing>
Various processes executed by the gateway 100 according to this embodiment will be described in detail below. The configuration of the gateway 100 according to this embodiment is as described above with reference to FIG. In the following description, it is assumed that N=6 and M=7. In this case, approximately 14% ((M−N)/M) of the computational resources available for routing and transmission processing are allocated for transmission processing, and the remaining approximately 86% (N/M) for routing processing. assigned to.

(1)受信処理
ネットワークからメッセージが到来してネットワークインタフェース110の受信バッファ111に記憶されると、割り込みがトリガされる。割り込みは、受信したメッセージを、メッセージが到来したチャネルに対応するルーティング処理待ちキュー120の最後尾に移動させる。その際、まず、制御部150は、上記数式(3)に基づいて仮想時刻Tvirを計算する。
(1) Receive Processing When a message arrives from the network and is stored in the receive buffer 111 of the network interface 110, an interrupt is triggered. The interrupt moves the received message to the end of the routing queue 120 corresponding to the channel through which the message arrived. At that time, first, the control unit 150 calculates the virtual time Tvir based on the above formula (3).

次いで、制御部150は、上記数式(4)又は(5)に基づいて終了予定時刻F[i]を計算して、メッセージに対応付けてルーティング処理待ちキュー120に記憶する。メッセージの移動先のルーティング処理待ちキュー120が移動前には空であった場合、Qをインクリメントする。また、制御部150は、次式のように、Tvir及びTnowをTvirold及びToldに上書きする。
Tvirold=Tvir, Told=Tnow …(6)
Next, the control unit 150 calculates the estimated end time F X [i] based on the above formula (4) or (5), and stores it in the routing queue 120 in association with the message. Q is incremented if the routing process queue 120 at the destination of the message is empty before the message is moved. Also, the control unit 150 overwrites Tvirold and Told with Tvir and Tnow as in the following equations.
Tvirold=Tvir, Told=Tnow (6)

以下、図7を参照して、受信処理の一例を説明する。 An example of the reception process will be described below with reference to FIG.

図7は、本実施形態に係るゲートウェイ100によるメッセージの受信処理の一例を説明するための図である。図7では、ゲートウェイ100内のデータ構造及びデータの流れについて図示されている。なお、キュー#1~#6はルーティング処理待ちキュー120であり、キュー#7は送信処理待ちキュー130である。キュー#1、キュー#2、及びキュー#4には、メッセージ10-1、10-2、及び10-3、並びに各々のメッセージの終了予定時刻F[1]、F[1]、F[1]が記憶されている。また、MPFOリスト141にはメッセージ10-4が記憶され、FIFOリスト142にはメッセージ10-5が記憶されている。また、キュー#7には、メッセージ10-4へのポインタ11-1及びメッセージ10-4の終了予定時刻F[1]、並びにメッセージ10-5へのポインタ11-2及びメッセージ10-5の終了予定時刻F[2]が記憶されている。 FIG. 7 is a diagram for explaining an example of message reception processing by the gateway 100 according to this embodiment. FIG. 7 illustrates the data structure and data flow within the gateway 100 . Queues #1 to #6 are queues 120 waiting for routing processing, and queue #7 is queue 130 waiting for transmission processing. Queue #1, Queue #2, and Queue #4 contain messages 10-1, 10-2, and 10-3, and estimated end times F 1 [1], F 2 [1], F of each message. 4 [1] is stored. Also, the MPFO list 141 stores the message 10-4, and the FIFO list 142 stores the message 10-5. Queue #7 also contains a pointer 11-1 to message 10-4, an expected end time F 7 [1] of message 10-4, a pointer 11-2 to message 10-5, and a message 10-5. Estimated end time F 7 [2] is stored.

図7に示した例では、チャネル#1に到来したメッセージ10-6が、チャネル#1の受信バッファ111#1に記憶され、その後キュー#1の最後に配置されて、チャネル#1の受信バッファから削除される。キュー#1の先頭にはメッセージ10-1が既に記憶されており空でないので、メッセージ10-6はキュー#1の2番目に記憶され、Qはインクリメントされない。 In the example shown in FIG. 7, the message 10-6 arriving on channel #1 is stored in the receive buffer 111#1 of channel #1, then placed at the end of queue #1, and is placed in the receive buffer of channel #1. removed from Since message 10-1 is already stored at the head of queue #1 and is not empty, message 10-6 is stored second in queue #1 and Q is not incremented.

なお、各キュー及びリストにおいて、下方に記載されたメッセージほど出力順が早く、再下端のメッセージは先頭のメッセージである。例えば、キュー#1の先頭はメッセージ10-1であり、2番目がメッセージ10―6である。 In each queue and list, the lower the message is, the earlier the message is output, and the message at the bottom is the first message. For example, the head of queue #1 is message 10-1 and the second is message 10-6.

(2)優先付け処理
優先順位付け処理とは、処理対象のキューを選択することである。詳しくは、制御部150は、ルーティング処理待ちキュー120及び送信処理待ちキュー130からひとつのキューを処理対象のキューとして選択する。本実施形態では、各キューの先頭のメッセージのうち終了時刻F[i]が最も早いメッセージを記憶したキューを、処理対象のキューとして選択する。
(2) Prioritization process Prioritization process is to select a queue to be processed. Specifically, the control unit 150 selects one queue from the routing processing waiting queue 120 and the transmission processing waiting queue 130 as a queue to be processed. In this embodiment, the queue storing the message with the earliest end time F X [i] among the top messages of each queue is selected as the queue to be processed.

(3)ルーティング処理及び送信処理
優先順位付け処理の後、選択されたキューに対応する処理が実行される。ここで実行されるルーティング処理及び送信処理は、第1の実施形態におけるこれらの処理と同様である。以下、相違点について説明する。
(3) Routing Processing and Transmission Processing After the prioritization processing, processing corresponding to the selected queue is executed. The routing processing and transmission processing performed here are the same as those in the first embodiment. Differences will be described below.

-第1の相違点
ルーティング処理後、メッセージは、送信処理待ちキュー130に記憶される。その際、制御部150は、上記数式(3)に基づいて仮想時刻Tvirを計算し、上記数式(6)に基づいてTvir及びTnowをTvirold及びToldに上書きする。また、制御部150は、上記数式(4)又は(5)に基づいて終了予定時刻F[i]を計算して、メッセージに対応付けて送信処理待ちキュー130に記憶する。
- First difference After the routing process, the message is stored in the transmission process waiting queue 130 . At this time, the control unit 150 calculates the virtual time Tvir based on the above equation (3), and overwrites Tvirold and Told with Tvir and Tnow based on the above equation (6). Also, the control unit 150 calculates the expected end time F X [i] based on the above formula (4) or (5), and stores it in the transmission processing waiting queue 130 in association with the message.

ただし、ルーティング処理済みのメッセージがMPFOリスト141又はFIFOリスト142に記憶される場合、送信処理待ちキュー130にメッセージがコピーされなくてもよい。以下では、送信処理待ちキュー130に、F[i]及びMPFOリスト141又はFIFOリスト142に記憶されたメッセージへのポインタが記憶されるものとする。 However, when a routed message is stored in the MPFO list 141 or FIFO list 142, the message does not have to be copied to the queue 130 waiting for transmission processing. In the following description, it is assumed that F X [i] and a pointer to a message stored in the MPFO list 141 or FIFO list 142 are stored in the transmission queue 130 .

ここで、MPFOリスト141において、メッセージの送信順序は、各々のメッセージの優先度に基づいて決定される。そのため、MPFOリスト141に新たなメッセージが記憶された場合、送信順序が変更され得る。上記数式(4)によれば、F[i]はF[i-1]に依存するので、送信順序が変更されるのであればF[i]の更新が要される。 Here, in the MPFO list 141, the transmission order of messages is determined based on the priority of each message. Therefore, when new messages are stored in the MPFO list 141, the transmission order may change. According to Equation (4) above, F X [i] depends on F X [i−1], so if the transmission order is changed, F X [i] needs to be updated.

そのため、制御部150は、キューに記憶されたメッセージのうち新たに挿入されたメッセージよりも低い優先度を有する全てのメッセージについて、終了予定時刻F[i]を再計算する。制御部150は、再計算の際に、P[i]として最も長いメッセージの送信のための処理時間を使用してもよい。この場合、送信処理待ちキュー130に記憶された各々のメッセージを区別する必要がなくなるので、計算量を削減することができる。 Therefore, the control unit 150 recalculates the estimated end times F X [i] of all messages stored in the queue that have a lower priority than the newly inserted message. Control unit 150 may use the processing time for the transmission of the longest message as P X [i] when recalculating. In this case, since it is not necessary to distinguish each message stored in the queue 130 waiting for transmission processing, the amount of calculation can be reduced.

また、制御部150は、必要に応じて、アクティブなキューの数Qを更新する。 In addition, the control unit 150 updates the number Q of active queues as necessary.

-第2の相違点
送信処理待ちキュー130は、送信されるメッセージへのポインタを記憶し得る。その場合、送信処理待ちキュー130が優先順位付け処理において選択されることは、MPFOリスト141又はFIFOリスト142の少なくともいずれかが空ではないことを意味する。他方、メッセージが送信されると、送信処理待ちキュー130からメッセージが削除されて、送信処理待ちキュー130が空になり得る。送信処理待ちキュー130が空となった場合、アクティブなキューの数Qは減少する。その場合、制御部150は、上記数式(3)に基づいて仮想時刻Tvirを計算し、上記数式(6)に基づいてTvir及びTnowをTvirold及びToldに上書きする。
-Second Difference The queue 130 waiting to be sent can store pointers to messages to be sent. In that case, the selection of the transmission processing waiting queue 130 in the prioritization processing means that at least one of the MPFO list 141 or the FIFO list 142 is not empty. On the other hand, when a message is sent, the message may be deleted from the transmission queue 130 and the transmission queue 130 may become empty. When the queue 130 waiting for transmission processing becomes empty, the number Q of active queues decreases. In that case, the control unit 150 calculates the virtual time Tvir based on the above equation (3), and overwrites Tvirold and Told with Tvir and Tnow based on the above equation (6).

以上、第1の実施形態と第2の実施形態との相違点について説明した。以下、図8及び図9を参照しながら、ルーティング処理及び送信処理の一例を説明する。 The differences between the first embodiment and the second embodiment have been described above. An example of routing processing and transmission processing will be described below with reference to FIGS. 8 and 9. FIG.

図8は、本実施形態に係るゲートウェイ100によるメッセージのルーティング処理の一例を説明するための図である。図8では、ゲートウェイ100内のデータ構造及び図7の続きのデータの流れについて図示されている。図8に示した例において、優先順位付け処理によりキュー#4が選択された場合、キュー#4の先頭のメッセージ10-3が関連するMPFOリスト141に記憶され、キュー#4から当該メッセージが削除される。メッセージ10-3の優先度はMPFOリスト141の既存のメッセージ10-4よりも低いものとする。一方で、メッセージ10-3は、MPFOリスト141に記憶されるので、FIFOリスト142に記憶されたメッセージ10-5よりも先に送信される。そこで、キュー#7の、先頭のメッセージ10-4へのポインタ11-1と最後尾のメッセージ10-5へのポインタ11-2との間に、メッセージ10-3へのポインタ11-3が挿入される。そして、メッセージ10-3の終了予定時間F[2]が計算され、メッセージ10-5の終了予定時間F[3]が再計算される。また、キュー#4が空になったので、Qの数が更新される。 FIG. 8 is a diagram for explaining an example of message routing processing by the gateway 100 according to the present embodiment. FIG. 8 shows the data structure in gateway 100 and the flow of data following FIG. In the example shown in FIG. 8, if queue #4 is selected by the prioritization process, message 10-3 at the head of queue #4 is stored in the associated MPFO list 141 and the message is deleted from queue #4. be done. Assume that message 10-3 has a lower priority than existing message 10-4 in MPFO list 141. On the other hand, since message 10-3 is stored in MPFO list 141, it is sent before message 10-5 stored in FIFO list 142. FIG. Therefore, the pointer 11-3 to the message 10-3 is inserted between the pointer 11-1 to the top message 10-4 and the pointer 11-2 to the last message 10-5 in the queue #7. be done. Then, the expected end time F 7 [2] of the message 10-3 is calculated, and the expected end time F 7 [3] of the message 10-5 is recalculated. Also, since queue #4 is empty, the number of Q is updated.

図9は、本実施形態に係るゲートウェイ100によるメッセージの送信処理の一例を説明するための図である。図9では、ゲートウェイ100内のデータ構造及び図8の続きのデータの流れについて図示されている。図9に示した例においては、キュー#7が選択されている。キュー#7の先頭には、メッセージ10-4へのポインタ11-1が記憶されている。従って、メッセージ10-4が送信先であるチャネル#6の送信バッファ112#6に記憶され、チャネル#6から送信される。また、MPFOリスト141から送信済みのメッセージ10-4が削除され、キュー#7からポインタ11-1が削除される。 FIG. 9 is a diagram for explaining an example of message transmission processing by the gateway 100 according to this embodiment. FIG. 9 shows the data structure in the gateway 100 and the data flow following FIG. In the example shown in FIG. 9, queue #7 is selected. A pointer 11-1 to the message 10-4 is stored at the head of the queue #7. Therefore, message 10-4 is stored in transmission buffer 112#6 of channel #6, which is the destination, and is transmitted from channel #6. Also, the transmitted message 10-4 is deleted from the MPFO list 141, and the pointer 11-1 is deleted from the queue #7.

(4)補足
優先順位付け処理、ルーティング処理及び送信処理は、割り込みとして又はタスクとして実行され得るが、低遅延の実現のためには、割り込みとして実行されることが望ましい。タスクよりも割り込みの方が優先して実行されるためである。ただし、受信処理の割り込みの方が、優先順位付け処理、ルーティング処理及び送信処理のための割り込み及びタスクよりも、優先して実行される。
(4) Supplement Prioritization processing, routing processing, and transmission processing can be executed as interrupts or as tasks, but in order to achieve low latency, they are preferably executed as interrupts. This is because interrupts are executed with priority over tasks. However, interrupts for receive processing take precedence over interrupts and tasks for prioritization, routing and transmit processing.

優先順位付け処理、ルーティング処理又は送信処理のトリガは、タスク又は割り込みのフラグを用いて設定され得る。当該フラグは、例えば、ルーティング処理待ちキュー120、送信処理待ちキュー130、MPFOリスト141及びFIFOリスト142に空でないキュー又はリストがあるか否かを示す。この場合、受信処理の割り込みは、フラグを確認し、空でないことを示すフラグが立っていれば、優先順位付け処理、ルーティング処理又は送信処理の割り込み又はタスクを起動する。さらに、優先順位付け処理、ルーティング処理又は送信処理の割り込み又はタスクは、優先順位付け処理、ルーティング処理又は送信処理を実行後、ルーティング処理待ちキュー120、送信処理待ちキュー130、MPFOリスト141及びFIFOリスト142が空であるか否かを確認し、空でない場合は自身を再度呼び出す。 Triggers for prioritization, routing or sending processes can be set using task or interrupt flags. The flag indicates, for example, whether or not there is a non-empty queue or list in the routing queue 120, transmission queue 130, MPFO list 141, and FIFO list 142. In this case, the receive processing interrupt checks the flag and, if the non-empty flag is set, activates the prioritization processing, routing processing, or transmit processing interrupt or task. Furthermore, the interrupts or tasks of the prioritization processing, the routing processing, or the transmission processing are placed in the routing processing waiting queue 120, the transmission processing waiting queue 130, the MPFO list 141, and the FIFO list after executing the prioritization processing, routing processing, or transmission processing. 142 is empty, and if not, call itself again.

ゲートウェイ100は、複数の送信処理待ちキュー130を有していてもよい。その場合、複数の送信処理待ちキュー130の使い分け方法は任意である。例えば、複数の送信処理待ちキュー130は、それぞれ異なるチャネルを送信先とするメッセージを記憶してもよい。また、複数の送信処理待ちキュー130は、ルーティング処理が終了した順に交互にメッセージを記憶してもよい。 The gateway 100 may have a plurality of queues 130 waiting for transmission processing. In that case, the method of selectively using the plurality of transmission processing waiting queues 130 is arbitrary. For example, the plurality of transmission queues 130 may store messages destined for different channels. Also, the plurality of transmission processing waiting queues 130 may alternately store messages in the order in which the routing processing is completed.

<3.3.処理の流れ>
(1)受信処理の流れ
図10は、本実施形態に係るゲートウェイ100において実行される受信処理の流れの一例を示すフローチャートである。図10に示すように、まず、チャネル#Xにメッセージが到来すると、制御部150は、到来したメッセージを到来したチャネル#Xに対応する受信バッファ111#Xにバッファする(ステップS302)。次に、制御部150は、Tvir=Tvirold+(Tnow-Told)/Qにより仮想時刻Tvirを計算する(ステップS304)。次いで、制御部150は、受信バッファ111#Xにバッファされたメッセージを、チャネル#Xに対応するルーティング処理待ちキュー120(キュー#X)に移動させる(ステップS306)。
<3.3. Process Flow>
(1) Flow of Reception Processing FIG. 10 is a flowchart showing an example of the flow of reception processing executed in the gateway 100 according to this embodiment. As shown in FIG. 10, when a message arrives on channel #X, the controller 150 buffers the incoming message in the receive buffer 111#X corresponding to channel #X (step S302). Next, the control unit 150 calculates the virtual time Tvir by Tvir=Tvirold+(Tnow-Told)/Q (step S304). Next, the control unit 150 moves the message buffered in the reception buffer 111#X to the routing process waiting queue 120 (queue #X) corresponding to the channel #X (step S306).

次に、制御部150は、メッセージの移動前にキュー#Xが空であったか否かを判定する(ステップS308)。空であったと判定された場合(ステップS308/YES)、制御部150は、A[1]=Tvirとし(ステップS310)、F[1]=A[1]+P[1]を計算し(ステップS312)、Qをインクリメントする(ステップS314)。その後、処理はステップS320に進む。一方で空でなかったと判定された場合(ステップS308/NO)、制御部150は、A[i]=Tvirとし(ステップS316)、F[i]=max(F[i-1],A[i])+P[i]を計算する(ステップS318)。その後、処理はステップS320に進む。 Next, the control unit 150 determines whether or not the queue #X was empty before the message was moved (step S308). If it is determined to be empty (step S308/YES), the control unit 150 sets A X [1]=Tvir (step S310), and sets F X [1]=A X [1]+P X [1]. Calculate (step S312) and increment Q (step S314). The process then proceeds to step S320. On the other hand, if it is determined that it is not empty (step S308/NO), the control unit 150 sets A X [i]=Tvir (step S316), F X [i]=max(F X [i−1] , A X [i])+P X [i] (step S318). The process then proceeds to step S320.

ステップS320において、制御部150は、Tvirold=Tvir, Told=Tnowとする(ステップS320)。そして、制御部150は、優先順位付け処理、ルーティング処理又は送信処理をトリガする(ステップS322)。 In step S320, the control unit 150 sets Tvirold=Tvir and Told=Tnow (step S320). Then, the control unit 150 triggers prioritization processing, routing processing, or transmission processing (step S322).

(2)優先順位付け処理、ルーティング処理及び送信処理の流れ
図11A及び図11Bは、本実施形態に係るゲートウェイ100において実行される優先順位付け処理、ルーティング処理及び送信処理の流れの一例を示すフローチャートである。図11Aに示すように、まず、優先順位付け処理、ルーティング処理及び送信処理が受信処理によりトリガされると(ステップS402)、制御部150は、ルーティング処理待ちキュー120及び送信処理待ちキュー130の先頭のメッセージの終了予定時刻F[i]が最も早いキューを選択する(ステップS404)。選択されるキューのインデックスをXとする。次いで、制御部150は、選択されたキュー#Xはルーティング処理待ちキュー120又は送信処理待ちキュー130のいずれであるかを判定する(ステップS406)。選択されたキュー#Xがルーティング処理待ちキュー120である場合、処理はステップS408に進む。一方で、選択されたキュー#Xが送信処理待ちキュー130である場合、処理はステップS432に進む。なお、これらの処理は、優先順位付け処理に相当する。
(2) Flow of Prioritization Processing, Routing Processing, and Transmission Processing FIGS. 11A and 11B are flowcharts showing an example of the flow of prioritization processing, routing processing, and transmission processing executed by the gateway 100 according to the present embodiment. is. As shown in FIG. 11A, first, when the prioritization process, the routing process, and the transmission process are triggered by the reception process (step S402), the control unit 150 causes the top of the routing process waiting queue 120 and the transmission process waiting queue 130 to selects the queue with the earliest expected end time F X [i] of messages (step S404). Let X be the index of the queue to be selected. Next, the control unit 150 determines whether the selected queue #X is the routing process waiting queue 120 or the transmission process waiting queue 130 (step S406). If the selected queue #X is the routing process waiting queue 120, the process proceeds to step S408. On the other hand, if the selected queue #X is the transmission processing waiting queue 130, the process proceeds to step S432. Note that these processes correspond to prioritization processes.

ステップS408においては、制御部150は、キュー#Xから先頭のメッセージを選択する。次いで、制御部150は、選択したメッセージがMPFOメッセージ又はFIFOメッセージのいずれであるかを判定する(ステップS410)。選択したメッセージがFIFOメッセージである場合、制御部150は、ルーティングを行い、メッセージをFIFOリスト142に移動させる(ステップS412)。一方で、選択したメッセージがMPFOメッセージである場合、制御部150は、ルーティングを行い、メッセージをMPFOリスト141に移動させる(ステップS414)。ここで、MPFOリスト141又はFIFOリスト142に移動後のメッセージへのポインタが、送信処理待ちキュー130に記憶される。送信処理待ちキュー130のインデックスを、Mとする。ステップS412又はS414の後、処理はステップS416に進む。ステップS416では、制御部150は、Tvir=Tvirold+(Tnow-Told)/Qにより仮想時刻Tvirを計算する。次に、制御部150は、メッセージの移動前にキュー#Mが空であったか否かを判定する(ステップS308)。空であったと判定された場合(ステップS418/YES)、制御部150は、A[1]=Tvirとし(ステップS420)、F[1]=A[1]+P[1]を計算し(ステップS422)、Qをインクリメントする(ステップS424)。その後、処理はステップS430に進む。一方で空でなかったと判定された場合(ステップS418/NO)、制御部150は、A[i]=Tvirとし(ステップS426)、F[i]=max(F[i-1],A[i])+P[i]を計算する(ステップS428)。その後、処理はステップS430に進む。ステップS430において、制御部150は、Tvirold=Tvir, Told=Tnowとする。その後、処理はステップS440に進む。なお、これらの処理は、ルーティング処理に相当する。 In step S408, control unit 150 selects the first message from queue #X. Next, the control unit 150 determines whether the selected message is an MPFO message or a FIFO message (step S410). If the selected message is a FIFO message, the control unit 150 performs routing and moves the message to the FIFO list 142 (step S412). On the other hand, if the selected message is an MPFO message, the control unit 150 performs routing and moves the message to the MPFO list 141 (step S414). Here, a pointer to the message after being moved to the MPFO list 141 or FIFO list 142 is stored in the queue 130 waiting for transmission processing. Let M be the index of the queue 130 waiting for transmission processing. After step S412 or S414, the process proceeds to step S416. In step S416, control unit 150 calculates virtual time Tvir by Tvir=Tvirold+(Tnow-Told)/Q. Next, the control unit 150 determines whether or not the queue #M was empty before the message was moved (step S308). If it is determined to be empty (step S418/YES), control unit 150 sets A M [1]=Tvir (step S420), and sets F M [1]=A M [1]+P M [1]. Calculate (step S422) and increment Q (step S424). The process then proceeds to step S430. On the other hand, if it is determined that it is not empty (step S418/NO), the control unit 150 sets A M [i]=Tvir (step S426), F M [i]=max(F M [i−1] , A M [i])+P M [i] (step S428). The process then proceeds to step S430. In step S430, the control unit 150 sets Tvirold=Tvir and Told=Tnow. The process then proceeds to step S440. Note that these processes correspond to routing processes.

図11Bに示すように、ステップS432においては、制御部150は、MPFOリスト141が空であるか否かを判定する。MPFOリスト141が空でないと判定された場合、制御部150は、MPFOリスト141から最も優先度の高いメッセージを選択する(ステップS434)。その後、処理はステップS438に進む。一方で、MPFOリストが空であると判定された場合、制御部150は、FIFOリスト142から先頭のメッセージを選択する(ステップS436)。その後、処理はステップS438に進む。ステップS438においては、制御部150は、ルーティング処理により決定された送信先のチャネルへメッセージを送信し、MPFOリスト141又はFIFOリスト142から送信済みのメッセージを削除し、送信処理待ちキュー130からポインタを削除する。これに伴い、削除された送信済みのメッセージへのポインタが、送信処理待ちキュー130から削除される。その後、処理はステップS440に進む。ステップS440においては、制御部150は、キュー#Xが空であるか否かを判定する。キュー#Xが空でないと判定された場合、処理はステップS446に進む。一方で、キュー#Xが空であると判定された場合、制御部150は、Tvir=Tvirold+(Tnow-Told)/Qにより仮想時刻Tvirを計算する(ステップS442)。次いで、制御部150は、Tvirold=Tvir, Told=Tnow,Q=Q-1とする(ステップS444)。その後、処理はステップS446に進む。なお、これらの処理は、送信処理に相当する。 As shown in FIG. 11B, in step S432, control unit 150 determines whether MPFO list 141 is empty. If it is determined that the MPFO list 141 is not empty, the control unit 150 selects the highest priority message from the MPFO list 141 (step S434). After that, the process proceeds to step S438. On the other hand, if it is determined that the MPFO list is empty, control unit 150 selects the first message from FIFO list 142 (step S436). After that, the process proceeds to step S438. In step S438, the control unit 150 transmits the message to the destination channel determined by the routing process, deletes the transmitted message from the MPFO list 141 or the FIFO list 142, and removes the pointer from the transmission process waiting queue 130. delete. Along with this, the pointer to the deleted transmitted message is deleted from the queue 130 waiting for transmission processing. The process then proceeds to step S440. In step S440, control unit 150 determines whether or not queue #X is empty. If it is determined that queue #X is not empty, the process proceeds to step S446. On the other hand, if queue #X is determined to be empty, control unit 150 calculates virtual time Tvir by Tvir=Tvirold+(Tnow-Told)/Q (step S442). Next, the control unit 150 sets Tvirold=Tvir, Told=Tnow, and Q=Q−1 (step S444). After that, the process proceeds to step S446. Note that these processes correspond to the transmission process.

ステップS446においては、制御部150は、全てのキューが空であるか否かを判定する。少なくともひとつが空でないと判定された場合、処理はステップS404に戻る。一方で、全てが空であると判定された場合、処理は終了する。 In step S446, control unit 150 determines whether or not all queues are empty. If it is determined that at least one is not empty, the process returns to step S404. On the other hand, if it is determined that all are empty, the process ends.

<<4.比較例について>>
以下、上述したゲートウェイ100と、典型的なゲートウェイとを比較する。
<<4. About the comparative example>>
In the following, the gateway 100 described above is compared with a typical gateway.

(1)比較例の説明
図12は、比較例に係るゲートウェイ200の構成の一例を示す図である。図12に示すように、比較例に係るゲートウェイ200は、6チャネルのネットワークインタフェース210、及びMPFOリスト241及びFIFOリスト242を含む。ゲートウェイ200は、ゲートウェイ100と異なり、受信バッファ、送信バッファ、及びキューを含まない。メッセージが到来すると、ゲートウェイ200は、メッセージのルーティング処理を行い、メッセージに対応するデータ構造にメッセージを記憶する。次いで、ゲートウェイ200は、記憶したメッセージの送信処理を行う。図12に示した例では、チャネル#1にメッセージ10が到来すると、ゲートウェイ200は、メッセージ10のルーティング処理を行い、MPFOリスト241にメッセージを記憶する。そして、ゲートウェイ200は、MPFOリスト241に記憶されたメッセージをチャネル#6から送信する。
(1) Description of Comparative Example FIG. 12 is a diagram showing an example of a configuration of a gateway 200 according to a comparative example. As shown in FIG. 12 , the gateway 200 according to the comparative example includes a 6-channel network interface 210 , an MPFO list 241 and a FIFO list 242 . Gateway 200, unlike gateway 100, does not include receive buffers, transmit buffers, and queues. When a message arrives, gateway 200 performs message routing processing and stores the message in a data structure corresponding to the message. Gateway 200 then processes the transmission of the stored message. In the example shown in FIG. 12 , when message 10 arrives on channel # 1 , gateway 200 performs routing processing for message 10 and stores the message in MPFO list 241 . Gateway 200 then transmits the message stored in MPFO list 241 from channel #6.

ゲートウェイ200においてメッセージの損失を回避するための単純な解決策は、十分に強力な計算機(以下、CPU)を搭載することである。例えば、500kbpsのシリアルバスのCANにおいては、最短のメッセージである1バイトのメッセージは約100[μs](マイクロ秒)で受信される。即ち、ゲートウェイ200が1バイトのメッセージの最初のビットから最後のビットまでを受信するのに100[μs]かかる。受信したメッセージの全てを100[μs]以内で処理可能なCPUがゲートウェイ200に搭載される場合、メッセージの損失は回避可能である。 A simple solution to avoid message loss in gateway 200 is to equip it with a sufficiently powerful computer (hereafter CPU). For example, in a 500 kbps serial bus CAN, a 1-byte message, which is the shortest message, is received in about 100 [μs] (microseconds). That is, it takes 100 [μs] for the gateway 200 to receive from the first bit to the last bit of a 1-byte message. If the gateway 200 is equipped with a CPU capable of processing all received messages within 100 [μs], message loss can be avoided.

一方で、最長のメッセージである8バイトのメッセージは、約200[μs]で受信される。バッファーオーバーランを回避するためには、8バイトのメッセージも、100[μs]以内に処理可能であることが望ましい。8バイトのメッセージの処理中にも、1バイトのメッセージが到来し得るためである。従って、ワーストケースは、チャネルごとに1メッセージが到来し、各メッセージがCANにおける最大長(8バイト)を有し、到来したメッセージの最初の1ビットが受信されたときからメッセージの処理が開始されるケースである。ワーストケースにおいてメッセージの損失を回避するための条件は、例えばゲートウェイ200が8チャネルを有する場合、CPUが100/8=12.5[μs]以内に8バイトのメッセージを処理することである。 On the other hand, an 8-byte message, which is the longest message, is received in approximately 200 [μs]. In order to avoid buffer overrun, it is desirable that even an 8-byte message can be processed within 100 [μs]. This is because a 1-byte message can arrive while an 8-byte message is being processed. Thus, the worst case is one message per channel arriving, each message having the maximum length in CAN (8 bytes), and message processing starting when the first bit of the incoming message is received. is the case. The condition for avoiding message loss in the worst case is, for example, if the gateway 200 has 8 channels, the CPU processes an 8-byte message within 100/8=12.5 [μs].

しかし、典型的なチャネル数(6~8CANチャネル)及び典型的な車載用CPU(クロック速度が100MHz程度)では、上記条件を満たすことは困難である。上記条件を満たすためには、クロック速度200MHz程度であり及び/又はマルチコアを有する強力なCPUが採用されることが望ましい。しかし、このような強力なCPUの採用は、コストに悪影響を及ぼす。CAN-FDでは、データレートが高くメッセージが長いため、この悪影響は強まる。 However, with a typical number of channels (6 to 8 CAN channels) and a typical automotive CPU (with a clock speed of about 100 MHz), it is difficult to satisfy the above conditions. In order to satisfy the above conditions, it is desirable to adopt a powerful CPU with a clock speed of about 200 MHz and/or with multiple cores. However, employing such a powerful CPU has a negative impact on cost. In CAN-FD, this adverse effect is exacerbated by the high data rates and long messages.

その上、十分に強力なCPUが採用されて、メッセージの損失が回避されたとしても、メッセージの送信に遅延が生じるおそれが残る。なぜならば、バスの負荷が高い状態においては、ゲートウェイ200は、メッセージの受信を送信よりも優先して、受信したメッセージを送信せずに蓄積し得るためである。例えば、無線でのリプログラミングセッション(over-the-air reprogramming session)においては、ゲートウェイ200は、優先度の低いリプログラミングメッセージを大量に受信すると同時に優先度の高い制御メッセージも受信し得る。メッセージの損失を回避するためにメッセージの受信が優先される場合、優先度の高い制御メッセージを即時送信することが困難となる。このような事態は、リアルタイムシステムでは到底許容されない。 Moreover, even if a sufficiently powerful CPU were employed to avoid message loss, there would still be the possibility of delays in sending messages. This is because, under heavy bus loads, the gateway 200 may prioritize message reception over transmission and store received messages without transmitting them. For example, in an over-the-air reprogramming session, gateway 200 may receive a large number of low priority reprogramming messages while also receiving high priority control messages. Immediate transmission of high priority control messages becomes difficult when message reception is prioritized to avoid message loss. Such a situation is absolutely unacceptable in a real-time system.

メッセージの受信よりも送信を優先することも考えられる。しかし、その場合にはメッセージの損失を回避することが困難になり得る。例えば、上記の無線でのリプログラミングセッションの例においては、ゲートウェイ200は、送信待ちの優先度の低いリプログラミングメッセージを大量にバッファする一方で、高い優先度の制御メッセージの受信に失敗し得る。 It is also conceivable to prioritize sending messages over receiving messages. However, in that case it may be difficult to avoid message loss. For example, in the wireless reprogramming session example above, gateway 200 may have a large buffer of low priority reprogramming messages waiting to be sent, while failing to receive high priority control messages.

車載システムのようなリアルタイムシステムの要求を満たすためには、ゲートウェイ200におけるメッセージの受信と送信との間で絶妙なバランスをとることが求められる。そしてこの絶妙なバランスを、メッセージの受信又は送信のいずれを優先するか、といった単純な戦略で実現することは困難である。 A fine balance between receiving and sending messages at the gateway 200 is required to meet the demands of real-time systems such as in-vehicle systems. And it is difficult to achieve this delicate balance with a simple strategy such as giving priority to receiving or sending messages.

(2)比較例との比較
本発明の一実施形態(第1又は第2の実施形態)に係るゲートウェイ100は、チャネル数Nよりも多いM個のキューを有し、M個のキューの各々に記憶されたメッセージから所定の優先順位付けアルゴリズムに従って選択したメッセージに、計算リソースを割り当てる。これにより、メッセージの損失を回避するための条件が緩和される。メッセージの損失を回避するための条件は、x[μs]で受信したメッセージをx/M[μs]以内に処理すること、である。
(2) Comparison with Comparative Example A gateway 100 according to an embodiment (first or second embodiment) of the present invention has M queues, which are larger than the number of channels N, and each of the M queues Allocate computational resources to messages selected according to a predetermined prioritization algorithm from the messages stored in . This relaxes the requirements to avoid message loss. A condition for avoiding message loss is to process messages received in x[μs] within x/M[μs].

例えば、ゲートウェイ100が8チャネル及び9つのキューを有し、1バイトのメッセージを100[μs]以内に受信した場合、100/9=11.1[μs]以内に当該メッセージを処理することが求められる。この処理時間は、ゲートウェイ200と同レベルである。一方で、ゲートウェイ100が8チャネル及び9つのキューを有し、8バイトのメッセージを200[μs]以内に受信した場合、200/9=22[μs]以内に当該メッセージを処理することが求められる。この処理時間は、ゲートウェイ200の約2倍である。即ち、ゲートウェイ100は、ゲートウェイ200に搭載されるCPUの約半分の処理能力CPUでも、メッセージの損失を回避することが可能である。 For example, if the gateway 100 has 8 channels and 9 queues and receives a 1-byte message within 100 [μs], it is required to process the message within 100/9=11.1 [μs]. be done. This processing time is at the same level as gateway 200 . On the other hand, if the gateway 100 has 8 channels and 9 queues and receives an 8-byte message within 200 [μs], it is required to process the message within 200/9=22 [μs]. . This processing time is approximately double that of gateway 200 . In other words, the gateway 100 can avoid message loss even with a CPU having about half the processing power of the CPU installed in the gateway 200 .

さらに、本実施形態では、計算リソースの(M-N)/Mが、メッセージの送信のために割り当てられる。例えば、9つのキューを有する8チャネルのゲートウェイでは、計算リソース(例えば、CPUの処理時間)の11%はメッセージの送信に費やされる。もちろん、キューの数は、チャネル数、及びCPUの計算リソースのうちメッセージに送信に割り当てる割合の要求に応じて、任意に調整可能である。 Further, in this embodiment, (MN)/M of computational resources are allocated for transmission of messages. For example, in an 8-channel gateway with 9 queues, 11% of computational resources (eg, CPU processing time) are spent sending messages. Of course, the number of queues can be adjusted arbitrarily depending on the number of channels and the desired percentage of the CPU's computational resources to allocate to sending messages.

このように、ゲートウェイ100は、処理能力の低い(即ち、コストが安い)CPUでもメッセージの損失を回避することができる。また、ゲートウェイ100は、受信メッセージの負荷が高い状況でも、送信機会を確保することができる。 In this way, the gateway 100 can avoid message loss even with low processing power (ie, low cost) CPUs. In addition, the gateway 100 can secure transmission opportunities even when the load of received messages is high.

<<5.補足>>
以上、添付図面を参照しながら本発明の好適な実施形態について詳細に説明したが、本発明はかかる例に限定されない。本発明の属する技術の分野における通常の知識を有する者であれば、特許請求の範囲に記載された技術的思想の範疇内において、各種の変更例または修正例に想到し得ることは明らかであり、これらについても、当然に本発明の技術的範囲に属するものと了解される。
<<5. Supplement >>
Although the preferred embodiments of the present invention have been described in detail above with reference to the accompanying drawings, the present invention is not limited to such examples. It is obvious that a person having ordinary knowledge in the technical field to which the present invention belongs can conceive of various modifications or modifications within the scope of the technical idea described in the claims. It is understood that these also naturally belong to the technical scope of the present invention.

なお、本明細書において説明したゲートウェイ100は、単独の装置として実現されてもよく、一部または全部が別々の装置として実現されても良い。例えば、図1に示したゲートウェイ100の機能構成例のうち、制御部150は、ゲートウェイ100を制御するコンピュータ等の制御装置に備えられていても良い。その場合、ネットワークインタフェース110、ルーティング処理待ちキュー120、送信処理待ちキュー130、及び第3の記憶部140の状態や記憶されたメッセージを示す情報が制御装置に送信される。そして、制御装置内の制御部150は、受信した情報に対する各種処理を行う。 Note that the gateway 100 described herein may be implemented as a single device, or partially or wholly may be implemented as separate devices. For example, in the functional configuration example of the gateway 100 shown in FIG. In this case, information indicating the states of the network interface 110, the routing process waiting queue 120, the transmission process waiting queue 130, and the third storage unit 140 and the stored messages is sent to the control device. Then, the control unit 150 in the control device performs various processes on the received information.

また、本明細書において説明したゲートウェイ100による一連の処理は、ソフトウェア、ハードウェア、及びソフトウェアとハードウェアとの組合せのいずれを用いて実現されてもよい。ソフトウェアを構成するプログラムは、例えば、ゲートウェイ100の内部又は外部に設けられる記憶媒体(非一時的な媒体:non-transitory media)に予め格納される。そして、当該プログラムは、例えば、コンピュータによる実行時にRAMに読み込まれ、CPUなどのプロセッサにより実行される。 Also, the series of processes by the gateway 100 described herein may be implemented using software, hardware, or a combination of software and hardware. Programs constituting software are stored in advance in a storage medium (non-transitory media) provided inside or outside the gateway 100, for example. Then, for example, the program is read into a RAM when executed by a computer, and executed by a processor such as a CPU.

また、本明細書においてフローチャート及びシーケンス図を用いて説明した処理は、必ずしも図示された順序で実行されなくてもよい。いくつかの処理ステップは、並列的に実行されてもよい。また、追加的な処理ステップが採用されてもよく、一部の処理ステップが省略されてもよい。 Also, the processes described in this specification using flowcharts and sequence diagrams do not necessarily have to be executed in the illustrated order. Some processing steps may be performed in parallel. Also, additional processing steps may be employed, and some processing steps may be omitted.

なお、上記で引用した参考文献は、以下の通りである。
[1]Sergio Campoy-Martinez, Vincent Bidault: “Method and device for transmitting frames between two CAN buses”, WO2014127866 (A1), Renault S.A.S., priority date 2013/02/21
[2]John Nagle: "On packet switches with infinite storage," RFC 970, IETF, December 1985.
[3]Albert Greenberg, Neal Madras: “How fair is fair queuing?”, Journal of the ACM, Volume 39 Issue 3, July 1992, pp. 568-598.
The references cited above are as follows.
[1] Sergio Campoy-Martinez, Vincent Bidault: “Method and device for transmitting frames between two CAN buses”, WO2014127866 (A1), Renault SAS, priority date 2013/02/21
[2] John Nagle: "On packet switches with infinite storage," RFC 970, IETF, December 1985.
[3] Albert Greenberg, Neal Madras: "How fair is fair queuing?", Journal of the ACM, Volume 39 Issue 3, July 1992, pp. 568-598.

100 ゲートウェイ
110 ネットワークインタフェース
111 第4の記憶部、受信バッファ
112 第5の記憶部、送信バッファ
120 第1の記憶部、ルーティング処理待ちキュー
130 第2の記憶部、送信処理待ちキュー
140 第3の記憶部
141 MPFOリスト
142 FIFOリスト
150 制御部
200 比較例係るゲートウェイ
REFERENCE SIGNS LIST 100 gateway 110 network interface 111 fourth storage unit, reception buffer 112 fifth storage unit, transmission buffer 120 first storage unit, routing processing waiting queue 130 second storage unit, transmission processing waiting queue 140 third storage Part 141 MPFO list 142 FIFO list 150 Control part 200 Gateway according to the comparative example

Claims (11)

N個のネットワークに接続され、異なるネットワーク間でメッセージを中継する車載用ゲートウェイ装置(100)であって、
N個の前記ネットワークの各々から受信したメッセージのうちルーティング処理待ちのメッセージを記憶するN個の第1の記憶部(120)と、
前記ルーティング処理後であって送信処理待ちのメッセージを示す情報を記憶する1つ以上の第2の記憶部(130)と、
前記ルーティング処理待ちのメッセージ及び前記送信処理待ちのメッセージの中から1つのメッセージを処理対象として選択し、前記処理対象のメッセージの前記ルーティング処理又は前記送信処理に計算リソースを割り当てる制御部(150)と、
を備え
前記制御部(150)は、前記第1の記憶部(120)及び前記第2の記憶部(130)から1つの記憶部(120又は130)を選択し、選択された記憶部(120又は130)に対応するメッセージを前記処理対象として選択し、
前記制御部(150)は、空でない前記第1の記憶部(120)及び前記第2の記憶部(130)からラウンドロビン方式で1つの前記記憶部(120又は130)を選択する、
車載用ゲートウェイ装置(100)。
An in-vehicle gateway device (100) connected to N networks and relaying messages between different networks,
N first storage units (120) for storing messages awaiting routing processing among messages received from each of the N networks;
one or more second storage units (130) that store information indicating messages that have been routed and are waiting for transmission;
a control unit (150) that selects one message as a processing target from the messages waiting for routing processing and the messages waiting for transmission processing, and allocates computational resources to the routing processing or the transmission processing of the message to be processed; ,
with
The control unit (150) selects one storage unit (120 or 130) from the first storage unit (120) and the second storage unit (130), ) is selected as the processing target, and
The control unit (150) selects one storage unit (120 or 130) from the non-empty first storage unit (120) and the second storage unit (130) in a round-robin fashion.
An in-vehicle gateway device (100).
前記制御部は、前記ルーティング処理待ちのメッセージ及び前記送信処理待ちのメッセージの各々の処理の終了予定時刻を計算し、前記終了予定時刻が最も早いメッセージを前記処理対象として選択する、請求項に記載の車載用ゲートウェイ装置(100)。 2. The control unit according to claim 1 , wherein said control unit calculates an estimated end time of processing of each of said message waiting for routing processing and said message waiting for transmission processing, and selects a message with the earliest estimated end time as said processing target. An in-vehicle gateway device (100) as described. 前記制御部は、計算対象のメッセージと同一の前記記憶部(120又は130)に記憶されるメッセージであって前記計算対象のメッセージの前に処理されるメッセージの前記終了予定時刻又は前記計算対象のメッセージが前記記憶部(120又は130)に記憶された時刻のうち遅い方に、前記計算対象のメッセージの処理時間を加算することで、前記計算対象のメッセージの前記終了予定時刻を計算する、請求項に記載の車載用ゲートウェイ装置(100)。 The control unit controls the scheduled end time of a message to be processed before the message to be calculated, which is stored in the same storage unit (120 or 130) as the message to be calculated, or the message to be calculated. calculating the scheduled end time of the message to be calculated by adding the processing time of the message to be calculated to the later one of the times when the message was stored in the storage unit (120 or 130); Item 3. The in-vehicle gateway device (100) according to item 2. 前記制御部は、計算対象のメッセージと同一の記憶部(120又は130)に記憶されるメッセージであって前記計算対象のメッセージより先に処理されるメッセージの前記終了予定時刻又は仮想時刻のうち遅い方に、前記計算対象のメッセージの処理時間を加算することで、前記計算対象のメッセージの前記終了予定時刻を計算し、
前記仮想時刻は、現在の実時刻と前記仮想時刻の前回更新時の実時刻との差を、前記第1の記憶部(120)及び前記第2の記憶部(130)のうち空でない記憶部(120又は130)の数で割った値を、前回更新時の前記仮想時刻に加算することで更新される、請求項に記載の車載用ゲートウェイ装置(100)。
The control unit controls the later of the scheduled end time or the virtual time of a message that is stored in the same storage unit (120 or 130) as the message to be calculated and that is processed before the message to be calculated. calculating the scheduled end time of the calculation target message by adding the processing time of the calculation target message to the calculation target message,
The virtual time stores the difference between the current real time and the real time at the last update of the virtual time in one of the first storage unit (120) and the second storage unit (130) that is not empty. 3. The in-vehicle gateway device (100) according to claim 2 , updated by adding a value obtained by dividing by the number (120 or 130) to said virtual time at the previous update.
前記処理時間は、前記計算対象のメッセージのサイズに依存する、請求項又はに記載の車載用ゲートウェイ装置(100)。 5. The in-vehicle gateway device (100) according to claim 3 or 4 , wherein the processing time depends on the size of the message to be calculated. 前記処理時間は、前記計算対象のメッセージに適用される処理の種類に依存する、請求項のいずれか一項に記載の車載用ゲートウェイ装置(100)。 The in-vehicle gateway device (100) according to any one of claims 3 to 5 , wherein said processing time depends on the type of processing applied to said message to be calculated. 前記車載用ゲートウェイ装置(100)は、前記送信処理待ちのメッセージを記憶する第3の記憶部(140)をさらに備え、
前記第2の記憶部(130)は、前記第3の記憶部(140)に記憶された前記送信処理待ちのメッセージへのポインタを記憶する、請求項1~のいずれか一項に記載の車載用ゲートウェイ装置(100)。
The in-vehicle gateway device (100) further comprises a third storage unit (140) for storing the messages waiting for transmission processing,
The second storage unit (130) according to any one of claims 1 to 6 , wherein the second storage unit (130) stores pointers to the messages waiting for transmission processing stored in the third storage unit (140). An in-vehicle gateway device (100).
前記第3の記憶部(140)は、MPFOリスト(141)又はFIFOリスト(142)の少なくともいずれかを含む、請求項に記載の車載用ゲートウェイ装置(100)。 8. The in-vehicle gateway device (100) according to claim 7 , wherein said third storage unit (140) includes at least one of an MPFO list (141) and a FIFO list (142). N個の前記ネットワークの各々から受信したメッセージを記憶するN個の第4の記憶部(111)をさらに備え、
前記制御部は、前記第4の記憶部(111)に記憶されたメッセージを前記第1の記憶部(120)に移動させる処理に、前記ルーティング処理及び前記送信処理に優先して前記計算リソースを割り当てる、請求項1~のいずれか一項に記載の車載用ゲートウェイ装置(100)。
further comprising N fourth storage units (111) for storing messages received from each of the N networks;
The control unit allocates the computing resources to the processing of moving the message stored in the fourth storage unit (111) to the first storage unit (120), prior to the routing processing and the transmission processing. In-vehicle gateway device (100) according to any one of claims 1 to 8 , allocating.
N個のネットワークに接続され、異なるネットワーク間でメッセージを中継する車載用ゲートウェイ装置(100)により実行される方法であって、
N個の前記ネットワークの各々から受信したメッセージのうちルーティング処理待ちのメッセージをN個の第1の記憶部(120)に記憶するステップ(S104又はS306)と、
前記ルーティング処理後であって送信処理待ちのメッセージを示す情報を1つ以上の第2の記憶部(130)に記憶するステップ(S212、S214、S412、又はS414)と、
前記ルーティング処理待ちのメッセージ及び前記送信処理待ちのメッセージの中から1つのメッセージを処理対象として選択し、前記処理対象のメッセージの前記ルーティング処理又は前記送信処理に計算リソースを割り当てるステップ(S208、S218、S222、S408、S434又はS436、及びS212、S214、S224、S412、S414、又はS438)と、
を含み、
前記処理対象のメッセージの前記ルーティング処理又は前記送信処理に計算リソースを割り当てるステップにおいて、
前記第1の記憶部(120)及び前記第2の記憶部(130)から1つの記憶部(120又は130)を選択し、選択された記憶部(120又は130)に対応するメッセージを前記処理対象として選択し、
空でない前記第1の記憶部(120)及び前記第2の記憶部(130)からラウンドロビン方式で1つの前記記憶部(120又は130)を選択する、
方法。
A method performed by an in-vehicle gateway device (100) connected to N networks and relaying messages between different networks, comprising:
a step (S104 or S306) of storing messages awaiting routing processing among messages received from each of the N networks in N first storage units (120);
a step of storing in one or more second storage units (130) information indicating messages that have been routed and are awaiting transmission processing (S212, S214, S412, or S414);
Selecting one message as a processing target from the messages waiting for routing processing and the messages waiting for transmission processing, and allocating computational resources to the routing processing or the transmission processing of the message to be processed (S208, S218, S222, S408, S434 or S436 and S212, S214, S224, S412, S414 or S438);
including
In the step of allocating computational resources to the routing process or the transmission process of the message to be processed,
selecting one storage unit (120 or 130) from the first storage unit (120) and the second storage unit (130), and processing the message corresponding to the selected storage unit (120 or 130) Select as target and
selecting one said storage unit (120 or 130) in a round-robin fashion from said first storage unit (120) and said second storage unit (130) that are not empty;
Method.
N個のネットワークに接続され、異なるネットワーク間でメッセージを中継する車載用ゲートウェイ装置(100)を制御するコンピュータに、
N個の前記ネットワークの各々から受信したメッセージのうちルーティング処理待ちのメッセージをN個の第1の記憶部(120)に記憶するステップ(S104又はS306)と、
前記ルーティング処理後であって送信処理待ちのメッセージを示す情報を1つ以上の第2の記憶部(130)に記憶するステップ(S212、S214、S412、又はS414)と、
前記ルーティング処理待ちのメッセージ及び前記送信処理待ちのメッセージの中から1つのメッセージを処理対象として選択し、前記処理対象のメッセージの前記ルーティング処理又は前記送信処理に計算リソースを割り当てるステップ(S208、S218、S222、S408、S434又はS436、及びS212、S214、S224、S412、S414、又はS438)と、
を実行させ
前記処理対象のメッセージの前記ルーティング処理又は前記送信処理に計算リソースを割り当てるステップにおいて、
前記第1の記憶部(120)及び前記第2の記憶部(130)から1つの記憶部(120又は130)が選択され、選択された記憶部(120又は130)に対応するメッセージが前記処理対象として選択され、
空でない前記第1の記憶部(120)及び前記第2の記憶部(130)からラウンドロビン方式で1つの前記記憶部(120又は130)が選択される、
プログラム。
A computer that controls an in-vehicle gateway device (100) that is connected to N networks and relays messages between different networks,
a step (S104 or S306) of storing messages awaiting routing processing among messages received from each of the N networks in N first storage units (120);
a step of storing in one or more second storage units (130) information indicating messages that have been routed and are awaiting transmission processing (S212, S214, S412, or S414);
Selecting one message as a processing target from the messages waiting for routing processing and the messages waiting for transmission processing, and allocating computational resources to the routing processing or the transmission processing of the message to be processed (S208, S218, S222, S408, S434 or S436 and S212, S214, S224, S412, S414 or S438);
and
In the step of allocating computational resources to the routing process or the transmission process of the message to be processed,
One storage unit (120 or 130) is selected from the first storage unit (120) and the second storage unit (130), and the message corresponding to the selected storage unit (120 or 130) is processed. selected as a target
One said storage unit (120 or 130) is selected in a round-robin fashion from said non-empty first storage unit (120) and said second storage unit (130),
program.
JP2018107324A 2018-06-05 2018-06-05 VEHICLE GATEWAY DEVICE, METHOD AND PROGRAM Active JP7122871B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018107324A JP7122871B2 (en) 2018-06-05 2018-06-05 VEHICLE GATEWAY DEVICE, METHOD AND PROGRAM

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018107324A JP7122871B2 (en) 2018-06-05 2018-06-05 VEHICLE GATEWAY DEVICE, METHOD AND PROGRAM

Publications (2)

Publication Number Publication Date
JP2019213043A JP2019213043A (en) 2019-12-12
JP7122871B2 true JP7122871B2 (en) 2022-08-22

Family

ID=68845506

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018107324A Active JP7122871B2 (en) 2018-06-05 2018-06-05 VEHICLE GATEWAY DEVICE, METHOD AND PROGRAM

Country Status (1)

Country Link
JP (1) JP7122871B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024052981A1 (en) * 2022-09-06 2024-03-14 日本電信電話株式会社 Processing device, processing method, and program

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003224594A (en) 2002-01-30 2003-08-08 Nippon Telegr & Teleph Corp <Ntt> Packet scheduling device and its method
KR100542433B1 (en) 2003-06-10 2006-01-11 한국전자통신연구원 Packet scheduling device and packet scheduling method
JP2006333438A (en) 2005-04-28 2006-12-07 Fujitsu Ten Ltd Gateway apparatus and routing method
WO2009107713A1 (en) 2008-02-26 2009-09-03 株式会社オートネットワーク技術研究所 On-vehicle relay connection unit
JP2011234093A (en) 2010-04-27 2011-11-17 Toyota Motor Corp Gateway unit
JP2014204160A (en) 2013-04-01 2014-10-27 本田技研工業株式会社 Gateway unit

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0846627A (en) * 1994-08-01 1996-02-16 Matsushita Electric Ind Co Ltd Cell switch
JP5416168B2 (en) * 2011-05-19 2014-02-12 富士通テレコムネットワークス株式会社 Communication device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003224594A (en) 2002-01-30 2003-08-08 Nippon Telegr & Teleph Corp <Ntt> Packet scheduling device and its method
KR100542433B1 (en) 2003-06-10 2006-01-11 한국전자통신연구원 Packet scheduling device and packet scheduling method
JP2006333438A (en) 2005-04-28 2006-12-07 Fujitsu Ten Ltd Gateway apparatus and routing method
WO2009107713A1 (en) 2008-02-26 2009-09-03 株式会社オートネットワーク技術研究所 On-vehicle relay connection unit
JP2011234093A (en) 2010-04-27 2011-11-17 Toyota Motor Corp Gateway unit
JP2014204160A (en) 2013-04-01 2014-10-27 本田技研工業株式会社 Gateway unit

Also Published As

Publication number Publication date
JP2019213043A (en) 2019-12-12

Similar Documents

Publication Publication Date Title
US6795870B1 (en) Method and system for network processor scheduler
EP1303083B1 (en) Packet scheduling apparatus
US8000247B2 (en) Bandwidth management apparatus
JP5640234B2 (en) Layer 2 packet aggregation and fragmentation in managed networks
US7855960B2 (en) Traffic shaping method and device
KR100463697B1 (en) Method and system for network processor scheduling outputs using disconnect/reconnect flow queues
JP2002164916A (en) Repeater
CN101120571A (en) Optimization method and system for wireless tcp connection
US6952424B1 (en) Method and system for network processor scheduling outputs using queueing
JP2023529883A (en) Packet transfer method, apparatus and electronic device
US20120177036A1 (en) Simple fairness protocols for daisy chain interconnects
CN101567851A (en) Method and equipment for shaping transmission speed of data traffic flow
KR101737516B1 (en) Method and apparatus for packet scheduling based on allocating fair bandwidth
JP7122871B2 (en) VEHICLE GATEWAY DEVICE, METHOD AND PROGRAM
CN113225196A (en) Service level configuration method and device
JP4164771B2 (en) Load balance type switch device and load balance type switch method
CN111756586B (en) Fair bandwidth allocation method based on priority queue in data center network, switch and readable storage medium
US20230117851A1 (en) Method and Apparatus for Queue Scheduling
JP4973452B2 (en) Invalid data removal using WiMAX scheduler latency count
KR20120055947A (en) Method and apparatus for providing Susbscriber-aware per flow
JP4846601B2 (en) Instant service method of short round robin data packet scheduling
US6643702B1 (en) Traffic scheduler for a first tier switch of a two tier switch
US7315901B1 (en) Method and system for network processor scheduling outputs using disconnect/reconnect flow queues
CN114448903A (en) Message processing method, device and communication equipment
JPH11298523A (en) Packet scheduling method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210409

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20211216

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220131

A601 Written request for extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A601

Effective date: 20220321

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220601

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: 20220803

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220809

R151 Written notification of patent or utility model registration

Ref document number: 7122871

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151