A chip and a processing unit recovery method

By introducing a micro control unit into the AI ​​chip, the main processor controls the processing unit, realizing automatic recovery of the AI ​​engine, solving the problem of business interruption caused by AI engine abnormalities, and saving the time and energy of restarting the chip system.

CN113687986BActive Publication Date: 2024-09-13SHANGHAI QIANSHI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111013632.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-31
Publication Date
2024-09-13
Estimated Expiration
2041-08-31

AI Technical Summary

Technical Problem

The AI ​​engine may enter an abnormal state when running the AI ​​algorithm, causing the entire AI business application to exit incorrectly. The existing solution is to restart the entire AI chip, causing the services of other AI engines to be terminated and causing a waste of energy.

Method used

A micro control unit is introduced into the AI ​​chip, and the main processor controls the processing unit through the micro control unit, which can automatically restore abnormal processing units and avoid restarting the entire chip system.

Benefits of technology

It realizes automatic recovery of a single-channel processing unit, keeps the business processes of other processing units running, and saves the time and energy waste caused by restarting the chip system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113687986B
    Figure CN113687986B
Patent Text Reader

Abstract

This disclosure provides a method for recovering a chip and a processing unit. The chip includes a main processor and multiple engine units, each engine unit including a processing unit and a microcontroller unit for controlling the processing unit. The main processor is configured to receive processing unit operation information sent by the microcontroller units in the engine units. In response to the processing unit operation information indicating an abnormal operation of the processing unit, the main processor sends a recovery command to the microcontroller units, the recovery command instructing the microcontroller units to recover the processing unit. Each microcontroller unit is configured to recover the processing unit in response to receiving the recovery command sent by the main processor. This chip can automatically recover a processing unit that experiences a single abnormal situation, eliminating the need to restart the entire chip system and saving time wasted on restarting the entire chip system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The disclosed embodiments relate to the field of network communication technology, and more particularly to a method for recovering a chip and a processing unit. Background Art

[0002] AI (Artificial Intelligence) chips generally contain a main processor and multiple IPCores (Intellectual Property cores), such as multi-channel AI engines. AI business applications mainly run on the main processor, and through the AI ​​engine driver, control the corresponding AI engine to process a large number of algorithms.

[0003] Due to the complexity and diversity of AI algorithms, the AI ​​engine may encounter an incorrect execution command during the running of the AI ​​algorithm, causing the AI ​​engine to enter an abnormal state. Since the AI ​​engine cannot recover by itself, the running result of the entire AI business application is incorrect, and the operation is abnormally exited, and the AI ​​engine along the way will no longer be usable.

[0004] The current solution is generally to restart the entire AI chip and power off and restart all the internal IP Cores to recover the AI ​​engine that has an abnormality. This is bound to interfere with the normal operation of other AI engines, terminate all business applications, and waste time. The recovery process after the entire SOC restarts also results in energy waste. Summary of the invention

[0005] In view of this, embodiments of the present disclosure provide at least one chip and a recovery method for a processing unit.

[0006] Specifically, the embodiments of the present disclosure are implemented through the following technical solutions:

[0007] In a first aspect, a chip is provided, the chip comprising: a main processor and a plurality of engine units, each engine unit comprising a processing unit and a micro control unit for controlling the processing unit.

[0008] The main processor is used to receive the processing unit operation information sent by the micro control unit in the engine unit.

[0009] In response to the processing unit operation information indicating that the processing unit operates abnormally, a recovery instruction is sent to the micro control unit, wherein the recovery instruction is used to instruct the micro control unit to restore the processing unit.

[0010] Each of the micro control units is used to restore the processing unit in response to receiving a restore instruction sent by the main processor.

[0011] In a second aspect, a method for recovering a processing unit is provided, the method being applied to a main processor, the chip comprising a main processor and a plurality of engine units, each engine unit comprising a processing unit and a microcontroller unit for controlling the processing unit, the method comprising:

[0012] A data packet is sent to the micro control unit, wherein the data packet includes service data to be executed.

