CN104572103B - A kind of the worst execution time WCET method for quick estimating based on distribution function - Google Patents
A kind of the worst execution time WCET method for quick estimating based on distribution function Download PDFInfo
- Publication number
- CN104572103B CN104572103B CN201510009091.XA CN201510009091A CN104572103B CN 104572103 B CN104572103 B CN 104572103B CN 201510009091 A CN201510009091 A CN 201510009091A CN 104572103 B CN104572103 B CN 104572103B
- Authority
- CN
- China
- Prior art keywords
- basic block
- statement
- time
- basic
- execution time
- 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.)
- Expired - Fee Related
Links
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The invention provides a kind of the worst execution time WCET method for quick estimating based on distribution function, dis-assembling file F is obtained by carrying out dis-assembling to DSP engineering objectives code (out files);Dis-assembling file F is analyzed, each basic block divided is obtained, obtains the basic set of blocks B of program;Recognize the relation between each basic block in basic set of blocks B, construction procedures flow graph C;Calculate the execution time T of each basic block;Basic block is performed to time T and basic block performs the programming flowchart Cw that number of times Ts is weighted as weights;The programming flowchart Cw of weighting is analyzed, the maximum path of total weight value is obtained, regard maximum total weight value as program the worst execution time WCET.Solve the problems, such as to need the irrationality of beta estimation of distribution parameters method in the problem of the drawbacks of operation program obtains test sample and excessive manual intervention and tradition PERT technologies in the prior art.
Description
Technical field
The invention belongs to real-time embedded software field, more particularly in TI DSP technologies it is a kind of based on distribution function most
The bad execution time (WCET:Worst-Case Execution Time) method for quick estimating, available for assessment DSP engineering codes
Or the worst execution time of code snippet.
Background technology
In real-time embedded software system, system has more strict requirements to the time, and the correctness of system is not only
It is relevant with the logic of its program, it is also relevant with its time response, defined task is only completed at the appointed time to be only effectively
, it otherwise can cause the reduction even failure of system of the systematic function.Therefore, in prior acquisition system each task it is the worst
The execution time, (WCET) had great importance to Time-Series analysis of real-time system etc..
At present, WCET analyses are main includes three kinds of methods:Static analysis method, dynamic measurement method and Mixed method.
Dynamic measurement method is exactly the execution time by the dynamic test program of operation program, and then analysis obtains WCET,
But this method, the drawbacks of have very big, this method needs target machine, it is necessary to actual operation procedure and need substantial amounts of reality first
Test, labor intensive, material resources, financial resources, and in space flight, aviation field, real target machine environment can not be simulated in many cases
Or target machine is expensive, and it is higher to requirement of real-time, it is impossible to allow untested program to be run on real target machine.
In addition, this method can not ensure not underestimating the worst execution time it is difficult to ensure that the obtained result of measurement is safe, because
For it is difficult to ensure that the actual measurement done meets program WCET condition, for modern processors, this point is more difficult to accomplish.
Mixed method is the method for being combined static analysis method and dynamic measurement method, and this method is specifically divided into two kinds of feelings
Condition, one kind is to carry out static analysis to program first, i.e., analyzed with static analysis method, then according to static analysis method
As a result testing results, the final WCET for determining program are carried out to program;Another is that program is entered using dynamic measurement method first
Row test analysis, then carries out static analysis, and then determine the WCET of program on the basis of dynamic measurement method.
No matter which kind of method is used, Mixed method is also wrapped in the advantage comprising static analysis method and dynamic measurement method
Containing their respective shortcomings, and Mixed method is more complicated.
Static analysis method is that the WCET for the program that obtains is estimated by theory analysis, and this method not only can be in not operation program
In the case of obtain result of calculation, and ensure that obtained result is safe, therefore, this is method conventional at present.
Traditional static analysis method is typically made up of 3 parts:1. the control flow analysis of program, Main Analysis determines program
Possible execution route, maximum cycle and infeasible path etc.;2. bottom is analyzed, the main feature for considering target machine,
Such as cache, streamline, branch prediction etc., it is therefore an objective to determine that every assembly statement or each basic block perform when
Between;3. WCET is calculated, and according to preceding two information, the WCET of program is calculated with specific computational methods, main to calculate
Method is divided into the method for the method based on path, the method based on tree and implicit path enumeration.
On the whole, traditional Static Analysis Method is in WCET calculating process, during the execution of every assembly instruction
Between treated as determination value, then obtain the WCET of program by certain method, but this value is also to determine.
It can be seen that, traditional method does not account for the uncertainty of program execution time, according to present processor
Clearly there is very big drawback in feature, this method, because processor is many first in order to accelerate the speed of computing to use now
The technology entered, such as cache, streamline, branch prediction etc. so that program execution time it is uncertain more obvious.
Therefore, the run time of program is not some single value, but the interval value of some scope.
It is mainly probabilistic method currently for this way to solve the problem and asks WCET, i.e. pWCET, this concept is by Guillem
What Bernat put forward in 2003, the probability distribution that main purpose solves the WCET of certain section of code or some function etc. is asked
Topic.The document for calculating WCET with the method has been delivered a lot, such as:
1) in 2003, the use statistical theory of extreme values solver that Stefan M Petters are proposed performs time interval
Method.The general thought of the document is that program is run multiple times, and obtains many program runtime values, then uses Gumble
Probability function is approached, and asks for program runtime extreme value, as WCET values.This document is analyzed, it can easily be shown that such a side
Method can not pure static analysis at last because it to be the time value obtained to program is run multiple times carry out Function Fitting approaches,
The WCET that extreme value is obtained is sought, the same limitation with dynamic measurement method.
2) in 2006, Hu Minghua, Tang Mingduan are at document " static predictor of the program execution time based on distribution function "
Being simulated for 8087 instruction operation times with probability distribution for middle proposition, simulates whole program with normal distribution after progress instruction superposition and holds
The method of row time.However, this method, which needs to treat in advance analysis program, carries out many pretreatments, such as Do statement according to
The expansion of circulation maximum times, branch judge sentence be then divided into two, case statement be then divided into branched etc., this is to a certain extent
Its applicability and automation property are limited, particularly with large-scale engineering process, it is necessary to substantial amounts of human resources, with very big
Limitation.In addition, this method has used for reference programme evaluation and review technique (PERT) thought, however, the document is using traditional
PERT methods, the drawbacks of its traditional PERT method has very big in itself, essentially consist in the not smart of beta estimation of distribution parameters method
True property.
3) in 2010, Zhang Baomin, Wu Guowei et al. are carried in document " the worst execution time statistics of extremes method of program "
The measured value of the use program execution time gone out sets up the worst statistics mould of program execution time as sample using Gumble distributions
Type, so as to predict WCET method.But this method still needs operation program and obtains measurement samples, with dynamic measurement method
Limitation.
To sum up analyze, although current WCET analysis methods are using Static Analysis Method, and obtained from the angle analysis of probability
WCET, has got around the modeling of the characteristics such as the bottom hardware of complexity, has simplified WCET evaluation methods, but the Static Analysis Method is also
It is not pure static analysis, it is necessary to operation program obtains the measurement samples of execution time in advance, is then forced with probability distribution
Closely, so that the WCET of Prediction program, a kind of Mixed method at last, therefore with it is very big the drawbacks of.What Hu Minghua et al. was proposed
Method is more to the artificial pretreatment of program in advance, it is impossible to realizes automated analysis, and uses traditional PERT technologies, with very
Big limitation.
The content of the invention
It is an object of the invention to propose a kind of the worst execution time WCET method for quick estimating based on distribution function, with
Solution needs the problem of the drawbacks of operation program obtains test sample and excessive manual intervention and tradition PERT skills in the prior art
The irrationality problem of beta estimation of distribution parameters method in art.
To achieve the above object, technical scheme comprises the following steps:
(1) dis-assembling file F is obtained by carrying out dis-assembling to DSP engineering objectives code (out files);
(2) dis-assembling file F is analyzed, each basic block divided is obtained, obtains the basic set of blocks B of program;
(3) relation in basic set of blocks B between each basic block, construction procedures flow graph C are recognized;
(4) the execution time T of each basic block is calculated;
(5) basic block is performed to time T and basic block performs the programming flowchart Cw that number of times Ts is weighted as weights;
(6) the programming flowchart Cw of analysis weighting, obtains the maximum path of total weight value, using maximum total weight value as program most
Bad execution time WCET.
The invention has the advantages that:
1. the present invention carries out static analysis to DSP engineerings assembly code, obtained most in the case where DSP programs need not be run
The bad execution time, overcoming needs the drawbacks of operation program obtains measurement samples in conventional method, convenient to carry out, simple to operate;
2. the present invention is bypassed the bottom hardware characteristic of complexity, solved using the method estimation WCET based on distribution function
The problem of needing to be modeled bottom hardware characteristic in conventional method, has the advantages that to be easily achieved;
3. the present invention automates the execution of each node in constructor flow graph, analysis program flow graph using basic block concept
Time and the path situation of programming flowchart, obtain the WCET of program in the situation of less manual intervention, solve in conventional method
The problem of needing a large amount of manual interventions;
4. the present invention uses improved PERT technologies, beta estimation of distribution parameters method in traditional PERT technologies is solved
Irrationality problem so that the estimation that basic block performs the time is more accurate.
Brief description of the drawings
Fig. 1 realizes flow chart for the present invention's.
Embodiment
The present invention is described in detail referring to the drawings.
Reference picture 1, of the invention to implement step as follows:
Step one, DSP engineering dis-assembling files are read:
The file destination obtained using TI disassemblers to DSP engineering compilings i.e. out files are carried out dis-assembling and obtained
The dis-assembling file of the engineering.
Step 2, it is that the basic block shown in Fig. 1 is divided to obtain the basic block divided:
The rule divided according to DSP engineering dis-assembling document characteristics and basic block, analyzes dis-assembling file, is drawn line by line
Each basic block divided, is comprised the following steps that:
2.1) entry statement of basic block is judged
Progressively scan dis-assembling file, judge its whether be basic block entry statement, specific judgment criterion is:1. program
First statement;2. the sentence that conditional branch statement or unconditional branch sentence can be transferred to;3. turn immediately condition
The sentence moved behind sentence;4. the sentence behind unconditional branch sentence.If meeting one of condition above, it is determined as
Basic block entry statement, while recording basic block entry statement corresponding address in dis-assembling file.
Be mainly reflected in that B is instructed in TI C6000 series DSP assembly instruction Transfer Statements, such as, [!A1]B.S1
0x00058 sentences are conditional branch statement, if the meaning that the sentence is represented, which is A1, is equal to 0, the sentence is performed, and is not otherwise held
OK;B.S1 0x00110 sentences are unconditional branch sentence, and expression unconditionally performs the sentence.For B.S1 0x00110 languages
Sentence, searches for 0x00110 values in dis-assembling file, using its corresponding assembly statement as the entry statement of basic block, simultaneously will
A sentence behind the sentence as another basic block entry statement.According to this DSP assembly instructions feature and combine base
This block entrance sentence decision criteria, just can be determined that the entry statement of each basic block in dis-assembling file.
2.2) exit statement of basic block is judged
Dis-assembling file is analyzed line by line, basic block exit statement is determined as if it meets following one of both, is remembered simultaneously
The basic block exit statement corresponding address in dis-assembling file is recorded, the wherein specific decision criteria of basic block exit statement is:
1. that sentence before next basic block entry statement;2. the termination statement of assembly code.
2.3) basic block scope is determined
Basic block is made up of the entry statement to the assembly statement sequence exit statement.Determine basic block scope it
Afterwards, and to each basic block successively marked as 1,2,3 ... n, n >=1.
The basic number of blocks obtained in view of dividing is not known, and for the ease of storing and managing, the present invention uses single linked list
Structure definition, storage basic block and its relevant information, mainly include basic block label, the corresponding address of basic block entry statement and
The corresponding address of exit statement.
Step 3, obtains the programming flowchart shown in Fig. 1:
According to the information such as obtained basic block and its label are divided, the relation between basic block can be obtained, so as to obtain
The programming flowchart of assembly code.
Determine that the relation between basic block is mainly and judge whether reachable, basic block if reachable between each basic block
Between there is relation, otherwise in the absence of relation, its specific determination methods is as follows:
If 3.1) basic block i exit statement is jump statement (condition or unconditional branch sentence), and the transfer
The destination address of sentence is equal to the basic block j corresponding address of entry statement, then i can reach j;
3.2) if basic block i exit statement is conditional branch statement, and the corresponding address of the exit statement adds 4 and is equal to
The basic block k corresponding address of entry statement, then i can reach k;
3.3) if basic block i exit statement is unconditional branch sentence, and the corresponding address of the exit statement adds 4
In the corresponding address of basic block k entry statement, then i can reach k, but now basic block k after basic block i, basic block j
Perform;
If 3.4) basic block i exit statement is not jump statement (condition or unconditional branch sentence), and the base
The corresponding address of exit statement of this block add 4 be equal to basic block m the corresponding address of entry statement, then i can reach m.
By determination methods above, each relation cavity between just can be determined, and it is adjacent with being based in data structure
Storage is described in the digraph for connecing table, using basic block as each node in digraph, just can obtain programming flowchart.
Step 4, calculates the basic block shown in Fig. 1 and performs the time:
According to obtained basic block and its information is divided, static state estimation basic block performs the time, and its basic thought is:From general
Rate angle is set out, and the run time for macroscopically holding program is interval, the bottom hardware characteristic of complexity is bypassed, using improved plan
Evaluation technology PERT simulates every instruction operation time desired value and variance, according to central-limit theorem, carries out after instruction superposition
The run time of whole basic block is simulated with normal distribution.However, also needing to consider the parallel of instruction before instruction superposition is carried out
Situation, the present invention takes time for each instruction maximum in parallel instruction as the final execution time of this several parallel instructions, enters
And participate in instruction superposition.Implementing step is:
4.1) the desired value μ of every instruction operation time is calculatediAnd variances sigmai 2
The present invention is according to programme evaluation and review technique PERT thought, to every DSP assembly instructions run time with improved meter
Draw Evaluation technology PERT simulations and obtain its desired value and variance, i.e., calculate every using Perry-Greig desired value approximate formulas
The desired value μ of DSP instruction operation timesi, when calculating every DSP instruction operation using Person-Turkry variance approximate formulas
Between variances sigmai 2, specific formula for calculation is respectively:
μi=0.630mi+0.185(bi+ai),
σi 2=0.630 (mi-ui)2+0.185[(bi-ui)2+(ai-ui)2],
In formula, biRepresent every instruction operation time peak value, aiRepresent every instruction operation time valley, miRepresent every
The most probable value of instruction operation time, takes according to experimental analysisIt is [1-N] that i, which takes span, and N refers to for basic block
Make bar number;
4.2) parallel instruction is screened
The instruction performed parallel is there may be in basic block, it is necessary to analyze instruction-parallelism, so that estimating
It is more accurate that the basic block of calculation performs the time.The desired value μ of the every instruction operation time obtained according to step 4.2iAnd variance
σi 2, and the parallel situation of combined command, screen and obtain the final command information for participating in instruction superposition, be specially:
Fj=max (t1,L,tk,L,t8),
Wherein, tkEach parallel execution time for performing kth bar instruction in block in basic block is represented, k spans are [1-
8], because can only at most there is 8 executing instructions in TI DSP, max is to take maxima operation, tk=Ak+2Sk, AkFor simultaneously
Row performs the desired value of the execution time instructed in block in kth bar instruction correspondence basic block, SkRefer to for kth bar in parallel execution block
The variance of the execution time instructed in order correspondence basic block, FjEach parallel execution time for performing block in basic block is represented, j's
Span is [1-M], and M represents the parallel execution block number included in basic block.
4.3) calculate basic block and perform time average μ and variances sigma2, specific computing formula is respectively:
Wherein μjRepresent correspondence FjThe instruction operation time desired value, σ2 jRepresent correspondence FjThe instruction operation time side
Difference.
4.4) obtain basic block and perform time T
Try to achieve after average and variance that basic block performs the time, preset time t, it is possible to calculate P (T '≤t) is that is, basic
Block performs the probability for the time being not more than a certain set-point.
For normal distribution X:N(μ,σ2), there is the following fact:
P (t≤μ+σ)=84.15%,
P (σ of t≤μ+2)=97.7%,
P (σ of t≤μ+3)=99.85%,
This example takes the σ of T=μ+2 as the execution time of basic block.
Step 5, obtains the weighting process flow graph shown in Fig. 1:
The worst execution time (WCET) of program is not only related to the execution route of program, during execution also with basic block
Between it is relevant with number of times is performed, need to be the execution route and basic block of program so accurately to obtain the worst execution time of program
The execution time and perform number of times be combined.The present invention based on this reason construct using basic block perform the time and execution number of times as
The weighting process flow graph of weights, wherein basic block, which perform number of times, needs artificial estimation in advance to determine.Concrete methods of realizing is to obtain
To programming flowchart in be each basic block addition execution time and perform number information, i.e. each basic block in programming flowchart
Add basic block in storage organization to perform the time and perform number information, so as to obtain weighting process flow graph.
Step 6, calculates the worst execution time WCET
The weighting process flow graph shown in Fig. 1 is constructed, i.e., after weighted digraph, just can utilize some of digraph
Processing method obtains required information.The present embodiment utilizes path search algorithm, and the total weight value found shown in a Fig. 1 is maximum
Path, then its to perform time most long, and the total weight value on this path is implemented into step as follows as the WCET of program:
6.1) each paths of weighting process flow graph are obtained using depth-priority-searching method, specific method is:
6.1.1 the starting point and ending point of programming flowchart) is determined, specific determination methods are:Starting point is programming flowchart
First basic block, the i.e. basic block marked as 1;Terminating point be programming flowchart whole basic block adjacency list in out-degree be 0
Basic block;
6.1.2) by starting point stacking, and it is set to access;
Whether be terminating point, if then performing step 6.1.4 if 6.1.3) judging stack top node), otherwise perform step
6.1.5);
6.1.4 element in stack) is preserved, the node that as path is included performs step 6.1.6);
6.1.5) check that stack top node, either with or without node that is follow-up and not accessing, selects one of them and entered if having
Stack, and be set to access, perform step 6.1.3), otherwise perform step 6.1.6);
6.1.6) check that whether element is empty in stack, if so, then terminating to perform, otherwise, stack top node is popped, and sets
Not access, step 6.1.5 is performed);
6.2) the execution time on per paths is calculated, circular is:Use each on per paths basic first
The execution time of block is multiplied by its correspondence basic block and performs number of times, and then add up summation, that is, obtains the execution time on the paths;
6.3) maximum for finding the execution time on all paths is the maximum execution time shown in Fig. 1, and the maximum is held
The row time is the WCET of program.
To sum up, it is not difficult to find out, by carrying out static analysis to DSP engineerings assembly code, the feelings of DSP programs need not be being run
The worst execution time is obtained under condition, overcoming needs the drawbacks of operation program obtains measurement samples in conventional method, convenient to carry out,
It is simple to operate;WCET is estimated using the method based on distribution function, the bottom hardware characteristic of complexity is bypassed, solves conventional method
In the problem of need to be modeled to bottom hardware characteristic, have the advantages that to be easily achieved;Automated and constructed using basic block concept
The path situation for performing time and programming flowchart of each node in programming flowchart, analysis program flow graph, in less manual intervention
Situation obtain the WCET of program, solve the problem of needing a large amount of manual interventions in conventional method;Using improved PERT skills
Art, solves the problems, such as the irrationality of beta estimation of distribution parameters method in traditional PERT technologies so that basic block performs the time
Estimation it is more accurate.
Claims (7)
1. a kind of the worst execution time WCET method for quick estimating based on distribution function, it is characterised in that comprise the following steps:
1) DSP engineering dis-assembling files, are read:The file destination obtained using TI disassemblers to DSP engineering compilings is entered
Row dis-assembling obtains the dis-assembling file F of the DSP engineerings;
2) the basic set of blocks B divided, is obtained:
The rule divided according to DSP dis-assemblings document characteristic and basic block, analyzes dis-assembling file F, what is divided is each line by line
Individual basic block, obtains the basic set of blocks B of program;
3) relation in basic set of blocks B between each basic block, construction procedures flow graph C, are recognized;
4) the execution time T of each basic block, is calculated;
5), basic block is performed to time T and basic block performs the programming flowchart Cw that number of times Ts is weighted as weights;
6), the programming flowchart Cw of analysis weighting, obtains the maximum path of total weight value, maximum total weight value is held as program is the worst
Row time WCET;
The step 4) detailed process be:
4.1) the desired value μ of every instruction operation time is calculatediAnd variances sigmai 2
According to programme evaluation and review technique PERT, to every DSP assembly instructions run time with improved programme evaluation and review technique PERT moulds
Plan obtains its desired value and variance, i.e., calculate every DSP instruction operation time using Perry-Greig desired value approximate formulas
Desired value μi, the variances sigma of every DSP instruction operation times is calculated using Person-Turkry variance approximate formulasi 2, specific meter
Calculating formula is respectively:
μi=0.630mi+0.185(bi+ai),
σi 2=0.630 (mi-ui)2+0.185[(bi-ui)2+(ai-ui)2],
In formula, biRepresent every instruction operation time peak value, aiRepresent every instruction operation time valley, miRepresent every instruction
The most probable value of run time, takes according to experimental analysisIt is [1-N] that i, which takes span, and N is basic block instruction bar
Number;
4.2) parallel instruction is screened
The instruction performed parallel is there may be in the basic block, it is necessary to analyze instruction-parallelism, so that estimating
The basic block of calculation performs that the time is more accurate, according to step 4.1) the desired value μ of every instruction operation time that obtainsiAnd variance
σi 2, and the parallel situation of combined command, screen and obtain the final command information for participating in instruction superposition, be specially:
Fj=max (t1,L,tk,L,t8),
Wherein, tkEach parallel execution time for performing kth bar instruction in block in basic block is represented, k spans are [1-8], because
Can only at most to there is 8 executing instructions in TI DSP, max is to take maxima operation, tk=Ak+2Sk, AkTo hold parallel
The desired value of the execution time instructed in row block in kth bar instruction correspondence basic block, SkKth bar instruction pair in block is performed to be parallel
Answer the variance of the execution time instructed in basic block, FjRepresent each parallel execution time for performing block, j value in basic block
Scope is [1-M], and M represents the parallel execution block number included in basic block;
4.3) calculate basic block and perform time average μ and variances sigma2, specific computing formula is respectively:
Wherein μjRepresent correspondence FjThe instruction operation time desired value, σ2 jRepresent correspondence FjThe instruction operation time variance;
4.4) obtain basic block and perform time T
Try to achieve after average and variance that basic block performs the time, preset time t, it is possible to calculate P (T '≤t), i.e., basic block is held
The row time is not more than the probability of a certain set-point;
For normal distribution X:N(μ,σ2), there is the following fact:
P (t≤μ+σ)=84.15%,
P (σ of t≤μ+2)=97.7%,
P (σ of t≤μ+3)=99.85%;
This example takes the σ of T=μ+2 as the execution time of basic block.
2. the worst execution time WCET method for quick estimating as claimed in claim 1 based on distribution function, it is characterised in that:
The step 2) detailed process be:
2.1) entry statement of each basic block in basic set of blocks B is judged:
A line assembly code is read since the dis-assembling file F the first rows, whether judge the row is that basic block enters spoken language
Sentence, if it is, the row to be determined as to the entry statement of the basic block, while recording the basic block entry statement described anti-
Corresponding address in assembling file F;Otherwise, continue to read analysis next line until file F terminates;
2.2) exit statement of each basic block in basic set of blocks B is judged:A line is read since dis-assembling file F the first rows to converge
Code is compiled, judges whether it is the exit statement of basic block, if it is, recording the basic block exit statement in dis-assembling text
Corresponding address in part F;Otherwise, continue to read analysis next line until file F terminates;
2.3) each basic block scope is determined:
The basic block is made up of the entry statement to the assembly statement sequence the exit statement, determines each basic block
Scope after, and to each basic block successively marked as 1,2,3 ... n, n >=1;So far, basic set of blocks B is obtained.
3. the worst execution time WCET method for quick estimating as claimed in claim 1 based on distribution function, it is characterised in that:
The step 3) detailed process be:The basic block that is obtained according to division, basic block label, basic block entry statement are correspondingly
Location and the corresponding address of exit statement, obtain the relation between each basic block, so as to obtain the programming flowchart of assembly code;
Determine that the relation between each basic block is mainly and judge whether reachable between each basic block, if up to if the basic block it
Between there is relation, otherwise in the absence of relation, its specific determination methods is as follows:
3.1) if basic block i exit statement is jump statement, and the destination address of the jump statement is equal to entering for basic block j
The corresponding address of spoken sentence, then i can reach j;
3.2) if basic block i exit statement is conditional branch statement, and the corresponding address of the exit statement adds 4 equal to basic
The block k corresponding address of entry statement, then i can reach k;
3.3) if basic block i exit statement is unconditional branch sentence, and the corresponding address of the exit statement adds 4 equal to base
This block k corresponding address of entry statement, then i can reach k, but now basic block k is held after basic block i, basic block j
OK;
3.4) if basic block i exit statement is not jump statement, and the corresponding address of exit statement of the basic block adds 4
In the corresponding address of basic block m entry statement, then i can reach m;
Thus, the relation between each basic block is just can determine that, and is retouched with the digraph based on adjacency list in data structure
Storage is stated, using each basic block as each node in digraph, programming flowchart C is just obtained.
4. the worst execution time WCET method for quick estimating as claimed in claim 1 based on distribution function, it is characterised in that:
The step 5) detailed process be, using basic block perform the time and perform number of times as weights weighting process flow graph Cw, wherein
Basic block, which performs number of times, needs artificial estimation in advance to determine that concrete methods of realizing is:Stored in programming flowchart C each basic block
Add basic block in structure to perform the time and perform number information, so as to obtain weighting process flow graph Cw.
5. the worst execution time WCET method for quick estimating as claimed in claim 1 based on distribution function, it is characterised in that:
The step 6) detailed process be:
6.1) weighting process flow graph Cw each paths are obtained using depth-priority-searching method, specific method is:
6.1.1 the starting point and ending point of programming flowchart) is determined, specific determination methods are:Starting point is the first of programming flowchart
Individual basic block, the i.e. basic block marked as 1;Terminating point be programming flowchart whole basic block adjacency list in out-degree be 0 it is basic
Block;
6.1.2) by starting point stacking, and it is set to access;
Whether be terminating point, if then performing step 6.1.4 if 6.1.3) judging stack top node), otherwise perform step 6.1.5);
6.1.4 element in stack) is preserved, the node that as path is included performs step 6.1.6);
6.1.5) check that stack top node, either with or without node that is follow-up and not accessing, selects one of them and by its stacking if having,
And be set to access, perform step 6.1.3), otherwise perform step 6.1.6);
6.1.6) check that whether element is empty in stack, if so, then terminating to perform, otherwise, stack top node is popped, and is set to not
Access, perform step 6.1.5);
6.2) the execution time on per paths is calculated, circular is:Each basic block on per paths is used first
The execution time is multiplied by its correspondence basic block and performs number of times, and then add up summation, that is, obtains the execution time on the paths;
6.3) WCET of maximum, as program that the time is performed on all paths is found.
6. the worst execution time WCET method for quick estimating as claimed in claim 1 based on distribution function, it is characterised in that:
The judgment criterion of the entry statement of the basic block is:1. the first statement of program;2. conditional branch statement or unconditional
The sentence that jump statement can be transferred to;3. the sentence behind conditional branch statement;4. immediately unconditional branch language
Sentence behind sentence;
If meeting one of above-mentioned condition, it is determined as basic block entry statement.
7. the worst execution time WCET method for quick estimating as claimed in claim 1 based on distribution function, it is characterised in that:
The judgment criterion of the exit statement of the basic block is:1. that sentence before next basic block entry statement;2. collect
The termination statement of code, if each row meets any one in two conditions in the i.e. dis-assembling file F of scanning analysis, recognizes
For the exit statement that it is basic block.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510009091.XA CN104572103B (en) | 2015-01-08 | 2015-01-08 | A kind of the worst execution time WCET method for quick estimating based on distribution function |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510009091.XA CN104572103B (en) | 2015-01-08 | 2015-01-08 | A kind of the worst execution time WCET method for quick estimating based on distribution function |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104572103A CN104572103A (en) | 2015-04-29 |
CN104572103B true CN104572103B (en) | 2017-07-11 |
Family
ID=53088269
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510009091.XA Expired - Fee Related CN104572103B (en) | 2015-01-08 | 2015-01-08 | A kind of the worst execution time WCET method for quick estimating based on distribution function |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104572103B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105677521B (en) * | 2015-12-29 | 2019-06-18 | 东南大学苏州研究院 | A kind of benchmark synthetic method towards mobile intelligent terminal processor |
CN109558141B (en) * | 2018-11-28 | 2022-05-13 | 北京东土科技股份有限公司 | Method and device for determining worst execution time WCET and readable medium |
CN109800171A (en) * | 2019-01-25 | 2019-05-24 | 上海创景信息科技有限公司 | The worst time analysis system and method based on hybrid analysis |
CN112905224B (en) * | 2019-12-04 | 2024-04-30 | 阿里巴巴集团控股有限公司 | Time-consuming determination method, device and equipment for code review |
CN111967144A (en) * | 2020-07-28 | 2020-11-20 | 陈本彬 | MPT model node frequency prediction method |
CN114385487A (en) * | 2021-12-17 | 2022-04-22 | 斑马网络技术有限公司 | Execution time processing method and device and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2425622A (en) * | 2005-04-27 | 2006-11-01 | Ncapsa Ltd | Programming real-time systems using data flow diagrams |
CN103207772A (en) * | 2013-04-07 | 2013-07-17 | 北京航空航天大学 | Instruction prefetching content selecting method for optimizing WCET (worst-case execution time) of real-time task |
-
2015
- 2015-01-08 CN CN201510009091.XA patent/CN104572103B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2425622A (en) * | 2005-04-27 | 2006-11-01 | Ncapsa Ltd | Programming real-time systems using data flow diagrams |
CN103207772A (en) * | 2013-04-07 | 2013-07-17 | 北京航空航天大学 | Instruction prefetching content selecting method for optimizing WCET (worst-case execution time) of real-time task |
Non-Patent Citations (5)
Title |
---|
"实时程序WCET分析模型与算法";江华;《中国优秀硕士论文学位论文全文数据库 信息科技编》;20100515;第2010年卷(第05期);第4.1节,图4.1 * |
汤森森."任务最坏执行时间分析与任务调度检测仿真工具的实现".《中国优秀硕士论文学位论文全文数据库 信息科技编》.2013,第2013年卷(第01期), * |
胡明华等."基于分布函数的程序执行时间的静态预估".《计算机工程与设计》.2006,第27卷(第16期), * |
赵修伟."基于抽象解释的实时软件WCET研究".《中国优秀硕士论文学位论文全文数据库 信息科技编》.2010,第2010年卷(第07期), * |
黎嘉翰."基于抽象分析的最坏执行时间分析技术".《中国优秀硕士论文学位论文全文数据库 信息科技辑》.2014,第2014年卷(第01期), * |
Also Published As
Publication number | Publication date |
---|---|
CN104572103A (en) | 2015-04-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104572103B (en) | A kind of the worst execution time WCET method for quick estimating based on distribution function | |
Hamadi et al. | Seven challenges in parallel SAT solving | |
US11068817B2 (en) | Artificial intelligence and machine learning based project management assistance | |
Mentis | Hypothetico-deductive and inductive approaches in ecology | |
Garcia et al. | Robust combination of the Morris and Sobol methods in complex multidimensional models | |
Branke et al. | Evolutionary search for difficult problem instances to support the design of job shop dispatching rules | |
NAIKAN | Review of simulation approaches in reliability and availability modeling | |
CN112632179B (en) | Model construction method, device, storage medium and equipment | |
CN106469114A (en) | A kind of Parallel Computing Performance detecting system towards communication test and its method | |
Dias-Neto et al. | Supporting the combined selection of model-based testing techniques | |
Schumi et al. | Checking response-time properties of web-service applications under stochastic user profiles | |
Tahvili et al. | Towards execution time prediction for manual test cases from test specification | |
Siddique et al. | Hybrid Framework To Exclude Similar and Faulty Test Cases In Regression Testing | |
Liu et al. | The Why, When, What, and How About Predictive Continuous Integration: A Simulation-Based Investigation | |
Barrero et al. | On the statistical distribution of the expected run-time in population-based search algorithms | |
Neubauer | Development and evaluation of management procedures in pāua quota management areas 5A, 5B and 5D | |
Elzamly et al. | Quantitative and intelligent risk models in risk management for constructing software development projects: a review | |
Thirasakthana et al. | Identifying standard testing time for estimation improvement in IT project management | |
Wu et al. | A dynamically-weighted software reliability combination model | |
Artés et al. | Core allocation policies on multicore platforms to accelerate forest fire spread predictions | |
Sharma et al. | Simplified Agile Software Project Selection Model Using Natural Language Processing Based Upon Agile Team Skills | |
Gois et al. | A multi-objective metaheuristic approach to search-based stress testing | |
Koltraka | A Comparison Between Discrete And Continuous Emission Distributions In Hidden Markov Models Of Execution Times. | |
Mohamed et al. | Cross-project Reopened Pull Request Prediction in GitHub. | |
Weiss et al. | Realtime gray-box algorithm configuration |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20170711 Termination date: 20190108 |
|
CF01 | Termination of patent right due to non-payment of annual fee |