Abnormal request processing method, chip and electronic equipment

Exception requests are processed through the matching relationship between the processor and the alarm controller, which solves the problems of low exception request processing speed and large CPU resource usage in the existing technology, and achieves more efficient exception request processing and chip reliability.

CN118733404APending Publication Date: 2024-10-01CHENGDU CHIPSEA INNOVATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410880047.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

In the existing circuit design, the exception request processing process requires CPU resources, resulting in low processing speed and inability to effectively handle special abnormal conditions, such as clock failure, causing the chip to freeze.

Method used

By determining the matching relationship between different types of exception requests and the processor and alarm controller, the processor and alarm controller handle different types of exception requests respectively and generate exception processing results. The processor intermittently obtains the processing information from the alarm controller. As a result, CPU intervention and resource usage are reduced.

Benefits of technology

It improves the processing speed of exception requests, reduces the intervention time and resource occupation of the processor, enhances the performance of the processor, and improves the reliability of interrupt processing and the real-time response capability of the chip.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733404A_ABST
    Figure CN118733404A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an abnormal request processing method, a chip and electronic equipment, and the method comprises the steps: determining the matching relation between different types of abnormal requests and a processor, and the matching relation between the different types of abnormal requests and an alarm controller, and enabling the processor and the alarm controller to process the different types of abnormal requests according to the matching relation. According to the invention, the alarm controller can share part of the abnormal requests, and compared with a processor for processing all the abnormal requests, the processing speed of the abnormal requests can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic circuit technology, and in particular to an abnormal request processing method, a chip and an electronic device. Background Art

[0002] In circuit design, in order to ensure the reliability of the circuit and prevent jamming, for some abnormal scenarios, a corresponding interrupt signal is usually generated. The corresponding module generates an interrupt request corresponding to the interrupt signal according to the interrupt processing flow (determining the source and priority of the interrupt signal) and sends the interrupt request to the central processing unit (CPU).

[0003] After the CPU detects an interrupt request, it determines which of the currently executed instructions and the interrupt request has a higher priority. If the interrupt request has a higher priority, it stops the currently executed instruction and processes the interrupt transaction corresponding to the interrupt request. After the processing is completed, it returns to the original process.

[0004] However, this processing flow not only occupies CPU resources, but also requires interactive processing of currently executed instructions and interrupt transactions, which seriously reduces the processing speed of interrupt transactions. Summary of the invention

[0005] The embodiments of the present application provide an abnormal request processing method, a chip, and an electronic device to alleviate the technical problem of low processing speed of abnormal requests.

[0006] In a first aspect, an embodiment of the present application provides an exception request processing method, which includes: determining the matching relationship between different types of exception requests and the processor and the alarm controller; according to the matching relationship, the processor and the alarm controller respectively process the corresponding different types of exception requests and generate corresponding exception processing results; the processor intermittently obtains the exception processing results from the alarm controller.

[0007] In a second aspect, an embodiment of the present application further provides a chip that executes the above-mentioned abnormal request processing method.

[0008] In a third aspect, an embodiment of the present application further provides an electronic device, which includes a device body and the above-mentioned chip disposed in the device body.

[0009] The exception request processing method, chip and electronic device provided in the embodiments of the present application determine the matching relationship between different types of exception requests and the processor and the alarm controller. According to the matching relationship, the processor and the alarm controller respectively process the corresponding different types of exception requests and generate corresponding exception processing results. The alarm controller can share some of the exception requests, which can improve the processing speed of the exception requests compared to the processor processing all the exception requests.

[0010] Furthermore, by having the processor intermittently obtain exception processing results from the alarm controller, not only can the processor obtain all exception processing results, which is the same as the processor processing all exception requests and obtaining all exception processing results, but the processor also obtains the exception processing results intermittently. Therefore, this can reduce the processor's intervention time and reduce the processor's resource usage, which is beneficial to improving the processor's performance.

[0011] These and other aspects of the present application will become more clearly understood in the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0013] Figure 1 A flow chart of an abnormal request processing method provided in an embodiment of the present application is shown.

[0014] Figure 2 A schematic flow chart of step S10 is shown.

[0015] Figure 3 A schematic flow chart of step S20 is shown.

[0016] Figure 4 A schematic flow chart of step S22 is shown.

[0017] Figure 5 A schematic flow chart of step S223 is shown.