[0013] Receive the processing unit operation information sent by the micro control unit in the engine unit.

[0014] In response to the processing unit operation information indicating that the processing unit operates abnormally, a recovery instruction is sent to the micro control unit, wherein the recovery instruction is used to instruct the micro control unit to restart the processing unit.

[0015] In a third aspect, a method for recovering a processing unit is provided, the method being applied to a microcontroller unit, wherein the chip includes a main processor and a plurality of engine units, each engine unit includes a processing unit and a microcontroller unit for controlling the processing unit, the method comprising:

[0016] A data packet sent by the main processor is received, wherein the data packet includes service data to be executed.

[0017] The control processing unit executes the service data and returns the processing unit operation information to the main processor.

[0018] In response to receiving a recovery instruction sent by the main processor, restarting the processing unit.

[0019] In a fourth aspect, a method for recovering a processing unit is provided, the method being applied to a chip, the chip comprising a main processor and a plurality of engine units, each engine unit comprising a processing unit and a microcontroller unit for controlling the processing unit; the method comprising:

[0020] The main processor receives the processing unit operation information sent by the micro control unit in the engine unit.

[0021] In response to the processing unit operation information indicating that the processing unit operates abnormally, the main processor sends a recovery instruction to the micro control unit, where the recovery instruction is used to instruct the micro control unit to restart the processing unit.

[0022] The micro control unit receives the recovery instruction and restarts the processing unit.

[0023] In a fifth aspect, an electronic device is provided, the device comprising a chip, and the chip is the chip described in any embodiment of the present disclosure.

[0024] In a sixth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method described in any embodiment of the present disclosure is implemented.

[0025] Each processing unit in the chip provided by the embodiment of the present disclosure is configured with a micro control unit, and the main processor controls the processing unit through the micro control unit. A processing unit with an abnormal situation on a single path can be automatically restored, and there is no need to restart the entire chip system so that the business processes of processing units on other paths can continue to run, which can save the time wasted by restarting the entire chip system. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in one or more embodiments of the present disclosure or related technologies, the drawings required for use in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in one or more embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0027] Figure 1 It is a chip architecture shown in an embodiment of the present disclosure;

[0028] Figure 2 It is another chip architecture shown in the embodiment of the present disclosure;

[0029] Figure 3 is a flowchart of a method for restoring a processing unit shown in an embodiment of the present disclosure;

[0030] Figure 4 is a flowchart of another method for restoring a processing unit shown in an embodiment of the present disclosure;

[0031] Figure 5 It is a flowchart of another processing unit recovery method shown in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0032] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this specification. Instead, they are merely examples of methods consistent with some aspects of this specification as detailed in the appended claims.

[0033] The terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit this specification. The singular forms "a", "the" and "the" used in this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0034] It should be understood that although the terms first, second, third, etc. may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0035] like Figure 1 As shown, Figure 1 The architecture of a chip provided by an embodiment of the present disclosure is shown. The chip includes: a main processor and multiple engine units. Each engine unit includes a processing unit PU (Processing Unit) and a microcontroller unit MCU (MicroController Unit) for controlling the processing unit. This embodiment does not limit the number of engine units. Figure 1 Take 4 engine units as an example.

[0036] The main processor is used to receive the processing unit operation information sent by the micro control unit in the engine unit, and in response to the processing unit operation information indicating that the processing unit is operating abnormally, send a recovery instruction to the micro control unit, wherein the recovery instruction is used to instruct the micro control unit to restore the processing unit.

[0037] Each micro control unit is used to restore the processing unit in response to receiving a restore instruction sent by the main processor.

[0038] The chip in this embodiment may be various SoCs (System on Chip), for example, an AI chip. This embodiment is described by taking an AI chip as an example.

