Beruflich Dokumente
Kultur Dokumente
Dr. Christian Ferdinand AbsInt Angewandte Informatik GmbH Dr. Kai Richter Symtavision GmbH
Founded in February 1998 by six researchers of Saarland University, Germany Privately held by the founders
30 20 10 0 1998 2008
Key Products
Probability
Execution time
x = a + b;
LOAD ADD
68K (1990)
Execution time (clock cycles)
300 200 100 0 20 Best case 20 Worst case
8
1 wait cycle
30
External (6,1,1,1,..)
Issue
Unit occupied?
Execute
Multicycle?
Retire
Pending instructions?
1 30 3
1 3 1 3 6
1 4 1 1 1 44
10
11
12
CPU
Program Counter:
1028 1032
Instruction:
I-Cache
1032: ble 1024 1024: add 1028: mul
Main memory
1024: add 1028: mul
13
Cache Analysis
Example: Fully Associative Cache (2 Elements)
Must analysis: for each program point and calling context, find out which blocks are in the cache May analysis: for each program point and calling context, find out which blocks may be in the cache
14
Main Memory
Data Out
15
Pipelines
Inst 1 Fetch Decode Execute Write back Fetch Decode Execute Write back Fetch Decode Execute Write back Fetch Decode Execute Write back Fetch Decode Execute Write back Inst 2 Inst 3 Inst 4
16
Pipeline Analysis
Goal: calculate all possible pipeline states at a program point Method: perform a cycle-wise evolution of the pipeline, determining all possible successor pipeline states Implementation: from a formal model of the pipeline, its stages and communication between them Generation: from a PAG specification Result: WCET for basic blocks
17
Pipeline Model
MPC555 Block Diagram aiT's internal pipeline model
aiT visualization
18
19
(simplified constraints)
max: 4 xa + 10 xb + 3 xc +
4t
2 xd + 6 xe + 5 xf 3t where xa = xb + xc xcc = xd + xe 6t xf = xb + xd + xe xa = 1
Value of objective function: 19
10t 2t
5t
xa xb xc xd xe xf
1 1 0 0 0 1
20
A Hybrid Approach:
Combining block measurements with static analysis
Avoids the high costs of micro-architecture modeling Requires to measure all local worst-case behaviors Regrettably, this is nearly impossible generally not safe! Nevertheless, can be quite useful for optimizations by hand
21
The empty cache is not necessarily the worst case cache Domino effects
22
Domino Effect
Timing anomaly Execution time increase is not bounded by hardware determined constants Certain instruction sequences e.g. in loop bodies can trigger this effect and increase latencies in further iterations
23
B0
1 0
B1
B2
L0
L1
L2
L3
24
c: d: f: c: d: h: c: d: f: c: d: h:
This sequence is then repeated ad infinitum only cache hits two misses each time
25
Specifications (*.ais)
clock 10200 kHz ; loop "_codebook" + 1 loop exactly 16 end ; recursion "_fac" max 6; SNIPPET "printf" IS NOT ANALYZED AND TAKES MAX 333 CYCLES; flow "U_MOD" + 0xAC bytes / "U_MOD" + 0xC4 bytes is max 4; area from 0x20 to 0x497 is read-only;
Entry Point
Compiler Linker
26
Hardware-Settings
Hardware settings have to be specified in aiT according to the target processor configuration in the start-up code.
27
28
Loops
aiT includes a loop bound analysis based on interval analysis and pattern matching that is able to recognize the iteration count of many simple FOR loops automatically Other loops need to be annotated
Example: loop "_prime" + 1 loop end max 10;
29
30
31
Recent Advances
Cache-miss penalties WCET overestimation
Source: studies by Lim et al. (1995), Thesing et al. (2002), and Souyris et al. (2005)
32
33
34
35
Analysis Reports
Customizable HTML reports Global and detailed reports Diff feature
36
37
Engine throttle control module specified in ASCET, Tasking compiler v7.5., STM ST10F269 microcontroller board. Run-times extracted from bus traces (ISYSTEMS ILA 128 logic analyzer) The worst-case path information provided by aiT was used to manually construct a corresponding input.
38
ST10/C16x uses two stacks. Most generated functions neither use local variables nor call subroutines, i.e. the stack usage is zero.
39
WCET/stack request
Refinement
WCET/stack response
40
Future Work
Extraction of timing (pipeline) models from HW description (VHDL) Use of source-level program analyses Tighter integration with measurement based approaches Early phase worst-case execution time estimation
41
42
43
Conclusion
aiT enables development of complex hard-real time systems on state-of-the-art hardware Increases safety Saves development time and costs Usability proven in industrial practice
Contact
Visit us!