Verification agent generation method and device, electronic equipment and storage medium

By parsing microarchitecture documents to extract interface information and generate verification proxy code, the problem of low efficiency of manually written code in UVM verification is solved, and accuracy and efficiency are improved.

CN118779175APending Publication Date: 2024-10-15SHANGHAI BIREN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410804739.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

The verification agent code in the existing UVM verification method is highly specific and requires engineers to manually write a large amount of constraint code. Miswriting is prone to lead to verification loopholes and omissions, resulting in low verification efficiency.

Method used

Interface information is extracted by parsing the microarchitecture document of the device under test, and verification agent code is generated based on the component class template file, including domain segment constraint information. Accurate verification agent code is directly generated to avoid manual writing and checking.

Benefits of technology

It improves the verification efficiency of the device under test, ensures the accuracy of constraint information, reduces verification loopholes and omissions, and reduces the workload of verification engineers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779175A_ABST
    Figure CN118779175A_ABST
Patent Text Reader

Abstract

The invention provides a verification agent generation method and device, electronic equipment and a storage medium, and relates to the technical field of chip design and manufacturing, and the verification agent generation method comprises the steps: analyzing a micro-architecture document of a to-be-tested device, and extracting interface information of the to-be-tested device; the interface information comprises domain constraint information; on the basis of a component class template file corresponding to a verification agent and the interface information, generating a code corresponding to each component in the verification agent and a code corresponding to a transaction data packet; the code corresponding to the transaction data packet comprises the code corresponding to the domain segment constraint information; and determining a code corresponding to the verification agent based on the code corresponding to each component and the code corresponding to the transaction data packet. According to the method and the device provided by the invention, the verification efficiency of the to-be-tested device is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of chip design and manufacturing, and in particular to a verification agent generation method, device, electronic device and storage medium. Background Art

[0002] Universal Verification Methodology (UVM) is a currently popular verification technology. UVM-based verification requires engineers to manually write verification agent codes according to the module functions they need to verify to complete the stimulation of the device under test (DUT).

[0003] In the related art, the verification proxy code is highly specialized, and verification engineers are required to manually write a large amount of constraint code according to the functions. Since the verification engineers may have an incorrect understanding of the functions, the constraint code is inaccurate, resulting in over-constraints, verification vulnerabilities, and missed program errors (bugs). In order to avoid over-constraints, verification engineers and design engineers need to conduct a lot of reviews, which wastes a lot of working time.

[0004] Therefore, how to improve the verification efficiency of devices under test has become a technical problem that needs to be solved urgently in the industry. Summary of the invention

[0005] The present application provides a verification agent generation method, device, electronic device and storage medium, which are used to solve the technical problem of how to improve the verification efficiency of a device to be tested.

[0006] The present application provides a verification agent generation method, comprising: Parsing the micro-architecture document of the device to be tested, and extracting the interface information of the device to be tested; the interface information includes domain segment constraint information; Based on the component class template file corresponding to the verification agent and the interface information, the code corresponding to each component in the verification agent and the code corresponding to the transaction data packet are generated; the code corresponding to the transaction data packet includes the code corresponding to the domain segment constraint information; Based on the codes corresponding to the various components and the code corresponding to the transaction data packet, the code corresponding to the verification agent is determined.

[0007] In some embodiments, the interface information is stored in the micro-architecture document in a structured data format.

[0008] In some embodiments, the interface information includes an interface name, interface bit width information, a domain segment, bit width information corresponding to the domain segment, and domain segment constraint information corresponding to the domain segment.

[0009] In some embodiments, the domain segment constraint information is stored in the interface information in code form.

[0010] In some embodiments, the domain segment constraint information includes at least one of value constraint information, distribution constraint information and condition constraint information.

[0011] In some embodiments, the generating of codes corresponding to each component in the verification agent and codes corresponding to the transaction data packet based on the component class template file corresponding to the verification agent and the interface information includes: Input each component class template file corresponding to the verification agent and the interface information into the class generator, and obtain the code corresponding to each component output by the class generator and the code corresponding to the transaction data packet.

[0012] The present application provides a verification agent generation device, comprising: An extraction module is used to parse the micro-architecture document of the device under test and extract the interface information of the device under test; the interface information includes domain segment constraint information; A generation module, used to generate codes corresponding to each component in the verification agent and codes corresponding to a transaction data packet based on a component class template file corresponding to the verification agent and the interface information; the codes corresponding to the transaction data packet include codes corresponding to the domain segment constraint information; The determination module is used to determine the code corresponding to the verification agent based on the codes corresponding to the various components and the code corresponding to the transaction data packet.

