Interrupt mechanism verification method and system, storage medium and computer program product

By initializing and configuring the interrupt register and performing corresponding verification through the UVM verification platform, the problem that traditional methods are difficult to satisfy the verification of the MSI-X interrupt mechanism is solved, and the integrity and complexity of the MSI-X interrupt mechanism are verified.

CN122044984APending Publication Date: 2026-05-15PURPLE MOUNTAIN LAB
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610187240.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-09
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Traditional interrupt mechanism verification methods are insufficient to meet the integrity and complexity verification requirements of the MSI-X interrupt mechanism.

Method used

The interrupt register of the device under test is initialized and configured using the UVM verification platform simulation software, and interrupt vector mapping verification, dual masking control verification, and interrupt compensation logic verification are performed.

Benefits of technology

The integrity and complexity of the MSI-X interrupt mechanism were verified to ensure that the device can correctly report interrupt events using the MSI-X interrupt mechanism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122044984A_ABST
    Figure CN122044984A_ABST
Patent Text Reader

Abstract

The invention discloses an interrupt mechanism verification method and system, a storage medium and a computer program product. The method comprises the following steps: performing initialization configuration on an interrupt register of tested equipment through verification platform simulation software; corresponding verification is carried out on the monitored at least one interrupt event through the verification platform according to the interrupt mechanism, and the verification comprises interrupt vector mapping verification, double-shielding control verification and interrupt compensation logic verification. According to the method, by executing interrupt vector mapping verification, double-shielding control verification and interrupt compensation logic verification, whether equipment can normally use an MSI-X mechanism to report the interrupt event can be verified, and the integrity and complexity verification requirements of the MSI-X interrupt mechanism are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of chip technology, and in particular to an interrupt mechanism verification method, system, storage medium and computer program product. Background Technology

[0002] With the widespread application of PCIe bus in network interface cards, storage controllers, acceleration chips and other fields, hardware devices increasingly rely on the MSI-X (Message Signaled Interrupt–eXtended) interrupt mechanism to report interrupt events to the host.

[0003] Compared with the traditional MSI interrupt mechanism, the MSI-X interrupt mechanism provides more interrupt vectors, a more flexible per-vector mask control mechanism, and a Pending Bit compensation mechanism, which can significantly reduce software polling overhead and improve overall system performance in multi-queue and high-concurrency scenarios.

[0004] However, the logic of the MSI-X interrupt mechanism is also more complex, and traditional verification methods for the MSI interrupt mechanism are difficult to meet the verification requirements for the integrity and complexity of the MSI-X interrupt mechanism. Summary of the Invention

[0005] This invention provides an interrupt mechanism verification method, system, storage medium, and computer program product to solve the problem that traditional verification methods for MSI interrupt mechanisms are difficult to meet the integrity and complexity verification requirements of the MSI-X interrupt mechanism.

[0006] According to one aspect of the present invention, an interruption mechanism verification method is provided, comprising: The interrupt register of the device under test is initialized and configured using the verification platform simulation software. The verification platform performs corresponding verifications on at least one detected interruption event according to the interruption mechanism. The verifications include interrupt vector mapping verification, dual masking control verification, and interrupt compensation logic verification.

[0007] According to another aspect of the present invention, a verification system is provided, comprising: a verification platform, the verification platform being used to perform the interrupt mechanism verification method described in any embodiment of the present invention on a device under test.

[0008] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the interrupt mechanism verification method according to any embodiment of the present invention.

[0009] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the interrupt mechanism verification method according to any embodiment of the present invention.

[0010] According to another aspect of the present invention, a computer program product is provided, the computer program product comprising a computer program that, when executed by a processor, implements the interrupt mechanism verification method described in any embodiment of the present invention.

[0011] The technical solution of this invention, by performing interrupt vector mapping verification, dual masking control verification, and interrupt compensation logic verification, solves the problem that traditional verification methods for MSI interrupt mechanisms are difficult to meet the integrity and complexity verification requirements of the MSI-X interrupt mechanism, and achieves the beneficial effect of meeting the integrity and complexity verification requirements of the MSI-X interrupt mechanism.

