29.01.2015 Views

Embedded Software for SoC - Grupo de Mecatrônica EESC/USP

Embedded Software for SoC - Grupo de Mecatrônica EESC/USP

Embedded Software for SoC - Grupo de Mecatrônica EESC/USP

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

22 Chapter 2<br />

range. There<strong>for</strong>e‚ no task will ever find a previously executed instruction in<br />

the cache‚ since other tasks will have filled the cache completely between two<br />

executions. However‚ Table 2-2 indicates that RTOS functions benefit from<br />

the cache‚ both because they may contain loops‚ and because they can be called<br />

multiple times shortly after each other‚ and their co<strong>de</strong> thus is not replaced<br />

in-between calls.<br />

Again‚ we used the setup <strong>de</strong>scribed in Section 5.1 to per<strong>for</strong>m several<br />

experiments to be checked against our analysis. We ran experiments executing<br />

the co<strong>de</strong> from the external memory‚ both with enabled and disabled cache (see<br />

also Figure 2-3). The results are shown in Table 2-3. Task C has the highest‚<br />

task A the lowest priority. The first and second columns show the worst case<br />

response times obtained by applying the above <strong>for</strong>mula. In column one‚ worst<br />

case RTOS overhead with cache from Table 2-2 was used‚ in column two‚<br />

worst case RTOS overhead without cache. The third and fourth columns show<br />

a range of measured response times during test-runs with and without cache.<br />

As can be seen‚ even in the simple 3-task system presented here‚ there is<br />

a large response time variation between measurements. The size of the<br />

response time intervals becomes larger with <strong>de</strong>creasing task priority (due to<br />

more potential interrupts by higher priority tasks)‚ but even the highest priority<br />

task experiences response time jitter due to the varying number of interrupts<br />

by RTOS functions running at even higher priority.<br />

Our calculated worst case response times conservatively bound the observed<br />

behavior. The calculated worst case response times are only about 6% higher<br />

than the highest measured values‚ indicating the good tightness analysis can<br />

achieve if effects from scheduling‚ RTOS overhead‚ single process execution<br />

times and caches are all consi<strong>de</strong>red. Results would be even better with a more<br />

<strong>de</strong>tailed RTOS mo<strong>de</strong>l.<br />

Another observation is that the cache and memory architecture in not welladjusted<br />

<strong>for</strong> our target applications. We are currently looking into a TriCore<br />

version with 16 k 2-way associative cache <strong>for</strong> the production ECU. However‚<br />

due to the characteristics of engine control co<strong>de</strong>‚ we do not expect that single<br />

processes will benefit from a different cache architecture. Likewise‚ 16 k of<br />

cache are still by far too small to avoid complete replacement of process<br />

co<strong>de</strong> between two activations of the same process.<br />

At this point‚ we are still confined to single ECU applications.<br />

Table 2-3. Task response times.<br />

Task<br />

Calculated worstcase<br />

response<br />

times (w/ cache)<br />

Calculated worst-)<br />

case response<br />

times (w/o cache<br />

Measured<br />

response time<br />

(w/ cache)<br />

Measured<br />

response time<br />

(w/o cache)<br />

A<br />

B<br />

C

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!