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.

14 Chapter 2<br />

exchange properly characterized black-box components. The required characterization<br />

is <strong>de</strong>scribed in corresponding agreements. This is <strong>de</strong>tailed in the<br />

following sections.<br />

4. SOFTWARE INTEGRATION<br />

In this section‚ we address the roles and functional issues proposed in Figure<br />

2-1 <strong>for</strong> a safe software integration flow‚ in particular RTOS configuration‚<br />

communication conventions and memory budgeting. The functional software<br />

structure introduced in this section also helps to better un<strong>de</strong>rstand per<strong>for</strong>mance<br />

issues which are discussed in Section 5.<br />

4.1. RTOS configuration<br />

In an engine ECU‚ most tasks are either executed periodically‚ or run<br />

synchronously with engine RPM. RTOS configuration (Figure 2-1) inclu<strong>de</strong>s<br />

setting the number of available priorities‚ timer periods <strong>for</strong> periodic tasks<br />

etc. Configuration of basic RTOS properties is per<strong>for</strong>med by the ECU provi<strong>de</strong>r.<br />

In OSEK‚ which is an RTOS standard wi<strong>de</strong>ly used in the automotive<br />

industry [8]‚ the configuration can be per<strong>for</strong>med in the ‘OSEK implementation<br />

language’ (OIL [12]). Tools then build C or object files that capture the<br />

RTOS configuration and insert calls to the individual functions in appropriate<br />

places. With the proper tool chain‚ integration can also be per<strong>for</strong>med by the<br />

automotive OEM <strong>for</strong> rapid prototyping and IP protection.<br />

In our experiments we used ERCOSEK [2]‚ an extension of OSEK. In<br />

ERCOSEK co<strong>de</strong> is structured into tasks which are further substructured into<br />

processes. Each task is assigned a priority and scheduled by the RTOS.<br />

Processes insi<strong>de</strong> each task are executed sequentially. Tasks can either be<br />

activated periodically with fixed periods using a timetable mechanism‚ or<br />

dynamically using an alarm mechanism.<br />

We configured ERCOSEK using the tool ESCAPE [3]. ESCAPE reads a<br />

configuration file that is based on OIL and translates it into ANSI-C co<strong>de</strong>.<br />

The individual software components and RTOS functions called from this co<strong>de</strong><br />

can be pre-compiled‚ black-box components.<br />

In the automotive domain‚ user functions are often specified with a blockdiagram-based<br />

tool‚ typically Simulink or Ascet/SD. C-co<strong>de</strong> is then obtained<br />

from the block diagram using the tool’s co<strong>de</strong> generator or an external one. In<br />

our case‚ user functions were specified in Ascet/SD and C-co<strong>de</strong> was generated<br />

using the built-in co<strong>de</strong> generator.<br />

4.2. Communication conventions and memory budgeting<br />

Black-box components with standard software interfaces are nee<strong>de</strong>d to satisfy<br />

IP protection. At the same time‚ validation‚ as well as modularity and flexi-

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

Saved successfully!

Ooh no, something went wrong!