[0039] Among them, the main processor can be a processor of various architectures, such as an ARM (Advanced RISC Machines, advanced reduced instruction set processor) processor, or an X86 architecture processor. The processing unit can be an IP core inside the chip. The IP core encapsulates circuits that can implement different functions. In an AI chip, the IP core can be an AI engine, that is, an AI accelerator or an AI processor. The business application mainly runs on the main processor. Based on the existing chip, this embodiment configures a microcontroller unit for each processing unit. For the convenience of description, the combination of the processing unit and the microcontroller unit is called an engine unit. The microcontroller unit controls the communication between the processing unit and the main processor, and controls the processing unit to process related algorithms.

[0040] The processing unit operation information may be information related to the operation status or operation result of the processing unit. The processing unit operation information may be generated by the processing unit itself or by the processing unit. In one example, the processing unit operation information may include at least one of the following: the business execution result of the processing unit, and the judgment result of the microcontroller unit on the operation status of the processing unit. The business execution result is the operation result after the processing unit executes the business data.

[0041] In actual implementation, the main processor can receive the processing unit operation information sent by the micro-control unit of any of the four engine units, and judge the processing unit operation information. When it is judged that the processing unit operation information indicates that the processing unit corresponding to the micro-control unit is abnormal, a recovery instruction can be sent to the micro-control unit to which the processing unit operation information belongs. The recovery instruction can instruct the corresponding micro-control unit to restore the processing unit so that the processing unit is restored from abnormality to normal.

[0042] For example, the main processor returns the processing unit operation information to the upper-level business application, and the business application judges the processing unit operation information. When it is judged that the processing unit is operating abnormally, for example, when the processing unit operation information is the business execution result, it is judged that the operation data in the business execution result is the intermediate data of the unexecuted algorithm instruction. For another example, when the processing unit operation information is the judgment result of the microcontroller unit on the operating status of the processing unit, it is judged that the judgment result of the microcontroller unit on the operating status of the processing unit is abnormal. A recovery instruction can be sent to the microcontroller unit by calling a pre-set restart function. In particular, when it is judged that the processing unit is operating abnormally and cannot be recovered by the processing unit itself, the main processor sends a recovery instruction to the microcontroller unit.

[0043] The micro control unit recovers the processing unit separately when receiving the recovery instruction. The recovery method may be to restart the processing unit or to restart the micro control unit and the processing unit together.

[0044] For example, after receiving the recovery instruction, the microcontroller unit can restart the processing unit by setting the register of the processing unit according to the instruction of the recovery instruction, or the processing unit and the microcontroller unit in this engine unit can be restarted together, that is, in addition to restarting the processing unit, the microcontroller unit itself is also restarted.

[0045] Each processing unit in the chip provided by the embodiment of the present disclosure is configured with a micro control unit, and the main processor controls the processing unit through the micro control unit. A processing unit with an abnormal situation on a single path can be automatically restored, and there is no need to restart the entire chip system so that the business processes of processing units on other paths can continue to run, which can save the time wasted by restarting the entire chip system.

[0046] In one embodiment, the main processor in the chip is also used to send data packets to the micro control unit; the micro control unit is also used to receive data packets sent by the main processor, control the processing unit to execute business data, and return processing unit operation information to the main processor.

[0047] The data packet includes the business data to be executed. The business data may be of various types, such as instruction streams, parameters, and input data sources related to the business algorithm.

[0048] The business execution result of the processing unit is the operation result after the processing unit executes the business data.

[0049] For example, when the business data includes instructions for calculating the similarity of input images and the storage addresses of two input images, the business execution result may include the similarity calculated by the processing unit based on the business data, or it may only include a part of the calculated data related to the similarity due to an intermediate running error.

[0050] The result of the microcontroller unit's judgment on the running status of the processing unit is the result of the microcontroller unit's judgment on the state of the processing unit during or after the processing unit is running. For example, the microcontroller unit can judge the running status of the processing unit when the processing unit is executing business data or after executing business data. The processing unit may enter an abnormal state due to executing an erroneous algorithm instruction. When the microcontroller unit judges that the processing unit is in an abnormal state, it sends the business execution result containing the judgment result to the main processor. In this way, when the processing unit is in an abnormal state and cannot generate any running data, the microcontroller unit will promptly discover the abnormal state of the processing unit and return it to the main processor.

