Method for starting multiple simulation environments to verify a dut and related devices
By embedding the verification environment of the peripheral IP into the verification environment of the DUT and using the config_db mechanism to achieve synchronous startup, the problem of modifying the verification environment caused by changes in the functionality of the peripheral IP is solved, thereby improving simulation efficiency and the flexibility of scenario construction.
Patent Information
- Application Number
- CN202210812697.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-11
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2042-07-11
AI Technical Summary
In front-end verification, when the behavior of external IPs is complex and functions are frequently modified, existing technologies require frequent modifications to the verification scheme, leading to increased time and manpower costs, as well as redundancy and maintenance difficulties in the verification environment.
The authentication environment B of the peripheral IP DUTb is embedded into the authentication environment A of DUTa. By inheriting the virtual_sequence of authentication environment B and specifying the default_sequence in authentication environment A, the interface signals are connected using the config_db mechanism to achieve synchronous startup and configuration of the peripheral IP and DUT.
It simplifies the environment modifications caused by changes in peripheral IP functions, improves simulation efficiency, reduces verification workload, and enhances the flexibility of scenario construction and the clarity of maintenance.
Smart Images

Figure CN115113981B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of front-end module verification, in particular to a method for starting multiple simulation environments to verify a DUT and related equipment. BACKGROUND
[0002] In the process of front-end verification, the behavior of a peripheral IP needs to be simulated in a verification environment. If the behavior is simple or fixed and not easily modified, it is relatively easy to simulate the behavior of the peripheral IP. However, when the behavior of the peripheral IP is complex, the interaction is too much, and the function modification is complex, the time and labor cost of simulating the behavior of the peripheral IP will increase dramatically, and even the verification scheme needs to be modified. If the peripheral IP is added during verification and its configuration information is added in the environment, the behaviors need to be modified every time the function changes, which will also increase the modification time of the scheme and cause project delays. When the behavior of the DUT and the peripheral IP is strongly related, sometimes the related behavior of the peripheral IP needs to be focused on. If only the function is added in the verification environment, it will also cause redundancy of the verification environment and make it more difficult to maintain in the later stage. SUMMARY
[0003] The technical problem to be solved by the present application is to provide a method for starting multiple simulation environments to verify a DUT and related equipment.
[0004] To solve the above technical problems, the technical scheme adopted by the present application is as follows: a method for starting multiple simulation environments to verify a DUT, comprising,
[0005] embedding the verification components in the verification environment B of the peripheral IP DUTb into the verification environment A of the DUTa;
[0006] inheriting the virtual_sequence of the verification environment B;
[0007] specifying the default_sequence of the verification environment A and the verification environment B;
[0008] instantiating the components of the verification environment B in the verification environment A;
[0009] connecting the interface signals of the DUTa and the peripheral IP DUTb;
[0010] setting the virtual_interface into the corresponding components through the config_db mechanism;
[0011] starting the verification environment B corresponding to the peripheral IP and the verification environment A corresponding to the DUT at the same time;
[0012] The verification environment B is synchronized with the verification environment A through a mail_box or config_db mechanism, and the configuration of the verification environment B is realized by using a b_virtual_sequence.
[0013] Further, the default_sequence of the verification environment A and the verification environment B specifically includes,
[0014] The virtual_sequence of the verification environment A is specified as the default_sequence in the build_phase of the Base_test, and the virtual_sequence of the verification environment B is also specified as the default_sequence.
[0015] Further, in the verification environment A, the components of the verification environment B are instantiated, and the instantiation specifically includes,
[0016] In the build_phase of the a_env of the verification environment A, the components of the verification environment B are instantiated.
[0017] Further, the verification environment B corresponding to the peripheral IP and the verification environment A corresponding to the DUT are started simultaneously, and the starting specifically includes,
[0018] The run_test() function is called to start the verification environment B corresponding to the peripheral IP and the verification environment A corresponding to the DUT simultaneously.
[0019] The application further provides a device for starting multiple simulation environment verification DUTs, which comprises,
[0020] An embedding module is configured to embed the verification components in the verification environment B of the peripheral IP DUT b into the verification environment A of the DUT a;
[0021] An inheriting module is configured to inherit the virtual_sequence of the verification environment B;
[0022] A specifying module is configured to specify the default_sequence of the verification environment A and the verification environment B;
[0023] An instantiating module is configured to instantiate the components of the verification environment B in the verification environment A;
[0024] An interface signal connecting module is configured to connect the interface signals of the DUT a and the peripheral IP DUT b;
[0025] A virtual interface setting module is configured to set the virtual_interface into the corresponding components through a config_db mechanism;
[0026] The verification environment starting module is used for starting the verification environment B corresponding to the peripheral IP and the verification environment A corresponding to the DUT at the same time.
[0027] The verification environment synchronization module is used for realizing the synchronization between the verification environment B and the verification environment A through a mail_box or config_db mechanism, and realizing the configuration of the verification environment B through a b_virtual_sequence.
[0028] Further, the specifying module is specifically used for,
[0029] In the build_phase of the Base_test, the virtual_sequence of the verification environment A is specified as the default_sequence, and the virtual_sequence of the verification environment B is specified as the default_sequence.
[0030] Further, the instantiating module is specifically used for,
[0031] In the build_phase of the a_env of the verification environment A, the components of the verification environment B are instantiated.
[0032] Further, the verification environment starting module is specifically used for,
[0033] The run_test() function is called to start the verification environment B corresponding to the peripheral IP and the verification environment A corresponding to the DUT at the same time.
[0034] The application further provides a computer device, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the method for starting multiple simulation environment verification DUTs when executing the computer program.
[0035] The application further provides a storage medium, which stores a computer program, and the computer program can implement the method for starting multiple simulation environment verification DUTs when being executed by a processor.
[0036] The application has the beneficial effects that the verification environment of the peripheral IP is added, two verification environments are started at the same time, the function is realized in all scenes, the environment modification and maintenance problems caused by the function change and behavior change of the peripheral IP are solved, the behaviors of the two environments are allowed to be reloaded at the same time, the specific test case can be modified according to the needs, the required scene is constructed, the scene construction is easier and more flexible for different scenes, the maintenance is clearer and simpler, and the time for modifying the architecture scheme caused by the function change of the peripheral IP is effectively reduced. BRIEF DESCRIPTION OF DRAWINGS
[0037] The specific structure of the present application is described in detail below in combination with the drawings.
[0038] Figure 1 A flow chart of a method for starting multiple simulation environments to verify a DUT according to the present application;
[0039] Figure 2 A block diagram of an apparatus for starting multiple simulation environments to verify a DUT according to the present application;
[0040] Figure 3 A framework diagram of an apparatus for starting multiple simulation environments to verify a DUT according to the present application;
[0041] Figure 4 A schematic block diagram of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION
[0042] The technical solutions in the embodiments of the present application will be described clearly and completely below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application.
[0043] It should be understood that, when used in the specification and the appended claims, the terms "comprise" and "include" indicate the presence of the described features, integers, steps, operations, elements, and / or components, but do not exclude one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0044] It should also be understood that the terms used in the present application specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the present application specification and the appended claims, the singular forms "a", "an" and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0045] It should be further understood that the term "and / or" used in the present application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations thereof, and includes these combinations.
[0046] As Figure 1 shown, a first embodiment of the present application is a method for starting multiple simulation environments to verify a DUT, comprising,
[0047] Before starting, the Top layer connects the interface signals of the DUT a to be tested and the peripheral IP DUT b;
[0048] S10, embedding the verification components in the verification environment B of the peripheral IP DUT b into the verification environment A of the DUT a; adding or deleting some components according to requirements.
[0049] S20, inheriting the virtual_sequence of the verification environment B; rewriting the required task according to requirements, realizing the transmission of related information through the mail_box, and realizing the transmission of state information through the config_db;
[0050] S30, specifying the default_sequence of the verification environment A and the verification environment B;
[0051] S40, instantiating the components of the verification environment B in the verification environment A;
[0052] S50, connecting the interface signals of the DUT a and the peripheral IP DUT b;
[0053] S60, setting the virtual_interface into the corresponding components through the config_db mechanism.
[0054] Specifically, the Top top-level virtual interface is instantiated in the env, the specific path is known, and the virtual_interface is set into the corresponding components through the config_db mechanism.
[0055] S70, starting the verification environment B corresponding to the peripheral IP and the verification environment A corresponding to the DUT at the same time.
[0056] S80, realizing the synchronization between the verification environment B and the verification environment A through the mail_box or the config_db mechanism, and realizing the configuration of the verification environment B through the use of b_virtual_sequence.
[0057] When ending the verification environment B and the verification environment A, stop the simulation and end the main_phase.
[0058] In step S30, the default_sequence of the verification environment A and the verification environment B specifically includes,
[0059] In the build_phase of the Base_test, the virtual_sequence of the verification environment A is specified as the default_sequence, and the virtual_sequence of the verification environment B is also specified as the default_sequence.
[0060] In step S40, instantiating the components of the verification environment B in the verification environment A specifically includes,
[0061] In the build_phase of the verification environment A, the component of the verification environment B is instantiated, and the mail_box used before is connected in the connect_phase of the verification environment A.
[0062] In step S70, the verification environment B corresponding to the peripheral IP and the verification environment A corresponding to the DUT are simultaneously started, and the method specifically comprises the following steps.
[0063] The run_test() function is called to simultaneously start the verification environment B corresponding to the peripheral IP and the verification environment A corresponding to the DUT.
[0064] As shown in Figure 3 The framework diagram for starting multiple simulation environments to verify the DUT is shown in the embodiment of the application, two virtual_sequenses are simultaneously started, so that the two simulation platforms are simultaneously run, and thus the configuration information of the peripheral IP does not need to be added in the simulation environment of the DUT, and even the multiple functions of the peripheral IP can be used, without additional scene configuration. Moreover, some information in the ENV of the peripheral IP can be modified through the reloading mode, so as to build the scene that the user wants, improve the simulation efficiency of the project, and reduce the verification workload and working time caused by the modification of the peripheral IP. The framework diagram comprises the following components:
[0065] A unified base_test, and the test_case is also generated from the base_test;
[0066] Two virtual_sequencers and virtual_sequencers, wherein the a_virtual_sequence is the DUT a to be tested, and the b_virtual_sequence is the peripheral IP b;
[0067] The b1_agent in the env a is a verification environment component that needs to be used to mobilize the peripheral IP b, and the b1_agent is loaded into the env a, and the b1_agent can also be multiple agents, which are used to completely realize the function of the peripheral IP b;
[0068] The interconnection of the DUT a and the DUT b is realized through the interface;
[0069] The b1_vif is used to drive the DUT b, so as to generate the scene that the user wants to realize;
[0070] virtual_sequence: virtual class sequence, which is used for the calling of each sequence.
[0071] mail_box: mailbox, used for information transmission.
[0072] config_db: a special field defined by uvm for information transmission, similar to mail_box, but needs to specify the specific target path.
[0073] deafult_sequence: default sequence, by setting sequence as default sequence, the sequence can be directly started when starting.
[0074] base_test: inherited from uvm_test, the top component of UVM, in which the instantiation of env and other components is carried out.
[0075] build_phase: build, configure and connect the components of the verification platform.
[0076] a_env: used for associating the hierarchical verification environment components of IP A.
[0077] The beneficial effects of the embodiment are that the verification environment of the peripheral IP is added, two verification environments are started at the same time, the function is realized in all scenarios, and the problems of environment modification and maintenance caused by the changes of peripheral IP function and behavior are solved; and the method allows the behaviors of the two environments to be reloaded at the same time, which can be modified in a specific test case according to needs, and the required scenario is constructed, so that the scenario construction is easier and more flexible for different scenarios, and the maintenance is clearer and simpler, and the time for modifying the architecture scheme caused by the changes of peripheral IP function is effectively reduced.
[0078] As shown in Figure 2 Another embodiment of the application is a device for starting multiple simulation environment verification DUTs, which comprises,
[0079] An embedding module 10 is used for embedding the verification components in the verification environment B of the peripheral IP DUT b into the verification environment A of the DUT a;
[0080] An inheriting module 20 is used for inheriting the virtual_sequence of the verification environment B;
[0081] A specifying module 30 is used for specifying the default_sequence of the verification environment A and the verification environment B;
[0082] An instantiating module 40 is used for instantiating the components of the verification environment B in the verification environment A;
[0083] An interface signal connecting module 50 is used for connecting the interface signals of the DUT a and the peripheral IP DUT b.
[0084] The virtual interface setting module 60 is configured to set the virtual_interface into the corresponding component through the config_db mechanism.
[0085] The verification environment starting module 70 is configured to start the verification environment B corresponding to the peripheral IP and the verification environment A corresponding to the DUT at the same time.
[0086] The verification environment synchronizing module 80 is configured to synchronize the verification environment B and the verification environment A through the mail_box or the config_db mechanism, and to configure the verification environment B through the b_virtual_sequence.
[0087] The specifying module 30 is specifically configured to,
[0088] In the build_phase of the Base_test, the virtual_sequence of the verification environment A is specified as the default_sequence, and the virtual_sequence of the verification environment B is also specified as the default_sequence.
[0089] The instantiating module 40 is specifically configured to,
[0090] In the build_phase of the a_env of the verification environment A, the components of the verification environment B are instantiated.
[0091] The verification environment starting module 60 is specifically configured to,
[0092] The run_test() function is called to start the verification environment B corresponding to the peripheral IP and the verification environment A corresponding to the DUT at the same time.
[0093] It should be noted that the specific implementation process of the above-described device for starting multiple simulation environments to verify the DUT can be clearly understood by those skilled in the art, and can refer to the corresponding description in the foregoing method embodiments. For the convenience and brevity of description, it will not be repeated here.
[0094] The device for starting multiple simulation environments to verify the DUT can be implemented in the form of a computer program, which can run on the computer device as shown in Figure 4 .
[0095] Please refer to Figure 4 , Figure 4is a schematic block diagram of a computer device provided by an embodiment of the present application. The computer device 500 can be a terminal or a server, wherein the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, a wearable device, and the like electronic device having a communication function. The server can be a stand-alone server or a server cluster composed of multiple servers.
[0096] Referring to Figure 4 The computer device 500 includes a processor 502, a memory, and a network interface 505 connected through a system bus 501, wherein the memory can include a non-volatile storage medium 503 and an internal memory 504.
[0097] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions which, when executed, can cause the processor 502 to perform a method for starting multiple simulation environments to verify a DUT.
[0098] The processor 502 is configured to provide computing and control capabilities to support the operation of the entire computer device 500.
[0099] The internal memory 504 provides an environment for the running of the computer program 5032 in the non-volatile storage medium 503, which, when executed by the processor 502, can cause the processor 502 to perform a method for starting multiple simulation environments to verify a DUT.
[0100] The network interface 505 is configured to perform network communication with other devices. Those skilled in the art can understand that Figure 4 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device 500 to which the scheme of the present application is applied. The specific computer device 500 can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0101] The processor 502 is configured to run the computer program 5032 stored in the memory to implement the method for starting multiple simulation environments to verify a DUT as described above.
[0102] It should be understood that, in the embodiments of the present application, the processor 502 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0103] It can be understood by those skilled in the art that all or part of the processes in the above-mentioned embodiments can be completed by a computer program instructing related hardware. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the above-mentioned embodiments.
[0104] Therefore, the present application also provides a storage medium. The storage medium can be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. The program instructions are executed by a processor to make the processor execute the method of starting multiple simulation environments to verify a DUT.
[0105] The storage medium can be a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk, and various computer-readable storage media that can store program codes.
[0106] Those skilled in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been described in the above description in general terms. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0107] In several embodiments provided by the present application, it should be understood that the disclosed apparatus and method can be implemented in other manners. For example, the embodiments of the apparatus described above are merely schematic. For example, the division of the units is merely a logical function division. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In this way, the inventive idea can be implemented.
[0108] The steps in the method embodiments of the present application can be adjusted, combined and deleted in sequence according to actual needs. The units in the apparatus embodiments of the present application can be combined, divided and deleted according to actual needs. In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit.
[0109] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art, or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the embodiments of the present application.
[0110] The above describes only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed by the present application, and these modifications or replacements should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method of initiating a plurality of simulation environment verification DUTs, the method comprising: The method comprises the following steps: embedding a verification component in a verification environment B of a peripheral IP DUT b into a verification environment A of a DUT a; inheriting a virtual_sequence of the verification environment B; specifying a default_sequence of the verification environment A and the verification environment B; instantiating a component of the verification environment B in a build_phase of a_env of the verification environment A; connecting interface signals of the DUT a and the peripheral IP DUT b; setting a virtual_interface into a corresponding component through a config_db mechanism; starting the verification environment B corresponding to the peripheral IP and the verification environment A corresponding to the DUT at the same time; synchronizing between the verification environment B and the verification environment A through a mail_box or a config_db mechanism, and configuring the verification environment B by using a b_virtual_sequence.
2. The method of claim 1, wherein the method further comprises: The specifying the default_sequence of the verification environment A and the verification environment B specifically comprises the following steps: specifying the virtual_sequence of the verification environment A as the default_sequence in a build_phase of a Base_test, and specifying the virtual_sequence of the verification environment B as the default_sequence.
3. The method of claim 1, wherein the method further comprises: The starting the verification environment B corresponding to the peripheral IP and the verification environment A corresponding to the DUT at the same time specifically comprises the following steps: calling a run_test() function to start the verification environment B corresponding to the peripheral IP and the verification environment A corresponding to the DUT at the same time.
4. An apparatus for launching multiple simulation environments to verify a DUT, characterized in that: The method comprises the following steps: an embedding module, used for embedding a verification component in a verification environment B of a peripheral IP DUT b into a verification environment A of a DUT a; an inheriting module, used for inheriting a virtual_sequence of the verification environment B; a specifying module, used for specifying a default_sequence of the verification environment A and the verification environment B; an instantiating module, used for instantiating a component of the verification environment B in a build_phase of a_env of the verification environment A; an interface signal connecting module, used for connecting interface signals of the DUT a and the peripheral IP DUT b; a virtual interface setting module, used for setting a virtual_interface into a corresponding component through a config_db mechanism; a verification environment starting module, used for starting the verification environment B corresponding to the peripheral IP and the verification environment A corresponding to the DUT at the same time; a verification environment synchronizing module, used for synchronizing between the verification environment B and the verification environment A through a mail_box or a config_db mechanism, and configuring the verification environment B by using a b_virtual_sequence.
5. The apparatus for initiating a plurality of simulation environment verification DUTs of claim 4, wherein: The specifying module is specifically used for: In the build_phase of Base_test, the virtual_sequence of the verification environment A is specified as the default_sequence, and the virtual_sequence of the verification environment B is also specified as the default_sequence.
6. The apparatus for initiating a plurality of simulation environment verification DUTs of claim 4, wherein: The verification environment starting module is specifically used for, The run_test() function is called to simultaneously start the verification environment B corresponding to the peripheral IP and the verification environment A corresponding to the DUT.
7. A computer device, characterized by: The computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method for starting multiple simulation environment verification DUTs according to any one of claims 1 to 3 when executing the computer program.
8. A storage medium characterized by: The storage medium stores a computer program, and the computer program can implement the method for starting multiple simulation environment verification DUTs according to any one of claims 1 to 3 when executed by a processor.
Citation Information
Patent Citations
SPI verification method based on UVM verification methodology
CN109739699A
Chip verification system, method, device and equipment and storage medium
CN113342583A