Ethernet switch, vehicle, and program
The Ethernet switch addresses data retention issues by prioritizing and storing critical data during processor startup disparities, ensuring efficient and loss-free data transfer in ECU networks.
Patent Information
- Application Number
- JP2024049647
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-03-26
- Publication Date
- 2025-10-08
AI Technical Summary
Existing electronic control units (ECUs) face issues where data storage capacity is exceeded during power-on, leading to potential loss of important data due to differing startup times of processors within the ECU network.
An Ethernet switch with a controller and buffers is used to determine and store high-priority data temporarily until communication is established with processors having later startup times, discarding non-priority data to prevent overflow.
Ensures efficient data retention and prevents packet loss by prioritizing and storing critical data until all processors are ready for communication, maintaining data integrity.
Smart Images

Figure 2025149170000001_ABST
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to an Ethernet switch, a vehicle, and a program. [Background technology]
[0002] Patent Document 1 discloses an electronic control unit (ECU: Electronic Control Unit) to be mounted on a vehicle. A first microcontroller unit (MCU: Microcontroller Unit) and a second MCU included in the electronic control unit are capable of communicating with each other. The first MCU is connected to an in-vehicle local area network (LAN) and has a relay function for relaying data transmitted from the in-vehicle LAN to the second MCU. The second MCU 11 receives data transmitted from the in-vehicle LAN via the first MCU. When the first MCU attempts to relay data transmitted from the in-vehicle LAN to the second MCU, the first MCU continues to hold data to be transmitted to the second MCU for a predetermined period immediately after power-on, until activation of the second MCU is confirmed. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Application Laid-Open No. 2015-227143 Summary of the Invention [Problem to be solved by the invention]
[0004] According to the electronic control unit described in Patent Document 1, depending on the length of a predetermined period immediately after power is turned on, the amount of data to be stored may exceed the capacity of the buffer of the electronic control unit, and important data may not be able to be stored. The present disclosure provides a technology that can appropriately store data in communication between electronic control units. [Means for solving the problem]
[0005] An Ethernet switch according to one embodiment of the present disclosure is an Ethernet switch that is connected to a plurality of electronic control units mounted on a vehicle, each having at least one processor, has a plurality of ports connecting each processor, and is configured to receive data from each processor and transmit data to a destination processor, and is equipped with a controller configured to determine target data from the data received from each processor based on predetermined conditions when each electronic control unit is started up, and a buffer configured to hold the target data, and the controller is configured to: when the target data is determined, hold the target data in the buffer until communication with the destination processor is permitted, send the target data to the destination processor when communication with the destination processor is permitted, and if data different from the target data is received before communication with the destination processor is permitted, not hold the received data in the buffer.
[0006] A vehicle according to another aspect of the present disclosure includes a plurality of on-board electronic control units, each having at least one processor, and an Ethernet switch having a plurality of ports connecting each processor and configured to receive data from each processor and transmit the data to a destination processor, the Ethernet switch having a controller configured to determine target data from the data received from each processor at the time of startup of each electronic control unit based on predetermined conditions, and a buffer configured to hold the target data, the controller being configured to: when the target data is determined, hold the target data in the buffer until communication with the destination processor is permitted, send the target data to the destination processor when communication with the destination processor is permitted, and if data different from the target data is received before communication with the destination processor is permitted, not hold the received data in the buffer.
[0007] Another aspect of the present disclosure provides a program for operating an Ethernet switch that is connected to a plurality of electronic control units mounted on a vehicle, each having at least one processor, has a plurality of ports connecting each processor, and is configured to receive data from each processor and transmit the data to a destination processor, wherein the Ethernet switch includes a buffer, and the program causes the Ethernet switch to determine target data from data received from each processor at the time of startup of each electronic control unit based on predetermined conditions, and when the target data is determined, to hold the target data in the buffer until communication with the destination processor is permitted, and when communication with the destination processor is permitted, to send the target data to the destination processor, and if data different from the target data is received before communication with the destination processor is permitted, not to hold the received data in the buffer. [Effects of the Invention]
[0008] According to the present disclosure, a technique is provided that can appropriately retain data in communication between electronic control units. [Brief explanation of the drawings]
[0009] [Figure 1] FIG. 1 is a block diagram showing an example of the configuration of a vehicle equipped with an Ethernet switch according to an embodiment. [Figure 2] FIG. 2 is a diagram illustrating a time chart of each processor when the ignition is turned on. [Figure 3] FIG. 3 is a block diagram showing an example of the configuration of an Ethernet switch. [Figure 4] FIG. 4 is a flowchart showing the operation of the Ethernet switch. DETAILED DESCRIPTION OF THE INVENTION
[0010] Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
[0011] [Vehicle configuration] 1 is a block diagram showing an example of the configuration of a vehicle equipped with an Ethernet switch according to an embodiment. As shown in FIG. 1, the Ethernet switch 1 is mounted on a vehicle 2 as an example. The vehicle 2 may be a vehicle driven by a driver or may be an autonomous vehicle.
[0012] The Ethernet switch 1 is connected to multiple ECUs. In the example shown in FIG. 1, the Ethernet switch is connected to a first ECU 21 (ECU A), a second ECU 22 (ECU B), and a third ECU 23 (ECU C). The ECUs are electronic control units having a central processing unit (CPU), read-only memory (ROM), random access memory (RAM), a controller area network (CAN) communication circuit, and the like. Each ECU has at least one processor. For example, the first ECU 21 includes a processor 210 having a first core. The core is a CPU core, which is a device that processes instructions. The first core is a device that can also handle processing that requires real-time performance.
[0013] The second ECU 22 includes an MCU 220, a first processor 221 having a first core, and a second processor 222 having a second core. The MCU 220 is a chip equipped with a CPU core, just like the processor. The second core is a device capable of processing that requires less real-time performance than the first core. The third ECU 23 includes a processor 230 having a first core. The Ethernet switch 1 has multiple ports connecting the processors, and is configured to receive data from each processor and transmit the data to a destination processor. The following description will be given taking as an example a case where data is communicated in packet format.
[0014] The Ethernet switch 1 operates taking into consideration the startup timing of each connected processor. FIG. 2 is a diagram illustrating a time chart of each processor when the ignition is turned on. As shown in FIG. 2, when the ignition of the vehicle 2 is turned on from off, the processor having the first core starts to start up, but the processor having the second core does not start to start up and remains off. Then, when the processor having the first core completes startup and becomes ready for communication, the processor having the second core starts to start up. After that, the processor having the second core completes startup and becomes ready for communication. Thus, there is a period T during which the processor having the first core is ready for communication and the processor having the second core is running (in a communication-disabled state). During the period T, even if a packet is sent from the processor having the first core to the processor having the second core, the processor having the second core cannot receive the packet, and the packet is discarded. For this reason, the Ethernet switch 1 temporarily stores packets containing important data in its buffer until the processor having the second core becomes ready for communication.
[0015] Fig. 3 is a block diagram showing an example of the configuration of an Ethernet switch. As shown in Fig. 3, the Ethernet switch 1 includes an ingress buffer 11 (an example of a buffer), an egress buffer 12, and a controller 13. The ingress buffer 11 and the egress buffer 12 are storage media. The capacity, data transfer rate, and other performance of the ingress buffer 11 and the egress buffer 12 may be the same or different.
[0016] The ingress buffer 11 is connected to each of the multiple ports of the Ethernet switch 1, and has the function of holding packets received from each port. In other words, the ingress buffer 11 is a storage medium used when receiving packets. The egress buffer 12 is connected to the ingress buffer 11, receives packets output from the ingress buffer 11, and temporarily holds them for output to the destination processor. In other words, the egress buffer 12 is a storage medium used when transmitting packets.
[0017] The controller 13 has a function of controlling the operation of the Ethernet switch 1, and is configured, for example, by an LSI (Large Scale Integration). The controller 13 exerts a function of controlling the configuration of the Ingress buffer 11 using a script or the like. The configuration means settings. The controller 13 controls the configuration so that the Ingress buffer 11 stores only necessary packets.
[0018] For example, the controller 13 is configured to determine a target packet (an example of target data) from among packets received from each processor at the start-up of each ECU based on a predetermined condition. The predetermined condition is a condition set in advance for determining a target packet. The predetermined condition includes, for example, information indicating a target port. In this case, the controller 13 is configured to determine, as a target packet, a packet received at the target port or a packet to be transmitted to the target port based on the information indicating the target port. For example, since a processor having a first core has a short start-up time, the controller 13 sets the port to which the processor having the first core is connected as the target port. For example, since a processor having a second core has a long start-up time, the controller 13 sets the port to which the processor having the second core is connected as the target port.
[0019] The predetermined condition may include at least one of a source IP address, a destination IP address, and a protocol. In this case, the controller 13 is configured to determine a packet that matches the source IP address, the destination IP address, or the protocol as a target packet. The source IP address, the destination IP address, and the protocol may be obtained, for example, using an access control list (ACL) function that is standard on the Ethernet switch 1. For example, if the source IP address indicates a processor having a first core and the destination IP address indicates a processor having a second core, the above-mentioned period T exists. Therefore, such a packet is a target packet. The predetermined condition may be set appropriately depending on the capacity of packets to be held, and may be set to accept all packets if there is room in the buffer.
[0020] When the target packet is determined, the controller 13 stores the target packet in the Ingress buffer 11. As a specific example, the controller 13 controls the configuration of the Ingress buffer 11 to store the target packet.
[0021] The controller 13 stores the target packet in the ingress buffer 11 until communication with the processor having the second core (an example of a destination processor) is permitted. If the processor having the first core, which is the source of the packet, is in a communication-enabled state and the processor having the second core is not activated, the controller 13 determines that communication with the processor having the second core is not permitted.
[0022] The controller 13 detects the startup state of the processor having the second core by one of the following methods. The first method is to monitor the Ethernet link state of the processor having the second core. When the processor having the second core starts up, a link to the network port to the processor having the second core is established. The controller 13 detects that the processor having the second core has started up by detecting the establishment of the link. The second method is to monitor an event-based notification. After the processor having the second core starts up, the processor having the second core sends a notification to the Ethernet switch using the UDP protocol. The controller 13 detects that the processor having the second core has started up by detecting the notification.
[0023] The controller 13 is configured to, if it receives a packet different from the target packet before communication with the processor having the second core is permitted, not store the received packet in the Ingress buffer 11. Not storing the packet in the Ingress buffer 11 also includes discarding the packet (data). This allows only high-priority data to be stored in the Ingress buffer 11.
[0024] When communication with the processor having the second core is permitted, the controller 13 outputs the target packet held in the Ingress buffer 11 to the Egress buffer 12. Then, the controller 13 transmits the target packet in the Egress buffer 12 to the processor having the second core. Thereafter, the controller 13 sets the configuration of the Ingress buffer 11 to a steady state. The steady state configuration may be, for example, a setting that does not store any packets.
[0025] [Ethernet switch operation] 4 is a flowchart showing the operation of the Ethernet switch 1. The flowchart shown in FIG. 4 is executed by the Ethernet switch 1, for example, when the ignition is turned on.
[0026] As shown in FIG. 4, first, in step S10, the Ethernet switch 1 sets the configuration of the Ingress buffer 11. Here, as an example, the configuration is set so that packets sent to the second processor 222 in FIG. 1 are target packets. Next, in step S12, the Ethernet switch 1 waits to receive a packet from the MCU or processor. When a packet is received, the Ethernet switch 1 determines the target packet according to the configuration of the Ingress buffer 11 and holds the target packet. As an example, only packets sent to the second processor 222 are held in the Ingress buffer 11.
[0027] Next, in step S16, the Ethernet switch 1 determines whether communication by the second processor 222 is permitted. If it is determined that communication by the second processor 222 is not permitted (step S16: NO), the Ethernet switch 1 returns to step S14 and repeatedly holds the packet and determines whether communication is permitted. The Ethernet switch 1 may also be provided with logic that forcibly exits from the repetitive loop when a predetermined period of time has elapsed.
[0028] If it is determined that communication with the second processor 222 is permitted (step S16: YES), then at step S18, the Ethernet switch 1 moves the packet in the Ingress buffer 11 to the Egress buffer 12. Then, the Ethernet switch 1 transmits the packet to the second processor 222.
[0029] In step S20, after the data movement in the Ingress buffer 11 is completed, the Ethernet switch 1 sets the steady-state configuration of the Ethernet switch 1. In other words, the Ethernet switch 1 returns the configuration of the Ingress buffer 11 to the steady-state configuration. When step S20 is completed, the flowchart shown in FIG. 4 ends.
[0030] [Summary of the embodiment] In the Ethernet switch 1, when a target packet is determined, the target packet is held in the Ingress buffer 11 until communication with the processor having the second core is permitted. Then, when communication with the processor having the second core is permitted, the target packet is sent to the processor having the second core. If a packet different from the target packet is received before communication with the processor having the second core is permitted, the received packet is not held in the buffer. In this way, in communication between processors with different startup times, only packets to be sent to the processor having the second core, which has a later startup time, are held at startup, thereby avoiding packet loss at startup.
[0031] Although exemplary embodiments have been described above, the present invention is not limited to the above exemplary embodiments, and various omissions, substitutions, and modifications may be made. For example, the functions of the Ethernet switch 1 described above may be provided as a program, or may be provided as a storage medium storing the program. [Explanation of symbols]
[0032] 1...Ethernet switch, 2...vehicle, 11...Ingress buffer (an example of a buffer), 12...Egress buffer, 13...controller
Claims
1. An Ethernet switch connected to a plurality of electronic control units mounted on a vehicle, each having at least one processor, having a plurality of ports connecting the respective processors, and configured to receive data from the respective processors and transmit the data to a destination processor, a controller configured to determine target data from the data received from each processor at the time of startup of each electronic control unit based on a predetermined condition; a buffer configured to hold the target data; Equipped with The controller If the target data is determined, storing the target data in the buffer until communication with the destination processor is permitted; If communication with the destination processor is permitted, transmitting the target data to the destination processor; If data different from the target data is received before communication with the destination processor is permitted, the received data is not held in the buffer. Ethernet switch.
2. the predetermined condition includes information indicating a target port, The Ethernet switch according to claim 1 , wherein the controller is configured to determine, based on information indicating the target port, the data received at the target port as the target data.
3. the predetermined condition includes at least one of a source IP address, a destination IP address, and a protocol; The Ethernet switch according to claim 1 , wherein the controller is configured to determine the data that matches the predetermined condition as the target data.
4. a plurality of electronic control units mounted on the vehicle, each having at least one processor; an Ethernet switch having a plurality of ports connecting each processor, the Ethernet switch being configured to receive data from each processor and transmit the data to a destination processor; Equipped with The Ethernet switch a controller configured to determine target data from the data received from each processor at the time of startup of each electronic control unit based on a predetermined condition; a buffer configured to hold the target data; and The controller If the target data is determined, storing the target data in the buffer until communication with the destination processor is permitted; If communication with the destination processor is permitted, transmitting the target data to the destination processor; If data different from the target data is received before communication with the destination processor is permitted, the received data is not held in the buffer. vehicle.
5. A program for operating an Ethernet switch connected to a plurality of electronic control units mounted on a vehicle, each having at least one processor, having a plurality of ports connecting the respective processors, and configured to receive data from each processor and transmit the data to a destination processor, the program comprising: the Ethernet switch includes a buffer; The program causes the Ethernet switch to: determining target data from the data received from each processor at the time of startup of each electronic control unit based on a predetermined condition; If the target data is determined, storing the target data in the buffer until communication with the destination processor is permitted; If communication with the destination processor is permitted, transmitting the target data to the destination processor; a program that operates so that, if data different from the target data is received before communication with the destination processor is permitted, the received data is not held in the buffer.
Citation Information
Patent Citations
Vehicle apparatus, and start method of vehicle apparatus
JP2015227143A