[0013] The present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the verification agent generation method when executing the computer program.

[0014] The present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, and the computer program implements the verification agent generation method when executed by a processor.

[0015] The present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, the verification agent generation method is implemented.

[0016] The verification agent generation method provided in the embodiment of the present application parses the micro-architecture document of the device to be tested and extracts the interface information of the device to be tested; based on the component class template file corresponding to the verification agent and the interface information, generates the code corresponding to each component in the verification agent and the code corresponding to the transaction data packet; based on the code corresponding to each component and the code corresponding to the transaction data packet, determines the code corresponding to the verification agent; since the code corresponding to the domain segment constraint information is directly generated according to the domain segment constraint information in the micro-architecture document, it is equivalent to using the micro-architecture document as a standard reference file (golden file), which ensures the accuracy of the constraint information, so that the verification engineer does not need to manually write the verification agent code according to the module function he needs to verify, and does not need to check with the design engineer, thereby improving the verification efficiency of the device to be tested. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0018] In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0019] Figure 1 This is one of the flow charts of the verification agent generation method provided in this application.

[0020] Figure 2 This is the second flowchart of the verification agent generation method provided by this application.

[0021] Figure 3 It is a structural diagram of the verification agent generation device provided in this application.

[0022] Figure 4 It is a structural schematic diagram of the electronic device provided by this application. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0024] It should be noted that the terms "first", "second" etc. in the present application are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable in appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, the process, method, system, product or equipment comprising a series of steps or units or modules need not be limited to those steps or units or modules clearly listed, but may include other steps or units or modules that are not clearly listed or inherent to these processes, methods, products or equipment.

[0025] As chip performance improves, the scale of chip design is getting larger and larger, and the reliance on verification is getting higher and higher. The UVM verification platform based on UVM verification methodology is widely used in chip verification for functional verification of the chip under test. UVM verification is a mainstream verification method. It provides a reusable, hierarchical verification platform framework with clear hierarchy, flexibility, ease of use, and scalability. It has become the standard for chip industry verification.

[0026] UVM-based verification requires verification engineers to manually write verification agent code according to the module functions they need to verify to complete the stimulus for the device under test. In order to avoid over-constraint, verification engineers and design engineers need to conduct a lot of checks, which affects the verification efficiency.

[0027] In order to solve the shortcomings of related technologies, Figure 1 This is one of the flow charts of the verification agent generation method provided by this application, such as Figure 1 As shown, the method includes step 110 , step 120 and step 130 .

[0028] Step 110 , parse the micro-architecture document of the device under test and extract the interface information of the device under test; the interface information includes domain constraint information.

[0029] Specifically, the execution subject of the verification agent generation method provided in the embodiment of the present application is a verification agent generation device. The device can be implemented by software, such as a verification agent generation program; or it can be a device that executes the verification agent generation method, such as a mobile terminal, a tablet computer, a desktop computer or a server.

[0030] The device under test (DUT) is an electronic device such as a chip or integrated circuit that verification engineers need to perform functional verification on. The Micro Architecture Specification (MAS) is a technical document that describes the internal design and implementation details of the DUT in detail, usually including the structure, functional units, data paths, control logic, cache hierarchy, and other key components and technical details of the DUT.

[0031] Interface information refers to the information related to the connection and communication between the DUT and external devices or other system components. Interface information determines how the DUT interacts with memory, input / output devices, other processors, and peripheral components.

[0032] A domain segment refers to a specific field in the interface information of the device under test that is used to represent information such as operation codes and register addresses. Interface information usually includes multiple domain segments. Each domain segment is responsible for transmitting different information. Each domain segment can have different values. Domain segment value information refers to information such as the value range of the domain segment. Domain segment constraint information refers to information such as value constraints or value restrictions between different domain segments.

[0033] The micro-architecture document of the device to be tested can be parsed by text parsing and other methods to extract the interface information of the device to be tested. The interface information generally includes information such as the interface name, the domain name, and the bit width of each domain. In an embodiment of the present application, the interface information of the micro-architecture document can also include domain constraint information.