[0012] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0013] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0014] Figure 1 This is a flowchart illustrating an interruption mechanism verification method provided in Embodiment 1 of the present invention. Figure 2 This is a flowchart illustrating an interruption mechanism verification method provided in Embodiment 2 of the present invention; Figure 3 This is a flowchart illustrating an interruption mechanism verification method provided in Embodiment 3 of the present invention; Figure 4 This is a flowchart illustrating an interruption mechanism verification method provided in Embodiment 4 of the present invention; Figure 5 This is a schematic diagram of the structure of a verification system provided in Embodiment 5 of the present invention; Figure 6 This is a schematic diagram of another verification system provided in Embodiment 5 of the present invention; Figure 7 This is a schematic diagram of the structure of an electronic device for an interrupt mechanism verification method according to an embodiment of the present invention. Detailed Implementation

[0015] To enable those skilled in the art to better understand the present invention, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention. It should be understood that the various steps described in the method embodiments of the present invention can be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.

[0016] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0017] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0018] It should be noted that the terms "a" and "a plurality of" used in this invention are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0019] The names of the messages or information exchanged between the multiple devices in the embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of these messages or information.

[0020] Example 1 Figure 1 This is a flowchart illustrating an interrupt mechanism verification method provided in Embodiment 1 of the present invention. This method is applicable to verifying whether a device is using the MSI-X interrupt mechanism to report interrupts normally. This method can be executed by a verification system. The device can be implemented by software and / or hardware and is generally integrated on an electronic device. In this embodiment, the electronic device includes, but is not limited to, various devices that support MSI-X, such as PCIe devices.

[0021] like Figure 1 As shown, the interruption mechanism verification method provided in Embodiment 1 of the present invention includes the following steps: S110. Initialize and configure the interrupt register of the device under test using the verification platform simulation software.

[0022] The verification platform can be a UVM (Universal Verification Methodology) platform, which is a next-generation verification methodology. A UVM verification platform is a standardized verification environment built on the UVM standard for functional verification of chips or hardware modules.

[0023] Various MSI-X-supporting devices can be used as Device Under Test (DUT). For example, a PCIe device can be used as the DUT.

[0024] In this embodiment, the driver module in the verification platform can simulate the host driver to initialize the DUT interrupt register through the device memory mapping space. This ensures that the DUT's configuration state before the interrupt is triggered is consistent with the real hardware environment.

[0025] S120. For at least one interrupt event detected by the verification platform, perform corresponding verification according to the interrupt mechanism. The verification includes interrupt vector mapping verification, dual masking control verification, and interrupt compensation logic verification.

[0026] It should be noted that an interrupt event requires the execution of interrupt vector mapping verification, dual masking control verification, and interrupt compensation logic verification in sequence.

[0027] In this embodiment, the verification platform can simultaneously monitor one or more interrupt events. If only one interrupt event is detected, the verification corresponding to that interrupt event is executed. For example, if the detected interrupt event has already undergone interrupt vector mapping verification, then double masking control verification and interrupt compensation logic verification are performed on that interrupt event. If multiple interrupt events are detected, the verification corresponding to each interrupt event is executed. For example, if no verification is performed on the detected interrupt event 1, then interrupt vector mapping verification, double masking control verification, and interrupt compensation logic verification are performed sequentially on interrupt event 1. If the detected interrupt event 2 has already undergone interrupt vector mapping verification, then double masking control verification and interrupt compensation logic verification are performed on interrupt event 2. If the detected interrupt event 3 has already undergone interrupt vector mapping verification and double masking control verification, then interrupt compensation logic verification is performed on interrupt event 3. The verification platform can simultaneously perform corresponding verifications on multiple interrupt events.

[0028] Among them, interrupt vector mapping verification can be understood as verifying whether interrupt events can be correctly mapped to the corresponding interrupt vector (MSI-X vector); dual masking control verification can be understood as verifying whether interrupt events can be correctly reported through the Per-Vector Mask mechanism; interrupt compensation logic verification can be understood as verifying whether interrupt events accumulated during the masking period can be correctly reported after the masking is lifted.