[0018] Figure 6 A first flow chart of step S2231 is shown.

[0019] Figure 7 A second flow chart of step S2231 is shown.

[0020] Figure 8 A third flow chart of step S2231 is shown.

[0021] Fig. 9 A fourth flow chart of step S2231 is shown.

[0022] Fig.10 A schematic flow chart of step S2232 is shown.

[0023] Fig.11A schematic diagram of the structure of the alarm status bit is shown.

[0024] Fig.12 A fifth flow chart of step S2231 is shown.

[0025] Fig.13 A schematic diagram of the alarm processing flow is shown.

[0026] Fig.14 A schematic diagram of synchronous alarm is shown.

[0027] Fig.15 A schematic diagram of a chip provided in an embodiment of the present application is shown.

[0028] Fig.16 A schematic diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0029] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.

[0030] In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.

[0031] In the embodiments of the present application, it should be noted that, in this article, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.

[0032] Moreover, the terms "comprises," "comprising," or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0033] In the description of the embodiments of the present application, words such as "example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "example" or "for example" in the embodiments of the present application is not to be interpreted as being more preferred or having more advantages than another embodiment or design. The use of words such as "example" or "for example" is intended to present relative concepts in a clear manner.

[0034] In addition, the "plurality" in the embodiments of the present application refers to two or more than two. In view of this, in the embodiments of the present application, "plurality" can also be understood as "at least two". "At least one" can be understood as one or more, for example, one, two or more. For example, including at least one means including one, two or more, and there is no limit on which ones are included. For example, including at least one of A, B and C, then A, B, C, A and B, A and C, B and C, or A, B and C can be included.

[0035] It should be noted that, in the embodiments of the present application, "and / or" describes the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / ", unless otherwise specified, generally indicates that the associated objects before and after are in an "or" relationship.

[0036] It should be noted that in the embodiments of the present application, "connection" can be understood as electrical connection, and the connection between two electrical components can be a direct or indirect connection between the two electrical components. For example, the connection between A and B can be either a direct connection between A and B or an indirect connection between A and B through one or more other electrical components.

[0037] In circuit design, in order to ensure the reliability of the circuit and prevent jamming, for some abnormal scenarios, a corresponding interrupt signal is usually generated. The corresponding module generates an interrupt request corresponding to the interrupt signal according to the interrupt processing flow (determining the source and priority of the interrupt signal) and sends the interrupt request to the central processing unit (CPU).

[0038] In a system on chip (SoC), after the CPU detects an interrupt request, it determines which of the currently executed instruction and the interrupt request has a higher priority. If the interrupt request has a higher priority, the currently executed instruction is stopped and the interrupt transaction corresponding to the interrupt request is processed. After the processing is completed, the original process is returned.

[0039] However, for high reliability and real-time fast response usage scenarios, this interrupt handling process takes a long time to process and requires CPU intervention, which affects the performance of the chip. There is no reliability monitoring design for the interrupt handling process, which cannot reflect the reliability of the interrupt handling process. In addition, for special exceptions such as clock failure, when there is no clock, there is a situation where the interrupt cannot be sent or the CPU runs incorrectly, which cannot be handled by the interrupt handling process alone.

[0040] In the past, ordinary interrupt processing procedures can handle abnormal conditions that do not affect chip operation, such as register illegal writing and cyclic redundancy check (CRC) errors. However, for special abnormal conditions such as clock failure, the CPU will not work, making it impossible to close the loop of the processing flow that previously required CPU intervention, resulting in chip jamming.

[0041] In each embodiment of the present application, all abnormal states are classified. The first type of abnormal state is a state that does not affect the normal operation of the chip, such as register illegal writing and CRC error. The second type of abnormal state is a state that affects the normal operation of the chip, such as clock failure, abnormal temperature over-high, and voltage under / over-high. For the first type of abnormal state, it is still processed by the interrupt processing flow; for the second type of abnormal state, it is no longer processed by the interrupt processing flow, but all the alarm class requests corresponding to the second type of abnormal state are sent to the alarm controller (alarm control module, ALM). The response to the alarm class request is no longer processed by the CPU, but is completed separately in the alarm controller. At the same time, the second type of abnormal state is saved in the ALM, reducing the CPU intervention time, so that the CPU can continue to complete the corresponding instructions. The CPU only needs to query the corresponding alarm history status in the alarm history status register at intervals to obtain whether an alarm event has occurred during this period of time, and whether the response behavior corresponding to the alarm event is triggered normally.

