Interrupt overflow detection and debugging method, device, host and system

By detecting when the interrupt request queue is full on the smart device side, an interrupt overflow flag is generated and the overflow information is recorded, which solves the problem of interrupt overflow loss detection on smart devices and improves system stability and debugging efficiency.

CN118550774APending Publication Date: 2024-08-27SHANGHAI BIREN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410580090.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-10
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

Interrupt overflow and loss of smart devices cause negative impacts on software business logic, making it difficult to effectively detect and debug with existing technology.

Method used

Detect in real time whether the interrupt request queue is full on the device side, generate an interrupt overflow flag, store and send it to the host, record the overflow interrupt request through the interrupt overflow counter and register, cooperate with the client filter register to match, and realize the interrupt overflow information identification and debugging.

Benefits of technology

Quickly identify and store overflow interrupt requests, help analyze the reasons for interrupt overflow loss, improve system stability and reliability, and take timely measures to avoid subsequent overflows.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550774A
    Figure CN118550774A
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent equipment, and provides an interrupt detection and debugging method, equipment, a host and a system.The method comprises the steps that under the condition that it is detected that a first preset queue is full and a new interrupt request is received, the new interrupt request is determined to be an overflow interrupt request to be stored, and an interrupt overflow identifier is generated, the interrupt overflow identifier is used for representing that interrupt overflow loss occurs in the equipment, and the first preset queue is used for storing each received interrupt request; and storing the interrupt overflow identifier in a second preset queue, and sending the interrupt overflow identifier to a host, so that the host obtains the overflow interrupt request and performs debugging under the condition of receiving the interrupt overflow identifier. According to the method, the equipment, the host and the system provided by the invention, the interrupt overflow can be timely and accurately detected, and the lost interrupt can be efficiently debugged, so that the reason for the interrupt overflow and loss can be quickly found and repaired.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent devices, in particular to the technical field of detecting and debugging interrupt overflow loss of intelligent devices, and more particularly to an interrupt overflow detection and debugging method, device, host and system. Background Art

[0002] In smart devices, interrupts are an important communication mechanism used to send important notifications to the host. In order to effectively manage interrupts, a flow control mechanism is usually used. This mechanism implements interrupt flow control by allocating a certain amount of credit to each device client to ensure orderly processing of interrupts and avoid data congestion.

[0003] However, once a device client fails to strictly follow the flow control rules, the interrupt request sent to the interrupt controller may exceed the interrupt buffer capacity, resulting in interrupt overflow loss, which has a negative impact on the software business logic. Therefore, how to effectively detect and debug interrupt overflow loss of smart devices is an urgent problem to be solved. Summary of the invention

[0004] The present invention provides an interrupt overflow detection and debugging method, device, host and system, which are used to solve the defect that the loss of device interrupt overflow is not detected, resulting in a negative impact on software business logic.

[0005] The present invention provides an interrupt overflow detection and debugging method, comprising:

[0006] When it is detected that the first preset queue is full and a new interrupt request is received, the new interrupt request is determined as an overflow interrupt request for storage, and an interrupt overflow flag is generated, wherein the interrupt overflow flag is used to indicate that an interrupt overflow loss has occurred in the device, and the first preset queue is used to store each received interrupt request;

[0007] The interrupt overflow flag is stored in a second preset queue, and the interrupt overflow flag is sent to a host, so that the host obtains the overflow interrupt request and performs debugging when receiving the interrupt overflow flag.

[0008] According to an interrupt overflow detection and debugging method provided by the present invention, the step of determining the new interrupt request as an overflow interrupt request and storing the same comprises:

[0009] Determining the new interrupt request as an overflowed interrupt request;

[0010] Based on the overflowed interrupt request, the value of the interrupt overflow counter is updated, and the overflowed interrupt request is written into an interrupt overflow register, wherein the interrupt overflow counter and the interrupt overflow register are both set in the device.

[0011] According to an interrupt overflow detection and debugging method provided by the present invention, the new interrupt request is determined as an overflow interrupt request, including:

[0012] Obtaining pre-configured client identifiers from a client screening register, wherein the client screening register is provided in the device;

[0013] The client identifier carried in the new interrupt request is matched with each of the pre-configured client identifiers, and when the match succeeds, the new interrupt request is determined as the overflow interrupt request.

[0014] The present invention also provides an interrupt overflow detection and debugging method, comprising:

[0015] When receiving an interrupt overflow flag sent by a device, obtaining an overflow interrupt request from the device, and performing debugging based on the overflow interrupt request;

[0016] The interrupt overflow flag is generated and sent by the device when it detects that the first preset queue is full and receives a new interrupt request. The interrupt overflow flag is stored in a second preset queue within the device and is used to characterize that an interrupt overflow loss has occurred in the device. The overflow interrupt request is determined by the device based on the new interrupt request. The first preset queue is used to store each received interrupt request.

[0017] According to an interrupt overflow detection and debugging method provided by the present invention, the method further includes:

[0018] Determine interrupt overflow information based on the overflowed interrupt request, and send the interrupt overflow information to upper layer software;

[0019] An interrupt overflow counter, an interrupt overflow register and the second preset queue in the device are reset, the interrupt overflow counter is used to count the number of the overflowed interrupt requests, and the interrupt overflow register is used to store the overflowed interrupt requests.

[0020] The present invention also provides an interrupt overflow detection and debugging method, comprising:

[0021] When the device detects that the first preset queue is full and receives a new interrupt request, the device determines the new interrupt request as an overflow interrupt request for storage, and generates an interrupt overflow flag, wherein the interrupt overflow flag is used to indicate that an interrupt overflow loss has occurred in the device, and the first preset queue is used to store each received interrupt request;

[0022] storing the interrupt overflow flag in a second preset queue through the device, and sending the interrupt overflow flag to a host;

[0023] When the host receives the interrupt overflow flag, the host obtains the overflow interrupt request from the device and performs debugging based on the overflow interrupt request.

[0024] The present invention also provides an interrupt overflow detection and debugging device, comprising:

[0025] a detection unit, configured to, when detecting that the first preset queue is full and a new interrupt request is received, determine the new interrupt request as an overflow interrupt request for storage, and generate an interrupt overflow flag, wherein the interrupt overflow flag is used to indicate that an interrupt overflow loss has occurred in the device, and the first preset queue is used to store each received interrupt request;

[0026] The sending unit is used to store the interrupt overflow flag in a second preset queue, and send the interrupt overflow flag to the host, so that the host obtains the overflow interrupt request and performs debugging when receiving the interrupt overflow flag.

[0027] The present invention also provides an interrupt overflow detection and debugging device, comprising:

[0028] A debugging unit, configured to, upon receiving an interrupt overflow flag sent by a device, obtain an overflow interrupt request from the device, and perform debugging based on the overflow interrupt request;

[0029] The interrupt overflow flag is generated and sent by the device when it detects that the first preset queue is full and receives a new interrupt request. The interrupt overflow flag is stored in a second preset queue within the device and is used to characterize that an interrupt overflow loss has occurred in the device. The overflow interrupt request is determined by the device based on the new interrupt request. The first preset queue is used to store each received interrupt request.

