UVM-based intra-core interrupt processing system verification method, device and equipment
Through the interaction between the UVM verification platform and the chip processor core, the interrupt processing function is called using the interrupt number and register address in the storage space, which solves the problem of insufficient performance of the interrupt processing system in the kernel in the traditional verification method, and achieves efficient verification performance and reality sex.
Patent Information
- Application Number
- CN202410998535.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-11-15
AI Technical Summary
In traditional chip development, the verification performance of the in-core interrupt processing system is insufficient, and it is impossible to meet the interactiveness and flexibility requirements of the verification of real interrupt processing programs and test cases.
Using the UVM-based in-core interrupt processing system verification method, the UVM verification platform interacts with the processor core of the chip to be verified, and uses the interrupt number and register address in the storage space to call and execute the interrupt processing function to realize the real interrupt processing program. Verify and give full play to the flexibility and convenience of the UVM platform during the verification process.
It improves the verification performance of the in-core interrupt processing system, meets the requirements of authenticity and interactivity, and realizes a fast, flexible and reusable verification process.
Smart Images

Figure CN118964188A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of chip verification, and relates to a UVM-based intra-core interrupt processing system verification method, device and equipment. Background Art
[0002] As the demand for chips increases, the requirements for chip development speed are getting higher and higher. In the process of developing a chip with a processor core, it is more difficult to verify the interrupt processing system in the core. One of the traditional verification technologies is to use VIP (Verification Intellectual Property, Verification IP) to replace the core to send commands. This method has the advantages of fast verification and good interactivity with test cases, but the disadvantage is that it cannot call the interrupt handler of the real interrupt processing system. Another traditional verification technology is to add a whole set of compilers to the verification platform, compile each test case into a hex file in advance, and then let the core load and execute it. Although the real interrupt handler can be called, the interactivity between the interrupt handler and the test case is poor, and the simulation speed is slow and the debugging flexibility is poor. Therefore, the traditional verification technology still has the technical problem of insufficient verification performance of the interrupt processing system. Summary of the invention
[0003] In view of the problems existing in the above-mentioned traditional methods, the present invention proposes a UVM-based intra-core interrupt processing system verification method, a UVM-based intra-core interrupt processing system verification device and a computer device, which can effectively improve the verification performance of the interrupt processing system.
[0004] In order to achieve the above objectives, the embodiments of the present invention adopt the following technical solutions:
[0005] On the one hand, a method for verifying an intra-core interrupt processing system based on UVM is provided, comprising the steps of:
[0006] When the processor of the chip to be verified enters the interrupt handling program, the processor core writes the current non-zero interrupt number into the first storage space; wherein, when the test case of the UVM verification platform is checked through the backdoor to be a non-zero value in the first storage space, the interrupt handling function corresponding to the interrupt number is called according to the interrupt number transmitted by the first storage space, and the register address and data corresponding to the interrupt handling are written to the third storage space, and then 1 is written to the second storage space;
[0007] When it is checked that the first storage space is not 0 and the second storage space is 1, the register address and data of the third storage space are read to execute the content of the interrupt processing function of the test case;
[0008] After the execution is completed, write 0 to the second storage space, and check whether the first storage space is 0; wherein, after the test case of the UVM verification platform calls the interrupt processing function, write 0 to the first storage space;
[0009] When it is detected that the first storage space is 0, the interrupt processing program of this time is exited and the next interrupt verification is waited.
[0010] On the other hand, a UVM-based intra-core interrupt processing system verification device is also provided, comprising:
[0011] The interrupt entry module is used for when the processor of the chip to be verified enters the interrupt handling program, the processor core writes the current non-zero interrupt number into the first storage space; wherein, when the test case of the UVM verification platform is used to check through the back door that the first storage space is a non-zero value, the interrupt handling function corresponding to the interrupt number is called according to the interrupt number transmitted by the first storage space, and the register address and data corresponding to the interrupt handling are written to the third storage space, and then 1 is written to the second storage space;
[0012] A content execution module, configured to read the register address of the third storage space and the content of the interrupt processing function of the data execution test case when checking that the first storage space is not 0 and the second storage space is 1;
[0013] An execution check module is used to write 0 to the second storage space after execution is completed, and check whether the first storage space is 0; wherein, after the test case of the UVM verification platform calls the interrupt processing function, 0 is written to the first storage space;
[0014] The interrupt exit module is used to exit the current interrupt processing program when checking that the first storage space is 0, and wait for the next interrupt verification.
[0015] On the other hand, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned UVM-based intra-core interrupt processing system verification method when executing the computer program.
[0016] One of the above technical solutions has the following advantages and beneficial effects:
[0017] The above-mentioned UVM-based in-core interrupt processing system verification method, device and equipment realize the execution of the content to be processed by the interrupt processing program of the processor core of the chip to be verified in the test case of the UVM verification platform through the interaction between the UVM verification platform and the interrupt processing program of the processor of the chip to be verified. It not only uses the real interrupt processing program in the processor core of the chip to be verified, but also uses the test case interaction of the UVM verification platform, which not only meets the verification authenticity requirements of the chip to be verified, but also effectively gives play to the characteristics of strong flexibility, high convenience and strong reusability of the UVM verification platform in the verification process of the chip to be verified, thereby effectively improving the verification performance of the in-core interrupt processing system of the chip to be verified. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the conventional technology, the drawings required for use in the embodiments or the conventional technology descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0019] Figure 1 A schematic flow chart of a method for verifying an intra-core interrupt processing system based on UVM in one embodiment;
[0020] Figure 2 It is a schematic diagram of the application flow of a method for verifying an intra-core interrupt processing system based on UVM in one embodiment;
[0021] Figure 3 The module framework diagram of a UVM-based intra-core interrupt processing system verification device in one embodiment is shown. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with the accompanying drawings and Examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by those skilled in the art of the present invention. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0023] It should be noted that the reference to "embodiment" in this article means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present invention. The presentation of this phrase at various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It will be appreciated by those skilled in the art that the embodiments described herein may be combined with other embodiments. The term "and / or" used in the specification of the present invention and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.
[0024] The following will describe the implementation of the present invention in detail with reference to the accompanying drawings in the embodiment diagram of the present invention.
[0025] In one embodiment, Figure 1 As shown, a method for verifying an intra-core interrupt processing system based on UVM is provided, which may include the following processing steps S12 to S18:
[0026] S12, when the processor of the chip to be verified enters the interrupt handling program, the processor core writes the current non-zero interrupt number into the first storage space; wherein, when the test case of the UVM verification platform is checked through the backdoor to be a non-zero value in the first storage space, the interrupt handling function corresponding to the interrupt number is called according to the interrupt number transmitted by the first storage space, and the register address and data corresponding to the interrupt handling are written to the third storage space, and then 1 is written to the second storage space;
[0027] S14, when it is checked that the first storage space is not 0 and the second storage space is 1, read the register address of the third storage space and the content of the interrupt processing function of the data execution test case;
[0028] S16, after the execution is completed, write 0 to the second storage space, and check whether the first storage space is 0; wherein, after the test case of the UVM verification platform calls the interrupt processing function, write 0 to the first storage space;
[0029] S18, when it is checked that the first storage space is 0, the interrupt processing program of this time is exited and the next interrupt verification is waited.
[0030] It can be understood that a fixed program is used in the present embodiment, and its function is to enable the processor core of the chip to be verified to execute a real interrupt handling system, and the test case of the UVM verification platform based on UVM platform development is used to realize the calling and execution of the interrupt handling function, which can inherit the advantages of UVM verification platform such as flexibility and speed. The flow and description of the specific implementation of this fixed program are shown below.
[0031] Specifically, Figure 2As shown, whenever the processor of the chip to be verified has entered the interrupt handling program, the processor core of the chip to be verified will put the interrupt number of this interruption in the first storage space. At this time, in the run_phase stage of the base class test case of the UVM verification platform, the test case continuously checks whether the first storage space has a non-zero value through the backdoor, if a non-zero value is read, it is proved that the processor core of the chip to be verified has entered the interrupt handling program, and the UVM verification platform has also captured the interrupt number of this interruption. Wherein, the run_phase stage of the base class test case is a key stage of the UVM verification platform, for performing specific simulation and verification tasks, and run_phase is one of phases defaulted in UVM, responsible for actual simulation operation, including initialization, generating incentives, collecting and checking responses, etc.
[0032] Then the UVM verification platform can let each test case execute the corresponding interrupt processing function, that is, execute the content to be processed in the interrupt handler in the UVM verification platform, for example, test case A calls interrupt function 1 and clears interrupt 1; test case B calls interrupt function 2 and clears interrupt 2; test case X calls interrupt function x and clears interrupt x.
[0033] The base class function of the UVM verification platform will write the execution content (i.e., the corresponding register address and data) processed in the derived interrupt handling function into the third storage space through the backdoor. Each operation will first read whether the second storage space is 0. If it is 0, the execution content will be written into the third storage space, and then the second storage space will be written 1 after writing. At this time, the processor core of the chip to be verified reads the second storage space. When the second storage space is read as 1, the processor core of the chip to be verified executes the content of the interrupt function of the test case according to the register address and data in the third storage space. After the execution is completed, the processor core of the chip to be verified writes 0 into the second storage space, thus completing the interaction of an execution operation.
[0034] It can be understood that in the above process, the processor core of the chip to be verified reads 1 and writes 0 to the second storage space. After the processor core of the chip to be verified reads 1, it reads the content in the third storage space and executes it. After the execution is completed, it writes 0 to the second storage space; the UVM verification platform reads 0 and writes 1 to the second storage space, and then writes the content to the third storage space. On the contrary, the processor core of the chip to be verified here can also read 0 and write 1 to the second storage space, and it is also possible to let the UVM verification platform read 1 and write 0 to the second storage space, as long as the verification process shown above can be implemented; but in this case, the processor core of the chip to be verified executes after reading the content in the third storage space, and the content in the third storage space here is written by the interrupt processing function called by the test case in the UVM verification platform.
[0035] The interrupt handling function derived from the test case of the UVM verification platform does not perceive the underlying interaction of the processor of the chip to be verified. It only needs to perform the required interrupt operation and clear the interrupt in the test case to execute the subsequent existing content of the test case. After the interrupt handling function of the test case is processed, write 0 to the first storage space. At this time, after the processor core of the chip to be verified reads the first storage space as 0, the interrupt handling function is exited, and the interrupt handling is completed. The UVM verification platform continues to wait for the next interrupt handling.
[0036] The above-mentioned UVM-based intra-core interrupt processing system verification method realizes the execution of the content to be processed by the interrupt processing program of the processor core of the chip to be verified in the test case of the UVM verification platform through the interaction between the UVM verification platform and the interrupt processing program of the processor of the chip to be verified. It not only uses the real interrupt processing program in the processor core of the chip to be verified, but also uses the test case interaction of the UVM verification platform, which not only meets the verification authenticity requirement of the chip to be verified, but also effectively brings into play the characteristics of strong flexibility, high convenience and strong reusability of the UVM verification platform in the verification process of the chip to be verified, thereby effectively improving the verification performance of the intra-core interrupt processing system of the chip to be verified.
[0037] In one embodiment, the above-mentioned UVM-based in-core interrupt processing system verification method may also include the following processing steps:
[0038] When it is checked that the second storage space is 0, return to check whether the first storage space is 0.
[0039] It is understandable that Figure 2 As shown, when the processor core of the chip to be verified checks that the first storage space is not 0, it will then check whether the second storage space is 0, if not 0, it means that the test case of the UVM verification platform has completed writing execution content to the third storage space and writing 1 to the second storage space, and at this time the processor core of the chip to be verified can read the content in the third storage space and execute; on the contrary, when the processor core of the chip to be verified checks that the first storage space is not 0, but then checks that the second storage space is 0, it means that the test case of the UVM verification platform has not yet completed the process of writing execution content to the third storage space and writing 1 to the second storage space, and at this time the processor of the chip to be verified just needs to return to the step of checking whether it is 0 in the first storage space, to wait for the test case of the UVM verification platform to complete writing execution content to the third storage space and writing 1 to the second storage space, to avoid the verification process from being stuck or making mistakes.
[0040] In one embodiment, when the test case of the UVM verification platform is used to check through the backdoor that the first storage space is not a non-zero value, the processor of the chip to be verified is waited to enter the interrupt processing program to write a non-zero interrupt number into the first storage space.
[0041] It can be understood that in the test case running process of UVM verification platform, the test case of UVM verification platform continuously checks whether it is a non-zero value in the first storage space through the back door, to accurately judge whether the processor of the chip to be verified currently enters the interrupt handling program. If the test case of UVM verification platform is not a non-zero value in the first storage space through the back door inspection, it means that the processor of the chip to be verified does not currently enter the interrupt handling program, and the UVM verification platform needs to continue to wait for the processor of the chip to be verified to enter the interrupt handling program, and then the interrupt number that the processor of the chip to be verified is transmitted by the first storage space can be obtained, and then subsequent interrupt processing can be accurately performed.
[0042] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but the steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of the steps, and the steps can be executed in other orders. Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0043] In one embodiment, Figure 3As shown, a UVM-based intra-core interrupt processing system verification device 100 is also provided, including an interrupt entry module 11, a content execution module 13, an execution check module 15 and an interrupt exit module 17. Among them, the interrupt entry module 11 is used when the processor of the chip to be verified enters the interrupt processing program, and the processor core writes the current non-zero interrupt number into the first storage space; wherein, when the test case of the UVM verification platform is used to check the non-zero value in the first storage space through the backdoor, the interrupt processing function corresponding to the interrupt number is called according to the interrupt number transmitted by the first storage space, and the register address and data corresponding to the interrupt processing are written to the third storage space, and then 1 is written to the second storage space. The content execution module 13 is used to read the register address and data of the third storage space to execute the content of the interrupt processing function of the test case when it is checked that the first storage space is not 0 and the second storage space is checked to be 1. The execution check module 15 is used to write 0 to the second storage space after execution is completed, and check whether the first storage space is 0; wherein, the test case of the UVM verification platform writes 0 to the first storage space after the interrupt processing function is called. The interrupt exit module 17 is used to exit the current interrupt processing program when checking that the first storage space is 0, and wait for the next interrupt verification.
[0044] The above-mentioned UVM-based intra-core interrupt processing system verification device 100, through the interaction between the UVM verification platform and the interrupt processing program of the processor of the chip to be verified, realizes the execution of the content to be processed by the interrupt processing program of the processor core of the chip to be verified in the test case of the UVM verification platform, not only uses the real interrupt processing program in the processor core of the chip to be verified, but also uses the test case interaction of the UVM verification platform, which not only meets the verification authenticity requirements of the chip to be verified, but also effectively gives play to the characteristics of strong flexibility, high convenience and strong reusability of the UVM verification platform in the verification process of the chip to be verified, thereby effectively improving the verification performance of the intra-core interrupt processing system of the chip to be verified.
[0045] In one embodiment, the UVM-based intra-core interrupt processing system verification device 100 may further include a check jump module, which is used to return to check whether the first storage space is 0 when checking that the second storage space is 0.
[0046] In one embodiment, when the test case of the UVM verification platform is used to check through the backdoor that the first storage space is not a non-zero value, the processor of the chip to be verified is waited to enter the interrupt processing program to write a non-zero interrupt number into the first storage space.
[0047] The specific limitation of the intra-core interrupt processing system verification device 100 based on UVM can be referred to the limitation of the intra-core interrupt processing system verification method based on UVM in the above text, which will not be repeated here. Each module in the above-mentioned intra-core interrupt processing system verification device 100 based on UVM can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor calls and executes the operations corresponding to the above modules.
[0048] In one embodiment, a computer device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the following processing steps when executing the computer program: when the processor of the chip to be verified enters the interrupt processing program, the processor core writes the interrupt number of the current non-zero value into the first storage space; wherein, when the test case of the UVM verification platform is used to check through the backdoor that the first storage space is a non-zero value, the interrupt processing function corresponding to the interrupt number is called according to the interrupt number transmitted by the first storage space, and the register address and data corresponding to the interrupt processing are written to the third storage space, and then 1 is written to the second storage space; when it is checked that the first storage space is not 0 and the second storage space is checked to be 1, the register address and data of the third storage space are read to execute the content of the interrupt processing function of the test case; after the execution is completed, 0 is written to the second storage space, and it is checked whether the first storage space is 0; wherein, after the test case of the UVM verification platform calls the interrupt processing function and completes the processing, 0 is written to the first storage space; when it is checked that the first storage space is 0, the interrupt processing program of this time is exited, and the next interrupt verification is waited.
[0049] It can be understood that in addition to the above-mentioned memory and processor, the above-mentioned computer device may also include other software and hardware components not listed in this specification, which can be determined according to the specific computer model in different application scenarios, and this specification will not list them one by one in detail.
[0050] In one embodiment, when the processor executes the computer program, the added steps or sub-steps in each embodiment of the above-mentioned UVM-based intra-core interrupt processing system verification method can also be implemented.
[0051] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following processing steps are implemented: when the processor of the chip to be verified enters the interrupt processing program, the processor core writes the interrupt number of the current non-zero value into the first storage space; wherein, when the test case of the UVM verification platform is used to check through the backdoor that the first storage space is a non-zero value, the interrupt processing function corresponding to the interrupt number is called according to the interrupt number transmitted by the first storage space, and the register address and data corresponding to the interrupt processing are written to the third storage space, and then 1 is written to the second storage space; when it is checked that the first storage space is not 0 and the second storage space is checked to be 1, the register address and data of the third storage space are read to execute the content of the interrupt processing function of the test case; after the execution is completed, 0 is written to the second storage space, and it is checked whether the first storage space is 0; wherein, after the test case of the UVM verification platform calls the interrupt processing function and completes the processing, 0 is written to the first storage space; when it is checked that the first storage space is 0, the interrupt processing program of this time is exited, and the next interrupt verification is waited.
[0052] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus dynamic random access memory (RambusDRAM, referred to as RDRAM) and interface dynamic random access memory (DRDRAM).
[0053] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0054] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of protection of the invention. It should be pointed out that, for those of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the attached claims.
Claims
1. A UVM-based in-core interrupt processing system verification method, It is characterized in that Includes steps: When the processor of the chip to be verified enters the interrupt handling program, the processor core writes the current non-zero interrupt number into the first storage space; wherein, when the test case of the UVM verification platform is checked through the backdoor to be a non-zero value in the first storage space, the interrupt handling function corresponding to the interrupt number is called according to the interrupt number transmitted by the first storage space, and the register address and data corresponding to the interrupt handling are written to the third storage space, and then 1 is written to the second storage space; When it is checked that the first storage space is not 0 and the second storage space is 1, read the register address and data of the third storage space to execute the content of the interrupt processing function of the test case; After the execution is completed, write 0 to the second storage space, and check whether the first storage space is 0; wherein, after the test case of the UVM verification platform calls the interrupt processing function, write 0 to the first storage space; When it is detected that the first storage space is 0, the interrupt processing program of this time is exited and the next interrupt verification is waited.
2. The method for verifying the intra-core interrupt processing system based on UVM according to claim 1, It is characterized in that Also includes the steps: When it is checked that the second storage space is 0, return to check whether the first storage space is 0.
3. The method for verifying the intra-core interrupt processing system based on UVM according to claim 1 or 2, It is characterized in that When the test case of the UVM verification platform is checked through the backdoor to find that the first storage space is not a non-zero value, the processor of the chip to be verified is waited to enter the interrupt processing program to write an interrupt number of a non-zero value into the first storage space.
4. A UVM-based in-core interrupt processing system verification device, It is characterized in that include: An interrupt entry module is used for when the processor of the chip to be verified enters the interrupt handling program, the processor core writes the current non-zero interrupt number into the first storage space; wherein, when the test case of the UVM verification platform is checked through the backdoor to be a non-zero value in the first storage space, the interrupt handling function corresponding to the interrupt number is called according to the interrupt number transmitted by the first storage space, and the register address and data corresponding to the interrupt handling are written to the third storage space, and then 1 is written to the second storage space; A content execution module, configured to read the register address and data of the third storage space to execute the content of the interrupt processing function of the test case when checking that the first storage space is not 0 and the second storage space is 1; An execution check module is used to write 0 to the second storage space after execution is completed, and check whether the first storage space is 0; wherein, after the test case of the UVM verification platform calls the interrupt processing function, 0 is written to the first storage space; The interrupt exit module is used to exit the current interrupt processing program when checking that the first storage space is 0, and wait for the next interrupt verification.
5. The UVM-based intra-core interrupt processing system verification device according to claim 4, It is characterized in that Also includes: The checking jump module is used to return to check whether the first storage space is 0 when checking that the second storage space is 0.
6. The UVM-based intra-core interrupt processing system verification device according to claim 4 or 5, It is characterized in that When the test case of the UVM verification platform is checked through the backdoor to find that the first storage space is not a non-zero value, the processor of the chip to be verified is waited to enter the interrupt handling program to write an interrupt number of a non-zero value into the first storage space.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the UVM-based in-core interrupt processing system verification method according to any one of claims 1 to 3 are implemented.