[0034] Step 120: Based on the component class template file and interface information corresponding to the verification agent, generate the code corresponding to each component in the verification agent and the code corresponding to the transaction data packet; the code corresponding to the transaction data packet includes the code corresponding to the domain segment constraint information.

[0035] Specifically, in the UVM verification environment, a verification agent is a core component used to simulate and drive interface signals of a device under test to perform functional verification.

[0036] The verification agent can be regarded as a collection of multiple verification components. These verification components include driver components, sequencer components, monitor components, reference model components, and scoreboard components. The driver component is responsible for sending stimulus to the interface of the device under test. The sequencer component is used to manage and control the generation and scheduling of transaction packets. The monitor component is used to observe the interface signals of the device under test, capture the transmitted data and convert it into high-level transaction packets. The reference model component is used to complete the same function as the device under test and provide judgment criteria for the scoreboard component. The scoreboard component is used to compare the expected results with the actual results to ensure that the device under test behaves correctly.

[0037] A transaction is an abstract data packet used to transfer data between different components of the UVM verification environment. It defines the format and content of the stimulus or response, which is usually a high-level abstraction, including information such as address, data, and control signals.

[0038] Component class template files can be pre-determined for the verification agent and the verification components and transaction data packets it contains. These class template files can include verification agent (agent) template files, driver component (driver) template files, sequencer component (sequencer) template files, monitor component (monitor) and transaction data packet (transaction) template files, etc.

[0039] According to the component class template file and interface information corresponding to the verification agent, the code corresponding to each component in the verification agent and the code corresponding to the transaction data packet can be generated. For example, a class generator can be used to process each component class template file and interface information to generate the code corresponding to each component in the verification agent, which is stored in the source code file of the hardware description and verification language (SystemVerliog), including agent.sv file, driver.sv file, sequencer.sv file and monitor.sv file, etc.; at the same time, the code corresponding to the transaction data packet is also generated and stored in the source code file of the hardware description and verification language (SystemVerliog), which is the transaction.sv file.

[0040] Since the interface information includes the domain constraint information, the code corresponding to the generated transaction data packet also includes the code corresponding to the domain constraint information.

[0041] Step 130: Determine the code corresponding to the verification agent based on the code corresponding to each component and the code corresponding to the transaction data packet.

[0042] Specifically, the code required by the verification agent can be obtained according to the code corresponding to each component and the code corresponding to the transaction data packet. The code required by the verification agent can be run in the verification platform to implement functional verification of the device to be tested.

[0043] The verification agent generation method provided in the embodiment of the present application parses the micro-architecture document of the device to be tested and extracts the interface information of the device to be tested; based on the component class template file corresponding to the verification agent and the interface information, generates the code corresponding to each component in the verification agent and the code corresponding to the transaction data packet; based on the code corresponding to each component and the code corresponding to the transaction data packet, determines the code corresponding to the verification agent; since the code corresponding to the domain segment constraint information is directly generated according to the domain segment constraint information in the micro-architecture document, it is equivalent to using the micro-architecture document as a standard reference file (golden file), which ensures the accuracy of the constraint information, so that the verification engineer does not need to manually write the verification agent code according to the module function he needs to verify, and does not need to check with the design engineer, thereby improving the verification efficiency of the device to be tested.

[0044] It should be noted that each implementation method of the present application can be freely combined, the order can be changed, or it can be executed separately, and does not need to rely on or depend on a fixed execution order.

[0045] In some embodiments, the interface information is stored in a micro-architecture document in a structured data format.

[0046] Specifically, the interface information of the device under test can be stored in the micro-architecture document in a structured data format. The structured data format uses a predefined model to organize and store data so that it conforms to a specific pattern or structure. Such a data format is convenient for computer parsing, querying and processing.

[0047] The structured data format generally includes a spreadsheet format (such as an Excel format or a Sheet format) and a comma separated value file format (CSV format), etc. Taking the Excel format as an example, the interface information of the interface (A_B_REQ) of the device to be tested is represented as shown in Table 1.

[0048] Table 1 Interface information Signal Name NumBit To From Constraint INTERFACE A_B_REQ BUS 24 FIELD src1 8 7 0 src11=0 FIELD src2 8 15 8 src2dist{4:=1,[5:8]:=1} FIELD dst 8 23 16 if(scr1==4)dst>2 INTERFACE_END