[0030] The present invention also provides an interrupt overflow detection and debugging device, comprising:

[0031] a detection unit, configured to, when the device detects that the first preset queue is full and a new interrupt request is received, determine the new interrupt request as an overflow interrupt request for storage, and generate an interrupt overflow flag, wherein the interrupt overflow flag is used to indicate that an interrupt overflow loss has occurred in the device, and the first preset queue is used to store each received interrupt request;

[0032] a sending unit, configured to store the interrupt overflow flag in a second preset queue through the device, and send the interrupt overflow flag to a host;

[0033] The debugging unit is used to obtain the overflow interrupt request from the device through the host when receiving the interrupt overflow identifier, and perform debugging based on the overflow interrupt request.

[0034] The present invention also provides a device, comprising a client and an interrupt controller, wherein the client and the interrupt controller are in communication connection, and a first preset queue and a second preset queue are arranged in the interrupt controller;

[0035] The first preset queue is used to store each interrupt request sent by the client;

[0036] The interrupt controller is used to, when detecting that the first preset queue is full and receiving a new interrupt request sent by the client, determine the new interrupt request as an overflow interrupt request for storage, and generate an interrupt overflow flag, wherein the interrupt overflow flag is used to indicate that an interrupt overflow loss has occurred in the first preset queue;

[0037] The interrupt controller is further configured to store the interrupt overflow flag in the second preset queue, and send the interrupt overflow flag to the host, so that the host can obtain the overflow interrupt request and perform debugging when receiving the interrupt overflow flag.

[0038] According to a device provided by the present invention, an interrupt overflow counter and an interrupt overflow register are also provided in the interrupt controller;

[0039] The interrupt overflow counter is used to count the number of the overflowed interrupt requests;

[0040] The interrupt overflow register is used to store the overflowed interrupt request;

[0041] The interrupt controller is used to update the value of the interrupt overflow counter based on the overflowed interrupt request, and write the overflowed interrupt request into the interrupt overflow register.

[0042] The present invention also provides a host, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any one of the above interrupt overflow detection and debugging methods is implemented.

[0043] The present invention also provides an interrupt overflow detection and debugging system, comprising any of the above-mentioned devices and a host.

[0044] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the interrupt overflow detection and debugging method described in any one of the above is implemented.

[0045] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any one of the above interrupt overflow detection and debugging methods.

[0046] The interrupt overflow detection and debugging method, device, host and system provided by the present invention can timely and accurately identify the overflow interrupt request when the queue is full by detecting in real time whether the first preset queue is full at the device end, and store the overflow interrupt request for use in subsequent debugging, which is helpful to analyze the cause of interrupt overflow loss, quickly locate and solve the problem; when the interrupt overflow is detected, by generating an interrupt overflow mark and sending it to the host, the host can quickly know the occurrence of interrupt overflow loss, so as to take countermeasures in time and improve the stability and reliability of the system. In addition, by using the first preset queue and the second preset queue to store each interrupt request and interrupt overflow mark, it is helpful to effectively manage interrupts. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions in the present invention, a brief introduction will be given below to the drawings required for use in the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0048] Figure 1 It is a schematic diagram of a scenario in which a device provided by the present invention sends an interrupt request;

[0049] Figure 2 It is a structural schematic diagram of the interrupt overflow detection and debugging system provided by the present invention;

[0050] Figure 3 This is one of the flow charts of the interrupt overflow detection and debugging method provided by the present invention;

[0051] Figure 4 This is the second flow chart of the interrupt overflow detection and debugging method provided by the present invention;

[0052] Figure 5 This is the third flow chart of the interrupt overflow detection and debugging method provided by the present invention;

[0053] Figure 6 This is one of the structural schematic diagrams of the interrupt overflow detection and debugging device provided by the present invention;

[0054] Figure 7 This is the second structural schematic diagram of the interrupt overflow detection and debugging device provided by the present invention;

[0055] Figure 8 This is the third structural schematic diagram of the interrupt overflow detection and debugging device provided by the present invention;

[0056] Fig. 9 It is a structural schematic diagram of the device provided by the present invention;

[0057] Fig.10 It is a structural schematic diagram of the host provided by the present invention. DETAILED DESCRIPTION

[0058] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0059] Figure 1 Schematic diagram of a scenario in which a device provided by the present invention sends an interrupt request, such as Figure 1As shown, in this scenario, the overall system architecture may include devices and hosts, wherein the devices may be intelligent devices, artificial intelligence chips, such as GPU (Graphics Processing Unit), GPGPU (General-Purpose Graphics Processing Unit), TPU (Tensor Processing Unit), etc.; the host may be a central processing unit or computer connected to the device, such as CPU (Central Processing Unit), microprocessor, etc., for receiving, processing and responding to information and requests from the device. The device is provided with a client and an interrupt controller, wherein the client may be a device or component connected to the interrupt controller, such as various peripherals, sensors, processors, etc. There may be multiple clients in the device, each client representing an independent device or functional module. The interrupt controller is a component in the intelligent device responsible for managing and processing interrupts. Each client may communicate with the interrupt controller, and the client is responsible for generating interrupt requests and sending interrupt requests to the interrupt controller. The interrupt controller receives interrupt requests from the client, saves these interrupt requests, and sends them to the host for processing according to certain priorities or rules.

[0060] It can be understood that an interrupt request is a signal sent by an interrupt source (such as a client of a device, software exception, etc.) to notify the host that an interrupt event has occurred, and the host needs to suspend the currently executing program to handle the interrupt. When the interrupt request is responded to by the host, the host can find the service program that handles the interrupt according to the interrupt vector, and jump to the corresponding program for processing. Here, the interrupt vector refers to the entry address of the interrupt service program, which provides the address information of the interrupt service program, so that the host can jump to the corresponding program for processing. The interrupt vector is usually stored in the interrupt vector table, which is a data structure containing multiple interrupt vectors, each of which corresponds to a specific interrupt source or interrupt type. When the host receives an interrupt request, it will search the interrupt vector table for the corresponding interrupt vector according to the interrupt source or interrupt type carried in the interrupt request, and then jump to the address pointed to by the interrupt vector to execute the interrupt service program.

[0061] When a device sends an interrupt request, it usually enables a flow control mechanism, that is, a certain number of credits is configured for each client. When a client sends an interrupt request to the interrupt controller, a credit is consumed. If the credit is exhausted, the interrupt request sent by the client will be back-pressured and cannot be sent further. Here, back pressure refers to a mechanism that prevents the interrupt sender from sending interrupts too quickly, causing the receiver to be unable to process them in time. The interrupt controller usually sets up a FIFO (First-In-First-Out) queue to store all client interrupt requests to ensure that the interrupts are processed in the order they arrive. The FIFO queue here is the interrupt buffer, and its capacity corresponds to the number of credits of all clients. Through the PCIE (Peripheral Component Interconnect Express, a high-speed serial computer expansion bus standard) MSI (Message Signaled Interrupt, message signal interrupt) mechanism, the interrupt controller can send the interrupt request stored in the FIFO queue to the host, and return a credit to the client after successfully sending the interrupt request.