[0051] In actual implementation, the main processor may send the service data required to be executed by the service application program to the micro control unit in the form of data packets.

[0052] The microcontroller unit controls the processing unit to execute business data by configuring the registers of the processing unit. For example, the microcontroller unit writes the business data to be executed in the data packet into the registers of the processing unit, so that the processing unit obtains the AI ​​algorithm instructions and corresponding parameters and executes the instructions, thereby implementing the corresponding business algorithm.

[0053] After receiving the processing unit operation information returned by the microcontroller unit, the main processor can feed back the processing unit operation information to the business application running on the main processor, so that the main processor can judge whether the processing unit is operating abnormally according to the processing unit operation information. The business application can also obtain the operation data generated by the processing unit itself required by the business from the business execution results in the processing unit operation information. The operation data can be the operation data after the processing unit has completed the execution of the relevant algorithm instructions, or it can be the intermediate operation data after the relevant algorithm instructions have not been completed due to entering an abnormal state.

[0054] After the processing unit is restarted, it overcomes the original fault and changes from an abnormal state to a normal state. At this time, the main processor can continue to send data packets to the microcontroller unit. The data packets may include algorithm instructions and intermediate operation data that have not been executed before the restart, so that the microcontroller unit controls the processing unit to continue to execute the interrupted business process. After the single-channel processing unit is restored, it can continue to execute the business process before the abnormality occurs, eliminating the step of restarting the business process from the beginning, which is more convenient to use.

[0055] In yet another embodiment, Figure 2 As shown, Figure 2 This is another chip architecture shown in an embodiment of the present disclosure. In this chip, transmission channels are respectively provided between the main processor and each engine unit. The transmission channels are used for data transmission between the main processor and the engine unit corresponding to the transmission channels.

[0056] The transmission channel may be generated by loading a channel driver by a main processor to generate transmission channels between the main processor and each of the engine units.

[0057] For example, after the chip is started, a predefined channel driver is automatically loaded to generate transmission channels between the main processor and each engine unit. The channel driver is a protocol driver so that the main processor and each microcontroller unit can communicate according to a specific protocol. The specific protocol can be defined by a person skilled in the art according to actual needs. For example, a specific IPC (InterProcess Communication) communication protocol can be defined, and the protocol driver is named IPC driver. Exemplarily, the specific IPC communication protocol can be defined based on the data structure of a ringbuffer so that the memory in the chip shared by the main processor and multiple engine units can store the data sent and received in the communication to achieve memory sharing.

[0058] The chip uses DDR SDRAM (Double Data Rate SDRAM) as the internal memory. The DDR SDRAM is pre-stored with a channel driver. Those skilled in the art can select other types of memory as needed. This embodiment does not limit the specific memory used. Each PU has its own number, which is 0, 1, 2, and 3. The number is also the engine unit identifier of the engine unit where each PU is located. The DDR pre-stores the channel driver IPC driver. After the chip is started, the IPC driver is loaded to generate the transmission channels between the main processor and each engine unit, namely, transmission channel 0, transmission channel 1, transmission channel 2, and transmission channel 3.

[0059] After the transmission channel is generated, data transmission between the main processor and the engine unit, for example, the main processor sends a data packet or a recovery instruction to the micro control unit, and the micro control unit sends processing unit operation information to the main processor, can be sent and received through the transmission channel.

[0060] In one example, the data packet for data transmission between the main processor and the engine unit carries the engine unit identifier of the corresponding engine unit. The engine unit identifier is used to identify the destination or source engine unit of the data packet.

