Modeling Hardware Timing 1 Caches and Pipelines
Peter Puschner
slides: P. Puschner, R. Kirner, B. Huber
VU 2.0 182.101 SS 2016
Modeling Hardware Timing 1 Caches and Pipelines Peter Puschner - - PowerPoint PPT Presentation
Modeling Hardware Timing 1 Caches and Pipelines Peter Puschner slides: P. Puschner, R. Kirner, B. Huber VU 2.0 182.101 SS 2016 Generic WCET Analysis Framework source
slides: P. Puschner, R. Kirner, B. Huber
VU 2.0 182.101 SS 2016
2
Compilation Transformation of Flow Facts Extraction of Flow Facts Exec-Time Modeling
Calculation of Execution Scenarios
(1)cache analysis (2) pipeline analysis + path-based WCET calculation.
3
4
IF ID EX M F WB IF ID EX M F WB
5
IF ID EX M F WB IF ID EX M F WB IF ID EX M F WB
6
IF ID EX M F WB IF ID EX M F WB IF ID EX M F WB
7
Two approaches are presented:
1.
Cache analysis integrated into IPET-based path analysis, resulting in the following phases:
pipeline analysis
cache analysis + path analysis + WCET calculation
2.
Cache analysis as a separate phase using abstract interpretation (data-flow analysis), resulting in the following phases:
cache analysis
pipeline analysis
path analysis + WCET calculation
8
9
Line is selected by ld(m) address bits Line 1 Line 2 Line m m lines Line: valid bit (v), tag and data (k bytes) ... v w1 w2 wk tag tag
ld(m) bits
address word
ld(k) bits
§
Each basic block Bi is divided into {Bi.1, Bi.2,…,Bi.ni} l-blocks (cache line blocks).
§
Two l-blocks can be
the cache content of the other
§
Execution counter xi of Bi is divided into xi = xi.j
hit + xi.j miss, 1 ≤ j ≤ ni
§
ILP goal function:
= =
N i n j miss j i miss j i hit j i hit j i
i
1 1 . . . .
10
Ca che L ine 1 2 3
B1.1 B1.2 B1.3 B2.1 B2.2 B3.1 B3.2
(i) CFG (ii) Ca che table
11
[Y.T.Steven Li,S.Malik,A.Wolfe,95]
basic block cache line block (l-block)
. .
miss n m miss l k
12
.
miss l k
13
, , ,
v u v u v u i
B7.1 B4.1 s e
1 p(s,7.1) 0 p(s,e) 0 p(s,4.1) 0 p(4.1,e) 9 p(4.1,7.1) 9 p(7.1,4.1)
p(4.1,4.1)
0 p(7.1,7.1) 1 p(7.1,e) 91
(ii) CCG
14
B1 B2 B3 B5 B6 B8 B9 B7 B4B4.1
B7.1
1 c1 11 c 2 10 c3 10 c8 1 c9 1 c 5 11 c 6 9 c4 10 c7
(i) CFG
[Y.T.Steven Li,S.Malik,A.Wolfe,95]
these two lblocks are in conflict with each other (but with no other lblocks) à separate CCG for each conflict set
hit j i
.
h
j i
. =
15
§
Shown example: direct mapped instruction cache
§
Elegant way to integrate exec-time modelling into WCET calculation.
§
Approach can be extended to:
§
Complexity:
à Not feasible for real-size programs.
16
17
18