[0062] However, if a client fails to strictly follow the flow control rules, the interrupt requests sent to the interrupt controller may exceed the capacity of the FIFO queue. This may be caused by a variety of reasons, such as errors in the client logic implementation, or incorrect number settings when configuring credits in the software. When the above situation occurs, the result is interrupt overflow loss, which may have a negative impact on the software business logic. For example, when the business logic is waiting for a specific interrupt signal, due to the loss of the interrupt, the business logic may fall into a suspended state, causing the system to fail to work properly.

[0063] In this regard, the present invention provides an interrupt overflow detection and debugging method, which detects interrupt overflow by providing additional functions in the interrupt controller on the device side, and through special interrupt reporting, can quickly detect interrupt overflow loss and efficiently debug the lost interrupt, so that the root cause of the interrupt overflow loss can be quickly found and repaired to overcome the above-mentioned defects.

[0064] Figure 2 FIG. 1 is a schematic diagram of the structure of the interrupt overflow detection and debugging system provided by the present invention. Figure 2 As shown, the system may include a device 210 and a host 220, between which the device 210 and the host 220 may communicate and exchange data through an interrupt controller and a PCIE MSI mechanism to implement interrupt processing and information transmission. Figure 2 The system architecture description shown can refer to the above Figure 1The system architecture description in will not be repeated here.

[0065] In order to detect the overflow and loss of device interrupts, additional functions can be provided in the interrupt controller of the device for detection, and a special interrupt request (i.e., interrupt overflow flag) can be used for reporting, so that the host and upper-layer software can be informed of the interrupt overflow and loss. At the same time, relevant registers (including interrupt overflow counter, interrupt overflow register, and client filter register) are added to the interrupt controller to record the number of overflowed interrupt requests and their corresponding interrupt vectors for debugging by the host and software. Specifically, whenever the interrupt controller detects that the first preset queue (i.e., FIFO queue) is full, if a new interrupt request sent by the client is received, it can be determined that the interrupt request will overflow and be lost. In this case, the interrupt overflow counter is increased by one to count the number of interrupt overflow losses, and the interrupt vector corresponding to the overflowed interrupt request is recorded in the interrupt overflow register for subsequent debugging. At the same time, the interrupt controller can generate an interrupt overflow flag, put the interrupt overflow flag into a second preset queue (i.e., an additional FIFO queue), and then send it to the host; after receiving the interrupt overflow flag, the host's interrupt handler can obtain all overflowed interrupt vectors and their numbers from the interrupt overflow counter and interrupt overflow register in the interrupt controller, thereby obtaining the specific situation of the interrupt overflow and notifying the upper-level software, so that the upper-level software can take corresponding measures in time to optimize the system configuration or repair potential logical errors to avoid subsequent interrupt overflows.

[0066] In addition, in order to facilitate debugging and improve the efficiency and flexibility of interrupt overflow detection and debugging, a client filter register can be set in the interrupt controller to support the upper-layer software to flexibly select the client that wants to record the interrupt overflow. It should be understood that after the host notifies the upper-layer software of the specific situation of the interrupt overflow, the interrupt overflow counter, the interrupt overflow register and the second preset queue in the interrupt controller can be reset to start a new detection count cycle.

[0067] Figure 3 FIG. 1 is one of the flow charts of the interrupt overflow detection and debugging method provided by the present invention, such as Figure 3 As shown, the method includes:

[0068] Step 310, when it is detected that the first preset queue is full and a new interrupt request is received, the new interrupt request is determined as an overflow interrupt request for storage, and an interrupt overflow flag is generated, the interrupt overflow flag is used to indicate that an interrupt overflow loss has occurred in the device, and the first preset queue is used to store each received interrupt request;

[0069] It should be noted that the interrupt overflow detection and debugging method provided in the embodiment of the present invention can be applied to the device in the above embodiment, and the device may include an interrupt controller and multiple clients. For each client, when it needs to notify the host that there is an interrupt event that needs to be processed, for example, when the client completes a data transmission or encounters an error, it can send an interrupt request to the interrupt controller to trigger the interrupt controller to pass the interrupt request to the host.

[0070] Specifically, whenever the interrupt controller detects that the first preset queue is full and receives a new interrupt request sent by the client, it can be determined that the new interrupt request will overflow and be lost. Here, the first preset queue is a FIFO queue, which is a first-in-first-out data structure used to store each interrupt request received by the interrupt controller. The first preset queue is used to temporarily store interrupt requests from different clients, waiting for processing by the interrupt controller. It should be understood that detecting whether the first preset queue is full can be achieved by checking whether the current length of the first preset queue has reached its maximum capacity. When the number of elements in the queue reaches the preset maximum value, it can be determined that the queue is full.

[0071] The above-mentioned new interrupt request refers to the interrupt request that the interrupt controller has received from the client and has not yet been processed. When the interrupt controller receives an interrupt request, it checks the status of the FIFO queue. If the FIFO queue is full and the interrupt controller receives a new interrupt request, then the new interrupt request cannot be added to the queue for processing according to the normal process. At this time, the new interrupt request can be determined as an overflow interrupt request. In order to save the information of the overflow interrupt request, the interrupt controller will store it in a storage space dedicated to recording overflow interrupts.

[0072] When the received new interrupt request is determined to be an overflow interrupt request, that is, when it is determined that an interrupt overflow is detected, an interrupt overflow flag can be generated. The interrupt overflow flag here can be an interrupt request specially generated by the interrupt controller when an interrupt overflow is detected. Its main function is to notify the host interrupt controller that an interrupt overflow event has occurred, that is, some interrupt requests have been lost because the queue is full. The interrupt overflow flag can contain information that identifies the interrupt overflow event, so that the host can recognize and respond to this abnormal situation. It should be understood that the generation of the interrupt overflow flag can be achieved by setting a specific flag bit or encoding specific information to distinguish it from other normal interrupt requests.

[0073] Step 320: store the interrupt overflow flag in a second preset queue, and send the interrupt overflow flag to the host, so that the host obtains the overflow interrupt request and performs debugging when receiving the interrupt overflow flag.

[0074] Specifically, after the interrupt controller detects that the first preset queue is full and determines that an interrupt overflow has occurred, it triggers the generation process of the interrupt overflow flag and puts the generated interrupt overflow flag into the second preset queue so that it can be sent to the host for subsequent processing. Here, the second preset queue is an independent storage area specifically used to store the interrupt overflow flag, which can also be a FIFO type. The second preset queue is logically separated from the first preset queue, and the two can be located in the same memory area or in different memory areas. The embodiment of the present invention does not specifically limit this. For example, the second preset queue can be an extra space in the FIFO queue, which is specifically used to store interrupt requests related to interrupt overflow events.

[0075] The interrupt controller can send the interrupt overflow flag to the host through an interrupt mechanism or a message passing mechanism. After receiving the interrupt overflow flag, the host can parse the interrupt source or interrupt type, and find the corresponding interrupt vector according to the interrupt source or interrupt type, so that it can jump to the address pointed to by the interrupt vector to execute the corresponding program. Specifically, the host can parse the information contained in the interrupt overflow flag through the interrupt handler, confirm that it is an interrupt overflow event, and directly read the overflow interrupt information from the storage area provided by the interrupt controller; after obtaining the overflow interrupt information, the host can start the debugging process, including analyzing the cause of the interrupt loss, checking the system configuration, optimizing the interrupt processing logic or repairing errors in the software, etc.

