Function verification method, device and equipment and readable storage medium
By traversing the feature attributes of the target design across multiple dimensions, identifying single-point coverage items and performing cross-combinations, and integrating the verification results using weighted values, the problem of low reliability of functional coverage in traditional methods is solved, achieving more reliable functional coverage verification.
Patent Information
- Application Number
- CN202511061394.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2025-10-31
AI Technical Summary
Traditional functional coverage verification methods rely on the experience of verification personnel, which can easily lead to the omission of functional points and result in low coverage reliability.
The feature attributes of the target design are traversed one by one under multiple different dimensions to determine the single-point coverage items. Cross-combination is performed with the cross dimension less than a threshold as a constraint to obtain cross coverage items. The verification results are integrated by weighted value to improve the reliability of functional coverage.
By employing a systematic approach, we ensured comprehensive and reliable functional coverage, avoiding omissions and improving the accuracy and efficiency of verification.
Smart Images

Figure CN120874701A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer application technology, and in particular to a functional verification method, apparatus, device, and readable storage medium. Background Technology
[0002] In the verification process of integrated circuits, functional coverage is a crucial indicator for measuring the completeness of design verification and is essential for ensuring the correctness of chip logic design. Traditional methods for identifying and defining functional coverage items tend to be based on the verification plan, enumerating and defining functional coverage items one by one according to the verification objectives formed by the breakdown and refinement of functional points in the architecture and design documents. Because this method relies heavily on the verification personnel's work experience and understanding of the architecture and design documents' functions, it is easy to overlook functional points, resulting in incomplete functional coverage definitions and low reliability of the obtained functional coverage.
[0003] In summary, how to effectively improve the reliability of functional coverage is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0004] The purpose of this application is to provide a functional verification method, apparatus, device, and readable storage medium to improve the reliability of functional coverage.
[0005] To solve the above-mentioned technical problems, this application provides the following technical solution:
[0006] A functional verification method, comprising:
[0007] The feature attributes of the target design are traversed one by one under multiple different dimensions, and the single-point coverage items are determined one by one using the feature attributes obtained from the traversal.
[0008] The single-point coverage items are combined by cross-combining them with the cross dimension being less than a threshold, resulting in multiple cross-coverage items;
[0009] Determine the weighted values corresponding to the multiple single-point coverage items and the multiple cross-coverage items, respectively;
[0010] Multiple single-point coverage items and multiple cross-coverage items were verified using test cases, and multiple verification results were obtained;
[0011] By integrating multiple verification results according to the weighted values, the functional coverage of the target design is obtained.
[0012] Preferably, the single-point coverage items are cross-combined with the cross dimension being less than a threshold as a constraint to obtain multiple cross-coverage items, including:
[0013] Several target coverage items are selected from the multiple single-point coverage items; wherein the number of target coverage items is less than the number of single-point coverage items;
[0014] Several target coverage items are cross-combined with the cross dimension being less than a threshold to obtain multiple cross-coverage items.
[0015] Preferably, the single-point coverage items are cross-combined with the cross dimension being less than a threshold as a constraint to obtain multiple cross-coverage items, including:
[0016] The multiple single-point coverage items are divided into key coverage items and basic coverage items;
[0017] By combining several single-point coverage items with the cross dimension being less than a threshold as a constraint, and by constraining the random range of the basic coverage items, multiple cross coverage items are obtained.
[0018] Preferably, determining the weighted values corresponding to the plurality of single-point coverage items and the plurality of cross-coverage items includes:
[0019] Obtain verification requirement information;
[0020] Using the verification requirement information, the verification priority of each single-point coverage item and cross-coverage item is determined; wherein, different verification priorities correspond to different preset values;
[0021] Assign the preset value corresponding to the verification priority to the weighted value.
[0022] Preferably, after determining the single-point coverage item one by one using the feature attributes obtained from the traversal, the method further includes:
[0023] Output the single-point coverage items of the target design in the form of a tree diagram;
[0024] Receive verification control information;
[0025] The verification control information is used to perform at least one of the following operations: adding, deleting, modifying, and viewing the multiple single-point coverage items.
[0026] Preferably, the feature attributes of the target design are iterated one by one across multiple different dimensions, including:
[0027] In terms of functionality, the feature attributes of the target design are traversed according to functional categories.
[0028] In the scene dimension, the feature attributes of the target design are traversed according to the scene classification.
[0029] In the data dimension, the feature attributes of the target design are traversed according to the value range and / or combination form;
[0030] Under the control dimension, the feature attributes of the target design are traversed according to the control form.
[0031] Preferably, it further includes:
[0032] In terms of interface behavior, the feature attributes of the target design are traversed.
[0033] A functional verification device, comprising:
[0034] The single-point coverage item determination module is used to traverse the feature attributes of the target design one by one under multiple different dimensions, and use the feature attributes obtained by the traversal to determine the single-point coverage item one by one.
[0035] The cross-coverage item determination module is used to cross-combine the single-point coverage items with the cross dimension being less than a threshold as a constraint to obtain multiple cross-coverage items;
[0036] The weighting value determination module is used to determine the weighting values corresponding to the multiple single-point coverage items and the multiple cross-coverage items, respectively.
[0037] The test case execution module is used to verify multiple single-point coverage items and multiple cross-coverage items using test cases, and obtain multiple verification results;
[0038] The functional coverage acquisition module is used to integrate multiple verification results according to the weighted values to obtain the functional coverage of the target design.
[0039] An electronic device, comprising:
[0040] Memory, used to store computer programs;
[0041] A processor is used to implement the steps of the above-described functional verification method when executing the computer program.
[0042] A readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the above-described functional verification method.
[0043] Applying the method provided in the embodiments of this application, the feature attributes of the target design are traversed one by one under multiple different dimensions, and single-point coverage items are determined one by one using the feature attributes obtained from the traversal; the single-point coverage items are cross-combined with the cross dimension being less than a threshold as a constraint to obtain multiple cross-coverage items; the weighted values corresponding to the multiple single-point coverage items and the multiple cross-coverage items are determined respectively; the multiple single-point coverage items and the multiple cross-coverage items are verified using test cases to obtain multiple verification results; the multiple verification results are integrated according to the weighted values to obtain the functional coverage of the target design.
[0044] In this application, to avoid omitting coverage items, the feature attributes of the target design are first traversed from multiple different dimensions, and then single-point coverage items are determined one by one based on the traversed feature attributes. Then, when determining cross-coverage items, to avoid a large number of combinations affecting the verification, constraints are imposed on the cross-dimensions, thereby combining the single-point coverage items to obtain multiple cross-coverage items. After determining the coverage items, the weighted values corresponding to each coverage item can be clearly defined. After verification based on test cases, the table can integrate multiple verification results according to the weighted values to obtain the functional coverage of the target design.
[0045] In this application, the functional coverage rate not only corresponds to the single-point coverage items corresponding to all feature attributes of the target design, but also to the cross-coverage items that control the cross-dimensionality. By integrating the verification results through weighted values, the final functional coverage rate can be made more reliable.
[0046] Accordingly, embodiments of this application also provide a functional verification apparatus, device, and readable storage medium corresponding to the above-described functional verification method, which have the above-described technical effects, and will not be described in detail here. Attached Figure Description
[0047] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0048] Figure 1 This is a flowchart illustrating the implementation of a functional verification method in an embodiment of this application.
[0049] Figure 2 This is a schematic diagram of a partial A-overlay item of RAID in an embodiment of this application;
[0050] Figure 3 This is a schematic diagram of a partial B-overlay item of RAID in an embodiment of this application;
[0051] Figure 4 This is a schematic diagram of a cross-coverage item with a cross dimension of 4 in an embodiment of this application;
[0052] Figure 5 This is a schematic diagram of a cross-coverage item with a cross dimension of 5 in an embodiment of this application;
[0053] Figure 6 This is a schematic diagram illustrating a specific implementation of a functional verification method in an embodiment of this application;
[0054] Figure 7A schematic diagram of the structure of a functional verification device in an embodiment of this application;
[0055] Figure 8 A schematic diagram of the structure of an electronic device in an embodiment of this application;
[0056] Figure 9 A schematic diagram of the specific structure of an electronic device in an embodiment of this application. Detailed Implementation
[0057] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely some embodiments of the present application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0058] Please refer to Figure 1 , Figure 1 This is a flowchart of a functional verification method according to an embodiment of this application. The method includes the following steps:
[0059] S101. Traverse the feature attributes of the target design one by one under multiple different dimensions, and use the feature attributes obtained from the traversal to determine the single-point coverage item one by one.
[0060] The target design can be any design that needs to be functionally verified, such as a memory chip, an image processing chip, and a switching chip.
[0061] SOC: System-on-a-Chip; DUT: Design Under Test; Corner: Corner scenario; Cross: Cross-connection; Driver: Driver or disk; Stripe: Stripe.
[0062] In this embodiment, in order to avoid missing the verification of related functions, the feature attributes of the target design will be traversed one by one in multiple different dimensions, so as to determine the single-point coverage item based on the feature attributes obtained from each traversal.
[0063] In one specific embodiment of this application, the feature attributes of the target design are traversed sequentially across multiple different dimensions, including:
[0064] In terms of functionality, the feature attributes of the target design are traversed according to functional categories.
[0065] In the scene dimension, the feature attributes of the target design are traversed according to the scene classification.
[0066] In terms of data dimensions, the feature attributes of the target design are traversed according to the value range and / or combination form;
[0067] Under the control dimension, the feature attributes of the target design are traversed according to the control form.
[0068] The feature-based classification method categorizes functional coverage items based on different requirement attributes, functional attributes, interface behavior attributes, and scenario attributes, and then refines the coverage points level by level. For ease of description, the following provides a detailed explanation of how to obtain feature attributes from different dimensions.
[0069] For the functional dimension, the core logical functional parts can be extracted from the architecture and design documents. For example, if the target design is RAID, the functional dimension can be traversed from the working mode (read-modify-write, read-reconstruct-write, full stripe write, etc.); data path (encoding / decoding, stripe consistency, etc.); control logic (level transition, degradation, etc.); exception handling (disk failure, bad disk recovery, configuration, etc.) to obtain the corresponding characteristic attributes.
[0070] Example 2: If the target design is a switching chip, then by traversing the functional dimensions, we can obtain the characteristic attributes of the switching chip, such as data paths, different message types, and abnormal message handling.
[0071] For scenario-based scenarios, if the target chip is a RAID array, typical scenarios defined in the architecture and design documents can be traversed. These include: normal scenarios (normal data paths under different operating modes); boundary scenarios (data paths considering the boundary values of the reachable range of data or input random variables under different operating modes); and abnormal scenarios (abnormal situations that may occur during disk array operation as enumerated in the architecture or design documents). If the target chip is a network chip, features such as full-load forwarding and packet loss recovery can be obtained.
[0072] For the data dimension, if the target design is RAID, the range and combination of data values that can be covered by random variables (random variables correspond to characteristic attributes) in the defined Transaction can be obtained, such as: RAID level: RAID5, RAID6, and RAIDTP, etc.; number of data disks: 1~31; number of parity disks: 1~3; ChunkSize depth: 1~256; IO start position: 1~31, etc. If the target design is an image processing chip, the pixel value range, RGB / YUV format conversion, and other characteristic attributes of the image processing chip can be obtained. If the target design is a switching chip, the payload length, Length, and other characteristic attributes can be obtained.
[0073] For the control dimension, it typically includes coverage items such as critical state machine transitions, control signal combinations, and reset / de-reset of reset signals. For example, the sleep-wake state transition characteristic in the power management module.
[0074] In one specific embodiment of this application, based on the above specific embodiments, an additional traversal of the interface behavior dimension can be added. That is, the characteristic attributes of the target design are traversed one by one under multiple different dimensions, including: traversing the characteristic attributes of the target design under the interface behavior dimension. Specifically, for the interface behavior dimension, depending on whether the target design has custom interface protocols / standard interfaces (such as handshakes), if so, it is necessary to list and analyze the corresponding coverage items of the input / output interface protocols and timing. For example, if the target design is an AMBA bus, the corresponding characteristic attributes such as AMBA bus read / write transactions and burst transmission modes are obtained.
[0075] After obtaining the feature attributes through traversal, a corresponding single-point coverage item can be defined for each feature attribute in turn.
[0076] In this embodiment, the definition of coverage items includes: coverage target, triggering condition, coverage type and quantification index (e.g., if at least 10 different sets of data are successfully received under this configuration (randomly selected within the range of 0x00~0xFF), it is determined to be 100% coverage).
[0077] S102. Combine single-point coverage items with the constraint that the cross dimension is less than the threshold to obtain multiple cross coverage items.
[0078] In this embodiment, the cross-coverage item is the coverage item that requires collaborative verification of multiple feature attributes.
[0079] The ease or difficulty of collecting cross-coverage terms depends on the definition of the cross-dimensionality of different variables. This application finds that if the defined dimension is too small (e.g., a cross-dimensionality of 2), it leads to a large number of cross-coverage terms being defined, and the process is cumbersome and complex; if the defined dimension is too large (e.g., a cross-dimensionality of 8), it is difficult to fully cover all cross-coverage terms during regression collection due to the large number of variables being combined. For example, for random variables A, B, C, D, E, F, G, and H, there are correlations between them, i.e., there will be combined cross-coverage scenarios of the above random variables. If their individual random ranges are 2, the combined cross-coverage scenarios, i.e., A×B×C×D×E×F×G×H, will have 2^8 possible scenarios. In this case, it is difficult to achieve full coverage during the later stage of verifying functional coverage.
[0080] Therefore, in this embodiment, when performing cross-combination, constraints can be imposed on the cross-dimension. Single-point coverage items are cross-combined with the cross-dimension being less than a threshold to obtain multiple cross-coverage items. For example, a rule defining cross-coverage items is that the cross-dimension is no greater than 5.
[0081] In one specific embodiment of this application, single-point coverage items are cross-combined with the cross dimension being less than a threshold as a constraint to obtain multiple cross-coverage items, including:
[0082] Select several target coverage items from multiple single-point coverage items; wherein the number of target coverage items is less than the number of single-point coverage items.
[0083] Several target coverage items are combined by cross-combining them with the cross dimension being less than a threshold, resulting in multiple cross-coverage items.
[0084] In other words, considering the large number of single-point coverage items corresponding to complex designs in this application, if all single-point coverage items were cross-combined, the number of cross-coverage items would be extremely large. Therefore, in this embodiment, single-point coverage items can be filtered, and cross-combinations are only performed on more important target coverage items. Since the number of target coverage items is less than the number of single-point coverage items, the number of cross-coverage items can be greatly reduced, avoiding a large number of low-value verifications.
[0085] In addition, cross-coverage items related to the basic class can be defined with a dimension of less than 5.
[0086] The specific items to be selected from the single-point coverage items as target coverage items can be specified or selected according to the actual design and verification requirements, which will not be elaborated here.
[0087] In one specific embodiment of this application, single-point coverage items are cross-combined with the cross dimension being less than a threshold as a constraint to obtain multiple cross-coverage items, including:
[0088] Multiple single-point coverage items are divided into key coverage items and basic coverage items;
[0089] By combining several single-point coverage items with the cross dimension being less than a threshold as a constraint, and by constraining the random range of the basic coverage items, multiple cross coverage items are obtained.
[0090] In other words, considering that each single-point coverage item has its corresponding variable, and that the random range of variables with written feature attributes is large, in order to avoid excessively large random ranges in some basic coverage items leading to overly large validation data and affecting validation convergence, and given that the basic coverage items have already undergone sufficient validation in the single-point validation items, the number of tests can be reduced by constraining their random range.
[0091] Specifically, single-point coverage items can be categorized based on factors such as their value and function, into key coverage items and basic coverage items. Then, after cross-combination, the random range of the integrated coverage items can be constrained, thereby reducing the random range of basic feature attributes in the cross-coverage items, reducing the amount of validation data, and accelerating validation efficiency.
[0092] In practical applications, it is possible to simultaneously filter coverage items and constrain the random range, thereby further accelerating verification efficiency. That is, under the constraint of cross dimensions, coverage items are filtered and the basic coverage items in the cross items are weakened, namely: reasonable constraint of cross dimensions: cross coverage is only performed on key parameter combinations, and the random range of parameters corresponding to integrated coverage items is constrained.
[0093] S103. Determine the weighted values corresponding to multiple single-point coverage items and multiple cross-coverage items respectively.
[0094] At the same time, different weight allocations are combined, namely: assigning higher weights to high-priority combinations and reducing the coverage collection overhead of low-priority combinations.
[0095] In one specific embodiment of this application, determining the weighted values corresponding to multiple single-point coverage items and multiple cross-coverage items includes:
[0096] Obtain verification requirement information;
[0097] Using the verification requirement information, the verification priority of each single-point coverage item and cross-coverage item is determined; different verification priorities correspond to different preset values.
[0098] Assign the weighted value to the preset value corresponding to the verification priority.
[0099] The verification requirement information can be information indicating which coverage items have higher weights and which have lower weights, information that directly indicates the verification priority, or information that characterizes the verification requirements of coverage items, such as key verification or direct trust.
[0100] Verification priorities can be determined based on verification requirement information.
[0101] Different preset values can be set based on different verification priorities, and then these preset values are directly used as the corresponding weighting values. In this embodiment, each coverage item has its corresponding weighting value, and the weighting values between different coverage items can be the same or different.
[0102] S104. Use test cases to verify multiple single-point coverage items and multiple cross-coverage items, and obtain multiple verification results.
[0103] In this context, a test instance is a specific test case (one test case can correspond to several test instances). A test case is an operational step and expected result designed to cover a specific target. Executing the test case verifies whether the coverage item meets the requirements. One coverage item can require multiple test cases for verification, and one test case can also cover multiple coverage items.
[0104] For details on how to generate test instances, please refer to the relevant verification schemes; they will not be elaborated upon here.
[0105] The verification results can be the coverage rate corresponding to each individual coverage item.
[0106] S105. Integrate multiple verification results according to weighted values to obtain the functional coverage of the target design.
[0107] In this application, the coverage rate and the corresponding weighted value of a single coverage item can be weighted and superimposed to obtain the overall functional coverage rate of the target design.
[0108] Applying the method provided in the embodiments of this application, the feature attributes of the target design are traversed one by one under multiple different dimensions, and single-point coverage items are determined one by one using the feature attributes obtained from the traversal; the single-point coverage items are cross-combined with the cross dimension being less than a threshold as a constraint to obtain multiple cross-coverage items; the weighted values corresponding to the multiple single-point coverage items and the multiple cross-coverage items are determined respectively; the multiple single-point coverage items and the multiple cross-coverage items are verified using test cases to obtain multiple verification results; the multiple verification results are integrated according to the weighted values to obtain the functional coverage of the target design.
[0109] In this application, to avoid omitting coverage items, the feature attributes of the target design are first traversed from multiple different dimensions, and then single-point coverage items are determined one by one based on the traversed feature attributes. Then, when determining cross-coverage items, to avoid a large number of combinations affecting the verification, constraints are imposed on the cross-dimensions, thereby combining the single-point coverage items to obtain multiple cross-coverage items. After determining the coverage items, the weighted values corresponding to each coverage item can be clearly defined. After verification based on test cases, the table can integrate multiple verification results according to the weighted values to obtain the functional coverage of the target design.
[0110] In this application, the functional coverage rate not only corresponds to the single-point coverage items corresponding to all feature attributes of the target design, but also to the cross-coverage items that control the cross-dimensionality. By integrating the verification results through weighted values, the final functional coverage rate can be made more reliable.
[0111] It should be noted that, based on the above embodiments, the embodiments of this application also provide corresponding improvement schemes. In the preferred / improved embodiments, the same or corresponding steps as in the above embodiments can be referred to each other, and the corresponding beneficial effects can also be referred to each other; however, these will not be elaborated upon in the preferred / improved embodiments herein.
[0112] In one specific embodiment of this application, after determining the single-point coverage item one by one using the feature attributes obtained from traversal, the method further includes:
[0113] Output the single-point coverage items of the target design in the form of a tree diagram;
[0114] Receive verification control information;
[0115] Use verification control information to perform at least one of the following operations: add, delete, modify, and view multiple single-point coverage items.
[0116] In other words, once the single-point coverage item is determined, it can be output as follows: Figure 2 , Figure 3 (Because the single-point coverage diagram of a complete RAID is split into local A and local B,) Figure 2 and Figure 3 Merger ( Figure 2 The connection points on the right are concentrated. Figure 3 The diagram illustrates single-point coverage items (based on the RAID structure's corresponding frame IDs) to allow testers to further filter, confirm, and adjust these single-point coverage items. Single-point coverage items can be added, deleted, modified, and queried using verification control information. This ensures that the functional coverage obtained during subsequent verification better reflects the actual design.
[0117] That is, it iterate through all the single-point coverage items that are expected to be covered. Presenting the complex and cumbersome items to be covered in a structured way not only facilitates quality management but also makes it easier to identify and fill gaps.
[0118] To enable those skilled in the art to better understand and implement the functional verification method provided in the embodiments of this application, the verification process is described below using a target design of RAID as an example.
[0119] RAID (Redundant Array of Independent Disks) refers to combining multiple hard drives into a single array. Within a RAID array, each physical hard drive functions as a separate, large storage device under the operating system. Even if one hard drive fails, the RAID array can continue operating without being affected by the damaged drive.
[0120] Specifically, Table 1 shows a schematic diagram of a typical RAID group.
[0121] Table 1 shows the RAID group structure.
[0122]
[0123] In Table 1, Drive 0 – Drive n-1 represent disk arrays, which are divided into two main categories: data disks and parity disks. Parity disks are further categorized into 1-parity disk, 2-parity disks, and 3-parity disks depending on the RAID type. Each column in Table 1 represents a stripe / chunk on a single disk. A stripe consists of n contiguous 4KB storage units, with a size equal to the chunk size. Multiple stripe units arranged in an array form a stripe. Within a stripe, a 4KB wide horizontal bar serves as the stripe head.
[0124] Based on Table 1, the structures of different RAID types (to simplify the introduction of RAID, this example only considers RAID5, RAID6 and RAIDTP) are shown in Table 2 below (from left to right, corresponding to RAID5, RAID6 and RAIDTP respectively). RAID5 includes 1 parity disk (P), RAID6 includes 2 parity disks (P and Q), and RAIDTP includes 3 parity disks (P, Q and R). In actual use, the parity disks are randomly distributed in the disk array.
[0125] Table 2 shows the structural diagrams for RAID5, RAID6, and RAIDTP.
[0126]
[0127] During RAID verification, it is necessary to fully consider the RAID group structure, RAID type (RAID5, RAID6, RAIDTP), Chunk Size (Chuck Size: 1->M), the number of Chucks at which the data arrangement starts (1->N), the offset of the starting position of the data arrangement (1->M), the length of the data arrangement (Chuck Size *N), the working mode: Read Modify Write (RMW), Full Stripe (FS), Reconstruct Write (RCW), the number of disks in the RAID array, the different arrangements and combinations of data disks and parity disks in the same level, and the encoding / decoding scenarios, etc.
[0128] Based on the function verification method provided in this embodiment, the first level of single-point coverage items in the RAID function coverage rate is divided into random variables defined based on the Transaction level and different forms based on the RAID structure.
[0129] As Figure 2 shown, the former (random variables defined based on the Transaction level) can be further divided into basic classes, exception classes, switching classes, etc. at the second level according to attributes. Among them, the basic classes include: RAID type, number of data disks, number of parity disks, working mode; the exception classes include: task exception, configuration exception, flow control exception, bus exception, other exceptions; the switching classes include: switching between different RAID types, switching between different working modes, switching between normal and abnormal tasks; and then further divided into the third level according to the above second level. For example: the RAID type is divided into RAID5, RAID6, RAIDTP; the bus exception is divided into bus write exception and bus read exception; the switching between different working modes is divided into: switching between read-modify-write and read-reconstruct-write, full stripe write, etc.
[0130] As Figure 3 shown, the latter (different forms based on the RAID structure) can be further divided into: data task arrangement (i.e., task length), stripe unit size range (i.e., Chunk Size), arrangement of data disks and parity disks under different RAID types, the Chuck number (1~N) where the starting position of data arrangement in the RAID group is located, the starting position offset (1~M) of data arrangement in the RAID group, distribution of damaged data disks in the array under different RAID types, arrangement of data disks and parity disks, whether there is a cross-stripe situation in data arrangement, etc. at the second level according to attributes. And then further divided into the third level according to the above second level. For example: support random arrangement of data disks and parity disks, variable support range of stripe size (i.e., Chunk Size>1 and Chunk Size<N), support variable data task arrangement within the range less than the product of stripe unit and the sum of data disks and parity disks, etc.
[0131] After obtaining the single-point coverage items, cross combination can be carried out.
[0132] Specifically, the cross-items of the coverage points of the RAID chip are sorted out and defined, such as: RAID level × data distribution × abnormal scenario. As can be seen from the description in (1) above, there are multiple RAID chip levels, diverse data distributions, and many types of abnormal scenarios, which leads to an exponential increase in the number of cross-coverage combinations. That is, when the RAID group is working normally, it exhibits scenario polymorphism due to the large number of random variables. Its polymorphism is mainly formed by the cross-combination of different variables. Therefore, whether the cross-coverage items are sorted out and defined in the functional coverage is complete is directly related to whether the test cases accurately represent the scenario polymorphism. As follows Figure 4 As shown; for RAID structure-related parameters, a cross-over term with a dimension of 4 can be defined, as follows: Figure 5 The diagram shows the definition of the intersection term with dimension 5.
[0133] exist Figure 4 The test cases cross-cover the number of data disks and the relative position of the verification disks, in order to ensure that the test cases can traverse the array of permutations and combinations of data disks and verification disks. That is, when the coverage rate of this item is 100%, it means that the currently developed test cases are sufficient to achieve the expected coverage; otherwise, it is necessary to add or modify test cases or targeted test cases to supplement the coverage.
[0134] exist Figure 5 In this process, cross-coverage is performed on stripe units, number of data disks, location of verification disks, and length of data task arrangement, in order to enable test cases to traverse the array of permutations and combinations. At the same time, illegal disks need to be filtered out or ignored according to the actual situation.
[0135] Please refer to Figure 6In practical use, the process of automatically obtaining functional coverage includes: First, defining enumerated variables that characterize different functional points in a module or subsystem (e.g., RAID type, working mode, etc.), random variables (e.g., task size, task direction, etc.), and different scenario types (e.g., the parity position of the P disk in the RAID group, the location of the lost disk, etc.); Second, defining relevant single-point coverage items one by one according to the different dimensions mentioned above, such as: number of parity disks, number of data disks, chunk size, stripe cell start position, working mode switching, reset-related switching control, data boundary, address boundary, etc.; Third, defining single-point coverage items in different dimensions. After defining or creating the cross-coverage items, define and create them according to the specific needs of the module or subsystem. The implementation process of cross-coverage items must follow the constraint that the number of cross-combination items should not exceed 5. Then, add corresponding sampling methods for different coverage groups, such as obtaining them from the interface, from the source of the stimulus configuration, or through per-frame sampling. Finally, the built-in SystemVerilog function get_inst_coverage() is called to obtain the coverage of a specific covergroup instance. Its return value reflects the weighted sum of the coverage of all coverpoints in the instance and is printed.
[0136] Therefore, this approach facilitates the organization and definition of functional coverage items during complex IP verification processes, effectively improving the sufficiency and completeness of functional coverage items for the tested functional points, functional scenarios, and Corner scenarios. It also facilitates the management of functional coverage items and the implementation of quality activities such as post-mortem reviews. The functional coverage organization and methodology described in this application can be extended to the process of organizing and defining functional coverage items in other complex IP verification processes.
[0137] Corresponding to the above method embodiments, this application also provides a functional verification device. The functional verification device described below can be referred to in correspondence with the functional verification method described above.
[0138] See Figure 7 As shown, the device includes the following modules:
[0139] The single-point coverage item determination module 101 is used to traverse the feature attributes of the target design one by one under multiple different dimensions, and use the feature attributes obtained by the traversal to determine the single-point coverage item one by one.
[0140] The cross-coverage item determination module 102 is used to cross-combine single-point coverage items with the cross dimension being less than a threshold as a constraint to obtain multiple cross-coverage items.
[0141] The weighting value determination module 103 is used to determine the weighting values corresponding to multiple single-point coverage items and multiple cross-coverage items respectively;
[0142] The test case execution module 104 is used to verify multiple single-point coverage items and multiple cross-coverage items using test cases, and obtain multiple verification results;
[0143] The functional coverage acquisition module 105 is used to integrate multiple verification results according to weighted values to obtain the functional coverage of the target design.
[0144] Using the apparatus provided in the embodiments of this application, the feature attributes of the target design are traversed one by one under multiple different dimensions, and single-point coverage items are determined one by one using the feature attributes obtained from the traversal; the single-point coverage items are cross-combined with the cross dimension being less than a threshold as a constraint to obtain multiple cross-coverage items; the weight values corresponding to the multiple single-point coverage items and the multiple cross-coverage items are determined respectively; the multiple single-point coverage items and the multiple cross-coverage items are verified using test examples to obtain multiple verification results; the multiple verification results are integrated according to the weight values to obtain the functional coverage of the target design.
[0145] In this application, to avoid omitting coverage items, the feature attributes of the target design are first traversed from multiple different dimensions, and then single-point coverage items are determined one by one based on the traversed feature attributes. Then, when determining cross-coverage items, to avoid a large number of combinations affecting the verification, constraints are imposed on the cross-dimensions, thereby combining the single-point coverage items to obtain multiple cross-coverage items. After determining the coverage items, the weighted values corresponding to each coverage item can be clearly defined. After verification based on test cases, the table can integrate multiple verification results according to the weighted values to obtain the functional coverage of the target design.
[0146] In this application, the functional coverage rate not only corresponds to the single-point coverage items corresponding to all feature attributes of the target design, but also to the cross-coverage items that control the cross-dimensionality. By integrating the verification results through weighted values, the final functional coverage rate can be made more reliable.
[0147] In one specific embodiment of this application, the cross-coverage item determination module is specifically used to select a number of target coverage items from a plurality of single-point coverage items; wherein, the number of target coverage items is less than the number of single-point coverage items;
[0148] Several target coverage items are combined by cross-combining them with the cross dimension being less than a threshold, resulting in multiple cross-coverage items.
[0149] In one specific embodiment of this application, the cross-coverage item determination module is specifically used to divide multiple single-point coverage items into key coverage items and basic coverage items;
[0150] By combining several single-point coverage items with the cross dimension being less than a threshold as a constraint, and by constraining the random range of the basic coverage items, multiple cross coverage items are obtained.
[0151] In one specific embodiment of this application, the weighted value determination module is specifically used to obtain verification requirement information;
[0152] Using the verification requirement information, the verification priority of each single-point coverage item and cross-coverage item is determined; different verification priorities correspond to different preset values.
[0153] Assign the weighted value to the preset value corresponding to the verification priority.
[0154] In one specific embodiment of this application, it further includes:
[0155] The fine-tuning module is used to determine the single-point coverage items one by one using the feature attributes obtained from the traversal, and then output the single-point coverage items of the target design in the form of a tree diagram.
[0156] Receive verification control information;
[0157] Use verification control information to perform at least one of the following operations: add, delete, modify, and view multiple single-point coverage items.
[0158] In one specific embodiment of this application, the single-point coverage item determination module is specifically used to traverse the feature attributes of the target design according to the functional classification under the functional dimension;
[0159] In the scene dimension, the feature attributes of the target design are traversed according to the scene classification.
[0160] In terms of data dimensions, the feature attributes of the target design are traversed according to the value range and / or combination form;
[0161] Under the control dimension, the feature attributes of the target design are traversed according to the control form.
[0162] In one specific embodiment of this application, the single-point coverage item determination module is specifically used to traverse the feature attributes of the target design in the interface behavior dimension.
[0163] Corresponding to the above method embodiments, this application also provides an electronic device. The electronic device described below and the functional verification method described above can be referred to each other.
[0164] See Figure 8 As shown, the electronic device includes:
[0165] Memory 332 is used to store computer programs;
[0166] The processor 322 is used to implement the steps of the functional verification method of the above method embodiment when executing a computer program.
[0167] For details, please refer to Figure 9 , Figure 9 This is a schematic diagram of the specific structure of an electronic device provided in this embodiment. The electronic device can vary significantly due to differences in configuration or performance. It may include one or more central processing units (CPUs) (e.g., one or more processors) and a memory 332. The memory 332 stores one or more computer programs 342 or data 344. The memory 332 can be temporary or permanent storage. The program stored in the memory 332 may include one or more modules (not shown in the diagram), each module may include a series of instruction operations on the data processing device. Furthermore, the processor 322 may be configured to communicate with the memory 332 and execute the series of instruction operations stored in the memory 332 on the electronic device 301.
[0168] Electronic device 301 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input / output interfaces 358, and / or one or more operating systems 341.
[0169] The steps in the functional verification method described above can be implemented by the structure of the electronic device.
[0170] Corresponding to the above method embodiments, this application also provides a readable storage medium. The readable storage medium described below and the functional verification method described above can be referred to each other.
[0171] A readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the functional verification method described in the above method embodiments.
[0172] The readable storage medium can specifically be a USB flash drive, external hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, or any other readable storage medium capable of storing program code.
[0173] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0174] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those 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 this application.
[0175] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0176] Finally, it should be noted that in this document, relationships such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "include," "contain," or any other variations are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus.
[0177] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A functional verification method, characterized in that, include: The feature attributes of the target design are traversed one by one under multiple different dimensions, and the single-point coverage items are determined one by one using the feature attributes obtained from the traversal. The single-point coverage items are combined by cross-combining them with the cross dimension being less than a threshold, resulting in multiple cross-coverage items; Determine the weighted values corresponding to the multiple single-point coverage items and the multiple cross-coverage items, respectively; Multiple single-point coverage items and multiple cross-coverage items were verified using test cases, and multiple verification results were obtained; By integrating multiple verification results according to the weighted values, the functional coverage of the target design is obtained.
2. The method according to claim 1, characterized in that, The single-point coverage items are cross-combined with the cross dimension being less than a threshold as a constraint to obtain multiple cross-coverage items, including: Several target coverage items are selected from the multiple single-point coverage items; wherein the number of target coverage items is less than the number of single-point coverage items; Several target coverage items are cross-combined with the cross dimension being less than a threshold to obtain multiple cross-coverage items.
3. The method according to claim 1, characterized in that, The single-point coverage items are cross-combined with the cross dimension being less than a threshold as a constraint to obtain multiple cross-coverage items, including: The multiple single-point coverage items are divided into key coverage items and basic coverage items; By combining several single-point coverage items with the cross dimension being less than a threshold as a constraint, and by constraining the random range of the basic coverage items, multiple cross coverage items are obtained.
4. The method according to claim 1, characterized in that, Determining the weighted values corresponding to the multiple single-point coverage items and the multiple cross-coverage items respectively includes: Obtain verification requirement information; Using the verification requirement information, the verification priority of each single-point coverage item and cross-coverage item is determined; wherein, different verification priorities correspond to different preset values; Assign the preset value corresponding to the verification priority to the weighted value.
5. The method according to claim 5, characterized in that, After determining the single-point coverage item one by one using the feature attributes obtained from the traversal, the process also includes: Output the single-point coverage items of the target design in the form of a tree diagram; Receive verification control information; The verification control information is used to perform at least one of the following operations: adding, deleting, modifying, and viewing the multiple single-point coverage items.
6. The method according to any one of claims 1 to 5, characterized in that, The feature attributes of the target design are iterated one by one across multiple different dimensions, including: In terms of functionality, the feature attributes of the target design are traversed according to functional categories. In the scene dimension, the feature attributes of the target design are traversed according to the scene classification. In the data dimension, the feature attributes of the target design are traversed according to the value range and / or combination form; Under the control dimension, the feature attributes of the target design are traversed according to the control form.
7. The method according to claim 6, characterized in that, Also includes: In terms of interface behavior, the feature attributes of the target design are traversed.
8. A functional verification device, characterized in that, include: The single-point coverage item determination module is used to traverse the feature attributes of the target design one by one under multiple different dimensions, and use the feature attributes obtained by the traversal to determine the single-point coverage item one by one. The cross-coverage item determination module is used to cross-combine the single-point coverage items with the cross dimension being less than a threshold as a constraint to obtain multiple cross-coverage items; The weighting value determination module is used to determine the weighting values corresponding to the multiple single-point coverage items and the multiple cross-coverage items, respectively. The test case execution module is used to verify multiple single-point coverage items and multiple cross-coverage items using test cases, and obtain multiple verification results; The functional coverage acquisition module is used to integrate multiple verification results according to the weighted values to obtain the functional coverage of the target design.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the functional verification method as described in any one of claims 1 to 7.
10. A readable storage medium, characterized in that, The readable storage medium stores a computer program that, when executed by a processor, implements the steps of the functional verification method as described in any one of claims 1 to 7.