Control method and device, chip and computer program product
Through the hardware inter-domain communication interface of multi-core heterogeneous system chip and the switching mechanism of the operating system, the problem of CAN controller communication interruption caused by instability of a single domain system is solved, and the security and reliability of the CAN network and the continuity of service functions are achieved.
Patent Information
- Application Number
- CN202411496332.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-10-24
AI Technical Summary
The communication between the existing CAN controller and the external CAN device depends on the stability of a single domain system, resulting in communication interruption when the system is unstable, affecting the normal operation of business functions.
The multi-core heterogeneous system chip is used to monitor the nodes and operating system status of each hardware domain to realize the control rights switching of the CAN controller, ensuring that other domains can quickly take over communication when problems arise in one domain and ensuring the safety and reliability of communication.
In the domain system, the communication between the CAN controller and the external CAN device is not affected, and can respond quickly and recover, reducing the risk of loss of business functions, and improving the reliability of communication and system security.
Smart Images

Figure CN119011335A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication control technology, and in particular to a control method, device, chip and computer program product. Background Art
[0002] With the rapid development of automotive electronic technology, controller area network (CAN) has become a communication protocol widely used in automobiles and other industrial control systems.
[0003] Conventional CAN controllers communicate with external CAN devices based on a single domain or a single system. The security and reliability of CAN communication can only be guaranteed by the stability of the single domain system and the stability of the CAN controller's own functions and security.
[0004] Once a single system becomes unstable or a problem occurs with the CAN controller resources in the single system, the communication between the CAN controller and the external CAN devices will be interrupted, resulting in loss of business functions. Summary of the Invention
[0005] An object of an embodiment of the present application is to provide a control method for a multi-core heterogeneous system chip, wherein the system chip includes multiple hardware domains and CAN interfaces, wherein each hardware domain is provided with a communication interface for inter-core communication with other hardware domains, wherein the same or different operating systems and CAN controllers are installed in each hardware domain, and the hardware domain communicates with an external CAN device through the CAN interface. The method includes: monitoring a first node of a first hardware domain, wherein the first hardware domain is any one of the multiple hardware domains; If it is determined that the first node is abnormal, starting the second node of the first hardware domain; determining, based on the second node, a running status of a first operating system of the first hardware domain, wherein the first hardware domain is configured with the first operating system; When it is determined that the first operating system is abnormal, control of the CAN controller of the first hardware domain is switched to the second hardware domain; The first hardware domain communicates with the CAN interface through a third node of the second hardware domain.
[0006] As an optional embodiment, the method further includes: When determining that the first node is normal, enabling the communication interface of the first hardware domain; monitoring the communication interface; When it is determined that the first hardware domain communicates normally with the second hardware domain through the communication interface, the first hardware domain communicates with the CAN interface through the third node of the second hardware domain.
[0007] As an optional embodiment, the method further includes: When it is determined that the first operating system of the first hardware domain is normal, the first hardware domain communicates with the CAN interface through the second node.
[0008] As an optional embodiment, the method further includes: monitoring a first operating system of the first hardware domain; The second hardware domain obtains a first signal, wherein the first signal is used to indicate that the first operating system of the first hardware domain is abnormal, and the first signal is sent by the first hardware domain; If it is determined that the second hardware domain obtains the first signal, control of the CAN controller of the first hardware domain is switched to the second hardware domain; The first hardware domain communicates with the CAN interface through a third node of the second hardware domain.
[0009] As an optional embodiment, the method further includes: In a case where it is determined that the second hardware domain has not acquired the first signal, the first hardware domain communicates with the CAN interface through the second node.
[0010] As an optional embodiment, the method further includes: Obtaining an interface list of the first hardware domain; Determining an enabled state of the first node based on the interface list; Based on data interaction between the first hardware domain and the second hardware domain, a communication state of the first node is determined.
[0011] As an optional embodiment, the method further includes: When the control right of the CAN controller of the hardware domain is switched, the second node of the first hardware domain and the third node of the second hardware domain are both in an open state.
[0012] An embodiment of the present application aims to provide a control device for use in a multi-core heterogeneous system chip, wherein the system chip includes multiple hardware domains and CAN interfaces, wherein each hardware domain is provided with a communication interface for inter-core communication with other hardware domains, wherein the same or different operating systems and CAN controllers are installed in each hardware domain, and the hardware domain communicates with an external CAN device via the CAN interface, wherein the device includes: a monitoring module configured to monitor a first node of a first hardware domain, wherein the first hardware domain is any one of the multiple hardware domains; an enabling module, configured to enable the second node of the first hardware domain when determining that the first node is abnormal; a determining module configured to determine, based on the second node, a running state of a first operating system of the first hardware domain, wherein the first hardware domain is configured with the first operating system; a switching module configured to switch control of the CAN controller of the first hardware domain to the second hardware domain when it is determined that the first operating system of the first hardware domain is abnormal; A communication module is configured so that the first hardware domain communicates with the CAN interface through the third node of the second hardware domain.
[0013] The purpose of an embodiment of the present application is to provide a chip, wherein the chip includes multiple hardware domains and a CAN interface, wherein the hardware domains include at least: An application domain is configured with a first operating system, wherein a first hardware resource manager and a first CAN controller are provided in the application domain, and the first hardware resource manager is used to switch control rights of the first CAN controller; a security domain configured with a second operating system, a second hardware resource manager and a second CAN controller being provided within the security domain, the first operating system being different from the second operating system, and the second hardware resource manager being used to switch control rights of the second CAN controller; The application domain and the security domain perform inter-core communication via a communication interface, and both the application domain and the security domain communicate with an external CAN device via the CAN interface.
[0014] The purpose of the embodiments of the present application is to provide a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of any of the control methods described above.
[0015] The beneficial effects of the embodiments of the present application are: This application combines Socket CAN and Socket-based VirCAN technologies, using the CAN resources of the SOC under multi-core heterogeneity and external CAN devices to form a CAN communication network, interacting between different domains and detecting the security and reliability of each other's communication, thereby improving the reliability of communication.
[0016] In the event of a communication failure between the CAN controller and an external CAN device in a certain domain system, the communication of the established CAN network will not be affected and will be immediately detected by other domains so that other domains can quickly take over and continue to establish secure and reliable communication with the external CAN device, achieving rapid response and connection, thereby ensuring normal business functions, reducing the risk of loss of business functions due to communication interruption, and improving safety of use. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 The process of the control method of the embodiment of this application Figure 1 ; Figure 2 This is a flow chart of a control method according to another embodiment of the present application; Figure 3 This is a flow chart of a control method according to another embodiment of the present application; Figure 4 This is a flow chart of a control method according to another embodiment of the present application; Figure 5 This is a structural block diagram of a control device according to an embodiment of the present application; Figure 6 This is a structural block diagram of the chip according to an embodiment of the present application; Figure 7 The process of the control method of the embodiment of this application Figure 2 . DETAILED DESCRIPTION
[0018] Various aspects and features of the present application are described herein with reference to the accompanying drawings.
[0019] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but merely as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.
[0020] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.
[0021] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.
[0022] It should also be understood that although the present application has been described with reference to certain specific examples, those skilled in the art will readily be able to implement many other equivalent forms of the present application.
[0023] The above and other aspects, features and advantages of the present application will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.
[0024] Specific embodiments of the present application will be described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments described are merely examples of the present application and may be implemented in a variety of ways. Familiar and / or repetitive functions and structures are not described in detail to avoid obscuring the present application with unnecessary or redundant details. Therefore, the specific structural and functional details described herein are not intended to be limiting, but rather serve merely as a basis and representative basis for the claims to teach those skilled in the art to variously utilize the present application with substantially any suitable detailed structure.
[0025] This specification may use the phrases "in one embodiment," "in another embodiment," "in a further embodiment," or "in other embodiments," which may all refer to one or more of the same or different embodiments according to the present application.
[0026] The communication between existing CAN controllers and external CAN devices is usually limited to a single domain or a single system. There is no cross-domain interaction to jointly ensure the security and reliability of CAN communication. This means that the reliability and security of communication depends on the stability of the single domain system.
[0027] Existing CAN communication technology methods are often based on only one CAN communication method, such as the ordinary CAN communication method under the real-time operating system (RTOS) or the Socket CAN communication method under the general operating system (Linux).
[0028] In a single-domain system, the stability and security of CAN communication are highly dependent on the stability of the system itself. If the system becomes unstable, such as a software malfunction, hardware failure, or power supply problem, the entire CAN communication link may be affected.
[0029] CAN controller resources, including processing power, memory, and communication bandwidth, have a direct impact on the stability and security of communications. If the CAN controller is resource-starved or fails, communication can be disrupted.
[0030] Once the communication between the CAN controller and the external CAN device is interrupted, it may lead to the loss of critical business functions, such as vehicle control, safety systems, and infotainment systems in the automotive field. This not only affects the user experience but may also endanger safety.
[0031] However, existing system-on-chip (SOC) often integrates multiple CAN controller resources, and existing technologies do not fully utilize these resources to establish a network with external CAN devices.
[0032] In view of the above content, the embodiment of the present application provides a control method, which is applied to a multi-core heterogeneous system chip, such as Figure 1 、 Figure 6 and Figure 7 As shown, the system chip includes multiple hardware domains and CAN interfaces. The hardware domains are respectively provided with communication interfaces for inter-core communication with other hardware domains. The same or different operating systems and CAN controllers are respectively installed in the hardware domains. The hardware domains communicate with external CAN devices through the CAN interfaces.
[0033] Among them, multi-core heterogeneity refers to a chip architecture design in which multiple processing cores (cores) are integrated and at least two of these cores are different in structure, function or performance.
[0034] The hardware domain is a collection of processor cores with independent functions and their related hardware resources. Each hardware domain can run different operating systems and communicate with external CAN devices through the CAN interface.
[0035] Hardware domains exchange data and collaborate with each other through an inter-processor communication (IPC) mechanism. The hardware domains include but are not limited to application domains and security domains.
[0036] An application domain is one or more hardware domains that possess strong computing performance and can support applications with high computing requirements. A security domain is one or more hardware domains that include at least one of the following characteristics: a high-functional safety architecture, running an operating system that meets high-functional safety requirements, and processing tasks that require high-functional safety.
[0037] The operating system includes but is not limited to a general operating system (Linux Operating System) and a real-time operating system (RTOS). The real-time operating system is an operating system specially designed to process real-time tasks.
[0038] like Figure 1 As shown, the control method includes: S11. Monitor a first node in a first hardware domain, where the first hardware domain is any one of the multiple hardware domains.
[0039] In this embodiment, the first hardware domain may be an application domain (such as AP1, AP2), and the first node may be a virtual CAN (VirCAN) node responsible for monitoring and preliminarily processing CAN communications.
[0040] S12: When it is determined that the first node is abnormal, start the second node of the first hardware domain.
[0041] In this embodiment, if the first node fails, a second node in the same hardware domain will be enabled. If the first hardware domain is an application domain, the second node can be a SocketCAN node. In this case, the SocketCAN node is bound to the physical CAN node for further processing of CAN communications.
[0042] The abnormality of the first node includes the node being unable to perform its intended function, resulting in an inability to open normally or to communicate effectively with other nodes in CAN. These abnormalities may be caused by a variety of reasons, including but not limited to hardware failure, software errors, etc.
[0043] S13. Determine, based on the second node, a running status of a first operating system of the first hardware domain, wherein the first hardware domain is configured with the first operating system; In this embodiment, the first operating system may be a general operating system (Linux Operating System). If an abnormality occurs in the first operating system, such as a problem occurs during the startup phase or after the startup is completed, the next step will be executed.
[0044] The first operating system abnormality generally refers to an unexpected situation encountered by the system during operation, resulting in the system being unable to work normally.
[0045] S14: When it is determined that the first operating system is abnormal, control of the CAN controller of the first hardware domain is switched to the second hardware domain.
[0046] In this embodiment, if the first operating system is determined to be abnormal, control of the CAN controller in the first hardware domain is switched to the second hardware domain. This means that if a problem occurs in the first hardware domain (e.g., the application domain), it will no longer directly control CAN communications, but will instead hand over control to the second hardware domain (e.g., the security domain).
[0047] S15. The first hardware domain communicates with the CAN interface through the third node of the second hardware domain.
[0048] In this embodiment, the first hardware domain communicates with the CAN interface through a third node of the second hardware domain. The third node may be a common CAN (RTOS-based CAN) node under a real-time operating system (RTOS) and is responsible for actual physical CAN communication.
[0049] Therefore, the control process of the control method is specifically as follows: Monitor the operating status of each hardware domain, including the status of the operating system and the CAN controller. Usually, the physical CAN is set to the second hardware domain (the security domain) by default. When an abnormality is detected in the first node of the first hardware domain, the second node of the first hardware domain is opened.
[0050] The status of the first operating system is determined according to the second node. When the first operating system is abnormal, the control of the CAN controller of the first hardware domain is switched to the second hardware domain. At this time, the physical CAN is on the second hardware domain. During use, the physical CAN can only be set on one hardware domain.
[0051] The first hardware domain performs CAN communication through the third node of the second hardware domain to ensure that communication between the first hardware domain and the external CAN device is not interrupted.
[0052] When the control right is switched, it is ensured that the second node of the first hardware domain and the third node of the second hardware domain are both in the open state to maintain the continuity of communication.
[0053] For example, a car's electronic control unit (ECU) consists of multiple hardware domains: the application domain is responsible for high-level processing tasks, while the safety domain is responsible for safety-critical tasks. The application domain has a VirCAN node for monitoring CAN communication, a Socket CAN node, and the safety domain has an RTOS-based CAN node. The application domain is configured with a general-purpose operating system, while the safety domain is configured with a real-time operating system.
[0054] If the VirCAN node of the application domain is abnormal (cannot be opened normally or cannot communicate normally), the problem will be solved through its Socket CAN node. That is, the Socket CAN node is opened and the physical CAN is set on the application domain. The first hardware domain can perform CAN communication through the Socket CAN node.
[0055] However, if the general operating system is abnormal based on the Socket CAN node, the application domain will hand over control of the CAN controller to the security domain. Then, with the physical CAN on the security domain, the application domain will communicate with external CAN devices through the security domain's RTOS-based CAN node to ensure communication continuity and reliability.
[0056] This application combines socket CAN and socket-based VirCAN technologies, leveraging the multi-channel CAN controller resources within the SOC to establish a network with external CAN devices. Through redundancy mechanisms and fault recovery strategies, this ensures uninterrupted CAN communication, thereby guaranteeing the continuity of business functions and system security. Different domains interact and mutually verify the security and reliability of their communications. If CAN communication fails within a domain system, other domains can immediately detect and quickly take over the failed domain's CAN communication with external CAN devices.
[0057] In one embodiment, if Figure 2 As shown, the method further includes: S21. When it is determined that the first node is normal, enable the communication interface of the first hardware domain.
[0058] In this embodiment, the control method is further refined, and a processing flow for the first node when it is working normally and a step of how to communicate with the second hardware domain through the inter-core communication interface are added.
[0059] Specifically, when it is determined that the first node (VirCAN node) of the first hardware domain is normal, the communication interface of the first hardware domain is enabled. Based on the communication interface, the inter-core communication status between the first hardware domain and other hardware domains (such as the second hardware domain) can be determined.
[0060] S22: Monitor the communication interface.
[0061] In this embodiment, after the communication interface is enabled, it is necessary to monitor the communication interface to ensure timely knowing whether the communication between the first hardware domain and the second hardware domain is normal.
[0062] S23: When it is determined that the first hardware domain communicates normally with the second hardware domain through the communication interface, the first hardware domain communicates with the CAN interface through the third node of the second hardware domain.
[0063] In this embodiment, when it is determined that the first hardware domain communicates normally with the second hardware domain through the communication interface, that is, data interaction occurs between the first hardware domain and the second hardware domain.
[0064] The first hardware domain will communicate with the CAN interface through the third node (RTOS-based CAN node) of the second hardware domain. This means that even if the operating system and CAN controller of the first hardware domain are functioning normally, it will communicate with external CAN devices through the CAN controller of the second hardware domain to achieve a higher level of redundancy and reliability. In this case, the physical CAN is set up on the second hardware domain.
[0065] For example, in an automotive ECU, the VirCAN node in the application domain is operating normally, and the communication interface of the application domain is enabled to facilitate inter-core communication with the safety domain. This communication interface can be a high-speed serial communication link such as PCIe or other dedicated communication protocols.
[0066] The application domain communicates with the safety domain through this communication interface to ensure normal data exchange between the two domains. If communication is normal, the application domain will communicate with external CAN devices through the safety domain's RtoS-based CAN nodes. This way, even if problems occur in the application domain's operating system or CAN controller, the safety domain can still ensure that communication with external CAN devices is not affected.
[0067] The first hardware domain of the present application communicates through the second hardware domain during normal operation, increasing redundancy and improving overall reliability. Monitoring and use of the inter-core communication interface can ensure real-time performance, as any communication problems can be quickly detected and handled.
[0068] In one embodiment, the method further comprises: When it is determined that the first operating system of the first hardware domain is normal, the first hardware domain communicates with the CAN interface through the second node.
[0069] In this embodiment, a step is added on how to communicate with the CAN interface through the second node (Socket CAN node) when the first operating system of the first hardware domain is operating normally.
[0070] Specifically, the first node of the first hardware domain is monitored, and if the first node is determined to be abnormal, the second node of the first hardware domain is enabled. Based on the second node, it is determined that the first operating system of the first hardware domain is normal. At this time, the first hardware domain communicates with the CAN interface through the second node (Socket CAN node).
[0071] For example, the application domain (first hardware domain) of an automotive electronic control unit (ECU) runs a real-time operating system (RTOS), while the safety domain (second hardware domain) runs a general-purpose operating system (LINUX). The application domain has a VirCAN node for monitoring CAN communication and a Socket CAN node, while the safety domain has an RTO-based CAN node.
[0072] If the VirCAN node of the application domain is abnormal, the application domain will open the Socket CAN node. After determining that the general operating system is normal based on the SocketCAN node, the application domain will communicate directly with the external CAN device through its Socket CAN node.
[0073] In this way, even in a multi-core heterogeneous environment, the application domain can independently process CAN communication without relying on the security domain, providing higher flexibility and efficiency.
[0074] This application allows the first hardware domain to communicate directly with the CAN interface through the second node when the operating system is normal, reducing dependence on the second hardware domain and improving the efficiency of the entire system. It allows different hardware domains to dynamically participate in CAN communication based on the status of their operating systems and CAN controllers, improving the flexibility and scalability of the system. If the general operating system of the first hardware domain fails, the system can quickly switch to the third node of the second hardware domain for communication, thereby ensuring the continuity and reliability of CAN communication.
[0075] In one embodiment, during the startup of the operating system of the first hardware domain, before the first node and the second node are turned on, if an abnormality is detected in the operating system of the first hardware domain, the system can switch to the second hardware domain and use the third node to communicate with the external CAN device.
[0076] like Figure 3 As shown, the method is specifically as follows: S31. Monitor the first operating system of the first hardware domain.
[0077] In this embodiment, the first operating system (such as Linux system) of the first hardware domain (application domain) is continuously monitored.
[0078] S32: The second hardware domain obtains a first signal, wherein the first signal is used to indicate that the first operating system of the first hardware domain is abnormal, and the first signal is sent by the first hardware domain.
[0079] In this embodiment, S33: When it is determined that the second hardware domain obtains the first signal, control of the CAN controller of the first hardware domain is switched to the second hardware domain.
[0080] In this embodiment, the second hardware domain (the security domain) waits for a signal from the first hardware domain, where the first signal indicates an abnormality in the first operating system. The first signal may be triggered by a detection mechanism during system startup. For example, in a general-purpose operating system (Linux), if an abnormality is detected during startup, the system will issue a signal through a specific interrupt or error code.
[0081] Once the second hardware domain receives an exception signal from the first hardware domain, confirming a problem with the first operating system, it switches control of the first hardware domain's CAN controller to the second hardware domain. This ensures that even if problems occur in the application domain, the system can still maintain communication with external CAN devices through the security domain.
[0082] S34. The first hardware domain communicates with the CAN interface through the third node of the second hardware domain.
[0083] In this embodiment, after the control right is switched, the first hardware domain will communicate with the CAN interface through the third node (RTOS-based CAN node) of the second hardware domain to ensure continuous operation of the system and uninterrupted external communication.
[0084] For example, if a car's electronic control unit (ECU) experiences an anomaly during startup, such as a failure to initialize a Socket CAN node, the system detects the anomaly and sends a signal to the safety domain.
[0085] After receiving this signal, the security domain immediately switches the control of the CAN controller from the application domain to itself, and then communicates with the external CAN device through its own third node to ensure that the vehicle's CAN communication system will not be interrupted due to a failure in the application domain.
[0086] This application rapidly switches control when an anomaly is detected, enabling the system to quickly respond to abnormal situations and reduce the risk of system failure. Even if an operating system-level failure occurs in one hardware domain, the other hardware domain can still maintain communication with external devices. This is particularly important for automotive and industrial control systems that require high reliability.
[0087] In one embodiment, the method further comprises: In a case where it is determined that the second hardware domain has not acquired the first signal, the first hardware domain communicates with the CAN interface through the second node.
[0088] In this embodiment, an additional step is added to handle the situation when the second hardware domain does not receive the abnormal signal from the first hardware domain.
[0089] Specifically, the first operating system of the first hardware domain is continuously monitored, and the second hardware domain checks whether it receives an abnormality signal from the first hardware domain. If the second hardware domain does not receive an abnormality signal, it means that the operating system of the first hardware domain is running normally and no abnormality occurs.
[0090] When the operating system of the first hardware domain is normal, it will use its own second node for CAN communication. This can keep the system running efficiently because each hardware domain can handle its own CAN communication tasks independently without relying on another hardware domain.
[0091] For example, during the system startup process of an automotive ECU, if the Linux system in the application domain boots normally and encounters no anomalies, the safety domain will not receive any abnormality signals. In this case, if the VirCAN node in the application domain fails, the application domain will communicate directly with the external CAN device through its own Socket CAN node (secondary node). This approach allows the application domain to independently handle CAN communications without the intervention of the safety domain, thereby improving the efficiency and responsiveness of the entire system.
[0092] This application allows the first hardware domain to communicate independently through its own second node during normal system operation, reducing reliance on the second hardware domain and improving the overall efficiency of the system. Therefore, during normal system operation, no additional control switching is required, and communication requests from external CAN devices can be responded to more quickly, reducing communication delays.
[0093] In one embodiment, if Figure 4 As shown, the method further includes: S41. Obtain an interface list of the first hardware domain.
[0094] In this embodiment, the control method is further refined, with particular attention paid to the start-up state and communication state of the first node (VirCAN node).
[0095] It is necessary to obtain a list of all available interfaces of a first hardware domain (eg, application domain), which may include all available communication interfaces in the domain, such as CAN, Ethernet, serial ports, etc.
[0096] S42: Determine the enabled state of the first node based on the interface list.
[0097] In this embodiment, by analyzing the interface list, it can be determined whether the first node (VirCAN node) has been turned on. If the interface of the VirCAN node is in the list and the state is activated, then it can be considered that the first node has been turned on.
[0098] S43: Determine the communication status of the first node based on the data interaction between the first hardware domain and the second hardware domain.
[0099] In this embodiment, after confirming that the first node is powered on, data is exchanged between the first hardware domain (e.g., application domain) and the second hardware domain (e.g., security domain) to test and verify the communication status of the first node. This can be accomplished by sending a test message or a specific diagnostic command and checking whether an expected response is received.
[0100] Based on the data received from the first hardware domain by the second hardware domain and the analysis of this data, it can be determined whether the communication status of the first node is normal. If the data exchange is successful, it indicates that the communication status of the first node is good; if the exchange fails, it may indicate that there is a communication problem with the first node.
[0101] For example, in an automotive ECU system, the application domain processes data for the Advanced Driver Assistance System (ADAS), while the safety domain handles safety-critical information. The application domain has a VirCAN node for communicating with other ECUs in the vehicle.
[0102] After the system boots up, the application domain requests an interface list and uses it to verify that the VirCAN node is enabled. Next, the security domain sends a test message to the application domain, which receives and correctly responds to the message via the VirCAN node. This successful data exchange confirms that the VirCAN node's communication is functioning properly.
[0103] By detecting the power-on status and communication status of the first node, the present application can ensure that at critical moments, such as in safety-critical communication scenarios, the system can rely on a normally operating communication node.
[0104] Furthermore, potential communication problems can be discovered in advance, and measures can be taken before the problems affect system operation, such as switching to a backup communication node, thereby avoiding possible system failures.
[0105] In one embodiment, the method further comprises: When the control right of the CAN controller of the hardware domain is switched, the second node of the first hardware domain and the third node of the second hardware domain are both in an open state.
[0106] In this embodiment, when executing the control switch of the CAN controller of the hardware domain, it is required that the second node (e.g., Socket CAN node) of the first hardware domain (e.g., application domain) and the third node (e.g., Rtos-based CAN node) of the second hardware domain (e.g., security domain) must be in the open state.
[0107] The second node being turned on indicates that the node has been initialized and is able to receive and send CAN messages. The first hardware domain is ready to transmit data via its CAN communication node.
[0108] Similarly, the start of the third node means that the second hardware domain is also ready for CAN communication. This ensures that during the control switch process, the second hardware domain can immediately take over the CAN communication without causing communication interruption due to the node not being ready.
[0109] The system switches control of the CAN controller only when both the second and third nodes are enabled and an operating system or CAN communication in a domain experiences an anomaly. This ensures that CAN communication is not interrupted when control is transferred from one domain to another, thus ensuring system reliability and data continuity.
[0110] For example, in an automotive ECU system, the physical CAN interface is set up in the safety domain to ensure that critical safety communications are always available. If a problem occurs in the application domain, the safety domain can directly take over the CAN communication tasks of the application domain.
[0111] On the contrary, if a problem occurs in the security domain, the system needs to adjust the physical CAN set on the security domain to the physical CAN set on the application domain so that the application domain can take over the security domain and communicate with external CAN devices.
[0112] During this process, the system will switch control rights only when both the Socket CAN node (second node) of the application domain and the Rtos-based CAN node (third node) of the security domain are in the open state to ensure the continuity of CAN communication.
[0113] This application ensures that both nodes are powered on during the control handover, thus avoiding communication interruptions during the handover process and ensuring communication continuity. This approach reduces potential risks caused by control handover and improves the reliability of the entire system.
[0114] In summary, if Figure 7 As shown, the control method includes the following situations when used: In the first scenario, the first node of the first hardware domain is normally enabled, the communication interface of the first hardware domain is normally enabled, and inter-core communication between the first and second hardware domains is normal. In this scenario, the physical CAN is set up on the second hardware domain and the third node is normally enabled. The first hardware domain performs CAN communication through the third node of the second hardware domain.
[0115] In the second case, the first node of the first hardware domain is abnormal, the second node of the first hardware domain is normal, and the first operating system of the first hardware domain is normal. At this time, the first hardware domain performs CAN communication through the second node, and the physical CAN is set on the first hardware domain.
[0116] In the third case, the first node of the first hardware domain is abnormal, and the second node of the first hardware domain is abnormal, resulting in an abnormality in the first operating system of the first hardware domain. At this time, it is necessary to switch the control of the CAN controller of the first hardware domain to the second hardware domain. The first hardware domain performs CAN communication through the third node of the second hardware domain, and the physical CAN is set on the second hardware domain.
[0117] In a fourth case, during the startup of the first operating system of the first hardware domain, when the first operating system is normal, the first hardware domain performs CAN communication through its own second node. At this time, the physical CAN is set on the first hardware domain.
[0118] In the fifth case, during the startup of the first operating system in the first hardware domain, when the first operating system is abnormal, the control of the CAN controller of the first hardware domain is switched to the second hardware domain, and the first hardware domain performs CAN communication through the third node of the second hardware domain. At this time, the physical CAN is set on the second hardware domain.
[0119] The embodiment of the present application also provides a control device, which is applied to a multi-core heterogeneous system chip, wherein the system chip includes multiple hardware domains and CAN interfaces, wherein each hardware domain is provided with a communication interface for inter-core communication with other hardware domains, wherein the same or different operating systems and CAN controllers are installed in each hardware domain, and the hardware domain communicates with an external CAN device through the CAN interface, such as Figure 5 As shown, the device includes: a monitoring module configured to monitor a first node of a first hardware domain, wherein the first hardware domain is any one of the multiple hardware domains; an enabling module, configured to enable the second node of the first hardware domain when determining that the first node is abnormal; a determining module configured to determine, based on the second node, a running state of a first operating system of the first hardware domain, wherein the first hardware domain is configured with the first operating system; a switching module configured to switch control of the CAN controller of the first hardware domain to the second hardware domain when it is determined that the first operating system of the first hardware domain is abnormal; A communication module is configured so that the first hardware domain communicates with the CAN interface through the third node of the second hardware domain.
[0120] The embodiment of the present application further provides a chip, the chip including multiple hardware domains and a CAN interface, the hardware domain including at least: An application domain is configured with a first operating system, wherein a first hardware resource manager and a first CAN controller are provided in the application domain, and the first hardware resource manager is used to switch control rights of the first CAN controller; a security domain configured with a second operating system, a second hardware resource manager and a second CAN controller being provided within the security domain, the first operating system being different from the second operating system, and the second hardware resource manager being used to switch control rights of the second CAN controller; The application domain and the security domain perform inter-core communication via a communication interface, and both the application domain and the security domain communicate with an external CAN device via the CAN interface.
[0121] An embodiment of the present application further provides an electronic device, including a processor and a memory, wherein the memory stores an executable program, and the memory executes the executable program to perform the steps of the method described above.
[0122] An embodiment of the present application further provides a storage medium, which carries one or more computer programs. When the one or more computer programs are executed by a processor, the steps of the method described above are implemented.
[0123] An embodiment of the present application further provides a computer program product, comprising a computer program / instruction, wherein the computer program / instruction, when executed by a processor, implements the steps of the control method as described above.
[0124] The vehicle in the embodiments of this application may be "automobile," "vehicle," "complete vehicle," or other similar terms, including general motor vehicles, such as sedans, SUVs, MPVs, buses, trucks, and other cargo or passenger vehicles, watercraft including various ships and boats, and aircraft, including hybrid vehicles, electric vehicles, fuel vehicles, plug-in hybrid vehicles, fuel cell vehicles, and other alternative fuel vehicles. A hybrid vehicle refers to a vehicle with two or more power sources, and an electric vehicle includes a pure electric vehicle and an extended-range electric vehicle, etc., which is not specifically limited in this application.
[0125] It should be understood that in the embodiments of the present application, the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0126] It should also be understood that the memory mentioned in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAMbus RAM (DR RAM).
[0127] It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, the memory (storage module) is integrated into the processor.
[0128] It should be noted that the memory described herein is intended to include, but not be limited to, these and any other suitable types of memory.
[0129] In addition to the data bus, the bus may also include a power bus, a control bus, a status signal bus, etc. However, for the sake of clarity, various buses are labeled as buses in the figure.
[0130] It should also be understood that the first, second, third, fourth and various numerical numbers involved in this document are only distinctions made for the convenience of description and are not intended to limit the scope of this application.
[0131] It should be understood that the term "and / or" in this document simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document generally indicates that the related objects are in an "or" relationship.
[0132] During implementation, each step of the above method can be completed by an integrated logic circuit of the hardware in the processor or by instructions in the form of software. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it will not be described in detail here.
[0133] In various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0134] Those skilled in the art will appreciate that the various illustrative logical blocks (ILBs) and steps described in conjunction with the embodiments disclosed herein can be implemented using electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.
[0135] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0136] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0137] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0138] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape) or an optical medium (e.g., a DVD) or a semiconductor medium (e.g., a solid-state hard disk), etc.
[0139] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A control method, characterized in that: A system chip applied to multi-core heterogeneous system, the system chip includes multiple hardware domains and CAN interfaces, each of the hardware domains is provided with a communication interface for inter-core communication with other hardware domains, the same or different operating systems and CAN controllers are installed in each of the hardware domains, and the hardware domain communicates with an external CAN device through the CAN interface, the method includes: Monitoring a first node of a first hardware domain, wherein the first hardware domain is any one of the multiple hardware domains; When determining that the first node is abnormal, starting the second node of the first hardware domain; Determine, based on the second node, a running state of a first operating system of the first hardware domain, wherein the first hardware domain is configured with the first operating system; When it is determined that the first operating system is abnormal, the control right of the CAN controller of the first hardware domain is switched to the second hardware domain; The first hardware domain communicates with the CAN interface through a third node of the second hardware domain.
2. The control method according to claim 1, characterized in that: The method further comprises: When determining that the first node is normal, enabling the communication interface of the first hardware domain; monitoring the communication interface; When it is determined that the first hardware domain communicates normally with the second hardware domain through the communication interface, the first hardware domain communicates with the CAN interface through the third node of the second hardware domain.
3. The control method according to claim 1, characterized in that: The method further comprises: When it is determined that the first operating system of the first hardware domain is normal, the first hardware domain communicates with the CAN interface through the second node.
4. The control method according to claim 1, characterized in that: The method further comprises: monitoring a first operating system of the first hardware domain; The second hardware domain obtains a first signal, wherein the first signal is used to indicate that the first operating system of the first hardware domain is abnormal, and the first signal is sent by the first hardware domain; When it is determined that the second hardware domain obtains the first signal, the control right of the CAN controller of the first hardware domain is switched to the second hardware domain; The first hardware domain communicates with the CAN interface through a third node of the second hardware domain.
5. The control method according to claim 4, characterized in that: The method further comprises: When it is determined that the second hardware domain has not acquired the first signal, the first hardware domain communicates with the CAN interface through the second node.
6. The control method according to claim 1, characterized in that: The method further comprises: Obtaining a list of interfaces of the first hardware domain; Based on the interface list, determining an enable state of the first node; Based on data interaction between the first hardware domain and the second hardware domain, a communication state of the first node is determined.
7. The control method according to claim 1, characterized in that: The method further comprises: When the control right of the CAN controller of the hardware domain is switched, the second node of the first hardware domain and the third node of the second hardware domain are both in an open state.
8. A control device, characterized in that: A system chip applied to multi-core heterogeneous system, the system chip includes multiple hardware domains and CAN interfaces, each of the hardware domains is provided with a communication interface for inter-core communication with other hardware domains, the same or different operating systems and CAN controllers are installed in each of the hardware domains, and the hardware domain communicates with an external CAN device through the CAN interface. The device includes: A monitoring module configured to monitor a first node of a first hardware domain, wherein the first hardware domain is any one of the multiple hardware domains; an enabling module, configured to enable a second node in the first hardware domain when determining that the first node is abnormal; a determination module configured to determine, based on the second node, a running state of a first operating system of the first hardware domain, wherein the first hardware domain is configured with the first operating system; a switching module configured to switch the control right of the CAN controller of the first hardware domain to the second hardware domain when it is determined that the first operating system of the first hardware domain is abnormal; A communication module is configured so that the first hardware domain communicates with the CAN interface through a third node of the second hardware domain.
9. A chip, characterized in that: It includes multiple hardware domains and CAN interfaces, and the hardware domains at least include: An application domain, configured with a first operating system, wherein a first hardware resource manager and a first CAN controller are provided in the application domain, and the first hardware resource manager is used to switch control rights of the first CAN controller; A security domain is configured with a second operating system, a second hardware resource manager and a second CAN controller are arranged in the security domain, the first operating system is different from the second operating system, and the second hardware resource manager is used to switch control of the second CAN controller; The application domain and the security domain perform inter-core communication via a communication interface, and both the application domain and the security domain communicate with an external CAN device via the CAN interface.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the control method as claimed in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Camera data calling method for multi-hardware-domain SoC and multi-hardware-domain SoC
CN117112083A
External equipment control method and system based on multi-core heterogeneous system
CN117130674A
Monitoring reset method and system of multi-core heterogeneous system, chip and electronic equipment
CN117130832A
Data transmission method based on multi-core heterogeneity, chip and computer program product
CN118733515A
Smart cockpit implementation method, smart cockpit, and computer readable medium
WO2024074090A1
