Slide 1

Slide 1 text

Verification of Embedded Application – Approaches to Perform Worst Case Execution Timing 1 1 Execution Timing K S Sreetha 06-Dec-2012

Slide 2

Slide 2 text

• Introduction • Timing Analysis • Different Approaches • Static Analysis Agenda 2 2 • Dynamic Analysis • Conclusion • Q&A

Slide 3

Slide 3 text

Introduction • In Industries - avionics, automobile, nuclear plant, space research, medical etc.- safety plays a vital role. • Usage of real time embedded applications in various industries is increasing 3 3 industries is increasing rapidly.

Slide 4

Slide 4 text

Real Time Systems • The data is processed with respect to time. • Timing constraints is one of the most important issues in real-time embedded system designs. 4 4

Slide 5

Slide 5 text

Real Time Systems • The real time systems are classified into three types based on the deadline. • Hard Real Time Systems • Soft Real Time Systems • Firm Real Time System 5 5 • Firm Real Time System

Slide 6

Slide 6 text

WCET Why is Worst Case execution Timing Analysis (WCET) performed? 6 6

Slide 7

Slide 7 text

WCET cont… • Objective - Software implementation execution does not exceed the allocated frame time (the time allocated for a frame/task). • The WCET provides the worst case execution time; this is 7 7 • The WCET provides the worst case execution time; this is the time when the system behaves in the worst scenario.

Slide 8

Slide 8 text

WCET cont… 8 8 • The WCET gives the safe time that no underestimation is considered and tight time that a small overestimation is considered. • Best Case Execution Time (BCET) gives the best execution time of the system with the normal inputs.

Slide 9

Slide 9 text

Static Analysis • Without execution of the code on the hardware. • Advantages: • It guarantees that worst-case timing path can be covered from overall analysis. 9 9 covered from overall analysis. • Dis Advantages: • Time consuming. • There is no execution; it is not possible to consider the hardware factors.

Slide 10

Slide 10 text

Dynamic Analysis • Execution of the software on the target hardware or on an evaluation board • All abnormal conditions are considered. 10 10 • Inputs to be simulated or some prerequisites need to be satisfied. • Interrupts to be simulated or generated.

Slide 11

Slide 11 text

Dynamic Analysis cont.. • The steps involved in this approach are mentioned in the below section. • Test Design/Analysis • Test Execution 11 11 • Test Execution • Integration Figure 2

Slide 12

Slide 12 text

Dynamic Analysis cont.. Test Design/Analysis • The program representation is captured through control flow diagram. • The control flow diagram gives the pictorial representation of the control flow of the code. 12 12 representation of the control flow of the code.

Slide 13

Slide 13 text

Selection of Inputs • Knowledge of the system is very important • Consider Max and Normal Values of input. 13 13

Slide 14

Slide 14 text

Dynamic Analysis cont.. Test Execution: • The time could be captured in the oscilloscope, or any of the measuring instruments. 14 14

Slide 15

Slide 15 text

Dynamic Analysis cont.. Integration: • The integration is the third and last step in this approach • Integrates the functions individual WCET to get the WCET of the entire software. 15 15 of the entire software. • Bottom to top integration

Slide 16

Slide 16 text

Dynamic Analysis cont.. Function4( ) { If ( ) { // Path I Statement1; If function4 has two paths like 16 16 Statement1; Statement2; } Else { //Path J Statement2; Statement3; Statement3; } }

Slide 17

Slide 17 text

Dynamic Analysis cont.. Function4 path Time(µs ) Path I (If condition ) 640 Path J (else condition) 800 17 17 As per this data table the worst time consuming path is “ELSE condition “Path J.

Slide 18

Slide 18 text

Dynamic Analysis cont.. Function5 path Time(µs) Path I (If condition ) 1000 PathJ(else condition) 500 18 18 As per this data table the worst time consuming path is “IF condition “Path I.

Slide 19

Slide 19 text

Dynamic Analysis cont.. Consider time for the function call = 320µs Execution Time (ET) for PATH d = WCET of Function4+Function call of 4 +executable of Function1 19 19 Function4+Function call of 4 +executable of Function1 = 800 + 200 + 320 = 1320

Slide 20

Slide 20 text

ET for PATH h = WCET of Function5+Function call of 5 +executable of Function1 = 1000 + 200 +320 20 20 = 1530 ET for PATH b= WCET of PATH h+ Function call of 1 +executable of Function main

Slide 21

Slide 21 text

Worst Case Timing Calculation • Worst case Time = maximum time path + ET of the Interrupts • Timing Margin (%) = (1- (Worst case Time /Total time allocated))*100 21 21 allocated))*100 • It is recommended that WCET usage should not exceed 50% of the allocated time margin

Slide 22

Slide 22 text

Dynamic Analysis cont.. • Advantages • Deals with real run-time usage • Guaranteed that the worst-case time path has been covered 22 22 • Disadvantages • Manual errors • The approach is time consuming.

Slide 23

Slide 23 text

Conclusion • Best feasible method to for the embedded software application. • Calculation allows for the expression of the most complex flows. • This approach can be used in safety critical software 23 23 • This approach can be used in safety critical software applications like aerospace, medical, and defense, etc

Slide 24

Slide 24 text

Q&A 24 24 Q&A

Slide 25

Slide 25 text

Thank you 25 25

Slide 26

Slide 26 text

26 26