[0042] This embodiment of the present application provides a method 100 for handling abnormal requests. Figures 1 to 14 ,like Figure 1 As shown, the abnormal request processing method 100 includes the following steps:

[0043] Step S10: Determine the matching relationship between different types of abnormal requests and the processor and alarm controller.

[0044] Step S20: According to the matching relationship, the processor and the alarm controller process the corresponding different types of exception requests respectively, and generate corresponding exception processing results.

[0045] Step S30: The processor intermittently obtains the exception processing result from the alarm controller.

[0046] It can be understood that the exception request processing method 100 provided in the embodiment of the present application, by determining the matching relationship between different types of exception requests and the processor and the alarm controller, the processor and the alarm controller respectively process the corresponding different types of exception requests according to the matching relationship, and generate corresponding exception processing results. The alarm controller can share part of the exception requests, which can improve the processing speed of the exception requests compared to the processor processing all the exception requests.

[0047] Furthermore, by having the processor intermittently obtain exception processing results from the alarm controller, not only can the processor obtain all exception processing results, which is the same as the processor processing all exception requests and obtaining all exception processing results, but the processor also obtains the exception processing results intermittently. Therefore, this can reduce the processor's intervention time and reduce the processor's resource usage, which is beneficial to improving the processor's performance.

[0048] It should be noted that the processor may be a CPU, an MCU, a GPU or a digital signal processor (DSP), etc. The alarm controller may also be referred to as an alarm control module.

[0049] The abnormal request includes an interruption type request and an alarm type request. The interruption type request is generated according to the first type of abnormal state. The alarm type request is generated according to the second type of abnormal state.

[0050] In one embodiment, if Figure 2 As shown, step S10 includes the following steps:

[0051] Step S11: Determine whether the interruption request matches the processor, so as to allocate the interruption request to the processor.

[0052] Step S12: Determine whether the alarm request matches the alarm controller, so as to allocate the alarm request to the alarm controller.

[0053] It should be noted that matching interrupt requests with processors and matching alarm requests with alarm controllers can be achieved through preset. Allocating interrupt requests to processors and allocating alarm requests to alarm controllers can also be achieved through preset.

[0054] In one embodiment, the exception handling result includes an interruption type handling result and an alarm type handling result. Figure 3 As shown, step S20 includes the following steps:

[0055] Step S21: The processor receives and processes an interruption request, and generates an interruption processing result.

[0056] Step S22: The alarm controller receives and processes the alarm request, and generates an alarm processing result.

[0057] It should be noted that this can replace the alarm type requests that the processor originally needs to process through the alarm controller, which can increase the processing speed of abnormal requests compared to the processor processing all abnormal requests.

[0058] In one embodiment, the alarm controller includes a first alarm control module located in the first domain and a second alarm control module located in the second domain. Figure 4 As shown, step S22 includes the following steps:

[0059] Step S221: One of the first alarm control module and the second alarm control module receives an alarm class request originating from the first domain or the second domain.

[0060] Step S222: One of the first alarm control module and the second alarm control module synchronizes the alarm class request to the other of the first alarm control module and the second alarm control module.

[0061] Step S223: The first alarm control module and the second alarm control module both process at least part of the alarm request and generate an alarm processing result.

[0062] It should be noted that by synchronizing alarm requests between the first alarm control module and the second alarm control module and doubly processing at least part of the alarm requests by the first alarm control module and the second alarm control module, the processing reliability of the alarm requests can be improved.

[0063] In one embodiment, if Figure 5 As shown, step S223 includes:

[0064] Step S2231: The first alarm control module processes at least part of the alarm type request according to the first alarm processing flow.

[0065] Step S2232: the second alarm control module processes at least part of the alarm request according to a second alarm processing flow, where the second alarm processing flow is different from the first alarm processing flow.

[0066] It should be noted that setting different alarm processing procedures in the first alarm control module and the second alarm control module can not only improve the processing reliability of alarm requests, but also make the algorithm for achieving the reliability simpler by simplifying one of the alarm processing procedures.

[0067] In one embodiment, if Figure 6 As shown, step S2231 includes the following steps:

[0068] Step S22311: Determine whether the alarm status bit of the response behavior corresponding to the alarm type request is set.

