CN104572103A - Distribution function-based WCET (Worst Case Execution Time) quick estimation method - Google Patents

Distribution function-based WCET (Worst Case Execution Time) quick estimation method Download PDF

Info

Publication number
CN104572103A
CN104572103A CN201510009091.XA CN201510009091A CN104572103A CN 104572103 A CN104572103 A CN 104572103A CN 201510009091 A CN201510009091 A CN 201510009091A CN 104572103 A CN104572103 A CN 104572103A
Authority
CN
China
Prior art keywords
fundamental block
statement
execution time
block
fundamental
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.)
Granted
Application number
CN201510009091.XA
Other languages
Chinese (zh)
Other versions
CN104572103B (en
Inventor
赖晓玲
郭宝龙
高翔
闫允一
王健
张西南
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xidian University
Xian Institute of Space Radio Technology
Original Assignee
Xidian University
Xian Institute of Space Radio Technology
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 Xidian University, Xian Institute of Space Radio Technology filed Critical Xidian University
Priority to CN201510009091.XA priority Critical patent/CN104572103B/en
Publication of CN104572103A publication Critical patent/CN104572103A/en
Application granted granted Critical
Publication of CN104572103B publication Critical patent/CN104572103B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention provides a distribution function-based WCET (Worst Case Execution Time) quick estimation method. The method comprises the following steps: disassembling a DSP (Digital Signal Processor) project objective code (out file) to obtain a disassembled file F; analyzing the disassembled file F to acquire each divided basic block to obtain a basic block set B of a program; recognizing relation between every two basic blocks in the basic block set B to construct a program flow graph C; calculating execution time T of each basic block; obtaining weighted program flow graph Cw by weighting the basic block execution time T and the basic block execution frequency Ts; analyzing the weighted program flow graph Cw to obtain a path with the maximum total weight value and taking the maximum total weight value as the WCET. The defect that a program is required to be operated to obtain a test sample in the prior art is overcome, and the problems of more manual intervention and irrationality of a beta distribution parameter estimation method in the conventional PERT (Program Evaluation and Review Technique) are solved.

Description

A kind of WCET method for quick estimating based on distribution function
Technical field
The invention belongs to real-time embedded software field, in particular to the worst execution time based on distribution function a kind of in TI DSP technology (WCET:Worst-Case Execution Time) method for quick estimating, can be used for the worst execution time assessing DSP engineering code or code snippet.
Background technology
In real-time embedded software system, system has stricter requirement to the time, the correctness of system is not only relevant with the logic of its program, also relevant with its time response, only have the task of completing regulation to be at the appointed time only effectively, otherwise the reduction even failure of system of this system performance can be caused.Therefore, in prior acquisition system, the worst execution time (WCET) time series analysis etc. to real-time system of each task has great importance.
At present, WCET analyzes and mainly comprises 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 procedure of working procedure, and then analysis obtains WCET, but there is very large drawback in the method, first the method needs target machine, need actual operation procedure and need a large amount of experiments, labor intensive, material resources, financial resources, and at space flight, aviation field, in a lot of situation can not target machine environment that is virtually reality like reality or target machine expensive, and higher to requirement of real-time, untested program can not be allowed to run on real target machine.In addition, the method is difficult to ensure that it is safe for measuring the result obtained, and namely cannot ensure not underestimate the poorest execution time, because be difficult to ensure that the actual measurement done meets the condition of program WCET, for modern processors, this puts more difficult accomplishing.
The method that Mixed method combines by static analysis method and dynamic measurement method, the method is specifically divided into two kinds of situations, one first carries out static analysis to program, namely static analysis method is used to analyze, then according to the result of static analysis method, testing results is carried out to program, finally determine the WCET of program; Another kind first adopts dynamic measurement method to carry out test analysis to program, then on the basis of dynamic measurement method, carries out static analysis, and then determine the WCET of program.
No matter adopt which kind of method, Mixed method, in the advantage comprising static analysis method and dynamic measurement method, also comprises their respective shortcoming, and Mixed method more complicated.
Static analysis method obtains the WCET of program by theoretical analysis estimation, and the method not only can obtain result of calculation when not working procedure, and can ensure that the result obtained is safe, and therefore, this is method conventional at present.
Traditional static analytical approach is generally made up of 3 parts: the 1. control flow analysis of program, the execution route that Main Analysis determination program is possible, maximum cycle and infeasible path etc.; 2. bottom analysis, the main feature considering target machine, such as high-speed cache, streamline, branch prediction etc., object is the time determining that every bar assembly statement or each fundamental block perform; 3. WCET calculates, and according to front two information, uses the WCET of concrete computing method to program to calculate, and main calculation methods is divided into based on the method in path, based on the method for tree and the method for implicit path enumeration.
On the whole, traditional Static Analysis Method is in WCET computation process, the execution time of every bar assembly instruction is carried out treating as determined value, then obtained the WCET of program by certain method, but this value is also determined.
Can see, traditional method does not consider the uncertainty of program execution time, according to the feature of present processor, obviously there is very large drawback in this method, because processor is in order to accelerate a lot of advanced technology of speed employing of computing now, such as cache, streamline, branch prediction etc., make the uncertainty of program execution time more obvious.
Therefore, the working time of program is not certain single value, but the interval value of certain scope.
At present for this way to solve the problem mainly probabilistic method ask WCET, i.e. pWCET, this concept is put forward in 2003 by Guillem Bernat, and fundamental purpose solves the probability distribution problem of the WCET of certain section of code or certain function etc.The document using the method to calculate WCET has been delivered a lot, such as:
1) in 2003, the method in the employing statistical theory of extreme values solver execution time interval that Stefan M Petters proposes.The general thought of the document is, repeatedly working procedure, obtains a lot of program runtime values, then approaches with Gumble probability function, ask for program runtime extreme value, be WCET value.Analyze this document, can be easy to find out, the static analysis that this kind of method can not be pure at last, because it carries out Function Fitting to the time value that repeatedly working procedure obtains to approach, asks the WCET that extreme value obtains, has the limitation of dynamic measurement method equally.
2) in 2006, what Hu Minghua, Tang Mingduan proposed in document " static predictor based on the program execution time of distribution function " simulated for 8087 instruction operation times by probability distribution, simulated the method for whole program execution time after carrying out instruction superposition with normal distribution.But, the method needs to treat routine analyzer in advance and carries out a lot of pre-service, such as loop statement launches according to circulation maximum times, branch judges that statement is then divided into two, case statement is then divided into branched etc., this limits its applicability and automatic voltinism to a certain extent, especially for large-scale engineering process, need a large amount of human resources, there is significant limitation.In addition, the method has used for reference the thought of programme evaluation and review technique (PERT), but the document adopts traditional PERT method, and its conventional P ERT method itself has very large drawback, is mainly the inexactness of beta estimation of distribution parameters method.
3) in 2010, the measured value of the employing program execution time that the people such as Zhang Baomin, Wu Guowei propose in document " program the worst execution time statistics of extremes method " is as sample, utilize Gumble distribution creation facilities program (CFP) execution time the worst statistical model, thus the method for prediction WCET.But the method still needs working procedure to obtain measurement samples, has the limitation of dynamic measurement method.
To sum up analyze, although current WCET analytical approach adopts Static Analysis Method, and obtain WCET from the angle analysis of probability, get around the modeling of the characteristics such as complicated bottom hardware, simplify WCET evaluation method, but this Static Analysis Method is not also pure static analysis, need prior working procedure to obtain the measurement samples of execution time, then approach by probability distribution, thus the WCET of predictor, a Mixed method at last, therefore has very large drawback.The method that the people such as Hu Minghua propose is more to the artificial pre-service of program in advance, can not realize automated analysis, and adopt traditional PERT technology, have significant limitation.
Summary of the invention
The object of the invention is to propose a kind of WCET method for quick estimating based on distribution function, to solve in prior art the irrationality problem needing working procedure to obtain beta estimation of distribution parameters method in the drawback of test sample book and the too much problem of manual intervention and conventional P ERT technology.
For achieving the above object, technical scheme of the present invention comprises the steps:
(1) dis-assembling file F is obtained by carrying out dis-assembling to DSP engineering objective code (out file);
(2) analyze dis-assembling file F, obtain each fundamental block divided, obtain the fundamental block set B of program;
(3) relation in identification fundamental block set B between each fundamental block, construction procedures flow graph C;
(4) the execution time T of each fundamental block is calculated;
(5) fundamental block execution time T and fundamental block are performed number of times Ts obtains weighting programming flowchart Cw as weights;
(6) analyze the programming flowchart Cw of weighting, obtain the path that total weight value is maximum, using maximum total weight value as the worst execution time WCET of program.
Tool of the present invention has the following advantages:
1. the present invention carries out static analysis to DSP engineering assembly code, obtaining the worst execution time, overcoming in classic method the drawback needing working procedure to obtain measurement samples when without the need to running DSP program, is convenient to implement, simple to operate;
2. the present invention adopts the method estimation WCET based on distribution function, walks around complicated bottom hardware characteristic, solves in classic method the problem needing bottom hardware characteristic to be carried out to modeling, have the advantage being easy to realize;
3. the present invention utilizes fundamental block concept robotization constructor flow graph, the execution time of each node and the path situation of programming flowchart in routine analyzer flow graph, obtain the WCET of program in the situation of less manual intervention, solve in classic method the problem needing a large amount of manual intervention;
4. the present invention adopts the PERT technology of improvement, solves the irrationality problem of beta estimation of distribution parameters method in conventional P ERT technology, makes the estimation of fundamental block execution time more accurate.
Accompanying drawing explanation
Fig. 1 is realization flow figure of the present invention.
Embodiment
Referring to accompanying drawing, the present invention is described in detail.
With reference to Fig. 1, specific implementation step of the present invention is as follows:
Step one, reads DSP engineering dis-assembling file:
The file destination utilizing the disassemblers of TI to obtain DSP engineering compiling and out file carry out the dis-assembling file that dis-assembling obtains this project.
Step 2, obtains the fundamental block and the fundamental block division shown in Fig. 1 that divide:
According to the rule that DSP engineering dis-assembling document characteristic and fundamental block divide, analyze dis-assembling file line by line, obtain each fundamental block divided, concrete steps are as follows:
2.1) entry statement of fundamental block is judged
Line by line scan dis-assembling file, judge that whether it is the entry statement of fundamental block, concrete judgment criterion is: the 1. first statement of program; 2. the statement that can transfer to of conditional branch statement or unconditional transfer statement; 3. immediately following the statement after conditional branch statement; 4. immediately following the statement after unconditional transfer statement.If meet one of condition above, be then judged to be fundamental block entry statement, record fundamental block entry statement address corresponding in dis-assembling file simultaneously.
Be B instruction at TI C6000 series DSP assembly instruction Transfer Statement major embodiment, such as, [! A1] B.S1 0x00058 statement is conditional branch statement, if the meaning that this statement represents equals 0 for A1, then this statement performs, otherwise does not perform; B.S1 0x00110 statement is unconditional transfer statement, represents unconditional and performs this statement.For B.S1 0x00110 statement, in dis-assembling file, search for 0x00110 value, using the entry statement of the assembly statement of its correspondence as fundamental block, simultaneously using the entry statement of the statement of after this statement as another fundamental block.In conjunction with fundamental block entry statement decision criteria, the entry statement of each fundamental block in dis-assembling file just can be judged according to this DSP assembly instruction feature.
2.2) exit statement of fundamental block is judged
Analyze dis-assembling file line by line, if both is judged to be fundamental block exit statement first below it is satisfied, record the address that this fundamental block exit statement is corresponding in dis-assembling file, wherein the concrete decision criteria of fundamental block exit statement is: that statement 1. before next fundamental block entry statement simultaneously; 2. the termination statement of assembly code.
2.3) fundamental block scope is determined
Fundamental block is made up of the assembly statement sequence this entry statement to exit statement.After determining fundamental block scope, and be 1,2,3 to each fundamental block successively label ... n, n >=1.
Consider that the fundamental block quantity that division obtains is uncertain, for the ease of storing and management, the present invention adopts singly linked list to define, stores fundamental block and relevant information thereof, mainly comprises address corresponding to fundamental block label, fundamental block entry statement and address corresponding to exit statement.
Step 3, obtains the programming flowchart shown in Fig. 1:
The information such as the fundamental block obtained according to division and label thereof, can obtain the relation between fundamental block, thus obtain the programming flowchart of assembly code.
Determine the relation between fundamental block mainly judges whether can reach between each fundamental block, Ruo Keda then exists relation between this fundamental block, otherwise there is not relation, its concrete determination methods is as follows:
3.1) if the exit statement of fundamental block i is jump statement (condition or unconditional transfer statement), and the destination address of this jump statement equals address corresponding to the entry statement of fundamental block j, then i can arrive j;
3.2) if the exit statement of fundamental block i is conditional branch statement, and address corresponding to this exit statement adds 4 equals address corresponding to the entry statement of fundamental block k, then i can arrive k;
3.3) if the exit statement of fundamental block i is unconditional transfer statement, and address corresponding to this exit statement adds 4 equals address corresponding to the entry statement of fundamental block k, then i can arrive k, but now fundamental block k performs after fundamental block i, fundamental block j;
3.4) if the exit statement of fundamental block i is not jump statement (condition or unconditional transfer statement), and address corresponding to the exit statement of this fundamental block adds 4 equals address corresponding to the entry statement of fundamental block m, then i can arrive m.
By determination methods above, just can determine the relation between each substantially, and be described storage with the digraph based on adjacency list in data structure, using fundamental block as each node in digraph, just can obtain programming flowchart.
Step 4, the fundamental block execution time shown in calculating chart 1:
According to dividing the fundamental block and information thereof that obtain, the static estimation fundamental block execution time, its basic thought is: from probability angle, the working time of macroscopically holding program is interval, walk around complicated bottom hardware characteristic, adopt the programme evaluation and review technique PERT improved to simulate every bar instruction operation time expectation value and variance, according to central limit theorem, after carrying out instruction superposition, simulate the working time of whole fundamental block with normal distribution.But also needed the parallel situation considering instruction before carrying out instruction superposition, the present invention gets the final execution time of instruction time maximum in parallel instruction as these several parallel instructions, and then participates in instruction superposition.Specific implementation step is:
4.1) the expectation value μ of every bar instruction operation time is calculated iand variances sigma i 2
The present invention is according to the thought of programme evaluation and review technique PERT, its expectation value and variance are obtained to the programme evaluation and review technique PERT simulation of every bar DSP assembly instruction improvement working time, namely adopts Perry-Greig expectation value approximate formula to calculate the expectation value μ of every bar DSP instruction operation time i, adopt Person-Turkry variance approximate formula to calculate the variances sigma of every bar DSP instruction operation time i 2, specific formula for calculation is respectively:
μ i=0.630m i+0.185(b i+a i),
σ i 2=0.630(m i-u i) 2+0.185[(b i-u i) 2+(a i-u i) 2],
In formula, b irepresent every bar instruction operation time peak value, a irepresent every bar instruction operation time valley, m irepresent the most probable value of every bar instruction operation time, experimentally divide and extract i gets span for [1-N], and N is fundamental block instruction strip number;
4.2) parallel instruction is screened
The instruction of executed in parallel may be there is in fundamental block, need to analyze instruction-parallelism, thus make the fundamental block execution time of estimation more accurate.According to the expectation value μ of every bar instruction operation time that step 4.2 obtains iand variances sigma i 2, the situation and combined command walks abreast, the command information of instruction superposition is finally participated in screening, is specially:
F j=max(t 1,…,t k,…,t 8),
Wherein, t krepresent the execution time of kth bar instruction in each executed in parallel block in fundamental block, k span is [1-8] because 8 executing instructions can only be had at most in TI DSP, max for getting maxima operation, t k=A k+ 2S k, A kfor the expectation value of the execution time of instruction in the corresponding fundamental block of kth bar instruction in executed in parallel block, S kfor the variance of the execution time of instruction in the corresponding fundamental block of kth bar instruction in executed in parallel block, F jrepresent the execution time of each executed in parallel block in fundamental block, the span of j is [1-M], and M represents the executed in parallel block number comprised in fundamental block.
4.3) fundamental block execution time average μ and variances sigma is calculated 2, concrete computing formula is respectively:
μ = Σ 1 M μ j ,
σ 2 = Σ 1 M σ 2 j ;
Wherein μ jrepresent corresponding F jthe expectation value of instruction operation time, σ 2 jrepresent corresponding F jthe variance of instruction operation time.
4.4) fundamental block execution time T is obtained
After the average of trying to achieve the fundamental block execution time and variance, preset time, t, just can calculate P (T '≤ t), namely the fundamental block execution 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(t≤μ+2σ)=97.7%,
P(t≤μ+3σ)=99.85%,
This example gets the execution time of T=μ+2 σ as fundamental block.
Step 5, obtains the weighting process flow graph shown in Fig. 1:
The worst execution time (WCET) of program is not only relevant to the execution route of program, also with execution time of fundamental block with to perform number of times relevant, so the worst execution time of program accurately will be obtained, the execution time of the execution route of program and fundamental block need be combined with execution number of times.The present invention is based on this reason construct with the fundamental block execution time and perform the weighting process flow graph that number of times is weights, wherein fundamental block execution number of times needs are artificial in advance estimates to determine.Concrete methods of realizing is in the programming flowchart obtained, add the execution time for each fundamental block and perform number information, namely in each fundamental block storage organization of programming flowchart, add the fundamental block execution time and perform number information, thus obtaining weighting process flow graph.
Step 6, calculates the worst execution time WCET
Construct the weighting process flow graph shown in Fig. 1, namely after weighted digraph, some disposal routes of digraph just can be utilized to obtain required information.The present embodiment utilizes path search algorithm, and find the path that total weight value shown in a Fig. 1 is maximum, then its execution time is the longest, and using the WCET of the total weight value on this path as program, specific implementation step is as follows:
6.1) utilize depth-priority-searching method to obtain each paths of weighting process flow graph, concrete grammar is:
6.1.1) determine the starting point and ending point of programming flowchart, concrete determination methods is: starting point is first fundamental block of programming flowchart, and namely label is the fundamental block of 1; Terminating point is that in the whole fundamental block adjacency list of programming flowchart, out-degree is the fundamental block of 0;
6.1.2) starting point is stacked, and be set to access;
6.1.3) judge whether stack top node is terminating point, if then perform step 6.1.4), otherwise perform step 6.1.5);
6.1.4) preserve element in stack, be the node that path comprises, perform step 6.1.6);
6.1.5) check that stack top node has the not follow-up and node of not accessing, if having, select one of them and it is stacked, and be set to access, perform step 6.1.3), otherwise perform step 6.1.6);
6.1.6) check that in stack, whether element is empty, if so, then terminates to perform, otherwise, stack top node is popped, and is set to not access, perform step 6.1.5);
6.2) calculate the execution time on every paths, circular is: be first multiplied by its corresponding fundamental block with the execution time of each fundamental block on every paths and perform number of times, then cumulative summation, namely obtains the execution time on this paths;
6.3) find maximal value and the maximum execution time shown in Fig. 1 of execution time on all paths, this maximum execution time is the WCET of program.
To sum up, be not difficult to find out, by carrying out static analysis to DSP engineering assembly code, when without the need to running DSP program, obtain the worst execution time, overcoming in classic method the drawback needing working procedure to obtain measurement samples, be convenient to implement, simple to operate; Adopt the method estimation WCET based on distribution function, walk around complicated bottom hardware characteristic, solve in classic method the problem needing bottom hardware characteristic to be carried out to modeling, there is the advantage being easy to realize; Utilize fundamental block concept robotization constructor flow graph, the execution time of each node and the path situation of programming flowchart in routine analyzer flow graph, obtain the WCET of program in the situation of less manual intervention, solve in classic method the problem needing a large amount of manual intervention; Adopt the PERT technology improved, solve the irrationality problem of beta estimation of distribution parameters method in conventional P ERT technology, make the estimation of fundamental block execution time more accurate.