[0049] In the above table, the interface A_B_REQ defines three fields (FIELD), namely src1, src2 and dst. When the design engineer determines the micro-architecture document, the interface information can be defined in Excel format. Among them, the field constraint information (Constraint) corresponding to each field is also stored.

[0050] The verification agent generation method provided in the embodiment of the present application stores interface information in a structured data format in a micro-architecture document, which is easy to parse and extract, thereby improving the generation efficiency of the verification agent code and the verification efficiency of the device to be tested.

[0051] In some embodiments, the interface information includes an interface name, interface bit width information, a domain segment, bit width information corresponding to the domain segment, and domain segment constraint information corresponding to the domain segment.

[0052] Specifically, the interface name is used to indicate the name of the interface of the device to be tested. For example, the interface name (Signal Name) of a certain interface (INTERFACE) in the above embodiment is A_B_REQ.

[0053] The interface bit width information is used to indicate the number of data bits that can be carried in data transmission. For example, the interface bit width information (BUS) of a certain interface in the above embodiment is 24 bits (NumBit=24).

[0054] The domain segment refers to a specific field in the interface information of the device under test that is used to represent information such as operation code and register address. For example, in the above embodiment, a certain interface has three domain segments, namely src1, src2 and dst.

[0055] The bit width information corresponding to the domain segment is used to indicate the number of data bits occupied by the domain segment. For example, in the above embodiment, the bit width of the domain segment src1 is 8 bits (NumBit=8), and the bit positions in the interface bit width information are from 0 to 7; the bit width of the domain segment src2 is 8 bits (NumBit=8), and the bit positions in the interface bit width information are from 8 to 15; the bit width of the domain segment dst is 8 bits (NumBit=8), and the bit positions in the interface bit width information are from 16 to 23.

[0056] The domain constraint information refers to information such as value constraints or value restrictions between different domains. For example, the domain constraint information corresponding to the domain src1 may be "src1!=0".

[0057] The verification agent generation method provided in the embodiment of the present application, the interface information includes the interface name, interface bit width information, domain segment, bit width information corresponding to the domain segment, and domain segment constraint information corresponding to the domain segment, which can comprehensively represent the interface information and improve the generation efficiency of the verification agent code.

[0058] In some embodiments, the domain segment constraint information is stored in the interface information in code form.

[0059] Specifically, in order to facilitate the extraction of the domain segment constraint information, the domain segment constraint information can be stored in the interface information in the form of code. For example, the domain segment constraint information corresponding to the domain segment src1 can be coded as "src1!=0"; the domain segment constraint information corresponding to the domain segment src2 can be coded as "src2 dist{4:=1,[5:8]:=1}"; the domain segment constraint information corresponding to the domain segment dst can be coded as "if(scr1==4)dst>2".

[0060] The verification agent generation method provided in the embodiment of the present application can store domain segment constraint information in the form of code in the interface information, so that verification engineers do not need to manually write verification agent code according to the module functions they need to verify, thereby improving the verification efficiency of the device to be tested.

[0061] In some embodiments, the domain segment constraint information includes at least one of value constraint information, distribution constraint information, and condition constraint information.

[0062] Specifically, the value constraint information (Value constraint) indicates that the value of the domain segment must be within a specific numerical range or must meet specific conditions, for example, the value of the domain segment must be greater than the minimum set value, less than the maximum set value, or not equal to certain special values ​​(for example, src1!=0).

[0063] The distribution constraint information (Distribution constraint) indicates that the value of the domain segment must satisfy a specific numerical distribution (eg, src2 dist{4:=1,[5:8]:=1}).

[0064] Condition constraint information (Condition constraint) indicates that the values ​​between multiple domain segments must satisfy a specific quantitative relationship (for example, if (scr1 == 4) dst>2).

[0065] The verification agent generation method provided in the embodiment of the present application can represent different types of domain segment constraint information in a coded manner, thereby improving the verification efficiency of the device to be tested.

[0066] In some embodiments, based on the component class template file and interface information corresponding to the verification agent, the code corresponding to each component in the verification agent and the code corresponding to the transaction data packet are generated, including: Input each component class template file and interface information corresponding to the verification agent into the class generator, and obtain the code corresponding to each component output by the class generator and the code corresponding to the transaction data packet.

[0067] Specifically, the class generator can realize the generation of corresponding codes according to the component class template file. Specifically, each component class template file and interface information can be input into the class generator, and the class generator processes each component class template file according to the interface information to obtain the code corresponding to each component and the code corresponding to the transaction data packet, and outputs the corresponding codes in the form of source code files (sv file format).

