Chip communication method and system and electronic equipment
By using an Ethernet control core and switch routing rules in multi-core chips, the problems of waste of resources and high hardware costs in Ethernet communications are solved, and efficient communication configuration and cost reduction are achieved.
Patent Information
- Application Number
- CN202410855290.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-11-01
AI Technical Summary
When implementing Ethernet communication, existing multi-core chips need to configure multiple Ethernet control cores and communication ports of external switches, resulting in waste of resources and high hardware costs.
By configuring an Ethernet control core, the switch's routing rules forward communication messages to multiple processing cores, realizing Ethernet communication configuration of multi-core chips, reducing resource waste and hardware costs.
Resource savings and hardware cost reduction of multi-core chips are achieved, while improving communication efficiency and system simplicity.
Smart Images

Figure CN118890326A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of chip communication technology, and in particular to a chip communication method, system and electronic equipment. Background Art
[0002] With the development of networking and intelligence, various electronic devices include various controllers, and the controllers are implemented by single-core chips or multi-core chips to realize corresponding functions. At present, in order to enable the controller to realize more functions, most of them use multi-core chips to transmit communication messages to execute corresponding functions according to the communication messages.
[0003] Taking the automobile controller as an example, in addition to meeting the communication needs between the various controllers in the vehicle, the vehicle also needs to take into account the information interaction between the external network or external devices, such as the Over-the-Air Technology (OTA) upgrade, cloud data collection, high-definition video transmission, etc. In this application context, vehicle Ethernet communication technology is widely used in the vehicle communication architecture. Therefore, in addition to realizing the inter-core communication between the processing cores, the multiple processing cores included in the multi-core chip also need to realize the extra-core communication between each processing core and the external network or external devices.
[0004] However, in the existing multi-core chips, if inter-core communication and extra-core communication are to be realized, an independent Ethernet control core needs to be configured for each processing core, and each processing core uses the corresponding Ethernet control core to perform respective Ethernet communication configuration, so that each processing core can realize Ethernet communication based on its respective Ethernet control core. In addition, the external switch used to realize extra-core communication needs to establish multiple communication ports for establishing communication connection with each Ethernet control core, and send Ethernet communication messages to the Ethernet control core based on the communication connection. When each Ethernet control core receives the Ethernet communication message, it sends the Ethernet communication message to the corresponding processing core.
[0005] Therefore, the existing multi-core chip communication method needs to configure multiple Ethernet control cores to realize the Ethernet communication configuration of each processing core of the multi-core chip, which wastes the resources of the multi-core chip. And it is necessary to configure multiple communication ports for the external switch to realize the communication connection with each Ethernet control core, which has a high hardware cost. In addition, for other electronic devices such as mobile phones and computers, the multi-core chips of the controllers included therein also have the same or similar problems. Summary of the invention
[0006] The present application provides a chip communication method and system, which is used to solve the problem that multiple Ethernet control cores are configured to realize Ethernet communication configuration of each processing core of a multi-core chip, which wastes the resources of the multi-core chip. In addition, multiple communication ports need to be configured for an external switch to realize communication connection with each Ethernet control core, resulting in high hardware cost.
[0007] The chip communication system provided by the present application can realize the Ethernet communication configuration of multiple processing cores of a multi-core chip by configuring an Ethernet control core, thereby reducing the waste of resources of the multi-core chip. In addition, the chip communication system includes a first switch for establishing an extra-core communication connection between the first chip and the second chip, and the second chip includes an Ethernet control core for establishing a communication connection between the first switch and each processing core of the second chip. By setting an Ethernet control core, the Ethernet communication configuration of multiple processing cores of the multi-core chip is realized, thereby reducing the waste of resources of the multi-core chip. In addition, because only one Ethernet control core is set, there is only one communication port for the first switch to establish a communication connection with the Ethernet control core. In this way, the communication connection between the first switch and an Ethernet control core of the second chip can be realized based on a communication port of the first switch, and communication with multiple processing cores can be realized through an Ethernet control core, so that each processing core performs corresponding processing according to the communication message of the Ethernet communication type, thereby reducing the hardware cost.
[0008] To solve the above technical problems, in a first aspect, an embodiment of the present application discloses a chip communication method, which is applied to a chip communication system. The chip communication system includes a first chip, a first switch and a second chip. The second chip includes an Ethernet control core and multiple first processing cores. The Ethernet control core includes a second switch. The first switch is configured with a first routing rule, and the second switch is configured with a second routing rule. The first processing core implements Ethernet communication configuration through the Ethernet control core. The method includes: the first chip determines a first communication message and determines a communication type of the first communication message. If the communication type is an Ethernet communication type, the first communication message is sent to the first switch; the first switch determines the second chip corresponding to the first communication message according to the first communication message and the first routing rule, and sends the first communication message to the second switch in the Ethernet control core included in the second chip; the second switch determines a first target processing end according to the first communication message and the second routing rule, and sends the first communication message to the first target processing end, so that the first target processing end performs corresponding processing according to the first communication message, and the first target processing end is at least one of the first processing cores.
[0009] The chip communication method provided by the implementation of the present application is applied to a chip communication system, wherein the chip communication system includes a first chip, a first switch and a second chip, wherein the second chip includes an Ethernet control core and a plurality of first processing cores, the Ethernet control core includes a second switch, and the first processing core implements Ethernet communication configuration through the Ethernet control core. The first chip sends a first communication message of Ethernet communication type to the first switch, and the first switch determines the second chip corresponding to the first communication message based on the first routing rule, and sends the first communication message to the second switch of the Ethernet control core included in the second chip, and the second switch in the Ethernet control core determines the corresponding target processing end (e.g., the first processing core) based on the second routing rule, and sends the first communication message to the target processing end for corresponding processing. In this way, only one Ethernet control core is set to implement the Ethernet communication configuration of multiple processing cores, reducing the waste of chip resources. Moreover, because only one Ethernet control core is set, the first switch can establish a communication connection with the Ethernet control core based on one communication port, so there is no need to configure the first switch with multiple communication ports for communicating with each Ethernet control core of the chip, which reduces the hardware cost of the first switch, and there is no need to configure each Ethernet control core separately, making the chip communication system structure simpler. The second chip is determined based on the first routing rule, and the first processing core is determined based on the second routing rule, so that the first communication message is converted from external core communication to internal core communication more conveniently and quickly.
[0010] According to another specific embodiment of the present application, an embodiment of the present application discloses a chip communication method, wherein the first switch includes multiple first communication ports, and each first chip establishes a communication connection with the first switch through the corresponding first communication port. The method also includes: the first chip determines the first communication port corresponding to the first chip among the first communication ports of the first switch as the first target communication port, and the first chip sends the first communication message to the first switch, including: the first chip sends the first communication message to the first switch through the first target communication port.
[0011] By adopting the above solution, whether it is a multi-core chip or other chips, the first switch only needs one communication port to establish a communication connection with each chip, so that each chip sends a communication message to the first switch, thereby reducing the number of communication ports of the first switch and reducing the hardware cost of the first switch.
[0012] According to another specific embodiment of the present application, the embodiment of the present application discloses a chip communication method, the first switch also includes multiple second communication ports, and each second chip establishes a communication connection with the first switch through the corresponding second communication port. The Ethernet control core includes multiple third communication ports, and the first switch establishes a communication connection with the Ethernet control core through a third communication port among the multiple third communication ports. The method also includes: the first switch determines, based on the first routing rule, the second communication port corresponding to the second chip in the second communication port included in the first switch as the second target communication port, and determines the third communication port corresponding to the first switch in the third communication port included in the Ethernet control core as the third target communication port. Then the first switch sends the first communication message to the second switch in the Ethernet control core included in the second chip, including: the first switch sends the first communication message to the second switch in the Ethernet control core included in the second chip through the second target communication port and the third target communication port.
[0013] By adopting the above solution, the first switch can communicate with multiple processing cores of the second chip only through one second target communication port and one third target communication port of the Ethernet control core, making the entire chip communication system simpler.
[0014] According to another specific embodiment of the present application, the embodiment of the present application discloses a chip communication method, wherein the Ethernet control core also includes a plurality of fourth communication ports, and each first processing core establishes a communication connection with the Ethernet control core through the corresponding fourth communication port. The method also includes: the second switch in the Ethernet control core determines the fourth communication port corresponding to the first target processing end in the fourth communication port of the Ethernet control core as the fourth target communication port based on the second routing rule; then the second switch sends the first communication message to the first target processing end, including: the second switch sends the first communication message to the first target processing end through the fourth target communication port.
[0015] By adopting the above scheme, a fourth communication port corresponding to each first processing core is configured in the Ethernet control core. By determining the fourth target communication port corresponding to the target processing end, the first communication message can be sent to the target processing end. In this way, one Ethernet control core can be used to process the communication messages of multiple processing cores, thereby speeding up the communication message processing efficiency.
[0016] According to another specific embodiment of the present application, an embodiment of the present application discloses a chip communication method, wherein the multiple first processing cores include a master core and at least one slave core, and the method further includes: the master core performs detection and processing on the communication fault between the master core and the slave core, and when a fault is detected, determines the fault level, and performs corresponding processing according to the fault level, wherein if the fault level is the first fault level, the master core notifies the fault processing module to perform fault processing, and determines whether the fault is eliminated based on a preset detection cycle until it is determined that the fault is eliminated; if the fault level is the second fault level, the master core sends a notification of unloading the Ethernet communication configuration to each slave core, and when it is determined that each slave core has successfully unloaded the Ethernet communication configuration, the Ethernet communication configuration corresponding to the master core is unloaded, and the Ethernet communication configuration is reloaded based on the Ethernet control core, and when the Ethernet communication configuration is successfully loaded, the Ethernet control core is notified to load the Ethernet communication configuration for each slave core; if the fault level is the third fault level, the master core releases the coupling relationship between the master core and the target slave core, and restarts the target slave core.
[0017] By adopting the above technical solution, a master core and multiple slave cores are configured for a multi-core chip, and the master core detects and processes Ethernet communication faults between the master core and the slave cores. In this way, when an Ethernet communication fault occurs, the fault can be processed in a timely manner to avoid the problem that the multi-core chip cannot communicate normally due to the communication fault. In addition, only the master core performs fault detection and processing, which facilitates the master core to uniformly manage the slave cores. And the slave core does not need to perform fault processing, which reduces the workload of the slave core and makes the slave core more efficient in processing Ethernet communication messages.
[0018] According to another specific embodiment of the present application, the embodiment of the present application discloses a chip communication method, in which the master-slave attribute of each first processing core is determined based on a pre-stored RAM address, and the first processing core as the master core directly performs corresponding Ethernet communication configuration based on the Ethernet control core. The first processing core as the slave core sends an Ethernet configuration request to the master core when it is determined that the Ethernet communication configuration of the master core is completed. The master core sends the Ethernet configuration request of the slave core to the Ethernet control core, and the Ethernet control core performs Ethernet communication configuration of the slave core. When it is determined that the Ethernet communication configuration of the slave core is completed, a configuration success notification message is sent to the master core.
[0019] By adopting the above technical solution, the RAM address is used to determine the master and slave attributes of the processing core, and the master core drives the Ethernet communication configuration of the slave core, thereby realizing unified management of the slave core by the master core, facilitating the control of the Ethernet communication configuration of the slave core, and making the management of multi-core chips more efficient.
[0020] According to another specific embodiment of the present application, an embodiment of the present application discloses a chip communication method, wherein the second chip also includes a second processing core. If the first chip determines that the communication type is a CAN communication type, the method also includes: the first chip sends the first communication message to the second processing core; the second processing core sends the first communication message to the Ethernet control core; the Ethernet control core converts the communication type of the first communication message to the Ethernet communication type to obtain a second communication message, and determines the second target processing end based on a preset configuration rule, and sends the second communication message to the second target processing end, so that the second target processing end performs corresponding processing according to the second communication message, and the second target processing end is any one of the first processing core or the first switch.
[0021] By adopting the above technical solution, if the communication message is of CAN communication type, since the Ethernet control core only receives and sends communication messages of Ethernet communication type, compared with the relatively idle main core, the relatively idle Ethernet control core performs the communication type conversion processing, which makes the communication type conversion of the communication message more efficient and faster, and reduces the load rate of the main core, and improves the processing efficiency of the main core and each slave core for communication messages of other communication types.
[0022] According to another specific embodiment of the present application, an embodiment of the present application discloses a chip communication method, wherein the second processing core includes a fifth communication port, and the first chip sends a first communication message to the second processing core, including: the first chip sends the first communication message to the second processing core through the fifth communication port of the second processing core.
[0023] In the present application, the fifth communication port is a port for sending and receiving communication messages of the CAN communication type, that is, a CAN channel port.
[0024] By adopting the above technical solution, for the communication message of CAN communication type, the second processing core of the second chip can receive the communication message of CAN communication type, and send the communication message to the Ethernet control core, so that the Ethernet control core performs message type conversion and subsequent communication message sending. Therefore, a new CAN communication message transceiver link and message conversion method are designed, and the relatively idle Ethernet control core performs the communication type conversion processing, so that the communication type conversion of the communication message is more efficient and faster, and the load rate of the main core is reduced, and the processing efficiency of the main core and each slave core for communication messages of other communication types is improved.
[0025] According to another specific embodiment of the present application, an embodiment of the present application discloses a chip communication method, in which if the second target processing end is the second processing core, the Ethernet control core sends the second communication message to the second target processing end, including: the Ethernet control core sends the second communication message to the second processing core through the fourth communication port corresponding to the second processing core.
[0026] By adopting the above solution, after the Ethernet control core determines the second target processing end, the second communication message can be sent to the corresponding second target processing end through the fourth communication port corresponding to the second processing core.
[0027] According to another specific embodiment of the present application, an embodiment of the present application discloses a chip communication method, if the second target processing end is the first switch, the Ethernet control core sends the second communication message to the second target processing end, including: the Ethernet control core sends the second communication message to the first switch through the third communication port and the second communication port.
[0028] With the above solution, after the Ethernet control core determines the second target processing end, it sends the second communication message to the corresponding first switch, so that the first switch sends the second communication message to the first chip.
[0029] According to another specific embodiment of the present application, an embodiment of the present application discloses a chip communication method, in which a first communication message includes local area network identification information, and a second switch determines a first target processing end according to the first communication message and based on a second routing rule, including: the second switch determines, based on the local area network identification information included in the first communication message and the second routing rule, the first target processing end in the first processing core that can communicate based on the local area network corresponding to the local area network identification information.
[0030] By adopting the above technical scheme, the first target processing end is determined based on the LAN identification information and the second routing rule. In this way, the first communication message can be sent to the first processing core that can perform communication processing of the LAN corresponding to the LAN identification information, ensuring that the first processing core can perform corresponding processing for the first communication message corresponding to the LAN identification information. For the first processing core that cannot communicate based on the LAN corresponding to the LAN identification information, the first communication message does not need to be sent to the first processing core, and the first processing core does not perform corresponding processing for the communication message that does not need to be processed, making the forwarding of the first communication message more flexible, and the first processing core can definitely perform corresponding processing according to the first communication message, thereby accelerating the processing efficiency of the first communication message and reducing the workload of other first processing cores.
[0031] According to another specific embodiment of the present application, an embodiment of the present application discloses a chip communication method, in which a first switch determines a second chip corresponding to a first communication message based on a first communication message and a first routing rule, including: the first switch determines, based on the LAN identification information included in the first communication message and the first routing rule, a second chip in the second chip that can communicate based on a LAN corresponding to the LAN identification information.
[0032] By adopting the above technical solution, a second chip capable of processing the first communication message is determined based on the LAN identification information and the first routing rule. In this way, the first communication message can be sent to a target chip capable of performing communication processing of the LAN corresponding to the LAN identification information, ensuring that the second chip can perform corresponding processing on the first communication message corresponding to the LAN identification information. For a chip that cannot communicate based on the LAN corresponding to the LAN identification information, the first communication message does not need to be sent to the chip, that is, the second chip does not perform corresponding processing on communication messages that do not need to be processed, making the forwarding of the first communication message more flexible, and the second chip can definitely perform corresponding processing according to the first communication message, thereby speeding up the processing efficiency of the first communication message and reducing the workload of other first processing cores.
[0033] According to another specific embodiment of the present application, an embodiment of the present application discloses a chip communication method, in which the second switch determines the first target processing end according to the first communication message and the second routing rule, and sends the first communication message to the first target processing end, including: when the second switch receives multiple first communication messages, according to each first communication message and the second routing rule, determines the first target processing end corresponding to each first communication message, and determines the priority order of the first communication messages, and sends the first communication messages to the corresponding first target processing end in order from high to low priority.
[0034] By adopting the above scheme, based on the priority order of each first communication message, the first communication message with a high priority is sent to the corresponding first processing core first, so that the first communication message with a high priority can be processed quickly, making the chip communication more intelligent and better meeting the communication needs of electronic equipment.
[0035] In the second aspect, an embodiment of the present application also discloses a chip-based communication system, comprising: a first chip, a first switch and a second chip, the second chip comprising an Ethernet control core and multiple first processing cores, the Ethernet control core comprising a second switch, the first switch is configured with a first routing rule, the second switch is configured with a second routing rule, and the first processing core implements Ethernet communication configuration through the Ethernet control core, wherein the first chip is used to determine a first communication message and determine the communication type of the first communication message, if the communication type is an Ethernet communication type, the first communication message is sent to the first switch; the first switch is used to determine the second chip corresponding to the first communication message according to the first communication message and the first routing rule, and send the first communication message to the second switch in the Ethernet control core included in the second chip; the second switch is used to determine the first target processing end according to the first communication message and the second routing rule, and send the first communication message to the first target processing end, so that the first target processing end performs corresponding processing according to the first communication message, and the first target processing end is at least one of the first processing cores.
[0036] According to another specific embodiment of the present application, the embodiment of the present application discloses a chip communication system, the second chip also includes a second processing core, wherein the first chip is also used to send the first communication message to the second processing core if the communication type is determined to be a CAN communication type; the second processing core sends the first communication message to the Ethernet control core; the Ethernet control core is also used to convert the communication type of the first communication message into an Ethernet communication type to obtain a second communication message, and determine the second target processing end based on a preset configuration rule, and send the second communication message to the second target processing end, so that the second target processing end performs corresponding processing according to the first communication message, and the second target processing end is any one of the first processing core or the second processing core.
[0037] In a third aspect, an embodiment of the present application further discloses a communication device, which includes a chip communication system provided by any one of the embodiments of the second aspect above, and is used to execute a chip communication method provided by any one of the embodiments of the first aspect above.
[0038] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising the aforementioned chip communication system.
[0039] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, it is used to implement the chip communication method provided by the implementation method of the first aspect mentioned above.
[0040] In a sixth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the chip communication method provided in the implementation manner of the first aspect above.
[0041] It can be understood that the beneficial effects of the second and sixth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1A It is a structural diagram of a chip communication system provided in an embodiment of the present application;
[0043] Figure 1B is a schematic diagram of the structure of another chip communication system provided in an embodiment of the present application;
[0044] Figure 2 is a schematic diagram of the structure of another chip communication system provided in an embodiment of the present application;
[0045] Figure 3 is a schematic diagram of the structure of another chip communication system provided in an embodiment of the present application;
[0046] Figure 4 is a schematic diagram of the structure of another chip communication system provided in an embodiment of the present application;
[0047] Figure 5 is a schematic diagram of the structure of another chip communication system provided in an embodiment of the present application;
[0048] Figure 6 is a schematic diagram of the structure of another chip communication system provided in an embodiment of the present application;
[0049] Figure 7 It is a flowchart of a chip communication method provided in an embodiment of the present application;
[0050] Figure 8 It is a flowchart of another chip communication method provided in an embodiment of the present application;
[0051] Fig. 9 is a schematic diagram of the structure of another chip communication system provided in an embodiment of the present application;
[0052] Fig.10 It is a flowchart of another chip communication method provided in an embodiment of the present application;
[0053] Fig.11 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] As mentioned above, the existing multi-core chip communication method requires the configuration of multiple Ethernet control cores to implement multi-core Ethernet communication configuration, which wastes the resources of the multi-core chip. It also requires the configuration of multiple external communication ports to implement external core communication, which has high hardware costs, and each processing core can only process Ethernet communication type communication messages for one external chip, which limits the functional use of each processing core of the multi-core chip.
[0055] Taking automobiles as an example, as the level of automobile electrification, networking, intelligence, and sharing increases, the requirements for vehicle-mounted communications not only need to meet the communication needs of various nodes in the vehicle (such as various chips in the vehicle), but also need to take into account the information interaction with external networks or objects (such as various chips outside the vehicle), such as OTA upgrades, cloud data collection, high-definition video transmission, etc. Under these application backgrounds, automotive Ethernet technology is widely used in the communication architecture of the entire vehicle.
[0056] However, for existing multi-core chips, if they want to achieve both inter-core communication and extra-core communication, when performing Ethernet communication, it is necessary to configure an independent Ethernet control core for each processing core, and each processing core uses the corresponding Ethernet control core to perform its own Ethernet communication configuration, so that each processing core can achieve Ethernet communication based on its corresponding Ethernet control core, and the external switch (i.e., external switch) used to achieve extra-core communication needs to establish communication connections with multiple chips, so it is necessary to establish multiple communication ports (e.g., T1 ports) for establishing communication connections with each Ethernet control core included in each chip, and send Ethernet communication messages to the Ethernet control core based on the communication connection. When each Ethernet control core receives an Ethernet communication message, it sends the Ethernet communication message to the corresponding processing core.
[0057] This chip communication method requires configuring multiple Ethernet control cores to implement Ethernet communication configuration of each processing core of the multi-core chip, which wastes the resources of the multi-core chip. In addition, it is necessary to configure multiple communication ports for the external switch to achieve communication connection with each Ethernet control core, which has a high hardware cost.
[0058] Therefore, the implementation of the present application proposes a chip communication method and system, wherein the chip communication system includes a first chip, a first switch, and a second chip, wherein the second chip includes an Ethernet control core and multiple first processing cores, and by setting an Ethernet control core, the first switch can communicate with the Ethernet control core through a communication port, thereby realizing communication connection with multiple processing cores included in the second chip, and by setting an Ethernet control core, Ethernet communication configuration of multiple processing cores of a multi-core chip is realized, thereby reducing resource waste of the multi-core chip. Moreover, the first switch only needs one communication port, and can establish a communication connection with an Ethernet control core to realize communication between multiple first chips and multiple processing cores of each second chip, thereby reducing hardware costs.
[0059] Next, the chip communication method and system provided by the implementation of the present application are described in detail.
[0060] like Figure 1A As shown, in one implementation of the present application, the chip communication system includes a plurality of first chips, a first switch (ie, an external switch) and a second chip.
[0061] The first chip is, for example, an on-board diagnostic system (OBD) or an electronic control unit (ECU) (ie, ECU2 or ECU3). The second chip is, for example, ECU1, ECU4, ECU5, etc.
[0062] Furthermore, if Figure 1B As shown, the second chip includes an Ethernet control core and a plurality of first processing cores, and the Ethernet control core includes a second switch.
[0063] Furthermore, if Figure 2 and Figure 3 As shown, the first switch includes a plurality of first communication ports and a plurality of second communication ports, and each first chip establishes a communication connection with the first switch through the corresponding first communication port. Each second chip establishes a communication connection with the first switch through the corresponding second communication port.
[0064] The first switch is configured with a first routing rule, and the first switch determines the second chip capable of processing the first communication message based on the first routing rule, and the second communication port of the first switch that has a communication connection with the second chip as the second target communication port, and the third communication port of the Ethernet control core of the second chip that has a communication connection with the first switch as the third target communication port, so as to send the first communication message to the second switch in the Ethernet control core through the second target communication port and the third target communication port. The second target communication port is, for example, the second communication port with a port address of emac3, and the third target communication port is, for example, the third communication port with a port address of emac2.
[0065] There may be multiple second chips determined.
[0066] The second chip includes an Ethernet control core and a plurality of first processing cores (e.g., first processing core 1, first processing core 2, first processing core 3), and the Ethernet control core includes a second switch (i.e., an internal switch), a plurality of third communication ports, and a plurality of fourth communication ports. The first switch establishes a communication connection with the first switch through one of the plurality of third communication ports. Each first processing core establishes a communication connection with the Ethernet control core through the corresponding fourth communication port.
[0067] The second switch is configured with a second routing rule, and the second switch determines the first target processing core (as an example of the first target processing end) based on the second routing rule, and determines the fourth communication port of the fourth communication port of the Ethernet control core that has established a communication connection with the first target processing core as the fourth target communication port, so as to send the first communication message to the first target processing core through the fourth target communication port. The fourth target communication port is, for example, the fourth communication port 0 corresponding to the first processing core 1, the fourth communication port 2 corresponding to the first processing core 2, and the fourth communication port 3 corresponding to the first processing core 3.
[0068] Each first processing core implements Ethernet communication configuration only through one Ethernet control core, and each first processing core establishes an Ethernet communication connection with the Ethernet control core through the corresponding fourth communication port.
[0069] The first chip is used to determine the first communication message and the communication type of the first communication message. If the communication type is an Ethernet communication type, the first communication message is sent to the first switch.
[0070] That is, the first chip is used to determine the first communication message and determine the communication type of the first communication message. If the communication type is an Ethernet communication type, the first communication port corresponding to the first chip in the first communication port of the first switch is determined as the first target communication port, and the first communication message is sent to the first switch through the first target communication port.
[0071] The first chip can specifically be the aforementioned vehicle-mounted chip such as OBD, ECU2, ECU3 and other chips, and of course it can also be a chip of other devices such as a chip of a mobile phone connected to the vehicle for communication, and of course it can also be a cloud chip of a cloud server, etc.
[0072] The first chip sends a first communication message, and the first communication message may be an Ethernet communication type communication message, or a CAN communication type communication message, or of course, a LIN communication type communication message.
[0073] Exemplarily, the first chip determines the target external switch, and determines the port address emac (as an example of identification information of the first communication port) of the communication port of the target external switch based on the configuration rule in the first chip, and the emac address corresponds to the first communication port. For example, the port address of the first communication port 0 (as an example of the first target communication port) for establishing a communication connection between the first switch and the OBD is emac4, and the port address of the first communication port 1 for establishing a communication connection between the first switch and the ECU2 is emac5. In this way, by determining the identification information of the first communication port, the communication message can be sent to the external switch through the first target communication port.
[0074] That is, the first target communication port is a communication port that the first switch establishes a communication connection with the corresponding first chip, for example, the first communication port 0 that establishes a communication connection with the first chip OBD, the first communication port 1 that establishes a communication connection with the first chip ECU2, and the first communication port 2 that establishes a communication connection with the first chip ECU3.
[0075] It should be noted that the multiple first communication ports of the first chip and the first switch are Tx ports or T1 ports. For example, the first communication port for establishing a communication connection with the OBD is the Tx port, and the first communication port for establishing a communication connection with ECU2 and ECU3 is the T1 port.
[0076] In another implementation of the present application, each first chip has a corresponding external switch, and the external switch is configured with routing rules corresponding to each first chip. Each first chip sends a first communication message to the corresponding external switch. The external switch determines the target first switch and the first communication port of the target first switch (as an example of the first target communication port) based on the built-in routing rules, and sends the first communication message to the first switch corresponding to the second chip through the first target communication port.
[0077] The first switch is used to determine the second chip corresponding to the first communication message according to the first communication message and the first routing rule, and send the first communication message to the second switch in the Ethernet control core included in the second chip.
[0078] That is, the first switch is used to determine, based on the first routing rule, the second communication port corresponding to the second chip in the second communication port of the first switch as the second target communication port, and to determine the third communication port corresponding to the first switch in the third communication port of the Ethernet control core included in the second switch as the third target communication port, and to send the first communication message to the second switch of the Ethernet control core included in the second chip through the second target communication port and the third target communication port.
[0079] Exemplarily, the first switch determines the second chip based on the first routing rule, and determines the second communication port (as an example of the second target communication port) that establishes a communication connection with the second chip, and the third communication port (as an example of the second target communication port) of the Ethernet control core included in the second chip, thereby determining to send the communication message to the second switch in the Ethernet control core included in the corresponding chip.
[0080] The second target communication port is a communication port through which the Ethernet control core establishes a communication connection with the first switch.
[0081] Further, after receiving the first communication message through the first communication port, the first switch determines, based on the first routing rule, that the first communication message needs to be sent to the target second chip, and determines that the port address of the communication port corresponding to the target second chip in the second communication port (as an example of the second target communication port) is emac3 (as an example of the identification information of the second communication port), and determines that the emac address of the communication port corresponding to the first switch in the third communication port of the Ethernet control core (as an example of the third target communication port) is, for example, emac2 (as an example of the identification information of the third communication port). For example, the Ethernet control core has three third communication ports, and the port addresses of the third communication ports are emac0, emac1, and emac2, respectively. The first switch determines, based on the first routing rule, that the address information of the third communication port 2 with which the communication connection has been established in the third communication port of the Ethernet control core is emac2, and then the first switch determines, based on the first routing rule, that the third communication port 2 corresponding to emac2 is the second target communication port, so that the second target communication port can be identified based on the external routing rule (that is, the first routing rule), and then the communication message is sent to the corresponding second switch in the Ethernet control core.
[0082] It should be noted that the naming of the internal switch and the external switch in this application is only for the second chip, and is used to distinguish whether the switch is located outside or inside the second chip. The structures and functions of the two switches may be the same, but the configuration information therein may be different.
[0083] The second communication port may also be a T1 port, or other types of ports. The third communication port may be a POT port, or other types of ports.
[0084] The second switch included in the Ethernet control core is used to determine the first target processing end according to the first communication message and the second routing rule, and send the first communication message to the first target processing end so that the first target processing end performs corresponding processing according to the first communication message. The first target processing end is at least one of the first processing cores.
[0085] That is, the second switch included in the Ethernet control core is used to determine the corresponding first target processing core (as an example of the first target processing end) according to the first communication message and the second routing rule, and based on the second routing rule, determine the fourth communication port corresponding to the first target processing core in the fourth communication port of the Ethernet control core as the fourth target communication port, and send the first communication message to the target processing core through the fourth target communication port, so that the target processing core performs corresponding processing according to the first communication message.
[0086] Exemplarily, the second switch determines that the first communication message needs to be sent to the first processing core 2 based on the first communication message and the second routing rule, then the second switch determines that the communication port in the fourth communication port of the Ethernet control core that has established a communication connection with the first processing core 2 (as an example of the first target processing end) is the fourth communication port 2 (as an example of the fourth target communication port) based on the second routing rule, and the port address of the fourth communication port 2 is hif2. In this way, the Ethernet control core can determine that the communication message is sent to the corresponding first target processing end by identifying the core identification information; for example, if the first target processing end is determined to be the first processing core 2, then the port address of the fourth communication port corresponding to the first processing core 2 is determined to be hif2 based on the second routing rule, and thus, the fourth target communication port corresponding to the first target processing end in the Ethernet control core is determined to be the fourth communication port 2 based on the second routing rule.
[0087] Of course, the second switch determines multiple first processing cores such as first processing core 2 and first processing core 3 according to the first communication message and the second routing rule.
[0088] That is, the fourth target communication port is a communication port through which the Ethernet control core establishes a communication connection with the first target processing core.
[0089] It should be noted that the fourth communication port of the second switch may specifically be a POT port, and of course may also be other types of communication ports.
[0090] In this way, the Ethernet communication configuration of multiple processing cores of a multi-core chip can be realized by configuring an Ethernet control core, reducing the resource waste of the multi-core chip. Only one Ethernet control core is set, so that the first switch can use only one communication port to realize communication with the Ethernet control core, the first switch determines the second target communication port and the third target communication port based on the first routing rule, the second switch determines the corresponding target processing end (for example, the first target processing core) based on the second routing rule, and determines the fourth target communication port based on the second routing rule, so that the first chip can send the first communication message to the first target processing core for corresponding processing based on the determined first target communication port of the first switch, the second target communication port of the first switch, the determined third target communication port of the Ethernet control core, and the determined fourth target communication port of the Ethernet control core. In this way, it is possible to establish a communication connection based on a communication port of the first switch and an Ethernet control core, without configuring the first switch with multiple communication ports that are respectively connected to multiple Ethernet control cores of a chip, and without configuring each Ethernet control core separately, so that the chip communication system structure is simpler. And the target communication port is determined based on the first routing rule and the second routing rule, so that the first communication message is converted from the outer core communication to the inner core communication more conveniently and quickly.
[0091] Furthermore, if Figure 2 and Figure 4 As shown, in another implementation of the present application, the second chip also includes a second processing core.
[0092] The first chip is further configured to send the first communication message to the second processing core if it is determined that the communication type is the CAN communication type.
[0093] The second processing core includes a fifth communication port, and the first chip sends the first communication message to the second processing core through the fifth communication port of the second processing core.
[0094] The second processing core is used to send the first communication message to the Ethernet control core.
[0095] The Ethernet control core is also used to convert the communication type of the first communication message into an Ethernet communication type to obtain a second communication message, and determine a second target processing end based on a preset configuration rule, and send the second communication message to the second target processing end so that the second target processing end performs corresponding processing according to the second communication message. The second target processing end is any one of the first processing core or the first switch.
[0096] Exemplarily, if the second target processing end is the first processing core, the Ethernet control core sends the second communication message to the target processing end through the fourth communication port corresponding to the second target processing end. For example, the Ethernet control core determines that the second target processing end is any one of the first processing cores (e.g., the first processing core 2), then determines the fourth communication port corresponding to the first processing core 2 in the fourth communication port as the fifth target communication port (e.g., the fourth communication port 2), and sends the second communication message to the first processing core 2 through the fifth target communication port. The fifth target communication port is a communication port that the Ethernet control core has a communication connection with the first processing core (as the first target processing end) that needs to receive the converted Ethernet communication type communication message.
[0097] For another example, if the second target processing end is the first processing core, the Ethernet control core sends the second communication message to the first switch through the third communication port and the second communication port.
[0098] The Ethernet control core may determine whether to send the second communication message to the first processing core or the first switch based on a preset configuration rule.
[0099] Furthermore, if the Ethernet control core does not convert the first communication message, it may be sent to the second processing core, and the second processing core forwards it to the external new chip (ie, the first chip).
[0100] In one implementation of the present application, the Ethernet control core includes a processing module for performing related processing of converting communication messages of CAN communication type into communication messages of Ethernet communication type. After the processing module converts the communication messages of CAN communication type into communication messages of Ethernet communication type, the second target processing end is determined according to a preset configuration rule, and the second communication message is sent to the second target processing end through a fourth communication port corresponding to the target processing end in the Ethernet control core, so that the second target processing end performs corresponding processing according to the second communication message.
[0101] It should be noted that the preset configuration rules are the underlying implementation codes, which mainly specify the conversion rules of CAN communication type communication messages to Ethernet communication type communication messages, as well as the sending rules of the converted communication messages.
[0102] Each processing core is used to perform corresponding processing when receiving the first communication message or the second communication message. The corresponding processing includes the first processing core 1 processing the identified communication message and sending the processing result to the first processing core 2, and the first processing core 2 performing secondary processing to obtain the processing result. That is, in the implementation of the present application, after the out-of-core communication message is transmitted to the corresponding processing core, multiple processing cores can cooperate to process the communication message to obtain the final processing result.
[0103] Furthermore, if Figure 5 As shown, in another implementation of the present application, the plurality of first processing cores include a master core (e.g., Master core) and at least one slave core (e.g., Slave1 core, Slave2 core), that is, the target core is the master core or the slave core. When the master core or the slave core is processing the communication message, the master core will perform a detection process for the communication fault between the master core and the slave core, and when a fault is detected, determine the fault level, and perform corresponding processing according to the fault level.
[0104] In one implementation, the fault level includes a first fault level (i.e., a first-level fault), a second fault level (i.e., a second-level fault), and a third fault level (i.e., a third-level fault). The first fault level may be fault information such as input voltage and chip temperature, the second fault level may be fault information such as Ethernet hardware and firmware faults, and the third fault level may be fault information such as Ethernet faults received by the master core.
[0105] If the fault level is the first fault level, the main core notifies the fault processing module to process the fault, and determines whether the fault is eliminated based on a preset detection cycle until it is determined that the fault is eliminated.
[0106] If the fault level is the second fault level, the master core sends a notification to each slave core to unload the Ethernet communication configuration. When it is determined that each slave core has successfully unloaded the Ethernet communication configuration, the master core uninstalls the Ethernet communication configuration corresponding to the master core, and reloads the Ethernet communication configuration based on the Ethernet control core. When the Ethernet communication configuration is successfully loaded, the Ethernet control core is notified to load the Ethernet communication configuration for each slave core.
[0107] If the fault level is the third fault level, the master core releases the coupling relationship between the master core and the target slave core, and restarts the target slave core.
[0108] In another implementation, the fault level may further include other fault levels, and different fault levels correspond to different fault handling strategies, which may be specifically set according to requirements.
[0109] Further, the second processing core is a slave core (e.g., Slave3 core), that is, in the present application, the second processing core is a slave core. The function of the second processing core can be pre-configured by the master core, or pre-configured in other ways. The second processing core is mainly used to pre-process the communication message of the CAN communication type, such as directly forwarding it to the Ethernet control core, or directly forwarding it to the first chip, or after simple processing of the communication message, if it is determined that the message type conversion is not required, it can also be directly forwarded to the corresponding target processing core.
[0110] Further, in an implementation of the present application, the number of the third communication ports is 1 (emac2), corresponding to the Ethernet control core, and the number of the fourth communication ports corresponds to the number of processing cores.
[0111] In another implementation of the present application, Figure 6 As shown, the number of third communication ports is multiple (emac0, emac1, emac2), and the Ethernet control core randomly selects one of the third communication ports to establish a communication connection with the second communication port of the first switch. The number of fourth communication ports is multiple (for example, hif0, hif1, hif2, hif3), and the Ethernet control randomly selects the corresponding fourth communication port to establish a communication connection with each processing core.
[0112] It should be noted that the fifth communication port of the second processing core is actually a CAN transceiver channel port, that is, the communication messages of the CAN communication type of each first chip are sent to the second processing core through the CAN transceiver channel.
[0113] Further, see Figure 7 The chip communication method provided by the implementation of this application is applied to a chip communication system and specifically includes the following steps.
[0114] S110, the first chip determines a first communication message and a communication type of the first communication message, and if the communication type is an Ethernet communication type, sends the first communication message to the first switch.
[0115] S120: The first switch determines the second chip corresponding to the first communication message according to the first communication message and the first routing rule, and sends the first communication message to the second switch in the Ethernet control core included in the second chip.
[0116] S130: The second switch determines a first target processing end according to the first communication message and the second routing rule, and sends the first communication message to the first target processing end, so that the first target processing end performs corresponding processing according to the first communication message.
[0117] The first target processing end is at least one of the first processing cores.
[0118] The chip communication method provided by the implementation method of the present application, if the first chip is determined to be a communication message of Ethernet communication type, the first communication message of Ethernet communication type is sent to the first switch, the first switch determines the second chip corresponding to the first communication message based on the first routing rule, and sends the first communication message to the second switch of the Ethernet control core included in the second chip, the second switch in the Ethernet control core determines the corresponding first processing core based on the second routing rule, and sends the first communication message to the first processing core for corresponding processing. In this way, only one Ethernet control core is set to realize the Ethernet communication configuration of multiple processing cores, reducing the waste of chip resources. In addition, because only one Ethernet control core is set, the first switch can establish a communication connection with the Ethernet control core based on one communication port. Therefore, there is no need to configure the first switch with multiple communication ports for communicating with each Ethernet control core of the chip, which reduces the hardware cost of the first switch, and there is no need to configure each Ethernet control core separately, making the chip communication system structure simpler. And the second chip is determined based on the first routing rule, and the first processing core is determined based on the second routing rule, so that the first communication message is more convenient and rapid from external communication to internal communication.
[0119] In one implementation of the present application, the first switch includes multiple first communication ports, and each first chip establishes a communication connection with the first switch through the corresponding first communication port. The method also includes: the first chip determines the first communication port corresponding to the first chip among the first communication ports of the first switch as the first target communication port. Then, in step S110, if it is a first communication message of Ethernet communication type, the first chip sends the first communication message to the first switch, including: the first chip sends the first communication message to the first switch through the first target communication port.
[0120] The first chip determines to send the first communication message to the first switch through its own configuration rule, and determines identification information of a first communication port in the first switch that has a communication connection with the first chip to obtain a first target communication port, and sends the first communication message to the first switch through the first target communication port.
[0121] Furthermore, in an implementation of the present application, the first switch also includes multiple second communication ports, each second chip establishes a communication connection with the first switch through the corresponding second communication port, the Ethernet control core includes multiple third communication ports, and the first switch establishes a communication connection with the Ethernet control core through a third communication port among the multiple third communication ports. The method also includes: the first switch determines, based on the first routing rule, the second communication port corresponding to the second chip among the second communication ports included in the first switch as the second target communication port, and determines the third communication port corresponding to the first switch among the third communication ports included in the Ethernet control core as the third target communication port, then the first switch sends the first communication message to the second switch in the Ethernet control core included in the second chip, including: the first switch sends the first communication message to the second switch in the Ethernet control core included in the second chip through the second target communication port and the third target communication port.
[0122] Exemplarily, the first switch determines the second chip that can process the first communication message based on the first communication message and the first routing rule, and determines the second communication port corresponding to the second chip in the second communication port of the first switch as the second target communication port based on the first routing rule, and determines the third communication port corresponding to the first switch in the third communication port included in the Ethernet control core as the third target communication port, and sends the first communication message to the second switch of the Ethernet control core included in the second chip through the second target communication port and the third target communication port.
[0123] Further, in an implementation of the present application, the first communication message includes LAN identification information. In step S120, the first switch determines the second chip corresponding to the first communication message according to the first communication message and the first routing rule, and sends the first communication message to the Ethernet control core, including: the first switch determines the second chip in the second chip that can communicate based on the LAN corresponding to the LAN identification information according to the LAN identification information included in the first communication message and the first routing rule.
[0124] The local area network may specifically be a virtual local area network (VLAN), and the local area network identification information may be, for example, a local area network number (ie, VLAN ID), or other identification information for uniquely identifying a local area network.
[0125] Exemplarily, as shown in Table 1, by configuring the external communication routing rules corresponding to the first switch (i.e., the external routing rules (as an example of the first routing rules)), according to the external routing rules, when the first chip receives an Ethernet message (i.e., a communication message of Ethernet communication type), after the communication message arrives at the external physical network port corresponding to the first chip in the first switch (i.e., the first target communication port), the first switch determines the second chip (i.e., the target second chip) that can communicate based on the local area network corresponding to the local area network identification information based on the first routing rule and the VLAN ID (as an example of the local area network identification information) carried by the first communication message, and then determines the address information of the communication port corresponding to the target second chip in the second communication port of the first switch (i.e., the second target communication port) and the address information of the communication port corresponding to the first switch in the third communication port of the Ethernet control core (i.e., the third target communication port) based on the first routing rule, and then sends the communication message to the external physical network port of the Ethernet control core for outward communication (i.e., the third target communication port) through the second target communication port.
[0126] In Table 1, the control unit is a different first chip and a second chip, the MAC address is the port address information of the third communication port of the Ethernet control core included in each chip, the Vlan ID is the local area network identification information that each third communication port can communicate with, the IP address is the IP address of the corresponding Vlan, whether multicast is involved is the communication mode of each chip, and the multicast MAC address is the port address information of the corresponding port of the multicast sending of each chip.
[0127] Table 1 First routing rule
[0128]
[0129] In addition, except for the communication interface connected to the external diagnostic equipment and the general precise time protocol (gPTP) communication in the vehicle, the communication messages of other Ethernet communication types in the vehicle should use tagged VLAN (also known as VLAN Tag), and in this application, based on the external routing rules, the chip communication supports VLAN filtering function. If the VLAN of the received communication message is an Ethernet frame (also known as the communication message of Ethernet communication type) that does not conform to the VLAN subordinate check (that is, the VLAN attributes of the sender and the receiver) allowed for communication by the third communication port, it should be discarded and the communication message should not be transmitted. In this way, the communication security of the communication message can be ensured, and the communication messages that do not need to be processed will not be transmitted and processed, thereby reducing the workload of the target processing core.
[0130] It should be noted that the VLAN Tag includes local area network identification information (such as VLAN ID) and an IP address corresponding to the VLAN. When it is determined that the corresponding communication port (such as the third communication port) can support the communication message of the local area network identification information for communication, the communication message is sent to the second switch using the VLAN according to the IP address corresponding to the VLAN.
[0131] It should also be noted that when other domain controllers in the vehicle need to forward communication messages from outside the vehicle to the vehicle, they need to add corresponding VLAN tags to the communication messages according to the source of the forwarded communication messages. For example, a VLAN tag is generated according to the VLAN ID and VLAN IP supported by the chip (i.e., the first chip) of the source of the communication message, and added to the communication message.
[0132] When the in-vehicle communication message is forwarded to outside the vehicle, the VLAN Tag needs to be stripped off.
[0133] In another implementation of the present application, based on internal routing rules and external routing rules, the Ethernet messages that need to be sent by each internal network port (the fourth communication port corresponding to the processing core) can be sent to an external physical network port (for example, the first target communication port) through a common internal physical network port (for example, the third communication port), and then sent to the first chip such as OBD or other ECU corresponding to the first target communication port.
[0134] Therefore, the in-vehicle Ethernet node (i.e., the fourth communication port of each processing core) and the external switch both support VLAN, and VLAN can divide users into multiple logical networks, where communication is possible within a group, but communication between groups is not possible. That is, based on the VLAN ID, the second chip supporting VLAN1 and the fourth communication ports corresponding to the multiple first processing cores supporting VLAN1 can be divided into one group, and Ethernet communication can be performed between the external switch and the multiple fourth communication ports (i.e., communication is possible within the group), but Ethernet communication cannot be performed between the fourth communication ports that do not support VLAN1 (i.e., communication between groups is not possible).
[0135] Furthermore, in this application, unicast, multicast, and broadcast messages forwarded at layer 2 can only be forwarded within the group, that is, secondary forwarding and secondary processing of communication messages, and forwarding of multiple communication ports can only be forwarded between communication ports that support the LAN communication.
[0136] Furthermore, in one implementation of the present application, the Ethernet control core also includes multiple fourth communication ports, and each first processing core establishes a communication connection with the Ethernet control core through the corresponding fourth communication port. The method also includes: the second switch in the Ethernet control core determines the fourth communication port corresponding to the first target processing end (for example, the first processing core) in the fourth communication port of the Ethernet control core as the fourth target communication port based on the second routing rule; then the second switch sends the first communication message to the first target processing end, including: the second switch sends the first communication message to the first target processing end through the fourth target communication port.
[0137] Exemplarily, after receiving the first communication message, the second switch of the Ethernet control core determines the first target processing end according to the first communication message and the second routing rule, and determines the fourth target communication port corresponding to the target processing end in the fourth communication port of the Ethernet control core based on the second routing rule, and sends the first communication message to the first target processing end through the fourth target communication port.
[0138] There may be multiple first target processing ends.
[0139] That is, the second switch determines the address information of the physical network port (ie, the fourth target communication port) in the fourth communication port corresponding to the first communication message that has a communication connection with the target processing end through the internal routing rule (as an example of the second routing rule).
[0140] The chip communication method provided by the implementation of the present application requires that the multi-core chip be pre-configured with internal routing rules. Each processing core of the multi-core chip is a separate control core in a system-level chip that is responsible for multiple functions. Therefore, each core needs to be assigned a MAC address (as an example of core identification information), and each core needs to be assigned multiple VLAN IDs and IP addresses corresponding to the VLAN. Whether it is the master core or the slave core, when sending and receiving communication messages of the Ethernet communication type, they are forwarded to the corresponding Ethernet control core and each processing core through the internal routing rules configured by the second switch to establish a communication connection with the network port (i.e., the fourth communication port) or sent outward to a shared external physical network port (i.e., the third communication port).
[0141] That is, the internal routing rules are configured with the port address (i.e., MAC address) of the fourth communication port required by the Ethernet control core to forward the first communication message to the target processing core. Of course, as long as the port identification information (e.g., MAC address) of the fourth communication port corresponding to the target processing core is determined, the port address (e.g., HIF address) of the communication port (i.e., the fourth target communication port) that can transmit messages with the target processing core can be determined from the fourth communication port based on the internal routing rules.
[0142] In addition, the main core uniformly manages the MAC, VLAN ID, VLAN IP and other VLAN mappings, unicast and multicast message processing of all cores, and is responsible for the internal routing rule configuration of the second switch.
[0143] As shown in Table 2, Table 2 is the master core configuration information and slave core configuration information of the control unit such as the first chip and the second chip.
[0144] The MAC address is the port identification information of the fourth communication port corresponding to each processing core (for example, the address information of the port). If there is only one processing core, there is only chip identification information and corresponding port identification information (for example, the MAC address corresponding to a single-core chip such as ECU2, ECU3, OBD diagnostic equipment, etc.), and the VLAN ID is the local area network number that each processing core can communicate with. For example, the VLAN number carried by the communication message sent by ECU2 is VLAN1 and VLAN2, then the communication message can be sent to the main core of ECU1 for corresponding processing. The IP address is also the local area network communication address corresponding to each processing core. Whether multicast is involved is also whether multi-channel message transmission can be performed (that is, multi-core communication message sending is performed simultaneously). The multicast MAC address is the MAC address of the chip or processing core that receives the message corresponding to the multicast.
[0145] Table 2 Second routing rules
[0146]
[0147] It should be noted that the VLAN ID in the implementation of this application is the VLAN ID of the communication message that each chip or processing core can receive and send. That is, the VLAN ID of the communication message received and sent by ECU2 is Vlan1 and Vlan2. The VLAN ID of the communication message received and sent can be determined based on the properties of the ECU or based on the preset communication rules.
[0148] It should also be noted that the first routing rule shown in Table 1 and the second routing rule shown in Table 2 are only partial information, and the routing rules may also include other information, such as the hif address of the fourth communication port corresponding to each processing core or each chip.
[0149] In one implementation of the present application, when configuring internal routing rules, it is necessary to first configure a physical network port (that is, the fourth communication port) for each functional control core, and configure the working mode corresponding to each physical network port, whether it is self-learning, and other information, and then configure each VLAN ID, unicast, multicast and other processing methods, as well as the physical network ports involved.
[0150] In one implementation of the present application, the second routing rule can also be generated by self-learning of the second switch, such as pre-configuring the rule code. For example, when the second switch receives the first communication message, the first communication message is sent to all first processing cores by broadcasting, and each processing core feeds back processing information of the received first communication message (such as information that the message cannot be processed and the reason for the inability to process is that the LAN identification information does not match, etc.), and the second switch performs self-learning based on the fed-back processing information to determine information such as the VLAN ID supported by each first processing core, and generates a corresponding routing table (as an example of the second routing rule) by self-learning, so that the first communication message can be forwarded subsequently according to the routing table.
[0151] In another implementation of the present application, in order to quickly realize Ethernet communication message forwarding and reduce delays, the internal routing rules can also be configured by configuring a static internal routing rule table (as shown in Table 2), that is, the port number and MAC address corresponding to the ECU connected to the second switch can be obtained through static configuration to generate an Ethernet switch forwarding table (as another example of internal routing rules) and store it in the first switch.
[0152] When data exchange is performed (that is, when communication messages are transmitted), after the Ethernet control core receives a communication message of the Ethernet communication type, it parses the LAN identification information from the communication message, and then obtains at least one target processing core (that is, the first target processing end) that can communicate based on the LAN corresponding to the LAN identification through the routing table, determines the MAC address corresponding to each target processing core, and the corresponding port number (for example, hif0, hif1, etc.), and quickly forwards the communication message to the communication port corresponding to the port number link (that is, the fourth target communication port).
[0153] And in the process of chip communication development, communication requirements will be constantly updated and improved. If VLANID and other information are added or updated, the internal routing rule configuration needs to be updated, which involves the upgrade of the entire engineering software version. In order to achieve decoupling from the application function program and reduce the complexity of program version upgrade, in one implementation of the present application, the internal routing rules can be configured as an independent bin file, placed in a fixed flash address, and integrated into each specific development function. If the corresponding internal routing rule configuration needs to be updated, only the corresponding routing configuration file (i.e., bin file) needs to be updated. In this way, it is convenient to update the internal routing rules.
[0154] Further, in step S130, the second switch determines the first target processing end according to the first communication message and the second routing rule, including: the second switch determines the first target processing end in the second processing core that can communicate based on the local area network corresponding to the local area network identification information according to the local area network identification information included in the first communication message and the second routing rule.
[0155] Exemplarily, in the present application, based on internal routing rules, each processing core communication supports VLAN filtering function. For example, if the VLAN of the received communication message does not match the VLAN subordinate check allowed by the fourth communication port for communication, the communication message of the Ethernet communication type should be discarded and the communication message should not be transmitted. That is, if the Vlan ID does not match, the first communication message will not be sent to the unmatched processing core. In this way, the first target processing end will not perform corresponding processing on the communication message that does not need to be processed, thereby reducing the workload of the target processing end.
[0156] When it is determined that the corresponding communication port (eg, the fourth communication port) can support the communication message of the local area network identification information for communication, the communication message is sent to the corresponding processing core using the VLAN according to the IP address corresponding to the VLAN.
[0157] Further, in step S130, the second switch determines the first target processing end according to the first communication message and the second routing rule, and sends the first communication message to the first target processing end, including: when the second switch receives multiple first communication messages, according to each first communication message and the second routing rule, determines the first target processing end corresponding to each first communication message, and determines the priority order of the first communication messages, and sends the first communication messages to the corresponding first target processing end in descending order of priority.
[0158] Exemplarily, according to the importance and security of Ethernet communication interaction, the priority level needs to be determined according to the message type of the communication message, for example, 8 priority levels are set from 0 to 7, and the larger the value, the higher the priority. Among them, the priority of the control message data of the message type related to security is the highest, which is set to 7; the priority of the media message data of the message type related to security is 6; the priority of the network control message data of the message type is 5; the priority of the time and warning message data of the message type is 4; the priority of the control message data of the message type related to security is 3; the priority of the media message data of the message type related to security is 2; the priority of the diagnostic flush log control message data of the message type is 1; the priority of the message data of the message type that uses the remaining bandwidth for best effort transmission is the lowest, which is set to 0.
[0159] The priority of the communication message can be set according to the demand, and the message type of each communication message is obtained based on a preset rule, such as identifying the message type included in the communication message, or determining the message type of the communication message based on keywords (warning, safety) and the like.
[0160] When the second switch receives multiple first communication messages, the first target processing end corresponding to each first communication message and the communication port corresponding to the target processing end in the fourth communication port of the Ethernet control core (that is, the aforementioned fourth target communication port) are determined according to the LAN identification information of each first communication message and the second routing rule, and the message type of each first communication message is determined, and the first communication messages are prioritized according to the message type of each first communication message to obtain the priority order of the multiple first communication messages, and the first communication messages are sent to the corresponding first target processing end through the corresponding fourth target communication port in order from high to low priority.
[0161] Exemplarily, there are first communication message 1, first communication message 2, and first communication message 3. Based on the first routing rule, the first target processing end corresponding to the first communication message 1 is determined to be the main core, based on the first routing rule, the first target processing end corresponding to the first communication message 2 is determined to be the slave core 2, and based on the first routing rule, the first target processing end corresponding to the first communication message 3 is determined to be the slave core 1. And it is determined that the message type of the first communication message 1 is security-related control message data, the message type of the first communication message 2 is network control message data, and the message type of the first communication message 3 is diagnostic flush log control message data, then the priority order of the multiple first communication messages is determined to be the first communication message 1> the first communication message 2> the first communication message 3, then in order of priority from high to low, the first communication message 1 is first sent to the main core through the fourth communication port 1 of the main core, and then the first communication message 2 is sent to the slave core 2 through the fourth communication port 3 of the slave core 2, and finally the first communication message 3 is sent to the slave core 1 through the fourth communication port 2 of the slave core 1. In this way, by setting different priorities to determine the transmission order of Ethernet data packets (that is, communication messages of multiple Ethernet communication types) in the network, it can be ensured that communication messages of Ethernet communication types for key application functions are processed first, avoiding network congestion and delays, resulting in data loss and functional deficiencies.
[0162] In another implementation of the present application, the first communication message may further include core identification information of the processing core to determine whether the first communication message is sent to the corresponding target processing core.
[0163] In one implementation of the present application, the master-slave attribute of each first processing core is determined based on a pre-stored RAM address. The slave attribute of the second processing core is also determined based on a pre-stored RAM address.
[0164] Exemplarily, during the startup process of the multi-core domain controller chip, the pre-generated AD sampling results are first stored in the specified memory bar (Random Access Memory, RAM for short) address through the boot program of the multi-core domain controller chip. After startup, each independent functional core (that is, processing core) identifies its role in Ethernet communication based on the read RAM address content. For example, the first processing core 2 and the second processing core 2 determine to perform Ethernet communication message processing, and the first processing core 3 determines to perform CAN communication message processing.
[0165] As shown in Table 3, if the AD sampling result is 0x01, the AD sampling result is stored in the RAM storage information, and each processing core reads the RAM address 0x01 of the RAM storage information. Then, processing core 1 reads the RAM address to determine that it is the master core, and processing cores 2 and 3 read the RAM address to determine that they are slave cores. If the AD sampling result is 0x02, the AD sampling result is stored in the RAM storage information, and each processing core reads the RAM address 0x02 of the RAM storage information. Then, processing core 2 reads the RAM address to determine that it is the master core, and processing cores 1 and 3 read the RAM address to determine that they are slave cores. If the AD sampling result is 0x03, the AD sampling result is stored in the RAM storage information, and each processing core reads the RAM address 0x03 of the RAM storage information. Then, processing core 3 reads the RAM address to determine that it is the master core, and processing cores 1 and 2 read the RAM address to determine that they are slave cores.
[0166] Table 3 RAM address and processing core master-slave attribute correspondence table
[0167] RAM stores information Processing core 1 Processing core 2 Processing core 3 0x01 Main core From the core From the core 0x02 From the core Main core From the core 0x03 From the core From the core Main core
[0168] In one implementation, the AD sampling result is that the multi-core domain controller chip determines the number of processing cores, randomly generates the AD sampling result, and stores the AD sampling result in a specified RAM address.
[0169] In another implementation, the AD sampling result is an AD sampling result determined in advance by the user based on the number of processing cores and the performance of each processing core. After the multi-core domain controller chip is started, the boot program reads the AD sampling result and stores the AD sampling result in a specified RAM address.
[0170] The first processing core as the main core directly performs corresponding Ethernet communication configuration based on the Ethernet control core.
[0171] Exemplarily, when the processing core identifies itself as the main core, during the initialization process, the Ethernet driver is initialized based on the Ethernet control core (that is, the main core Ethernet configuration information stored in the Ethernet control core), the Ethernet working mode is enabled (the Ethernet working mode is turned on and off), and the bridge working mode is configured (for example, communication type, local area network, etc.), and the main core configures the internal routing forwarding rules (that is, internal routing rules) for the second switch, and configures its own internal routing rules, etc. After the configuration is completed, the flag bit indicating that the main core is ready is set, and normal management and fault monitoring of Ethernet communication begins.
[0172] Among them, the main core performs Ethernet communication configuration based on the Ethernet control core, including the main core being responsible for the system clock of the Ethernet communication control core (also known as the Ethernet control core), the sending and receiving clocks of the external physical network port, and the clock and rate of the corresponding XPCS channel (a type of physical coding sublayer (PCS) logical channel, that is, a type of logical channel containing dedicated sending and receiving circuits) on Serdes (also known as Serializer-Deserializer), and is responsible for the driver configuration of the physical network port, MAC address, sending and receiving buffer size and quantity corresponding to each Ethernet controller (Ethernet controller, such as Ethernet processing core), and loads the main core Ethernet driver firmware to complete the Ethernet communication configuration.
[0173] Among them, Serdes has associated physical coding sublayer (PCS) logic. Each PCS logic channel contains dedicated transmit and receive circuits for high-speed, full-duplex serial data transmission, and the PCS logic of each channel can be configured to support a series of commonly used data protocols, including Ethernet protocols, etc.
[0174] The first processing core acting as a slave core determines the corresponding master core, and when determining that the Ethernet communication configuration of the master core is completed, sends an Ethernet configuration request to the master core. The master core sends the Ethernet configuration request of the slave core to the Ethernet control core, and the Ethernet control core performs Ethernet communication configuration of the slave core, and when determining that the Ethernet communication configuration of the slave core is completed, sends a configuration success notification message to the master core.
[0175] Furthermore, the second processing core as a slave core obtains a pre-configured configuration file from an external chip (eg, a vehicle controller) and performs its own CAN communication configuration.
[0176] If it is identified as a slave core according to the RAM address storage information and the corresponding master core information is identified, the master core is determined, and in the task scheduling, it is periodically determined whether the master core starts to work normally and whether the Ethernet initialization of the master core is configured. If the master core has been fully completed, the slave core initializes the Ethernet driver and mode settings as the slave (slave core). After the initialization is completed, the slave core sends its own Ethernet configuration request to the master core through inter-core communication (IPC (also known as Inter-Process Communication)). After the master core receives the slave core request, it sends the slave core Ethernet configuration request to the Ethernet driver control core (also known as the Ethernet control core) through inter-core communication. After receiving the Ethernet configuration request, the Ethernet control core configures the network port (also known as the communication port) and other information required by the slave core. After determining that the configuration is successful, it informs the master core through inter-core communication (that is, sends a configuration success notification message to the master core). After receiving the configuration success notification message, the master core informs the slave core through inter-core communication to notify the slave core to perform Ethernet communication normally.
[0177] That is, after the slave core recognizes and completes the configuration of the master core Ethernet driver, the Ethernet control core loads the slave core's Ethernet driver firmware and requests the master core to configure its own related network communications according to its own Ethernet communication needs.
[0178] In this application, the master core controls the normal opening and closing of Ethernet communication, fault monitoring management, and configuration of Ethernet communication routing and forwarding rules of the internal switch, so that the master core and each slave core can perform normal Ethernet communication.
[0179] Furthermore, if the main core needs to stop Ethernet communication control, it needs to notify the slave core through inter-core communication, and only after receiving the response from the slave core that the Ethernet driver uninstallation (ie, uninstallation of Ethernet communication configuration) is completed, the Ethernet driver uninstallation process of the main core can be started.
[0180] Furthermore, after the slave core can realize Ethernet communication normally, it sends the Ethernet communication status to the main core in real time, and cooperates with the main core to complete the implementation management of Ethernet communication. If it is necessary to stop Ethernet communication, it is necessary to send a request to the main core and wait for the main core to respond before starting the slave core Ethernet driver unloading process.
[0181] In addition, various faults may occur during the Ethernet communication processing of a multi-core chip, thereby affecting the communication security of each processing core, making it impossible to process communication messages normally, thereby causing chip failure.
[0182] Therefore, in another implementation of the present application, when each processing core performs corresponding processing on the first communication message, in order to ensure that the Ethernet communication of each processing core is normal, each processing core also has fault monitoring and management capabilities, and the main core also has fault repair capabilities to ensure the safe and normal Ethernet communication.
[0183] In one implementation, the Ethernet communication fault detection and processing method of the present application includes: the master core performs detection and processing on the communication fault between the master core and the slave core, and when a fault is detected, determines the fault level, and performs corresponding processing according to the fault level.
[0184] Exemplarily, the master core monitors its own Ethernet communication faults in real time, collects Ethernet fault information sent by the slave cores, determines the fault level based on the fault information, and implements a corresponding fault recovery strategy.
[0185] Specifically, the main core is responsible for detecting hardware and firmware fault events between the Ethernet sending and receiving processing cores, and performs detection according to a preset period (for example, once every 1 second). If the physical network port (also known as the communication port) receiver sends an abnormality, the receiving and sending FIFO (First Input First Output) overflows, the receiving CRC (Cyclic redundancy check) error data, the transition conflict data packet, the delayed conflict data packet and other faults, the fault detection count is increased by 1, the value of the Ethernet related register is stored once, and it is recorded as a fault.
[0186] Furthermore, if a fault is detected 10 times in succession, the fault flag is set, and the storage stops after the values of the Ethernet-related registers are stored 10 times in succession. If a fault is not detected once in the middle, the fault detection count is reduced by 1.
[0187] In one implementation, the relevant fault detection cycle and detection times, fault flag position, etc. are all determined by the configuration word.
[0188] In addition, Ethernet heartbeat management is implemented between the master core and the slave core, and the slave core pings the network segment message applied periodically in real time to monitor whether the Ethernet communication is normal. In addition to periodically applying the master core ping message, the slave core also needs to periodically detect the communication status of the communication port it uses. When an abnormality is detected, the fault information needs to be sent to the master core through inter-core communication.
[0189] When the master core detects that the fault flag is set, the heartbeat packet between the master core and the slave core is lost, or the slave core sends a fault notification, it records and stores the time when the fault occurred, the power management status of the current controller, the chip temperature value, the value of the relevant Ethernet register, etc., and reports the corresponding fault DTC (Diagnostic Trouble Code). The fault information can be read according to the diagnostic DID (Decentralized Identifier).
[0190] That is, in the implementation method of the present application, the master core performs detection and processing of communication failures between the master core and the slave cores, including detection of hardware and firmware failure events between the master core and each slave core (for example, failures such as sending FIFO overflow, CRC error data, transition conflict data packet, delayed conflict data packet, etc.). If a hardware or firmware failure event is detected, the fault flag is set, and the heartbeat packet data between the master core and each slave core is determined, the fault communication information sent by the slave core is received, and when the above fault information is received, fault information such as voltage information and temperature information is obtained, so as to determine the fault level according to the fault information.
[0191] Further, if the fault level is the first fault level, the main core notifies the fault processing module to perform fault processing, and determines whether the fault is eliminated based on a preset detection cycle (ie, monitors fault information) until it is determined that the fault is eliminated.
[0192] Exemplarily, the main core divides the fault into three levels according to the fault information recorded at the time of the fault. If the fault is caused by the input voltage and chip temperature (for example, the voltage is higher than the preset voltage threshold, and the temperature is higher than the preset temperature threshold), it is defined as a level one fault (that is, the first fault level). The main core sends communication information to the vehicle power management module indicating that the current multi-core chip has voltage and temperature faults. The power management module performs corresponding management on the communication information to perform chip protection processing, such as reducing power output, cutting off power, etc. The main core again obtains the voltage information, temperature information, etc. of the chip based on the preset detection cycle (for example, every 1S, every 5S, every 10S, etc.), and again determines whether the voltage is lower than the preset voltage threshold and whether the temperature is lower than the preset temperature threshold. If it is determined that the voltage is lower than the preset voltage threshold and the temperature is lower than the preset temperature threshold, it is determined that the fault has been eliminated.
[0193] Among them, the preset detection cycle, voltage threshold, and temperature threshold can be pre-set according to actual needs.
[0194] Further, if the fault level is the second fault level, the master core sends a notification to each slave core to unload the Ethernet communication configuration. When it is determined that each slave core has successfully unloaded the Ethernet communication configuration, the master core unloads the Ethernet communication configuration corresponding to the master core, and reloads the Ethernet communication configuration based on the Ethernet control core. When the Ethernet communication configuration is successfully loaded, the Ethernet control core is notified to load the Ethernet communication configuration for each slave core.
[0195] For example, if it is an Ethernet hardware or firmware failure, it is defined as a secondary failure (i.e., the second fault level). The main core notifies the slave core through inter-core communication to unload its own Ethernet communication configuration. After receiving the notification of successful unloading from the slave core, the Ethernet working mode is turned off and the Ethernet communication configuration is deinitialized. After the deinitialization is successful, the Ethernet working mode is turned on and the Ethernet communication configuration is reinitialized based on the Ethernet control core.
[0196] If the slave core fails to unload the Ethernet communication configuration or fails to load the Ethernet communication configuration, the master core forcibly shuts down the Ethernet communication functions of the master core and the slave core.
[0197] Further, if the fault level is the third fault level, the master core releases the coupling relationship between the master core and the target slave core, and restarts the target slave core.
[0198] In another implementation of the present application, if the master core cannot receive the heartbeat packet of the slave core or cannot receive the notification information of the Ethernet abnormality of the slave core, it is defined as a third-level fault (i.e., the third fault level), and the master core records the fault information of the slave core (as an example of the target slave core) that cannot receive the heartbeat packet or cannot receive the notification information, deletes the Ethernet communication port configuration information of the slave core, deletes the FIFO-related configuration, releases the coupling relationship between the master core and the slave core, and controls the shutdown of the slave core, restarts the slave core, reconfigures the Ethernet communication of the slave core, and the slave core performs its own Ethernet communication fault detection again. If no fault is detected, Ethernet communication processing is performed normally. If a fault is still detected, the fault communication information is sent to the master core, and the master core controls other normal slave cores to perform communication message processing.
[0199] In this way, the chip communication method provided by the implementation of the present application, the configured master core can detect the hardware and firmware fault information of the multi-core chip in real time, and can monitor the Ethernet communication of the slave core in real time. When it is determined that there is a fault in the chip or the slave core, the corresponding fault handling strategy can be executed to ensure the normal processing of the communication message of the Ethernet communication type of the multi-core chip, making the chip communication more efficient and safe. Moreover, in the present application, the Ethernet communication failure of the slave core will not affect the Ethernet communication of the master core. On the contrary, when there is an Ethernet communication failure in the slave core, the master core can help the slave core to restore the Ethernet communication, ensuring the normal communication of the slave core.
[0200] In another implementation of the present application, Figure 8 As shown, the fault detection and processing process of the main core includes the following steps.
[0201] S210, the main core performs fault flag bit detection of the Ethernet register according to a preset detection period (eg, 1 s).
[0202] S220, the main core determines whether the fault detection is fault-free, if not, executes step S230, and if so, executes step S250.
[0203] S230, the fault flag is set to determine the fault level.
[0204] S240: According to the fault level, fault processing corresponding to the fault level is performed respectively.
[0205] S250, the slave core determines whether the Ethernet fault detection is fault-free, if not, executes step S260, and if so, executes step S280.
[0206] S260, sending the fault notification information to the main core through inter-core communication, and the main core sets a fault flag and determines the fault level.
[0207] S270: The master core uninstalls the slave core Ethernet driver according to the fault communication information received from the slave core, and restarts the slave core.
[0208] S280, notifying the main core to exit the 1s Ethernet register fault flag bit detection.
[0209] That is, the master core first determines whether there is fault detection information (such as chip voltage, temperature fault information or hardware, firmware fault information). If it is determined that there is fault detection information, the fault flag is set and the corresponding fault level is determined. According to the fault level, the fault processing of the corresponding fault level is performed respectively. Further, the master core determines whether there is a fault in the fault detection of the slave core (such as whether the fault information sent by the slave core is received). If it is determined that there is fault detection information, the corresponding fault repair processing is performed on the slave core.
[0210] Furthermore, if Fig. 9 As shown, the chip communication system provided by the implementation of the present application, the second chip also includes a firmware / hardware fault detection module (FW (FirmWare, also known as firmware) / HW (HardWare, also known as hardware)). In another implementation of the present application, the chip hardware and firmware faults are detected by the firmware / hardware fault detection module, and the hardware and firmware fault event information (FW / HW fault event) is sent to the main core, so that the main core determines the fault level when obtaining the hardware and firmware fault information, and performs corresponding fault processing.
[0211] In another implementation of the present application, Fig.10 As shown, if the first chip determines that the communication type of the first communication message is a CAN communication type, the chip communication method provided by the implementation of the present application also includes the following steps.
[0212] S310: The first chip sends a first communication message to the second processing core.
[0213] S320: The second processing core sends the first communication message to the Ethernet control core.
[0214] S330, the Ethernet control core converts the communication type of the first communication message into the Ethernet communication type, obtains the second communication message, determines the second target processing end based on the preset configuration rule, and sends the second communication message to the second target processing end so that the second target processing end performs corresponding processing according to the second communication message.
[0215] The second target processing end is any one of the first processing core or the first switch.
[0216] Exemplarily, the vehicle will predefine the data collection requirements of the communication message of the vehicle CAN communication type. For the communication message of the CAN communication type, the second processing core (e.g., Slave3 core) included in the multi-core domain controller chip will determine to send the CAN message to the Ethernet control core based on the communication requirements of the CAN message when receiving the CAN message (i.e., the communication message of the CAN communication type). The Ethernet control core will convert the CAN message into an Ethernet message with a timestamp (i.e., the communication message of the Ethernet communication type) through the preset conversion format shown in Table 4, wherein the timestamp is realized by the timer turned on by the multi-core domain controller chip, which can be accurate to the millisecond (ns) level, and the length of the timestamp definition is 8 bytes. When the Ethernet control core needs to send the received CAN message, it directly converts the CAN message into an Ethernet message through inter-core communication, and sends it to the corresponding second target processing end based on the preset configuration rules. The second target processing core can be the main core (e.g., Master core) in the first processing core, or it can be a slave core (e.g., Slave1 core, Slave2 core). Among them, the Ethernet control core, for example, sends the converted Ethernet message to the Slave1 core for communication message processing or inter-core communication message forwarding, or sends it to the first switch, so that the first switch forwards it to the first chip for extra-core communication message forwarding, or inter-core communication message forwarding.
[0217] In this way, the relatively idle Ethernet control core is used to perform communication type conversion and communication message forwarding, and the conversion and fast forwarding of CAN messages can be achieved without occupying the main core resources.
[0218] Table 4 Conversion format of CAN communication type to Ethernet communication type
[0219]
[0220] As shown in Table 4, the core identification information (such as source / destination MAC address) included in the communication message of the CAN communication type (i.e., the first communication message) is determined, and the message header of the communication message is added based on the specified IEEE 1722 protocol Header (i.e., the transport protocol message header) to convert the CAN message into an Ethernet message. And based on the timestamp of the received first communication message, the synchronization control format is practiced to obtain the timestamp of the communication message of the Ethernet communication type (i.e., the second communication message), and the communication message is identified based on the specified ACF Header (message header of the CAN message to the Ethernet message) to indicate that the communication message is a communication message converted from the CAN message to the Ethernet message format, and carries byte information such as CAN ID and CAN Data.
[0221] That is, the ACF Header includes the message type (ie, communication type) and the message length, wherein the message type is 0x01, indicating that it is based on the conversion of the CAN message into the Ethernet message.
[0222] In this way, the CAN communication type communication messages that the whole vehicle needs to collect data can be directly routed and forwarded between the slave cores to become Ethernet communication type communication messages without increasing the load rate of the main core, and sent to other domain controllers in the vehicle or the cloud.
[0223] In an implementation of the present application, the second processing core includes a fifth communication port, and the first chip sends the first communication message to the second processing core, including: the first chip sends the first communication message to the second processing core through the fifth communication port of the second processing core.
[0224] That is, the first chip sends the first communication message to the second processing core through the fifth communication port of the second processing core, the second processing core receives the first communication message of the CAN communication type, and sends the first communication message to the Ethernet control core through the fourth communication port of the Ethernet control core corresponding to the second processing core, so that the Ethernet control core performs message type conversion to obtain the second communication message of the Ethernet communication type, and determines the second target processing end based on the preset configuration rule. If the second target processing end is the first processing core, the second communication message is sent to the second target processing end through the fourth communication port of the Ethernet control core corresponding to the second target processing end. If the second target processing end is the first switch, the second communication message is sent to the first switch through the third communication port of the Ethernet control core and the second communication port of the first switch, and the first switch then sends the second communication message to the corresponding first chip through the corresponding first communication port.
[0225] In this application, if the master core or slave core needs to forward a communication message of the CAN communication type to the outside of the core, the communication message is sent to the Ethernet control core, and the Ethernet control core sends the communication message to the first switch based on the preset configuration rule, and the first switch then sends the communication message to the target first chip. Alternatively, the communication message is sent to the second processing core based on the preset configuration rule, and the second processing core then sends the communication message to the first chip.
[0226] The chip communication method and system provided by the implementation of this application are actually a method for implementing automotive Ethernet communication for a multi-core domain controller chip, including an Ethernet communication implementation architecture, an Ethernet communication receiving and sending method, and an Ethernet communication abnormality monitoring and processing method. Multiple independent processing cores of a multi-core domain controller chip share an Ethernet controller to implement Ethernet communication configuration, and share an external Ethernet communication physical network port to implement Ethernet communication with other chips. Therefore, Ethernet communication of three or more processing cores of a multi-core domain controller chip can be achieved with only one external communication port, reducing hardware costs.
[0227] And by using AD sampling circuit to flexibly configure the master core and slave core, the master core is responsible for power management, Ethernet driver initialization, firmware loading, channel configuration, internal routing rule configuration, etc. of all processing cores, real-time detection of firmware, hardware and other faults of Ethernet control core, and implementation of fault recovery strategy according to fault information. The slave core configures its own Ethernet network port, network management and other configurations, while realizing its own Ethernet communication, it can also quickly implement the routing forwarding of CAN converted to Ethernet message (for example, Ethernet control core as slave core), and directly handles it by Ethernet control core under the condition of reducing the load rate of the master core, so that the communication message processing and transmission of CAN communication type is faster. And the master core manages and monitors the Ethernet communication requests and fault information of all processing cores, making multiple chips more convenient to manage, and the master core and slave core cooperate to realize Ethernet communication related functions, reducing the Ethernet communication load rate of the master core. In this way, with less hardware resources and lower chip load rate, combined with communication requirements and hardware resources, flexible configuration can be used to realize the normal Ethernet communication of multiple processing cores of multi-core domain controller chip, and implement the corresponding fault recovery strategy through fault monitoring management to ensure the security of Ethernet communication between the master core and the slave core.
[0228] In another implementation of the present application, the implementation of the present application further provides a communication device, such as a car, a mobile phone or other communication device.
[0229] The communication device includes a chip communication system provided by the implementation method of the present application, so as to implement the chip communication method provided by the implementation method of the present application.
[0230] The chip communication method provided by the implementation of the present application can also be applied to electronic devices, which include the aforementioned chip communication system to execute the aforementioned chip communication method.
[0231] See also Fig.11 , Fig.11 The figure shows a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig.11 As shown, the electronic device may include: a transceiver 121 , a processor 122 , and a memory 123 .
[0232] The processor 122 executes the computer execution instructions stored in the memory, so that the processor 122 executes the technical solution of the chip communication method in the above embodiment. The processor 122 can be a general-purpose processor, including a central processing unit CPU, a network processor (NP), etc.; it can also be a digital data processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gates or transistor logic devices, and discrete hardware components.
[0233] The memory 123 is connected to the processor 122 via a system bus and completes communication between them. The memory 123 is used to store computer program instructions.
[0234] By way of example and not limitation, the memory 123 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 123 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 123 may be inside or outside the integrated gateway device. In a particular embodiment, the memory 123 is a non-volatile solid-state memory. In a particular embodiment, the memory 123 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or a flash memory, or a combination of two or more of these.
[0235] The transceiver 121 may be used to obtain tasks to be executed and configuration information of the tasks to be executed.
[0236] The system bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The transceiver is used to realize the communication between the database access device and other computers (such as clients, read-write libraries, and read-only libraries). The memory may include random access memory (RAM) and may also include non-volatile memory.
[0237] An embodiment of the present application also provides a chip for running instructions, which is used to execute the technical solution of the chip communication method in the above embodiment.
[0238] An embodiment of the present application also provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a processor of an electronic device, the processor of the electronic device executes the technical solution of the chip communication method in the above embodiment.
[0239] In some possible implementations, various aspects of the method provided in the present application may also be implemented in the form of a program product, which includes a program code. When the program product is run on a processor of an electronic device, the program code is used to enable the processor of the electronic device to execute the steps of the method according to various exemplary implementations of the present application described above in this specification. For example, the electronic device may execute the chip communication method recorded in the embodiments of the present application.
[0240] The program product may employ any combination of one or more readable media. The readable medium may be a readable data medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0241] The implementation method of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When at least one processor executes the computer program, it can implement the technical solution of the chip communication method in the above embodiment.
[0242] It should be noted that, in addition to the implementation methods of the present application described in the above-mentioned specific embodiments, those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. Although the description of the present application is introduced in conjunction with the preferred embodiment, this does not mean that the features of this invention are limited to the embodiment. On the contrary, the purpose of introducing the invention in conjunction with the implementation method is to cover other options or modifications that may be extended based on the claims of the present application. In order to provide an in-depth understanding of the present application, the above description contains many specific details, and the present application may also be implemented without using these details. In addition, in order to avoid confusion or blurring the focus of the present application, some specific details will be omitted in the description. It should be noted that, in the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.
[0243] It should be noted that in this specification, similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0244] The terms “first”, “second”, etc. are only used for distinguishing descriptions and should not be understood as indicating or implying relative importance.
[0245] Although the present application has been illustrated and described by referring to certain preferred embodiments of the present application, it should be understood by those skilled in the art that the above contents are further detailed descriptions of the present application in combination with specific embodiments, and it cannot be determined that the specific implementation of the present application is limited to these descriptions. Those skilled in the art may make various changes in form and details, including making several simple deductions or substitutions, without departing from the spirit and scope of the present application.
Claims
1. A chip communication method, characterized in that: Applied to a chip communication system, the chip communication system includes a first chip, a first switch and a second chip, the second chip includes an Ethernet control core and multiple first processing cores, the Ethernet control core includes a second switch, the first switch is configured with a first routing rule, the second switch is configured with a second routing rule, the first processing core implements Ethernet communication configuration through the Ethernet control core, and the method includes: The first chip determines a first communication message and a communication type of the first communication message, and if the communication type is an Ethernet communication type, sends the first communication message to the first switch; The first switch determines, according to the first communication message and the first routing rule, the second chip corresponding to the first communication message, and sends the first communication message to the second switch in the Ethernet control core included in the second chip; The second switch determines a first target processing end according to the first communication message and the second routing rule, and sends the first communication message to the first target processing end so that the first target processing end performs corresponding processing according to the first communication message. The first target processing end is at least one of the first processing cores.
2. The chip communication method according to claim 1, characterized in that: The plurality of first processing cores include a master core and at least one slave core, and the method further includes: The master core performs detection processing for a communication fault between the master core and the slave core, determines a fault level when a fault is detected, and performs corresponding processing according to the fault level, wherein: If the fault level is the first fault level, the main core notifies the fault processing module to perform fault processing, and determines whether the fault is eliminated based on a preset detection cycle until it is determined that the fault is eliminated; If the fault level is the second fault level, the master core sends a notification of unloading the Ethernet communication configuration to each of the slave cores, and when it is determined that each of the slave cores has successfully unloaded the Ethernet communication configuration, the master core unloads the Ethernet communication configuration corresponding to the master core, and reloads the Ethernet communication configuration based on the Ethernet control core, and when the Ethernet communication configuration is successfully loaded, notifies the Ethernet control core to load the Ethernet communication configuration to each of the slave cores; If the fault level is the third fault level, the master core releases the coupling relationship between the master core and the target slave core, and restarts the target slave core.
3. The chip communication method according to claim 2, characterized in that: The master-slave attribute of each first processing core is determined based on a pre-stored RAM address, and the first processing core as the master core directly performs corresponding Ethernet communication configuration based on the Ethernet control core. When the first processing core as the slave core determines that the Ethernet communication configuration of the master core is completed, it sends an Ethernet configuration request to the master core. The master core sends the Ethernet configuration request of the slave core to the Ethernet control core. The Ethernet control core performs Ethernet communication configuration of the slave core and sends a configuration success notification message to the master core when it determines that the Ethernet communication configuration of the slave core is completed.
4. The chip communication method according to any one of claims 1 to 3, characterized in that: The second chip further includes a second processing core. If the first chip determines that the communication type is a CAN communication type, the method further includes: The first chip sends the first communication message to the second processing core; The second processing core sends the first communication message to the Ethernet control core; The Ethernet control core converts the communication type of the first communication message into an Ethernet communication type to obtain a second communication message, determines a second target processing end based on a preset configuration rule, and sends the second communication message to the second target processing end so that the second target processing end performs corresponding processing according to the second communication message. The second target processing end is any one of the first processing core or the first switch.
5. The chip communication method according to any one of claims 1 to 4, characterized in that: The first communication message further includes local area network identification information, and the second switch determines the first target processing end according to the first communication message and the second routing rule, including: The second switch determines, according to the LAN identification information included in the first communication message and the second routing rule, a first target processing terminal in the first processing core that can communicate based on the LAN corresponding to the LAN identification information.
6. The chip communication method according to claim 5, characterized in that: The first switch determines, according to the first communication message and the first routing rule, the second chip corresponding to the first communication message, including: The first switch determines, according to the local area network identification information and the first routing rule, a second chip in the second chip that can communicate based on the local area network corresponding to the local area network identification information.
7. The chip communication method according to any one of claims 1 to 6, characterized in that: The second switch determines a first target processing end according to the first communication message and the second routing rule, and sends the first communication message to the first target processing end, including: When receiving multiple first communication messages, the second switch determines the first target processing end corresponding to each first communication message according to each first communication message and the second routing rule, determines the priority order of the first communication messages, and sends the first communication messages to the corresponding first target processing end in descending order of priority.
8. A chip communication system, characterized in that: include: A first chip, a first switch and a second chip, wherein the second chip includes an Ethernet control core and a plurality of first processing cores, the Ethernet control core includes a second switch, the first switch is configured with a first routing rule, the second switch is configured with a second routing rule, and the first processing core implements Ethernet communication configuration through the Ethernet control core, wherein: The first chip is used to determine a first communication message and a communication type of the first communication message, and if the communication type is an Ethernet communication type, send the first communication message to the first switch; The first switch is used to determine the second chip corresponding to the first communication message according to the first communication message and the first routing rule, and send the first communication message to the second switch in the Ethernet control core included in the second chip; The second switch is used to determine a first target processing end according to the first communication message and the second routing rule, and send the first communication message to the first target processing end so that the first target processing end performs corresponding processing according to the first communication message. The first target processing end is at least one of the first processing cores.
9. The chip communication system according to claim 8, characterized in that: The second chip also includes a second processing core, wherein: The first chip is further configured to send the first communication message to the second processing core if it is determined that the communication type is a CAN communication type; The second processing core is used to send the first communication message to the Ethernet control core; The Ethernet control core is used to convert the communication type of the first communication message into an Ethernet communication type to obtain a second communication message, and determine a second target processing end based on a preset configuration rule, and send the second communication message to the second target processing end so that the second target processing end performs corresponding processing according to the second communication message. The second target processing end is any one of the first processing core or the first switch.
10. An electronic device, characterized in that: Comprising the chip communication system as claimed in claim 8 or 9.
