CN102722610A - Method and device for automatically generating coverage rate codes by flow chart - Google Patents

Method and device for automatically generating coverage rate codes by flow chart Download PDF

Info

Publication number
CN102722610A
CN102722610A CN2012101717031A CN201210171703A CN102722610A CN 102722610 A CN102722610 A CN 102722610A CN 2012101717031 A CN2012101717031 A CN 2012101717031A CN 201210171703 A CN201210171703 A CN 201210171703A CN 102722610 A CN102722610 A CN 102722610A
Authority
CN
China
Prior art keywords
coverage rate
scene
rate code
flow diagram
frame
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.)
Pending
Application number
CN2012101717031A
Other languages
Chinese (zh)
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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN2012101717031A priority Critical patent/CN102722610A/en
Publication of CN102722610A publication Critical patent/CN102722610A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a method and a device for automatically generating coverage rate codes by a flow chart. The method comprises the following steps: collecting contents such as coverage points of process boxes, coverage points of judgment boxes, combination coverage points, sequence coverage points, sequence coverage points with constraint conditions and the like; and generating coverage rate codes of the coverage points. The device consists of a read-in unit, a level expansion unit, a unit library, a connection relation library, a process box coverage rate code generating unit, a judgment box coverage rate code generating unit, a combination coverage rate code generating unit, a sequence coverage rate code generating unit, other coverage rate code generating unit and a code merging unit. According to the invention, the coverage points are directly extracted according to the flow chart and are automatically converted into the coverage rate codes, so that the time is saved, the artificial omission is reduced and the defect of pure code coverage rates is made up from the function view. The coverage rate codes are generated in an objective mode, and the effectiveness, the confidence degree and the objectivity of the coverage rate statistics are improved.

Description

A kind of method and device that produces the coverage rate code by process flow diagram automatically
Technical field
The present invention relates to a kind ofly produce the method and the device of coverage rate code automatically, belong to the technical field of integrate circuit function checking by process flow diagram.
Background technology
Along with the raising of customer demand, the integrated level of chip and scale also promote gradually.In the development process of large-scale complex integrated circuit, the resource that functional verification consumes has occupied the overwhelming majority, generally more than 70%.How to accomplish the functional verification flow process comprehensively and efficiently, become one of IC industry circle urgent problem.
For solving this problem, academia and industrial community have proposed to comprise: based on assert, based on the constraint arbitrary excitation, based on methods such as coverage rate drivings.Wherein best in the effect aspect the acceleration checking convergence based on the checking of coverage rate driving, also be one of criterion of checking integrality simultaneously.
Coverage rate comprises contents such as code coverage and function coverage, and wherein code coverage can directly be added up by eda tool, and the collection of function coverage need verify that the slip-stick artist writes relative program, again by the auxiliary statistics of accomplishing of eda tool.It is comprehensive that the verification method difficult point that coverage rate drives is that the function covering points is extracted.Existing extraction to the function covering points also is in the artificial leaching process of the collaborative examination of slip-stick artist, and shortcoming is that extraction and affirmation process time consuming time are long, if any omitting difficult the discovery.
This patent will extract covering points automatically through process flow diagram, accomplish the generation of coverage rate code.
The coverage rate related patent U.S. Patent No.:
CN200710032674.X " confirming method, the proving installation of code coverage " has described a kind of through in each code line, interruption being set, and obtains the method for the code coverage of program to be tested.
CN00809255.9 " the attribute coverage rate in the formal verification " has described the method that a kind of state space that covers through the attribute of model detection validation obtains the attribute coverage rate.
CN200610153890.5 " a kind of function coverage testing measurement system and method " has described a kind of function according to tolerance key element parameter that can in eda tool, realize and has covered the method that score obtains function coverage.
CN200510036782.5 " a kind of automatic generation method of the arbitrary excitation based on function coverage " has described a kind of method that produces arbitrary excitation based on function coverage automatically.
CN200510035490.X " a kind of function coverage ratio analysis method of logic testing " has described a kind of method of using probe to obtain function coverage information.
CN200810066597.4 " a kind of system and method for realizing coverage rate test " has described a kind of several operation systems that is applied to and has got the method that program realizes the coverage rate statistics ready through inserting code.
CN200310104038.5 " a kind of straightforward procedure of Validation Code coverage rate analysis " has described a kind of analysis of using branch's tagged method completion code coverage rate.
CN200410079030.2 " method and system of a kind of automatic schedule logic simulation and code coverage rate analysis " has described and a kind of tested logic is carried out after the precompile carrying out the emulation use-case in proper order according to emulation use-case index list and preserved code coverage result's method.
CN200810133180.5 " collection method of function coverage and device " has described a kind of method that verifiability identifies the function coverage of statistical-reference model that in reference model, is provided with.
CN200910078326.5 " method and system of driving accidental validation integrated circuit by coverage rate " has described a kind of method of using population selection intersection to produce new individual completion Automatic Optimal proving program.
CN201010270989.X " a kind of hardware based emulation coverage rate statistical method and device " has described a kind of storage unit is added up triggering times and status information as the coverage rate mark emulation coverage rate statistical method of in primary circuit, adding.
The CN201010170650.2 method and the device of code coverage " obtain " has described a kind of at least two tested objects and has carried out the code coverage test and satisfy the method that code that certain condition do not identify obtains the tested object code coverage through sign.
The process flow diagram related patent U.S. Patent No.:
CN200410046116.5 " editor of process flow diagram, reorganization checking, create and the method and apparatus of conversion " has described and a kind of process flow diagram is converted into the method for dendrogram of equal value, dendrogram of equal value converted into the method, the method for editor's process flow diagram, method and the process flow diagram editing machine of visioning procedure figure of legitimacy of method, the checking reorganization process flow diagram of process flow diagram.
CN200410021269.4 " the legitimacy method of calibration of the concurrent unit of work process flow figure " has described the method that a kind of dark searching algorithm of elder generation through figure is checked the redirect between illegal outlet, illegal entry and each concurrent branch of concurrent unit.
CN200810059628.3 " a kind of method based on assembly routine constructing semantic process flow diagram " has described a kind of method by assembly routine constructing semantic process flow diagram.
CN200610066636.1 " a kind of method that business process map is converted into effective language " has described a kind of method that the process flow diagram piecemeal finally is converted into the corresponding element in the effective language based on the token analytical technology.
Through retrieval,, do not find to have the patent of constructed characteristics with this patent according to the above related patent U.S. Patent No. content that provides.
Relevant paper:
" a kind of wireless sensor network overlay model "---" micro computer and application ", 2010 15 phases, Lv Guanghui, Cui Xunxue, Hou Zhansheng based on genetic algorithm.Article has been described and has been used improved genetic algorithm, selects for use multiple coverage to replace the node utilization factor practical as fitness function.Any core content that does not comprise this patent.
" a kind of design of embedded assemble software test platform and realization "---Xie Ruidong, 2006-University of Electronic Science and Technology: computer utility.Mentioned in the article for the assembly routine of 8051 serial CPU and carried out the coverage data analysis, be conceived to the code angle.There is not actual lap with this patent.
" about the path testing method research of program control flow chart "---" electronics technology ", 2008 7 phases, Yu Jun, Zhang Juping, Zhao Li.The software-oriented test described in article, and program control flow chart is taken out the graph theory model of program structure, is converted into adjacency matrix again, utilizes certain algorithm of searching to search test path.This patent is verified the field towards integrate circuit function; Flow figure handles the module action of frame and extracts as covering points; The concrete branch condition of decision block is carried out classification processing extract as covering points, the combination covering points is by the decision of decision block content, and the sequence covering points is made up of the sequence that the module action characterizes; Do not relate to algorithm and adjacency matrix problem, promptly article and this patent content do not have lap.
" based on the embedded software test systematic study and the realization of 51 series "---Liu Limei, 2005, University of Electronic Science and Technology, Computer Software and Theory.For the coverage rate problem in the software test, mentioned and used the method for pitching pile to obtain code coverage in the article.There is not actual lap with this patent.
" based on programme controlled path testing technical research "---" electronics technology ", 2008 12 phases, Ding Zhenguo, Guo Qiang.Article is identical with " about the path testing method research of program control flow chart ".
" based on the research of assembly language embedded software test platform and the realization of software emulation "---Wang Xuedong, 2006, University of Electronic Science and Technology, Computer Software and Theory.Article is mentioned and from program, is extracted process flow diagram, and uses the pitching pile technology to realize statement and branch's coverage rate and the calculating of the comprehensive coverage rate under a plurality of test cases drive and the statistics of working time and internal memory operating position.
" based on the test case research of Built-in Self "---" computer utility and software ", 2006 10 phases, Tang Pei, Xu picks up justice.Article has been described in software test and has been converted process flow diagram into binary tree, then through binary tree traversal traversal of binary tree, accomplishes test.There is not actual lap with this patent.
Through retrieval,, do not find to have the patent of constructed characteristics with this patent according to the above related article content that provides.
Summary of the invention
The technical problem underlying that the present invention will solve is that a kind of method and device that is produced the coverage rate code by process flow diagram automatically is provided.
For solving the problems of the technologies described above, the technical scheme that the present invention adopts is following:
The process flow diagram element comprises: start-stop frame, input and output frame, decision block, processing frame, flowline, tie point, annotation box.Wherein decision block is two the most frequently used in process flow diagram elements with handling frame.Process flow diagram comprises sequential organization, choice structure, loop structure, and choice structure can be divided into binary choice structure and polynary choice structure again, and loop structure can be divided into structure of carrying out earlier and the structure of judging earlier again.The level of process flow diagram shows that handling frame for one can more detailed description be another process flow diagram.
What the processing frame table showed is in the event routine of whole flow chart description; A certain module has been done certain action in the system; Be module_XXX.do_action_XXX; This action representes that also this module carrying out a certain function that it is responsible for, and is the prerequisite of accomplishing the function coverage inspection to the collection of each certain piece function.For by the design verified when receiving excitation and get into handling procedure that this processing frame table shows and handle accordingly, must have the generation of corresponding this incident of characterization.So the incident that each action definition of module is corresponding, promptly module_XXX.do_action_XXX ← → event_module_XXX_do_action_XXX.Corresponding characterization signal indicates this incident that taken place, promptly event_module_XXX_do_action_XXX ← → F (signal, time; Value); Wherein (signal, time value) represent that some signal signal a certain special value value occurs at its a certain regulation moment time to F.
What decision block was represented is in the event routine of whole flow chart description, and system need judge how ensuing treatment scheme will carry out the i.e. selection in path through some attribute or variate-value.To the definition of attribute and variable, and their span and kind are that covering points is extracted the content of paying close attention in the decision condition.
Collection and treatment frame covering points also produces the method for coverage rate code:
1. read all elements in the process flow diagram.The process that reads finishes to terminating point from starting point, travels through all elements of whole process flow diagram.
2. collect each and handle the action that each module of system produces in the frame.
3. identical action in the merging equal modules.
4. to the incident of a correspondence of each action definition.
5. collecting the characterization of each incident describes.
With the represented function of the action of each module of system as the function covering points, as coverage condition, produce the coverage rate code with the characterization signal of its corresponding incident that is defined.
Collect the decision block covering points and produce the method for coverage rate code:
1. read all elements in the process flow diagram.The process that reads finishes to terminating point from starting point, travels through all elements of whole process flow diagram.
2. collect the Rule of judgment in each decision block.The end value that Rule of judgment comprises parameter or module action in the system after handling, i.e. variable in the Rule of judgment, with and possible span and type.
3. accomplishing scene according to decision condition divides.Scene is systematic parameter or the value of result or the arrangement of type of system's correspondence when working in the different disposal step.
4. merge the corresponding scene of identical variate-value or identical variable combination value.
With the represented function of each scene of being divided as the function covering points, as coverage condition, produce the coverage rate code with the combined value of the variate-value of its correspondence that is defined or variable.
Collect the method that makes up covering points and produce the coverage rate code:
1. read all elements in the process flow diagram.The process that reads finishes to terminating point from starting point, travels through all elements of whole process flow diagram.
2. collect the Rule of judgment in each decision block.The end value that Rule of judgment comprises parameter or module action in the system after handling, i.e. variable in the Rule of judgment, with and possible span and type.
3. accomplishing scene according to decision condition divides.Scene is systematic parameter or the value of result or the arrangement of type of system's correspondence when working in the different disposal step.
4. the order that occurs according to the decision block of each bar in the process flow diagram on from starting point to the terminating point path successively with the scene combined crosswise of dividing according to decision condition in each decision block, forms the function covering points that combine scenes is represented.In the path if circulation, the predetermined circulation upper limit.
With the represented function of each combine scenes as the function covering points, as coverage condition, produce the coverage rate code with the array configuration of its corresponding decision condition.
Collect the sequence covering points and produce the method for coverage rate code:
1. read all elements in the process flow diagram.The process that reads finishes to terminating point from starting point, travels through all elements of whole process flow diagram.
2. the action the processing frame of each bar in the collection process flow diagram from starting point to the terminating point path.In the path if circulation, the predetermined circulation upper limit.
3. to the incident of a correspondence of each action definition.
4. collecting the characterization of each incident describes.
5. the represented function of the orderly action sequence that takes place for each paths is as the function covering points, as coverage condition, produces the coverage rate code with the characterization signal of its corresponding orderly sequence of events.
The sequence covering points of collecting belt constraint condition also produces the method for coverage rate code:
1. read all elements in the process flow diagram.The process that reads finishes to terminating point from starting point, travels through all elements of whole process flow diagram.
2. the action the processing frame of each bar in the collection process flow diagram from starting point to the terminating point path.In the path if circulation, the predetermined circulation upper limit.
3. to the incident of a correspondence of each action definition.
4. collecting the characterization of each incident describes.
5. collect the decision block that interts on each paths in 2 steps in handling the frame sequence.And collect the Rule of judgment in each decision block.
6. the orderly action sequence that takes place for each paths; And in the action sequence the represented function of the Rule of judgment of correspondence position as the function covering points; Characterization signal with its corresponding orderly sequence of events; And to intert the corresponding variate-value of wherein decision condition or the combined value of variable be coverage condition, produces the coverage rate code.In every paths; Before each decision block thereafter pairing incident of processing frame of being right after is performed; Rule of judgment in the decision block is sampled, and judges whether to pass this decision block and gets into its aftertreatment frame, and soon the condition in the decision block is as the part in the sequence.
If more than process flow diagram is the stratification process flow diagram in the method for generation covering points; Promptly wherein have and handle frame and can be launched into another process flow diagram; Collecting covering points and producing in the code process of coverage rate, can do earlier and launch to handle, carrying out according to above-mentioned steps successively again; Also can select not launch to carry out according to above-mentioned steps as an independent processing frame.If tie point, through tie point process flow diagram is connected completely in the process flow diagram, read again.Annotation box records in the code with the form of comment line in the code when the processing frame of its note and decision block produce the covering points code.If the input and output frame, in the method for above-mentioned collection covering points, the input and output frame can be used as to be handled frame and handles in the process flow diagram, as covering points, as the sampling foundation, produces the coverage rate code with corresponding characterization with the classifying content of input and output.
Further, the concrete rule of dividing according to decision condition completion scene described in the said method is following:
1. for the relational operator in the decision condition, that is:<(less than),<=(smaller or equal to),>(greater than),>=(more than or equal to) ,==(equaling),!=(being not equal to).The equivalence of the expression formula of relational operator the right and left through the right and left moves to convert on one side and comprises variable, and another side only comprises numerical value, is the boundary with this numerical value again; The variable relation that will comprise variable one side is divided into three storehouses and carries three kinds of scenes, accomplishes the division of scene, i.e. A relational calculus B; The variable of guaranteeing replacement among the A only comprises numerical value among the B, three scene storehouses (bins) then are: [$; B) (less than the storehouse of B), B (equaling the storehouse of B), (B, $] (greater than the storehouse of B).
2. for the logical operator in the decision condition: promptly! (logic NOT) 、 && (logical and), II (logical OR).The logic and operation symbol is as binary operator, and the value of the expression formula of the right and left is logical truth (true) or logical falsehood (false), and (left side is very right false can it to be divided into four scene storehouses; A left side is false right true, about with false, about with true); Can merge into two scene storehouses (true storehouse, false storehouse) again according to final effect, true together about wherein true storehouse comprises; False storehouse comprises that a left side is very right false, and a left side is false right true, about with false; The logical OR operational symbol is as binary operator, and the value of the expression formula of the right and left is logical truth (true) or logical falsehood (false), and (left side is very right false can it to be divided into four scene storehouses; A left side is false right true, about with false, about with true); Can merge into two scene storehouses (true storehouse, false storehouse) again according to final effect, true together about wherein true storehouse comprises; The very right vacation in a left side, a left side is false right true, and is false together about false storehouse comprises; The logic NOT operational symbol is as unary operator; The value of its expression formula is logical truth (true) or logical falsehood (false); Be divided into (true storehouse, two scene storehouses according to final effect; False storehouse), wherein true storehouse is that the expression logic value after the logic NOT operational symbol is vacation, and false storehouse is that the expression logic value after the logic NOT operational symbol is true.
3. for the bitwise logical operator in the decision condition: i.e. ^ (step-by-step xor operator), I (step-by-step exclusive disjunction symbol), & (step-by-step AND operator).Same logical operator is divided the scene storehouse according to the figure place of operand earlier, identifies the true and false of each place value respectively, is divided into two scene storehouses (true storehouse, false storehouse) according to final effect again, will be included into this two scene storehouses with the scene storehouse of the true and false division of ready-portioned positional value.
4. be the combined situation of above-mentioned three kinds of situation and bracket operation symbol for the operational symbol in the decision condition, the scene according to each operational symbol of priority of operations combination of operational symbol is divided produces combine scenes.
5., represent that respectively decision condition is that genuine scene and decision condition are false scene if decision condition only is divided into two scenes (true storehouse, false storehouse) with final effect for not comprising the expression examination of above-mentioned operational symbol.
Further, the concrete rule of dividing according to decision condition completion scene described in the said method also comprises:
1. because the alternative of alternative condition can split into a plurality of binary choice structures, carry out according to above-mentioned steps successively again in many first choice structures.Also can select simultaneously to divide the scene storehouse according to the path that can select in the polynary choice structure, the situation acquiescence that all assign thresholds are outer is included in the default storehouse.
2. loop structure comprises all being made up of structure of carrying out earlier and the structure of judging earlier decision box; Have loop upwards to exist, will set up the scene storehouse according to cycle index when dividing scene, the scene storehouse comprises zero degree circulation scene storehouse; A circulation scene storehouse, repeatedly circulation scene storehouse.
Further; Divided scene if collect the variable that still has the data of description structure after the covering points through said method; Then divide the scene storehouse by force according to the possible value space of this variable; Comprise minimum value scene storehouse, maximal value scene storehouse, intermediate value scene storehouse, full null field Jing Cang, a full scene storehouse, step out not dividing of value space.
Device:
Read in the unit: process flow diagram is read in.Finish from the starting point frame frame that begins to breast the tape, run through the content of each element in the process flow diagram and element, read depth-first or the breadth First ergodic algorithm of process according to tree construction.
Level launches the unit: if some processing frame is another width of cloth process flow diagram in the read-in process; Can another width of cloth process flow diagram be embedded in this process flow diagram and continue again to read; Be the expansion of stratification,, represent this processing frame with simple action if do not need and to launch.In the process flow diagram if tie point connects process flow diagram complete through tie point.
Cell library: each element to reading in carries out classification and storage, leaves in the cell library.Comprise the start-stop frame, handle frame, decision box, input and output frame, annotation box etc.
The annexation storehouse: the annexation between each element that reads in is stored.
Handle frame coverage rate code generation unit:, produce the coverage rate code according to said collection and treatment frame covering points and the method that produces the coverage rate code according to the content of handling frame in the cell library.
Decision block coverage rate code generation unit:, produce the coverage rate code according to said collection decision block covering points and the method that produces the coverage rate code according to the content of decision box in the cell library.
Combination coverage rate code generation unit: according to the content of decision box in the cell library and unit connection relation, according to said collection combination covering points and produce the method generation coverage rate code of coverage rate code.
Sequence coverage rate code generation unit: according to the content of handling frame, decision block and unit connection relation in the cell library; Selection produces the coverage rate code according to said collection sequence covering points and the method that produces the coverage rate code, perhaps gives birth to the coverage rate code according to the sequence covering points of belt restraining condition and the method that produces the coverage rate code.
Other coverage rate code generation unit: the content according to input and output frame in the cell library produces the coverage rate code as affairs kind covering points, and the part that ought deal with the input and output frame frame processing that lacks in the complementary sequence covering points.The content of annotation box produces the annotation information in the code.
Code merge cells: above-mentioned several partial codes are combined, increase necessary key element in the syntactic structure, it can directly be moved.
The invention has the beneficial effects as follows:
Directly extract covering points according to process flow diagram, be converted into the coverage rate code automatically, save time, reduce artificially and omit,, remedied the deficiency of simple code coverage from functional perspective.The things of describing in the process flow diagram is the transaction-level things, compares with the code level process flow diagram, has improved abstractness, finds the wherein problem of existence more easily, more meets the characteristics that the people ponders a problem.Produce the coverage rate code with objective form, increased validity, confidence degree and the objectivity of coverage rate statistics.
Description of drawings
Fig. 1 is five kinds of process flow diagram structural representations according to the invention;
Fig. 2 is a process flow diagram element structure synoptic diagram according to the invention;
Fig. 3 is the device synoptic diagram that process flow diagram according to the invention produces the coverage rate code;
Fig. 4 is a collection and treatment frame covering points according to the invention and an embodiment who produces the coverage rate code;
Fig. 5 is a collection decision block covering points according to the invention and an embodiment who produces the coverage rate code;
Fig. 6 collects the combination covering points for the present invention and produces an embodiment of coverage rate code;
Fig. 7 collects the sequence covering points for the present invention and produces an embodiment of coverage rate code;
Fig. 8 is the sequence covering points of collecting belt constraint condition of the present invention and an embodiment who produces the coverage rate code;
Embodiment
Combine accompanying drawing that the present invention is done further explain through embodiment below
As shown in Figure 4, read in process flow diagram, wherein exist two to handle frame.Module M1 does an action of writing when handling frame 1 expression through this processing frame, and the characterization signal of writing action is that the write_en signal on the interface if is one.Module M2 does one and reads action when handling frame 2 expressions through this processing frame, and the characterization signal of reading to move is that the write_en signal on the interface if is zero.When producing code corresponding M1 write action to M1 definition write incident event_m1_do_write; Satisfy M1.write ← → event_m1_do_write; The trigger condition of this incident is that the write_en on the interface if is one when rising edge clock; ((posedgeif.clock) if.write_en==1), promptly event_m1_do_writeM ← → ((posedgeif.clock) if.write_en==1), wherein ((posedgeif.clock) if.write_en==1) is F (signal; Time, specific descriptions value).Covering group m1_do_write_cg receives the triggering of this incident, collects covering points m1_write_cp.In like manner to handling frame 2 operations.
As shown in Figure 7, read in process flow diagram, wherein exist two to handle frame.Corresponding incident in the difference definition process frame, same Fig. 4.The variable state_sequence of defined nucleotide sequence state; When module M1 writes action; Through triggering the incident of writing of M1, give sequence state variable state_sequence assignment zero, when module M2 reads to move; Through triggering the incident of reading of M2, give sequence state variable state_sequence assignment one.M1 takes place earlier to the sequence state covering points and writes incident and M2 takes place again read this scene of incident and collect in covering group sequence_cg, i.e. the saltus step of sequence state variable state_sequence from zero to one.
As shown in Figure 8, on the basis of Fig. 7, handle the middle decision block that occurs of frame for two.When producing the sequence covering points of belt restraining condition, consider the situation of constraint condition.When the incident that the processing frame after following decision block closely is corresponding just has been triggered ((Sroot.top.m2.event_m2_do_read)); Rule of judgment to decision block is sampled; Whether observation condition meets the requirements; Meet the requirements, then sequence state changes, i.e. if (cnt==0) state_sequence=1.
As shown in Figure 5, read in process flow diagram, wherein there are two decision blocks and a processing frame.Only pay close attention to decision block this moment.Decision condition in the decision block 1 is whether cnt equals 0, divides three types to the span of cnt, i.e. three storehouses (minimum value arrives maximal value to-1,0,1).Decision condition in the decision block 2 is whether next_addr is not equal to 0, divides three types to the span of next_addr, i.e. three storehouses (minimum value arrives maximal value to-1,0,1).
As shown in Figure 6, on the basis of Fig. 5, produce the combination coverage rate, produce code cross cnt_cp, next_addr_cp.
Above content is to combine concrete embodiment to the further explain that the present invention did, and can not assert that practical implementation of the present invention is confined to these explanations.For the those of ordinary skill of technical field under the present invention, under the prerequisite that does not break away from the present invention's design, can also make some simple deduction or replace, all should be regarded as belonging to protection scope of the present invention.

Claims (16)

1. one kind produces the method for coverage rate code automatically by process flow diagram, it is characterized in that comprising:
Covering points in the collection and treatment frame also produces the method for coverage rate code; The action of in this processing frame, carrying out with each module in the system described in the processing frame is the function covering points; With to the characterization signal of incident that should action definition as coverage condition, produce the coverage rate code;
Collect the covering points in the decision block and produce the method for coverage rate code; With the variable in the decision condition described in the decision block serves as as the function covering points according to the scene of dividing; As coverage condition, produce the coverage rate code with the end value after parameter in the system of the variable representative in the decision condition or the module action processing;
Collect the method that makes up covering points and produce the coverage rate code; Scene corresponding after the decision condition combined crosswise of describing all decision blocks that occur from starting point to the terminating point path with each bar is as the function covering points; As coverage condition, produce the coverage rate code with the combined crosswise of the variable-value in the decision condition;
Collect the sequence covering points and produce the method for coverage rate code; All orderly action sequences of handling frames representative that occur to the terminating point path from starting point with each bar are as the function covering points; As coverage condition, produce the coverage rate code with the characterization signal of the corresponding orderly incident of orderly action sequence;
The sequence covering points of collecting belt constraint condition also produces the method for coverage rate code; The decision condition that the orderly action sequence that all that occur to the terminating point path from starting point with each bar are handled frames representative and the decision block that wherein interts are represented is as the function covering points; As coverage condition, produce the coverage rate code with the variable-value stipulated in the characterization signal of the corresponding orderly incident of orderly action sequence and the decision condition.
2. the method for generation coverage rate code as claimed in claim 1 is characterized in that, covering points in the said collection and treatment frame and the method that produces the coverage rate code comprise:
Read all elements in the process flow diagram.The process that reads finishes to terminating point from starting point, travels through all elements of whole process flow diagram;
Collect each and handle the action that each module of system produces in the frame;
Merge identical action in the equal modules;
Incident to a correspondence of each action definition;
Collecting the characterization of each incident describes;
As the function covering points, as coverage condition, produce the coverage rate code with the represented function of the action of each module of system with the characterization signal of its corresponding incident that is defined.
3. the method for generation coverage rate code as claimed in claim 1 is characterized in that, covering points in the said collection decision block and the method that produces the coverage rate code comprise:
Read all elements in the process flow diagram, the process that reads finishes to terminating point from starting point, travels through all elements of whole process flow diagram;
Collect the Rule of judgment in each decision block, the end value that Rule of judgment comprises parameter or module action in the system after handling, i.e. variable in the Rule of judgment, with and possible span and type information;
Accomplish scene according to decision condition and divide, scene is systematic parameter or the value of result or the arrangement of type of system's correspondence when working in the different disposal step;
Merge the corresponding scene of identical variate-value or identical variable combination value;
As the function covering points, as coverage condition, produce the coverage rate code with the represented function of each scene of being divided with the combined value of the variate-value that defines in the corresponding scene Rule of judgment or variable.
4. the method for generation coverage rate code as claimed in claim 1 is characterized in that, said collection combination covering points and the method that produces the coverage rate code comprise:
Read all elements in the process flow diagram, the process that reads finishes to terminating point from starting point, travels through all elements of whole process flow diagram;
Collect the Rule of judgment in each decision block, the end value that Rule of judgment comprises parameter or module action in the system after handling, i.e. variable in the Rule of judgment, with and possible span and type information;
Accomplish scene according to decision condition and divide, scene is systematic parameter or the value of result or the arrangement of type of system's correspondence when working in the different disposal step;
The order that occurs according to the decision block of each bar in the process flow diagram on from starting point to the terminating point path; Successively with the scene combined crosswise of dividing according to decision condition in each decision block; Form the function covering points that combine scenes is represented, in the path if circulation, the predetermined circulation upper limit;
As the function covering points, as coverage condition, produce the coverage rate code with the represented function of each combine scenes with the array configuration of the variable-value that defines in the corresponding combine scenes Rule of judgment.
5. the method for generation coverage rate code as claimed in claim 1 is characterized in that, said collection sequence covering points and the method that produces the coverage rate code comprise:
Read all elements in the process flow diagram, the process that reads finishes to terminating point from starting point, travels through all elements of whole process flow diagram;
Collect the action the processing frame on from starting point to the terminating point path of each bar in the process flow diagram, in the path if circulation, the predetermined circulation upper limit;
Incident to a correspondence of each action definition;
Collecting the characterization of each incident describes;
The represented function of the orderly action sequence that takes place for each paths is as the function covering points, as coverage condition, produces the coverage rate code with the characterization signal of its corresponding orderly sequence of events.
6. the method for generation coverage rate code as claimed in claim 1 is characterized in that, the sequence covering points of said collecting belt constraint condition and the method that produces the coverage rate code comprise:
Read all elements in the process flow diagram, the process that reads finishes to terminating point from starting point, travels through all elements of whole process flow diagram;
Collect the action the processing frame on from starting point to the terminating point path of each bar in the process flow diagram, in the path if circulation, the predetermined circulation upper limit;
Incident to a correspondence of each action definition;
Collecting the characterization of each incident describes;
Collect the decision block that interts on each paths in handling the frame sequence, and collect the Rule of judgment in each decision block;
Orderly action sequence for each paths generation; And intert in the action sequence in the represented function of the Rule of judgment of correspondence position as the function covering points; Characterization signal with its corresponding orderly sequence of events; And to intert the corresponding variate-value of wherein decision condition or the combined value of variable be coverage condition, produces the coverage rate code.
7. the method for generation coverage rate code as claimed in claim 1; It is characterized in that; Also comprise: if process flow diagram is the stratification process flow diagram; Promptly wherein have and handle frame and can be launched into another process flow diagram, collecting covering points and producing in the code process of coverage rate, can select to do earlier and launch to handle.If tie point, tie point connects process flow diagram complete, reads again in the process flow diagram.Annotation box records in the code with the form of comment line in the code when the processing frame of its note and decision block produce the covering points code.In the process flow diagram if the input and output frame; In the method for said collection covering points; The input and output frame can be used as the processing frame and handles; The content of input and output can be regarded as the module action of handling in the frame and be collected as covering points, as the sampling foundation, produces the coverage rate code with the characterization of corresponding input and output content.
8. describedly accomplish scene according to decision condition and divide like claim 1 or 3 or 4, it is characterized in that:
For the relational operator in the decision condition, that is:<(less than),<=(smaller or equal to),>(greater than),>=(more than or equal to) ,==(equaling),!=(being not equal to).The equivalence of the expression formula of relational operator the right and left through the right and left moves to convert into and comprises variable on one side; Another side only comprises numerical value; Be the boundary with this numerical value again, the variable relation that will comprise variable one side is divided into three storehouses and carries three kinds of scenes, comprises the storehouse of variable less than numerical value; Variable equals the storehouse of numerical value, and variable is greater than the storehouse of numerical value.
9. describedly accomplish scene according to decision condition and divide like claim 1 or 3 or 4, it is characterized in that:
For the logical operator in the decision condition: promptly! (logic NOT) 、 && (logical and), II (logical OR).Logic and operation symbol or logical OR operational symbol are divided into the very right vacation in a left side according to the logical value on expression formula both sides; A left side is false right true, about with false, about with true four scene storehouses; Final effect according to logic and operation or logical OR computing is merged into true storehouse, two scene storehouses, false storehouse.The logic NOT operational symbol is divided into true storehouse according to the logical value or the final effect of expression formula, two scene storehouses, false storehouse.
10. describedly accomplish scene according to decision condition and divide like claim 1 or 3 or 4, it is characterized in that:
For the bitwise logical operator in the decision condition: i.e. ^ (step-by-step xor operator), I (step-by-step exclusive disjunction symbol), & (step-by-step AND operator).Divide the scene storehouse according to the figure place of operand earlier, identify the true and false of each place value respectively, be divided into true storehouse according to final effect again, this two scene storehouses will be included into the scene storehouse of the true and false division of ready-portioned positional value in two scene storehouses, false storehouse.
11. describedly accomplish scene according to decision condition and divide like claim 1 or 3 or 4, it is characterized in that:
For comprising one or more of relational operator, logical operator, bitwise logical operator, bracket operation symbol in the decision condition simultaneously, the scene according to each operational symbol of priority of operations combination of operational symbol is divided produces combine scenes.
12. describedly accomplish scene according to decision condition and divide like claim 1 or 3 or 4, it is characterized in that:
If decision condition is the expression formula that not relation of inclusion operational symbol, logical operator, bitwise logical operator, bracket operation accord with; Only be divided into true storehouse with final effect; Two scene storehouses, false storehouse represent that respectively decision condition is that genuine scene and decision condition are false scene.
13. describedly accomplish scene according to decision condition and divide like claim 1 or 3 or 4, its characteristic also is:
Polynary choice structure can directly be divided the scene storehouse according to many selection paths, sets up the default storehouse, situation of all values beyond individual path requires span is given tacit consent to be included in the default storehouse.Polynary choice structure also can split into a plurality of binary choice structures earlier, divides scene according to the Rule of judgment in the binary choice structure again.
14. describedly accomplish scene according to decision condition and divide like claim 1 or 3 or 4, its characteristic also is:
Loop structure comprises all being made up of structure of carrying out earlier and the structure of judging earlier decision block; Have loop upwards to exist, will set up the scene storehouse according to cycle index when dividing scene, the scene storehouse comprises zero degree circulation scene storehouse; A circulation scene storehouse, repeatedly circulation scene storehouse.
15. describedly accomplish scene according to decision condition and divide like claim 1 or 3 or 4, its characteristic also is:
The variable of not divided is divided the scene storehouse by force according to the possible value space of this variable; Comprise minimum value scene storehouse, maximal value scene storehouse, intermediate value scene storehouse, full null field Jing Cang, a full scene storehouse, in these scene storehouses if any stepping out not dividing of this variable-value space.
16. one kind produces the device of coverage rate code automatically by process flow diagram, it is characterized in that comprising:
Read in the unit: process flow diagram is read in.Finish from the starting point frame frame that begins to breast the tape, run through the content of each element in the process flow diagram and element, read depth-first or the breadth First ergodic algorithm of process according to tree construction.
Level launches the unit: if certain of reading in handle frame can corresponding another width of cloth process flow diagram, can another width of cloth process flow diagram be embedded the process flow diagram that this handles frame place, and substitute and should handle frame, the i.e. expansion of stratification.If need not launch and to launch, represent this processing frame with simple action.In the process flow diagram if tie point connects process flow diagram complete through tie point.
Cell library: each element to reading in carries out classification and storage, leaves in the cell library.Comprise the start-stop frame, handle frame, decision box, input and output frame, annotation box etc.
The annexation storehouse: the annexation between each element that reads in is stored.
Handle frame coverage rate code generation unit: according to the content of handling frame in the cell library, collect the action that each handles unduplicated module in the frame, set up the function covering points of corresponding each action, and produce the coverage rate code.
Decision block coverage rate code generation unit: according to the content of decision box in the cell library; Collect in each decision block variable as Rule of judgment; Span with variable in the Rule of judgment is a cut-point with causing the critical value that true and false variation takes place judged result; Divide different scenes as the function covering points, produce the coverage rate code.
Combination coverage rate code generation unit: according to the content of start-stop frame, decision box and unit connection relation in the cell library; Path to each bar from initial block to the termination frame; Collect the Rule of judgment of decision block on the path; The corresponding function covering points of value combination according to accomplishing variable in the required Rule of judgment in this path produces the coverage rate code.
Sequence coverage rate code generation unit: according to the content of start-stop frame, processing frame, decision block and unit connection relation in the cell library, the path to each bar from initial block to the termination frame is collected and is handled frame and decision block on the path.Use the corresponding action sequence of processing frame orderly on every paths as the function covering points, produce the coverage rate code.Perhaps use the corresponding action sequence of processing frame orderly on every paths and intert the Rule of judgment combination of the decision block in handling the frame sequence, produce the coverage rate code as the function covering points.
Other coverage rate code generation unit: according to the content of input and output frame in the cell library; Content according to input and output allows the kind of appearance to produce the coverage rate code as covering points; And add in the sequence coverage rate code generation unit; Handle the input and output frame as handling frame, produce sequence coverage rate code again.The content of annotation box produces the annotation information in the code.
Code merge cells: above-mentioned several partial codes are combined, increase necessary key element in the syntactic structure, it can directly be moved.
CN2012101717031A 2012-05-29 2012-05-29 Method and device for automatically generating coverage rate codes by flow chart Pending CN102722610A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012101717031A CN102722610A (en) 2012-05-29 2012-05-29 Method and device for automatically generating coverage rate codes by flow chart

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012101717031A CN102722610A (en) 2012-05-29 2012-05-29 Method and device for automatically generating coverage rate codes by flow chart

Publications (1)

Publication Number Publication Date
CN102722610A true CN102722610A (en) 2012-10-10

Family

ID=46948370

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012101717031A Pending CN102722610A (en) 2012-05-29 2012-05-29 Method and device for automatically generating coverage rate codes by flow chart

Country Status (1)

Country Link
CN (1) CN102722610A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105302573A (en) * 2015-11-20 2016-02-03 浪潮集团有限公司 Method for establishing function point matching setting automation platform for function verification platform
CN105404381A (en) * 2015-11-06 2016-03-16 珠海全志科技股份有限公司 Terminal device operation frequency control method and system
CN105677966A (en) * 2016-01-05 2016-06-15 浪潮集团有限公司 Method for conducting data mining on coverage rate to accelerate verification convergence
CN105740494A (en) * 2014-12-24 2016-07-06 三星电子株式会社 Electronic Design Automation Method And Apparatus Thereof
CN106371823A (en) * 2016-08-22 2017-02-01 广州酷狗计算机科技有限公司 Code block generation method and apparatus
CN106599498A (en) * 2016-12-20 2017-04-26 盛科网络(苏州)有限公司 Method for improving chip verification coverage rate based on tree backtracking algorithm
CN111338957A (en) * 2020-02-28 2020-06-26 牡丹江师范学院 Software testing basic path evolution generation method based on probability statistics
CN113868061A (en) * 2021-09-29 2021-12-31 深圳大普微电子科技有限公司 Chip verification method and device and server

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘芳、谢峥等: ""一种可重构的通用总线接口验证平台的研究及实现"", 《电子器件》 *
商惠华: ""基于过程改进的软件质量管理模型"", 《计算机工程与设计》 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105740494A (en) * 2014-12-24 2016-07-06 三星电子株式会社 Electronic Design Automation Method And Apparatus Thereof
CN105740494B (en) * 2014-12-24 2020-11-17 三星电子株式会社 Electronic design automation method and device thereof
CN105404381A (en) * 2015-11-06 2016-03-16 珠海全志科技股份有限公司 Terminal device operation frequency control method and system
CN105302573A (en) * 2015-11-20 2016-02-03 浪潮集团有限公司 Method for establishing function point matching setting automation platform for function verification platform
CN105677966A (en) * 2016-01-05 2016-06-15 浪潮集团有限公司 Method for conducting data mining on coverage rate to accelerate verification convergence
CN105677966B (en) * 2016-01-05 2018-10-19 浪潮集团有限公司 It is a kind of that the convergent method of data mining acceleration verification is carried out to coverage rate
CN106371823A (en) * 2016-08-22 2017-02-01 广州酷狗计算机科技有限公司 Code block generation method and apparatus
CN106599498A (en) * 2016-12-20 2017-04-26 盛科网络(苏州)有限公司 Method for improving chip verification coverage rate based on tree backtracking algorithm
CN111338957A (en) * 2020-02-28 2020-06-26 牡丹江师范学院 Software testing basic path evolution generation method based on probability statistics
CN111338957B (en) * 2020-02-28 2023-03-31 牡丹江师范学院 Software testing basic path evolution generation method based on probability statistics
CN113868061A (en) * 2021-09-29 2021-12-31 深圳大普微电子科技有限公司 Chip verification method and device and server

Similar Documents

Publication Publication Date Title
CN102722610A (en) Method and device for automatically generating coverage rate codes by flow chart
CN103473171B (en) A kind of fraction of coverage calling path based on function dynamically follows the tracks of method and device
CN105022691B (en) A kind of increasingly automated method for testing software based on uml diagram
CN111967512B (en) Abnormal electricity utilization detection method, system and storage medium
CN102799529B (en) A kind of dynamic binary code method for generating test case
CN107111625A (en) Realize the method and system of the efficient classification and exploration of data
CN104699613B (en) A kind of spacecraft-testing demand automatic creation system and its method
CN102339252A (en) Static state detecting system based on XML (Extensive Makeup Language) middle model and defect mode matching
CN101464797A (en) Method and system for automatically generating test use case based on unified modeling language activity graph
CN104699735A (en) Data processing method and device for enterprise data center
CN104965999B (en) The analysis joining method of a kind of short-and-medium genetic fragment order-checking and equipment
CN112257784A (en) Electricity stealing detection method based on gradient boosting decision tree
CN101714166B (en) Method and system for testing performance of large-scale multi-keyword precise matching algorithm
CN101894072B (en) Method for detecting abnormal termination during model detection
CN113886832A (en) Intelligent contract vulnerability detection method, system, computer equipment and storage medium
CN105022692A (en) Deadlock detection verification method
CN103646194A (en) Credible sorting method of synchronous data flow procedures based on formal verification
CN112506757A (en) Automatic test method, system, computer device and medium thereof
Abid et al. A Real-Time Specification Patterns Language
de Figueiredo et al. Generating interaction test cases for mobile phone systems from use case specifications
Madalinski et al. Diagnosability verification with parallel LTL-X model checking based on Petri net unfoldings
CN110276852A (en) Unmanned plane method for inspecting and device
CN114701547A (en) Urban rail transit interlocking system detection method, system, equipment and medium
CN114611103A (en) Hardware Trojan horse detection method based on machine learning and mixed sampling
CN113435494A (en) Low-voltage resident user abnormal electricity utilization identification method and simulation system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20121010

WD01 Invention patent application deemed withdrawn after publication