[0069] Step S22312: When the alarm status bit is set, the processing of the alarm class request is terminated.

[0070] Step S22313: When the alarm status bit is not set, execute the response behavior corresponding to the alarm type request.

[0071] Step S22314: Set the alarm status bit.

[0072] It should be noted that the alarm status bit is used to indicate whether the response behavior corresponding to the alarm request has been executed. For example, the alarm status bit is set to indicate that the response behavior corresponding to the alarm request has been executed; the alarm status bit is not set to indicate that the response behavior corresponding to the alarm request has not been executed.

[0073] In one embodiment, if Figure 7 As shown, after step S22313, the following steps are also included:

[0074] Step S22315: The watchdog timer monitors whether the response behavior is executed normally.

[0075] Step S22316: Determine whether the external module turns off the watchdog timer within the time window.

[0076] Step S22317: If the external module does not turn off the watchdog timer within the time window, an alarm signal is output.

[0077] It should be noted that the start time of the response behavior is the start time of the watchdog timer. If the response behavior is completed within the time period set by the watchdog timer, it means that the response behavior is executed normally; or, if the response behavior is not completed within the time period set by the watchdog timer, it means that the response behavior is not executed normally. This increases the reliability of monitoring whether the response behavior is executed normally.

[0078] Regardless of whether the response behavior is executed normally, under normal circumstances, the corresponding alarm processing results are generated. However, in some abnormal circumstances, the corresponding alarm processing results may not be generated. In this case, by judging whether the gatekeeper timer is turned off within the time window, it can be determined whether there is an abnormality in the output of the alarm processing results. If there is no output of the alarm processing results, it means that there is an abnormality, and then the alarm signal is output to the first alarm control module and the second alarm control module to handle the abnormality, thereby increasing reliability.

[0079] In one embodiment, if Figure 8 As shown, after step S22317, the following steps are also included:

[0080] Step S22319: When the response behavior corresponding to the alarm signal is a reset behavior, the alarm status bit is reset.

[0081] Step S22320: Copy the data in the alarm status bit to the alarm history status bit.

[0082] It should be noted that by monitoring the output time of the alarm processing results through the time window, it can be determined whether there is any abnormality in the output of the alarm processing results. If the alarm processing results are not output within the time window, it means that the alarm processing results are not output normally. In this case, the alarm status bit can be reset and the data in the alarm status bit can be copied to the alarm history status bit, so that the processor can query whether an alarm event has occurred within a period of time, and whether the corresponding response behavior is triggered normally.

[0083] In one embodiment, if Fig. 9 As shown, after step S22316, the following steps are also included:

[0084] Step S22318: When the external module turns off the watchdog timer within the time window, initialize the watchdog timer.

[0085] It should be noted that by monitoring the output time of the alarm processing results through the time window, it can be determined whether there is any abnormality in the output of the alarm processing results. If the alarm processing results are output within the time window, it means that not only the response behavior is executed normally, but also the alarm processing results are output normally. In this case, the watchdog timer can be initialized for the next monitoring.

[0086] In one embodiment, if Fig.10 As shown, step S2232 includes the following steps:

[0087] Step S22321: When the alarm status bit is not set, execute the response behavior corresponding to the alarm type request.

[0088] Step S22322: Set the alarm status bit.

[0089] It should be noted that the above steps S22311 to S222320 are the first alarm processing flow, and steps S22321 and S22322 in this embodiment are the second alarm processing flow. Compared with the first alarm processing flow, the second alarm processing flow is simplified, which can achieve the reliability of alarm processing through a simpler alarm processing flow.

[0090] In one embodiment, if Fig.11 As shown, the abnormal request processing method 100 further includes: configuring each response behavior corresponding to the abnormal request to be represented by a plurality of bits, at least part of the plurality of bits being set in different registers.

[0091] It should be noted that each response behavior can be represented by two bits, three bits or more bits. Fig.11 A response behavior represented by three bits is shown by way of example, for example, ALM0_CFG...ALM31_CFG, where ALM0_CFG represents a response behavior represented by the 0th bit in the first register AG1, the 0th bit in the second register AG2, and the 0th bit in the third register AG3...ALM31_CFG represents a response behavior represented by the 31st bit in the first register AG1, the 31st bit in the second register AG2, and the 31st bit in the third register AG3, and the same can be said for others. Compared with a response behavior represented by three consecutive bits in the same register, for example, the first register AG1 has a total of 32 bits, and three bits represent a response behavior, then two bits are idle because they cannot constitute three bits representing a response behavior, which results in a low utilization rate of the bits in the register and wastes storage space. The above embodiment can make full use of each bit in the register, and there will be no idle bits. And when the optional response behaviors configured increase, the selection can be increased by expanding the bit width of the register.

