CN117331827B - Method for matching coverage objects in verification plan, storage medium and electronic device - Google Patents

Method for matching coverage objects in verification plan, storage medium and electronic device Download PDF

Info

Publication number
CN117331827B
CN117331827B CN202311274509.0A CN202311274509A CN117331827B CN 117331827 B CN117331827 B CN 117331827B CN 202311274509 A CN202311274509 A CN 202311274509A CN 117331827 B CN117331827 B CN 117331827B
Authority
CN
China
Prior art keywords
coverage
layer
index
overlay
matching
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311274509.0A
Other languages
Chinese (zh)
Other versions
CN117331827A (en
Inventor
汤杰
高波
金俏慧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Rongjian Software Technology Co ltd
Beijing Yunshu Innovation Software Technology Co ltd
Shanghai Hejian Industrial Software Group Co Ltd
Original Assignee
Chengdu Rongjian Software Technology Co ltd
Beijing Yunshu Innovation Software Technology Co ltd
Shanghai Hejian Industrial Software Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Rongjian Software Technology Co ltd, Beijing Yunshu Innovation Software Technology Co ltd, Shanghai Hejian Industrial Software Group Co Ltd filed Critical Chengdu Rongjian Software Technology Co ltd
Priority to CN202311274509.0A priority Critical patent/CN117331827B/en
Publication of CN117331827A publication Critical patent/CN117331827A/en
Application granted granted Critical
Publication of CN117331827B publication Critical patent/CN117331827B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3676Test management for coverage analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the field of chip verification, in particular to a matching method of coverage objects in a verification plan, a storage medium and electronic equipment, wherein an index database is created for different layers of user design, and all region expressions in the verification plan are extracted; generating a data matching mode according to the region expression, wherein the matching mode comprises basic information of an object and matching conditions of different layers; according to the names of the coverage objects and the types of the coverage objects, searching unique identification ids of all the coverage objects meeting the matching conditions in an index database, and acquiring coverage rate data through the unique identification ids of the coverage objects, the coverage objects can be quickly found in user design according to the region expressions specified by the user.

Description

Method for matching coverage objects in verification plan, storage medium and electronic device
Technical Field
The present invention relates to the field of chip verification, and in particular, to a method for matching coverage objects in a verification plan, a storage medium, and an electronic device.
Background
The user is designed into a hierarchical design structure, each layer is provided with different modules, and a plurality of different sub-modules are further included under each module, for example, a plurality of different block modules are further included in the soc module.
The coverage rate types designed by the user comprise row coverage rate, condition coverage rate, finite state machine coverage rate and the like, and when the coverage rate is calculated, the coverage state of each coverage item is calculated firstly by each type of coverage rate, and then the coverage rate of the coverage domain is counted. For example, the coverage rate of each line is collected during testing, the coverage rate of each module is calculated according to the coverage rate of each line code, the coverage rate of each module is calculated layer by layer, and finally the coverage rate of each line can be calculated according to the coverage rate of the whole user design.
Because the user only takes care of the coverage of some overlay objects in the user design and not others during the verification process. Wherein the overlay object includes an overlay domain and an overlay item, wherein the overlay domain contains modules, instances, and various overlay index-specific domains, and the like. At this point, a verification planning system is required. The verification plan system comprises a canonical document spec, a coverage database and a plurality of verification plans, wherein each verification plan is used for counting coverage data of partial coverage objects in a user design. The canonical document is a hierarchical structure, for example, canonical indexes such as IO number, storage capacity, interaction mode and the like of a memory. Generating a verification plan according to the specification document spec, and refining each level of the specification document spec into each verification point. In order to extract coverage data of the verification plan corresponding to the user design, a targeted extraction of coverage statistics is required.
In the prior art for creating the verification plan, each large manufacturer often defines and designs a specific verification plan grammar and a matched verification plan editing tool according to the characteristics of the product. Because of the differences in definition syntax and tools of each large vendor, it is difficult for a user to define a generic verification plan that can fit different platforms, whenever the user switches vendor tools, he needs to re-write the verification plan according to the vendor defined syntax or using proprietary tools. Thus, there are several technical problems:
1. A set of grammar and editor is specially defined, and a user needs to learn a complex grammar, so that the difficulty of writing a verification plan is high.
2. When the hierarchical structure needs to be modified, a large amount of data can be changed, errors are easy to occur, and blocking is easy to occur.
3. How to quickly find the overlay object in the coverage database according to the user-specified region expression.
Disclosure of Invention
In order to solve the 3 rd technical problem, the invention adopts the following technical scheme: the invention provides a matching method of coverage objects in a verification plan, which comprises the following steps:
P100, acquiring an index database according to a user design, wherein the user design comprises coverage objects of different levels, the index database comprises index files of the coverage objects of different levels in the user design, and each level of coverage object corresponds to one index file; the index file of each hierarchy includes the name of the overlay object, the type of the overlay object, and the unique identification id of the overlay object.
P200, acquiring a verification plan designed by a user, and extracting all area expressions in the verification plan; and generating a data matching mode according to the region expression, wherein the data matching mode comprises basic information of the coverage object and matching conditions of different layers, the matching conditions comprise the type of the coverage object, the matching mode and the matching rule, and the basic information comprises an action instruction.
And P300, searching unique identification ids of all the coverage objects meeting the matching conditions in an index database according to the names and the types of the coverage objects, and acquiring coverage rate data through the unique identification ids of the coverage objects.
The invention has at least the following beneficial effects:
According to the method for matching the coverage object in the verification plan, the storage medium and the electronic equipment, which are provided by the invention, an index database is created for different layers designed by a user, and all region expressions in the verification plan are extracted; generating a data matching mode according to the region expression, wherein the matching mode comprises basic information of an object and matching conditions of different layers; and searching the unique identification ids of all the coverage objects meeting the matching conditions in the index database according to the names and the types of the coverage objects, and acquiring coverage rate data through the unique identification ids of the coverage objects. Compared with the traditional method that the whole original user design structure is traversed, the performance of matching each area expression one by one through the regular expressions is greatly improved, and coverage objects can be quickly found in the user design according to the area expressions appointed by the user. The data matching mode has universality, can be suitable for grammar and region expression formats of verification plans created by different platforms, and has strong universality.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a block diagram of a verification plan creation system according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for creating a reusable verification plan according to a second embodiment of the present invention;
Fig. 3 is a flowchart of a method for fast matching of coverage objects in a verification plan according to a third embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to fall within the scope of the invention.
The invention provides a first embodiment for solving the technical problem that in the prior art, when a verification plan is created, a set of complex grammar needs to be defined and a set of special editors need to be developed, so that the verification plan is difficult to write.
Example 1
Referring to FIG. 1, a block diagram of a verification plan creation system is shown that includes a database, a visualized form editing area, and a hierarchical control area.
It should be noted that, the table editing area and the hierarchical control area are both visual window portions, and the content of the database is not visual.
Optionally, the table editing area is an excel table file or a wps table file, and other table files in the prior art are all within the protection scope of the present invention.
The hierarchical control area is a visual window, and a plurality of buttons are arranged in the hierarchical control area and are used for adding, deleting or modifying the hierarchical relationship among the nodes. The hierarchical control area is independent of the table editing area, and data of the hierarchical control area and the table editing area are derived from the database, so that hierarchical structures in the hierarchical control area, the table editing area and the database are changed at the same time.
Further, the table editing area comprises a plurality of extensible verification point entries, each verification point entry comprises a plurality of attribute fields, wherein each attribute field comprises a unique identification id field of a verification point, a unique identification pid field of a parent node of the verification point, a name field of the verification point, a coverage index type field counted by the verification point and a matching rule field; the unique identification id field of the verification point and the unique identification pid field of the parent node of the verification point are hierarchical relationship attribute fields.
Wherein the verification point is a verification plan or verification characteristic. The user design is typically relatively large, and multiple verification plans are created to verify the user design, each verification plan including verification of multiple verification features. The verification plans form a hierarchical structure, and the verification characteristics also form a hierarchical structure. Wherein the verification plan is also called a plan, the verification characteristic is also called a feature, and the verification characteristic is a verification object refined in the verification plan.
The coverage index type comprises row coverage rate, condition coverage rate, finite state machine coverage rate, assertion coverage rate and the like.
The name of the verification point is the name of the verification plan or the verification characteristic.
Wherein the matching rule is a matching rule of a verification characteristic specified by a user. When the verification is performed according to the verification plan, the corresponding coverage object is searched in the coverage database under the constraint of the matching rule according to the current verification characteristic, and the coverage data of the coverage object is reversely marked on the current verification characteristic. Optionally, the matching format of the matching rule is a full pathname or an object unique identifier that meets the definition of the coverage data exchange standard (Unified Coverage Interoperability Standard, UCIS). The full path names are used for matching coverage objects in the coverage rate database, the full path names comprise object names searched for in each layer from a root node designed by a user to the coverage objects to be matched currently, and the object names of different layers are separated by separators, for example, the full path names: instance 1/instance 1.1/instance 1.1.2. Wherein the unique identifier of the object, which meets the UCIS standard definition, is matched according to the standard format specified in UCIS, for example/24:work. Top/12:cg/14:cvpa/30:a/:0: #bin#.
Preferably, the matching format of the matching rule is an object unique identifier that meets the UCIS standard definition. The matching rules are universal because they meet USCIS standard definitions and are not affected by different definitions of different manufacturers.
The set of the id and the pid can construct a parent-child relationship between verification points, namely, a hierarchical relationship between corresponding items can be obtained through configuration of the id and the pid. Specifically, the hierarchy of the validation scheme is defined by the values of id and pid for each validation point.
Optionally, the id is used to uniquely identify the verification plan or verification feature. id is a number or a character string with a hierarchical structure, and other codes or character rules for identifying the hierarchical structure in the prior art fall within the protection scope of the present invention. As one example, id is 1.1.2.5, which in turn represents a four-level hierarchy.
Further, the hierarchical control region includes a tree structure aligned and visualized with each verification point entry, the tree structure being associated with the same database as the table editing region.
It should be noted that the tree structure in the hierarchical control area reflects the hierarchical relationship identified by the ids and pids in the table editing area. When creating the verification plan, when a user performs an operation in the hierarchical control area to establish an attribute structure, a unique identification id field of a verification point and a unique identification pid field of a verification point parent node are automatically generated in corresponding verification point entries in the table editing area.
Further, when the user performs an operation on the tree structure in the hierarchical control area, a data block having a corresponding hierarchical structure is generated in the database, and the hierarchical relationship attribute field in the visualized table editing area is generated at the same time.
The data block of each verification point comprises a unique identification id of the verification point, a unique identification pid of a parent node of the verification point, a name of the verification point, a coverage index type counted by the verification point and a matching rule. Optionally, each data block is a json data block, and each attribute in the data block is in a key value pair format.
The operations may be adding a node, deleting a node, modifying a node name, or modifying a hierarchical relationship between nodes. The operation mode of dragging can be adopted when the chromatographic relationship between the nodes is modified.
Because the hierarchical structure of the verification plan can be easily operated in the visualized hierarchical control area, and when the hierarchical structure between the nodes needs to be changed, the hierarchical structure can be easily changed in the visualized hierarchical control area, so that the difficulty of creating the verification plan is greatly reduced.
Further, when the user designates the attribute fields of the verification points in the table editing area, data information of all the attribute fields of the data block corresponding to the verification points is generated in the database, and then a verification plan is obtained. It should be noted that, the table editing area and the hierarchical control area are two independent visual windows and can be displayed side by side.
The invention can complete the creation of the verification plan by using the table file without defining a set of complex grammar for the verification plan and developing a set of special editor for editing the verification plan.
As a preferred embodiment, the end row and end column of the form edit section are specified in order to preserve additional information provided by the user when making the canonical document spec. Specifically, according to the execution sequence of the verification plan, a start row and a start column of the table editing area are designated, a first designated end row mark appearing after the start row is an end row, and a first designated end column mark appearing after the start column is an end column; the continuous area surrounded by the start row and the end row, the start column and the end column is an effective area, and the content outside the effective area does not participate in verification. Forms, pictures or other remark information in the specification document spec can be added outside the effective area, so that the extra information is ensured not to participate in verification under the condition of keeping the extra information, and great convenience is provided for users.
Optionally, the mark of the specified ending line and the mark of the specified ending column appear in pairs, the mark of the specified ending line is a blank line and the mark of the specified ending column is a blank column, or the mark of the specified ending line and the mark of the specified ending column are both specified codes or characters, and the codes or characters can be the same or different and are specified by a user.
As a preferred embodiment, the system further includes configuration information, the configuration information including coverage index configuration information and attribute configuration information, the configuration information being stored independently, the configuration information being stored at a location different from the location of the table edit section.
Wherein the coverage index configuration information is used to configure each coverage index type field in the verification plan created in the table edit section. The coverage index configuration information comprises configuration items of coverage indexes of each type, and each configuration item comprises a name of the type of the coverage index, the type of coverage index data and a data aggregation mode. Each configuration entry is used to configure the data type and aggregation manner of each type of coverage index, etc. Other configuration information for configuring coverage in the prior art also falls within the scope of the present invention.
Optionally, the coverage index type is named row coverage, condition coverage, finite state machine coverage, assertion coverage, etc. Other names of coverage indicator types in the prior art are also within the scope of the present invention.
Optionally, the built-in coverage index data types are ratio data ratio, integer data int, real data real, and other data types in the prior art also fall within the protection scope of the present invention.
Optionally, the data aggregation mode is sum, average, minimum min, or maximum max. The user may also add custom aggregators to define the data aggregation manner.
Optionally, the coverage index configuration information further includes a weight of coverage. Wherein the weights are used to adjust the specific gravity of the corresponding coverage in the calculation process.
Optionally, the coverage index configuration information further includes a target expression of the coverage index. Wherein the target expression is used to define a minimum value of coverage. For example, setting the target expression to 90% of the full coverage (goal > 0.9), then the verification passes when the coverage of the verification plan is greater than 90%.
Wherein the attribute configuration information includes an attribute name, an attribute data type, and a flag identifying whether the attribute value needs to be passed down. Optionally, the attribute data type is character string data, integer data or real number, and other data types in the prior art are also within the scope of the present invention.
Optionally, the configuration information is stored in a database, and all verification plans share the same global configuration information. Global shared reuse of configuration information can be achieved by configuring global configuration information independently, rather than repeating definitions in the verification plan each time.
Optionally, the configuration information is respectively and independently stored in a table file, and multiplexing is realized by copying the table file. The configuration information is stored in the database as global configuration or in an independent table file, multiplexing is realized by copying the table file, and the purpose of multiplexing the configuration information can be achieved by both the two realization modes. When some configurations need to be added, modified and deleted, only the configuration file needs to be modified, and the corresponding grammar in each verification plan does not need to be modified as in the prior art.
As a preferred embodiment, when a single verification feature comprises a plurality of matching rules, the different matching rules are separated by a specified separator. Optionally, the specified separator is comma or semicolon, and other separators for separating two matching rules in the prior art fall within the scope of the present invention.
As a preferred embodiment, the system further comprises: when the user performs the change operation on the tree structure in the hierarchical control area, the data information of the hierarchical relation attribute field of the data block in the database is updated, and the hierarchical relation attribute field in the visualized table editing area is updated at the same time.
As a preferred embodiment, the verification data in the verification plan is extracted at the time of verification according to the verification plan. Optionally, the third party tool or VBA directly reads the content of the table editing area, extracts the data in the verification plan area to generate an intermediate format, and inputs the intermediate format to the coverage rate reverse marking program for matching calculation. Or directly exporting the csv file, and inputting the csv file to a coverage rate reverse marking program for matching calculation.
As a preferred embodiment, the table editing area further comprises a coverage index field; when a single verification feature includes a plurality of matching rules, the coverage index and the matching rules are configured in order. For example, a single verification feature includes three matching rules, each matching rule verification generating one coverage indicator, the coverage indicators being ordered in the order of the three matching rules.
The use of a form edit field to create a verification plan is also beneficial in that functions integrated in the form tool can assist in creating the verification plan, such as copy-and-paste, bold highlighting, etc.
The embodiment can complete the creation of the verification plan just by using the form file, does not need to specially define a set of grammar and editor, can complete the creation of the verification plan by directly filling or dragging the content without learning complex grammar, and reduces the threshold of the user for creating the verification plan. However, when the system automatically extracts the data in the verification plan created by the table file, and after obtaining the verification plan data file capable of being used for finding coverage rate in the user design, the verification plan data file includes a large number of data blocks, if the user needs to adjust the hierarchical structure among the data blocks, the large number of data blocks need to be changed, which is not only easy to make mistakes, but also easy to cause data blocking, and if the data blocks needing to be changed include a plurality of repeated data blocks in the verification plan data file, the difficulty of changing needs to be increased, and the invention provides a second embodiment for solving the above problem.
Example two
Referring to FIG. 2, there is shown a flowchart of a reusable validation program creation method, the method comprising the steps of:
S100, storing hierarchical structure information of each verification point in the verification plan in a structure data block of a structure file, and storing non-hierarchical structure information of each verification point in an associated data block of an associated file to respectively obtain the structure file and the associated file of each verification plan. The structure file and the association file are verification plan data files.
Further, the structure file includes a plurality of structure data blocks, and the hierarchical structure information of each structure data block includes a unique identification id of the verification point and a unique identification pid of a parent node of the verification point. It should be noted that, the second embodiment is an improvement based on the first embodiment, and concepts of the verification point, the unique identifier id of the verification point, and the unique identifier pid of the parent node of the verification point in the second embodiment are the same as those in the first embodiment, and are not described again. It should be noted that, the data of each verification point is stored in two independent json format data blocks respectively: the structure data block and the association data block. And reflects the hierarchical structure among the verification point entries through the binding relation between the id and the pid. The structure file can rapidly load the whole hierarchy structure of the plan and support the operations of adding, deleting and checking the hierarchy structure.
Further, the association file includes a plurality of associated data blocks, and the non-hierarchical information of each associated data block includes a unique identification id of the verification point and a matching rule. When the unique identification id of the verification point in the associated data block is the same as the unique identification id of the verification point in the structural data block, the associated data block and the structural data block are two parts of data of the same verification point. The structure data block carries position structure information of the verification point in the hierarchical structure, and the associated data block carries non-hierarchical structure information such as matching information of the verification point. The matching rule is the same as that in the first embodiment, and will not be described again. When the verification point is a verification plan, the matching rule in the associated data block is null.
Further, there is one and only one root node in each structure file; and the associated data blocks in the associated file are mapped and associated with the structural data blocks in the structural file through the unique identification id of the verification point.
The root node in the structure file defining the verification plan is the plan, the root node in the structure file defining the sub-plan is the sub-plan, and the root node in the file defining the sub-verification characteristic is the sub-verification characteristic. Specifically, in the structure file defining the verification plan, the root node is the verification plan, the child nodes of the root node are different verification points, each verification point may further have a child verification point, and so on.
S200, acquiring the name of a verification module to be nested designated by a user and a target nested verification point in a verification plan; the hierarchical structure information of the verification modules to be nested is stored in a structural data block of a structural file, and the non-hierarchical structure information is stored in an associated data block of an associated file.
Wherein the verification module is a sub-verification plan or sub-verification feature. And the information of the verification modules to be nested is also respectively stored in the structure file and the associated file. It should be noted that, the verification module is the same as the verification plan in storage mode, and the sub-verification plan also includes data blocks of multiple verification points, and a hierarchical structure is provided between the verification points. Similarly, the sub-verification feature also includes a data block including a plurality of verification points and has a hierarchical structure between the verification points.
The target nested verification point is a father node of the verification module to be nested.
S300, creating a target structure data block, wherein the verification point of the target structure data block is a verification module to be nested, the unique identification pid of the father node of the verification point is bound with the target nested verification point, and an index attribute is added into the target structure data block and is used for designating the name of the verification module to be nested.
When the verification plan is large, only the structure file is loaded; when the user views the detailed attribute, the content in the associated file is loaded once or through id distribution, so that the loading speed of the verification plan can be improved.
When the user only modifies the hierarchical structure of the verification plan, only the structure file is required to be updated, and the content of the associated file is not required to be modified; similarly, the modification of attributes of non-hierarchical information does not modify the content of the structured file. For large verification plans, the prior art defines all the attributes of each verification point into one file through a custom grammar, so that the hierarchical structure cannot be modified and the problems of multiplexing cannot be solved. By adopting the method provided by the second embodiment, the size of the data block to be moved can be reduced to the greatest extent, thereby achieving the effects of improving the speed and reducing the memory overhead and solving the problem of blocking.
In the second embodiment, the verification plan is defined by adopting the data block, so that the universality of the verification plan is improved, and a user does not need to be familiar with a special grammar defined by a certain manufacturer or rely on a custom editor provided by the manufacturer to write the verification plan. And can also be supported by Web applications without additional data conversion. Meanwhile, through a flattened data format, the coupling relation between a plan (plan) and verification characteristics (feature) in a verification plan is reduced, so that the verification plan and the verification characteristics have reusability, the problem of blocking is solved, and the problem that when the reused verification plan or verification characteristics need to be modified, only one data block needs to be modified is solved, and the problem that a repeated module needs to be uniformly modified is solved.
As a preferred embodiment, before S100, further includes:
S10, creating an original verification plan in a table editing area according to user specification to obtain an original verification plan table file; the table editing area comprises a plurality of extensible verification point entries, each verification point entry comprises a plurality of attribute fields, wherein each attribute field comprises a unique identification id field of a verification point, a unique identification pid field of a parent node of the verification point, a name field of the verification point, a coverage index type field counted by the verification point and a matching rule field; the unique identification id field of the verification point and the unique identification pid field of the parent node of the verification point are hierarchical relationship attribute fields.
S20, configuring coverage rate indexes in a coverage rate index editing area to obtain a coverage rate index configuration file, wherein the coverage rate index file is independent of an original verification plan table file; the coverage index configuration information comprises configuration items of coverage indexes of each type, each configuration item comprises a name of the type of the coverage index, the type of coverage index data and a data aggregation mode, and other configuration information for configuring coverage in the prior art also falls into the protection scope of the invention.
S30, configuring attributes in the attribute editing area to obtain an attribute configuration file, wherein the attribute configuration file is independent of an original verification plan table file and a coverage rate index configuration file; wherein the attribute configuration information includes an attribute name, an attribute data type, and a flag identifying whether the attribute value is passed down.
It should be noted that, the contents, coverage index configuration information, and attribute configuration information included in the table editing area and the table editing area are the same as those in the first embodiment, and are not described again.
S40, extracting data in the original verification plan table file according to the specified keywords to obtain a verification plan data file, wherein the verification plan data file comprises hierarchical structure information and non-hierarchical structure information. And extracting data in the original verification plan table file through the keywords of the hierarchical structure information and the keywords of the non-hierarchical structure information to obtain the verification plan data file. The verification plan data file is used for searching the coverage rate database and acquiring corresponding coverage rate data.
As a preferred embodiment, when the types of the verification points included in the data blocks in the structure file are not unique, all the structure data blocks in the structure file further include the types of the verification points or unique identifiers of the types of the verification points, and the types of the verification points include the unique identifiers of the verification points of different types and the unique identifiers when each type of the verification points is used as a child node. As an example, when the verification point of the data block in the structure file may be a verification characteristic or a verification plan, the verification point type includes four types of verification characteristic, sub-verification characteristic, verification plan and sub-verification plan, the unique identifier of the verification characteristic is configured as 1, the unique identifier of the sub-verification characteristic is configured as 2, the unique identifier of the verification plan is configured as 3 and the unique identifier of the sub-verification plan is configured as 4.
As a preferred embodiment, the data blocks in the association file may also include a coverage indicator type specifying which type of coverage indicator needs to be collected by the verification point. When the verification point is the verification characteristic, if the verification point does not comprise the coverage index type, the corresponding coverage index in the matching rule is collected; and when the verification point is the verification plan, if the verification point does not comprise the coverage index type, collecting coverage indexes corresponding to all verification characteristics under the verification plan.
Based on the same inventive concept as the method of the second embodiment, the second embodiment also provides a non-transitory computer readable storage medium having stored therein at least one instruction or at least one program loaded and executed by a processor to implement the method provided by the second embodiment.
The second embodiment also provides an electronic device comprising a processor and the non-transitory computer readable storage medium.
One of the core functions of the verification plan is to quickly find the corresponding coverage object in the coverage database through the region expression specified by the user, and acquire the coverage data of the coverage object. After obtaining the verification plan data file generated in the second embodiment, how to quickly find the corresponding coverage object is a technical problem to be solved.
Example III
Referring to fig. 3, a flowchart of a method for fast matching coverage objects in a verification plan is provided, the method includes the following steps:
p100, acquiring an index database according to user design, wherein the user design comprises overlay objects with different design levels, the index database comprises index files of the overlay objects with different design levels in the user design, and each overlay object with the design level corresponds to one index file; the index file of each design level includes the name of the overlay object, the overlay object type, and the unique identification id of the overlay object.
Wherein the overlay object includes an overlay domain and an overlay item. For example, the overlay Object is an Object in the UCIS standard. The overlay domain is all objects which can contain child nodes in a design hierarchy designed by a user, and the overlay domain is Scope in UCIS standards. The overlay item is the object of all leaf nodes in the design hierarchy designed by the user, coveritem in the UCIS standard.
In order to improve the retrieval efficiency, different index databases are required to be created for objects with different design levels, so all the overlay objects are divided into three groups: a first layer of overlay fields, a second layer of overlay fields, and a third layer of overlay items. The first layer overlay domain includes module, instance, overlay group, assertion of assent, etc. The second layer coverage is another coverage supporting a search function in addition to the first layer coverage. The third layer of coverage is coverage supporting the search function.
The overlay object types are different in different user design levels, for example, in a first layer overlay domain, and the overlay object types are module, instance, overlay group, assertion server, and the like.
P200, acquiring a verification plan designed by a user, and extracting all area expressions in the verification plan; and generating a data matching mode according to the region expression, wherein the data matching mode comprises basic information of the coverage object and matching conditions of different layers, the matching conditions comprise the type of the coverage object, the matching mode and the matching rule, and the basic information comprises an action instruction.
Wherein the region expression is a string of characters conforming to a specified rule for locating one or more overlay objects in the original user design. The format of the region expression includes two types: the first is [ overlay object type ]: [ object full name ], and the second is unique identification in UCIS. The object full name in the first type is the complete hierarchy name of the object, and the different hierarchies are separated by specifying separators, for example: instance: top. Sub1.Sub2. The first area expression has strong readability, and a user can conveniently write out the area expression according to the design; however, the object type of the name cannot be intuitively known only by the name of each layer, and additional overhead is required to establish the mapping relationship between the name and the object type. The second region expression can know the type corresponding to the changed object by overriding the id of the object type in UCIS standard, for example: the method is high in universality, because type information (type id) is contained in each layer of information, the mapping relation between names and object types is not needed to be established, but the method is poor in readability, familiarity with UCIS standards is needed, and a user is difficult to write an area expression.
When the coverage rate data is calculated according to the verification plan created by the user, all the area expressions in the verification plan are extracted, the object id corresponding to each area expression is queried in the index database, the coverage rate data of the object is found in the memory through the object id, and finally the coverage rate data of each node is aggregated onto each feature and play from bottom to top according to the hierarchical structure of the verification plan, so that the coverage rate data of each feature and play are obtained. In this process, since the verification plan grammar and the format of the region expression defined by different platforms are different, in order to improve the universality, the invention defines a set of data matching modes of the middle layer, which are used for storing basic information required by matching the coverage object, and generating an index database based on the data format. Verification plans of different manufacturers can be used for achieving multiplexing of the matching search scheme by extracting corresponding information and generating a data matching mode of the middle layer.
Wherein, for each region expression, the corresponding data matching mode comprises basic information and matching conditions of different layers. The basic information in the data matching mode and the matching condition of each layer are in a key value pair format. The data matching pattern must include basic information and matching conditions of the first layer coverage area. The data matching pattern may further include matching conditions of the second layer coverage and matching conditions of the third layer coverage. The user can customize more attributes as desired.
The basic information is mainly used for describing a matching rule, the basic information comprises an action command, the action command is used for identifying operations, such as an include operation and a exclude operation, of the data matching mode, the include operation corresponds to coverage object matching of a verification plan, the exclude operation corresponds to a function excluded from coverage indexes, and a user can define more operations according to requirements. The basic information can also comprise a custom name and an annotation, wherein the custom name is used for identifying an identifier of the current data matching mode; when all the data matching modes are required to be stored in the database and reused, the data matching modes can be deleted and revised in the database according to the custom names; this attribute may not be specified if reuse is not a concern.
As a preferred embodiment, in P200: when the matching condition is a matching condition of the first layer coverage or the second layer coverage, the coverage object type is a coverage type. When the matching condition is a matching condition of the third layer coverage item, the coverage object type is a coverage item type. That is, the matching conditions of the first layer coverage area and the second layer coverage area each include the coverage object type, the matching manner, and the matching rule.
Optionally, the matching condition of the coverage area of the first layer may further include a coverage index type.
Optionally, the matching mode is character string matching, UCIS unique ID matching, regular expression matching or wild card matching.
Wherein the matching rule is matching content specified by the user.
Wherein, the matching condition of the second layer coverage area and the matching condition of the third layer coverage item are both selectable conditions. For example, when the region expression is defined as an asset, only the matching condition of the first layer coverage is required to be specified, and the matching condition of the second layer coverage and the matching condition of the third layer coverage are not required to be defined; when the overlay object type in the matching condition of the first layer overlay domain is a model or an instance, a second overlay domain of the overlay index type may be specified in the matching condition of the second layer overlay domain.
And P300, searching unique identification ids of all the coverage objects meeting the matching conditions in an index database according to the names and the types of the coverage objects, and acquiring coverage rate data through the unique identification ids of the coverage objects.
The query method is different depending on the configuration of the index database.
As a preferred embodiment, an index table is built for the first layer coverage area prior to P100 using one of two creation approaches: first kind: and respectively creating a plurality of first-layer index table files for each overlay domain type in the first-layer overlay domain, wherein each first-layer index table file comprises an index data block of each overlay domain object, and each index data block comprises the name of the overlay domain and the unique identifier of the overlay domain object in the memory. Second kind: creating a first-layer index table file for the first-layer overlay domain, wherein the first-layer index table file comprises index data blocks of each overlay domain object, and each index data block comprises the name of the overlay domain, the type of the overlay domain and the unique identification of the overlay domain object in the memory.
As a preferred embodiment, an index table is built for the second layer coverage area prior to P100 using one of two creation approaches: first kind: creating a plurality of second-layer index table files for each coverage index type in the second-layer coverage domain respectively, wherein each second-layer index table file comprises an index data block of each coverage domain object, and each index data block comprises a name of the coverage domain, a unique identifier of a father node, the type of the coverage domain and a unique identifier of the coverage domain in a memory. Second kind: creating a second-layer index table file for the second-layer overlay domain, wherein the second-layer index table file comprises index data blocks of each overlay domain object, and each index data block comprises the name of the overlay domain, the unique identifier of a father node, the type of the overlay domain and the unique identifier of the overlay domain in the memory;
As a preferred embodiment, the index table is built for the third layer coverage item prior to P100 using the following creation: creating a third-layer index table file for the coverage index type specified in the third-layer coverage item, wherein the third-layer index table file comprises index data blocks of each coverage item object, and each index data block comprises the name of the coverage item, the unique identification of a father node, the type of the coverage item and the unique identification of the coverage item in the memory. It should be noted that, because the number of the overlay items may be very large, if indexes are built for all the overlay items in the design, the size of the index database will be increased, which affects the speed of generating the index database and the query efficiency, so that the index database is generally searched directly in the memory, and if the user designates to build the index table, the index table file can be built for the overlay items with a small number of overlay items and the search content being the character strings with strong readability.
As a preferred embodiment, the P300 further comprises: when a first layer index file and a second layer index file are created, a thread pool is created, each matching mode is queried sequentially by using multithreading, and the querying step of each matching mode comprises the following steps:
And P310, for the matching condition of the first layer coverage in the matching mode, searching the unique identification of the first layer coverage object meeting the matching condition of the first layer coverage in the first layer index file according to the type of the first layer coverage and the name of the first layer coverage.
And P320, if the matching mode does not comprise the matching condition of the second layer coverage area, finishing searching, and returning the unique identification of the found first layer coverage object meeting the matching condition of the first layer coverage area. If the matching mode comprises the matching condition of the second layer coverage, the unique identifier of the second layer coverage object meeting the matching condition of the second layer coverage is searched in the second layer index file through the unique identifier of the first layer coverage object meeting the matching condition of the first layer coverage, the name of the second layer coverage and the type of the second layer coverage.
And P330, if the matching mode does not comprise the matching condition of the third layer coverage, ending the search, and returning the unique identification of the found second layer coverage object meeting the matching condition of the second layer coverage. If the matching condition of the third layer coverage item is included in the matching mode, searching the unique identifier of the third layer coverage object meeting the matching condition of the third layer coverage item in the third layer index file or the memory through the unique identifier of the second layer coverage object meeting the matching condition of the second layer coverage field, the name of the third layer coverage item and the type of the third layer coverage item.
As a preferred embodiment, the P300 further comprises: when a plurality of first layer index files and a plurality of second layer index files are created, all data matching modes are grouped according to the coverage object types of the first layer coverage domain, and a single process is used for searching the plurality of first layer index files and the plurality of second layer index files according to each group of data matching modes.
According to the embodiment of the invention, the index database is built for different design layers and different types of coverage objects according to a certain rule, and the concurrent searching is carried out on each type of region expression. Compared with the traditional method that the whole original user design structure is traversed, the performance of matching each area expression one by one through the regular expressions is greatly improved. Meanwhile, the grammar and the region expression format of the verification plan created by different platforms can be suitable for the universal data matching mode, so that the universality is strong.
The third embodiment of the present invention also provides a non-transitory computer readable storage medium, where the storage medium may be provided in an electronic device to store at least one instruction or at least one program related to a method for implementing one of the method embodiments, where the at least one instruction or the at least one program is loaded and executed by the processor to implement the method provided in the foregoing embodiments.
The third embodiment of the invention also provides an electronic device, which comprises a processor and the non-transitory computer readable storage medium.
A third embodiment of the invention also provides a computer program product comprising program code for causing an electronic device to carry out the steps of the method according to various exemplary embodiments of the invention as described in the specification, when said program product is run on the electronic device.
While certain specific embodiments of the invention have been described in detail by way of example, it will be appreciated by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the invention. Those skilled in the art will also appreciate that many modifications may be made to the embodiments without departing from the scope and spirit of the invention. The scope of the invention is defined by the appended claims.

Claims (10)

1. A method of verifying a match of an overlay object in a plan, the method comprising the steps of:
P100, acquiring an index database according to a user design, wherein the user design comprises coverage objects of different levels, the index database comprises index files of the coverage objects of different levels in the user design, and each level of coverage object corresponds to one index file; the index file of each layer comprises the name of the overlay object, the type of the overlay object and the unique identification id of the overlay object;
P200, acquiring a verification plan designed by a user, and extracting all area expressions in the verification plan; generating a data matching mode according to the region expression, wherein the data matching mode comprises basic information of an overlay object and matching conditions of different layers, the matching conditions comprise the type of the overlay object, a matching mode and a matching rule, and the basic information comprises an action instruction; wherein the region expression is a character string conforming to a specified rule and is used for positioning one or more coverage objects in an original user design; the basic information is mainly used for describing a matching rule; the action instruction is used for identifying the operation of the current data matching mode for execution;
And P300, searching unique identification ids of all the coverage objects meeting the matching conditions in an index database according to the names and the types of the coverage objects, and acquiring coverage rate data through the unique identification ids of the coverage objects.
2. The method of claim 1, wherein the overlay objects of different levels in P100 comprise: a first layer of overlay fields, a second layer of overlay fields, and a third layer of overlay items.
3. The method according to claim 2, wherein in P200:
When the matching condition is the matching condition of the first layer coverage area or the second layer coverage area, the coverage object type is the coverage area type;
when the matching condition is a matching condition of the third layer coverage item, the coverage object type is a coverage item type.
4. A method according to claim 3, further comprising creating an index table for the first layer coverage area prior to P100 by any of:
Creating a plurality of first-layer index table files for each overlay domain type in the first-layer overlay domain, wherein each first-layer index table file comprises an index data block of each overlay domain object, and each index data block comprises a name of the overlay domain and a unique identifier of the overlay domain object in a memory; or (b)
Creating a first-layer index table file for the first-layer overlay domain, wherein the first-layer index table file comprises index data blocks of each overlay domain object, and each index data block comprises the name of the overlay domain, the type of the overlay domain and the unique identification of the overlay domain object in the memory.
5. The method of claim 4, further comprising creating an index table for the second layer coverage area prior to P100 by any of:
Creating a plurality of second-layer index table files for each coverage index type in a second-layer coverage domain respectively, wherein each second-layer index table file comprises an index data block of each coverage domain object, and each index data block comprises a name of the coverage domain, a unique identifier of a father node, the type of the coverage domain and a unique identifier of the coverage domain in a memory; or (b)
Creating a second-layer index table file for the second-layer overlay domain, wherein the second-layer index table file comprises index data blocks of each overlay domain object, and each index data block comprises the name of the overlay domain, the unique identification of a father node, the type of the overlay domain and the unique identification of the overlay domain in the memory.
6. The method of claim 5, further comprising creating an index table for the third layer coverage item prior to P100 by any of:
Creating a third-layer index table file for the coverage index type specified in the third-layer coverage item, wherein the third-layer index table file comprises index data blocks of each coverage item object, and each index data block comprises the name of the coverage item, the unique identification of a father node, the type of the coverage item and the unique identification of the coverage item in the memory.
7. The method of claim 6, wherein P300 further comprises: when a first layer index file and a second layer index file are created, a thread pool is created, each data matching mode is queried sequentially by using multithreading, and the querying step of each data matching mode comprises the following steps:
P310, for the matching condition of the first layer coverage in the data matching mode, searching the unique identifier of the first layer coverage object meeting the matching condition of the first layer coverage in the first layer index file according to the type of the first layer coverage and the name of the first layer coverage;
p320, if the data matching mode does not include the matching condition of the second layer coverage, finishing searching, and returning the unique identification of the found first layer coverage object meeting the matching condition of the first layer coverage;
If the data matching mode comprises the matching condition of the second layer coverage, searching the unique identifier of the second layer coverage object meeting the matching condition of the second layer coverage in the second layer index file through the unique identifier of the first layer coverage object meeting the matching condition of the first layer coverage, the name of the second layer coverage and the type of the second layer coverage;
P330, if the data matching mode does not include the matching condition of the third layer coverage item, finishing searching, and returning the unique identification of the found second layer coverage object meeting the matching condition of the second layer coverage field;
If the data matching mode includes the matching condition of the third layer coverage item, searching the unique identifier of the third layer coverage object meeting the matching condition of the third layer coverage item in the third layer index file or the memory through the unique identifier of the second layer coverage object meeting the matching condition of the second layer coverage field, the name of the third layer coverage item and the type of the third layer coverage item.
8. The method of claim 6, wherein when creating the plurality of first-layer index files and the plurality of second-layer index files, all data matching patterns are grouped by overlay object type of the first-layer overlay domain, and the plurality of first-layer index files and the plurality of second-layer index files are searched according to each group of data matching patterns using a separate process.
9. A non-transitory computer readable storage medium having stored therein at least one instruction or at least one program loaded and executed by a processor to implement the method of any one of claims 1-8.
10. An electronic device comprising a processor and the non-transitory computer readable storage medium of claim 9.
CN202311274509.0A 2023-09-28 2023-09-28 Method for matching coverage objects in verification plan, storage medium and electronic device Active CN117331827B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311274509.0A CN117331827B (en) 2023-09-28 2023-09-28 Method for matching coverage objects in verification plan, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311274509.0A CN117331827B (en) 2023-09-28 2023-09-28 Method for matching coverage objects in verification plan, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN117331827A CN117331827A (en) 2024-01-02
CN117331827B true CN117331827B (en) 2024-05-14

Family

ID=89291200

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311274509.0A Active CN117331827B (en) 2023-09-28 2023-09-28 Method for matching coverage objects in verification plan, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN117331827B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118035264B (en) * 2024-04-11 2024-06-07 成都融见软件科技有限公司 Method for automatically acquiring netlist database, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110610549A (en) * 2018-06-15 2019-12-24 北京红马传媒文化发展有限公司 Object verification method, object verification device, verification equipment and electronic equipment
CN116501648A (en) * 2023-06-26 2023-07-28 北京云枢创新软件技术有限公司 Code coverage rate acquisition method and system
CN116627568A (en) * 2023-05-25 2023-08-22 成都融见软件科技有限公司 Visual positioning system of data
CN116701182A (en) * 2023-05-10 2023-09-05 合芯科技有限公司 Coverage rate mark file updating method, coverage rate mark file updating device, coverage rate mark file updating equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200074040A1 (en) * 2018-08-31 2020-03-05 Mentor Graphics Corporation Hierarchical expression coverage clustering for design verification

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110610549A (en) * 2018-06-15 2019-12-24 北京红马传媒文化发展有限公司 Object verification method, object verification device, verification equipment and electronic equipment
CN116701182A (en) * 2023-05-10 2023-09-05 合芯科技有限公司 Coverage rate mark file updating method, coverage rate mark file updating device, coverage rate mark file updating equipment and storage medium
CN116627568A (en) * 2023-05-25 2023-08-22 成都融见软件科技有限公司 Visual positioning system of data
CN116501648A (en) * 2023-06-26 2023-07-28 北京云枢创新软件技术有限公司 Code coverage rate acquisition method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于覆盖率驱动的高频RFID芯片验证平台设计;王国军;景为平;《电子技术应用》;20160430;第42卷(第4期);第28-30,34页 *

Also Published As

Publication number Publication date
CN117331827A (en) 2024-01-02

Similar Documents

Publication Publication Date Title
US10860548B2 (en) Generating and reusing transformations for evolving schema mapping
US6199059B1 (en) System and method for classifying and retrieving information with virtual object hierarchy
US6571247B1 (en) Object oriented technology analysis and design supporting method
JP3842577B2 (en) Structured document search method, structured document search apparatus and program
US6338053B2 (en) Inventory managing method for automatic inventory retrieval and apparatus thereof
US20050203869A1 (en) Hierarchical database apparatus, components selection method in hierarchical database, and components selection program
CN117331827B (en) Method for matching coverage objects in verification plan, storage medium and electronic device
CN117331829B (en) Reusable verification plan creation method, storage medium and electronic equipment
WO1999060492A1 (en) Data village system
US20070244694A1 (en) Dictionary-content processing apparatus, content displaying system, and content displaying method
US5261100A (en) Method of software development
JP4746698B2 (en) Modeling classification objects
CN117094301B (en) Verification plan creation system
US20070067254A1 (en) Business model data management
CN117332760B (en) Verification plan auxiliary editing method, electronic equipment and storage medium
JP7022472B1 (en) Data management system, data management method and data management program
Medina et al. Evaluation of indexing strategies for possibilistic queries based on indexing techniques available in traditional RDBMS
CN108241622A (en) The generation method and device of a kind of query script
JP2002202973A (en) Structured document management device
CN111581815A (en) XML-based process model ontology construction method
JP2002297601A (en) Method and device for structured document management, and program
Gür et al. Multidimensional Enrichment of Spatial RDF Data for SOLAP--Full Version
CN118114408B (en) Group hole characteristic numerical control processing model construction method, device, medium and equipment
CN109739835A (en) A kind of versions of data store method and device
CN108536817A (en) Method for rapidly positioning based on XBRL verifications

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant