7 Intelligent and Connected Cyber-Physical Systems: A Perspective. . .
371
Fig. 7.8 An example memory-aware sampling order
S2 :C 1 (1) −→ C 1 (2) −→ C 1 (3) −→ C 2 (1) −→ C 2 (2) −→ C 2 (3) −→
C 3 (1) −→ C 3 (2) −→ C 3 (3) −→ · · · .
The effective WCET taking into account the cache reuse between consecutive
executions is denoted as E
wc
i (j ). From the above discussion,
∀i ∈ {1, 2, 3} ,
E
wc
i (1) = E
wc
i ,
since there is no cache reuse from the previous program for the first execution of
every application C i (1). E
wc
i (2) and E
wc
i (3) are shorter than E
wc
i (1) due to cache
reuse. The amounts of cache reuse are the same for C i (2) and C i (3) in the worst
case. Denoting the guaranteed WCET reduction as E
g
i ,
∀i ∈ {1, 2, 3} ,
E
wc
i (2) = E
wc
i (3) = E
wc
i (1) − E
g
i .
From these varying WCETs, the sampling periods of all three applications can be
calculated. Taking C 1 as an example, there are three sampling periods h 1 (1), h 1 (2),
and h 1 (3), which repeat themselves periodically:
h 1 (1) = E
wc
i (1), h 1 (2) = E
wc
i (2), h 1 (3) = E
wc
i (3) + ,
where is computed as
=
i=2,3
j =1,2,3
E
wc
i (j ).
Similar derivation can be done for C 2 and C 3 . The average sampling period of an
application h avg is
371
Fig. 7.8 An example memory-aware sampling order
S2 :C 1 (1) −→ C 1 (2) −→ C 1 (3) −→ C 2 (1) −→ C 2 (2) −→ C 2 (3) −→
C 3 (1) −→ C 3 (2) −→ C 3 (3) −→ · · · .
The effective WCET taking into account the cache reuse between consecutive
executions is denoted as E
wc
i (j ). From the above discussion,
∀i ∈ {1, 2, 3} ,
E
wc
i (1) = E
wc
i ,
since there is no cache reuse from the previous program for the first execution of
every application C i (1). E
wc
i (2) and E
wc
i (3) are shorter than E
wc
i (1) due to cache
reuse. The amounts of cache reuse are the same for C i (2) and C i (3) in the worst
case. Denoting the guaranteed WCET reduction as E
g
i ,
∀i ∈ {1, 2, 3} ,
E
wc
i (2) = E
wc
i (3) = E
wc
i (1) − E
g
i .
From these varying WCETs, the sampling periods of all three applications can be
calculated. Taking C 1 as an example, there are three sampling periods h 1 (1), h 1 (2),
and h 1 (3), which repeat themselves periodically:
h 1 (1) = E
wc
i (1), h 1 (2) = E
wc
i (2), h 1 (3) = E
wc
i (3) + ,
where is computed as
=
i=2,3
j =1,2,3
E
wc
i (j ).
Similar derivation can be done for C 2 and C 3 . The average sampling period of an
application h avg is
