Verification method and device, computer storage medium and processor
By using predetermined functions in the UVM verification platform to classify target parameters and generate negative class excitation parameters, the problems of low verification efficiency and resource waste in the existing technology are solved, and efficient chip verification is achieved.
Patent Information
- Application Number
- CN202111027785.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-02
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2041-09-02
AI Technical Summary
The existing UVM verification platform needs to regenerate random stimulus parameters during chip design iterations, resulting in low verification efficiency, a waste of human resources, and the possibility of missing known vulnerabilities and delaying product launch.
Classify the target parameters through a predetermined function, obtain the negative class parameters to generate test excitation parameters, and use these parameters to verify the module to be verified to improve verification efficiency.
It implements classification processing of target parameters in test cases, generates parameters that cause test cases to fail, accurately verifies modules to be verified, improves chip verification efficiency, and reduces waste of human resources and product launch time.
Smart Images

Figure CN113704126B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electronic design packaging and testing, and in particular to a verification method and device thereof, a computer storage medium and a processor. Background Art
[0002] In order to standardize the construction of verification platforms and establish a unified principle between EDA vendors and users, Accellera proposed the Universal Verification Methodology (UVM) standard, which was supported by three major vendors: Mentor, Cadence, and Synopsys. UVM is a verification platform development framework based on the System Verilog class library. Verification engineers can use its reconfigurable components to build a functional verification environment with a standard hierarchy and interface.
[0003] Figure 1 It is a schematic diagram of the traditional UVM verification platform structure in the prior art, such as Figure 1 As shown, in the existing verification method and verification architecture, if the module to be verified (Design Under Test, referred to as DUT) is iteratively updated or modified, the test case developed by the verification personnel needs to regenerate the stimulus containing new parameters according to the random function and instill it into the module to be verified DUT. The stimulus generated by the input parameters is still random, and it is impossible to accurately verify the weak links in the design in a short time, and the work done is highly repetitive with the previous work. This verification method and architecture will not only waste unnecessary human resources, but also have low verification efficiency, delay product launch time, and have a very high probability of missing previously discovered vulnerabilities.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present invention provide a verification method and device thereof, a computer storage medium and a processor, so as to at least solve the technical problems in the related art of the existing chip verification field, such as waste of human resources, low verification efficiency and delay of product launch time.
[0006] According to one aspect of an embodiment of the present invention, a verification method is provided, characterized in that it includes: classifying target parameters using a predetermined function to obtain classified target parameters; obtaining negative class parameters in the classified target parameters, and generating test stimulus parameters based on the negative class parameters, wherein the negative class parameters are parameters that cause a test case to fail; and verifying a module to be verified using the test stimulus parameters.
[0007] Optionally, before classifying the target parameters using a predetermined function to obtain the classified target parameters, the method further includes: calling a random function to generate the target parameters based on parameters predefined in the test case.
[0008] Optionally, calling a random function to generate the target parameters based on all parameters pre-defined in the test case includes: obtaining at least part of the parameters pre-defined in the test case; constraining at least part of the parameters to a predetermined range to obtain initial parameters; calling the random function to generate the target parameters based on the initial parameters.
[0009] Optionally, before classifying the target parameters using a predetermined function to obtain the classified target parameters, the method further includes: calling the predetermined function required for the verification environment in the verification platform.
[0010] Optionally, before calling a predetermined function required for the verification environment in the verification platform, it also includes: obtaining the predetermined function; wherein obtaining the predetermined function includes: obtaining sample data from a first database and a second database, wherein the first database stores negative class stimulus values that cause the test case verification to fail, and the second database stores positive class stimulus values that cause the test case verification to succeed, and a portion of the sample data is used as training data; using the training data to train the initial network model to obtain a predetermined classification model; extracting fixed parameters of the algorithm in the predetermined classification model; encapsulating the fixed parameters and the algorithm to obtain the predetermined function.
[0011] Optionally, extracting fixed parameters of the algorithm in the predetermined classification model includes: using another part of the sample data as test data to verify the predetermined classification model to obtain a verification result; when the verification result indicates that the classification accuracy of the predetermined classification model reaches a predetermined threshold, extracting the fixed parameters of the algorithm in the predetermined classification model.
[0012] Optionally, encapsulating the fixed parameters and the algorithm to obtain the predetermined function includes: converting the fixed parameters and the algorithm into a C language function; and encapsulating the C language function into an SV language format to obtain the predetermined function.
[0013] Optionally, the target parameters are classified using the predetermined function to obtain the classified target parameters, including: converting the target parameters into a parameter matrix corresponding to the test case; and classifying the parameter matrix using the predetermined function to obtain the classified target parameters.
[0014] Optionally, the verification platform is a universal verification methodology UVM verification platform.
[0015] According to another aspect of an embodiment of the present invention, a verification device is also provided, including: a classification module, used to classify the target parameters using a predetermined function to obtain the classified target parameters; a first acquisition module, used to obtain negative class parameters in the classified target parameters, and generate test stimulus parameters based on the negative class parameters, wherein the negative class parameters are parameters that cause the test case to fail; and a first verification module, used to verify the module to be verified using the test stimulus parameters.
[0016] Optionally, the device further includes: a calling module, configured to call a random function to generate the target parameter based on parameters predefined in the test case before classifying the target parameter using a predetermined function to obtain the classified target parameter.
[0017] Optionally, the calling module includes: a first acquisition unit, used to acquire at least part of the parameters pre-defined in the test case; a constraint unit, used to constrain at least part of the parameters to a predetermined range to obtain initial parameters; and a calling unit, used to call the random function to generate the target parameters based on the initial parameters.
[0018] Optionally, the device further comprises: a second verification module, configured to call the predetermined function required for the verification environment in the verification platform before classifying the target parameters using the predetermined function to obtain the classified target parameters.
[0019] Optionally, the device also includes: a second acquisition module, used to acquire the predetermined function required for the verification environment in the verification platform before calling the predetermined function; wherein the second acquisition module includes: a second acquisition unit, used to acquire sample data from a first database and a second database, wherein the first database stores negative class stimulus values that cause the test case verification to fail, and the second database stores positive class stimulus values that cause the test case verification to succeed, and a part of the sample data is used as training data; a training unit, used to train the initial network model using the training data to obtain a predetermined classification model; an extraction unit, used to extract fixed parameters of the algorithm in the predetermined classification model; an encapsulation unit, used to encapsulate the fixed parameters and the algorithm to obtain the predetermined function.
[0020] Optionally, the extraction unit includes: a verification subunit, used to use another part of the sample data as test data to verify the predetermined classification model and obtain a verification result; an extraction subunit, used to extract fixed parameters of the algorithm in the predetermined classification model when the verification result indicates that the classification accuracy of the predetermined classification model reaches a predetermined threshold.
[0021] Optionally, the encapsulation unit includes: a conversion subunit, used to convert the fixed parameters and the algorithm into a C language function; and an encapsulation subunit, used to encapsulate the C language function into an SV language format to obtain the predetermined function.
[0022] Optionally, the classification module includes: a conversion unit, used to convert the target parameters into a parameter matrix corresponding to the test case; and a classification unit, used to classify the parameter matrix using the predetermined function to obtain the classified target parameters.
[0023] Optionally, the verification platform is a Universal Verification Machine (UVM) verification platform.
[0024] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, comprising: a memory and a processor, wherein the memory stores program instructions, and the processor retrieves the program instructions from the memory to execute any of the verification methods described above.
[0025] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, storing a program file, wherein the program file can be executed to implement any of the verification methods described above.
[0026] In an embodiment of the present invention, a predetermined function is used to classify the target parameters to obtain the classified target parameters; the negative class parameters in the classified target parameters are obtained, and test stimulus parameters are generated based on the negative class parameters, wherein the negative class parameters are parameters that cause the test case to fail; and the test stimulus parameters are used to verify the module to be verified. The verification method provided by the embodiment of the present invention achieves the purpose of classifying the target parameters in the test case, and generating test stimulus parameters using the negative class parameters obtained by classification to verify the module to be verified, thereby achieving the technical effect of effectively improving the chip verification efficiency, and further solving the technical problems of wasting human resources, low verification efficiency, and delaying the time to market of products in the existing chip verification field in the related technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0028] Figure 1 It is a schematic diagram of a traditional UVM verification platform structure in the prior art;
[0029] Figure 2 is a flow chart of a verification method according to an embodiment of the present invention;
[0030] Figure 3 It is a flow chart of a general verification method based on neural network and UVM verification methodology according to an embodiment of the present invention;
[0031] Figure 4 is a schematic diagram of a verification device according to an embodiment of the present invention;
[0032] Figure 5 is a schematic diagram of an electronic device according to an embodiment of the present invention;
[0033] Figure 6 is a schematic diagram of a computer-readable storage medium according to an embodiment of the present invention. DETAILED DESCRIPTION
[0034] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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 should fall within the scope of protection of the present invention.
[0035] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0036] Example 1
[0037] According to an embodiment of the present invention, a method embodiment of a verification method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0038] Figure 2 is a flow chart of a verification method according to an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:
[0039] Step S202: classify the target parameters using a predetermined function to obtain the classified target parameters.
[0040] Step S204, obtaining negative class parameters in the classified target parameters, and generating test stimulus parameters based on the negative class parameters, wherein the negative class parameters are parameters that cause the test case to fail.
[0041] Step S206: Verify the module to be verified using the test stimulus parameters.
[0042] As can be seen from the above, in the embodiment of the present invention, the target parameters can first be classified using a predetermined function to obtain the classified target parameters; then the negative class parameters in the classified target parameters can be obtained, and test stimulus parameters can be generated based on the negative class parameters, wherein the negative class parameters are parameters that cause the test case to fail; finally, the module to be verified is verified using the test stimulus parameters. The verification method provided by the embodiment of the present invention achieves the purpose of classifying the target parameters in the test case, and generating test stimulus parameters using the negative class parameters obtained by classification to verify the module to be verified, thereby achieving the technical effect of effectively improving the chip verification efficiency, and further solving the technical problems of wasting human resources, low verification efficiency, and delaying the time to market of products in the existing chip verification field in the related technology.
[0043] As an optional embodiment, before classifying the target parameters using a predetermined function to obtain the classified target parameters, the verification method further includes: calling a random function to generate the target parameters based on parameters predefined in the test case.
[0044] As an optional embodiment, in the above steps, calling a random function to generate target parameters based on all parameters pre-defined in the test case includes: obtaining at least part of the parameters pre-defined in the test case; constraining at least part of the parameters to a predetermined range to obtain initial parameters; calling a random function to generate target parameters based on the initial parameters.
[0045] It should be noted that, in the above optional embodiments, constraining parameters to a predetermined range is a boundary constraint problem, which is used to improve the controllability of experimental parameters and prevent redundant parameters that interfere with the test from crossing the boundary constraints. The solution includes but is not limited to: resetting the scheme to modify the cross-boundary parameters; setting a penalty function to keep the experimental parameters away from the restricted area.
[0046] In the above optional embodiment, the above-mentioned calling of the random function is to call the random parameters after constraining all the parameters defined in the original test case to a reasonable range, generate a large number of parameter queues, and generate a parameter matrix, which can enrich the diversity of the parameter sequence.
[0047] As an optional embodiment, in the above step S202, before using a predetermined function to classify the target parameters to obtain the classified target parameters, the verification method further includes: calling a predetermined function required for the verification environment in the verification platform.
[0048] Optionally, the above verification environment is a verification environment pre-configured by the verification platform based on the module to be verified.
[0049] As an optional embodiment, before calling a predetermined function required for the verification environment in the verification platform, the verification method also includes: obtaining the predetermined function; wherein obtaining the predetermined function includes: obtaining sample data from a first database and a second database, wherein the first database stores negative class stimulus values that cause the test case verification to fail, and the second database stores positive class stimulus values that cause the test case verification to succeed, and a portion of the sample data is used as training data; using the training data to train the initial network model to obtain a predetermined classification model; extracting fixed parameters of the algorithm in the predetermined classification model; encapsulating the fixed parameters and the algorithm to obtain the predetermined function.
[0050] In this embodiment, the above-mentioned training network uses different neural network models for training depending on the complexity of the parameters. Generally, BP neural network algorithm, support vector machine algorithm or convolutional neural network algorithm is used, which can save the running computing power of the test platform and the working time of the testers.
[0051] It should be noted that the initial network model that needs to be trained is not limited to the above types, and can also be other types.
[0052] In this embodiment, the positive stimulus value is a random stimulus value that makes the test case succeed, and the negative stimulus value is a random stimulus value that makes the test case fail. The advantage of this classification is that the negative stimulus value (that is, the one that makes the test case fail) can be instilled into the design to be tested. This processing can accurately verify system vulnerabilities that are prone to occur.
[0053] As an optional embodiment, extracting fixed parameters of the algorithm in the predetermined classification model includes: using another part of the sample data as test data to verify the predetermined classification model to obtain a verification result; when the verification result indicates that the classification accuracy of the predetermined classification model reaches a predetermined threshold, extracting the fixed parameters of the algorithm in the predetermined classification model.
[0054] In the above optional embodiment, whether to stop training will be decided based on the final accuracy of training. For the sake of efficiency and computing power saving, the accuracy rate is generally 95%, which not only saves computing power but also maximizes the test efficiency.
[0055] As an optional embodiment, the fixed parameters and the algorithm are encapsulated to obtain a predetermined function, including: converting the fixed parameters and the algorithm into a C language function; and encapsulating the C language function into an SV language format to obtain the predetermined function.
[0056] It should be noted that the SV (System Verilog) language format in the above optional embodiment is an improvement of the VUM verification platform compared to the VHDL verification platform, and its feature is that it can support constrained random excitation. Therefore, ADC and GPIO in the UVM verification platform can be constrained random, which makes the platform verification test more accurate.
[0057] As an optional embodiment, in the above step S202, the target parameters are classified using a predetermined function to obtain the classified target parameters, including: converting the target parameters into a parameter matrix corresponding to the test case; and classifying the parameter matrix using a predetermined function to obtain the classified target parameters.
[0058] In the above optional embodiments, the method of converting parameters into matrices can better reflect the relationship between variables, and the parameter matrix is more structured in terms of parameter estimation, inference, etc., which is beneficial to improving engineers' controllability of chip testing.
[0059] As an optional embodiment, the verification platform is a universal verification methodology UVM verification platform.
[0060] Among them, the UVM (Universal Verification Methodology, UVM) verification platform has the advantages of strong robustness and adaptability compared to other verification platforms. When an ordered test case sequence is used to input the verification platform, the code coverage of UVM is 79%. When a randomized test case parameter sequence is used to input the verification platform, the code coverage can be increased to 85%. Among them, the code coverage is the proportion of source code in the program described in software testing that is tested. The higher the code coverage, the easier it is to find defects in the module to be verified.
[0061] A preferred embodiment of the present invention is described below with reference to the accompanying drawings.
[0062] Figure 3 is a flow chart of a general verification method based on neural network and UVM verification methodology according to an embodiment of the present invention, such as Figure 3 As shown, the specific implementation steps are as follows:
[0063] Step 1: During the verification process in the initial project, collect the random stimulus values in the relevant verification failure test cases and verification success test cases. After the collection is completed, establish a positive sample and negative sample database, store them separately and mark them with (positive and negative) labels.
[0064] Step 2: Use BP neural network algorithm or support vector machine algorithm or convolutional neural network algorithm (depending on the complexity of parameters) to train the collected positive and negative samples, and divide the samples into positive classes (parameters that make the test case successful) and negative classes (parameters that make the test case fail).
[0065] Step 3: Decide whether to stop training based on the final accuracy of the training (generally 95% is sufficient). After stopping the training, extract the parameters of the relevant algorithm, and then convert the algorithm and fixed parameters into a C language function. In order to facilitate later use in the verification environment, it must also be encapsulated as a System Verilog function.
[0066] Step 4: During the verification of related design product iterations, the original verification framework is improved, mainly by adding algorithms to the cases.
[0067] Step 5: For all parameters defined in the original test case, after constraining them to a reasonable range, call the random function to generate a large number of parameter queues, which are then integrated to generate a parameter matrix in the test case.
[0068] Step 6: In the test case, call the System Verilog function encapsulated in step 3 to classify the parameter matrix in step 5. After the classification algorithm, the parameters will be divided into positive and negative categories, and all the negative parameters classified will be generated as test stimuli and instilled into the module to be verified. This not only reuses the previous verification results, but also accurately verifies the vulnerable points.
[0069] In summary, the purpose of the present invention is to provide a universal verification method and architecture based on neural network and UVM methodology, which solves the problems of waste of human resources, low verification efficiency, delayed product launch time, and a greater probability of missing previously discovered vulnerabilities in existing chip verification related technologies during product iteration, and uses SystemVerilog language as an encapsulation function. Compared with other verification platforms, its advantage is that it supports constrained random excitation and increases the robustness of functional verification.
[0070] Example 2
[0071] According to another aspect of the embodiment of the present invention, a verification device is also provided. Figure 4 is a schematic diagram of a verification device according to an embodiment of the present invention. Figure 4 As shown, the verification device includes: a classification module 41, a first acquisition module 43 and a first verification module 45. The verification device is described below.
[0072] The classification module 41 is used to classify the target parameters using a predetermined function to obtain the classified target parameters.
[0073] The first acquisition module 43 is used to acquire negative class parameters from the classified target parameters, and generate test stimulus parameters based on the negative class parameters, wherein the negative class parameters are parameters that cause the test case to fail.
[0074] The first verification module 45 is used to verify the module to be verified using the test stimulus parameters.
[0075] It should be noted that the above-mentioned classification module 41, the first acquisition module 43 and the first verification module 45 correspond to steps S202 to S206 in Example 1, and the examples and application scenarios implemented by the above-mentioned modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules as part of the device can be executed in a computer system such as a set of computer executable instructions.
[0076] As can be seen from the above, in the embodiment of the present invention, the target parameters can be first classified by the classification module 41 using a predetermined function to obtain the classified target parameters; then the negative class parameters in the classified target parameters can be obtained by the first acquisition module 43, and test stimulus parameters can be generated based on the negative class parameters, wherein the negative class parameters are parameters that cause the test case to fail; finally, the module to be verified can be verified by the test stimulus parameters using the first verification module 45. The verification device provided by the embodiment of the present invention achieves the purpose of classifying the target parameters in the test case, and generating test stimulus parameters using the negative class parameters obtained by classification to verify the module to be verified, thereby achieving the technical effect of effectively improving the chip verification efficiency, and further solving the technical problems of wasting human resources, low verification efficiency, and delaying the time to market of products in the existing chip verification field in the related technology.
[0077] Optionally, the verification device further includes: a calling module, configured to call a random function to generate target parameters based on parameters predefined in the test case before classifying the target parameters using a predetermined function to obtain the classified target parameters.
[0078] Optionally, the calling module includes: a first acquisition unit, used to acquire at least part of the parameters pre-defined in the test case; a constraint unit, used to constrain at least part of the parameters to a predetermined range to obtain initial parameters; and a calling unit, used to call a random function to generate target parameters based on the initial parameters.
[0079] Optionally, the verification device further includes: a second verification module, which is used to call a predetermined function required for the verification environment in the verification platform before classifying the target parameters using a predetermined function to obtain the classified target parameters.
[0080] Optionally, the verification device may also include: a second acquisition module, used to obtain a predetermined function before calling a predetermined function required for the verification environment in the verification platform; wherein, the second acquisition module includes: a second acquisition unit, used to obtain sample data from a first database and a second database, wherein the first database stores negative class stimulus values that cause the test case verification to fail, and the second database stores positive class stimulus values that cause the test case verification to succeed, and a part of the sample data is used as training data; a training unit, used to train the initial network model using the training data to obtain a predetermined classification model; an extraction unit, used to extract fixed parameters of the algorithm in the predetermined classification model; and an encapsulation unit, used to encapsulate the fixed parameters and the algorithm to obtain a predetermined function.
[0081] Optionally, the extraction unit includes: a verification subunit, used to use another part of the sample data as test data to verify the predetermined classification model and obtain a verification result; an extraction subunit, used to extract fixed parameters of the algorithm in the predetermined classification model when the verification result indicates that the classification accuracy of the predetermined classification model reaches a predetermined threshold.
[0082] Optionally, the encapsulation unit includes: a conversion subunit, used to convert fixed parameters and algorithms into C language functions; and an encapsulation subunit, used to encapsulate the C language function into an SV language format to obtain a predetermined function.
[0083] Optionally, the classification module includes: a conversion unit, used to convert the target parameters into a parameter matrix corresponding to the test case; and a classification unit, used to classify the parameter matrix using a predetermined function to obtain the classified target parameters.
[0084] Optionally, the verification platform is a Universal Verification Machine (UVM) verification platform.
[0085] Example 3
[0086] According to another aspect of the embodiments of the present invention, an electronic device is provided. Figure 5 is a schematic diagram of an electronic device according to an embodiment of the present invention, such as Figure 5 As shown, the electronic device includes a memory 501 and a processor 502 which are connected to each other.
[0087] The memory 501 is used to store program instructions for implementing any of the above-mentioned device methods.
[0088] The processor 502 is used to execute program instructions stored in the memory 501 .
[0089] The processor 502 may also be referred to as a CPU (Central Processing Unit). The processor 502 may be an integrated circuit chip having signal processing capabilities. The processor 502 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0090] The memory 501 can be a memory stick, a TF card, etc., which can store all the information in the electronic device of the device, including the input raw data, computer programs, intermediate operation results and final operation results are all stored in the memory. It stores and retrieves information according to the location specified by the controller. Only with the memory can the electronic device have a memory function and ensure normal operation. The memory of the electronic device can be divided into main memory (internal memory) and auxiliary memory (external memory) according to its use, and there is also a classification method of dividing it into external memory and internal memory. External memory is usually a magnetic medium or an optical disk, etc., which can store information for a long time. Memory refers to the storage component on the motherboard, which is used to store the data and programs currently being executed, but it is only used to temporarily store programs and data. If the power is turned off or the power is cut off, the data will be lost.
[0091] Example 4
[0092] According to another aspect of the embodiment of the present invention, a computer-readable storage medium is also provided. The computer-readable storage medium of the present application stores a program file 603 (such as Figure 6 As shown), the program file 603 can be stored in the above storage medium in the form of a software product, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the various implementation methods of the present application. The aforementioned storage device includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk, etc., which can store program codes, or a terminal device such as a computer, a server, a mobile phone, a tablet, etc.
[0093] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0094] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0095] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0096] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0097] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0098] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0099] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A verification method, characterized in that: include: Using a predetermined function to classify the target parameters to obtain the classified target parameters, wherein the target parameters are parameters generated by calling a random function based on parameters pre-defined in the test case, and the predetermined function is a function required by the verification environment in the verification platform; Acquire negative class parameters from the classified target parameters, and generate test stimulus parameters based on the negative class parameters, wherein the negative class parameters are parameters that cause the test case to fail; Verifying the module to be verified using the test stimulus parameters; The calling of the random function to generate the target parameter based on all parameters predefined in the test case includes: obtaining at least part of the parameters predefined in the test case; constraining at least part of the parameters to a predetermined range to obtain initial parameters; calling the random function to generate the target parameter based on the initial parameters; Before calling the predetermined function required for the verification environment in the verification platform, it also includes: obtaining the predetermined function; wherein obtaining the predetermined function includes: obtaining sample data from a first database and a second database, wherein the first database stores negative class stimulus values that cause the test case verification to fail, and the second database stores positive class stimulus values that cause the test case verification to succeed, and a part of the sample data is used as training data; using the training data to train the initial network model to obtain a predetermined classification model; extracting fixed parameters of the algorithm in the predetermined classification model; encapsulating the fixed parameters and the algorithm to obtain the predetermined function; Among them, extracting the fixed parameters of the algorithm in the predetermined classification model includes: using another part of the sample data as test data to verify the predetermined classification model to obtain a verification result; when the verification result indicates that the classification accuracy of the predetermined classification model reaches a predetermined threshold, extracting the fixed parameters of the algorithm in the predetermined classification model.
2. The verification method according to claim 1, characterized in that: Encapsulating the fixed parameters and the algorithm to obtain the predetermined function includes: Converting the fixed parameters and the algorithm into a C language function; The C language function is encapsulated into SV language format to obtain the predetermined function.
3. The verification method according to claim 1, characterized in that: The target parameters are classified by using the predetermined function to obtain the classified target parameters, including: Converting the target parameters into a parameter matrix corresponding to the test case; The parameter matrix is classified using the predetermined function to obtain classified target parameters.
4. The verification method according to any one of claims 1 to 3, characterized in that: The verification platform is a universal verification methodology UVM verification platform.
5. A verification device, characterized in that: include: A classification module, used to classify the target parameters using a predetermined function to obtain the classified target parameters, wherein the target parameters are parameters generated by calling a random function based on parameters predefined in the test case, and the predetermined function is a function required by the verification environment in the verification platform; A first acquisition module is used to acquire negative class parameters from the classified target parameters, and generate test stimulus parameters based on the negative class parameters, wherein the negative class parameters are parameters that cause the test case to fail; A first verification module, used to verify the module to be verified using the test stimulus parameters; The calling module includes: a first acquisition unit, used to acquire at least part of the parameters predefined in the test case; a constraint unit, used to constrain at least part of the parameters to a predetermined range to obtain initial parameters; a calling unit, used to call the random function to generate the target parameters based on the initial parameters; The device further comprises: a second acquisition module, used for acquiring the predetermined function required for the verification environment in the verification platform before calling the predetermined function; wherein the second acquisition module comprises: a second acquisition unit, used for acquiring sample data from a first database and a second database, wherein the first database stores negative class stimulus values that cause the test case verification to fail, and the second database stores positive class stimulus values that cause the test case verification to succeed, and a part of the sample data is used as training data; a training unit, used for training the initial network model using the training data to obtain a predetermined classification model; an extraction unit, used for extracting fixed parameters of the algorithm in the predetermined classification model; and a packaging unit, used for packaging the fixed parameters and the algorithm to obtain the predetermined function; Among them, the extraction unit includes: a verification subunit, used to use another part of the sample data as test data to verify the predetermined classification model and obtain a verification result; an extraction subunit, used to extract the fixed parameters of the algorithm in the predetermined classification model when the verification result indicates that the classification accuracy of the predetermined classification model reaches a predetermined threshold.
6. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores program instructions, and the processor retrieves the program instructions from the memory to execute the verification method according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that: A program file is stored, and the program file can be executed to implement the verification method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Automatic regression testing method
CN103823747A
Verification platform and method for digital downsampling filter based on UVM platform
CN111064449A