Claims (8)

1., based on a WCET method for quick estimating for distribution function, it is characterized in that, comprise the following steps:
1) DSP engineering dis-assembling file, is read: utilize the disassemblers of TI to carry out to the file destination that DSP engineering compiling obtains the dis-assembling file F that dis-assembling obtains this DSP engineering;
2) the fundamental block set B divided, is obtained:
According to the rule that DSP dis-assembling document characteristic and fundamental block divide, analyze dis-assembling file F line by line, obtain each fundamental block divided, obtain the fundamental block set B of program;
3) relation, in identification fundamental block set B between each fundamental block, construction procedures flow graph C;
4) the execution time T of each fundamental block, is calculated;
5), fundamental block execution time T and fundamental block are performed number of times Ts obtains weighting programming flowchart Cw as weights;
6), analyze the programming flowchart Cw of weighting, obtain the path that total weight value is maximum, using maximum total weight value as the worst execution time WCET of program.
2., as claimed in claim 1 based on the WCET method for quick estimating of distribution function, it is characterized in that: described step 2) detailed process be:
2.1) entry statement of each fundamental block in fundamental block set B is judged:
A line assembly code is read from described dis-assembling file F the first row, judge that whether this row is the entry statement of fundamental block, if so, then this row is judged to be the entry statement of described fundamental block, records the address that this fundamental block entry statement is corresponding in described dis-assembling file F simultaneously; Otherwise, continue to read and analyze next line until file F terminates;
2.2) exit statement of each fundamental block in fundamental block set B is judged: from dis-assembling file F the first row, read a line assembly code, judge that whether it is the exit statement of fundamental block, if so, the address that this fundamental block exit statement is corresponding in described dis-assembling file F is recorded; Otherwise, continue to read and analyze next line until file F terminates;
2.3) each fundamental block scope is determined:
Described fundamental block is made up of the assembly statement sequence described entry statement to described exit statement, after determining the scope of each fundamental block, and is 1,2,3 to each fundamental block successively label ... n, n >=1; So far, fundamental block set B is obtained.
3. as claimed in claim 1 based on the WCET method for quick estimating of distribution function, it is characterized in that: described step 3) detailed process be: according to dividing address corresponding to the fundamental block, fundamental block label, the fundamental block entry statement that obtain and address corresponding to exit statement, obtain the relation between each fundamental block, thus obtain the programming flowchart of assembly code;
Determine the relation between each fundamental block mainly judges whether can reach between each fundamental block, Ruo Keda then exists relation between this fundamental block, otherwise there is not relation, its concrete determination methods is as follows:
3.1) if the exit statement of fundamental block i is jump statement, and the destination address of this jump statement equals address corresponding to the entry statement of fundamental block j, then i can arrive j;
3.2) if the exit statement of fundamental block i is conditional branch statement, and address corresponding to this exit statement adds 4 equals address corresponding to the entry statement of fundamental block k, then i can arrive k;
3.3) if the exit statement of fundamental block i is unconditional transfer statement, and address corresponding to this exit statement adds 4 equals address corresponding to the entry statement of fundamental block k, then i can arrive k, but now fundamental block k performs after fundamental block i, fundamental block j;
3.4) if the exit statement of fundamental block i is not jump statement, and address corresponding to the exit statement of this fundamental block adds 4 equals address corresponding to the entry statement of fundamental block m, then i can arrive m;
Thus, just can determine the relation between each fundamental block, and be described storage with the digraph based on adjacency list in data structure, using each fundamental block as each node in digraph, just obtain programming flowchart C.
4., as claimed in claim 1 based on the WCET method for quick estimating of distribution function, it is characterized in that: described step 4) detailed process be:
4.1) the expectation value μ of every bar instruction operation time is calculated iand variances sigma i 2
According to programme evaluation and review technique PERT, its expectation value and variance are obtained to the programme evaluation and review technique PERT simulation of every bar DSP assembly instruction improvement working time, namely adopt Perry-Greig expectation value approximate formula to calculate the expectation value μ of every bar DSP instruction operation time i, adopt Person-Turkry variance approximate formula to calculate the variances sigma of every bar DSP instruction operation time i 2, specific formula for calculation is respectively:
μ i=0.630m i+0.185(b i+a i),
σ i 2=0.630(m i-u i) 2+0.185[(b i-u i) 2+(a i-u i) 2],
In formula, b irepresent every bar instruction operation time peak value, a irepresent every bar instruction operation time valley, m irepresent the most probable value of every bar instruction operation time, experimentally divide and extract i gets span for [1-N], and N is fundamental block instruction strip number;
4.2) parallel instruction is screened
The instruction of executed in parallel may be there is in described fundamental block, need to analyze instruction-parallelism, thus make fundamental block execution time of estimating more accurate, according to step 4.1) the expectation value μ of every bar instruction operation time that obtains iand variances sigma i 2, the situation and combined command walks abreast, the command information of instruction superposition is finally participated in screening, is specially:
F j=max(t 1,…,t k,…,t 8),
Wherein, t krepresent the execution time of kth bar instruction in each executed in parallel block in fundamental block, k span is [1-8] because 8 executing instructions can only be had at most in TI DSP, max for getting maxima operation, t k=A k+ 2S k, A kfor the expectation value of the execution time of instruction in the corresponding fundamental block of kth bar instruction in executed in parallel block, S kfor the variance of the execution time of instruction in the corresponding fundamental block of kth bar instruction in executed in parallel block, F jrepresent the execution time of each executed in parallel block in fundamental block, the span of j is [1-M], and M represents the executed in parallel block number comprised in fundamental block;
4.3) fundamental block execution time average μ and variances sigma is calculated 2, concrete computing formula is respectively:
μ = Σ 1 M μ j ,
σ 2 = Σ 1 M σ 2 j ;
Wherein μ jrepresent corresponding F jthe expectation value of instruction operation time, σ 2 jrepresent corresponding F jthe variance of instruction operation time;
4.4) fundamental block execution time T is obtained
After the average of trying to achieve the fundamental block execution time and variance, preset time t, just can calculate P (T '≤t), namely the fundamental block execution 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(t≤μ+2σ)=97.7%,
P(t≤μ+3σ)=99.85%。
This example gets the execution time of T=μ+2 σ as fundamental block.
5. as claimed in claim 1 based on the WCET method for quick estimating of distribution function, it is characterized in that: described step 5) detailed process be, with the weighting process flow graph Cw that fundamental block execution time and execution number of times are weights, wherein fundamental block performs number of times needs artificial estimation in advance to determine, concrete methods of realizing is: in each fundamental block storage organization of programming flowchart C, add the fundamental block execution time and perform number information, thus obtaining weighting process flow graph Cw.
6., as claimed in claim 1 based on the WCET method for quick estimating of distribution function, it is characterized in that: described step 6) detailed process be:
6.1) utilize depth-priority-searching method to obtain each paths of weighting process flow graph Cw, concrete grammar is:
6.1.1) determine the starting point and ending point of programming flowchart, concrete determination methods is: starting point is first fundamental block of programming flowchart, and namely label is the fundamental block of 1; Terminating point is that in the whole fundamental block adjacency list of programming flowchart, out-degree is the fundamental block of 0;
6.1.2) starting point is stacked, and be set to access;
6.1.3) judge whether stack top node is terminating point, if then perform step 6.1.4), otherwise perform step 6.1.5);
6.1.4) preserve element in stack, be the node that path comprises, perform step 6.1.6);
6.1.5) check that stack top node has the not follow-up and node of not accessing, if having, select one of them and it is stacked, and be set to access, perform step 6.1.3), otherwise perform step 6.1.6);
6.1.6) check that in stack, whether element is empty, if so, then terminates to perform, otherwise, stack top node is popped, and is set to not access, perform step 6.1.5);
6.2) calculate the execution time on every paths, circular is: be first multiplied by its corresponding fundamental block with the execution time of each fundamental block on every paths and perform number of times, then cumulative summation, namely obtains the execution time on this paths;
6.3) find the maximal value of execution time on all paths, be the WCET of program.
7., as claimed in claim 1 based on the WCET method for quick estimating of distribution function, it is characterized in that: the judgment criterion of the entry statement of described fundamental block is: the 1. first statement of program; 2. the statement that can transfer to of conditional branch statement or unconditional transfer statement; 3. immediately following the statement after conditional branch statement; 4. immediately following the statement after unconditional transfer statement;
If meet one of above-mentioned condition, be then judged to be fundamental block entry statement.
8., as claimed in claim 1 based on the WCET method for quick estimating of distribution function, it is characterized in that: the judgment criterion of the exit statement of described fundamental block is: that statement 1. before next fundamental block entry statement; 2. the termination statement of assembly code, if each row meets any one in these two conditions in the dis-assembling file F of i.e. scanning analysis, then thinks that it is the exit statement of fundamental block.
CN201510009091.XA 2015-01-08 2015-01-08 A kind of the worst execution time WCET method for quick estimating based on distribution function Expired - Fee Related CN104572103B (en)

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 true CN104572103A (en) 2015-04-29
CN104572103B 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)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105677521A (en) * 2015-12-29 2016-06-15 东南大学—无锡集成电路技术研究所 Benchmark test program synthesis method facing mobile intelligent terminal processor
CN109558141A (en) * 2018-11-28 2019-04-02 北京东土科技股份有限公司 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
CN111967144A (en) * 2020-07-28 2020-11-20 陈本彬 MPT model node frequency prediction method
CN112905224A (en) * 2019-12-04 2021-06-04 阿里巴巴集团控股有限公司 Time-consuming determination method, device and equipment for code review