[0092] In other embodiments, each response behavior is represented by three bits as an example, two bits of which can be located in one register, and another bit of which can be located in another register, which can also make full use of each bit in the register, and there will be no idle bits. Alternatively, each response behavior is represented by four bits as an example, three bits of which can be located in one register, and another bit of which can be located in another register, which can also make full use of each bit in the register, and there will be no idle bits.

[0093] In one embodiment, if Fig.12 As shown, after step S22317, the following steps are also included:

[0094] Step S22323: configure the first domain and the second domain to be a digital voltage domain and a non-power-off domain respectively.

[0095] Step S22324: In response to receiving the alarm signal, the digital voltage domain generates a real-time alarm message.

[0096] Step S22325: The digital voltage domain transmits real-time alarm information to the non-power-off domain.

[0097] Step S22326: The non-power-off domain generates and outputs a response failure signal according to the real-time alarm information.

[0098] It should be noted that the first domain may also be an always on (AON) domain, and the second domain may also be a digital voltage domain. This embodiment is an exemplary description of the first domain being a digital voltage domain and the second domain being an always on domain. Among them, the real-time alarm information can only be transmitted from the digital voltage domain to the always on domain, rather than the traditional two-way transmission.

[0099] When an alarm is detected, the configured response behavior is triggered, and the internal watchdog timer is started. When the response behavior is completed, the external corresponding module turns off the watchdog timer. If the watchdog timer has not been turned off during the time window, a new alarm signal is triggered to the ALM to execute other new response behaviors. At the same time, a real-time alarm message is also generated to respond to the non-power-off domain, so that the chip 200 outside knows that there is a response failure inside the chip 200. After the external detection of the response failure signal output, the internal status bit can be queried to understand which abnormal behaviors have occurred and perform inspection tests.

[0100] Fig.13 The schematic diagram of the first alarm processing flow is shown. The content is as follows:

[0101] Alarm synchronization: Fig.14 As shown in the figure, when the digital voltage domain receives an alarm, it will synchronize the alarm to the non-power-off domain through the alarm synchronization operation. When the non-power-off domain receives an alarm, it will also synchronize the alarm to the digital voltage domain through the alarm synchronization operation. In this way, the digital voltage domain and the non-power-off domain synchronously process an alarm, which improves the reliability of alarm processing.

[0102] That is to say, in order to prevent the failure of each voltage domain to handle internal alarms, the alarms in each voltage domain can be transmitted to another voltage domain, and the two voltage domains process some alarms at the same time, such as clock alarms, CPU alarms, flash memory (FLASH) alarms, etc. in the digital voltage domain, temperature alarms, voltage alarms, clock alarms, etc. in the AON domain. The processing of these alarms must be guaranteed, because if such alarms are not handled in time, it will cause damage to chip 200 or chip 200 to get stuck.

[0103] Compare whether the current alarm status bit (AG) is set, that is, the content corresponding to step S22311.

[0104] The alarm processing is completed, which is the content corresponding to step S22312.

[0105] Execute the response behavior according to the configuration, that is, the content corresponding to step S22313.

[0106] Set the alarm status bit, which is the content corresponding to step S22313.

[0107] The timer (watchdog timer) monitors whether the response behavior is executed normally, which is the content corresponding to step S22315.

[0108] Whether the external module turns off the watchdog timer within the time window, that is, the content corresponding to step S22316.

[0109] Output the alarm signal to ALM, which is the content corresponding to step S22317.

[0110] Timer initialization, which is the content corresponding to step S22318.

[0111] Reset the alarm status bit (AG), which is the content corresponding to step S22319.

[0112] Copy AG to the alarm history status bit (AD), which is the content corresponding to step S22320.

[0113] It should be noted that the severity of alarm requests can be higher than that of interrupt requests. The digital voltage domain handles abnormal conditions of major functional modules, such as clock failure, clock frequency deviation, ECC check error, register single bit error flip, RAM / ROM failure, etc. The AON domain mainly handles abnormal conditions of voltage, temperature and some clocks, such as low / high temperature, high voltage, no flip of backup clock, etc.

