12
Static WCET Analysis vs. Measurement: What is the Right Way to Assess Real-Time Task Timing? Worst Case Execution Time Prediction by Static Program Analysis Is your program always fast enough? Christian Ferdinand AbsInt Angewandte Informatik GmbH

Static WCET Analysis vs. Measurement: What is the Right Way to Assess Real-Time Task Timing?

  • Upload
    bud

  • View
    55

  • Download
    2

Embed Size (px)

DESCRIPTION

Static WCET Analysis vs. Measurement: What is the Right Way to Assess Real-Time Task Timing? Worst Case Execution Time Prediction by Static Program Analysis Is your program always fast enough? Christian Ferdinand AbsInt Angewandte Informatik GmbH. Hard Real-Time Systems. - PowerPoint PPT Presentation

Citation preview

Page 1: Static WCET Analysis vs. Measurement: What is the Right Way to Assess Real-Time Task Timing?

Static WCET Analysis vs. Measurement: What is the Right Way to Assess Real-Time Task Timing?

Worst Case Execution Time Prediction by Static Program Analysis

Is your program always fast enough?

Christian Ferdinand

AbsInt Angewandte Informatik GmbH

Page 2: Static WCET Analysis vs. Measurement: What is the Right Way to Assess Real-Time Task Timing?

2

Controllers in planes, cars, plants, … are expected to finish their tasks within reliable time bounds.

Schedulability analysis must be performed Hence, it is essential that an upper bound on the

execution times of all tasks is known Commonly called the Worst-Case Execution Time (WCET)

Hard Real-Time Systems

Page 3: Static WCET Analysis vs. Measurement: What is the Right Way to Assess Real-Time Task Timing?

3

The Timing ProblemPr

obab

ility

Execution Time

Best CaseExecution Time

Exact Worst CaseExecution Time

Safe Worst Case Execution TimeEstimate

Unsafe: Execution TimeMeasurement

Page 4: Static WCET Analysis vs. Measurement: What is the Right Way to Assess Real-Time Task Timing?

4

Embedded Control Software

Tends to be large and complex Much functionality Code generator tools 3rd party software

RTOS communication libraries

Page 5: Static WCET Analysis vs. Measurement: What is the Right Way to Assess Real-Time Task Timing?

5

The Timing Problem

LOAD r2, _a

LOAD r1, _b

ADD r3,r2,r1

0

10

20

30

0 WaitCycles

1 WaitCycle

External(6,1,1,1,...)

Execution Time depending on Flash Memory(Clock Cycles)

Clock Cycles

0

50

100

150

200

250

300

350

Best Case Worst Case

Execution Time (Clock Cycles)

Clock Cycles

MPC 5xx (2000) PPC 755 (2001)

x = a + b;

0

50

100

150

200

250

300

350

Best Case Worst Case

Execution Time (Clock Cycles)

Clock Cycles

68K (1990)

Page 6: Static WCET Analysis vs. Measurement: What is the Right Way to Assess Real-Time Task Timing?

6

Some Architectural Features that make Measurement-Based WCET Analysis a Challenge

The empty cache is not necessarily the “worst case cache”

“Domino” effects A cache miss is not necessarily the worst case

Page 7: Static WCET Analysis vs. Measurement: What is the Right Way to Assess Real-Time Task Timing?

7

Solution: Static WCET Analysis

The WCET analyzer computes safe upper bounds of the execution times of the tasks in a program for all inputs

Static program analysis based on Abstract Interpretation

The analysis design is proven to be correct

Page 8: Static WCET Analysis vs. Measurement: What is the Right Way to Assess Real-Time Task Timing?

8

Combines global program analysis by abstract interpretation for cache, pipeline, and value analysis with integer linear programming for path analysis in a single intuitive GUI.

aiT WCET AnalyzerA Solution to the Timing Problem

Page 9: Static WCET Analysis vs. Measurement: What is the Right Way to Assess Real-Time Task Timing?

9

aiT WCET Analyzer Advantages

aiT WCET analyzer allows you to: inspect the timing behavior

of (timing critical parts of) your code

The analysis results are determined without the

need to change the code hold for all inputs and all

executions (for the intrinsic cache and pipeline behavior)

Page 10: Static WCET Analysis vs. Measurement: What is the Right Way to Assess Real-Time Task Timing?

10

Conclusion

Static WCET analysis enables development of complex hard real-time systems on state-of-the-art hardware.

Increases safety.

Saves development time.

Usability proven in industrial practice.

Page 11: Static WCET Analysis vs. Measurement: What is the Right Way to Assess Real-Time Task Timing?

11When to Use Runtime Measurements?

Offline: To validate the pipeline model wrt. the real

hardware

Online (e.g., in the scheduler): To monitor the correct working (detect

hardware failures, …) To improve the exploitation of resources …

Page 12: Static WCET Analysis vs. Measurement: What is the Right Way to Assess Real-Time Task Timing?

email: [email protected]://www.AbsInt.com