[0076] The method provided by the embodiment of the present invention can timely and accurately identify overflow interrupt requests when the queue is full by detecting in real time whether the first preset queue is full at the device end, and store the overflow interrupt requests for use in subsequent debugging, which is helpful to analyze the cause of interrupt overflow loss, quickly locate and solve the problem; when the interrupt overflow is detected, by generating an interrupt overflow flag and sending it to the host, the host can quickly know the occurrence of interrupt overflow loss, so as to take countermeasures in time and improve the stability and reliability of the system. In addition, by using the first preset queue and the second preset queue to store each interrupt request and interrupt overflow flag, it is helpful to effectively manage interrupts.

[0077] Based on any of the above embodiments, in step 310, determining the new interrupt request as an overflow interrupt request for storage includes:

[0078] Step 311, determining the new interrupt request as an overflow interrupt request;

[0079] Step 312: based on the overflowed interrupt request, update the value of the interrupt overflow counter, and write the overflowed interrupt request into an interrupt overflow register, wherein the interrupt overflow counter and the interrupt overflow register are both set in the device.

[0080] It should be noted that in order to record the overflow interrupt information, an interrupt overflow counter and an interrupt overflow register can be added to the interrupt controller. Among them, the interrupt overflow counter is a register inside the interrupt controller, which is used to record the number of interrupt overflow losses detected by the interrupt controller. Whenever the interrupt controller detects an interrupt overflow, the value of the interrupt overflow counter will increase. The interrupt overflow register is a register used to store the interrupt vector corresponding to the overflow interrupt request. Here, considering that the interrupt request is a notification signal issued by the client, and the interrupt vector is the entry address of the interrupt service program, in order to facilitate the subsequent efficient debugging and positioning of the overflow-lost interrupt, the interrupt overflow register may store the interrupt vector corresponding to the overflow interrupt request, which is used to record which interrupt vectors have not been processed in time due to the overflow loss. It should be understood that the interrupt overflow register can store relevant information of the overflow interrupt vector, such as the interrupt vector itself, the client ID (Identity) and some other information, etc., and the other information here may include timestamps, interrupt types, error codes, status information, etc.

[0081] Specifically, whenever the interrupt controller detects an interrupt request overflow, it can update the value of the interrupt overflow counter, that is, the value of the interrupt overflow counter will be increased by 1 to record the number of overflow interrupts. In this way, the host can understand the severity of the interrupt overflow loss by querying the value of the counter and take corresponding measures.

[0082] When the interrupt controller detects that a certain interrupt request overflows, it can find the corresponding interrupt vector according to the interrupt source or interrupt type carried by the interrupt request, and write the interrupt vector into the interrupt overflow register. In this way, the host can check which interrupt vectors are lost due to the overflow by reading the contents of the register, so as to perform troubleshooting and repair. It should be understood that when the interrupt controller writes the overflowed interrupt vector into the interrupt overflow register, it can directly operate the hardware register or complete it through a specific software interface, which is not specifically limited in the embodiment of the present invention.

[0083] In addition, the overflow interrupt vector information recorded in the interrupt overflow register may include the interrupt vector itself, client ID, timestamp and other information. By recording this information, the host can track the specific circumstances of the interrupt overflow, including which device clients have experienced interrupt overflow and what the overflow interrupt event is. This helps to analyze the interrupt processing situation, perform fault diagnosis and troubleshooting, find out the root cause of the interrupt overflow, and then take corresponding measures.

[0084] It is understandable that in the case of too many overflowed interrupt vectors, considering the limited register capacity, in order to efficiently use the limited register resources and speed up problem diagnosis, only the interrupt vectors corresponding to the first few overflowed interrupt requests can be recorded. By recording the first few overflowed interrupt vectors, early signs of system problems can be captured. These interrupts may reveal the root cause of subsequent interrupt overflows, thereby helping to identify and resolve potential problems at an early stage and improve system stability. Moreover, recording only the first few overflowed interrupt vectors can store key information in a limited space and avoid excessive consumption of resources.

[0085] In addition, recording the first few overflow interrupt vectors can simplify the debugging process. By focusing on the initial problem, the possible root cause can be identified more quickly and the corresponding corrective measures can be taken without being overwhelmed by a large number of interrupt overflow events. At the same time, in the case of too many overflow interrupt vectors, only recording the first few overflow interrupt vectors can help quickly locate the problem and make necessary repairs, reducing unnecessary debugging time and energy consumption, thereby improving debugging efficiency.

[0086] In the embodiment of the present invention, the interrupt controller can effectively record and track the interrupt overflow situation by updating the value of the interrupt overflow counter and writing the overflowed interrupt vector into the interrupt overflow register, thereby providing strong support for troubleshooting and performance optimization.

[0087] Based on any of the above embodiments, step 311 specifically includes:

[0088] Step 3111, obtaining pre-configured client identifiers from a client screening register, wherein the client screening register is set in the device;

[0089] Step 3112: Match the client identifier carried in the new interrupt request with the pre-configured client identifiers. If the match is successful, determine the new interrupt request as the overflow interrupt request.

[0090] It should be noted that, considering the limited storage capacity of the register, when interrupt overflow occurs in multiple clients, the interrupt information of some clients may overwrite the interrupt information of the clients that need to be debugged and paid attention to, resulting in the inability to debug these overflow interrupts. Therefore, the embodiment of the present invention can support the software to flexibly configure the clients that want to record interrupt overflow by setting the client filtering register in the interrupt controller, so that interrupt overflow detection and debugging can be carried out in a targeted manner, thereby improving debugging efficiency and flexibility. It should be understood that under the default configuration, the interrupt controller can record the interrupt overflow of all clients. When it is necessary to record only the interrupt overflow of those clients that are critical to system stability, performance or debugging, dynamic configuration can be performed in the client filtering register.

[0091] Specifically, the client filter register is a special register in the interrupt controller, which is used to store pre-configured client identifiers. These identifiers are used to match the client identifier carried in the interrupt request when a new interrupt request is received to determine the source of the interrupt. Here, the pre-configured client identifiers refer to the unique identifiers of each client that is pre-configured in the client filter register and wants to record the interrupt overflow. These identifiers can be numbers, codes or other forms of identifiers to distinguish different clients.

[0092] When the interrupt controller detects that the first preset queue is full and receives a new interrupt request sent by the client, the new interrupt request can be parsed to extract the client identifier it carries; then, the interrupt controller can access its internal client filter register to obtain the pre-configured client identifiers, and then compare the extracted client identifiers with each pre-configured identifier in the client filter register one by one to determine whether the client corresponding to this client identifier is the client that wants to record the interrupt overflow. Here, the client identifier carried by the above interrupt request refers to a unique code or identifier contained in the request when the client sends an interrupt request for identifying the source of the interrupt.

