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.

16 Chapter 2<br />

techniques <strong>for</strong> timing validation are increasingly unreliable with growing<br />

application and architecture complexity. There<strong>for</strong>e‚ <strong>for</strong>mal timing analysis<br />

techniques which consi<strong>de</strong>r conservative min/max behavioral intervals are<br />

becoming more and more attractive as an alternative or supplement to<br />

simulation. We expect that‚ ultimately‚ certification will only be possible using<br />

a combination of agreed-upon test patterns and <strong>for</strong>mal techniques. This can<br />

be augmented by run-time techniques such as <strong>de</strong>adline en<strong>for</strong>cement to <strong>de</strong>al<br />

with unexpected situations (not consi<strong>de</strong>red here).<br />

A major challenge when applying <strong>for</strong>mal analysis methodologies is to<br />

calculate tight per<strong>for</strong>mance bounds. Overestimation leads to poor utilization<br />

of the system and thus requires more expensive target processors‚ which is<br />

unacceptable <strong>for</strong> high-volume products in the automotive industry.<br />

Apart from conservative per<strong>for</strong>mance numbers‚ timing analysis also yields<br />

better system un<strong>de</strong>rstanding‚ e.g. through visualization of worst case scenarios.<br />

It is then possible to modify specific system parameters to assess their impact<br />

on system per<strong>for</strong>mance. It is also possible to <strong>de</strong>termine the available headroom<br />

above the calculated worst case‚ to estimate how much additional functionality<br />

could be integrated without violating timing constraints.<br />

In the following we <strong>de</strong>monstrate that <strong>for</strong>mal analysis is consistently applicable<br />

<strong>for</strong> single processes‚ RTOS overhead‚ and single ECUs‚ and give an<br />

outlook on networked ECUs‚ thus opening the door to <strong>for</strong>mal timing analysis<br />

<strong>for</strong> the certification of automotive software.<br />

5.1. Single process analysis<br />

Formal single process timing analysis <strong>de</strong>termines the worst and best case<br />

execution time (WCET‚ BCET) of one activation of a single process assuming<br />

an exclusive resource. It consists of (a) path analysis to find all possible paths<br />

through the process‚ and (b) architecture mo<strong>de</strong>ling to <strong>de</strong>termine the minimum<br />

and maximum execution times <strong>for</strong> these paths. The challenge is to make both<br />

path analysis and architecture mo<strong>de</strong>ling tight.<br />

Recent analysis approaches‚ e.g. [9]‚ first <strong>de</strong>termine execution time intervals<br />

<strong>for</strong> each basic block. Using an integer linear programming (ILP) solver‚<br />

they then find the shortest and the longest path through the process based on<br />

basic block execution counts and time‚ leading to an execution time interval<br />

<strong>for</strong> the whole process. The <strong>de</strong>signer has to bound data-<strong>de</strong>pen<strong>de</strong>nt loops and<br />

exclu<strong>de</strong> infeasible paths to tighten the process-level execution time intervals.<br />

Pipelines and caches have to be consi<strong>de</strong>red <strong>for</strong> complex architectures to<br />

obtain reliable analysis bounds. Pipeline effects on execution time can be<br />

captured using a cycle-accurate processor core mo<strong>de</strong>l or a suitable measurement<br />

setup. Prediction of cache effects is more complicated. It first requires<br />

the <strong>de</strong>termination of worst and best case numbers <strong>for</strong> cache hits and misses‚<br />

be<strong>for</strong>e cache influence on execution time can be calculated.<br />

The basic-block based timing analysis suffers from the over-conservative<br />

assumption of an unknown cache state at the beginning of each basic block.

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

Saved successfully!

Ooh no, something went wrong!