[0029] The first embodiment of this invention provides an interrupt mechanism verification method. First, the interrupt register of the device under test is initialized and configured using verification platform simulation software. Then, the verification platform performs corresponding verifications based on the interrupt mechanism for at least one detected interrupt event. These verifications include interrupt vector mapping verification, dual-mask control verification, and interrupt compensation logic verification. By performing interrupt vector mapping verification, dual-mask control verification, and interrupt compensation logic verification, this method can verify whether the device can normally use the MSI-X mechanism to report interrupt events, meeting the integrity and complexity verification requirements of the MSI-X interrupt mechanism.

[0030] Example 2 Figure 2 This is a flowchart illustrating an interruption mechanism verification method provided in Embodiment 2 of the present invention. Embodiment 2 is an optimization based on the above embodiments. For details not covered in this embodiment, please refer to Embodiment 1.

[0031] like Figure 2 As shown, the interruption mechanism verification method provided in Embodiment 2 of the present invention includes the following steps: S210. Using the driver module simulation software in the verification platform, access the MSI-X vector table of different interrupt registers through the device memory mapping space, initialize the MSI-X vector table, set the enable or mask state of each interrupt vector, and initialize the pending bit.

[0032] Because the local registers of PCIe devices cannot be directly accessed by the host, they must be accessed through the address mapping mechanism of the BAR space (i.e., the device memory mapping space). The BAR is the only legal "register access entry" defined by the PCIe standard, ensuring software compatibility between devices from different manufacturers.

[0033] In this embodiment, different interrupt events have different interrupt numbers. An offset address, i.e., an interrupt vector, is formed based on the interrupt number. The DUT interrupt registers with different names are accessed based on the offset address. Different information is set in the MSI-X vector table of the DUT interrupt registers with different names.

[0034] Initializing the MSI-X vector table may involve writing the target address, data, and initial mask bit into the MSI-X vector table. The target address is the address of the target host, the data is the data to be reported to the host, and the initial mask bit is a crucial control bit in the MSI-X interrupt mechanism. It is an independent control bit for each interrupt vector, directly determining whether a particular interrupt vector can be triggered or sent to the host. Mask Bit=1 indicates that the interrupt is masked, and Mask Bit=0 indicates that the interrupt is enabled.

[0035] Setting the enable or disable status of each interrupt vector involves setting the enable or disable status of the interrupt number of each interrupt event. Typically, the interrupt numbers of the first N interrupt events are enabled, and the rest are disabled.

[0036] The initialization of the pending bits can be used to initialize the pending bits in the DUT's interrupt register, typically by clearing all pending bits. Each interrupt vector corresponds to 1 bit, and multiple bits are packed into a 32-bit word. The write operation required to clear all pending bits needs to be calculated. It should be noted that the pending bit is one or a group of binary bits in the interrupt register. When an interrupt source in the DUT is triggered (i.e., an interrupt event is generated), the hardware automatically sets the corresponding pending bit to 1, indicating that there is an interrupt event to be processed.

[0037] S220. An interruption event is captured by the monitoring component in the verification platform, and the interruption event has a corresponding interruption number.

[0038] The UVM verification platform can simulate multiple interrupt sources to trigger interrupt events. It can also wait for interrupt sources to trigger interrupt events. When an interrupt event is triggered, the DUT can send an interrupt reporting signal and an interrupt number. The monitoring component in the UVM verification platform can capture the interrupt number sent by the DUT in real time.

[0039] S230. By verifying the comparison component in the platform, the interrupt source corresponding to the interrupt number is determined according to the MSI-X vector mapping relationship.

[0040] Among them, the MSI-X vector mapping relationship can be configured in the register during initialization configuration. The MSI-X vector mapping relationship includes the mapping relationship between interrupt number and interrupt source.

[0041] S240. Verify whether the interrupt source is consistent with the expected interrupt source by using the comparison component in the verification platform.

[0042] The monitoring component in the verification platform sends the captured interrupt number to the comparison component in the UVM verification platform. The comparison component determines the interrupt source corresponding to the interrupt number based on the MSI-X vector mapping relationship. The comparison component strictly verifies whether the interrupt source mapped to the interrupt number is consistent with the expected interrupt source.

[0043] The expected interrupt source can be the actual trigger source that triggers the interrupt event.