Citations (2)

* Cited by examiner, † Cited by third party
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

Patent Citations (2)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
Title
江华: ""实时程序WCET分析模型与算法"", 《中国优秀硕士论文学位论文全文数据库 信息科技编》 *
汤森森: ""任务最坏执行时间分析与任务调度检测仿真工具的实现"", 《中国优秀硕士论文学位论文全文数据库 信息科技编》 *
胡明华等: ""基于分布函数的程序执行时间的静态预估"", 《计算机工程与设计》 *
赵修伟: ""基于抽象解释的实时软件WCET研究"", 《中国优秀硕士论文学位论文全文数据库 信息科技编》 *
黎嘉翰: ""基于抽象分析的最坏执行时间分析技术"", 《中国优秀硕士论文学位论文全文数据库 信息科技辑》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105677521A (en) * 2015-12-29 2016-06-15 东南大学—无锡集成电路技术研究所 Benchmark test program synthesis method facing mobile intelligent terminal processor
CN105677521B (en) * 2015-12-29 2019-06-18 东南大学苏州研究院 A kind of benchmark synthetic method towards mobile intelligent terminal processor
CN109558141A (en) * 2018-11-28 2019-04-02 北京东土科技股份有限公司 Method and device for determining worst execution time WCET and readable medium
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
CN112905224A (en) * 2019-12-04 2021-06-04 阿里巴巴集团控股有限公司 Time-consuming determination method, device and equipment for code review
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