[0093] If the client identifier carried by the new interrupt request successfully matches any client identifier pre-configured in the client filtering register, it indicates that the client sending the interrupt request is the client for which the system wants to record the interrupt overflow. In this case, the interrupt controller can determine the new interrupt request as an overflow interrupt request, and store and record the interrupt vector corresponding to the interrupt request for subsequent debugging.

[0094] In the embodiment of the present invention, by setting the client filter register in the interrupt controller, the software can be supported to dynamically configure which client interrupt overflows need to be recorded according to actual needs. This flexibility enables the system to adapt to different application scenarios and needs without modifying the hardware design or performing complex firmware updates. In addition, when an interrupt overflow occurs in the system, since only the overflow information of a specific client is recorded, developers can locate the source of the problem more quickly without searching in a large amount of overflow data, which can greatly improve the efficiency of debugging and shorten the time to solve the problem.

[0095] Figure 4 FIG. 2 is a flow chart of the interrupt overflow detection and debugging method provided by the present invention. Figure 4 As shown, the method includes:

[0096] Step 410, when receiving an interrupt overflow flag sent by a device, obtaining an overflow interrupt request from the device, and performing debugging based on the overflow interrupt request;

[0097] The interrupt overflow flag is generated and sent by the device when it detects that the first preset queue is full and receives a new interrupt request. The interrupt overflow flag is stored in a second preset queue within the device and is used to characterize that an interrupt overflow loss has occurred in the device. The overflow interrupt request is determined by the device based on the new interrupt request. The first preset queue is used to store each received interrupt request.

[0098] It should be noted that the interrupt overflow detection and debugging method provided in the embodiment of the present invention can be applied to a host, and an interrupt handler is set in the host. Here, the interrupt handler is a special computer program for responding to and processing interrupts occurring in the system. When the host receives a signal from a hardware device or software requesting a service, an interrupt signal is triggered, causing the currently executing program to be interrupted and the pre-defined interrupt handler to be executed instead.

[0099] Specifically, when the host receives the interrupt overflow identifier sent by the device's interrupt controller, it can determine that an interrupt overflow loss has occurred in the first preset queue in the interrupt controller. In this case, the host can obtain all overflowed interrupt vector information directly from the interrupt overflow counter and interrupt overflow register of the interrupt controller through the communication protocol between the host and the interrupt controller, so as to debug and find out the cause of the interrupt overflow, thereby notifying the upper-level software and taking corresponding measures quickly to avoid subsequent interrupt overflow situations.

[0100] It is understandable that the interrupt overflow flag is an interrupt request generated by the interrupt controller when it detects that the first preset queue is full and receives a new interrupt request sent by the client (i.e., an interrupt overflow is detected). Its main function is to notify the host interrupt controller that an interrupt overflow event has occurred. After generating the interrupt overflow flag, the interrupt controller will store it in the second preset queue so that it can be sent to the host for subsequent processing. Here, both the first preset queue and the second preset queue can be FIFO types, and the two are logically separated and can be located in the same memory area or different memory areas.

[0101] In addition, after receiving the interrupt overflow flag, the host can directly obtain the information of the overflow interrupt vector from the interrupt controller for debugging. Here, the overflow interrupt vector is determined by the interrupt controller based on the new interrupt request received when it detects that the first preset queue is full. For example, the interrupt controller can directly treat the new interrupt request as an overflow interrupt request and record its corresponding interrupt vector. For another example, the interrupt controller can also first obtain the pre-configured client identifiers from the client screening register, and match the client identifier carried by the new interrupt request with the pre-configured client identifiers, thereby treating the successfully matched new interrupt request as an overflow interrupt request, and finding the corresponding interrupt vector for storage and recording, thereby saving storage space and processing resources, while greatly improving debugging efficiency.

[0102] The method provided by the embodiment of the present invention can timely and accurately identify the overflow interrupt request when the queue is full by detecting in real time whether the first preset queue is full at the device end, and store the interrupt vector corresponding to the overflow interrupt request, which can be used for subsequent debugging, and is helpful to analyze the cause of interrupt overflow loss, quickly locate and solve the problem; when the interrupt overflow is detected, by generating an interrupt overflow flag and sending it to the host, the host can quickly know the occurrence of interrupt overflow loss, so as to take countermeasures in time and improve the stability and reliability of the system. In addition, by using the first preset queue and the second preset queue to store each interrupt request and interrupt overflow flag, it is helpful to effectively manage interrupts.

[0103] Based on any of the above embodiments, after step 410, the method further includes:

[0104] Determine interrupt overflow information based on the overflowed interrupt request, and send the interrupt overflow information to upper layer software;

[0105] An interrupt overflow counter, an interrupt overflow register and the second preset queue in the device are reset, the interrupt overflow counter is used to count the number of the overflowed interrupt requests, and the interrupt overflow register is used to store the overflowed interrupt requests.

[0106] Specifically, when the interrupt controller detects an interrupt request overflow, the value of the interrupt overflow counter can be updated, that is, the value of the interrupt overflow counter will be increased by one to record the number of overflow interrupts; at the same time, the corresponding interrupt vector can be found according to the interrupt source or interrupt type carried by the interrupt request, and the interrupt vector is written into the interrupt overflow register. When the host receives the interrupt overflow identifier sent by the interrupt controller of the device, the overflow interrupt vector can be obtained from the register of the interrupt controller, and the interrupt overflow information can be obtained by analyzing the overflow interrupt vector. Here, the interrupt overflow information may include the overflow interrupt vector and its number, the client ID of the interrupt overflow, the timestamp, etc. It should be understood that the host can identify which interrupt event overflow is lost through the interrupt vector obtained from the register, and the client ID can determine which client sent the interrupt event, which is helpful to locate the source of the problem, and the severity of the interrupt overflow can be understood through the number of interrupt overflows, and the timestamp information can help the host determine the time point of the interrupt overflow.

[0107] After determining the interrupt overflow information, the host can report this information to the upper-layer software, which can be achieved through logging, sending alarm notifications, and other mechanisms, so as to make corresponding processing and adjustments. The upper-layer software can perform operations such as system configuration optimization or repairing potential logical errors based on the received interrupt overflow information to ensure the stability and reliability of the system. Here, the upper-layer software refers to the operating system or application.

[0108] In addition, after sending the interrupt overflow information to the upper layer software, the host can reset the interrupt overflow counter, the interrupt overflow register, and the second preset queue in the interrupt controller to start a new detection count cycle. For example, the host can implement the reset operation by writing zero to the interrupt overflow counter, the interrupt overflow register, and the second preset queue of the interrupt controller.

[0109] Based on any of the above embodiments, Figure 5 FIG. 3 is a flow chart of the interrupt overflow detection and debugging method provided by the present invention. Figure 5 As shown, the method includes:

[0110] Step 510, when the device detects that the first preset queue is full and receives a new interrupt request, the device determines the new interrupt request as an overflow interrupt request for storage, and generates an interrupt overflow flag, wherein the interrupt overflow flag is used to indicate that an interrupt overflow loss has occurred in the device, and the first preset queue is used to store each received interrupt request;

[0111] Step 520, storing the interrupt overflow flag in a second preset queue through the device, and sending the interrupt overflow flag to the host;

[0112] Step 530: upon receiving the interrupt overflow flag, the host obtains the overflow interrupt request from the device, and performs debugging based on the overflow interrupt request.