[0044] The second embodiment of this invention provides an interrupt mechanism verification method. First, the driver module in the verification platform simulates software to access the MSI-X vector tables of different interrupt registers using the device memory mapping space. The MSI-X vector tables are initialized, and the enable or mask state of each interrupt vector is set, along with the initialization of pending bits. Second, the monitoring component in the verification platform captures interrupt events, each with a corresponding interrupt number. Then, the comparison component in the verification platform determines the interrupt source corresponding to the interrupt number based on the MSI-X vector mapping relationship. Finally, the comparison component in the verification platform verifies whether the interrupt source matches the expected interrupt source. This method, through interrupt vector mapping verification on the verification platform, can effectively verify whether the DUT can correctly map interrupt events to their corresponding interrupt vectors.

[0045] Example 3 Figure 3 This is a flowchart illustrating an interruption mechanism verification method provided in Embodiment 3 of the present invention. Embodiment 3 is an optimization based on the above embodiments. For details not covered in this embodiment, please refer to the above embodiments.

[0046] like Figure 3 As shown, the interruption mechanism verification method provided in Embodiment 3 of the present invention includes the following steps: S310. Using the driver module simulation software in the verification platform, access the MSI-X vector table of different interrupt registers through the device memory mapping space, write the message address and message data into the MSI-X vector table, and write the initial mask bit and initial pending bit.

[0047] S320: Capture interruption events through the monitoring components in the verification platform.

[0048] S330: The mask register state is dynamically modified by the driver module in the verification platform to suppress interrupt event reporting.

[0049] The mask register is used to set each interrupt vector to have an independent mask bit, or for each interrupt vector to share a global mask bit.

[0050] It should be noted that the MSI-X interrupt mechanism has per-vector mask control: each interrupt vector has an independent mask bit, and the software can individually mask the interrupt of a certain interrupt vector without affecting other interrupt vectors. At the same time, there is also a global mask that can mask all interrupt vectors at once.

[0051] In this embodiment, the driver module in the verification platform dynamically modifies the mask register state, changing the mask register state to a masked state so that a certain interrupt vector is masked or all interrupt vectors are masked.

[0052] S340. Verify whether the behavior of the device under test is correct by using the monitoring component in the verification platform.

[0053] Specifically, in the interruption-masked state, the monitoring component in the verification platform monitors whether the device under test records the interruption event in the corresponding pending bit.

[0054] In the interrupt masking state, if a new interrupt event (occurring in the interrupt masking state) is triggered, the UVM verification platform needs to monitor whether the DUT will set the Pending Bit of the interrupt vector corresponding to the interrupt event, i.e., set the Pending Bit to 1. A Pending Bit of 1 indicates that "an interrupt event has occurred but has not yet been reported or processed." Embodiment 3 of this invention provides an interrupt mechanism verification method. First, the driver module in the verification platform simulates software to access the MSI-X vector tables of different interrupt registers using the device memory mapping space. Message addresses and message data are written into the MSI-X vector tables, along with initial mask bits and initial pending bits. Second, the monitoring component in the verification platform captures the interrupt event. Then, the driver module in the verification platform dynamically modifies the mask register state to suppress interrupt event reporting. Finally, the monitoring component in the verification platform verifies whether the behavior of the device under test is correct. This method performs dual-mask control verification through the verification platform, enabling verification of whether the DUT can collaboratively report interrupt events through the Per-Vector Mask mechanism.

[0055] Example 4 Figure 4 This is a flowchart illustrating an interruption mechanism verification method provided in Embodiment 4 of the present invention. Embodiment 4 is an optimization based on the above embodiments. For details not covered in this embodiment, please refer to the above embodiments.

[0056] like Figure 4 As shown, the interruption mechanism verification method provided in Embodiment 4 of the present invention includes the following steps: S410. Using the driver module simulation software in the verification platform, access the MSI-X vector table of different interrupt registers through the device memory mapping space, write the message address and message data into the MSI-X vector table, and write the initial mask bit and initial pending bit.

[0057] S420: Capture interruption events through the monitoring components in the verification platform.

[0058] S430. After the interrupt processing is completed and the device enters the interrupt enabled state through the verification platform, the device under test is verified to correctly report the interrupt events detected in the shielded state.