[0061] In actual implementation, the data packet includes the engine unit identifier, and the main processor determines the transmission channel through the engine unit identifier so that the data packet is sent to the micro control unit through the transmission channel. For example, when the business program application needs to use the PU numbered 2 to process the relevant algorithm, the engine unit identifier of the data packet can be set to 2. When the main processor sends the data packet, it sends the data packet to the micro control unit in the engine unit with the engine unit identifier of 2 through the transmission channel 2 according to the engine unit identifier in the data packet.

[0062] The service data in the data packet in this example can be the address of the data used by the service algorithm in the memory. For example, if the main processor needs to send a picture to the engine unit, it can send the address of the picture in the chip memory to the engine unit through a data packet instead of sending the code describing the picture to the engine unit. The chip memory is a storage space shared by the main processor and multiple PUs. Figure 2 The PU can find the code describing the picture in the DDR SDRAM according to the address of the picture, and obtain the information of the picture for subsequent operations. The space occupied by the address is obviously much smaller than the code describing the picture, making the communication between the main processor and the engine unit more efficient and faster.

[0063] After receiving the data packet, the microcontroller unit writes the service data in the data packet into the register of the PU, controls the PU to execute the service data, and can also judge the operation status of the PU, and package the operation data generated by the PU itself and the judgment result of the operation status of the PU into processing unit operation information, and send it to the main processor through the transmission channel with the main processor. For example, using the above example, the microcontroller unit sends the service execution result to the main processor through the transmission channel 2 with the main processor.

[0064] The processing unit operation information returned by the microcontroller unit to the main processor may also include a corresponding engine unit identifier, so that when the main processor receives the processing unit operation information, it can identify which processing unit the processing unit operation information specifically comes from based on the engine unit identifier; for example, the processing unit operation information may not include the corresponding engine unit identifier, and the main processor can determine which processing unit the processing unit operation information specifically comes from by receiving the transmission channel of the processing unit operation information, and mark the processing unit operation information with the corresponding engine unit identifier to facilitate data communication between the main processor and the microcontroller unit in subsequent steps.

[0065] It should be noted that after the PU executes the relevant algorithm instructions, the obtained operating data can be stored in the chip memory. The business execution result can also be the address of the operating data in the chip memory. For example, the PU can perform scene segmentation processing on an image to obtain a scene segmentation map, and store the code describing the scene segmentation map into the chip memory. The business execution result carries the address of the code instead of carrying the code that fully describes the scene segmentation map.

[0066] The main processor feeds back the received processing unit operation information to the business application program, and the business application program can obtain the required operation data of the processing unit after executing the algorithm instruction from the processing unit operation information, and determine whether the processing unit is operating abnormally.

[0067] When the processing unit operation information indicates that the processing unit is operating abnormally, the main processor can call a restart function preset in the driver operation program to send a recovery instruction to the micro control unit. The recovery instruction can also include an engine unit identifier. When the main processor sends the recovery instruction to the micro control unit, it is sent through the transmission channel corresponding to the engine unit identifier.

[0068] The micro control unit receives the recovery instruction through the transmission channel between the micro control unit and the main processor, and restarts the processing unit by setting the register of the processing unit according to the instruction of the recovery instruction, or restarts the engine unit.

[0069] In another embodiment, the main processor is further configured to receive a recovery result of the recovery instruction returned by the micro control unit; in response to the recovery result of the recovery instruction indicating that the processing unit cannot be recovered, resend the recovery instruction to the micro control unit.

[0070] After the microcontroller unit restarts the processing unit, it can return the recovery result of the processing unit, that is, the result after the restart, to the main processor. If the processing unit is restored to a normal state after the restart, the recovery result of the recovery instruction is that the processing unit is successfully restored; if the processing unit is still in an abnormal state after the restart, the recovery result of the recovery instruction is that the processing unit cannot be restored.

[0071] When the recovery result of the recovery instruction is that the processing unit is successfully restored, the main processor can continue to send data packets to the micro control unit, which may include algorithm instructions and intermediate running data that have not been executed before restart, so that the micro control unit controls the processing unit to continue executing the interrupted business process.

