In-vehicle system, relay device, and relay method
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-09-21
- Publication Date
- 2026-03-26
AI Technical Summary
Existing in-vehicle relay systems require complex time synchronization and reduce data transmission efficiency due to the need to transmit time information along with data.
The system includes a method where relay devices in different communication paths adjust their relay times based on the difference in the number of relay devices in each path, ensuring simultaneous frame reception without the need for time synchronization or additional time information transmission.
This approach ensures simultaneous frame reception in multiple in-vehicle devices without complicating the control process or reducing data transmission efficiency.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates to an in-vehicle system, a relay device, and a relay method. [Background technology]
[0002] A vehicle is equipped with various types of in-vehicle devices, such as control system ECUs (Electronic Control Units) that control the engine, transmission, etc., body system ECUs that control headlights, power windows, etc., and information system ECUs for navigation devices, multimedia devices, etc. Each in-vehicle device is connected to an in-vehicle network and can communicate with each other.
[0003] In an in-vehicle system in which in-vehicle devices are connected via an in-vehicle network, it is sometimes required that a plurality of in-vehicle devices receive a frame simultaneously. For example, when unlocking the doors, the left and right doors cannot be unlocked simultaneously unless the two in-vehicle devices that control the left and right door locks respectively receive a frame instructing them to unlock the doors simultaneously. Here, if the number of relay devices (i.e., the number of relay stages) in each communication path from the frame transmission source to the two in-vehicle devices that control the door locks is different, the frame will not arrive at the two in-vehicle devices simultaneously due to the delay time required for each relay device to forward the frame.
[0004] Patent Document 1 discloses a relay system in which, when one relay device transmits data (frame) to another relay device, it transmits time information indicating the time when the data should be transmitted to the other relay device. The other relay device transmits data at the time specified by the time information, thereby enabling multiple vehicle-mounted devices to receive data simultaneously. [Prior art documents] [Patent documents]
[0005] [Patent Document 1] JP 2020-205573 A Summary of the Invention [Problem to be solved by the invention]
[0006] However, in the relay system disclosed in Patent Document 1, it is necessary to perform time synchronization using time information, and the configuration and control of each relay device are complicated. In addition, there is also a problem that the data transmission efficiency is reduced because the time information is transmitted together with the data. [Means for solving the problem]
[0007] An in-vehicle system according to one embodiment of the present disclosure includes a first in-vehicle device, a second in-vehicle device, and a plurality of relay devices that relay frames to the first in-vehicle device and the second in-vehicle device. When the number of relay devices in a first communication path from a sender of the frame to the first in-vehicle device is different from the number of relay devices in a second communication path from the sender of the frame to the second in-vehicle device, at least one of the relay devices included in the first communication path and the second communication path waits for a waiting time based on the difference between the number of relay devices in the first communication path and the number of relay devices in the second communication path, and then relays the frame. Effect of the Invention
[0008] According to the present disclosure, it is possible to ensure the simultaneity of frame reception among a plurality of in-vehicle devices without requiring complex control and without reducing data transmission efficiency. [Brief description of the drawings]
[0009] [Figure 1] FIG. 1 is a block diagram showing an example of the configuration of an in-vehicle system according to the embodiment. [Diagram 2] FIG. 2 is a block diagram illustrating an example of a hardware configuration of the relay device according to the embodiment. [Figure 3A] FIG. 3A is a diagram showing a first example of frame transmission in the in-vehicle system according to the embodiment. [Figure 3B] FIG. 3A is a diagram showing a second example of frame transmission in the in-vehicle system according to the embodiment. [Figure 4A] FIG. 11 is a diagram for explaining a relay table. [Figure 4B] FIG. 11 is a diagram for explaining a relay table. [Figure 4C] FIG. 11 is a diagram for explaining a relay table. [Figure 4D] FIG. 11 is a diagram for explaining a relay table. [Figure 4E] FIG. 11 is a diagram for explaining a relay table. [Figure 4F] FIG. 11 is a diagram for explaining a relay table. [Diagram 5] FIG. 5 is a functional block diagram illustrating an example of functions of the relay device according to the embodiment. [Figure 6] FIG. 6 is a flowchart illustrating an example of a frame relay operation in the relay device according to the embodiment. [Figure 7] FIG. 7 is a block diagram showing a modified example of the configuration of the in-vehicle system according to the embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] <Overview of the embodiment of the present disclosure> Below, an overview of the embodiments of the present disclosure will be listed and described.
[0011] (1) The in-vehicle system according to the present embodiment includes a first in-vehicle device, a second in-vehicle device, and a plurality of relay devices that relay frames to the first in-vehicle device and the second in-vehicle device. When the number of relay devices in a first communication path from a source of the frame to the first in-vehicle device is different from the number of relay devices in a second communication path from the source of the frame to the second in-vehicle device, at least one of the relay devices included in the first communication path and the second communication path waits for a waiting time based on the difference between the number of relay devices in the first communication path and the number of relay devices in the second communication path, and then relays the frame. This ensures the simultaneity of frame reception in the first in-vehicle device and the second in-vehicle device without requiring complex processing such as time synchronization. Furthermore, it is not necessary to transmit additional information such as time information together with the frame, and the transmission efficiency of the frame is not reduced.
[0012] (2) In the above (1), when the number of the relay devices in the first communication path is smaller than the number of the relay devices in the second communication path, the relay devices included in the first communication path may wait for the waiting time to relay the frame. This ensures the simultaneity of frame reception by having at least the relay devices included in the first communication path wait.
[0013] (3) In the above (2), the relay device included in the second communication path may relay the frame without waiting, thereby limiting waiting relay devices to relay devices included in the first communication path.
[0014] (4) In any one of (1) to (3) above, the relay device included between the source of the frame and the first branch of the communication path may relay the frame without waiting. This makes it possible to exclude relay devices included between the source of the frame and the first branch of the communication path from being on standby, thereby making it possible to limit the relay devices on standby.
[0015] (5) In any one of (1) to (4) above, when the number of the relay devices in the first communication path is smaller than the number of the relay devices in the second communication path, and when there are multiple relay devices included in the first communication path downstream of the branch of the first communication path from the source, each of the multiple relay devices included in the first communication path downstream of the branch may wait for the same waiting time before relaying the frame. This makes it possible to standardize the waiting time among the multiple relay devices included in the first communication path downstream of the branch, and to easily set the waiting time.
[0016] (6) In any one of (1) to (5) above, when the number of the relay devices in the first communication path is smaller than the number of the relay devices in the second communication path, the relay device included in the first communication path may correct the waiting time based on a communication state of at least one of the communication lines upstream and downstream of the relay device, thereby allowing the relay device to wait for an appropriate time frame to relay based on the communication state of at least one of the communication lines upstream and downstream of the relay device.
[0017] (7) In the above (6), the communication state may be an occupation time of at least one of the upstream and downstream communication lines of a non-target frame, which is a frame different from a target frame to be transmitted to the second in-vehicle device. In this way, when a communication line is occupied by a non-target frame, relaying of the frame is delayed according to the occupation time. With the above configuration, it is possible to appropriately correct the standby time based on the occupation time of the communication line by the non-target frame.
[0018] (8) In the above (7), the correction of the standby time may be performed by subtracting the occupancy time from the standby time. In this way, the standby time can be appropriately corrected by subtracting the occupancy time of the communication line by the non-target frame from the standby time.
[0019] (9) In the above (7) or (8), the non-target frame may be a frame with a higher priority than the target frame. While a frame with a higher priority than the target frame is being transmitted through a communication line, the target frame is not transmitted through the communication line. Therefore, relaying of the frame is delayed according to the occupancy time of the non-target frame with a higher priority. Therefore, the waiting time can be appropriately corrected based on the occupancy time of the communication line by the non-target frame with a higher priority than the target frame.
[0020] (10) The relay device according to the present embodiment is a relay device that relays a frame to an in-vehicle device, and includes a determination unit that determines whether the relay device is included in the first communication path when the number of relay devices in the second communication path from the source of the frame to the second in-vehicle device is greater than the number of relay devices in the first communication path from the source of the frame to the first in-vehicle device, and a control unit that executes a standby process to relay the frame by waiting for a standby time based on a difference between the number of relay devices in the first communication path and the number of relay devices in the second communication path when the determination unit determines that the relay device is included in the first communication path. This makes it possible to ensure the simultaneity of frame reception in the first in-vehicle device and the second in-vehicle device without requiring complex processing such as time synchronization. Furthermore, it is not necessary to transmit additional information such as time information together with the frame, and the transmission efficiency of the frame is not reduced.
[0021] (11) A relay method according to the present embodiment is a method for relaying a frame in an in-vehicle system including a first in-vehicle device, a second in-vehicle device, and a plurality of relay devices that relay a frame to the first in-vehicle device and the second in-vehicle device, and includes a step of, when the number of relay devices in a first communication path from a source of the frame to the first in-vehicle device is different from the number of relay devices in a second communication path from the source of the frame to the second in-vehicle device, at least one of the relay devices included in the first communication path and the second communication path waits for a waiting time based on the difference between the number of relay devices in the first communication path and the number of relay devices in the second communication path, and then relays the frame. This makes it possible to ensure the simultaneity of frame reception in the first in-vehicle device and the second in-vehicle device without requiring complex processing such as time synchronization. Furthermore, it is not necessary to transmit additional information such as time information together with the frame, and the transmission efficiency of the frame is not reduced.
[0022] The present disclosure can be realized not only as an in-vehicle system having the above-described characteristic configuration, a relay device included in the in-vehicle system, and a relay method including characteristic steps executed in the in-vehicle system, but also as a relay program for causing the relay device to execute characteristic processing, or as a semiconductor integrated circuit in which part or all of the relay device is implemented.
[0023] <Details of the embodiment of the present disclosure> Hereinafter, the details of the embodiments of the present invention will be described with reference to the drawings. Note that at least some of the embodiments described below may be combined in any desired manner.
[0024] [1. In-vehicle systems] FIG. 1 is a block diagram showing an example of the configuration of an in-vehicle system according to the embodiment.
[0025] The in-vehicle system 10 is mounted on a vehicle. The in-vehicle system 10 includes ECUs 100_1, 100_2, 100_3, 100_4, and 100_5, and relay devices 200_1, 200_2, 200_3, 200_4, 200_5, 200_6, 200_7, 200_8, and 200_9.
[0026] The relay devices 200_1, 200_2, 200_3, 200_4, 200_5, 200_6, 200_7, 200_8, and 200_9 are connected to the communication lines 300_1, 300_2, 300_3, 300_4, 300_5, 300_6, 300_7, 300_8, 300_9, 300_10, and 300_11 to configure an in-vehicle network. The in-vehicle network according to the present embodiment is a CAN (Controller Area Network) network having a bus-type network topology. Each of the communication lines 300_1, 300_2, 300_3, 300_4, 300_5, 300_6, 300_7, 300_8, 300_9, 300_10, and 300_11 is a communication bus (CAN bus). ECUs 100_1, 100_2, 100_3, 100_4, and 100_5 are communicatively connected to each other via an in-vehicle network.
[0027] In the following description, ECUs 100_1, 100_2, 100_3, 100_4, and 100_5 are collectively referred to as "ECUs 100," relay devices 200_1, 200_2, 200_3, 200_4, 200_5, 200_6, 200_7, 200_8, and 200_9 are collectively referred to as "relay devices 200," and communication lines 300_1, 300_2, 300_3, 300_4, 300_5, 300_6, 300_7, 300_8, 300_9, 300_10, and 300_11 are collectively referred to as "communication lines 300."
[0028] The relay device 200 includes a plurality of communication channels (communication ports) and relays frames between the communication channels. Each of the relay devices 200_1, 200_2, 200_3, 200_5, 200_6, 200_7, 200_8, and 200_9 has two communication channels, 0ch and 1ch. Each of the relay devices 200_1, 200_2, 200_3, 200_5, 200_6, 200_7, 200_8, and 200_9 has two communication channels, 0ch and 1ch. The relay device 200_4 has three communication channels, 0ch, 1ch, and 2ch. In FIG. 1, "0", "1", and "2" attached to the left and right of a block (rectangle shape) indicating each relay device indicate the number of the communication channel.
[0029] The ECU 100_1 is connected to the communication channel "0" of the relay device 200_1 via a communication line 300_1. A communication line 300_2 is connected to the communication channel "1" of the relay device 200_1. The communication line 300_2 branches at a branch point 310_1 in the middle, and a first branch destination is connected to the communication channel "0" of the relay device 200_2 and a second branch destination is connected to the communication channel "0" of the relay device 200_4.
[0030] The communication channel "1" of the relay device 200_2 is connected to the communication channel "0" of the relay device 200_3 via a communication line 300_3. The communication channel "1" of the relay device 200_3 is connected to the ECU 100_3 via a communication line 300_4.
[0031] ECU 100_2 is connected to communication channel "2" of relay device 200_4 via communication line 300_5. A communication line 300_6 is connected to communication channel "1" of relay device 200_4. Communication line 300_6 branches at branch point 310_2, with a first branch destination connected to communication channel "0" of relay device 200_5 and a second branch destination connected to communication channel "0" of relay device 200_7.
[0032] The communication channel "1" of the relay device 200_5 is connected to the communication channel "0" of the relay device 200_6 via a communication line 300_7. The communication channel "1" of the relay device 200_6 is connected to the ECU 100_4 via a communication line 300_8.
[0033] The communication channel "1" of the relay device 200_7 is connected to the communication channel "0" of the relay device 200_8 via a communication line 300_9. The communication channel "1" of the relay device 200_8 is connected to the communication channel "0" of the relay device 200_9 via a communication line 300_10. The communication channel "1" of the relay device 200_9 is connected to the ECU 100_5 via a communication line 300_11.
[0034] Each of the ECUs 100_1, 100_2, 100_3, 100_4, and 100_5 is disposed in each part of the vehicle. The ECUs 100_1, 100_2, 100_3, 100_4, and 100_5 individually control the hardware of each part of the vehicle and monitor the state of the hardware of each part of the vehicle. For example, the ECUs 100_1, 100_2, 100_3, 100_4, and 100_5 are ECUs for a control system, a body system, and an information system. The ECU 100 is an example of an "on-vehicle device."
[0035] The relay device 200 and the ECU 100 use a communication protocol for periodically or non-periodically transmitting and receiving messages. In this embodiment, the communication protocol is CAN or CAN FD (CAN with Flexible Data Rate).
[0036] The relay device 200 functions as a gateway that relays communication between a plurality of ECUs 100. The ECUs 100 can transmit frames. The frames are messages that comply with the CAN standard.
[0037] The ECUs 100 are connected to each other via a plurality of relay devices 200. That is, a frame transmitted from an ECU 100 is relayed by the plurality of relay devices 200 in multiple stages.
[0038] [2. Hardware configuration of relay device] 2 is a block diagram showing an example of a hardware configuration of a relay device according to this embodiment. The relay device 200 includes a processor 201, a non-volatile memory 202, a volatile memory 203, and communication interfaces (hereinafter also referred to as "communication I / F") 204A, 204B, and 204C. The processor 201, the non-volatile memory 202, the volatile memory 203, and the communication I / Fs 204A, 204B, and 204C are connected to each other by a bus 206.
[0039] The volatile memory 203 is, for example, a semiconductor memory such as a static random access memory (SRAM) or a dynamic random access memory (DRAM). The non-volatile memory 202 is, for example, a flash memory, a hard disk, a read only memory (ROM), etc. The non-volatile memory 202 stores a relay program 210, which is a computer program, and data used for executing the relay program 210. The functions of the relay device 200, which will be described later, are realized by the processor 201 executing the relay program 210.
[0040] The processor 201 is, for example, a CPU (Central Processing Unit). However, the processor 201 is not limited to a CPU. The processor 201 may be a GPU (Graphics Processing Unit). In a specific example, the processor 201 is a multi-core processor. The processor 201 may be a single-core processor. The processor 201 is configured to be able to execute a computer program. However, the processor 201 may be, for example, an ASIC (Application Specific Integrated Circuit) or a programmable logic device such as an FPGA (Field Programmable Gate Array). In this case, the ASIC or the programmable logic device is configured to be able to execute the same function as the relay program 210.
[0041] The communication I / Fs 204A, 204B, and 204C are communication interfaces (CAN interfaces) that comply with CAN. Each of the communication I / Fs 204A, 204B, and 204C includes a communication port that is a communication channel. For example, the communication I / F 204A corresponds to the communication channel "0", the communication I / F 204B corresponds to the communication channel "1", and the communication I / F 204C corresponds to the communication channel "2". FIG. 2 shows the configuration of the relay device 200_4 having three communication channels "0", "1", and "2". In the relay devices 200_1, 200_2, 200_3, 200_5, 200_6, 200_7, 200_8, and 200_9 having two communication channels "0" and "1", the communication I / F 204C can be omitted.
[0042] A relay table 211 used for relaying frames is stored in the non-volatile memory 202. The relay table 211 will be described later.
[0043] A buffer 205 is configured using a partial area of the volatile memory 203. The buffer 205 temporarily stores frames to be relayed.
[0044] [3. Waiting for frame relay] The frame relay standby in this embodiment will be described below.
[0045] The in-vehicle system 10 according to this embodiment relays a frame transmitted from a transmission source to a plurality of ECUs 100 at a plurality of relay devices 200, so that the frame arrives at the plurality of destination ECUs 100 simultaneously.
[0046] FIG. 3A is a diagram showing a first example of frame transmission in the in-vehicle system according to the embodiment.
[0047] In the first example, an ECU 100_1 transmits a frame having a CAN ID (hereinafter, simply referred to as "ID") of 100 (hereinafter, a frame to be waited for in relaying is also referred to as a "target frame"), and the ECUs 100_3, 100_4, and 100_5 receive the target frame. In Fig. 3A, the dashed arrow indicates the communication path of the target frame.
[0048] The target frame transmitted from the ECU 100_1 to the communication line 300_1 is received by the relay device 200_1 through the communication channel "0." The relay device 200_1 transmits the target frame through the communication channel "1."
[0049] The communication line 300_2 branches at a branch point 310_1. The target frame is received through the communication line 300_2 by the communication channel "0" of the relay device 200_2 and by the communication channel "0" of the relay device 200_4.
[0050] The relay device 200_2 transmits the received target frame from the communication channel "1" to the communication line 300_3. The target frame is received by the communication channel "0" of the relay device 200_3 through the communication line 300_3. The relay device 200_3 transmits the received target frame from the communication channel "1" to the communication line 300_4. The target frame transmitted on the communication line 300_4 is received by the ECU 100_3.
[0051] The relay device 200_4 transmits the received target frame from the communication channel "1" to the communication line 300_6. The communication line 300_6 branches at a branch point 310_2. The target frame is received by the communication channel "0" of the relay device 200_5 and the communication channel "0" of the relay device 200_7 through the communication line 300_6.
[0052] Here, the relay device 200_4 does not transmit the target frame from the communication channel "2." Therefore, the target frame is not transmitted to the ECU 100_2.
[0053] The relay device 200_5 transmits the received target frame from the communication channel "1" to the communication line 300_7. The target frame is received by the communication channel "0" of the relay device 200_6 through the communication line 300_7. The relay device 200_6 transmits the received target frame from the communication channel "1" to the communication line 300_8. The target frame transmitted through the communication line 300_8 is received by the ECU 100_4.
[0054] The relay device 200_7 transmits the received target frame from communication channel "1" to communication line 300_9. The target frame is received by communication channel "0" of the relay device 200_8 through the communication line 300_9. The relay device 200_8 transmits the received target frame from communication channel "1" to communication line 300_10. The target frame is received by communication channel "0" of the relay device 200_9 through the communication line 300_10. The relay device 200_9 transmits the received target frame from communication channel "1" to communication line 300_11. The target frame transmitted on the communication line 300_11 is received by the ECU 100_5.
[0055] As described above, the target frame having ID=100 transmitted from ECU 100_1 is transmitted to ECU 100_3 via a communication path including communication line 300_1, relay device 200_1, communication line 300_2, relay device 200_2, communication line 300_3, relay device 200_3, and communication line 300_4 (hereinafter referred to as "communication path A1"). The target frame having ID=100 is transmitted to ECU 100_4 via a communication path including communication line 300_1, relay device 200_1, communication line 300_2, relay device 200_4, communication line 300_6, relay device 200_5, communication line 300_7, relay device 200_6, and communication line 300_8 (hereinafter referred to as "communication path B1"). Furthermore, the target frame with ID=100 is transmitted to ECU 100_5 via a communication path including communication line 300_1, relay device 200_1, communication line 300_2, relay device 200_4, communication line 300_6, relay device 200_7, communication line 300_9, relay device 200_8, communication line 300_10, relay device 200_9, and communication line 300_11 (hereinafter referred to as "communication path C1").
[0056] The in-vehicle system 10 according to the present embodiment transmits the target frame according to the following rules in order to ensure the simultaneity of frame reception in the ECUs 100_3, 100_4, and 100_5 that are destinations of the target frame. (1) Relay device 200 waits to relay the target frame, and adjusts the delay time of relaying the target frame. (2) Each relay device 200 included in the communication path with the largest number of relay devices among the communication paths of the target frame (hereinafter also referred to as the “deepest path”) relays the target frame without waiting. (3) The relay device 200 arranged upstream of the first branch in all communication paths of the target frame relays the target frame without waiting. (4) In a communication path other than the deepest path, a relay device 200 that does not fall under the above-mentioned (2) and (3) waits for a waiting time based on the difference between the number of relay devices 200 in that communication path and the number of relay devices 200 in the deepest path, and then relays the target frame. (5) When there are multiple relay devices waiting to relay the target frame on a communication path other than the deepest path, the standby time of each relay device waiting to relay the target frame is set to the same.
[0057] In the first example, the deepest route is the communication route C1, and the first branch in the communication routes A1, B1, and C1 is the branch point 310_1. Therefore, the relay devices 200_1, 200_4, 200_7, 200_8, and 200_9 do not wait to relay the target frame.
[0058] In Fig. 3A, the numbers written under the blocks representing relay devices indicate the delay time (ms) of relaying the target frame at the relay device. Here, it is assumed that each relay device 200 requires 100 ms to relay the frame. In other words, the reference delay time at the relay device 200 is 100 ms.
[0059] Therefore, the delay time in each of the relay devices 200_1, 200_4, 200_7, 200_8, and 200_9 is 100 ms.
[0060] The number of relay devices 200 on the deepest route (communication route C1) is 5. Therefore, the total delay time on the deepest route is 500 ms.
[0061] The number of relay devices 200 in the communication path A1 is "3". Therefore, the sum of the reference delay times in the communication path A1 is 300 ms. The difference between the number of relay devices 200 in the deepest path, "5", and the number of relay devices 200 in the communication path A1, "3", is "2". If each relay device 200 in the communication path A1 relays the target frame without waiting, the delay time is shorter by 200 ms (100 ms x 2) than in the deepest path. Therefore, this difference in delay time of 200 ms needs to be absorbed in the communication path A1. For this reason, a waiting time of 200 ms is provided in the entire communication path A1. In this case, the ECU 100_1 corresponds to the "source", the ECU 100_3 corresponds to the "first in-vehicle device", and the communication path A1 corresponds to the "first communication path". The ECU 100_5 corresponds to the "second in-vehicle device", and the communication path C1 corresponds to the "second communication path".
[0062] Of the relay devices 200_1, 200_2, and 200_3 included in the communication path A1, the relay device 200_1 is included in the deepest path. Furthermore, the relay device 200_1 is disposed upstream of the branch point 310_1, which is the first branch. Therefore, the relay device 200_1 corresponds to the above-mentioned (2) and (3). Of the relay devices 200_1, 200_2, and 200_3 included in the communication path A1, the relay devices 200_2 and 200_3 do not correspond to (2) and (3). For this reason, in the communication path A1, a standby time is set in the relay devices 200_2 and 200_3.
[0063] In order to satisfy the condition (5), the standby times of the relay devices 200_2 and 200_3 are set to 100 ms, respectively, so that the delay times in the relay devices 200_2 and 200_3 are 200 ms.
[0064] The number of relay devices 200 in the communication path B1 is "4". Therefore, the sum of the reference delay times in the communication path B1 is 400 ms. The difference between the number of relay devices 200 in the deepest path, "5", and the number of relay devices 200 in the communication path B1, "4", is "1". If each relay device 200 in the communication path B1 relays the target frame without waiting, the delay time is shorter by 100 ms (100 ms x 1) than in the deepest path. Therefore, this difference in delay time of 100 ms needs to be absorbed in the communication path B1. For this reason, a waiting time of 100 ms is provided in the entire communication path B1. In this case, the ECU 100_1 corresponds to the "sender", the ECU 100_3 corresponds to the "first in-vehicle device", and the communication path A1 corresponds to the "first communication path". The ECU 100_4 corresponds to the "second in-vehicle device", and the communication path B1 corresponds to the "second communication path".
[0065] Among the relay devices 200_1, 200_4, 200_5, and 200_6 included in the communication path B1, the relay devices 200_1 and 200_4 are included in the deepest path. Furthermore, the relay device 200_1 is disposed upstream of the branch point 310_1, which is the first branch. Therefore, the relay device 200_1 corresponds to the above-mentioned (2) and (3), and the relay device 200_4 corresponds to (2). Among the relay devices 200_1, 200_4, 200_5, and 200_6 included in the communication path B1, the relay devices 200_5 and 200_6 do not correspond to (2) and (3). For this reason, in the communication path B1, a standby time is set in the relay devices 200_5 and 200_6.
[0066] In order to satisfy the condition (5), the standby times of the relay devices 200_5 and 200_6 are set to 50 ms, respectively, so that the delay times in the relay devices 200_5 and 200_6 are 150 ms.
[0067] FIG. 3B is a diagram showing a second example of frame transmission in the in-vehicle system according to the embodiment.
[0068] In the second example, the ECU 100_2 transmits a target frame having an ID of 200, and the ECUs 100_4 and 100_5 receive the target frame. In Fig. 3B, the dashed arrow indicates the communication path of the target frame.
[0069] The target frame transmitted from the ECU 100_2 to the communication line 300_5 is received by the communication channel "2" of the relay device 200_4. The relay device 200_4 transmits the target frame from the communication channel "1".
[0070] The communication line 300_6 branches at a branch point 310_2. The target frame is received through the communication line 300_6 by the communication channel "0" of the relay device 200_5 and the communication channel "0" of the relay device 200_7.
[0071] Here, the relay device 200_4 does not transmit the target frame from the communication channel "0." Therefore, the target frame is not transmitted to the ECUs 100_1 and 100_3.
[0072] The relay device 200_5 transmits the received target frame from the communication channel "1" to the communication line 300_7. The target frame is received by the communication channel "0" of the relay device 200_6 through the communication line 300_7. The relay device 200_6 transmits the received target frame from the communication channel "1" to the communication line 300_8. The target frame transmitted through the communication line 300_8 is received by the ECU 100_4.
[0073] The relay device 200_7 transmits the received target frame from communication channel "1" to communication line 300_9. The target frame is received by communication channel "0" of the relay device 200_8 through the communication line 300_9. The relay device 200_8 transmits the received target frame from communication channel "1" to communication line 300_10. The target frame is received by communication channel "0" of the relay device 200_9 through the communication line 300_10. The relay device 200_9 transmits the received target frame from communication channel "1" to communication line 300_11. The target frame transmitted on the communication line 300_11 is received by the ECU 100_5.
[0074] As described above, the target frame having ID=200 transmitted from ECU 100_2 is transmitted to ECU 100_4 via a communication path including communication line 300_5, relay device 200_4, communication line 300_6, relay device 200_5, communication line 300_7, relay device 200_6, and communication line 300_8 (hereinafter referred to as "communication path A2"). Further, the target frame having ID=200 is transmitted to ECU 100_5 via a communication path including communication line 300_5, relay device 200_4, communication line 300_6, relay device 200_7, communication line 300_9, relay device 200_8, communication line 300_10, relay device 200_9, and communication line 300_11 (hereinafter referred to as "communication path B2").
[0075] In the second example, the deepest route is the communication route B2, and the first branch in the communication routes A2, B2 is the branch point 310_2. Therefore, the relay devices 200_4, 200_7, 200_8, and 200_9 do not wait to relay the target frame.
[0076] Therefore, the delay time in each of the relay devices 200_4, 200_7, 200_8, and 200_9 is 100 ms.
[0077] The number of relay devices 200 on the deepest route (communication route B2) is "4." Therefore, the total delay time on the deepest route is 400 ms.
[0078] The number of relay devices 200 in the communication path A2 is "3". Therefore, the sum of the reference delay times in the communication path A2 is 300 ms. The difference between the number of relay devices 200 in the deepest path, "4", and the number of relay devices 200 in the communication path A2, "3", is "1". If each relay device 200 in the communication path A2 relays the target frame without waiting, the delay time is shorter by 100 ms (100 ms x 1) than in the deepest path. Therefore, this difference in delay time of 100 ms needs to be absorbed in the communication path A2. For this reason, a waiting time of 100 ms is provided in the entire communication path A2. In this case, the ECU 100_2 corresponds to the "source", the ECU 100_4 corresponds to the "first in-vehicle device", and the communication path A2 corresponds to the "first communication path". The ECU 100_5 corresponds to the "second in-vehicle device", and the communication path B2 corresponds to the "second communication path".
[0079] Of the relay devices 200_4, 200_5, and 200_6 included in the communication path A2, the relay device 200_4 is included in the deepest path. Furthermore, the relay device 200_4 is disposed upstream of the branch point 310_2, which is the first branch. Therefore, the relay device 200_4 corresponds to the above-mentioned (2) and (3). Of the relay devices 200_4, 200_5, and 200_6 included in the communication path A2, the relay devices 200_5 and 200_6 do not correspond to (2) and (3). For this reason, in the communication path A2, a standby time is set in the relay devices 200_5 and 200_6.
[0080] In order to satisfy the condition (5), the standby times of the relay devices 200_5 and 200_6 are set to 50 ms, respectively, so that the delay times in the relay devices 200_5 and 200_6 are 150 ms.
[0081] The relay table 211 (see FIG. 2) is used to set the standby time in the relay device 200. FIGs. 4A to 4F are diagrams for explaining the relay table.
[0082] 4A shows the relay table 211_1 of the relay device 200_1. The relay table 211_1 defines setting values for the first example. Since the relay device 200_1 is not used in the second example, the relay table 211_1 does not include setting values for the second example.
[0083] The relay table 211_1 (211) includes the following setting items: the ID (message ID) of the target frame, the communication channel (receiving ch) that receives the target frame, the communication channel (transmitting ch) that transmits the target frame, the communication protocol (receiving protocol) used in the receiving ch, the communication protocol (transmitting protocol) used in the transmitting ch, whether the device itself is included in the deepest route (deepest route), the maximum number of relay stages in all communication routes (deepest stage number), the number of relay stages (route stage number) of the communication route in which the device itself is included, the number of relay devices for which a standby time is set in the communication route in which the device itself is included (standby stage number), the number of stages of the device itself in the communication route (device itself stage number), whether correction is enabled or disabled on the upstream side of the device itself (upstream correction), whether correction is enabled or disabled on the downstream side of the device itself (downstream correction), whether the device itself is located before the first branch or after the first branch (before or after branch), and the reference standby time.
[0084] 3A, in the first example, the ID of the target frame is 100. In the relay device 200_1, the communication channel "0" is the receiving channel of the target frame, and the communication channel "1" is the transmitting channel of the target frame. Therefore, in the relay table 211_1, the receiving ch is set to "0" and the transmitting ch is set to "1" in correspondence with the message ID "100".
[0085] In the first and second examples, communication according to CAN FD is performed between the relay device 200_2 and the relay device 200_3, that is, on the communication line 300_3. Communication according to CAN is performed on the communication lines 300 other than the communication line 300_3.
[0086] In the communication channel "0" on the upstream side of the relay device 200_1, CAN is used as a communication protocol. In the communication channel "1" on the downstream side of the relay device 200_1, CAN is used as a communication protocol. Therefore, in the relay table 211_1, the reception protocol and the transmission protocol are each set to "CAN" in correspondence with the message ID "100".
[0087] In the first example, the deepest route is the communication route C1, and the relay device 200_1 is included in the communication route C1. The number of relay stages of the communication route C1 is "5". Therefore, in the relay table 211_1, the deepest route is set to "YES", the deepest stage is set to "5", and the route stage is set to "5" in correspondence with the message ID "100". Furthermore, all of the relay devices 200_1, 200_4, 200_7, 200_8, and 200_9 included in the communication route C1, which is the deepest route, do not wait in relaying the target frame. Therefore, in the relay table 211_1, the number of wait stages is not set in correspondence with the message ID "100".
[0088] In the communication path C1 (and the communication paths A1 and B1), the stage number of the relay device 200_1 is "1" (i.e., the most upstream relay device). Therefore, in the relay table 211_1, the own device stage number is set to "1" in correspondence with the message ID "100".
[0089] In the first example, the relay device 200_1 is included in the deepest route. Furthermore, the relay device 200_1 is located upstream of the first branch point 310_1. Therefore, the relay device 200_1 does not wait in relaying the target frame. For this reason, in the relay device 200_1, a waiting time is not set, and correction of the waiting time is not necessary. Therefore, in the relay table 211_1, in correspondence with the message ID "100", the upstream correction is set to "invalid", the downstream correction is set to "invalid", before and after the branch is set to "before", and the reference waiting time is set to "0".
[0090] 4B shows the relay table 211_2 of the relay device 200_2. The relay table 211_2 defines setting values for the first example. Since the relay device 200_2 is not used in the second example, the relay table 211_2 does not include setting values for the second example.
[0091] 3A, in the first example, in the relay device 200_2, the communication channel "0" is the receiving channel of the target frame having the ID=100, and the communication channel "1" is the transmitting channel of the target frame. Therefore, in the relay table 211_2, the receiving ch is set to "0" and the transmitting ch is set to "1" in correspondence with the message ID "100."
[0092] In the communication channel "0" on the upstream side of the relay device 200_2, CAN is used as a communication protocol. In the communication channel "1" on the downstream side of the relay device 200_2, CAN FD is used as a communication protocol. Therefore, in the relay table 211_2, the reception protocol is set to "CAN" and the transmission protocol is set to "CAN FD" in correspondence with the message ID "100".
[0093] In the first example, the deepest route is the communication route C1, and the relay device 200_2 is included in a communication route A1 that is different from the deepest route. The number of relay stages of the communication route A1 is "3". Therefore, in the relay table 211_2, the deepest route is set to "NO", the deepest stage is set to "5", and the route stage is set to "3" in correspondence with the message ID "100". In the communication route A1, a standby time is set in the relay devices 200_2 and 200_3. Therefore, in the relay table 211_2, the number of standby stages is set to "2" in correspondence with the message ID "100".
[0094] In the communication route A1, the stage number of the relay device 200_2 is "2" (that is, the second most upstream relay device). Therefore, in the relay table 211_2, the stage number of the own device is set to "2" in correspondence with the message ID "100".
[0095] In the first example, a standby time is set in the relay device 200_2. When the standby time is corrected depending on the communication state between the relay device 200_1 and the relay device 200_2, one of the relay device 200_1 and the relay device 200_2 needs to correct the standby time. Here, as described above, the relay device 200_1 does not correct the standby time, so the relay device 200_2 corrects it depending on the communication state in the upstream communication channel "0" (enabled). When the standby time is corrected depending on the communication state between the relay device 200_2 and the relay device 200_3, one of the relay device 200_2 and the relay device 200_3 needs to correct the standby time. Here, in this embodiment, when a plurality of relay devices 200 are connected in series, each relay device 200 corrects its own standby time based on the communication state in the upstream communication channel. This makes it possible to prevent the same correction from being made twice in two adjacent relay devices. According to this rule, the relay device 200_2 does not correct (disable) the waiting time depending on the communication state in the downstream communication channel "1." Therefore, in the relay table 211_2, the upstream correction is set to "enabled" and the downstream correction is set to "disabled" in correspondence with the message ID "100."
[0096] In the first example, the relay device 200_2 is located downstream of the first branch point 310_1. Therefore, in the relay table 211_2, before and after the branch are set to "after" in correspondence with the message ID "100". Furthermore, as described above, in the first example, the reference waiting time of the relay device 200_2 is 100 ms. Therefore, in the relay table 211_2, the reference waiting time is set to "100" in correspondence with the message ID "100".
[0097] 4C shows the relay table 211_3 of the relay device 200_3. The relay table 211_3 defines setting values for the first example. Since the relay device 200_3 is not used in the second example, the relay table 211_3 does not include setting values for the second example.
[0098] 3A, in the first example, in the relay device 200_3, the communication channel "0" is the receiving channel of the target frame having the ID=100, and the communication channel "1" is the transmitting channel of the target frame. Therefore, in the relay table 211_3, the receiving ch is set to "0" and the transmitting ch is set to "1" in correspondence with the message ID "100."
[0099] The communication channel "0" on the upstream side of the relay device 200_3 uses CAN FD as a communication protocol. The communication channel "1" on the downstream side of the relay device 200_3 uses CAN as a communication protocol. Therefore, in the relay table 211_3, the reception protocol is set to "CAN FD" and the transmission protocol is set to "CAN" in correspondence with the message ID "100".
[0100] In the first example, the relay device 200_3 is included in a communication path A1 that is different from the deepest path. The number of relay stages of the communication path A1 is "3". Therefore, in the relay table 211_3, corresponding to the message ID "100", the deepest path is set to "NO", the deepest stage is set to "5", the path stage is set to "3", and the standby stage is set to "2".
[0101] In the communication route A1, the stage number of the relay device 200_3 is "3" (that is, the third relay device from the most upstream). Therefore, in the relay table 211_3, the stage number of the own device is set to "3" in correspondence with the message ID "100".
[0102] In the first example, a standby time is set in relay device 200_3. According to the above-mentioned rule, relay device 200_2 corrects the standby time based on the communication state in the upstream communication channel "0" (enabled). On the other hand, only relay device 200_3 can correct the standby time based on the communication state between relay device 200_3 and ECU 100_3. For this reason, relay device 200_3 also corrects the standby time based on the communication state in the downstream communication channel "1" (enabled). Therefore, in relay table 211_3, each of the upstream side correction and the downstream side correction is set to "enabled" in correspondence with the message ID "100".
[0103] In the first example, the relay device 200_3 is located downstream of the first branch point 310_1. Therefore, in the relay table 211_3, before and after the branch are set to "after" in correspondence with the message ID "100". Furthermore, as described above, in the first example, the reference waiting time of the relay device 200_3 is 100 ms. Therefore, in the relay table 211_3, the reference waiting time is set to "100" in correspondence with the message ID "100".
[0104] Fig. 4D shows the relay table 211_4 of the relay device 200_4. In the first and second examples, the relay device 200_4 relays the target frame. Therefore, the relay table 211_4 includes setting values for the first example and setting values for the second example. In Fig. 4D, the first line shows setting values for the first example, and the second line shows setting values for the second example.
[0105] 3A, in the first example, in the relay device 200_4, the communication channel "0" is the receiving channel of the target frame having the ID=100, and the communication channel "1" is the transmitting channel of the target frame. Therefore, in the relay table 211_4, the receiving ch is set to "0" and the transmitting ch is set to "1" in correspondence with the message ID "100."
[0106] In the communication channel "0" on the upstream side of the relay device 200_4, CAN is used as a communication protocol. In the communication channel "1" on the downstream side of the relay device 200_4, CAN is used as a communication protocol. Therefore, in the relay table 211_4, the reception protocol and the transmission protocol are each set to "CAN" in correspondence with the message ID "100".
[0107] In the first example, the relay device 200_4 is included in the communication path C1 which is the deepest path. Therefore, in the relay table 211_4, corresponding to the message ID "100", the deepest path is set to "YES", the deepest step number is set to "5", the path step number is set to "5", and the standby step number is not set.
[0108] In the communication path C1, the stage number of the relay device 200_4 is "2" (that is, the second most upstream relay device). Therefore, in the relay table 211_4, the own device stage number is set to "2" corresponding to the message ID "100".
[0109] In the first example, the relay device 200_4 is included in the deepest route. Therefore, the relay device 200_4 does not wait in relaying the target frame. Therefore, in the relay device 200_4, a waiting time is not set, and correction of the waiting time is not necessary. The relay device 200_4 is located downstream of the branch point 310_1. Therefore, in the relay table 211_4, corresponding to the message ID "100", the upstream correction is set to "invalid", the downstream correction is set to "invalid", before and after the branch is set to "after", and the reference waiting time is set to "0".
[0110] 3B, in the second example, in the relay device 200_4, the communication channel "2" is the receiving channel of the target frame having the ID=200, and the communication channel "1" is the transmitting channel of the target frame. Therefore, in the relay table 211_4, the receiving ch is set to "2" and the transmitting ch is set to "1" in correspondence with the message ID "200".
[0111] The communication channel "2" on the upstream side of the relay device 200_4 uses CAN as a communication protocol. The communication channel "1" on the downstream side of the relay device 200_4 uses CAN as a communication protocol. Therefore, in the relay table 211_4, the reception protocol and the transmission protocol are each set to "CAN" in correspondence with the message ID "200".
[0112] In the second example, the deepest route is the communication route B2, and the relay device 200_4 is included in the communication route B1. The number of relay stages of the communication route B1 is "4". Therefore, in the relay table 211_4, the deepest route is set to "YES", the deepest stage is set to "4", and the route stage is set to "4" in correspondence with the message ID "200". Furthermore, all the relay devices 200_4, 200_7, 200_8, and 200_9 included in the communication route B2, which is the deepest route, do not wait in relaying the target frame. Therefore, in the relay table 211_4, the number of wait stages is not set in correspondence with the message ID "200".
[0113] In the communication route B2, the stage number of the relay device 200_4 is "1" (that is, the most upstream relay device). Therefore, in the relay table 211_4, the own device stage number is set to "1" corresponding to the message ID "200".
[0114] In the second example, the relay device 200_4 does not wait in relaying the target frame. Therefore, in the relay device 200_4, a waiting time is not set, and correction of the waiting time is not necessary. The relay device 200_4 is on the upstream side of the branch point 310_2 which is the first branch. Therefore, in the relay table 211_4, corresponding to the message ID "200", the upstream correction is set to "invalid", the downstream correction is set to "invalid", before and after the branch is set to "before", and the reference waiting time is set to "0".
[0115] Fig. 4E shows the relay table 211_5 of the relay device 200_5. In the first and second examples, the relay device 200_5 relays a target frame. Therefore, the relay table 211_5 includes setting values for the first example and setting values for the second example. In Fig. 4E, the first line shows setting values for the first example, and the second line shows setting values for the second example.
[0116] 3A, in the first example, in the relay device 200_5, the communication channel "0" is the receiving channel of the target frame having the ID=100, and the communication channel "1" is the transmitting channel of the target frame. Therefore, in the relay table 211_5, the receiving ch is set to "0" and the transmitting ch is set to "1" in correspondence with the message ID "100."
[0117] In the communication channel "0" on the upstream side of the relay device 200_5, CAN is used as a communication protocol. In the communication channel "1" on the downstream side of the relay device 200_5, CAN is used as a communication protocol. Therefore, in the relay table 211_5, in correspondence with the message ID "100", each of the reception protocol and the transmission protocol is set to "CAN".
[0118] In the first example, the relay device 200_3 is included in a communication path B1 that is different from the deepest path. The number of relay stages of the communication path B1 is "4". Therefore, in the relay table 211_5, the deepest path is set to "NO", the deepest stage is set to "5", and the path stage is set to "4" in correspondence with the message ID "100". In the communication path B1, a standby time is set in the relay devices 200_5 and 200_6. Therefore, in the relay table 211_5, the number of standby stages is set to "2" in correspondence with the message ID "100".
[0119] In the communication path B1, the stage number of the relay device 200_5 is "3" (that is, the third relay device from the most upstream). Therefore, in the relay table 211_5, the own device stage number is set to "3" in correspondence with the message ID "100".
[0120] In the first example, a standby time is set in the relay device 200_5. According to the above-mentioned rule, the relay device 200_5 corrects the standby time according to the communication state in the upstream communication channel "0" (enabled), and does not correct the standby time according to the communication state in the downstream communication channel "0" (disabled). Therefore, in the relay table 211_5, the upstream correction is set to "enabled" and the downstream correction is set to "disabled" in correspondence with the message ID "100".
[0121] In the first example, the relay device 200_5 is located downstream of the first branch point 310_1. Therefore, in the relay table 211_5, before and after branching are set to "after" in correspondence with the message ID "100". Furthermore, as described above, in the first example, the reference waiting time of the relay device 200_5 is 50 ms. Therefore, in the relay table 211_5, the reference waiting time is set to "50" in correspondence with the message ID "100".
[0122] 3B, in the second example, in the relay device 200_5, the communication channel "0" is the receiving channel of the target frame having the ID=200, and the communication channel "1" is the transmitting channel of the target frame. Therefore, in the relay table 211_5, the receiving ch is set to "0" and the transmitting ch is set to "1" in correspondence with the message ID "200."
[0123] In the communication channel "0" on the upstream side of the relay device 200_5, CAN is used as a communication protocol. In the communication channel "1" on the downstream side of the relay device 200_5, CAN is used as a communication protocol. Therefore, in the relay table 211_5, the reception protocol and the transmission protocol are each set to "CAN" in correspondence with the message ID "200".
[0124] In the second example, the relay device 200_5 is included in a communication path A2 that is different from the deepest path. The number of relay stages of the communication path A2 is "3". Therefore, in the relay table 211_5, the deepest path is set to "NO", the deepest stage is set to "4", and the path stage is set to "3" in correspondence with the message ID "200". In the communication path A2, a standby time is set in the relay devices 200_5 and 200_6. Therefore, in the relay table 211_5, the number of standby stages is set to "2" in correspondence with the message ID "200".
[0125] In the communication route A2, the stage number of the relay device 200_5 is "2" (that is, the second most upstream relay device). Therefore, in the relay table 211_5, the stage number of the own device is set to "2" in correspondence with the message ID "200".
[0126] In the second example, a standby time is set in the relay device 200_5. According to the above-mentioned rule, the relay device 200_5 corrects the standby time according to the communication state in the upstream communication channel "0" (enabled), and does not correct the standby time according to the communication state in the downstream communication channel "0" (disabled). Therefore, in the relay table 211_5, the upstream correction is set to "enabled" and the downstream correction is set to "disabled" in correspondence with the message ID "200".
[0127] In the second example, the relay device 200_5 is located downstream of the first branch point 310_2. Therefore, in the relay table 211_5, before and after branching are set to "after" in correspondence with the message ID "200". Furthermore, as described above, in the second example, the reference waiting time of the relay device 200_5 is 50 ms. Therefore, in the relay table 211_5, the reference waiting time is set to "50" in correspondence with the message ID "200".
[0128] Fig. 4F shows the relay table 211_7 of the relay device 200_7. In the first and second examples, the relay device 200_7 relays a target frame. Therefore, the relay table 211_7 includes setting values for the first example and setting values for the second example. In Fig. 4F, the first line shows setting values for the first example, and the second line shows setting values for the second example.
[0129] 3A, in the first example, in the relay device 200_7, the communication channel "0" is the receiving channel of the target frame having the ID=100, and the communication channel "1" is the transmitting channel of the target frame. Therefore, in the relay table 211_7, the receiving ch is set to "0" and the transmitting ch is set to "1" in correspondence with the message ID "100."
[0130] The communication channel "0" on the upstream side of the relay device 200_7 uses CAN as a communication protocol. The communication channel "1" on the downstream side of the relay device 200_7 uses CAN as a communication protocol. Therefore, in the relay table 211_7, the reception protocol and the transmission protocol are each set to "CAN" in correspondence with the message ID "100".
[0131] In the first example, the relay device 200_7 is included in the communication path C1 which is the deepest path. Therefore, in the relay table 211_7, corresponding to the message ID "100", the deepest path is set to "YES", the deepest step number is set to "5", the path step number is set to "5", and the standby step number is not set.
[0132] In the communication route C1, the stage number of the relay device 200_7 is "3" (that is, the third relay device from the most upstream). Therefore, in the relay table 211_7, the own device stage number is set to "3" corresponding to the message ID "100".
[0133] In the first example, the relay device 200_7 does not wait in relaying the target frame. Therefore, in the relay device 200_7, a waiting time is not set, and correction of the waiting time is not necessary. The relay device 200_7 is located downstream of the branch point 310_1. Therefore, in the relay table 211_7, corresponding to the message ID "100", the upstream correction is set to "invalid", the downstream correction is set to "invalid", before and after the branch is set to "after", and the reference waiting time is set to "0".
[0134] 3B, in the second example, in the relay device 200_7, the communication channel "0" is the receiving channel of the target frame having the ID=100, and the communication channel "1" is the transmitting channel of the target frame. Therefore, in the relay table 211_7, the receiving ch is set to "0" and the transmitting ch is set to "1" in correspondence with the message ID "200."
[0135] The communication channel "0" on the upstream side of the relay device 200_7 uses CAN as a communication protocol. The communication channel "1" on the downstream side of the relay device 200_7 uses CAN as a communication protocol. Therefore, in the relay table 211_7, the reception protocol and the transmission protocol are each set to "CAN" in correspondence with the message ID "200".
[0136] In the second example, the relay device 200_7 is included in the communication route B2 which is the deepest route. Therefore, in the relay table 211_7, corresponding to the message ID "200", the deepest route is set to "YES", the deepest step number is set to "4", the route step number is set to "4", and the standby step number is not set.
[0137] In the communication route B2, the stage number of the relay device 200_7 is "2" (that is, the second most upstream relay device). Therefore, in the relay table 211_7, the stage number of the own device is set to "2" in correspondence with the message ID "200".
[0138] In the second example, the relay device 200_7 does not wait in relaying the target frame. Therefore, in the relay device 200_7, a waiting time is not set, and correction of the waiting time is not necessary. The relay device 200_7 is located downstream of the branch point 310_2. Therefore, in the relay table 211_7, corresponding to the message ID "200", the upstream correction is set to "invalid", the downstream correction is set to "invalid", before and after the branch is set to "after", and the reference waiting time is set to "0".
[0139] [4. Functions of relay device] FIG. 5 is a functional block diagram illustrating an example of functions of the relay device according to the embodiment.
[0140] When the processor 201 of the relay device 200 executes the relay program 210, the functions of a judgment unit 221, a decision unit 222, a correction unit 223, a monitoring unit 224, and a control unit 225 are realized.
[0141] The determination unit 221 determines whether or not the own device is a target for waiting in relaying the target frame.
[0142] A more specific description will be given below. When a target frame is received by relay device 200, the target frame is written to buffer 205. When the target frame is written to buffer 205, determination unit 221 acquires an ID from the target frame and determines whether or not the own device is a target for waiting in relaying the target frame.
[0143] The determination unit 221 determines whether the own device is located upstream of the first branch. As described above, the relay device 200 located before the first branch does not wait in relaying the target frame. Therefore, if the own device is located upstream of the first branch, the relay device 200 can determine that the own device is not a target for waiting in relaying the target frame.
[0144] Furthermore, when the number of relay devices 200 in a communication path (second communication path) from the transmission source of the target frame to the ECU 100 that is a destination different from the ECU 100 is greater than the number of relay devices 200 in a communication path (first communication path) from the transmission source of the target frame to the ECU 100 that is a destination, the determination unit 221 determines whether or not the own device is included in the second communication path. That is, the determination unit 221 determines whether or not the communication path in which the own device is included is the deepest path. As described above, the relay device 200 included in the deepest path does not wait in relaying the target frame. Therefore, when the communication path in which the own device is included is the deepest path, the relay device 200 can determine that the own device is not a target of waiting in relaying the target frame. When the relay device 200 is downstream of the first branch and the communication path in which the own device is included is not the deepest path, the relay device 200 can determine that the own device is a target of waiting in relaying the target frame.
[0145] In a specific example, the determination unit 221 refers to the relay table 211 to determine whether or not the own device is located upstream of the first branch, and determines whether or not the communication path including the own device is the deepest path.
[0146] When the judgment unit 221 judges that the communication path including the own device is not the deepest path, the determination unit 222 determines a waiting time based on the difference between the number of relay devices in the communication path including the own device and the number of relay devices in the deepest path (second communication path).
[0147] The difference between the number of relay devices (relay stages) in a communication path including the own device and the number of relay devices (relay stages) in the deepest path is related to the total waiting time in the entire communication path including the own device. For example, in the first example, consider the determination of the waiting time of relay device 200_2. In the first example, the deepest path is communication path C1, and the number of stages is "5." Meanwhile, the number of stages of communication path A1 is "3." Therefore, the difference between the number of stages of communication path C1, "5," and the number of stages of communication path A1, "3," is "2."
[0148] In the communication path C1, since the number of relay stages is "2" more than in the communication path A1, a delay corresponding to the number of stages "2" (i.e., the delay time in each relay device 200, 100 ms x 2) occurs longer than in the communication path A1. In other words, by providing a waiting time of 200 ms in the communication path A1, the communication time in the communication path C1 can be made equal to the communication time in the communication path A1.
[0149] The determination unit 222 determines the number of relay devices 200 (number of waiting stages) that are targets of waiting in relaying the target frame in the communication path including the own device. The targets of waiting in relaying the target frame are relay devices that are downstream of the first branch and are not included in the deepest path. In the communication path A1, the targets of waiting in relaying the target frame are two relay devices, 200_2 and 200_3.
[0150] The determination unit 222 determines the result of dividing the sum of standby times in the communication path including the own device by the number of standby stages as the reference standby time of the own device. In the first example, 200 ms÷2=100 ms is the standby time of the relay device 200_2.
[0151] As a specific example, the determination unit 222 can determine the reference standby time specified in the relay table 211 as the standby time of the own device.
[0152] The correction unit 223 corrects the standby time based on the communication state of at least one of the communication lines 300 on the upstream side and downstream side of the own device.
[0153] The monitor 224 monitors the communication state of at least one of the communication lines 300 on the upstream side and downstream side of the relay device 200. The corrector 223 corrects the standby time based on the communication state monitored by the monitor 224. This will be described in detail below.
[0154] The correction unit 223 determines whether to enable or disable the correction on the upstream side of the own device. When the correction on the upstream side of the own device is enabled, the correction unit 223 determines a first correction value based on the communication state of the communication line 300 on the upstream side of the own device. When the correction on the upstream side of the own device is disabled, the correction unit 223 does not determine the first correction value.
[0155] The correction unit 223 determines whether to enable or disable the correction on the downstream side of the own device. When the correction on the downstream side of the own device is enabled, the correction unit 223 determines a second correction value based on the communication state of the communication line 300 on the downstream side of the own device. When the correction on the downstream side of the own device is disabled, the correction unit 223 does not determine the second correction value.
[0156] For example, the correction unit 223 can refer to the setting values of the upstream correction and the downstream correction in the relay table 211 to determine whether to enable or disable the correction on the upstream side and the downstream side of the own device.
[0157] In a specific example, the communication state in the upstream communication line 300 is the occupancy time in the upstream communication line 300 of a non-target frame, which is a frame different from the target frame.
[0158] In a CAN frame, the CAN ID indicates priority; the smaller the CAN ID, the higher the priority of the frame. For example, a frame with a CAN ID of "99" has a higher priority than a frame with a CAN ID of "100." In other words, frames with a CAN ID of "99" or less are non-target frames. While a non-target frame is being transmitted on a communication line 300, a target frame cannot be transmitted on that communication line 300. Therefore, during the period when a non-target frame is occupying the communication line 300, the transmission of the target frame is delayed.
[0159] Here, correction of the target time in relay device 200_2 in the first example will be considered. In the first example, the CAN ID of the target frame is "100". Therefore, monitor unit 224 monitors the occupancy time of frames whose CAN ID is 99 or less on upstream communication line 300_2 (communication channel "0"). Similarly, monitor unit 224 monitors the occupancy time of frames whose CAN ID is 99 or less on downstream communication line 300_3 (communication channel "1").
[0160] For example, when upstream correction is enabled, the correction unit 223 determines the occupancy time of the non-target frame on the upstream communication line 300_2 at the same time as the reference wait time as the first correction value. As a specific example, if the reference wait time is "100 ms" and the occupancy time of the non-target frame on the communication line 300_2 at 100 ms is 20 ms, the first correction value is "20 ms." Similarly, when downstream correction is enabled, the correction unit 223 determines the occupancy time of the non-target frame on the downstream communication line 300_3 at the same time as the reference wait time as the second correction value.
[0161] The correction unit 223 corrects the waiting time by subtracting each of the first and second correction values from the reference waiting time. As a specific example, if the reference waiting time is "100 ms", the first correction value is "20 ms", and the second correction value is "10 ms", the corrected waiting time is "70 ms". The waiting time obtained in this way does not include a delay caused by the occupancy of the communication line 300 by the non-target frame. Therefore, even if the communication line 300 is occupied by the non-target frame, the relay device 200 waits for the corrected waiting time to relay the target frame, thereby ensuring the simultaneity of the frames arriving at the destination ECU 100.
[0162] When the corrected waiting time has elapsed since the reception of the target frame, control unit 225 transmits the target frame to the subsequent device (relay device 200 or ECU 100). In a specific example, when the waiting time has elapsed since the writing of the target frame to buffer 205, control unit 225 reads the target frame from buffer 205 and transmits it to the subsequent device.
[0163] In the first example, the relay device 200_3 is included in a communication path A1 that is different from the deepest path. The number of relay stages of the communication path A1 is "3". Therefore, in the relay table 211_3, corresponding to the message ID "100", the deepest path is set to "NO", the deepest stage is set to "5", the path stage is set to "3", and the standby stage is set to "2".
[0164] In the communication route A1, the stage number of the relay device 200_2 is "3" (that is, the third relay device from the most upstream). Therefore, in the relay table 211_3, the stage number of the own device is set to "3" in correspondence with the message ID "100".
[0165] In the first example, a standby time is set in relay device 200_3. According to the above-mentioned rule, relay device 200_2 corrects the standby time based on the communication state in the upstream communication channel "0" (enabled). On the other hand, only relay device 200_3 can correct the standby time based on the communication state between relay device 200_3 and ECU 100_3. For this reason, relay device 200_3 also corrects the standby time based on the communication state in the downstream communication channel "1" (enabled). Therefore, in relay table 211_3, each of the upstream side correction and the downstream side correction is set to "enabled" in correspondence with the message ID "100".
[0166] In the first example, the relay device 200_3 is located downstream of the first branch point 310_1. Therefore, in the relay table 211_3, before and after the branch are set to "after" in correspondence with the message ID "100". Furthermore, as described above, in the first example, the reference waiting time of the relay device 200_3 is 100 ms. Therefore, in the relay table 211_3, the reference waiting time is set to "100" in correspondence with the message ID "100".
[0167] [5. Operation of relay device] Next, a description will be given of the operation of the relay device 200. Fig. 6 is a flowchart showing an example of a frame relay operation in the relay device according to the embodiment.
[0168] When the processor 201 receives a target frame (step S101), the processor 201 writes the received target frame into the buffer 205.
[0169] The processor 201 acquires the ID of the target frame, and acquires a setting value corresponding to the acquired ID in the relay table 211. The processor 201 determines from the acquired setting value whether the processor 201 is located upstream of the first branch (before branching) or downstream (after branching) (step S102).
[0170] If the own device is on the upstream side of the first branch (YES in step S102), the processor 201 reads the target frame from the buffer 205 and transmits it downstream (step S111). In this case, this ends the frame relay operation.
[0171] If the own device is located downstream of the first branch (NO in step S102), the processor 201 determines whether the own device is included in the deepest route (step S103).
[0172] If the own device is included in the deepest route (YES in step S103), the processor 201 reads the target frame from the buffer 205 and transmits it downstream (step S111). In this case, this ends the frame relay operation.
[0173] If the own device is not included in the deepest route (NO in step S103), the processor 201 determines the waiting time to be the reference waiting time (step S104).
[0174] The processor 201 determines whether the upstream correction is enabled (step S105). If the upstream correction is enabled (YES in step S105), the processor 201 acquires the communication state on the upstream side (occupancy time of the asymmetric frame) and determines the first correction value based on the acquired communication state (step S106). If the upstream correction is disabled (NO in step S105), the processor 201 proceeds to step S107 without determining the first correction value.
[0175] The processor 201 determines whether the downstream correction is enabled (step S107). If the downstream correction is enabled (YES in step S107), the processor 201 acquires the downstream communication state (occupancy time of the asymmetric frame) and determines the second correction value based on the acquired communication state (step S108). If the downstream correction is disabled (NO in step S107), the processor 201 proceeds to step S109 without determining the second correction value.
[0176] The processor 201 corrects the target time by the first correction value and the second correction value (step S109). Here, if the first correction value is determined and the second correction value is not determined, only the first correction value is used to correct the target time. If the first correction value is not determined and the second correction value is determined, only the second correction value is used to correct the target time. If neither the first correction value nor the second correction value is determined, the target time is not corrected.
[0177] The processor 201 determines whether or not the wait time has elapsed since the target frame was written to the buffer 205 (step S110). If the wait time has not elapsed since the target frame was written to the buffer 205 (NO in step S110), the processor 201 repeats step S110. If the wait time has elapsed since the target frame was written to the buffer 205 (YES in step S110), the processor 201 reads the target frame from the buffer 205 and transmits it downstream (step S111). This completes the frame relay operation.
[0178] [6. Modifications] In the above-described embodiment, the in-vehicle system 10 is configured using a CAN network, but is not limited to this. The in-vehicle system may be configured using an Ethernet network ("Ethernet" is a registered trademark).
[0179] 7 is a block diagram showing a modified example of the configuration of the in-vehicle system according to the embodiment. In an Ethernet network having a star-type network topology, the communication line 300 is not a bus but a LAN (Local Area Network) cable with no branches.
[0180] The relay device 200_1 has three communication ports (communication channels), the first communication port is connected to the ECU 100_1 via a communication line 300_1, the second communication port is connected to the relay device 200_2 via a communication line 300_21, and the third communication port is connected to the relay device 200_4 via a communication line 300_22. The relay device 200_4 has four communication ports, the first communication port is connected to the relay device 200_1 via a communication line 300_22, the second communication port is connected to the ECU 100_2 via a communication line 300_5, the third communication port is connected to the relay device 200_5 via a communication line 300_61, and the fourth communication port is connected to the relay device 200_7 via a communication line 300_62.
[0181] For example, when ECU 100_1 transmits an Ethernet frame to ECUs 100_3, 100_4, and 100_5 by multicast, a problem occurs that the frame does not arrive at ECUs 100_3, 100_4, and 100_5 simultaneously, as in the above-described embodiment. For this reason, in-vehicle system 11 according to the modified example, relay device 200 waits to relay the frame, as in the in-vehicle system 10 according to the embodiment. This ensures the simultaneity of frame arrival.
[0182] Note that, even when a plurality of frames are transmitted to a plurality of destinations by unicast, by similarly setting a waiting time in relay device 200, it is possible to ensure that the frames arrive simultaneously.
[0183] In the above-described embodiment, the ECU is described as an example of the "first in-vehicle device" and the "second in-vehicle device", but is not limited thereto. For example, either or both of the "first in-vehicle device" and the "second in-vehicle device" may be a sensor or an actuator.
[0184] [7. Notes] [Appendix 1] A relay program used by a relay device that relays frames to an in-vehicle device, On the computer, determining whether the vehicle-mounted device is included in a second communication path from a source of the frame to a second vehicle-mounted device when the number of relay devices in a first communication path from the source of the frame to a first vehicle-mounted device is greater than the number of relay devices in the second communication path from the source of the frame to the first vehicle-mounted device; when it is determined that the own device is not included in the second communication path, executing a standby process of relaying the frame by waiting for a standby time based on a difference between the number of relay devices in the first communication path and the number of relay devices in the second communication path; Execute the Broadcast program.
[0185] [8. Additional Notes] The embodiments disclosed herein are illustrative in all respects and are not restrictive. The scope of the present invention is defined by the claims rather than the above-described embodiments, and includes the meaning equivalent to the claims and all modifications within the scope thereof. [Explanation of symbols]
[0186] 10,11 In-vehicle systems 200,200_1,200_2,200_3,200_4,200_5,200_6,200_7,200_8,200_9 Relay device 300, 300_1, 300_2, 300_3, 300_4, 300_5, 300_6, 300_7, 300_8, 300_9, 300_10, 300_11, 300_21, 300_22, 300_61, 300_62 Communication lines 310_1, 310_2 Junction 201 Processor 202 Non-volatile memory 203 Volatile Memory 204A, 204B, 204C Communication Interface 205 Buffer 206 Bus 210 Broadcast Program 211, 211_1, 211_2, 211_3, 211_4, 211_5, 211_7 Relay table 221 Judgment section 222 Decision Section 223 Correction Section 224 Monitoring Department 225 Control Unit
Claims
1. A first in-vehicle device; A second in-vehicle device; a plurality of relay devices that relay frames to the first in-vehicle device and the second in-vehicle device; Equipped with when the number of relay devices in a first communication path from a transmission source of the frame to the first in-vehicle device is different from the number of relay devices in a second communication path from the transmission source of the frame to the second in-vehicle device, at least one of the relay devices included in the first communication path and the second communication path waits for a waiting time based on a difference between the number of relay devices in the first communication path and the number of relay devices in the second communication path, and relays the frame. In-vehicle systems.
2. When the number of the relay devices in the first communication path is smaller than the number of the relay devices in the second communication path, the relay device included in the first communication path waits for the waiting time and relays the frame. The in-vehicle system according to claim 1 .
3. the relay device included in the second communication path relays the frame without waiting; The in-vehicle system according to claim 2 .
4. the relay device included between the transmission source of the frame and the first branch of the communication path relays the frame without waiting; The in-vehicle system according to claim 1 .
5. when the number of the relay devices in the first communication path is smaller than the number of the relay devices in the second communication path, and when there are a plurality of relay devices included in the first communication path downstream of a branch of an initial communication path from the transmission source, each of the plurality of relay devices included in the first communication path downstream of the branch waits for the same waiting time to relay the frame. The in-vehicle system according to claim 1 .
6. When the number of the relay devices in the first communication path is smaller than the number of the relay devices in the second communication path, the relay device included in the first communication path corrects the waiting time based on a communication state of at least one of an upstream side and a downstream side of the relay device. The in-vehicle system according to any one of claims 1 to 5.
7. the communication state is a time during which a non-target frame, which is a frame different from a target frame to be transmitted to the second in-vehicle device, occupies at least one of the upstream and downstream communication lines; The in-vehicle system according to claim 6.
8. The correction of the waiting time is performed by subtracting the occupancy time from the waiting time. The in-vehicle system according to claim 7.
9. The non-target frame is a frame having a higher priority than the target frame. The in-vehicle system according to claim 7.
10. A relay device that relays frames to an in-vehicle device, a determination unit that, when a number of relay devices in a second communication path from a source of the frame to a second in-vehicle device is greater than a number of relay devices in a first communication path from a source of the frame to a first in-vehicle device, determines whether or not the own device is included in the second communication path; a control unit that, when it is determined by the determination unit that the own device is not included in the second communication path, executes a standby process of relaying the frame by waiting for a standby time based on a difference between the number of relay devices in the first communication path and the number of relay devices in the second communication path; Equipped with Relay device.
11. A relay method for relaying a frame in an in-vehicle system including a first in-vehicle device, a second in-vehicle device, and a plurality of relay devices that relay frames to the first in-vehicle device and the second in-vehicle device, comprising: a step of relaying the frame by waiting for a waiting time based on a difference between the number of relay devices in the first communication path from the transmission source of the frame to the first in-vehicle device and the number of relay devices in the second communication path from the transmission source of the frame to the second in-vehicle device, at least one of the relay devices included in the first communication path and the second communication path relaying the frame; Relay method.