[0059] Specifically, the verification platform verifies whether the device under test correctly reports the interrupt events detected in the shielded state after the interrupt processing is completed and the device enters the interrupt enabled state. This includes: monitoring whether the device under test triggers a compensation interrupt event after the interrupt processing is completed and the device enters the interrupt enabled state through the monitoring component in the verification platform; and verifying whether the interrupt source corresponding to the interrupt event detected during the shielded state is correct through the comparison component in the verification platform based on the MSI-X vector mapping relationship.

[0060] Specifically, the monitoring component in the verification platform monitors interrupt events that are suspended and recorded in PendingBit when the shield is lifted and the DUT is in the enabled state. It also monitors whether the DUT triggers a compensation interrupt event at the next reporting time when the shield is lifted and the DUT is in the enabled state. That is, it monitors whether the DUT sends an interrupt reporting signal and interrupt number after the PendingBit is cleared.

[0061] Specifically, the monitoring component in the verification platform captures the interrupt number, and the comparison component determines whether the interrupt source corresponding to the interrupt number is consistent with the expected interrupt source based on the MSI-X vector mapping relationship, i.e., verifying whether the correct interrupt event is reported. If the verification is correct, the DUT accesses the corresponding interrupt register according to the interrupt vector formed by the interrupt number, and sends the data in the MSI-X vector table in the interrupt register to the target address in the MSI-X vector table so that the interrupt event is notified to the host.

[0062] The fourth embodiment of this invention provides an interrupt mechanism verification method. First, the driver module in the verification platform simulates software and accesses the MSI-X vector tables of different interrupt registers using the device memory mapping space. Message addresses and message data are written into the MSI-X vector tables, along with initial mask bits and initial pending bits. Then, the monitoring component in the verification platform captures interrupt events. Finally, the verification platform verifies whether the device under test (DUT) correctly reports interrupt events detected during the masked state after interrupt processing and entering the interrupt enabled state. This method, through interrupt compensation logic verification performed by the verification platform, effectively verifies whether the DUT can correctly report interrupt events accumulated during the masking period after the masking is lifted.

[0063] Example 5 Figure 5 This is a schematic diagram of a verification system provided in Embodiment 5 of the present invention. The system is applicable to verifying whether the device is using the MSI-X interrupt mechanism to report interrupts normally. The device can be implemented by software and / or hardware and is generally integrated on electronic devices.

[0064] like Figure 5 As shown, the system includes a verification platform 110, and the testing platform is used to perform the interrupt mechanism verification method provided in any embodiment of the present invention on the device under test 120.

[0065] The verification platform can be a UVM verification platform.

[0066] The verification platform simulation software initializes and configures the interrupt register of the device under test; the verification platform performs corresponding verifications according to the interrupt mechanism for at least one detected interrupt event, including interrupt vector mapping verification, dual masking control verification, and interrupt compensation logic verification.

[0067] This embodiment provides a verification system that can verify whether a device can normally use the MSI-X mechanism to report interrupt events, thus meeting the integrity and complexity verification requirements of the MSI-X interrupt mechanism.

[0068] Figure 6 This is a schematic diagram of another verification system provided in Embodiment 5 of the present invention, as shown below. Figure 6 As shown, the verification platform includes a driver module 111, a monitoring component 112, and a comparison component 113. The monitoring component 112 is connected to the driver module 111 and the comparison component 113 respectively, and the device under test 120 is connected to the detection module 112 and the driver module 113 respectively.

[0069] In one embodiment, the driver module 111 is used to simulate software, access the MSI-X vector table of different interrupt registers using the device memory mapping space, initialize the MSI-X vector table, set the enable or mask state of each interrupt vector, and initialize the pending bit.

[0070] In one embodiment, a monitoring component 112 is used to capture an interrupt event, the interrupt event having a corresponding interrupt number; a comparison component is used to determine the interrupt source corresponding to the interrupt number according to the MSI-X vector mapping relationship; the comparison component is also used to verify whether the interrupt source is consistent with the expected interrupt source.

[0071] In one embodiment, the driver module 111 is used to dynamically modify the mask register state to suppress interrupt event reporting; the monitoring component 112 is used to verify whether the behavior of the device under test is correct; wherein, the mask register is used to set each interrupt vector to have an independent mask bit, or each interrupt vector to share a global mask bit.

[0072] In one embodiment, the monitoring component 112 is specifically used to monitor whether the device under test records the interrupt event in the corresponding pending bit when the interrupt is masked.