[0072] When the recovery result of the recovery instruction is that the processing unit cannot be recovered, the main processor can resend the recovery instruction to the micro control unit to try to recover the processing unit. When the recovery instruction sent to a micro control unit reaches a preset threshold, the main processor can restart the entire chip.

[0073] In this example, after a single recovery of the processing unit fails, you can try to recover it again, which increases the probability of successful recovery. After the single-channel processing unit is recovered, the business process before the exception occurs can continue to be executed, eliminating the step of starting the business process from the beginning, which is more convenient to use.

[0074] The embodiment of the present disclosure also provides a method for recovering a processing unit, which is applied to a main processor in a chip, wherein the chip includes a main processor and a plurality of engine units, each of which includes a processing unit and a microcontroller unit for controlling the processing unit, such as Figure 3 As shown, the method includes the following steps. The specific execution actions of the main processor have been described in detail in the above embodiment and will not be repeated here:

[0075] In step 302, a data packet is sent to the micro control unit, wherein the data packet includes service data to be executed.

[0076] In one example, a transmission channel is respectively provided between the main processor and each engine unit; the transmission channel is used for data transmission between the main processor and the engine unit corresponding to the transmission channel.

[0077] Before this step, the main processor may load a channel driver to generate transmission channels between the main processor and each engine unit.

[0078] In one example, a data packet used for data transmission between the main processor and the engine unit carries an engine unit identifier of the corresponding engine unit.

[0079] In one example, the chip further includes a DDR SDRAM, in which a channel driver is pre-stored.

[0080] In step 304, the processing unit operation information sent by the micro control unit in the engine unit is received.

[0081] In one example, the main processor may receive the service execution result sent by the micro control unit on the engine unit through the generated transmission channel.

[0082] In one example, the processing unit operation information includes at least one of the following: a business execution result of the processing unit, and a judgment result of the microcontroller unit on the operation status of the processing unit. The business execution result is the operation result after the processing unit executes the business data.

[0083] In step 306, in response to the processing unit operation information indicating that the processing unit operates abnormally, a recovery instruction is sent to the micro control unit, wherein the recovery instruction is used to instruct the micro control unit to recover the processing unit.

[0084] In one example, the corresponding transmission channel may be identified by the engine unit, and the main processor may send a recovery instruction to the micro control unit.

[0085] In one example, the main processor may receive a recovery result of the recovery instruction returned by the micro control unit, and in response to the recovery result of the recovery instruction indicating that the processing unit cannot be recovered, resend the recovery instruction to the micro control unit.

[0086] The processing unit recovery method provided in the embodiment of the present disclosure configures a micro control unit for each processing unit in the chip, and the micro control unit controls the processing unit. It can automatically recover the processing unit with an abnormal situation in a single path, and there is no need to restart the entire chip system so that the business processes of the processing units in other paths can continue to run, which can save the time wasted by restarting the entire chip system.

[0087] The embodiment of the present disclosure also provides a method for recovering a processing unit in a chip, the method being applied to a microcontroller unit in the chip, the chip comprising a main processor and a plurality of engine units, each engine unit comprising a processing unit and a microcontroller unit for controlling the processing unit, such as Figure 4 As shown, the method includes the following steps. The specific execution actions of the microcontroller unit have been described in detail in the above embodiment and will not be repeated here:

[0088] In step 402, a data packet sent by the main processor is received, wherein the data packet includes service data to be executed.

[0089] In one example, a transmission channel is provided between the main processor and each engine unit; the transmission channel is used for data transmission between the main processor and the engine unit corresponding to the transmission channel. The micro control unit can receive a data packet sent by the main processor through the transmission channel between the main processor and the engine unit.

[0090] In one example, a data packet used for data transmission between the main processor and the engine unit carries an engine unit identifier of the corresponding engine unit.

[0091] In step 404, the control processing unit executes the service data and returns the processing unit operation information to the main processor.

[0092] In one example, the processing unit operation information includes at least one of the following: a business execution result of the processing unit, and a judgment result of the microcontroller unit on the operation status of the processing unit, wherein the business execution result is the operation result after the processing unit executes the business data.