Also Published As

Publication number Publication date
CN104572103B (en) 2017-07-11

Similar Documents

Publication Publication Date Title
Rogge-Solti et al. Prediction of remaining service execution time using stochastic petri nets with arbitrary firing delays
Punt The performance of a size-structured stock assessment method in the face of spatial heterogeneity in growth
CN104572103A (en) Distribution function-based WCET (Worst Case Execution Time) quick estimation method
EP1835426A1 (en) Estimating software power consumption
Lu et al. A statistical approach to response-time analysis of complex embedded real-time systems
Yoon et al. A test case prioritization based on degree of risk exposure and its empirical study
Tahvili et al. Cost-benefit analysis of using dependency knowledge at integration testing
CN106469114B (en) A kind of Parallel Computing Performance detection system and its method towards communication test
Harbaoui et al. Introducing queuing network-based performance awareness in autonomic systems
Soltanifar et al. Predicting defectiveness of software patches
US8543524B1 (en) Method for benchmarking combinatorial problems and their solutions
Chamoli et al. Analysing software metrics for accurate dynamic defect prediction models
CN110377525B (en) Parallel program performance prediction system based on runtime characteristics and machine learning
Sehgal et al. Predicting faults before testing phase using Halstead’s metrics
Ouriques et al. On the influence of model structure and test case profile on the prioritization of test cases in the context of model-based testing
CN110968518A (en) Analysis method and device for automatic test log file
Aktaş et al. An introduction to software testing methodologies
CN110309059A (en) UI interface detection method, system, computer equipment and storage medium
Thirasakthana et al. Identifying standard testing time for estimation improvement in IT project management
Aranha et al. Test effort estimation models based on test specifications
Kamma et al. High productivity programmers use effective task processes in unit-testing
Artés et al. Core allocation policies on multicore platforms to accelerate forest fire spread predictions
Kadam et al. Increases the Reliability of Software using Enhanced Non Homogenous Poisson Process (EHPP), Functional Point and Test Point Analysis
Štolfa et al. Methodology for estimating working time effort of the software project
Jalilian et al. Automatic generation of test cases for error detection using the extended Imperialist Competitive Algorithm

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