[0113] It should be noted that the interrupt overflow detection and debugging method provided in the embodiment of the present invention can be applied to an interrupt overflow detection and debugging system, which may include a device and a host, wherein the device may be an artificial intelligence chip, such as a GPU, a GPGPU, a TPU, etc.; the host may be a central processing unit or a computer connected to the device, such as a CPU, etc., for receiving, processing and responding to information and requests from the device. The device is provided with a client and an interrupt controller, and there may be multiple clients, each of which can communicate with the interrupt controller. Between the device and the host, communication and data exchange can be carried out through the interrupt controller and the PCIE MSI mechanism to realize interrupt processing and information transmission.

[0114] Specifically, in order to detect the overflow and loss of device interrupts, additional functions can be provided in the interrupt controller of the device for detection, and reported through a special interrupt request (i.e., interrupt overflow flag) to let the host and upper-layer software know the interrupt overflow and loss. At the same time, relevant registers (including interrupt overflow counter, interrupt overflow register, client filter register) are added to the interrupt controller to record the number of overflowed interrupt requests and their corresponding interrupt vectors for debugging by the host and software. Specifically, whenever the interrupt controller detects that the first preset queue (i.e., FIFO queue) is full, if a new interrupt request sent by the client is received, it can be determined that the interrupt request will overflow and be lost. In this case, the interrupt overflow counter is increased by one to count the number of interrupt overflow losses, and the interrupt vector corresponding to the overflowed interrupt request is recorded in the interrupt overflow register for subsequent debugging. At the same time, the interrupt controller can generate an interrupt overflow flag, put the interrupt overflow flag into a second preset queue (i.e., an additional FIFO queue), and then send it to the host; after receiving the interrupt overflow flag, the host's interrupt handler can obtain all overflowed interrupt vectors and their numbers from the interrupt overflow counter and interrupt overflow register in the interrupt controller, thereby obtaining the specific situation of the interrupt overflow and notifying the upper-level software, so that the upper-level software can take corresponding measures in time to optimize the system configuration or repair potential logical errors to avoid subsequent interrupt overflows.

[0115] In addition, in order to facilitate debugging and improve the efficiency and flexibility of interrupt overflow detection and debugging, a client filter register can be set in the interrupt controller to support the upper-layer software to flexibly select the client that wants to record the interrupt overflow. The interrupt request sent by the client carries the client ID. By pre-configuring the identifiers of each client that wants to record the interrupt overflow in the client filter register, when the interrupt request overflow sent by these pre-configured clients is lost, it can be recorded for subsequent targeted debugging. It should be understood that after the host notifies the upper-layer software of the specific situation of the interrupt overflow, it can reset the interrupt overflow counter, interrupt overflow register and second preset queue in the interrupt controller to start a new detection count cycle.

[0116] The method provided by the embodiment of the present invention can timely and accurately identify the overflow interrupt request when the queue is full by detecting in real time whether the first preset queue is full at the device end, and store the overflow interrupt request for use in subsequent debugging, which is helpful to analyze the cause of interrupt overflow loss, quickly locate and solve the problem; when the interrupt overflow is detected, by generating an interrupt overflow flag and sending it to the host, the host can quickly know the occurrence of interrupt overflow loss, so as to take countermeasures in time and improve the stability and reliability of the system. In addition, using the first preset queue and the second preset queue to store each interrupt request and interrupt overflow flag respectively helps to effectively manage interrupts.

[0117] Based on any of the above embodiments, Figure 6 FIG. 1 is one of the structural diagrams of the interrupt overflow detection and debugging device provided by the present invention, such as Figure 6 As shown, the device comprises:

[0118] The detection unit 610 is used for determining the new interrupt request as an overflow interrupt request for storage when detecting that the first preset queue is full and a new interrupt request is received, and generating an interrupt overflow flag, wherein the interrupt overflow flag is used to indicate that an interrupt overflow loss has occurred in the device, and the first preset queue is used to store each received interrupt request;

[0119] The sending unit 620 is used to store the interrupt overflow flag in a second preset queue, and send the interrupt overflow flag to the host, so that the host obtains the overflow interrupt request and performs debugging when receiving the interrupt overflow flag.

[0120] The device provided by the embodiment of the present invention can timely and accurately identify the overflow interrupt request when the queue is full by detecting in real time whether the first preset queue is full at the device end, and store the overflow interrupt request for use in subsequent debugging, which is helpful to analyze the cause of interrupt overflow loss, quickly locate and solve the problem; when the interrupt overflow is detected, by generating an interrupt overflow flag and sending it to the host, the host can quickly know the occurrence of interrupt overflow loss, so as to take countermeasures in time and improve the stability and reliability of the system. In addition, using the first preset queue and the second preset queue to store each interrupt request and interrupt overflow flag respectively helps to effectively manage interrupts.

[0121] Based on any of the above embodiments, the detection unit 610 includes:

[0122] A determination subunit, configured to determine the new interrupt request as an overflow interrupt request;

[0123] The storage subunit is used to update the value of the interrupt overflow counter based on the overflowed interrupt request and write the overflowed interrupt request into the interrupt overflow register. The interrupt overflow counter and the interrupt overflow register are both set in the device.

[0124] Based on any of the above embodiments, the determination subunit is specifically used for:

[0125] Obtaining pre-configured client identifiers from a client screening register, wherein the client screening register is provided in the device;

[0126] The client identifier carried in the new interrupt request is matched with each of the pre-configured client identifiers, and when the match succeeds, the new interrupt request is determined as the overflow interrupt request.

[0127] Based on any of the above embodiments, Figure 7 FIG. 2 is a second structural diagram of the interrupt overflow detection and debugging device provided by the present invention. Figure 7 As shown, the device comprises:

[0128] The debugging unit 710 is used to obtain the overflowed interrupt request from the device when receiving the interrupt overflow flag sent by the device, and perform debugging based on the overflowed interrupt request;

[0129] The interrupt overflow flag is generated and sent by the device when it detects that the first preset queue is full and receives a new interrupt request. The interrupt overflow flag is stored in a second preset queue within the device and is used to characterize that an interrupt overflow loss has occurred in the device. The overflow interrupt request is determined by the device based on the new interrupt request. The first preset queue is used to store each received interrupt request.

[0130] The device provided by the embodiment of the present invention can timely and accurately identify the overflow interrupt request when the queue is full by detecting in real time whether the first preset queue is full at the device end, and store the overflow interrupt request for use in subsequent debugging, which is helpful to analyze the cause of interrupt overflow loss, quickly locate and solve the problem; when the interrupt overflow is detected, by generating an interrupt overflow flag and sending it to the host, the host can quickly know the occurrence of interrupt overflow loss, so as to take countermeasures in time and improve the stability and reliability of the system. In addition, using the first preset queue and the second preset queue to store each interrupt request and interrupt overflow flag respectively helps to effectively manage interrupts.

[0131] Based on any of the above embodiments, the device further includes:

[0132] a notification unit, configured to determine interrupt overflow information based on the overflowed interrupt request, and send the interrupt overflow information to upper-layer software;

[0133] A reset unit is used to reset an interrupt overflow counter, an interrupt overflow register and the second preset queue in the device, wherein the interrupt overflow counter is used to count the number of the overflowed interrupt requests, and the interrupt overflow register is used to store the overflowed interrupt requests.

[0134] Based on any of the above embodiments, Figure 8 FIG. 3 is a schematic diagram of the structure of the interrupt overflow detection and debugging device provided by the present invention. Figure 8 As shown, the device comprises:

[0135] The detection unit 610 is used to, when the device detects that the first preset queue is full and a new interrupt request is received, determine the new interrupt request as an overflow interrupt request for storage, and generate an interrupt overflow flag, wherein the interrupt overflow flag is used to indicate that an interrupt overflow loss has occurred in the device, and the first preset queue is used to store each received interrupt request;

[0136] A sending unit 620, configured to store the interrupt overflow flag in a second preset queue through the device, and send the interrupt overflow flag to a host;

[0137] The debugging unit 710 is used to obtain the overflow interrupt request from the device through the host when receiving the interrupt overflow flag, and perform debugging based on the overflow interrupt request.

[0138] The device provided by the embodiment of the present invention can timely and accurately identify the overflow interrupt request when the queue is full by detecting in real time whether the first preset queue is full at the device end, and store the overflow interrupt request for use in subsequent debugging, which is helpful to analyze the cause of interrupt overflow loss, quickly locate and solve the problem; when the interrupt overflow is detected, by generating an interrupt overflow flag and sending it to the host, the host can quickly know the occurrence of interrupt overflow loss, so as to take countermeasures in time and improve the stability and reliability of the system. In addition, using the first preset queue and the second preset queue to store each interrupt request and interrupt overflow flag respectively helps to effectively manage interrupts.

[0139] Based on any of the above embodiments, Fig. 9 It is a structural schematic diagram of the device provided by the present invention, such as Fig. 9 As shown, the device includes a client 910 and an interrupt controller 920, the client 910 and the interrupt controller 920 are in communication connection, and the interrupt controller 920 is provided with a first preset queue and a second preset queue;

[0140] The first preset queue is used to store each interrupt request sent by the client 910;

[0141] The interrupt controller 920 is used to, when detecting that the first preset queue is full and receiving a new interrupt request sent by the client 910, determine the new interrupt request as an overflow interrupt request for storage, and generate an interrupt overflow flag, wherein the interrupt overflow flag is used to indicate that an interrupt overflow loss has occurred in the first preset queue;

[0142] The interrupt controller 920 is further configured to store the interrupt overflow flag in the second preset queue, and send the interrupt overflow flag to the host, so that the host can obtain the overflow interrupt request and perform debugging when receiving the interrupt overflow flag.

[0143] The device provided by the embodiment of the present invention can timely and accurately identify overflow interrupt requests when the queue is full by detecting in real time whether the first preset queue is full, and store the overflow interrupt requests for use in subsequent debugging, which is helpful for analyzing the cause of interrupt overflow loss, quickly locating and solving the problem; when the interrupt overflow is detected, by generating an interrupt overflow flag and sending it to the host, the host can quickly know the occurrence of interrupt overflow loss, so as to take countermeasures in time and improve the stability and reliability of the system. In addition, the first preset queue and the second preset queue are respectively used to store each interrupt request and interrupt overflow flag, which is helpful for effective management of interrupts.

[0144] Based on any of the above embodiments, the interrupt controller 920 is further provided with an interrupt overflow counter and an interrupt overflow register;

[0145] The interrupt overflow counter is used to count the number of the overflowed interrupt requests;

[0146] The interrupt overflow register is used to store the overflowed interrupt request;

[0147] The interrupt controller is further configured to update the value of the interrupt overflow counter based on the overflowed interrupt request, and write the overflowed interrupt request into the interrupt overflow register.

[0148] Based on any of the above embodiments, the interrupt controller 920 is further provided with a client filter register, and the client filter register is used to store pre-configured client identifiers;

[0149] The interrupt controller 920 is further configured to obtain pre-configured client identifiers from the client screening register, and match the client identifier carried by the new interrupt request with the pre-configured client identifiers, and if the match is successful, determine the new interrupt request as the overflow interrupt request.

[0150] Based on any of the above embodiments, Fig.10 It is a structural schematic diagram of the host provided by the present invention, such as Fig.10 As shown, the host may include: a processor 1010, a communication interface 1020, a memory 1030 and a communication bus 1040, wherein the processor 1010, the communication interface 1020 and the memory 1030 communicate with each other through the communication bus 1040. The processor 1010 may call the logic instructions in the memory 1030 to execute the interrupt overflow detection and debugging method, the method comprising: in the case of receiving an interrupt overflow identifier sent by a device, obtaining an overflow interrupt request from the device, and debugging based on the overflow interrupt request; the interrupt overflow identifier is generated and sent by the device when it detects that the first preset queue is full and receives a new interrupt request, the interrupt overflow identifier is stored in the second preset queue in the device, and is used to indicate that the device has an interrupt overflow loss, the overflow interrupt request is determined by the device based on the new interrupt request, and the first preset queue is used to store each received interrupt request.

[0151] In addition, the logic instructions in the above-mentioned memory 1030 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the relevant technology or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0152] The host provided by the embodiment of the present invention can timely and accurately identify the overflow interrupt request when the queue is full by detecting in real time whether the first preset queue is full at the device end, and store the overflow interrupt request for use in subsequent debugging, which is helpful to analyze the cause of interrupt overflow loss, quickly locate and solve the problem; when the interrupt overflow is detected, by generating an interrupt overflow flag and sending it to the host, the host can quickly know the occurrence of interrupt overflow loss, so as to take countermeasures in time and improve the stability and reliability of the system. In addition, the first preset queue and the second preset queue are respectively used to store each interrupt request and interrupt overflow flag, which is helpful to effectively manage interrupts.

[0153] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the interrupt overflow detection and debugging method applied to the device provided by the above-mentioned methods, the method including: when it is detected that the first preset queue is full and a new interrupt request is received, the new interrupt request is determined as an overflow interrupt request for storage, and an interrupt overflow flag is generated, the interrupt overflow flag is used to characterize that an interrupt overflow loss has occurred in the device, and the first preset queue is used to store each received interrupt request; the interrupt overflow flag is stored in a second preset queue, and the interrupt overflow flag is sent to the host, so that the host obtains the overflow interrupt request and debugs it when the interrupt overflow flag is received.

[0154] In addition, when the computer program is executed by the processor, the computer can execute the interrupt overflow detection and debugging method applied to the host provided by the above-mentioned methods, the method comprising: when an interrupt overflow identifier sent by a device is received, obtaining an overflow interrupt request from the device, and debugging based on the overflow interrupt request; the interrupt overflow identifier is generated and sent by the device when it detects that the first preset queue is full and receives a new interrupt request, the interrupt overflow identifier is stored in a second preset queue in the device, and is used to characterize that an interrupt overflow loss has occurred in the device, the overflow interrupt request is determined by the device based on the new interrupt request, and the first preset queue is used to store each received interrupt request.