[0093] In step 406, in response to receiving the recovery instruction sent by the main processor, the processing unit is recovered.

[0094] In one example, the micro control unit may receive the recovery instruction sent by the main processor through a transmission channel between the main processor and the engine unit.

[0095] The processing unit recovery method provided in the embodiment of the present disclosure configures a micro control unit for each processing unit in the chip, and the micro control unit controls the processing unit. It can automatically recover the processing unit with an abnormal situation in a single path, and there is no need to restart the entire chip system so that the business processes of the processing units in other paths can continue to run, which can save the time wasted by restarting the entire chip system.

[0096] The embodiment of the present disclosure provides a method for recovering a processing unit. The method is applied to a chip. The chip includes a main processor and multiple engine units. Each engine unit includes a processing unit and a microcontroller unit for controlling the processing unit. Figure 5 As shown, the method includes the following steps. The functions of the main processor and the micro control unit are referred to the above embodiments and will not be repeated here.

[0097] In step 502, the main processor receives the processing unit operation information sent by the micro control unit in the engine unit.

[0098] In one example, the processing unit operation information includes at least one of the following: a business execution result of the processing unit, and a judgment result of the microcontroller unit on the operation status of the processing unit, wherein the business execution result is the operation result after the processing unit executes the business data.

[0099] In one example, before this step, the main processor is also used to load a channel driver program to generate transmission channels between the main processor and each of the engine units.

[0100] In one example, the chip further includes a DDR SDRAM, in which a channel driver is pre-stored.

[0101] In one example, a transmission channel is respectively provided between the main processor and each engine unit; the transmission channel is used for data transmission between the main processor and the engine unit corresponding to the transmission channel.

[0102] In one example, before this step, the main processor is also used to send a data packet to the micro control unit, wherein the data packet includes business data to be executed; the micro control unit is also used to receive the data packet sent by the main processor, control the processing unit to execute the business data, and return the processing unit operation information to the main processor.

[0103] In one example, a data packet used for data transmission between the main processor and the engine unit carries an engine unit identifier of the corresponding engine unit.

[0104] In step 504, in response to the processing unit operation information indicating that the processing unit operates abnormally, the main processor sends a recovery instruction to the micro control unit, wherein the recovery instruction is used to instruct the micro control unit to restart the processing unit.

[0105] In step 506, the micro control unit receives the recovery instruction and recovers the processing unit.

[0106] In one example, the main processor is further configured to receive a recovery result of the recovery instruction returned by the micro control unit; in response to the recovery result of the recovery instruction indicating that the processing unit cannot be recovered, resend the recovery instruction to the micro control unit.

[0107] The processing unit recovery method provided in the embodiment of the present disclosure configures a micro control unit for each processing unit in the chip, and the micro control unit controls the processing unit. It can automatically recover the processing unit with an abnormal situation in a single path, and there is no need to restart the entire chip system so that the business processes of the processing units in other paths can continue to run, which can save the time wasted by restarting the entire chip system.

[0108] An embodiment of the present disclosure further provides an electronic device, which includes a chip, and the chip is the chip described in any embodiment of the present disclosure.

[0109] An embodiment of the present disclosure further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method for recovering the processing unit described in any embodiment of the present disclosure is implemented.

[0110] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. Ordinary technicians in this field can understand and implement it without paying creative work.

[0111] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0112] Those skilled in the art will readily appreciate other embodiments of the specification after considering the specification and practicing the invention claimed herein. The specification is intended to cover any variations, uses or adaptations of the specification that follow the general principles of the specification and include common knowledge or customary techniques in the art that are not claimed in the specification. The specification and examples are to be considered exemplary only, and the true scope and spirit of the specification are indicated by the following claims.

[0113] It should be understood that the present description is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.

[0114] The above description is only a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this specification should be included in the scope of protection of this specification.

Claims