[0068] The verification agent generation method provided in the embodiment of the present application processes the component class template files and interface information corresponding to the verification agent through a class generator, so as to quickly generate the codes corresponding to each component and the codes corresponding to the transaction data packet, thereby improving the codes corresponding to the verification agent and improving the verification efficiency of the device to be tested.

[0069] Figure 2 This is the second flow chart of the verification agent generation method provided by this application, such as Figure 2 As shown, the main workflow of the method includes: defining the information of the interface that the verification agent needs to drive in the micro-architecture document, such as the interface name, domain name, bit width and constraints of each domain, etc. Based on this information, the class generator can be used to automatically generate various codes in the verification agent. This step can be based on the jinja2 template library of the python language to generate various codes. The detailed steps include: Step 1: Obtain the micro-architecture document, parse the micro-architecture document, and extract interface information.

[0070] Step 2: Prepare the templates of each component class in the verification agent, and use the interface information to generate the source code files of each component and the source code files of the transaction data package required by the verification agent, such as Agent.sv, Monitor.sv, Driver.sv, Cfg.sv, Sequencer.sv, Sequence.sv, and Transaction.sv.

[0071] In the embodiment of the present application, the constraints of each domain segment in the interface are defined in the micro-architecture document at the same time, so when generating transaction.sv, the constraint information of each domain segment can be extracted from the micro-architecture document, and the template of the transaction is defined as a format that can generate constraint code, so that the interface information containing the domain segment constraints can generate a transaction.sv with constraints. For example, taking the interface information of the interface (A_B_REQ) of the device under test in the aforementioned embodiment as an example, the code corresponding to the domain segment constraint information in the source code file of the transaction data packet can be: class a_b_req_tx extends uvm_sequence_item; rand logic[7:0]src1; rand logic[7:0]src2; rand logic[7:0]dst; constraint src1_c{src1! =0;}

[0072] constraint src2_c{src2 dist{4:=1,[5:8]:=1};}

[0073] constraint dst_c{if(src1==4)dst>2;}

[0074] endclass

[0075] The verification agent generation method provided in the embodiment of the present application has the following beneficial effects: (1) The verification agent code can be quickly generated; (2) Constraints can be automatically generated based on the microarchitecture documents provided by the design engineer, reducing verification vulnerabilities caused by the verification engineer's inaccurate understanding of the functions. In addition, since the architecture document serves as a standard reference file (golden file), the accuracy of the constraints is guaranteed, and a large amount of inspection work is not required. (3) The generated code can save verification engineers from having to write any code. The generated code can be used directly for verification, greatly reducing the workload of verification engineers.

[0076] The device provided in the embodiment of the present application is described below. The device described below and the method described above can refer to each other.

[0077] Figure 3 is a schematic diagram of the structure of the verification agent generation device provided by the present application, such as Figure 3As shown, the device includes: an extraction module 310, which is used to parse the micro-architecture document of the device to be tested and extract the interface information of the device to be tested; the interface information includes domain segment constraint information; The generating module 320 is used to generate codes corresponding to each component in the verification agent and codes corresponding to the transaction data packet based on the component class template file and interface information corresponding to the verification agent; the codes corresponding to the transaction data packet include codes corresponding to the domain segment constraint information; The determination module 330 is used to determine the code corresponding to the verification agent based on the codes corresponding to each component and the code corresponding to the transaction data packet.

[0078] The verification agent generation device provided in the embodiment of the present application parses the micro-architecture document of the device to be tested and extracts the interface information of the device to be tested; generates the code corresponding to each component in the verification agent and the code corresponding to the transaction data packet based on the component class template file and interface information corresponding to the verification agent; determines the code corresponding to the verification agent based on the code corresponding to each component and the code corresponding to the transaction data packet; since the code corresponding to the domain segment constraint information is directly generated according to the domain segment constraint information in the micro-architecture document, it is equivalent to using the micro-architecture document as a standard reference file (golden file), which ensures the accuracy of the constraint information, so that the verification engineer does not need to manually write the verification agent code according to the module function he needs to verify, and does not need to check with the design engineer, thereby improving the verification efficiency of the device to be tested.

[0079] In some embodiments, the interface information is stored in a micro-architecture document in a structured data format.