[0155] In addition, when the computer program is executed by the processor, the computer can execute the interrupt overflow detection and debugging method provided by the above methods and applied to the interrupt overflow detection and debugging system, the method comprising: when the device detects that the first preset queue is full and receives a new interrupt request, the new interrupt request is determined as an overflow interrupt request for storage, and an interrupt overflow flag is generated, the interrupt overflow flag is used to characterize that an interrupt overflow loss has occurred in the device, and the first preset queue is used to store each received interrupt request; the device stores the interrupt overflow flag in a second preset queue, and sends the interrupt overflow flag to the host; when the host receives the interrupt overflow flag, the overflow interrupt request is obtained from the device, and debugging is performed based on the overflow interrupt request.

[0156] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the interrupt overflow detection and debugging method applied to a device provided by the above-mentioned methods. The method includes: when it is detected that the first preset queue is full and a new interrupt request is received, the new interrupt request is determined as an overflow interrupt request for storage, and an interrupt overflow flag is generated, the interrupt overflow flag is used to characterize that an interrupt overflow loss has occurred in the device, and the first preset queue is used to store each received interrupt request; the interrupt overflow flag is stored in a second preset queue, and the interrupt overflow flag is sent to a host, so that the host obtains the overflow interrupt request and debugs it when the interrupt overflow flag is received.

[0157] In addition, when the computer program is executed by the processor, it is implemented to execute the interrupt overflow detection and debugging method applied to the host provided by the above-mentioned methods, the method comprising: when an interrupt overflow identifier sent by a device is received, obtaining an overflow interrupt request from the device, and debugging based on the overflow interrupt request; the interrupt overflow identifier is generated and sent by the device when it detects that the first preset queue is full and receives a new interrupt request, the interrupt overflow identifier is stored in a second preset queue in the device, and is used to characterize that an interrupt overflow loss has occurred in the device, the overflow interrupt request is determined by the device based on the new interrupt request, and the first preset queue is used to store each received interrupt request.

[0158] In addition, when the computer program is executed by the processor, it is implemented to execute the interrupt overflow detection and debugging method provided by the above-mentioned methods and applied to the interrupt overflow detection and debugging system, the method comprising: when the device detects that the first preset queue is full and receives a new interrupt request, the new interrupt request is determined as an overflow interrupt request for storage, and an interrupt overflow flag is generated, the interrupt overflow flag is used to characterize that an interrupt overflow loss has occurred in the device, and the first preset queue is used to store each received interrupt request; the device stores the interrupt overflow flag in a second preset queue, and sends the interrupt overflow flag to the host; when the host receives the interrupt overflow flag, the overflow interrupt request is obtained from the device, and debugging is performed based on the overflow interrupt request.

[0159] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0160] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution can be essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiment.

[0161] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for detecting and debugging interrupt overflow, characterized in that: include: When it is detected that the first preset queue is full and a new interrupt request is received, the new interrupt request is determined as an overflow interrupt request for storage, and an interrupt overflow flag is generated, wherein the interrupt overflow flag is used to indicate that an interrupt overflow loss has occurred in the device, and the first preset queue is used to store each received interrupt request; The interrupt overflow flag is stored in a second preset queue, and the interrupt overflow flag is sent to a host, so that the host obtains the overflow interrupt request and performs debugging when receiving the interrupt overflow flag.

2. The interrupt overflow detection and debugging method according to claim 1, characterized in that: The step of determining the new interrupt request as an overflow interrupt request for storage includes: Determining the new interrupt request as an overflowed interrupt request; Based on the overflowed interrupt request, the value of the interrupt overflow counter is updated, and the overflowed interrupt request is written into an interrupt overflow register, wherein the interrupt overflow counter and the interrupt overflow register are both set in the device.

3. The interrupt overflow detection and debugging method according to claim 1, characterized in that: Determining the new interrupt request as an overflow interrupt request includes: Obtaining pre-configured client identifiers from a client screening register, wherein the client screening register is provided in the device; The client identifier carried in the new interrupt request is matched with each of the pre-configured client identifiers, and when the match succeeds, the new interrupt request is determined as the overflow interrupt request.

4. A method for detecting and debugging interrupt overflow, characterized in that: include: When receiving an interrupt overflow flag sent by a device, obtaining an overflow interrupt request from the device, and performing debugging based on the overflow interrupt request; The interrupt overflow flag is generated and sent by the device when it detects that the first preset queue is full and receives a new interrupt request. The interrupt overflow flag is stored in a second preset queue within the device and is used to characterize that an interrupt overflow loss has occurred in the device. The overflow interrupt request is determined by the device based on the new interrupt request. The first preset queue is used to store each received interrupt request.

5. The interrupt overflow detection and debugging method according to claim 4, characterized in that: Also includes: Determine interrupt overflow information based on the overflowed interrupt request, and send the interrupt overflow information to upper layer software; An interrupt overflow counter, an interrupt overflow register and the second preset queue in the device are reset, the interrupt overflow counter is used to count the number of the overflowed interrupt requests, and the interrupt overflow register is used to store the overflowed interrupt requests.

6. A method for detecting and debugging interrupt overflow, characterized in that: include: When the device detects that the first preset queue is full and receives a new interrupt request, the device determines the new interrupt request as an overflow interrupt request for storage, and generates an interrupt overflow flag, wherein the interrupt overflow flag is used to indicate that an interrupt overflow loss has occurred in the device, and the first preset queue is used to store each received interrupt request; storing the interrupt overflow flag in a second preset queue through the device, and sending the interrupt overflow flag to a host; When the host receives the interrupt overflow flag, the host obtains the overflow interrupt request from the device and performs debugging based on the overflow interrupt request.

7. A device, characterized in that: It includes a client and an interrupt controller, the client and the interrupt controller are in communication connection, and the interrupt controller is provided with a first preset queue and a second preset queue; The first preset queue is used to store each interrupt request sent by the client; The interrupt controller is used to, when detecting that the first preset queue is full and receiving a new interrupt request sent by the client, determine the new interrupt request as an overflow interrupt request for storage, and generate an interrupt overflow flag, wherein the interrupt overflow flag is used to indicate that an interrupt overflow loss has occurred in the first preset queue; The interrupt controller is further configured to store the interrupt overflow flag in the second preset queue, and send the interrupt overflow flag to the host, so that the host can obtain the overflow interrupt request and perform debugging when receiving the interrupt overflow flag.

8. The device according to claim 7, characterized in that The interrupt controller is also provided with an interrupt overflow counter and an interrupt overflow register; The interrupt overflow counter is used to count the number of the overflowed interrupt requests; The interrupt overflow register is used to store the overflowed interrupt request; The interrupt controller is used to update the value of the interrupt overflow counter based on the overflowed interrupt request, and write the overflowed interrupt request into the interrupt overflow register.

9. A host comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the interrupt overflow detection and debugging method as claimed in claim 4 or 5 is implemented.

10. An interrupt overflow detection and debugging system, characterized in that: Comprising the device as claimed in claim 7 or 8, and the host as claimed in claim 9.

11. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the interrupt overflow detection and debugging method according to any one of claims 1 to 6 is implemented.

12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the interrupt overflow detection and debugging method according to any one of claims 1 to 6 is implemented.