The present invention relates to a vehicle-mounted network.
In recent years, a plurality of electronic control units (ECUs) are mounted in vehicles. ECUs are installed in various places in a vehicle. The plurality of ECUs cooperate to realize one vehicle-mounted application. For that purpose, data communication between the ECUs is necessary, and each ECU is connected by a communication line to constitute a vehicle-mounted network.
Since ECUs are installed in various locations in the vehicle, a vehicle-mounted network is configured for each installation location. Furthermore, a vehicle-mounted gateway device for relaying communication between each vehicle-mounted network is arranged, and the ECU connected to each vehicle-mounted network can communicate via the vehicle-mounted gateway.
At present, a control area network (CAN) is widely used as a communication protocol on vehicle-mounted networks. Meanwhile, in recent years, an advanced cooperative control system such as automatic driving control has been developed. In such a system, it is actively studied to apply a high-speed communication protocol such as Ethernet (registered trademark).
Under such circumstances, it is anticipated that the newly added configuration of a vehicle-mounted network to which Ethernet is applied will be the mainstream for the vehicle-mounted network constructed by the conventional communication protocol such as CAN. Therefore, in a vehicle-mounted gateway device that relays communication between vehicle-mounted networks using different communication protocols, efficient relay processing is required.
The following PTLs 1 and 2 describe the prior art for relaying communication between networks using different communication protocols.
PTL 1: JP 2008-294935 A
PTL 2: JP 2013-013083 A
In a system in which a plurality of ECUs cooperate to control vehicles in a coordinated manner, it is required that each ECU synchronously performs transmission as fast as possible. Therefore, low latency of a transfer time is required as basic performance of a vehicle-mounted gateway device. However, when a transfer destination conflicts, the vehicle-mounted gateway device generally firstly transfers communication frames with high priority, but this increases the latency of the transfer time for the communication frame with low priority, and this causes a problem in cooperative control between ECUs. This basic performance and problem are also applicable when relaying a communication frame from CAN to Ethernet.
The present invention has been made in view of the above problems, and it is an object of the present invention to provide a relay technology capable of suppressing transfer latency in a vehicle-mounted network to a low level.
A vehicle-mounted gateway device according to the present invention consolidates within a first Data portion included in a large sized first communication frame a plurality of second Data portions each included in a small sized second communication frame, thereby generating the first communication frame, and relays the first communication frame that has been generated.
According to a vehicle-mounted gateway device of the present invention, latency of a transfer time can be kept low even in the case where transfer destinations conflict.
The CAN physical interface 20 is a physical interface with the CAN network. The CAN reception buffer 21 is a data table that stores a CAN frame received by the CAN physical interface 20, and the routing table 22 is a data table that defines the transfer destination of the received CAN frame. The transfer conflict determination unit 23 determines a transfer destination of the CAN frame stored in the CAN reception buffer 21 according to the routing table 22 and determines whether there is a CAN frame of which a transfer destination conflicts. The transfer data generation unit 24 generates a data portion (Payload portion) of the communication frame to be transferred to the Ethernet network. The Ethernet frame generation unit 25 generates an Ethernet frame using the data portion generated by the transfer data generation unit 24. The Ethernet transmission buffer 26 is a buffer for temporarily storing the Ethernet frame before sending it to the Ethernet network. The Ethernet physical interface 27 is a physical interface with the Ethernet network.
(
The vehicle-mounted gateway device 2 starts the present flow chart periodically or in response to interruption processing or the like (S200), for example. The transfer conflict determination unit 23 reads one or more CAN frames from the CAN reception buffer (S201).
(
The transfer conflict determination unit 23 determines the transfer destination of the CAN frame read in step S201 according to the routing table 22. The transfer conflict determination unit 23 determines whether there is a CAN frame of which a transfer destination conflicts. “Transfer destination conflicts” means that there are a plurality of communication frames to be transferred to the same vehicle-mounted network. In the network configuration of
(
The transfer data generation unit 24 extracts and consolidates an ID portion and the Data portion of each CAN frame of which a transfer destination conflicts to generate the data portion of the communication frame transferred to the Ethernet network. The frame structure of the CAN frame and the frame structure of the Ethernet frame are illustrated in
(
The transfer data generation unit 24 extracts the ID portion and the Data portion of one CAN frame and generates the data portion of the communication frame to transfer to the Ethernet network.
(
The Ethernet frame generation unit 25 determines a Data length of the Ethernet frame transmitted to the Ethernet network based on a length of the data portion (transfer data) generated in step S203 or S204 (S205). The Ethernet frame generation unit 25 stores the transfer data in the Data portion of the Ethernet frame (S206).
(
The Ethernet frame generation unit 25 generates an Ethernet frame to be transmitted to the Ethernet network, stores it in the Ethernet transmission buffer 26, and sets it to be transmitted. The Ethernet physical interface 27 transmits the Ethernet frame stored in the Ethernet transmission buffer 26.
(
The vehicle-mounted gateway device 2 determines whether transfer of all the CAN frames read from the CAN reception buffer 21 has been completed. If it has been completed, this flowchart is ended, and if there are remaining frames to be transferred, the flow returns to step S202 and similar processing is performed on the remaining CAN frames.
The CAN frame has an SOF portion, an ID portion, a Control portion, a Data portion, a CRC portion, an ACK portion, and an EOF portion. The SOF portion is a field indicating a start of the frame. The ID portion is a field representing an identifier corresponding to a type of a communication message. The Control portion is a field indicating a reserved bit and the Data length of the Data portion. The Data portion is a field representing a communication message. The CRC portion is a field representing a transmission error of frame. The ACK portion is a field indicating a signal of confirmation of normal reception. The EOF portion is a field indicating an end of frame.
The Ethernet frame has a Frame Header portion, a Data portion, and an FCS portion. The Frame Header portion is a field indicating additional information other than the communication message such as the destination and the Data length. The Data portion is a field representing the communication message. The FCS portion is a field indicating the transmission error of the frame.
Considering the configuration of the CAN frame, the information transferred from the CAN network to the Ethernet network should have at least the ID portion and the Data portion corresponding to the communication message. Accordingly, the transfer data generation unit 24 generates transfer data using the ID portion and the Data portion of the CAN frame in steps S203 to S204 of
The Ethernet frame generation unit 25 determines the Data length of the Ethernet frame according to the length of the transfer data. Therefore, the Ethernet frame has a variable length according to the number of CAN frames transferred to the Ethernet network.
The physical interface 40 is a physical interface with the Ethernet network. The reception buffer 41 stores the received Ethernet frame. The reception frame analysis unit 42 analyzes the received Ethernet frame. The CAN message extraction unit 43 extracts a CAN message stored in the Data portion of the received Ethernet frame. The application processing unit 44 executes a corresponding application using the extracted CAN message.
(
The ECU 4 starts the present flow chart, for example, periodically or in response to interruption processing or the like, for example (S400). The reception frame analysis unit 42 reads the Ethernet frame from the reception buffer 41 (S401).
(
The reception frame analysis unit 42 determines whether the received Ethernet frame is necessary for its own device (ECU 4). For example, if the electronic control device other than the ECU 4 connected to the Ethernet network is not planning to receive the communication frame from the CAN network, it can be determined that these ECUs do not need the Ethernet frame transferred from the vehicle-mounted gateway device 2. If the received Ethernet frame is required, the processing proceeds to step S403, and if it is unnecessary, the processing proceeds to step S404.
(
The CAN message extraction unit 43 extracts a CAN message (the ID portion and the Data portion of the CAN frame) from the Data portion of the reception frame. If the Data portion stores a plurality of CAN messages, the CAN message extraction unit 43 extracts each CAN message.
(
The reception frame analysis unit 42 discards the reception frame and ends the present flowchart.
(
The CAN message extraction unit 43 delivers the extracted CAN message to the application processing unit 44. The application processing unit 44 performs predetermined processing using the CAN message.
In the conventional vehicle-mounted gateway device, when the transfer destination of the CAN frame conflicts, the CAN frame with higher priority is transferred first and then the CAN frame with lower priority is transferred. Therefore, a CAN frame with high priority is sent to the transfer destination with a delay time required for transfer processing, and a CAN frame with lower priority is sent with a still more larger delay.
In contrast, the vehicle-mounted gateway device 2 according to the present first embodiment packages, into the Data portion of one Ethernet frame, the CAN frame of which a transfer destination conflicts, and transfers the Ethernet frame, so that even if the CAN frame has low priority, it is possible to suppress the delay caused at the time of transfer.
In the vehicle-mounted gateway device 2 according to the present first embodiment, when the transfer destination of the communication frame relayed from the CAN network to the Ethernet network is conflicting, the ID portion and Data portion of the conflicting CAN frame are packaged into the Data portion of the Ethernet frame to be transferred. This eliminates the need for the CAN frame with lower priority to wait for transfer processing, and it is possible to greatly suppress the latency in transfer processing.
<Regarding Modification of the Present Invention>
The present invention is not limited to the above embodiments, but includes various modifications. For example, the above-described embodiments have been described in detail in order to explain the present invention in an easy-to-understand manner, and are not necessarily limited to those having all the configurations described.
In the above embodiments, the ID portion and the Data portion of the CAN frame are extracted and consolidated. However, other portions may be extracted and consolidated as the Data portion of the Ethernet frame as necessary.
In the above embodiments, when the vehicle-mounted gateway device 2 transfers the communication frame, if the transfer destination network is a bus type network (for example, the CAN network), transfer may be performed without designating the destination. On the other hand, if the transfer destination network is a network (e.g., the Ethernet network) that communicates in 1:1 manner, the communication frame may be transferred to all terminals by broadcast communication, and alternatively, for example, a transfer destination terminal may be defined for each CAN ID on the routing table and transferred separately. Alternatively, the transfer destination may be determined by other appropriate methods.
In the above embodiments, two CAN networks and one Ethernet network are connected via the vehicle-mounted gateway device 2, but the configuration of the network connected via the vehicle-mounted gateway device 2 is not limited thereto. The number of the vehicle-mounted networks may be two or more, and the communication protocol used on each vehicle-mounted network may be other than the CAN and the Ethernet.
Number | Date | Country | Kind |
---|---|---|---|
2015-229274 | Nov 2015 | JP | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2016/081193 | 10/21/2016 | WO | 00 |