[0114] In summary, the corresponding embodiments of the present application mainly plan the abnormal requests corresponding to different levels of abnormal states in advance, which are divided into interrupt type requests and alarm type requests. The CPU intervention can be eliminated in the alarm processing flow through the prior configuration of the software. After the alarm controller detects the alarm type request, it triggers the response behavior automatically, and combines with other voltage domains to realize synchronous processing of abnormal states with high severity levels, thereby increasing reliability.

[0115] At the same time, in the digital voltage domain, an internal watchdog timer is added to monitor the response behavior. When the response behavior is not triggered in time, the watchdog timer sends a new alarm to trigger a new additional response behavior, and at the same time, a real-time alarm message is generated to respond to the non-power-down domain. The non-power-down domain outputs a specific timing to the outside to let the chip 200 know that there is a response failure inside the chip 200. After the outside detects the output of the response failure signal, it can query the register to know what kind of failure has occurred.

[0116] The present application embodiment also provides a chip 200, such as Fig.15 As shown, the chip 200 executes the above-mentioned abnormal request processing method 100. A chip is also called an integrated circuit (IC), and the chip 200 can be, but is not limited to, a SoC (System on Chip) chip or a SIP (system in package) chip.

[0117] It can be understood that since the chip 200 provided in the embodiment of the present application executes the above-mentioned exception request processing method 100, it can also determine the matching relationship between different types of exception requests and the processor and the alarm controller. According to the matching relationship, the processor and the alarm controller respectively process the corresponding different types of exception requests and generate corresponding exception processing results. The alarm controller can share some of the exception requests, which can improve the processing speed of the exception requests compared to the processor processing all the exception requests.

[0118] Furthermore, by having the processor intermittently obtain exception processing results from the alarm controller, not only can the processor obtain all exception processing results, which is the same as the processor processing all exception requests and obtaining all exception processing results, but the processor also obtains the exception processing results intermittently. Therefore, this can reduce the processor's intervention time and reduce the processor's resource usage, which is beneficial to improving the processor's performance.

[0119] The present application embodiment also provides an electronic device 300, such as Fig.16 As shown, the electronic device 300 includes a device body and the above-mentioned chip 200 provided in the device body. The electronic device 300 can be, but is not limited to, a weight scale, a body fat scale, a nutrition scale, an infrared electronic thermometer, a pulse oximeter, a human body composition analyzer, a mobile power supply, a wireless charger, a fast charger, a car charger, an adapter, a display, a USB (Universal Serial Bus) docking station, a stylus, a true wireless headset, a car central control panel, a car, a smart wearable device, a mobile terminal, and a smart home device. Smart wearable devices include, but are not limited to, smart watches, smart bracelets, and cervical massagers. Mobile terminals include, but are not limited to, smart phones, laptops, tablet computers, and POS (point of sales terminal). Smart home devices include, but are not limited to, smart sockets, smart rice cookers, smart sweepers, and smart lights.

[0120] It can be understood that since the electronic device 300 provided in the embodiment of the present application includes the above-mentioned chip 200, it can also determine the matching relationship between different types of exception requests and the processor and the alarm controller, and the processor and the alarm controller can respectively process the corresponding different types of exception requests according to the matching relationship, and generate corresponding exception processing results. The alarm controller can share some of the exception requests, which can improve the processing speed of the exception requests compared to the processor processing all the exception requests.

[0121] Furthermore, by having the processor intermittently obtain exception processing results from the alarm controller, not only can the processor obtain all exception processing results, which is the same as the processor processing all exception requests and obtaining all exception processing results, but the processor also obtains the exception processing results intermittently. Therefore, this can reduce the processor's intervention time and reduce the processor's resource usage, which is beneficial to improving the processor's performance.

[0122] The above are only preferred embodiments of the present application, and are not intended to limit the present application in any form. Although the present application has been disclosed as above with preferred embodiments, it is not intended to limit the present application. Any technical personnel in the field can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present application. However, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present application without departing from the content of the technical solution of the present application are still within the scope of the technical solution of the present application.

Claims

