An interface registration method, an interface reference method and related equipment
By defining the interface proxy module for the target interface and obtaining its instantiation path, the interface instance registration is automatically completed, which solves the problem of low interface registration efficiency in the existing technology and achieves efficient and accurate interface registration.
Patent Information
- Application Number
- CN202111100766.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-18
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-09-18
AI Technical Summary
The interface registration efficiency in the existing technology is low, which results in unfavorable interface application in the integrated circuit verification platform and is prone to errors.
By defining the interface proxy module for the target interface and instantiating it to the interface proxy module and the target design module, the instantiation path of the interface proxy module is obtained, the registration of the interface instance is automatically completed, and the registration efficiency is improved.
It simplifies the interface registration process, improves the efficiency of interface registration, reduces errors in manually specifying paths, and is suitable for multiple interfaces and complex verification environments.
Smart Images

Figure CN113807045B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of integrated circuit testing, and in particular to an interface registration method, an interface reference method and related equipment. Background Art
[0002] In the field of integrated circuit design verification, an interface is usually bound or instantiated into a design module to form an interface instance, and the interface instance is used to drive and sample the design module signal. In order to ensure the reusability of the verification platform, the verification platform does not directly reference the interface instance instantiated in the design module, but registers the interface instance into the setting component so that the interface instance can be referenced through a virtual interface. However, the registration efficiency in the prior art is low, which is not conducive to the application of the interface. Summary of the invention
[0003] In view of this, an embodiment of the present invention provides an interface registration method, an interface reference method and related devices to improve interface registration efficiency.
[0004] To solve the above problems, the embodiments of the present invention provide the following technical solutions:
[0005] In one aspect, the present invention provides an interface registration method, comprising:
[0006] Get the interface information of the target interface;
[0007] Defining an interface proxy module for the target interface according to the interface information;
[0008] Instantiating the target interface to the interface proxy module to form an interface instance of the target interface in the interface proxy module;
[0009] Instantiating the interface proxy module to a target design module;
[0010] Obtaining the instantiation path of the interface proxy module;
[0011] Register the instantiation path and the interface instance in a preset component.
[0012] A second aspect of the present invention provides an interface reference method, comprising:
[0013] Receive an interface reference request, the reference request including at least index information of an interface instance of a target interface, the index information including at least an instantiation path of an interface proxy module having the interface instance of the target interface;
[0014] Based on the index information, obtaining an interface instance of the target interface from a preset component;
[0015] The interface instance of the target interface is referenced through the virtual interface.
[0016] In a third aspect, the present invention provides an interface registration system, comprising:
[0017] An information acquisition unit, used to acquire interface information of a target interface;
[0018] An agent unit, used to define an interface agent module for the target interface according to the interface information;
[0019] A first instantiation unit, used for instantiating the target interface to the interface proxy module to form an interface instance of the target interface in the interface proxy module;
[0020] A second instantiation unit, used for instantiating the interface proxy module to a target design module;
[0021] A path acquisition unit, used to acquire the instantiation path of the interface proxy module;
[0022] A registration unit is used to register the instantiation path and the interface instance into a preset component.
[0023] A fourth aspect of the present invention provides an interface reference system, comprising:
[0024] A receiving unit, configured to receive an interface reference request, wherein the reference request includes at least index information of an interface instance of a target interface, wherein the index information includes at least an instantiation path of an interface proxy module having the interface instance of the target interface;
[0025] An interface acquisition unit, configured to acquire an interface instance of the target interface from a preset component based on the index information;
[0026] The reference unit is used to reference the interface instance of the target interface through the virtual interface.
[0027] A fifth aspect of the present invention provides a computer device, comprising:
[0028] a memory storing at least one set of instructions;
[0029] The processor executes the at least one set of instructions to perform the interface registration method as described in any one of the above items, or the interface reference method as described in any one of the above items.
[0030] In a sixth aspect of the present invention, a readable storage medium is provided, wherein the readable storage medium stores at least one set of instructions, and the at least one set of instructions is used to enable a processor to execute the interface registration method as described in any one of the above items, or the interface reference method as described in any one of the above items.
[0031] The interface registration method, interface reference method and related devices provided by the embodiment of the present invention define an interface proxy module for a target interface, and instantiate the interface instance into the target design module by instantiating the target interface into the interface proxy module, and instantiating the interface proxy module into the target design module. Since the interface instance is instantiated into the target design module through the interface proxy module, the interface instance can be uniquely located through the instantiation path of the interface proxy module, so that the interface registration efficiency can be improved and the interface registration process can be simplified by automatically obtaining the instantiation path of the interface proxy module and automatically completing the registration of the interface instance based on the instantiation path. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the embodiments of the present application or the technical solutions in 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 only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0033] Figure 1 A schematic diagram of the communication relationship between a verification platform and a design module;
[0034] Figure 2 A flowchart of an interface registration method provided by an embodiment of the present invention;
[0035] Figure 3 A flowchart of an interface reference method provided by another embodiment of the present invention;
[0036] Figure 4 A schematic diagram of the structure of an interface registration system provided by an embodiment of the present invention;
[0037] Figure 5 A schematic diagram of the structure of an interface reference system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] After implementing the integrated circuit design using a hardware description language, such as System Verilog, the System Verilog language is used to build a verification platform, and test cases are written to simulate the design modules to verify whether the functions of the design modules are consistent with the expected functions.
[0040] In the verification of integrated circuits, interfaces are usually used to realize the connection and communication between the verification environment and the design module, as well as the connection and communication between the package design modules, so as to simplify and reduce the maintenance cost of the design. At present, interfaces are usually bound or instantiated to the design module to form interface instances to realize the driving and sampling of the design module signals.
[0041] In the verification platform developed based on UVM (Universal Verification Methodology), reference Figure 1 In order to ensure the reusability of the verification platform, the interface instance in the design module will not be directly referenced. Instead, the value of the virtual interface is dynamically set by the verification platform component at runtime to reference the interface instance in the design module through the virtual interface. Before referencing the interface instance in the design module through the virtual interface, the interface instance needs to be registered / stored in the setting component of the verification platform in the form of a virtual interface variable, so that the verification platform can obtain the interface instance through the aforementioned component, thereby setting the virtual interface in the verification platform.
[0042] Take the interface axi4_if and the design module pcie as an example. The interface axi4_if can be bound to the design module pcie through the following statement:
[0043] bind pcie axi4_if i_axi4_if(aclk,areset,arvalid,awvalid);
[0044] According to the SystemVerilog standard, the interface axi4_if will be instantiated with the name of i_axi4_if at the location where each design module pcie is instantiated, that is, an interface instance named i_axi4_if will be formed in each design module pcie.
[0045] Assume that the verification platform includes two design modules pcie, named tb.pcie0 and tb.pcie1 respectively, then the path of the interface instance i_axi4_if includes tb.pcie0.i_axi4_if and tb.pcie1.i_axi4_if.
[0046] Based on this, you need to register the path and interface instance to uvm_resource_db through the following statement:
[0047] uvm_resource_db#(virtual interface axi4_if)::set("interfaces","top.pcie0.i_axi4_if",top.pcie0.i_axi4_if);
[0048] uvm_resource_db#(virtual interface axi4_if)::set("interfaces","top.pcie1.i_axi4_if",top.pcie1.i_axi4_if);
[0049] After that, you can access the virtual interface through the following statements:
[0050] typedef virtual interface axi4_if AXI4_VIF; / / declare the variable receiving the virtual interface
[0051] AXI4_VIF axi;
[0052] uvm_resource_db#(AXI4_VIF)::read_by_name("intefaces","top.pcie0.i_axi4_if",axi);
[0053] However, currently, the registration of interface instances is mostly completed by manually specifying the path, such as manually specifying the paths tb.pcie0.i_axi4_if and tb.pcie1.i_axi4_if. However, when there are many interfaces and types, the manual path specification method will lead to low registration efficiency, easy to make mistakes, and not conducive to the application of the interface.
[0054] Based on this, an embodiment of the present invention provides an interface registration method, an interface reference method and related devices to solve the above problems, wherein the interface registration method includes:
[0055] Obtain interface information of the target interface; define an interface proxy module for the target interface according to the interface information; instantiate the target interface to the interface proxy module to form an interface instance of the target interface in the interface proxy module; instantiate the interface proxy module to the target design module; obtain the instantiation path of the interface proxy module; register the instantiation path and the interface instance to the preset component.
[0056] In the embodiment of the present invention, the interface instance is instantiated into the target design module by instantiating the target interface into the interface proxy module, and the interface proxy module is instantiated into the target design module. Since the interface instance is instantiated into the target design module through the interface proxy module, the interface instance can be uniquely located through the instantiation path of the interface proxy module, so that the interface registration efficiency can be improved and the interface registration process can be simplified by automatically obtaining the instantiation path of the interface proxy module and automatically completing the registration of the interface instance based on the instantiation path.
[0057] As an optional implementation of the disclosed content of the embodiment of the present invention, an embodiment of the present invention provides an interface registration method, referring to Figure 2 The flowchart of the interface registration method shown in FIG. 1 includes:
[0058] S201: Acquire interface information of the target interface;
[0059] Before instantiating and registering a target interface, you need to first obtain the interface information of the target interface, which includes the type of the target interface.
[0060] S202: defining an interface proxy module for the target interface according to the interface information;
[0061] After obtaining the interface information of the target interface, an interface proxy module is defined for the target interface according to the interface information, so as to use the interface proxy module to proxy the target interface. In some embodiments of the present invention, the interface proxy module can be implemented by a module module. Of course, the present invention is not limited to this. In other embodiments, other modules can also be used for implementation, which will not be repeated here.
[0062] S203: Instantiate the target interface to the interface proxy module to form an interface instance of the target interface in the interface proxy module;
[0063] The interface proxy module includes a small amount of code, which can instantiate the interface it represents. That is, after defining the interface proxy module for the target interface, the target interface will be instantiated into the interface proxy module, and an interface instance of the target interface will be formed in the interface proxy module.
[0064] In some embodiments of the present invention, the interface proxy module can not only instantiate the interface it proxies, but also connect all its ports to all ports of the target interface it proxies, but it is necessary to ensure that the ports of the interface proxy module and the target interface are consistent.
[0065] That is, in some embodiments of the present invention, instantiating the target interface to the interface proxy module includes: instantiating the target interface to the interface proxy module, and correspondingly connecting the port of the target interface to the port of the interface proxy module. The port of the target interface is consistent with the port definition of the interface proxy module. In this way, the port of the interface proxy module is completely consistent with the target interface it proxies, allowing the verification environment to smoothly migrate from the instantiated interface to the instantiated interface proxy module.
[0066] Among them, when defining an interface proxy module for a target interface, the port of the target interface and the port of the interface proxy module can be defined so that the port of the target interface is consistent with the port definition of the interface proxy module, so that the port of the target design module can be directly connected to the port of the interface instance of the target interface through the port of the interface proxy module, so that the interface instance can directly drive or sample the signal of the target design module.
[0067] S204: Instantiate the interface proxy module to the target design module;
[0068] After the interface instance is formed in the interface proxy module, the interface proxy module is instantiated into the target design module, and the interface proxy module forms an agent module instance at the position where the target design module is instantiated, and the agent module instance includes the interface instance of the target interface. That is, after the interface proxy module having the interface instance of the target interface is instantiated into the target design module, the target design module has the interface instance of the target interface, so that the driving and sampling of the target design module signal can be realized through the interface instance of the target interface.
[0069] S205: Obtaining the instantiation path of the interface proxy module;
[0070] In the embodiment of the present invention, each interface proxy module only represents one target interface, that is, each interface proxy module only has an interface instance of one target interface. Therefore, after finding the interface proxy module according to the instantiation path of the interface proxy module, the interface instance of the target interface can be found through the interface proxy module.
[0071] Since the interface instance is instantiated into the target design module through the interface proxy module, the interface instance can be uniquely located through the instantiation path of the interface proxy module. Therefore, the interface registration efficiency can be improved and the interface registration process can be simplified by automatically obtaining the instantiation path of the interface proxy module and automatically completing the registration of the interface instance based on the instantiation path.
[0072] The instantiation path of the interface proxy module can be automatically obtained through the path acquisition instruction. For example, the hierarchical relationship of the interface proxy module and the name of each layer structure are automatically obtained through the path acquisition instruction, and the instantiation path of the interface proxy module is obtained according to the hierarchical relationship and the name of each layer structure. The path acquisition instruction includes a hierarchical name acquisition instruction.
[0073] That is, in some embodiments of the present invention, obtaining the instantiation path of the interface proxy module includes: obtaining instructions through hierarchical names to obtain the hierarchical relationship of the interface proxy module and the names of each layer of structure; based on the hierarchical relationship and the names of each layer of structure, obtaining the hierarchical path of the interface proxy module, that is, the instantiation path.
[0074] In addition, the path acquisition instruction also includes a format adjustment function, so as to obtain the instantiation path of the interface proxy module according to the hierarchical relationship and the name of each layer structure through the format adjustment function. Among them, the hierarchical name acquisition instruction can be a %m instruction. The format adjustment function can be a $sformat function. Of course, the present invention is not limited to this. In other embodiments, the format adjustment function can also be a $psprintf function and a $sformat function.
[0075] In some embodiments of the present invention, a hierarchical name acquisition instruction and a format adjustment function can be set in the initial statement of the interface proxy module, so that the instantiation path of the interface proxy module can be automatically acquired through the hierarchical name acquisition instruction and the format adjustment function. In addition, in some embodiments of the present invention, a registration instruction can also be set in the initial statement of the interface proxy module, so that after acquiring the instantiation path of the interface proxy module, the instantiation path can be automatically registered in the preset component through the registration instruction. Of course, the present invention is not limited to this. In other embodiments, the hierarchical name acquisition instruction and the format adjustment function can also be set in other statements of the interface proxy module, which will not be repeated here.
[0076] S206: Register the instantiation path and the interface instance into the preset component.
[0077] After obtaining the instantiation path of the interface proxy module, the instantiation path can be assigned to the first variable, the interface instance of the target interface can be assigned to the first virtual interface variable, and the first variable and the first virtual interface variable can be added to the preset component and stored as the correspondence between the first variable and the first virtual interface variable, that is, the correspondence between the interface instance of the target interface and the instantiation path, so as to index the interface instance of the target interface through the instantiation path.
[0078] Since what is obtained through the path acquisition instruction is the unique hierarchical path of the interface proxy module, that is, the unique instantiation path, the interface instance of the target interface is registered in the preset component with the instantiation path as the key value, and a correspondence between the instantiation path and the interface instance of the target interface can be established. Moreover, since the instantiation path is unique and non-repetitive, the interface instance of the target interface can be retrieved from the preset component with the instantiation path as the index, so as to reference the interface instance of the target interface.
[0079] In some embodiments of the present invention, the preset component is uvm_resource_db, that is, the interface instance of the target interface can be registered in uvm_resource_db by adding the first variable and the first virtual interface variable to uvm_resource_db. Of course, the present invention is not limited to this. In other embodiments, the preset component can also be other compatible components, such as components of hash data structures.
[0080] It should be noted that uvm_resource_db is a class in UVM, which can store different objects or values according to different key values. In other words, uvm_resource_db is essentially a storage component, which can store any type of variables or interfaces with the path as the index. Afterwards, the variables or interfaces stored in uvm_resource_db can be retrieved and used by using the path as the index.
[0081] The following takes the target interface axi4_if as an example to illustrate the registration process.
[0082] First, define the interface proxy module axi4_if_w for the target interface axi4_if;
[0083] `define AXI4_IF_PORTS input clk,areset,inout arvalid,inout arready
[0084] / / Define the port as a macro so that it can be used in the interface proxy module axi4_if_w and the target interface axi4_if to achieve consistent port definitions for both;
[0085] interface axi4_if(`AXI4_IF_PORTS);
[0086] / / axi4_if target interface implementation;
[0087] endinterface
[0088] / / The interface proxy module axi4_if_w is defined here, and the port of the interface proxy module axi4_if_w is consistent with the target interface axi4_if;
[0089] interface axi4_if_w(`AXI4_IF_PORTS);
[0090] axi4_if body(.*); / / Here, define the instantiation of the target interface axi4_if to the interface proxy module axi4_if_w, and connect the port of the target interface axi4_if to the port of the interface proxy module axi4_if_w accordingly;
[0091] initial begin
[0092] string path = $sformatf("%m"); / / Here is defined the instantiation path of the interface proxy module axi4_if_w;
[0093] uvm_resource_db#(virtual interface axi4_if)::set("interfaces",path,body); / / Here is defined to add the instantiation path and interface instance body referenced by the first variable path to uvm_resource_db;
[0094] end
[0095] endinterface
[0096] Through the following statement bind pcie axi4_if_w i_axi4_if(aclk,areset,arvalid,arready), the above-defined interface proxy module axi4_if_w is bound to the target design module pcie as a normal interface, and the target interface axi4_if will be instantiated to the interface proxy module axi4_if_w, and the interface proxy module axi4_if_w will be instantiated to the target design module pcie with the name of i_axi4_if. Therefore, during the simulation process, the hierarchical path of the interface proxy module axi4_if_w, that is, the instantiation path, can be automatically obtained through $sformatf("%m"), and the registration is automatically completed through uvm_resource_db#(virtual interfaceaxi4_if)::set("interfaces",path,body).
[0097] Assuming that the verification platform includes two design modules pcie, named tb.pcie0 and tb.pcie1, then path = top.pcie0.i_axi4_if or top.pcie1.i_axi4_if. There will be two records in uvm_resource_db, namely: {"top.pcie0.i_axi4_if"=>top.pcie0.i_axi4_if.body} and {"top.pcie1.i_axi4_if"=>top.pcie1.i_axi4_if.body}.
[0098] As another optional implementation of the disclosed content of the embodiment of the present invention, another embodiment of the present invention provides an interface reference method, referring to Figure 3 The flowchart of the interface reference method shown in FIG. 1 includes:
[0099] S301: receiving an interface reference request, the reference request including at least index information of an interface instance of a target interface, the index information including at least an instantiation path of an interface proxy module having the interface instance of the target interface;
[0100] S302: Based on the index information, obtain an interface instance of the target interface from the preset component;
[0101] S303: Reference the interface instance of the target interface through the virtual interface.
[0102] After registering the instantiation path of the interface proxy module and the interface instance of the target interface to the preset component, the interface instance of the target interface is obtained from the preset component using the instantiation path of the interface proxy module as index information, and the interface instance of the target interface is referenced through the virtual interface.
[0103] In some embodiments of the present invention, the preset component is uvm_resource_db, and the virtual interface can be accessed directly through the access function of uvm_resource_db:
[0104] typedef virtual interface axi4_if AXI4_VIF;
[0105] AXI4_VIF axi;
[0106] uvm_resource_db#(AXI4_VIF)::read_by_names("interfaces","top.pcie0.i_axi4_if",axi);
[0107] In the above embodiment, by giving the same index value of the record registered in uvm_resource_db: such as "top.pcie0.i_axi4_if", the interface instance of the corresponding target interface can be obtained, and it is assigned to the specified virtual interface variable axi, and the interface instance of the target interface can be referenced through the virtual interface.
[0108] In some embodiments of the present invention, the index information includes a first variable, the value of the first variable is an instantiation path of an interface proxy module having an interface instance of a target interface; then based on the index information, obtaining the interface instance of the target interface from a preset component includes:
[0109] Obtaining the first virtual interface variable based on the first variable in the index information and the corresponding relationship between the first variable and the first virtual interface variable;
[0110] According to the first virtual interface variable, an interface instance of the target interface is obtained.
[0111] After obtaining the interface instance of the target interface, the interface instance of the target interface is assigned to the specified virtual interface variable, namely the second virtual interface variable. The verification platform can reference the interface instance of the target interface through the virtual interface corresponding to the second virtual interface variable to drive or sample the signal value of the corresponding target interface.
[0112] As another optional implementation of the disclosed content of the embodiment of the present invention, another embodiment of the present invention provides an interface registration system, referring to Figure 4 The structure diagram of the interface registration system shown in the figure, the interface registration system includes:
[0113] The information acquisition unit 40 is used to acquire the interface information of the target interface;
[0114] The proxy unit 41 is used to define an interface proxy module for a target interface according to the interface information;
[0115] A first instantiation unit 42, used for instantiating a target interface to an interface proxy module to form an interface instance of the target interface in the interface proxy module;
[0116] A second instantiation unit 43, used for instantiating the interface proxy module to the target design module;
[0117] A path acquisition unit 44, used to acquire an instantiation path of the interface proxy module;
[0118] The registration unit 45 is used to register the instantiation path and the interface instance into the preset component.
[0119] In some embodiments of the present invention, the first instantiation unit 42 is further used to connect the port of the target interface to the port of the interface proxy module accordingly; wherein the port of the target interface is consistent with the port definition of the interface proxy module.
[0120] Based on any of the above embodiments, in some embodiments of the present invention, the path acquisition unit 44 acquires the instantiation path of the interface proxy module, including: acquiring instructions through hierarchical names to acquire the hierarchical relationship of the interface proxy module and the names of each layer structure; and obtaining the instantiation path of the interface proxy module according to the hierarchical relationship and the names of each layer structure.
[0121] Based on any of the above embodiments, in some embodiments of the present invention, the registration unit 45 registers the instantiation path and the interface instance into the preset component, including: assigning the instantiation path to a first variable, assigning the interface instance to a first virtual interface variable, and registering the first variable and the first virtual interface variable into the preset component.
[0122] As another optional implementation of the disclosed content of the embodiment of the present invention, another embodiment of the present invention provides an interface reference system, referring to Figure 5 The structure diagram of the interface reference system shown in the figure includes:
[0123] The receiving unit 50 is used to receive an interface reference request, wherein the reference request includes at least index information of an interface instance of a target interface, wherein the index information includes at least an instantiation path of an interface proxy module having the interface instance of the target interface;
[0124] An interface acquisition unit 51, configured to acquire an interface instance of the target interface from a preset component based on the index information;
[0125] The reference unit 52 is used to reference the interface instance of the target interface through the virtual interface.
[0126] In the embodiment of the present invention, the index information includes a first variable, the value of the first variable is an instantiation path of an interface proxy module having an interface instance of a target interface; then the interface acquisition unit 51 acquires the interface instance of the target interface from the preset component based on the index information, including:
[0127] Obtaining the first virtual interface variable based on the first variable in the index information and the corresponding relationship between the first variable and the first virtual interface variable;
[0128] According to the first virtual interface variable, an interface instance of the target interface is obtained.
[0129] As another optional implementation of the disclosed content of the embodiment of the present invention, another embodiment of the present invention provides a computer device, the computer device comprising:
[0130] a memory storing at least one set of instructions;
[0131] The processor executes at least one set of instructions to perform the interface registration method provided in any of the above embodiments, or the interface reference method provided in any of the above embodiments.
[0132] As another optional implementation of the contents disclosed in the embodiments of the present invention, another embodiment of the present invention provides a readable storage medium, which stores at least one set of instructions, and the at least one set of instructions is used to enable a processor to execute an interface registration method provided in any of the above embodiments, or an interface reference method provided in any of the above embodiments.
[0133] The readable storage media of the embodiments of the present invention include permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information can be host-readable instructions, data structures, modules of programs, or other data. Examples of the host's storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0134] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0135] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An interface registration method, characterized in that: include: Get the interface information of the target interface; Defining an interface proxy module for the target interface according to the interface information; Instantiating the target interface to the interface proxy module to form an interface instance of the target interface in the interface proxy module; Instantiating the interface proxy module to a target design module, so as to instantiate the interface instance to the target design module; Acquire an instantiation path from the instantiation of the interface proxy module to the target design module, wherein the instantiation path of the interface proxy module is used to uniquely locate the interface instance; Based on the instantiation path, the interface instance is registered in a preset component of the verification platform.
2. The interface registration method according to claim 1, characterized in that: Instantiating the target interface to the interface proxy module includes: Instantiate the target interface to the interface proxy module, and connect the port of the target interface to the port of the interface proxy module accordingly; The port of the target interface is consistent with the port definition of the interface proxy module.
3. The interface registration method according to claim 1, characterized in that: The instantiation path of obtaining the interface proxy module includes: Obtain the hierarchical relationship of the interface proxy module and the name of each layer structure through the hierarchical name acquisition instruction; According to the hierarchical relationship and the name of each layer structure, the instantiation path of the interface proxy module is obtained.
4. The interface registration method according to claim 1, characterized in that: Registering the instantiation path and the interface instance to the preset component includes: The instantiation path is assigned to a first variable, the interface instance is assigned to a first virtual interface variable, and the first variable and the first virtual interface variable are registered in a preset component.
5. An interface reference method, characterized in that: include: Receive an interface reference request, the reference request including at least index information of an interface instance of a target interface, the index information including at least an interface proxy module having the interface instance of the target interface, and an instantiation path from the interface proxy module to a target design module, the instantiation path of the interface proxy module being used to uniquely locate the interface instance; Based on the index information, obtaining an interface instance of the target interface from a preset component of the verification platform; The interface instance of the target interface is referenced through the virtual interface.
6. The interface reference method according to claim 5, characterized in that: The index information includes a first variable, and the first variable is an instantiation path of an interface proxy module having an interface instance of the target interface; then based on the index information, obtaining the interface instance of the target interface from a preset component includes: Obtaining a first virtual interface variable based on the first variable in the index information and a corresponding relationship between the first variable and the first virtual interface variable; An interface instance of the target interface is obtained according to the first virtual interface variable.
7. An interface registration system, characterized in that: include: An information acquisition unit, used to acquire interface information of a target interface; An agent unit, used to define an interface agent module for the target interface according to the interface information; A first instantiation unit, used for instantiating the target interface to the interface proxy module to form an interface instance of the target interface in the interface proxy module; A second instantiation unit, used for instantiating the interface proxy module to a target design module, so as to instantiate the interface instance to the target design module; A path acquisition unit, used to acquire an instantiation path from the instantiation of the interface proxy module to the target design module, wherein the instantiation path of the interface proxy module is used to uniquely locate the interface instance; The registration unit is used to register the interface instance into a preset component of the verification platform based on the instantiation path, and the instantiation path of the interface proxy module is used to uniquely locate the interface instance.
8. The interface registration system according to claim 7, characterized in that: The first instantiation unit is further used to connect the port of the target interface to the port of the interface proxy module accordingly; The port of the target interface is consistent with the port definition of the interface proxy module.
9. The interface registration system according to claim 7, characterized in that: The path acquisition unit acquires the instantiation path of the interface proxy module by: acquiring the hierarchical relationship of the interface proxy module and the name of each layer structure through a hierarchical name acquisition instruction; and obtaining the instantiation path of the interface proxy module according to the hierarchical relationship and the name of each layer structure.
10. The interface registration system according to claim 7, characterized in that: The registering unit registers the instantiation path and the interface instance in the preset component, including: assigning the instantiation path to a first variable, assigning the interface instance to a first virtual interface variable, and registering the first variable and the first virtual interface variable in the preset component.
11. An interface reference system, characterized in that: include: A receiving unit, configured to receive an interface reference request, wherein the reference request includes at least index information of an interface instance of a target interface, wherein the index information includes at least an interface proxy module having the interface instance of the target interface, and an instantiation path from the interface proxy module to a target design module, wherein the instantiation path of the interface proxy module is used to uniquely locate the interface instance; An interface acquisition unit, configured to acquire an interface instance of the target interface from a preset component of the verification platform based on the index information; The reference unit is used to reference the interface instance of the target interface through the virtual interface.
12. The interface reference system according to claim 11, characterized in that: The index information includes a first variable, and the first variable is an instantiation path of an interface proxy module having an interface instance of the target interface; then the interface acquisition unit acquires the interface instance of the target interface from a preset component based on the index information, including: Obtaining a first virtual interface variable based on the first variable in the index information and a corresponding relationship between the first variable and the first virtual interface variable; An interface instance of the target interface is obtained according to the first virtual interface variable.
13. A computer device, characterized in that: include: a memory storing at least one set of instructions; A processor executes the at least one set of instructions to perform the method according to any one of claims 1 to 4, or the method according to any one of claims 5 to 6.
14. A readable storage medium, wherein: The readable storage medium stores at least one set of instructions, and the at least one set of instructions is used to enable a processor to execute the method according to any one of claims 1 to 4, or the method according to any one of claims 5 to 6.
Citation Information
Patent Citations
PCIE loop back self-test method based on UVM platform
CN103530211A
Service calling method and related equipment
CN111698205A