[0080] In some embodiments, the interface information includes an interface name, interface bit width information, a domain segment, bit width information corresponding to the domain segment, and domain segment constraint information corresponding to the domain segment.

[0081] In some embodiments, the domain segment constraint information is stored in the interface information in code form.

[0082] In some embodiments, the domain segment constraint information includes at least one of value constraint information, distribution constraint information, and condition constraint information.

[0083] In some embodiments, the generating module is specifically used to: Input each component class template file and interface information corresponding to the verification agent into the class generator, and obtain the code corresponding to each component output by the class generator and the code corresponding to the transaction data packet.

[0084] Figure 4 is a schematic diagram of the structure of the electronic device provided by this application, such as Figure 4As shown, the electronic device may include: a processor (Processor) 410, a communication interface (Communications Interface) 420, a memory (Memory) 430 and a communication bus (Communications Bus) 440, wherein the processor 410, the communication interface 420, and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic command in the memory 430 to execute the method described in the above embodiment, for example: The micro-architecture document of the device to be tested is parsed to extract the interface information of the device to be tested; the interface information includes the domain constraint information; based on the component class template file corresponding to the verification agent and the interface information, the code corresponding to each component in the verification agent and the code corresponding to the transaction data packet are generated; the code corresponding to the transaction data packet includes the code corresponding to the domain constraint information; based on the code corresponding to each component and the code corresponding to the transaction data packet, the code corresponding to the verification agent is determined.

[0085] In addition, the logic commands in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several commands to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.

[0086] The processor in the electronic device provided in the embodiment of the present application can call the logic instructions in the memory to implement the above method. Its specific implementation method is consistent with the implementation method of the aforementioned method and can achieve the same beneficial effects, which will not be repeated here.

[0087] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the methods provided in the above embodiments are implemented.

[0088] Its specific implementation is consistent with the aforementioned method implementation and can achieve the same beneficial effects, so it will not be repeated here.

[0089] An embodiment of the present application provides a computer program product, including a computer program, which implements the above method when executed by a processor.

[0090] 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.

[0091] 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, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product 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 embodiments.

[0092] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application 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 application.

Claims

1. A verification agent generation method, It is characterized in that include: Parsing the micro-architecture document of the device under test to extract interface information of the device under test; The interface information includes domain segment constraint information; Based on the component class template file corresponding to the verification agent and the interface information, the code corresponding to each component in the verification agent and the code corresponding to the transaction data packet are generated; the code corresponding to the transaction data packet includes the code corresponding to the domain segment constraint information; Based on the codes corresponding to the various components and the code corresponding to the transaction data packet, the code corresponding to the verification agent is determined.

2. The authentication agent generation method according to claim 1, It is characterized in that The interface information is stored in the micro-architecture document in a structured data format.

3. The authentication agent generation method according to claim 2, It is characterized in that The interface information includes an interface name, interface bit width information, a domain segment, bit width information corresponding to the domain segment, and domain segment constraint information corresponding to the domain segment.

4. The authentication agent generation method according to claim 3, It is characterized in that The domain segment constraint information is stored in the interface information in code form.

5. The authentication agent generation method according to claim 4, It is characterized in that The domain constraint information includes at least one of value constraint information, distribution constraint information and condition constraint information.

6. The authentication agent generation method according to any one of claims 1 to 5, It is characterized in that The generating, based on the component class template file corresponding to the verification agent and the interface information, codes corresponding to each component in the verification agent and codes corresponding to the transaction data packet include: Input each component class template file corresponding to the verification agent and the interface information into the class generator, and obtain the code corresponding to each component output by the class generator and the code corresponding to the transaction data packet.

7. A verification agent generating device, It is characterized in that include: An extraction module, used to parse the micro-architecture document of the device under test and extract the interface information of the device under test; The interface information includes domain segment constraint information; A generation module, used to generate codes corresponding to each component in the verification agent and codes corresponding to a transaction data packet based on a component class template file corresponding to the verification agent and the interface information; the codes corresponding to the transaction data packet include codes corresponding to the domain segment constraint information; The determination module is used to determine the code corresponding to the verification agent based on the codes corresponding to the various components and the code corresponding to the transaction data packet.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the verification agent generation method according to any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the verification agent generation method according to any one of claims 1 to 6 is implemented.

10. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the verification agent generation method according to any one of claims 1 to 6 is implemented.