Communication method, device and storage medium of system on chip
By detecting and repairing communication anomalies in the system-on-chip, the problem of increased integrated circuit failures under deep submicron technology was solved, thereby improving communication stability and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2024-07-17
- Publication Date
- 2026-07-03
AI Technical Summary
In deep submicron processes, integrated circuits are affected by a variety of factors, leading to increased failures and affecting the normal operation of the chip. How to design an on-chip communication network with fault tolerance to cope with failures and ensure the normal operation of the chip?
The system-on-chip communication method responds to user interaction commands to obtain message information, establishes a communication channel, detects abnormal codes, performs status checks, and repairs abnormalities that can be repaired by software, and re-establishes the channel.
It enables repair in the event of communication anomalies, ensuring the stability of on-chip communication and improving the user experience.
Smart Images

Figure CN120763107B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal equipment, and more particularly to a communication method, device and storage medium for a system-on-a-chip. Background Technology
[0002] Network-on-Chip (NOC) has become the standard communication architecture for connecting different processing cores (core processing units on the chip) and memory modules on integrated circuit chips. It provides a key solution for high performance, low latency, scalability and flexibility of the system, ensuring efficient communication between the various cores and memory modules.
[0003] However, in deep submicron processes, integrated circuits are affected by various factors, such as air oxidation, circuit board aging, electron migration, dielectric breakdown, and negative bias temperature instability. These factors can lead to increased failures, thus affecting the normal operation of the chip. Therefore, designing a fault-tolerant on-chip communication network to address chip failures and ensure the chip's normal operation in the face of faults or errors is an urgent problem to be solved. Summary of the Invention
[0004] This application provides a communication method, device, and storage medium for a system-on-a-chip, aiming to design a fault-tolerant on-a-chip communication network that enables the chip to perform software repair on repairable communication faults when they occur, thereby improving the user experience.
[0005] In a first aspect, embodiments of this application provide a communication method for a system-on-a-chip (SoC), applied to an electronic device's SoC. The SoC includes at least one communication subject, at least one communication object, and an on-chip network module. The communication subject is connected to the communication object through the on-chip network module. The method includes: responding to a user's interaction command, acquiring message information corresponding to the interaction command, the message information including at least a source address and a destination address; establishing a communication channel between the communication subject and the communication object through the on-chip network based on the message information; if the communication channel establishment fails, acquiring an exception code, the exception code indicating the reason for the communication channel establishment failure; performing state detection on the source address, the destination address, and the communication object based on the exception code, obtaining a state detection result, the state detection result including a software-repairable exception and a non-software-repairable exception; if the state detection result is a software-repairable exception, performing state repair on the communication object, and the communication subject entering a communication waiting time; after the communication waiting time reaches a preset waiting duration, re-establishing the communication channel between the communication subject and the communication object based on the on-chip network.
[0006] For example, the above-mentioned on-chip network module is a type of NOC network, which is composed of multiple modular routing nodes interconnected, and data is transmitted in packets.
[0007] For example, the aforementioned communication subject could be the kernel of a specific user in the on-chip system.
[0008] For example, the aforementioned communication entity can be used as a processor to convert text into audio.
[0009] For example, the aforementioned communication devices include, but are not limited to, audio digital signal processors, modems, wireless local area network modules, and general purpose I / O ports (GPIO).
[0010] It is understandable that after obtaining the target address, the communication subject attempts to establish a communication channel by using the on-chip network (NOC) to connect with the communication object corresponding to the target address.
[0011] It should be understood that the above-mentioned system-on-a-chip uses the following... Figure 7 The communication architecture shown.
[0012] It is understandable that the user's interaction commands mentioned above can be operation commands for the user to interact with the upper-layer application. The upper-layer application sends the above interaction commands to the kernel layer, so that the kernel layer can perform calculations and interact with the corresponding peripheral devices to realize the functions corresponding to the above operation commands.
[0013] For example, the above-mentioned interactive command may be a text-to-speech broadcast command triggered by the user's interaction with the upper-level application.
[0014] For example, the above message information may be as follows: Figure 5 The message structure shown includes source address, destination address, number of chips, and data payload.
[0015] It is understandable that the above exception codes are used to represent the correspondence between communication exceptions and their causes.
[0016] For example, the above communication anomalies include: the object is in a dormant state (anomaly code can be set to 001), the object clock is not started (anomaly code can be set to 002), the subject permissions do not match (anomaly code can be set to 003), the destination address is abnormal (anomaly code can be set to 004), the side effect of reverse propagation from the downstream NOC is (anomaly code can be set to 005), the hardware driver is abnormal (anomaly code can be set to 006), and the accelerator processor is abnormal (xpu stuck, anomaly code can be set to 007).
[0017] Therefore, in this embodiment, during the communication process between the communication subject and the communication object via the on-chip network, the exception code returned by the on-chip network is obtained, and the status of the communication subject and the communication object is checked according to the exception code. If the status check result indicates a software-repairable exception, the status of the communication object is repaired, causing the communication subject to enter a waiting period. After the waiting period reaches a preset duration, the communication channel between the communication subject and the communication object is re-established based on the on-chip network. This achieves the repair of abnormal situations when on-chip communication occurs in the on-chip system, ensuring the stability of on-chip communication and improving the user experience.
[0018] According to the first aspect, the reasons for the failure to establish the communication channel include: the clock of the communication object is not started; the working state of the communication object is in a sleep state; the communication subject corresponding to the source address has no access permission; the destination address is an illegal address; the side effects of the reverse propagation of the downstream on-chip network; hardware driver abnormality; and accelerometer abnormality.
[0019] Understandably, the reasons for the failure to establish the aforementioned communication channel can be divided into two categories: software-repairable anomalies and software-unrepairable anomalies. Software-repairable anomalies include the communication object's clock not being started or the communication object being in a sleep state. Software-unrepairable anomalies include the communication subject corresponding to the source address lacking access permissions, the destination address being an illegal address, side effects of reverse propagation from the downstream on-chip network, hardware driver anomalies, and accelerometer processor anomalies.
[0020] According to the first aspect, or any implementation of the first aspect above, the software-repairable anomaly includes the communication object's clock not being started and the communication object's working state being a sleep state; the step of repairing the communication object's state when the state detection result is the software-repairable anomaly includes: waking up the communication object's clock when the state detection result is that the communication object's clock is not started.
[0021] Specifically, after reading the value corresponding to the clock state of the communication object in the status monitor, if it is determined that the clock state of the communication object is not started, the kernel will actively wake up the clock of the communication object.
[0022] According to the first aspect, or any implementation of the first aspect above, the step of performing state repair on the communication object when the state detection result is the software-repairable anomaly further includes: waking up the communication object when the state detection result is the working state of the communication object is a dormant state.
[0023] Specifically, if the kernel reads the register address of the communication object and determines that the communication object is in a dormant state, it will actively wake up the communication object.
[0024] According to the first aspect, or any implementation of the first aspect above, the unrepairable software exception includes the communication subject corresponding to the source address having no access rights, the destination address being an illegal address, the side effects of the reverse propagation of the downstream on-chip network, hardware driver exception, and accelerometer processor exception; the method further includes: when the detection result is an unrepairable software exception, throwing the exception code and triggering the exception process corresponding to the exception code.
[0025] For example, the above-mentioned abnormal processes include kernel restart, virtual machine restart, and peripheral restart.
[0026] Specifically, if the above test results indicate an unrepairable software exception, the exception code is thrown to trigger a peripheral device restart, virtual machine restart, or kernel restart.
[0027] According to the first aspect, or any implementation of the first aspect above, after the step of obtaining the message information corresponding to the user's interaction command, the method further includes: performing state detection on the source address, the destination address, and the communication object based on the message information; performing state repair on the communication object based on the state detection result, and the communication subject entering a communication waiting time; and after the communication waiting time reaches a preset waiting duration, re-establishing the communication channel between the communication subject and the communication object based on the on-chip network.
[0028] It is understandable that the above-mentioned preset waiting time can be a value set based on development experience, and its size can be set according to user needs.
[0029] According to the first aspect, or any implementation of the first aspect above, the step of performing state detection on the source address, the destination address, and the communication object based on the message information includes: detecting the access rights of the communication subject based on the source address and the destination address; detecting the clock state of the communication object; detecting the working state of the communication object; and detecting the legality of the destination address.
[0030] According to the first aspect, or any implementation of the first aspect above, the step of performing state repair on the communication object based on the state detection result, and the communication subject entering a communication waiting time, includes: starting the clock state of the communication object when the state detection result is that the clock state is not started; and waking up the communication object when the state detection result is that the working state is hibernation.
[0031] According to the first aspect, or any implementation of the first aspect above, the method further includes: triggering an exception handling process if the status detection result indicates that the access permission is not valid or the destination address is invalid.
[0032] According to the first aspect, or any implementation of the first aspect above, after the step of performing state detection on the source address, the destination address and the communication object based on the exception code to obtain the state detection result, the method further includes: saving the state detection result to the local storage space of the electronic device.
[0033] Secondly, embodiments of this application provide an electronic device. The electronic device includes: a memory and a processor. The processor's system-on-a-chip includes at least one communication subject, at least one communication object, and an on-chip network module. The communication subject is connected to the communication object via the on-chip network. The memory stores program instructions, which, when executed by the processor, cause the electronic device to perform the methods of the first aspect or any possible implementation thereof.
[0034] Thirdly, embodiments of this application provide a computer-readable medium for storing a computer program, the computer program including instructions for performing the method in the first aspect or any possible implementation of the first aspect.
[0035] Fourthly, embodiments of this application provide a computer program including instructions for performing the method in the first aspect or any possible implementation thereof.
[0036] Fifthly, embodiments of this application provide a chip including a processing circuit and transceiver pins. The transceiver pins and the processing circuit communicate with each other via an internal connection path. The processing circuit executes the method in the first aspect or any possible implementation of the first aspect to control the receiving pin to receive signals and to control the transmitting pin to transmit signals. Attached Figure Description
[0037] Figure 1 A schematic diagram of the hardware structure of an electronic device as an example;
[0038] Figure 2 A schematic diagram of the software structure of an electronic device as an example;
[0039] Figure 3 This is a schematic diagram of an SoC system architecture as an example.
[0040] Figure 4 This is a schematic diagram of an exemplary NOC network structure;
[0041] Figure 5 This is a schematic diagram of the NOC message structure as an example.
[0042] Figure 6 This is a schematic diagram illustrating a SoC system communication architecture as an example.
[0043] Figure 7 This is a schematic diagram illustrating yet another SoC system communication architecture;
[0044] Figure 8 This is an example of a SoC communication timing diagram;
[0045] Figure 9 This is an example of a state detection timing diagram;
[0046] Figure 10 This is another SoC communication timing diagram shown as an example;
[0047] Figure 11 This is an example of another state detection timing diagram. Detailed Implementation
[0048] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0049] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.
[0050] The terms "first" and "second," etc., used in the specification and claims of this application are used to distinguish different objects, not to describe a specific order of objects. For example, "first target object" and "second target object," etc., are used to distinguish different target objects, not to describe a specific order of target objects.
[0051] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0052] In the description of the embodiments in this application, unless otherwise stated, "multiple" means two or more. For example, multiple processing units means two or more processing units; multiple systems means two or more systems.
[0053] To better understand the technical solutions provided in the embodiments of this application, before describing the technical solutions of the embodiments of this application, the hardware structure of the terminal devices (e.g., mobile phones, tablets, touch-screen PCs, etc.) to which the embodiments of this application are applicable will first be described with reference to the accompanying drawings. For ease of explanation, Figure 1 Let's take a mobile phone as an example.
[0054] See Figure 1 The mobile phone 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
[0055] The processor 110 may include one or more processing units, and multiple processing units may be integrated on a single processor to form a system-on-a-chip. For example, the processor 110 may include an application processor (AP), a modem, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU), etc., which will not be listed here, and this application does not impose any limitations on them.
[0056] The controller mentioned above, which serves as the processing unit, can be the central nervous system and command center of the mobile phone 100. In practical applications, the controller can generate operation control signals based on the instruction opcode and timing signals to control the fetching and execution of instructions.
[0057] The aforementioned modulation and demodulation processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal and transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
[0058] The aforementioned baseband processor is used to process the low-frequency baseband signal transmitted by the regulator and then transmit the processed low-frequency baseband signal to the application processor.
[0059] It should be noted that in some implementations, the baseband processor can be integrated into the modem, meaning the modem can have the functionality of a baseband processor.
[0060] The aforementioned application processor is used to output sound signals through audio devices (not limited to speaker 170A, receiver 170B, etc.) or to display images or videos through display screen 194.
[0061] The digital signal processor mentioned above is used to process digital signals. Specifically, in addition to processing digital image signals, digital signal processors can also process other digital signals.
[0062] The aforementioned video codecs are used for compressing or decompressing digital video. For example, mobile phone 100 may support one or more video codecs. Thus, mobile phone 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.
[0063] The aforementioned ISP (Image Signal Processor) is used to output digital image signals to the DSP (Digital Signal Processor) for processing. Specifically, the ISP processes data fed back from the camera 193. For example, when taking a photo or recording video, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into a visible image. The ISP can also perform algorithmic optimization of image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some implementations, the ISP can be integrated into the camera 193.
[0064] The DSP mentioned above is used to convert digital image signals into standard RGB, YUV, and other image signal formats.
[0065] Furthermore, it should be noted that, regarding the processor 110 including the aforementioned processing units, in some implementations, the different processing units can be independent devices. That is, each processing unit can be considered as a processor. In other implementations, the different processing units can also be integrated into one or more processors.
[0066] It should be understood that the above description is merely an example provided to better understand the technical solution of this embodiment, and is not intended to be the only limitation of this embodiment.
[0067] In addition, the processor 110 may also include one or more interfaces. These interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc., which will not be listed here, and this application does not impose any limitations on them.
[0068] In addition, processor 110 may also include memory for storing instructions and data. In some implementations, the memory in processor 110 is a cache memory. This memory can store instructions or data that processor 110 has just used or is recurring. If processor 110 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of processor 110, and thus improves system efficiency.
[0069] See also Figure 1 The external storage interface 120 can be used to connect an external storage card, such as a Micro SD card, to expand the storage capacity of the mobile phone 100. The external storage card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external storage card.
[0070] See also Figure 1The internal memory 121 can be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the mobile phone 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application required for a function, etc. The data storage area may store data created during the use of the mobile phone 100, etc. Furthermore, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0071] See also Figure 1 The charging management module 140 is used to receive charging input from the charger. The charger can be a wireless charger or a wired charger.
[0072] See also Figure 1 The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, external memory, display 194, camera 193, and wireless communication module 160. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some implementations, the power management module 141 may be located within the processor 110. In other implementations, the power management module 141 and the charging management module 140 may be located in the same device.
[0073] See also Figure 1 The wireless communication function of mobile phone 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.
[0074] See also Figure 1The mobile communication module 150 can provide solutions for wireless communication applications including 2G / 3G / 4G / 5G on the mobile phone 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some implementations, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some implementations, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0075] See also Figure 1 The wireless communication module 160 can provide solutions for wireless communication applications on the mobile phone 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0076] See also Figure 1 The audio module 170 may include a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, etc. For example, the mobile phone 100 can implement audio functions through the application processor and the speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, etc. in the audio module 170. Examples include recording and video recording functions.
[0077] In the process of implementing audio functions through the application processor and audio module 170, the audio module 170 can be used to convert digital audio information into analog audio signal output, and also to convert analog audio input into digital audio signal. The audio module 170 can also be used for encoding and decoding audio signals. In some implementations, the audio module 170 can be located in the processor 110, or some functional modules of the audio module 170 can be located in the processor 110.
[0078] See also Figure 1 The sensor module 180 may include pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, etc., which will not be listed here, and this application does not limit them.
[0079] See also Figure 1 The buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch buttons. The mobile phone 100 can receive button input and generate button signal inputs related to the user settings and function control of the mobile phone 100.
[0080] See also Figure 1 Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback.
[0081] See also Figure 1 The indicator 192 can be an indicator light, which can be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0082] See also Figure 1 The camera 193 is used to capture still images or videos. The mobile phone 100 can achieve its shooting function through an ISP, camera 193, video codec, GPU, display 194, and application processor. Specifically, an object generates an optical image through a lens and projects it onto a photosensitive element. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some implementations, the mobile phone 100 may include one or N cameras 193, where N is a positive integer greater than 1.
[0083] See also Figure 1 The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some implementations, the mobile phone 100 may include one or N displays 194, where N is a positive integer greater than 1. The mobile phone 100 can implement display functions through a GPU, the display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0084] That concludes the introduction to the hardware structure of the Mobile 100. It should be understood that... Figure 1 The mobile phone 100 shown is just an example. In a specific implementation, the mobile phone 100 may have more or fewer components than shown in the figure, may combine two or more components, or may have different component configurations. Figure 1 The various components shown can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.
[0085] To better understand Figure 1 The software structure of the terminal device 100 shown is described below. Before describing the software structure of the terminal device 100, the architecture that the software system of the terminal device 100 can adopt will be described first.
[0086] Specifically, in practical applications, the software system of terminal device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture.
[0087] Furthermore, it is understood that the software systems used by mainstream terminal devices currently include, but are not limited to, Windows, Android, and iOS systems. For ease of explanation, this application embodiment uses the layered architecture of the Android system as an example to exemplify the software structure of the terminal device 100.
[0088] Furthermore, the communication schemes for the on-chip systems provided in the embodiments of this application are also applicable to other systems in specific implementations.
[0089] See Figure 2 This is a software structure block diagram of the terminal device 100 according to an embodiment of this application.
[0090] like Figure 2As shown, the layered architecture of terminal device 100 divides the software into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. In some implementations, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.
[0091] The application layer can include a series of application packages. For example... Figure 2 As shown, the application package may include applications such as app stores, video, shopping, permission management, Bluetooth, Wi-Fi, and settings, which will not be listed here, and this application does not impose any restrictions on them.
[0092] The application framework layer provides application programming interfaces (APIs) and programming frameworks for applications within the application layer. In some implementations, these APIs and frameworks can be described as functions. For example... Figure 2 As shown, the application framework layer may include functions such as camera management service, content provider, speech recognition module, wake word / command word detection module, scene recognition module, speech data fusion module, speech activity detection module, voiceprint verification module, and wake word voiceprint template management module, etc., which will not be listed here, and this application does not impose any restrictions on them.
[0093] It should be understood that the above description is merely an example provided to better understand the technical solution of this embodiment, and is not intended to be the only limitation of this embodiment.
[0094] Furthermore, it is understood that the above division of functional modules is merely an example provided to better understand the technical solution of this embodiment, and is not intended to be the sole limitation of this embodiment. In practical applications, the above functions can also be integrated into a single functional module, and this embodiment does not impose any restrictions on this.
[0095] Furthermore, in practical applications, the aforementioned functional modules can also be represented as services or frameworks. For example, a speech recognition module can be represented as a speech recognition service or a speech recognition framework. This embodiment does not impose any restrictions on this.
[0096] Furthermore, it should be noted that the content provider located in the application framework layer is used to store and retrieve data, and to make this data accessible to the application. The data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc., which will not be listed here, and this application does not impose any limitations on this.
[0097] The Android Runtime consists of core libraries and a virtual machine. The Android Runtime is responsible for the scheduling and management of the Android system.
[0098] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.
[0099] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0100] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.
[0101] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.
[0102] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
[0103] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0104] Understandably, the 2D graphics engine mentioned above is a 2D drawing engine.
[0105] Furthermore, it is understandable that the kernel layer in the Android system is the layer between hardware and software. The kernel layer includes at least display drivers, camera drivers, audio drivers, sensor drivers, etc. For example, a sensor driver can be used to output detection signals from sensors (such as touch sensors) to the view system, so that the view system responds to the detection signals and displays the corresponding application interface.
[0106] Specifically, in this embodiment, the kernel layer also includes a state detection module. This state detection module performs state detection, permission detection, and access address validity detection on the communication object during communication between the kernel and various subsystems. Based on the detection results, it attempts to repair communication anomalies to improve the communication success rate; and returns an exception if repair is impossible.
[0107] This concludes the introduction to the software architecture of terminal device 100. It is understandable that... Figure 2 The layers in the illustrated software structure and the components contained in each layer do not constitute a specific limitation on the terminal device 100. In other embodiments of this application, the terminal device 100 may include more or fewer layers than illustrated, and each layer may include more or fewer components; this application does not impose any limitations.
[0108] With the continuous development of semiconductor technology, application-specific integrated circuits (ASICs) can no longer meet the market's higher demands for products. Against this backdrop, System-on-Chip (SoC) design emerged. An SoC is an integrated circuit with a specific purpose, combining hardware and embedded software. Simply put, an SoC consists of a microprocessor, digital IP cores, analog IP cores, and memory. The microprocessor, also known as the logic core, includes the CPU, clock, interrupt controller, I / O ports, and glue logic between various IP cores, responsible for system control. Digital IP cores contain accelerators, reducing the processor's computational burden. Analog IP cores contain analog circuits such as ADCs, DACs, and PLLs, responsible for data transmission of analog information with the outside world. Memory includes various types of volatile, non-volatile, and cache memories, used to store the system's running code and data.
[0109] For example, see Figure 3 , Figure 3 An example of a SoC architecture is shown. Figure 3 The SoC architecture includes at least one microcontroller, microprocessor, digital signal processor, or multiple processor cores; memory may include one or more of random access memory (RAM), read-only memory (ROM), electrically erasable programmable memory (EEPROM), and flash memory; oscillators and phase-locked loop circuits for providing time pulse signals; peripherals consisting of counters, timers, and power supply resistors; different standard connection interfaces, such as USB, FireWire, Ethernet, Universal Asynchronous Transfer Protocol (UASP), and Serial Peripheral Interface (SPI); digital-to-analog converters for converting between digital and analog signals; voltage conditioning circuitry; and voltage regulators.
[0110] Currently, the design of SoC system architecture is relatively mature. Most chip companies have adopted SoC architecture in their chip manufacturing. However, as commercial applications increasingly demand instruction execution concurrency and predictability, the number of cores integrated into chips will continue to increase, making bus-based SoC systems unable to meet the ever-growing computing demands. Its main shortcomings are:
[0111] 1. Poor scalability: SoC system design begins with system requirements analysis to determine the modules in the hardware system. To ensure correct system operation, the physical simulations in the SoC are located in relatively fixed positions on the chip. Once the physical design is completed, any modifications require redesign. Furthermore, bus-based SoC systems, due to the inherent arbitration communication mechanism of the bus architecture, limit the number of processor cores that can only communicate between a pair of processor cores at a time.
[0112] 2. Low average communication efficiency: The SoC uses a bus architecture based on an exclusive mechanism, meaning that each functional module can only communicate with other modules in the system after obtaining bus control. From an overall perspective, when one module obtains bus arbitration rights to communicate, other modules in the system must wait until the bus is idle.
[0113] 3. Single clock synchronization problem: The bus structure requires global synchronization. However, as the process feature size becomes smaller and the operating frequency increases rapidly, after reaching 10GHz, the impact of interconnect delay will be so severe that it will be impossible to design a global clock tree. Moreover, due to the excessive size of the clock network, its power consumption will account for most of the chip's total power consumption.
[0114] Therefore, with the increasing number of IP cores within chips, in order to achieve efficient, high-throughput, and low-power communication between IP cores, chip manufacturers have drawn inspiration from the layered model of the Open System Interconnection (OSI) in computer networks and the interconnection networks of parallel computers. They have applied the communication concepts from macroscopic networks to chips, forming a Network on-Chip (NOC). This treats each core as an independent unit, with each IP core connected to a specific router via a network interface, transforming communication between IP cores into communication between routers.
[0115] For example, see Figure 4 , Figure 4 An example of a 2D network NOC topology is shown. Figure 4 In the diagram, R represents a router, N represents a network interface, and C represents an IP core. Its NOC network consists of multiple modular routing nodes interconnected. Data is transmitted in packets, each consisting of a header and a payload. For example, see the packet structure below. Figure 5 ,exist Figure 5 The message header contains information about the source node, destination node, and message size.
[0116] In one implementation, each of the above routing nodes consists of 5 input link controllers, 5 output link controllers, an input buffer queue, a crossbar switch module, a routing and arbitration module, and a network interface module.
[0117] For example, in Figure 4 The data transmission process based on the aforementioned NOC includes: the IP core connected to the local link controller inputs packets to the router node through the input network interface and stores them in the input buffer queue. The routing and arbitration modules perform arbitration and routing based on the information in the packet header micro-fragments. Subsequent data payload micro-fragments are transmitted according to the micro-fragment's transmission channel. As long as the input buffer queue of an adjacent routing module is not full, the data micro-fragment outputs data to the correct output port; if the input buffer of an adjacent routing module is full, the payload micro-fragment is stored locally. The routing module determines whether to output to the destination device through the network interface module based on the destination node information in the packet data header micro-fragment, thereby realizing the transmission of the packet to the destination device.
[0118] Therefore, based on the SoC, the NOC further enhances the scalability of the system-on-a-chip, freeing it from the limitations of the bus architecture and allowing for the expansion of any number of computing nodes. The NOC transforms data transmission between IP cores into data forwarding between routers, changing the communication mode of the original bus architecture where only one pair of communication nodes could communicate at a time, thus improving communication efficiency. Simultaneously, the NOC employs a globally asynchronous, locally synchronous clock mechanism, reducing the dynamic overhead caused by global clock synchronization and further reducing chip power consumption.
[0119] However, in deep submicron processes, highly integrated circuits are affected by a variety of environmental factors, such as air oxidation, circuit board aging, electron migration, dielectric breakdown, and negative bias temperature instability. These environmental factors may lead to an increase in failures, thereby affecting the normal operation of the on-chip system.
[0120] For example, see Figure 6 , Figure 6 An exemplary NOC communication architecture is illustrated. In this architecture, the kernel establishes communication connections with the Audio Digital Signal Processor (ADSP), Modem, WLAN, and General Purpose I / O ports via an on-chip network. The ADSP includes sub-functions for audio, sensor, and charger functions; the Modem mainly includes sub-functions for signal and flow control; the WLAN mainly includes Wi-Fi-related sub-functions; and the General Purpose I / O ports are interfaces for digital signal interaction with external devices.
[0121] In one scenario, an upper-layer application needs to control a terminal device to convert text information into audio for playback. Therefore, the upper-layer application sends the audio playback command to the kernel, which directly accesses the ADSP through the NOC (Normally Open Control). Due to the aforementioned environmental factors, this NOC communication may fail. In severe cases, this failure could trigger a system reboot, significantly impacting normal user operation and degrading the user experience.
[0122] In view of this, embodiments of this application provide a communication method for an on-chip system. By adding a state detection module between the kernel (communication subject) and the ADSP (communication object), the communication state between the communication subject and the communication object is detected and processed, thereby improving the communication success rate between the communication subject and the communication object and greatly enhancing the user experience.
[0123] For example, see Figure 7 , Figure 7 An exemplary NOC communication architecture is illustrated. In this architecture, a state detection module is added between the kernel and the NOC network to detect the communication state of both the communication subject and the communication object. Based on the detection results, each abnormal situation is handled individually, thereby repairing repairable anomalies and preventing them from triggering abnormal restarts.
[0124] For example, when the aforementioned communication subject and communication object communicate, abnormal states include the object being in a dormant state (abnormal code can be set to 001), the object clock not being started (abnormal code can be set to 002), subject permissions not matching (abnormal code can be set to 003), destination address abnormal (abnormal code can be set to 004), side effects propagated from downstream NOC (abnormal code can be set to 005), hardware driver abnormality (abnormal code can be set to 006), and accelerator processor abnormality (xpu stuck, abnormal code can be set to 007).
[0125] In one implementation, the error codes corresponding to the aforementioned abnormal states can also be saved in an exception log, which developers can use to optimize the on-chip system based on the error code information in the exception log.
[0126] To better understand the state detection process between the communication subject and the communication object in the system-on-a-chip communication method provided in this application, the following embodiments still use mobile phone 100 as an example to illustrate the state detection process between the communication subject and the communication object in the system-on-a-chip.
[0127] For example, such as Figure 8 As shown, in one implementation, the aforementioned state detection module can perform exception handling based on the exception code returned by the on-chip network. This communication method includes the following steps:
[0128] S101. In response to the user's operation, the upper-layer application sends the first instruction.
[0129] It is understandable that the aforementioned upper-layer applications can be applications that interact directly or indirectly with the user, such as cameras, camera drivers, and photo galleries.
[0130] In one implementation, the user interacts with an upper-layer application to control the phone to convert text into audio for playback. Therefore, the text content is encapsulated into a first instruction, which is used to instruct the phone to perform text / audio conversion.
[0131] S102. The communication entity parses the first instruction to obtain the source address, destination address, and data.
[0132] It is understood that the aforementioned communication entity can refer to a specific core within a SoC (System-on-a-Chip). For example, the aforementioned communication entity could be used by a processor that converts text into audio.
[0133] In one implementation, the aforementioned communication entity can obtain the aforementioned audio by parsing instructions, and obtain the source address and the target address, wherein the target address may be the corresponding ADSP.
[0134] S103. The communication subject attempts to establish a communication channel with the communication object based on the target address.
[0135] The aforementioned communication devices include, but are not limited to, audio digital signal processors, modems, wireless local area network modules, and general purpose I / O ports (GPIO).
[0136] It is understandable that after obtaining the target address, the communication subject attempts to establish a communication channel by using the on-chip network (NOC) to connect with the communication object corresponding to the target address.
[0137] S104. Channel establishment failed, and the on-chip network generated an exception code.
[0138] In one implementation, the exception code can be the code corresponding to the aforementioned exception state, including but not limited to 001, 002, 003, 004, 005, 006, and 007. It is understood that the exception code here is merely an encoding used to establish exception states during development; it can be other forms of encoding, and this application embodiment does not impose any limitations on this.
[0139] S105. The on-chip network returns the exception code to the communication subject.
[0140] S106. The communication subject saves the exception code.
[0141] Understandably, the communication entity can save the above-mentioned exception code locally to record the cause of the chip's exception, making it easier for engineers to troubleshoot the problem later.
[0142] S107. The communication subject sends the exception code to the status detection module.
[0143] In one implementation, after saving the exception code, the communication subject will directly trigger the corresponding module of the phone to restart, or trigger the entire phone to restart.
[0144] S108. If the status detection module determines that the exception code corresponds to an exception that can be repaired, an exception repair instruction is generated based on the exception code.
[0145] Understandably, some of the exceptions corresponding to the above error codes can be repaired by software, while others cannot. Here, we need to fix the exceptions that can be repaired by software, thereby reducing the frequency of system restarts and improving the user experience.
[0146] For example, the above-mentioned anomalies, such as the object being in a dormant state and the object clock not being started, can be repaired by software; however, the subject permission mismatch, destination address anomaly, side effects of reverse propagation of the downstream on-chip network, hardware driver anomaly, and accelerometer anomaly cannot be repaired by software.
[0147] In one implementation, for exceptions that can be repaired by software, exception repair instructions can be generated based on the exception code. These exception repair instructions are used to perform software repair on communication objects in an abnormal state.
[0148] In another implementation, exceptions that cannot be fixed by software can be handled by directly triggering the exception handling stream through the communication subject, causing the phone to restart the module or the entire device.
[0149] S109. The status detection module repairs the communication object based on the repair command.
[0150] S110. After waiting for a preset time, the communication subject attempts to establish a communication channel with the communication object again.
[0151] It is understandable that when the communication object is repaired based on the aforementioned repair instruction, the communication subject enters a communication waiting state. After waiting for a preset time, the communication subject sends the aforementioned first instruction again to communicate with the communication object.
[0152] It should be noted that the above-mentioned preset duration can be a duration set based on development experience, and its value can be set according to user needs. This application embodiment does not limit this.
[0153] Therefore, this embodiment adds a status detection module between the communication subject and the communication object. During the NOC communication process between the communication subject and the communication object, the status of the communication subject and the communication object is detected, and software repair is performed on the anomalies based on the detection results. This avoids the mobile phone system directly triggering the whole machine restart recovery logic after the NOC communication fails, which greatly improves the user experience.
[0154] Furthermore, it should be noted that the aforementioned system restarts triggered by abnormalities include kernel restarts, virtual machine restarts, and peripheral restarts. Peripheral restarts typically involve only a single module restarting, which is usually imperceptible to the user (for example, a sudden drop in network speed while browsing the internet is actually due to a WLAN module restart). Virtual machine restarts will cause the phone screen to go black, and running applications will also be closed or crash. Kernel restarts are the most serious abnormality, causing the entire phone to restart, severely impacting the user experience.
[0155] For example, such as Figure 9 As shown, in one implementation, the state detection step in this communication method includes:
[0156] S201. The communication subject attempts to establish a communication channel with the communication object for the first time through the on-chip network.
[0157] S202. Communication channel establishment failed, and the on-chip network generated an exception code.
[0158] Understandably, when a communication subject communicates with a communication object through an on-chip network, it will first attempt to establish a communication channel. If the on-chip network fails to establish the channel, it will generate an exception code and send the exception code to the communication subject (kernel).
[0159] S203. The status detection module obtains the exception code through the on-chip network.
[0160] It is understood that the above-mentioned exception code may be sent directly to the status detection module by the on-chip network; or it may be obtained by the status detection module from the communication subject through the on-chip network. This application embodiment does not limit this.
[0161] S204. When the exception code is 001, obtain the clock state of the communication object.
[0162] S205. If the clock state is not started, start the clock of the communication object.
[0163] S206. After waiting for the preset time, make a second attempt to establish a communication channel.
[0164] In one implementation, as described above, an exception code of 001 indicates that the clock of the communication object is not started. Because the communication object's clock is not started, the object cannot receive, process, or respond to messages, resulting in the failure to establish a communication channel between the communication subject and the communication object. Therefore, the kernel actively wakes up the communication object's clock and puts it into a waiting state, waiting for a certain period before attempting to communicate with the communication object again via NOC.
[0165] Since the NOC is a local clock, when the current communication object is not operating, its corresponding clock may also go into sleep mode to further reduce power consumption, and the sleep state will be written to the system's state monitor. Therefore, clock state detection can be achieved by the kernel reading the system's state monitor to obtain the clock state of the communication object.
[0166] It should be noted that in some application scenarios, the aforementioned clock state can also be identified using other codes, and this application does not impose any restrictions on this.
[0167] S207. When the exception code is 002, obtain the sleep state of the communication object.
[0168] S208. When the sleep state is in sleep mode, wake up the communication object.
[0169] S209. After waiting for the preset time, make a second attempt to establish communication.
[0170] In one implementation, an exception code of 002 indicates that the communication object is in a dormant state, causing the communication channel between the communication subject and the communication object to fail to establish. Therefore, the kernel reads the value of the corresponding register of the communication object to determine whether the communication object is in a dormant state. If the communication object is currently in a dormant state, a command needs to be sent to the communication object to wake it up.
[0171] It should be noted that in some application scenarios, the above-mentioned hibernation state can also be identified by other codes, and this application does not impose any restrictions on this.
[0172] S210. When the exception code is 003, obtain the communication subject's access rights to the target address.
[0173] S211. Returns an exception code when the communication subject does not have access rights.
[0174] In one implementation, an exception code of 003 indicates that the communicating entity lacks sufficient access permissions to the target address. For example, normally the camera's camera driver cannot read or write audio files. However, in some exceptional cases, the camera driver might attempt to access the audio driver, which would result in insufficient permissions and trigger a system exception. Therefore, the status detection module matches the communicating entity against a list of permissions in memory to determine if the entity has permission to access the target address. If no permission is granted, an exception code is returned, triggering a system restart.
[0175] S212. When the exception code is 004, verify the validity of the access address.
[0176] S213. Returns an exception code when the access address is invalid.
[0177] In one implementation, an exception code of 004 indicates that the target address is invalid. The status detection module parses the accessed target address to determine its invalid status (error, unallocated), thus validating the accessed address. If the address is either erroneous or unallocated, a system reboot is triggered.
[0178] In another implementation, when the exception code is 005, 006, and / or 007, the status detection module directly returns the exception code, causing the kernel to trigger a system reboot.
[0179] Therefore, this application embodiment specifically addresses different situations such as clock anomalies, working status anomalies, access permission anomalies, and access address anomalies by providing targeted repairs. It handles anomalies that can be repaired by software and triggers a system restart for anomalies that cannot be repaired by software, thereby reducing the probability of a system restart and greatly improving the user experience.
[0180] For example, such as Figure 10 As shown, in one implementation, the aforementioned state detection module can also perform state detection on the communication subject and the communication object before the communication subject attempts to establish a communication channel with the communication object. The communication method further includes the following steps:
[0181] S301. In response to the user's operation, the upper-layer application sends the first instruction.
[0182] S302. The communication subject encapsulates the first instruction into a first message.
[0183] It is understandable that the aforementioned first message could be as follows: Figure 5 The message shown, the first message includes the source address, destination address, micro-tree, and data payload.
[0184] S303. The communication subject sends the first message to the status detection module.
[0185] S304. The status detection module detects the status of the communication subject and / or communication object based on the information in the first message.
[0186] Understandably, the status detection module performs access permission checks on the communication subject based on the source address, verifies the legality of the access address based on the destination address, and detects the clock status and / or working status of the destination address to obtain the detection results.
[0187] For example, detection results include, but are not limited to, no access permission, illegal access address, clock not started, and / or communication object in sleep mode.
[0188] S305. If the detection result is abnormal, perform state repair on the communication object based on the detection result.
[0189] If the detection result indicates that the clock has not been started and the communication object is in a dormant state, the clock state of the communication object and the communication object itself will be woken up.
[0190] If the detection result indicates no access permission or an invalid access address, an exception code is returned directly, causing the communication entity to perform a system restart based on the exception code.
[0191] S306. After waiting for a preset time, the status detection module sends the first message to the communication object through the on-chip network.
[0192] Therefore, this embodiment of the application detects the status of the communication subject and the communication object before establishing a communication channel, and repairs any software-repairable anomalies based on the detection results, thereby avoiding a direct system restart after any anomaly is triggered, which greatly improves the user experience.
[0193] For example, such as Figure 11 As shown, in one implementation, the state detection step in this communication method further includes:
[0194] S401. The communication subject sends the first message to the status detection module, and the communication subject attempts to establish a communication channel with the communication object for the first time.
[0195] S402. The status detection module obtains the source address and access address from the first message.
[0196] S403. The status detection module obtains the clock status of the communication object corresponding to the access address.
[0197] S404. If the clock state is not started, start the clock of the communication object.
[0198] S405. After waiting for a preset time, establish a communication channel between the communication subject and the communication object based on the first message.
[0199] S406. The status detection module obtains the sleep status of the communication object corresponding to the access address.
[0200] S407. When the sleep state is in sleep mode, wake up the communication object.
[0201] S408. After waiting for a preset time, establish a communication channel between the communication subject and the communication object based on the first message.
[0202] S409. The status detection module obtains the access permissions of the communication subject corresponding to the source address.
[0203] S410. When the communication subject does not have access permission to the access address, return an exception code.
[0204] S411. The status detection module verifies the validity of the access address.
[0205] S412. Returns an exception code when the access address is invalid.
[0206] Therefore, the status detection module can detect the access permissions and access address validity of the communication subject, as well as the clock status and working status of the communication object, according to the implementation requirements and the user scenarios set by the developer. This allows it to repair software-repairable anomalies and trigger a system restart for anomalies that cannot be repaired by software, thereby reducing the probability of a system restart and greatly improving the user experience.
[0207] Furthermore, it is understood that, in order to achieve the aforementioned functions, the electronic device includes hardware and / or software modules corresponding to the execution of each function. Based on the algorithmic steps of the various examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in a hardware-driven or software-driven manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in conjunction with the embodiments, but such implementation should not be considered beyond the scope of this application.
[0208] Furthermore, it should be noted that in practical application scenarios, the communication methods of the on-chip systems provided in the above embodiments, implemented by electronic devices, can also be executed by a chip system included in the electronic device. This chip system may include a processor. The chip system can be coupled to a memory, enabling it to call computer programs stored in the memory during runtime to implement the steps executed by the electronic device. The processor in this chip system can be an application processor or a non-application processor.
[0209] In addition, this application embodiment also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the above-mentioned related method steps to implement the communication method of the on-chip system in the above embodiment.
[0210] In addition, this application also provides a computer program product that, when run on an electronic device, causes the electronic device to perform the above-mentioned related steps to realize the communication method of the system-on-a-chip in the above embodiments.
[0211] In addition, embodiments of this application also provide a chip (which may also be a component or module), the chip may include one or more processing circuits and one or more transceiver pins; wherein, the transceiver pins and the processing circuits communicate with each other through internal connection paths, and the processing circuits execute the above-mentioned related method steps to implement the communication method of the on-chip system in the above embodiments, so as to control the receiving pin to receive signals and control the transmitting pin to transmit signals.
[0212] Furthermore, as can be seen from the above description, the electronic devices, computer-readable storage media, computer program products, or chips provided in the embodiments of this application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0213] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A communication method of a system on chip, characterized by, A system-on-a-chip (SoC) for use in an electronic device, the SoC including at least one communication subject, at least one communication object, and an on-chip network, wherein the communication subject is connected to the communication object through the on-chip network, the method comprising: In response to a user's interaction command, the system obtains the message information corresponding to the interaction command, wherein the message information includes at least a source address and a destination address; A communication channel is established between the communication subject and the communication object through the on-chip network based on the message information. Based on the message information, perform state detection on the source address, the destination address, and the communication object; Based on the state detection results, the state of the communication object is repaired, and the communication subject enters a communication waiting time. After the communication waiting time reaches the preset waiting time, the communication channel between the communication subject and the communication object is re-established based on the on-chip network; In the event that the communication channel fails to be established, an exception code is obtained, which indicates the reason for the failure to establish the communication channel. Based on the exception code, the state of the source address, the destination address and the communication object is detected to obtain the state detection result, which includes software-repairable exceptions and non-software-repairable exceptions. If the state detection result indicates a software-repairable anomaly, the state of the communication object is repaired, and the communication subject enters a communication waiting time. After the communication waiting time reaches the preset waiting period, the communication channel between the communication subject and the communication object is re-established based on the on-chip network.
2. The method of claim 1, wherein, The reasons for the failure to establish the communication channel include: the clock of the communication object is not started; the working state of the communication object is in sleep mode; the communication subject corresponding to the source address has no access permission; the destination address is an illegal address; the side effects of the reverse propagation of the downstream on-chip network; hardware driver abnormality; and accelerometer abnormality.
3. The method of claim 2, wherein, The software-repairable anomalies include the communication object's clock not starting and the communication object's working state being in a sleep state; The step of performing state repair on the communication object when the state detection result is the software-repairable anomaly includes: If the status detection result indicates that the clock of the communication object has not been started, the clock of the communication object is woken up.
4. The method of claim 3, wherein, The step of performing state repair on the communication object when the state detection result is the software-repairable anomaly further includes: If the status detection result indicates that the communication object is in a dormant state, the communication object is woken up.
5. The method of claim 2, wherein, The unrepairable anomalies include: the communication subject corresponding to the source address has no access rights; the destination address is an illegal address; the side effects of the back propagation of the downstream on-chip network; hardware driver anomalies; and accelerometer processor anomalies. The method further includes: If the detection result is an unrepairable exception, the exception code is thrown, triggering the exception process corresponding to the exception code.
6. The method of claim 1, wherein, The step of performing state detection on the source address, the destination address, and the communication object based on the message information includes: Access permissions of the communication subject are detected based on the source address and the destination address; The clock state of the communication object is detected; The working status of the communication object is detected; Perform a validity check on the destination address.
7. The method of claim 6, wherein, The step of performing state repair on the communication object based on the state detection result, and the communication subject entering a communication waiting time, includes: If the state detection result indicates that the clock state is not started, the clock state of the communication object is started; If the status detection result indicates that the working state is sleep, the communication object is woken up.
8. The method of claim 7, wherein, The method further includes: If the status detection result indicates that the access permission is invalid or the destination address is illegal, an exception handling process is triggered.
9. The method according to claim 1, characterized in that, After the step of performing state detection on the source address, the destination address, and the communication object based on the exception code to obtain the state detection result, the method further includes: The status detection results are saved to the local storage space of the electronic device.
10. An electronic device, characterized in that, The electronic device includes: a memory and a processor, wherein the system-on-a-chip of the processor includes at least one communication subject, at least one communication object, and an on-chip network, wherein the communication subject is connected to the communication object through the on-chip network; the memory stores program instructions, which, when executed by the processor, cause the electronic device to perform the communication method of the system-on-a-chip as described in any one of claims 1 to 9.
11. A computer-readable storage medium, characterized in that, It includes a computer program that, when run on an electronic device, causes the electronic device to perform the communication method of the system-on-a-chip as described in any one of claims 1 to 9.