[0073] In one embodiment, the verification platform is used to verify whether the device under test correctly reports the interrupt events detected in the shielded state after the interrupt handling is completed and the device enters the interrupt enabled state.

[0074] In one embodiment, the monitoring component 112 is used to monitor whether the device under test triggers a compensation interrupt event after entering the interrupt enable state after the interrupt processing is completed; the comparison component 113 is used to verify whether the interrupt source corresponding to the interrupt event monitored during the shielding state is correct according to the MSI-X vector mapping relationship.

[0075] The above verification system can execute the interruption mechanism verification method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0076] Example 6 Figure 7 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The term "electronic device" is intended to represent various MSI-X-enabled electronic devices, such as PCIe devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0077] like Figure 7 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0078] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0079] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as interrupt mechanism verification methods.

[0080] In some embodiments, the interrupt mechanism verification method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the interrupt mechanism verification method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the interrupt mechanism verification method by any other suitable means (e.g., by means of firmware).

[0081] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0082] In some embodiments, the interrupt mechanism verification method may be implemented as a computer program, which is implicitly included in a computer program product. When executed by a processor, the computer program implements the interrupt mechanism verification method of the present invention. The computer program product can be understood as a software product that primarily implements its solution through a computer program. The computer program used to implement the method of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer program causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a standalone software package, or entirely on a remote machine or server.

[0083] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0084] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0085] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0086] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0087] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0088] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for verifying an interruption mechanism, characterized in that, The method includes: The interrupt register of the device under test is initialized and configured using the verification platform simulation software. The verification platform performs corresponding verifications on at least one detected interruption event according to the interruption mechanism. The verifications include interrupt vector mapping verification, dual masking control verification, and interrupt compensation logic verification.

2. The method according to claim 1, characterized in that, The initialization configuration of the interrupt register of the device under test through the verification platform simulation software includes: By simulating the driver module software in the verification platform, the MSI-X vector table of different interrupt registers is accessed using the device memory mapping space, the MSI-X vector table is initialized, the enable or mask state of each interrupt vector is set, and the pending bit is initialized.

3. The method according to claim 1 or 2, characterized in that, The interrupt vector mapping verification includes: capturing interrupt events through a monitoring component in the verification platform, wherein the interrupt events have corresponding interrupt numbers; By verifying the comparison component in the platform, the interrupt source corresponding to the interrupt number is determined according to the MSI-X vector mapping relationship; The comparison component in the verification platform verifies whether the interrupt source is consistent with the expected interrupt source.

4. The method according to claim 1 or 2, characterized in that, The dual-shielding control verification includes: The mask register state is dynamically modified by the driver module in the verification platform to suppress interrupt event reporting; The monitoring component in the verification platform is used to verify whether the behavior of the device under test is correct. The mask register is used to set each interrupt vector to have an independent mask bit, or for each interrupt vector to share a global mask bit.

5. The method according to claim 4, characterized in that, The step of verifying whether the behavior of the device under test is correct through the monitoring component in the verification platform includes: In the interrupt masking state, the monitoring component in the verification platform monitors whether the device under test records the interrupt event in the corresponding pending bit.

6. The method according to claim 1 or 2, characterized in that, The interruption compensation logic verification includes: After the interrupt handling is completed and the device enters the interrupt enabled state, the verification platform verifies whether the device under test correctly reports the interrupt events detected in the shielded state.

7. The method according to claim 6, characterized in that, After the verification platform verifies that the interrupt handling is completed and the device enters the interrupt enabled state, whether the device under test correctly reports the interrupt events detected in the shielded state, including: The monitoring component in the verification platform monitors whether the device under test triggers a compensation interrupt event after the interrupt processing is completed and the device enters the interrupt enable state. By verifying the comparison component in the verification platform according to the MSI-X vector mapping relationship, it is confirmed whether the interrupt source corresponding to the interrupt event monitored during the masking state is correct.

8. A verification system, characterized in that, The system includes a verification platform for performing the interrupt mechanism verification method as described in any one of claims 1-7 on the device under test.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the interrupt mechanism verification method according to any one of claims 1-7.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the interrupt mechanism verification method according to any one of claims 1-7.