1. A method for handling abnormal requests, characterized in that: The abnormal request processing method comprises: Determine the matching relationship between different types of abnormal requests and processors and alarm controllers; According to the matching relationship, the processor and the alarm controller respectively process corresponding different types of exception requests and generate corresponding exception processing results; The processor intermittently obtains the exception processing result from the alarm controller.

2. The abnormal request processing method according to claim 1, characterized in that: The abnormal request includes an interruption type request and an alarm type request, and the determining of the matching relationship between different types of abnormal requests and the processor and the alarm controller includes: Determining that the interrupt class request matches the processor to allocate the interrupt class request to the processor; It is determined that the alarm type request matches the alarm controller to allocate the alarm type request to the alarm controller.

3. The abnormal request processing method according to claim 2, characterized in that: The exception processing result includes an interruption processing result and an alarm processing result. According to the matching relationship, the processor and the alarm controller respectively process corresponding exception requests of different types and generate corresponding exception processing results, including: The processor receives and processes the interruption class request, and generates the interruption class processing result; The alarm controller receives and processes the alarm request, and generates the alarm processing result.

4. The abnormal request processing method according to claim 3, characterized in that: The alarm controller includes a first alarm control module located in the first domain and a second alarm control module located in the second domain. The alarm controller receives and processes the alarm class request and generates the alarm class processing result, including: One of the first alarm control module and the second alarm control module receives the alarm class request originating from the first domain or the second domain; One of the first alarm control module and the second alarm control module synchronizes the alarm class request to the other of the first alarm control module and the second alarm control module; The first alarm control module and the second alarm control module both process at least part of the alarm request and generate the alarm processing result.

5. The abnormal request processing method according to claim 4, characterized in that: The first alarm control module and the second alarm control module both process at least part of the alarm class request and generate the alarm class processing result, including: The first alarm control module processes at least part of the alarm class request according to the first alarm processing flow; The second alarm control module processes at least part of the alarm type request according to a second alarm processing procedure, and the second alarm processing procedure is different from the first alarm processing procedure.

6. The abnormal request processing method according to claim 5, characterized in that: The first alarm control module processes at least part of the alarm request according to the first alarm processing flow, including: Determine whether the alarm status bit of the response behavior corresponding to the alarm class request is set; When the alarm status bit is set, ending the processing of the alarm class request; When the alarm status bit is not set, executing a response action corresponding to the alarm class request; The alarm status bit is set.

7. The abnormal request processing method according to claim 6, characterized in that: After executing the response action corresponding to the alarm class request when the alarm status bit is not set, the method further includes: A watchdog timer monitors whether the response behavior is executed normally; Determine whether the external module turns off the watchdog timer within the time window; When the external module does not turn off the watchdog timer within the time window, an alarm signal is output.

8. The abnormal request processing method according to claim 7, characterized in that: In the case where the external module does not turn off the watchdog timer within the time window, after outputting the alarm signal, the method includes: When the response behavior corresponding to the alarm signal is a reset behavior, resetting the alarm status bit; The data in the alarm status bit is copied to the alarm history status bit.

9. The abnormal request processing method according to claim 7, characterized in that: After determining whether the external module turns off the watchdog timer within the time window, the method further includes: In a case where the external module turns off the watchdog timer within the time window, the watchdog timer is initialized.

10. The abnormal request processing method according to claim 5, characterized in that: The other of the first alarm control module and the second alarm control module processes at least part of the alarm class request according to the second alarm processing flow, including: When the alarm status bit is not set, executing a response action corresponding to the alarm class request; The alarm status bit is set.

11. The abnormal request processing method according to any one of claims 6 to 10, characterized in that: The abnormal request processing method further includes: Each response behavior corresponding to the configuration exception request is represented by a plurality of bits, and at least part of the plurality of bits is set in different registers.

12. The abnormal request processing method according to claim 7, characterized in that: In the case where the external module does not turn off the watchdog timer within the time window, after outputting the alarm signal, the method further includes: Configure the first domain and the second domain to be a digital voltage domain and a non-power-off domain respectively; In response to receiving the alarm signal, the digital voltage domain generates a real-time alarm message; The digital voltage domain transmits the real-time alarm information to the non-power-off domain; The non-power-off domain generates and outputs a response failure signal according to the real-time alarm information.

13. A chip, characterized in that: The chip executes the abnormal request processing method according to any one of claims 1 to 12.

14. An electronic device, characterized in that: The electronic device comprises a device body and the chip as claimed in claim 13 disposed in the device body.