Detailed Description
For the purpose of promoting a better understanding of the objects, aspects and advantages of the present disclosure, reference is made to the following detailed description taken in conjunction with the accompanying drawings.
It is to be noted that technical terms or scientific terms used in the embodiments of the present disclosure should have a general meaning as understood by those having ordinary skill in the art to which the present disclosure belongs, unless otherwise defined. The use of "first," "second," and similar terms in the embodiments of the disclosure is not intended to indicate any order, quantity, or importance, but rather to distinguish one element from another. The word "comprising" or "comprises", and the like, means that the element or item listed before the word covers the element or item listed after the word and its equivalents, but does not exclude other elements or items. The terms "connected" or "coupled" and the like are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect.
The UVM (Universal Verification method) Verification platform is a set of Verification platform developed based on TLM (transaction-level method) communication, and can help Verification developers to build a configurable and reusable Verification environment. As shown in fig. 1, fig. 1 shows a schematic block diagram of a UVM verification platform. The verification platform test in fig. 1 performs verification test on the unit to be verified DUT through the interface, and generally, each verification component UVC in the verification platform has a corresponding configuration object, which is used to configure the UVC, for example, agent _ config corresponding to the verification component agent in fig. 1 and env _ config corresponding to the verification component env. Before we start running the test case, the whole verification environment generally needs to be configured, that is, at least the agent _ config and env _ config therein need to be configured, and the existing configuration mode is to declare, instantiate, configure and transfer the configuration objects corresponding to all the layers below the top verification environment. However, as the level of the RTL design becomes more and more complex, the corresponding verification environment becomes more and more complex, and this configuration mode faces hundreds of sub-modules inside a complex chip, and only declares configuration objects corresponding to all verification components UVC of the lower layer in the verification environment of the top layer at least thousands of times, and the instantiated path level inside the corresponding verification environment is long and complex, so that omission and errors are likely to occur in the process of configuring and transferring the configuration objects, and a large amount of repetitive work exists, resulting in low configuration efficiency, thereby making the subsequent verification work difficult to manufacture, and finally affecting the project progress. Therefore, how to reduce the repeated development work and improve the development efficiency of the verification platform in the work of declaring, instantiating, configuring and transmitting the configuration objects corresponding to all the lower layers in the complex verification environment becomes a technical problem which needs to be solved urgently.
In view of this, the present disclosure provides a method, an apparatus, a device, and a medium for rapidly configuring and transmitting configuration objects in a verification environment, where the method includes encapsulating, declaring, and configuring a configuration object corresponding to a next level in a configuration object corresponding to each reusable verification component UVC, and then calling an encapsulated config method in an env verification environment of a current level to configure and transmit a corresponding configuration object to the next level through a configuration database config _ db, thereby completing declaration, instantiation, and configuration of configuration objects corresponding to all levels in the verification environment. The reusability, the readability and the maintainability of the configuration codes are realized, so that the configuration efficiency is improved, and the progress of project promotion is accelerated.
Referring to fig. 2, fig. 2 shows a schematic block diagram of a verification environment structure and an RTL design structure according to an embodiment of the present disclosure. In fig. 2, in each layer, the verification component agents in the verification environment structure 210 correspond to the interfaces interface of the RTL design structure 220 one by one, for example, 2 verification component agents in each verification component env correspond to the input interface data _ in and the output interface data _ out of the RTL design structure 220, respectively. Each verification component env in the verification environment structure 210 corresponds to a sub-module sub _ module in the RTL design structure 220 one to one, for example, 3 verification components env in the verification environment structure 210 correspond to 3 sub-modules sub _ modules in the RTL design structure 220. According to the embodiment of the disclosure, each layer of verification component env declares, instantiates, configures and encapsulates the next layer in the corresponding configuration object, and then calls the configuration encapsulation method in the verification environment of the current layer to complete configuration, thereby shielding the configuration details of the bottom layer and realizing the reuse of codes.
As shown in fig. 3, fig. 3 shows a schematic diagram of an RTL design structure according to an embodiment of the present disclosure. The RTL design module in FIG. 3 may include:
an input interface for obtaining an external input stimulus, such as data _ in fig. 3;
behavior functions for performing corresponding logical operations on input stimuli, such as the operational logic inside the module in fig. 3, which may include, for example, combinational and sequential logic circuits;
and an output port, for outputting the result after the operation, such as the data _ out in fig. 3.
The input-side interface, behavioral functions, and output-side interface described above may be encapsulated in a verification environment as shown in fig. 4. In fig. 4, the interface to the input terminal data _ in may be packaged as agent1, and the interface to the output terminal data _ out may be packaged as agent 2. The monitor in the agent1 and agent2 enclosure component monitors and samples the signal of the corresponding interface, encapsulates the signal into a transaction (transaction) to be transmitted to the verification environment, so that a driver (driver) in the agent enclosure component for processing the subsequent component can take the transaction to the interface handle, and then drives the required excitation transaction to the interface as the input excitation of the subsequent module. Meanwhile, the two agents can be packaged in an env verification environment, a reference module (reference model) and some analysis components are written in the hierarchy, and a test case is written to verify the RTL design module. In the top-level verification environment, all the layers below the top-level verification environment need to be subjected to corresponding configuration object declaration, instantiation, configuration and other work. According to the embodiment of the disclosure, the configuration object and the configuration method of the bottom layer are encapsulated layer by layer at the current level, so that the configuration details of the reusable environment of the bottom layer are shielded, and the current level and the top layer can be called conveniently.
As shown in FIG. 5, FIG. 5 illustrates an exemplary schematic diagram of the rapid configuration and delivery of configuration objects in a verification environment according to an embodiment of the disclosure. In fig. 5, for the env verification environment of each level of the RTL design, a configuration encapsulation method in the next level environment is called to complete configuration encapsulation of the current level, and a configuration object transmitted from the previous level setting is acquired from the configuration database config _ db, and if not acquired, the configuration object is instantiated and configured by calling the configuration encapsulation method of the next level, so that configuration details of the env environment of the bottom level are shielded, and it is not necessary to know how to configure all UVC reusable environments of the bottom level in the verification environment of the top level, but only how to configure the next level, so that configuration efficiency can be greatly improved, omission and errors in configuration work are avoided, and efficiency of overall development is improved. Wherein the configuration database config _ db may be used to pass parameters in the respective UVM objects.
Referring to FIG. 6, FIG. 6 shows a schematic flow chart of a method for rapid configuration and delivery of configuration objects in a verification environment according to an embodiment of the present disclosure. As shown in FIG. 6, the verification environment includes an env verification environment and an agent verification environment, and the method 600 includes:
step S610, obtaining a first configuration object corresponding to a first layer from a configuration database, and configuring the first layer based on a first configuration method encapsulated in the first configuration object; the first configuration object is from configuration package data of a second level, and the second level is higher than the first level.
In some embodiments, step S610 may further include: declaring in the agent verification environment or the env verification environment of the first level.
In some embodiments, as shown in fig. 2, for the interface encapsulation agent at the bottom layer, the step S610 may specifically include: and declaring and acquiring a bottommost configuration object corresponding to the bottommost layer in the configuration encapsulation data from the env verification environment of the upper layer from the config _ db in the agent verification environment of the bottommost layer, and if the bottommost configuration object is acquired, configuring based on the bottommost configuration object.
In some embodiments, step S610 may further include: instantiating a configuration object as the first configuration object when the first configuration object cannot be obtained from the configuration database; and calling a preset configuration method to configure the first configuration object.
In some embodiments, as shown in fig. 2, if the lowest configuration object is not obtained, a corresponding configuration object may be instantiated as the lowest configuration object. In this way, the bottom layer can be used as a top verification environment to perform verification testing on the corresponding RTL design module.
In some embodiments, if the env layer does not obtain the corresponding env configuration object from the configuration database, a corresponding configuration object may be instantiated as the env configuration object by the upper env layer at the bottom layer in fig. 2, that is, the verification environment corresponding to the sub _ module. And configuring the hierarchy by adopting a preset encapsulated configuration method of the env layer. For example, the preset configuration method of the data type cfg _ mode _ enum may include:
(1) ACTIVE _ DV _ ONLY _ MODE: input port excitation needs to be given by an env environment sequence (sequence), and an RTL model is provided, namely, a result of reference model operation is driven to an output port;
(2) PASSIVE _ DV _ ONLY _ MODE: input port excitation is given by a preorder RTL or RTL model, and the RTL model is carried, namely, the result of reference model operation is driven to an output port;
(3) ACTIVE _ RTL _ MODE: input port excitation needs to be given by the sequence of env environment without RTL model, i.e. the result of reference model operation is not driven to the output port;
(4) PASSIVE _ RTL _ MODE: input port excitation is given by the preamble RTL or RTL model, and without RTL model, i.e. the results of the sequence operation are not driven to the output port.
It should be noted that the preset configuration method is only an example and is not intended to be limited, and the preset configuration method may also be set according to actual situations, for example, a developer of the env environment provides configuration instructions describing which modes the reusable environment can be configured into. The preset configuration method can also be divided into independent classes, which is convenient for maintaining the preset configuration method, for example, the configuration method is increased or changed, inheritance can be performed based on the classes, and the efficiency and convenience of configuration are further improved. In the env verification environment at the top layer, the randomize () function can be called to automatically complete the randomization of all the members with random key data in the configuration objects at the bottom layer.
According to an embodiment of the present disclosure, the method 600 further comprises:
step S620, the first configuration object of the first level is packaged based on a configuration packaging method of a third level to obtain configuration packaging data of the first level; wherein the first level is higher than the third level.
In some embodiments, the configuration encapsulation data of the first hierarchy may be passed to a third hierarchy via a configuration database config _ db for configuration of a configuration object by the third hierarchy.
In some embodiments, as shown in fig. 2, two input/output ports data _ in and data _ out of the sub _ module are packaged into independent agents respectively, which are typically implemented automatically by configuring a script. Since agent is the enclosure for the interface, its configuration options are usually only two, active and func _ cov _ en, and it is usually not test verified at this layer because it is the enclosure for the interface and not the verification environment for a specific RTL design. Therefore, a corresponding configuration method is not needed at the bottommost UVC, namely agent packaging.
According to an embodiment of the present disclosure, the method 200 may further include: and repeating the steps S610 and S620 until the configuration of all the layers is completed.
Specifically, as shown in fig. 2, the RTL design of fig. 2 is instantiated by 3 sub-modules that also perform the plus-1 function, and the RTL example code of the sub-module is:
the RTL example code for the top module top _ module is:
first, agent is encapsulated for the interface at the bottom layer. The next level configuration object may be declared and instantiated in the configuration object corresponding to the env verification environment and the corresponding config method may be encapsulated. And packaging the two input/output ports data _ in and data _ out of the sub _ module into independent agents respectively. Then, declaring and acquiring the corresponding lowest layer configuration object from the configuration database config _ db in the lowest layer agent verification environment or env verification environment for use in the lowest layer, if not, instantiating a corresponding configuration object and calling the encapsulated configuration method to configure the configuration object. For example, the configuration code of the input port encapsulation data _ in _ agent is as follows:
it can be seen that the corresponding configuration object is first retrieved from config _ db in the underlying agent for use at the level, and if not, a corresponding configuration object is instantiated and configured. The output port encapsulation data _ out _ agent is similar to the above, and will not be described herein again.
Secondly, for the previous layer env verification environment, i.e. the verification environment corresponding to the sub _ module, the next layer configuration object can be declared and instantiated in the configuration object corresponding to the env verification environment and the corresponding configuration method is encapsulated, and the encapsulation of the configuration object is as follows:
it can be seen that, in the configuration object corresponding to the env verification environment corresponding to the sub _ module, the configuration object corresponding to the agent of the next layer is instantiated, and then the env developer of the layer provides 4 encapsulated configuration modes, which are represented by an enumerated data type cfg _ mode _ enum: ACTIVE _ DV _ ONLY _ MODE, PASSIVE _ DV _ ONLY _ MODE, ACTIVE _ RTL _ MODE, PASSIVE _ RTL _ MODE, and the like.
Then, declaring and acquiring the corresponding configuration object from the config _ db in the underlying agent or env verification environment for use in the hierarchy, and if not, instantiating a corresponding configuration object and calling the encapsulated configuration method to configure the configuration object. The env verification environment corresponding to sub _ module is encapsulated as follows:
it can be seen that, here, the configuration object passed from the higher layer (if any) is obtained first, and if not, the configuration object is instantiated and called to encapsulate the configuration method in the configuration object, and then passed to the next layer verification environment (here agent).
Thirdly, for the env verification environment at the upper layer, namely the verification environment corresponding to the top _ module, the encapsulation of the configuration object is as follows:
it can be seen that the next verification environment is called to encapsulate the configuration mode of the current level, and also encapsulate the configuration mode into the configuration method of the corresponding level configuration object.
Then, agent or env at the bottom layer (each layer) validates the environment to declare and obtain the corresponding configuration object from the confi g _ db for use at that level, if not, instantiates a corresponding configuration object and invokes the encapsulated configuration method to configure it. In the env verification environment corresponding to the top _ module, the encapsulation code is configured as follows:
compared with the traditional configuration method, the configuration method at the topmost layer is greatly simplified, the configuration details at the bottom layer are conveniently shielded, and only the configuration object of the next layer of reusable environment needs to be configured. In addition, the method can also realize the automation of declaration, instantiation and configuration transmission of the configuration objects corresponding to all the layers in a complex verification environment, thereby further improving the development efficiency and accelerating the project progress.
It should be understood that the order of step S610 and step S620 is not limited, and step S610 may be executed first and then step S620 may be executed, or step S620 may be executed and then step S610 is executed, which is not limited herein.
It should be noted that the method of the embodiments of the present disclosure may be executed by a single device, such as a computer or a server. The method of the embodiment can also be applied to a distributed scene and completed by the mutual cooperation of a plurality of devices. In such a distributed scenario, one of the devices may only perform one or more steps of the method of the embodiments of the present disclosure, and the devices may interact with each other to complete the method.
It should be noted that the above describes some embodiments of the disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments described above and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
According to the embodiment of the disclosure, corresponding to any embodiment of the method, the disclosure further provides a device for rapidly configuring and transferring the configuration object in the verification environment. Referring to fig. 7, the apparatus for rapid configuration and delivery of configuration objects in a verification environment includes:
the configuration encapsulation module is used for acquiring a first configuration object corresponding to a first level from a configuration database and configuring the first level based on a first configuration method encapsulated in the first configuration object; the first configuration object is from configuration package data of a second level, and the second level is higher than the first level.
For convenience of description, the above devices are described as being divided into various modules by functions, and are described separately. Of course, the functionality of the various modules may be implemented in the same one or more software and/or hardware implementations of the present disclosure.
The apparatus in the foregoing embodiment is used to implement the method for quickly configuring and transmitting a configuration object in a corresponding verification environment in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which are not described herein again.
According to an embodiment of the present disclosure, corresponding to any of the above-mentioned embodiment methods, the present disclosure further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the program to implement the method for quickly configuring and transferring the configuration object in the verification environment according to any of the above-mentioned embodiments.
Fig. 8 shows a schematic block diagram of an electronic device according to an embodiment of the present disclosure. The apparatus may include: a processor 810, a memory 820, an input/output interface 830, a communication interface 840, and a bus 850. Wherein processor 810, memory 820, input/output interface 830, and communication interface 840 are communicatively coupled to each other within the device via bus 850.
The processor 810 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present specification.
The Memory 820 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 820 can store an operating system and other application programs, and when the technical solutions provided by the embodiments of the present specification are implemented by software or firmware, the relevant program codes are stored in the memory 820 and called to be executed by the processor 810.
The input/output interface 830 is used for connecting an input/output module to realize information input and output. The i/o module may be configured as a component within the device (not shown) or may be external to the device to provide corresponding functionality. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The communication interface 840 is used for connecting a communication module (not shown in the figure) to realize communication interaction between the device and other devices. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, Bluetooth and the like).
Bus 850 includes a pathway for communicating information between various components of the device, such as processor 810, memory 820, input/output interface 830, and communication interface 840.
It should be noted that although the above-mentioned device only shows the processor 810, the memory 820, the input/output interface 830, the communication interface 840 and the bus 850, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
The electronic device of the foregoing embodiment is used to implement the method for quickly configuring and transmitting a configuration object in a corresponding verification environment in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which are not described herein again.
In accordance with an embodiment of the present disclosure, corresponding to any of the above-described embodiment methods, the present disclosure further provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the method for rapid configuration and delivery of configuration objects in a verification environment as described in any of the above embodiments.
Computer-readable media of the present embodiments, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer 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, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
The computer instructions stored in the storage medium of the foregoing embodiment are used to enable the computer to execute the method for quickly configuring and transferring a configuration object in a verification environment according to any of the foregoing embodiments, and have the beneficial effects of corresponding method embodiments, which are not described herein again.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, is limited to these examples; within the idea of the present disclosure, also technical features in the above embodiments or in different embodiments may be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present disclosure as described above, which are not provided in detail for the sake of brevity.
In addition, well-known power/ground connections to Integrated Circuit (IC) chips and other components may or may not be shown within the provided figures for simplicity of illustration and discussion, and so as not to obscure the embodiments of the disclosure. Furthermore, devices may be shown in block diagram form in order to avoid obscuring embodiments of the present disclosure, and this also takes into account the fact that specifics with respect to implementation of such block diagram devices are highly dependent upon the platform within which the embodiments of the present disclosure are to be implemented (i.e., specifics should be well within purview of one skilled in the art). Where specific details (e.g., circuits) are set forth in order to describe example embodiments of the disclosure, it should be apparent to one skilled in the art that the embodiments of the disclosure can be practiced without, or with variation of, these specific details. Accordingly, the description is to be regarded as illustrative instead of restrictive.
While the present disclosure has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic ram (dram)) may use the discussed embodiments.
The disclosed embodiments are intended to embrace all such alternatives, modifications and variances which fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalents, improvements, and the like that may be made within the spirit and principles of the embodiments of the disclosure are intended to be included within the scope of the disclosure.