The present application claims the benefit of priority from Japanese Patent Application No. 2023-216958 filed on Dec. 22, 2023. The entire disclosure of the above application is incorporated herein by reference.
The present disclosure relates to a device for relaying communication between multiple masters and multiple slaves via a communication network, a communication network system including the device, a relay method, and a computer program.
The time synchronization provided in TSN (Time Sensitive Network), a type of Ethernet (registered trademark) used for in-vehicle communications, is designed with a target accuracy of less than 1 microsecond.
A relay device relaying communication between a plurality of masters and a plurality of slaves via a communication network is provided. The relay device includes a time synchronization support unit configured to set a lower communication priority for a time synchronization communication frame transmitted from a master when a clock accuracy required for a function of the master is relatively low.
Objects, features and advantages of the present disclosure will become more apparent from the following detailed description made with reference to the accompanying drawings. In the drawings:
On the other hand, devices connected to in-vehicle communication networks include those related to autonomous driving and infotainment systems, among others. The required time synchronization accuracy for communication varies depending on the function of these devices. However, technologies in a related art have not specifically addressed how to control communication based on the time synchronization accuracy required by each device.
The present disclosure provides a relay device capable of appropriately setting the priority of communication based on the clock accuracy required according to the function of each master, a communication network system including the device, a relay method, and a computer program.
According to one aspect of the present disclosure, a relay device relaying communication between a plurality of masters and a plurality of slaves via a communication network is provided. The relay device includes a time synchronization support unit configured to set a communication priority for a time synchronization communication frame transmitted from a master. Each of the plurality of masters has a clock accuracy required for a function of the master. The time synchronization support unit sets a lower communication priority for a time synchronization frame transmitted from a first master when the clock accuracy required for a function of the first master is lower than the clock accuracy required for a function of a second master.
As shown in
The switches 7, 8, 9, and 10 are arranged in four regions of the vehicle: front, rear, left, and right, respectively, and transfer communication between ECUs arranged in each region. The switches 7, 8, 9, and 10 may be zone ECUs. As shown in
The GMs 1 and 2 comply with the communication protocol IEEE 802.1AS-2020. Furthermore, the GMs 1 and 2 do not comply with IEEE 802.1q, that is, they do not support the VLAN (Virtual Local Area Network) function. VLAN is a technology for dividing one physical switch into multiple virtual switches. The slaves 3 and 4 comply with the communication protocol AUTOSAR (AUTomotive Open System ARchitecture), that is, IEEE 802.1AS-2011. AUTOSAR is the specification name of a platform for achieving standardization of in-vehicle software.
The slaves 3 and 4 comply with IEEE 802.1q, that is, the slaves 3 and 4 support the VLAN function. Furthermore, the slaves 3 and 4 also support the QoS (Quality of Service) method, which classifies and groups application data and communicates according to the priority of each group, that is, the slaves 3 and 4 comply with IEEE 802.1p.
The relay device 5 complies with the communication protocol IEEE 802.1AS-2020. The relay device 5 also complies with the communication protocol AUTOSAR, that is, IEEE 802.1AS-2011. Furthermore, the relay device 5 complies with IEEE 802.1q and IEEE 802.1p, that is, the relay device 5 supports the VLAN function and the QoS method.
The switches 7, 8, 9, and 10 comply with the communication protocol IEEE 802.1AS-2020. The switches 7, 8, 9, and 10 also comply with the communication protocol AUTOSAR, that is, IEEE 802.1AS-2011. Furthermore, the switches 7, 8, 9, and 10 comply with IEEE 802.1q and IEEE 802.1p, that is, the switches 7, 8, 9, and 10 support the VLAN function and the QoS method. Note that the GMs 1 and 2 do not comply with IEEE 802.1p.
The data transmitted from the GMs 1 and 2 is transferred to the slaves 3 and 4 via the communication lines, the relay device 5, and the switches 7, 8, 9, and 10. Specifically, in
The relay device 5 includes a controller and a memory, neither of which are shown, and the controller includes a time synchronization support unit 11. The time synchronization support unit 11 adds information related to the priority corresponding to the QoS to the time synchronization communication frame included in the above data and transfers it to the slaves 3 and 4 via the switches 7, 8, 9, and 10. Hereinafter, the time synchronization communication frame may be simply referred to as a communication frame.
The slave 3 includes an end station 14, which is a communication node, and a clock target 15 that operates according to the clock supplied by the GM 1 or 2. Similarly, the slave 4 includes an end station 16 and a clock target 17. Each of the slaves 3 and 4 includes one or more end stations 14 and 16. The clock target 15 is provided to correspond to each end station 14 and 16. The above constitutes an in-vehicle communication system 18, which is the communication network system.
This system configuration is a multiplexed network that operates the primary and backup clock sources simultaneously. When the GM 1, which has a higher clock quality than the GM 2, is operating normally, it is not necessary to prioritize the transmission of the backup GM 2. In other words, when the GM 1, which has a higher clock quality than the GM 2, is operating normally, it is not necessary to increase the transmission priority of the GM 2, which has a lower clock quality than the GM 1. That is, it may be desirable that the data transmission of the backup GM 2 does not interfere with the data transmission of the primary GM 1.
Therefore, the relay device 5 dynamically sets parameters of a clock quality of the primary and backup clocks from the announcement message included in the communication data. The parameters correspond to, for example, the combination of the clock quality and the MAC (Media Access Control) addresses of the transmitting devices. Based on these parameters, the relay device 5 determines the QoS value, which is the transmission priority. If the primary clock is lost, the transmission priority, which was once lowered, is restored as described later.
Next, the operation of the present embodiment will be described. As shown in
Subsequently, it is determined whether the communication frame received from GM 1 or 2 is an announcement message (S3). The announcement message shown in
If the transmitting GM has the highest transmission priority (S6; Yes), it is determined whether there are still received frames (S5). If there are still received frames (Yes), the process returns to step S3. If there are no more received frames (No), the process ends. On the other hand, if the transmitting GM does not have the highest transmission priority (S6; No), the QoS value settings and the MAC association information are determined based on the announcement message (S7), and the QoS value settings and the MAC association information are stored in a storage medium such as memory, as in step S2 (S8). Then, the QoS value based on the QoS value settings and the MAC association information is added to the frame (S9), and the process proceeds to step S5.
The addition of the QoS value is performed by setting an 8-level priority from the lowest “0” to the highest “7” in the 3-bit CoS (Class of Service) field within the 4-byte VLAN tag area in the Ethernet frame format, as shown in
In step S3, if the received communication frame is not an announcement message (No), it is determined whether the frame is from a GM whose transmission priority can be lowered, based on the QoS value and MAC association information stored in step S2 (S4). If the frame is from a GM whose transmission priority can be lowered (Yes), the process proceeds to step S9.
As shown in
In step S12, if the clockAccuracy indicated by the grandmasterClockQuality setting in the announcement message is not 29 or higher (No), it is determined that the GM is one whose transmission priority can be lowered, similar to step S14, and the CoS value is subtracted by, for example, “2” from the value set at that time (S15). In other words, the transmission priority set in the CoS field is lowered by two levels. Then, the process proceeds to step S13, where the QoS value is set based on the result of the CoS value subtraction. If the CoS value is uniformly added or subtracted, it is done here. Which of the priorities “0” to “6” other than the highest “7” is set depends on the system. If it is determined as “Yes” in step S12, the CoS value is not subtracted, so the CoS value and the QoS value remain as the initial values.
As described above, according to the present embodiment, the relay device 5 relays communication between the GMs 1 and 2 and the slaves 3 and 4 via the communication network 6. At that time, the time synchronization support unit 11 sets a lower communication priority for the time synchronization communication frame transmitted from the GM 1 or 2 if the clock accuracy required for the function of the GM 1 or 2 is relatively low. As a result, even if the clock accuracy required for the functions of the GM 1 or 2 is different, the time synchronization support unit 11 appropriately sets the priority to avoid conflicts, ensuring that communication from the GM with relatively high clock accuracy is prioritized.
More specifically, the time synchronization support unit 11 determines the transmission priority based on the grandmasterPriority1 and grandmasterClockQuality included in the announcement message within the time synchronization communication frame when the protocol of the communication network 6 complies with IEEE 802.1p. In the communication protocol IEEE 802.1p, the grandmasterPriority1 in the announcement message is a field that directly specifies the priority of the GM, and the grandmasterClockQuality is a field that sets the relative clock quality of the GM, and the clockAccuracy within the grandmasterClockQuality is related to the relative clock accuracy. Therefore, the time synchronization support unit 11 can reasonably set the communication priority based on the information stored in these fields.
Furthermore, the time synchronization support unit 11 sets the priority in the CoS field within the time synchronization communication frame. In the Ethernet frame format, a 3-bit CoS field is set to determine the communication priority, so the priority can be set using the pre-allocated field.
Hereinafter, the identical parts as those in the first embodiment will be designated by the same reference numerals, and explanations thereof will be omitted. Differences from the first embodiment will be described. As shown in
In step S21, which replaces step S1, the QoS value settings and the MAC association information are determined based on the static parameter information. Here, unlike step S1, the setting is always performed based on the static parameter information without any optionality such as “if necessary.” Subsequently, steps S2, S4, and S5 are executed. That is, steps S3 and S6 to S8 in the flowchart of
As described above, according to the second embodiment, the relay device 5 determines the QoS value settings and the MAC association information based on the static parameter information that is prepared in advance as system information of the communication network 6.
Steps S11 and S12 may be reversed in order. The value subtracted from the CoS value in steps S14 and S15 may be changed as appropriate. The same value, for example, “1”, may be subtracted from the CoS value in both steps S14 and S15. In steps S14 and S15, as long as the priority is lowered, methods other than subtracting the CoS value may be used. The current priority may be determined from the CoS value, and the process may be performed to achieve the CoS value of the lowered priority, or the priority may be directly instructed. The master does not necessarily have to comply with the communication protocol IEEE 802.1AS-2020, and the slave does not necessarily have to comply with the AUTOSAR communication protocol. Also, the switches do not necessarily have to comply with the communication protocol IEEE 802.1AS-2020.
The number of masters and slaves may be three or more. The switches 7, 8, 9, and 10 are not necessarily required, and the relay device 5 may be connected to multiple slaves 3 and 4. The master and the slave do not necessarily have to be electronic control units. These may also be applied to network systems other than in-vehicle communication systems. The priority does not necessarily have to be determined based on the grandmasterPriority and grandmasterClockQuality included in the announcement message. For example, it may be determined based on other information or parameters indicating the priority of the GM and the relative accuracy of the GM's clock. Also, the priority does not necessarily have to be set in the CoS field within the time synchronization communication frame.
While the present disclosure has been described with reference to embodiments thereof, it is to be understood that the disclosure is not limited to the embodiments and constructions. The present disclosure includes various modification examples and equivalents thereof. Furthermore, various combination and formation, and other combination and formation including one, more than one or less than one element may be made in the present disclosure.
Means and/or functions provided by each device or the like may be provided by software recorded in a tangible memory device and a computer that can execute the software, software only, hardware only, or some combination of them. For example, when the control device is provided by an electronic circuit that is hardware, it can be provided by a digital circuit including a large number of logic circuits, or an analog circuit.
The controllers (control units) and method described in the present disclosure may be implemented by a special purpose computer which is configured with a memory and a processor programmed to execute one or more particular functions embodied in computer programs of the memory. Alternatively, the control unit and the technique according to the present disclosure may be achieved by a dedicated computer provided by constituting a processor with one or more dedicated hardware logic circuits. Alternatively, the control unit and the technique according to the present disclosure may be achieved using one or more dedicated computers constituted by a combination of the processor and the memory programmed to execute one or more functions and the processor with one or more hardware logic circuits. The computer programs may be stored, as instructions to be executed by a computer, in a non-transitory tangible computer-readable storage medium.
Number | Date | Country | Kind |
---|---|---|---|
2023-216958 | Dec 2023 | JP | national |