1. A chip, It is characterized in that The chip includes: a main processor and a plurality of engine units, each engine unit includes a processing unit and a micro control unit for controlling the processing unit; The main processor is used to receive the processing unit operation information sent by the micro control unit in the engine unit; In response to the processing unit operation information indicating that the processing unit operates abnormally, sending a recovery instruction to the micro control unit, wherein the recovery instruction is used to instruct the micro control unit to recover the processing unit; Each of the micro control units is used to restore the processing unit in response to receiving a restore instruction sent by the main processor; The main processor is further used to send a data packet to the micro control unit, wherein the data packet includes service data to be executed; The micro control unit is also used to receive the data packet sent by the main processor, control the processing unit to execute the service data, and return the processing unit operation information to the main processor.

2. The chip according to claim 1, It is characterized in that The processing unit operation information includes at least one of the following: a business execution result of the processing unit, and a judgment result of the micro control unit on the operation status of the processing unit. The business execution result is the operation result after the processing unit executes the business data.

3. The chip according to any one of claims 1 to 2, It is characterized in that Transmission channels are respectively arranged between the main processor and the plurality of engine units; the transmission channels are used for data transmission between the main processor and the engine units corresponding to the transmission channels.

4. The chip according to claim 3, It is characterized in that The data packet used for data transmission between the main processor and the engine unit carries the engine unit identification of the corresponding engine unit.

5. The chip according to claim 1, It is characterized in that The main processor is also used to load a channel driver program to generate transmission channels between the main processor and each of the engine units.

6. The chip according to claim 5, It is characterized in that The chip further comprises a double data rate synchronous dynamic random access memory DDR SDRAM, in which a channel driving program is pre-stored.

7. The chip according to any one of claims 1 to 6, It is characterized in that The main processor is further used to receive the recovery result of the recovery instruction returned by the micro control unit; In response to the recovery result of the recovery instruction indicating that the processing unit cannot be recovered, the recovery instruction is resent to the micro control unit.

8. A method for recovering a processing unit, It is characterized in that The chip includes a main processor and a plurality of engine units, each engine unit includes the processing unit and a micro control unit for controlling the processing unit, the method is applied to the main processor, and the method includes: Sending a data packet to the micro control unit, wherein the data packet includes service data to be executed; receiving the processing unit operation information sent by the micro control unit in the engine unit, wherein the processing unit operation information is generated after the micro control unit controls the processing unit to execute the service data; In response to the processing unit operation information indicating that the processing unit operates abnormally, a recovery instruction is sent to the micro control unit, wherein the recovery instruction is used to instruct the micro control unit to restore the processing unit.

9. A method for recovering a processing unit, It is characterized in that The chip includes a main processor and a plurality of engine units, each engine unit includes the processing unit and a micro control unit for controlling the processing unit, the method is applied to the micro control unit, and the method includes: receiving a data packet sent by the main processor, wherein the data packet includes service data to be executed; Controlling the processing unit to execute the service data and returning the processing unit operation information to the main processor; In response to receiving a recovery instruction sent by the main processor, the processing unit is recovered.

10. A method for recovering a processing unit, It is characterized in that The method is applied to a chip, the chip includes a main processor and a plurality of engine units, each engine unit includes the processing unit and a micro control unit for controlling the processing unit; the method includes: The main processor sends a data packet to the micro control unit, wherein the data packet includes the service data to be executed; The micro control unit receives the data packet sent by the main processor, controls the processing unit to execute the service data, and returns the processing unit operation information to the main processor; The main processor receives the processing unit operation information sent by the micro control unit in the engine unit; In response to the processing unit operation information indicating that the processing unit operates abnormally, the main processor sends a recovery instruction to the micro control unit, wherein the recovery instruction is used to instruct the micro control unit to restart the processing unit; The micro control unit receives the recovery instruction and recovers the processing unit.

11. An electronic device, It is characterized in that The device comprises a chip, and the chip is the chip according to any one of claims 1 to 7.

12. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the method according to any one of claims 8 to 10 is implemented.