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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

92 Chapter 7<br />

new channel implementations. It reaches a limit <strong>de</strong>pending on the number<br />

of channel implementations given <strong>for</strong> the plat<strong>for</strong>m. Thus, each plat<strong>for</strong>m<br />

enables a different limit. The channel implementation of the ABS system<br />

requires 11.4 Kb. The other component <strong>de</strong>pends on the functionality and<br />

module specification co<strong>de</strong>. This growth can be consi<strong>de</strong>red linear (at a rate<br />

of approximately 1 Kb per 50–70 source co<strong>de</strong> lines in the example), as<br />

can be <strong>de</strong>duced from Table 7-3.<br />

The total software co<strong>de</strong> generated is limited to 68.7 Kb.<br />

Table 7-3 shows in more <strong>de</strong>tail how the functionality size component in<br />

the ABS system is distributed in each module:<br />

Table 7-3. Co<strong>de</strong> size introduced by each module.<br />

SC_MODULE<br />

Abs<br />

System<br />

Compute<br />

Speed<br />

Compute<br />

Acceleration<br />

Take<br />

Decision<br />

Multiple<br />

Rea<strong>de</strong>rs<br />

C++ Co<strong>de</strong> lines<br />

Blocking channels<br />

Exten<strong>de</strong>d channels<br />

Generated SW<br />

30<br />

3<br />

1<br />

1130 bytes<br />

44<br />

0<br />

0<br />

700 bytes<br />

46<br />

0<br />

0<br />

704 bytes<br />

110<br />

1<br />

0<br />

3510 bytes<br />

12<br />

0<br />

0<br />

140 bytes<br />

The addition of module memory sizes gives the value of 6.2 Kb. This<br />

exceeds by 2.1 Kb the 4.2 Kb shown in Figure 7-5. This is due to the shared<br />

co<strong>de</strong> of instanced channels that appears in modules including structural<br />

<strong>de</strong>scription (Take Decision and ABS System).<br />

The overall overhead introduced by the method respect to manual <strong>de</strong>velopment<br />

is negligible because the SystemC co<strong>de</strong> is not inclu<strong>de</strong>d but substituted<br />

by a C++ equivalent implementation that uses eCos. In terms of memory, only<br />

the 22.2 Kbytes could be reduced if an alternative C co<strong>de</strong> avoiding dynamic<br />

memory management is written.<br />

5. CONCLUSIONS<br />

This paper presents an efficient embed<strong>de</strong>d software generation method based<br />

on SystemC. This technique reduces the embed<strong>de</strong>d system <strong>de</strong>sign cost in a<br />

plat<strong>for</strong>m based HW/SW co<strong>de</strong>sign methodology. One of its main advantages<br />

is that the same SystemC co<strong>de</strong> is used <strong>for</strong> the system-level specification and,<br />

after SW/HW partition, <strong>for</strong> the embed<strong>de</strong>d SW generation. The proposed<br />

methodology is based on the re<strong>de</strong>finition and overloading of SystemC class<br />

library construction elements. In the software generated, those elements are<br />

replaced by typical RTOS functions. Another advantage is that this method<br />

is in<strong>de</strong>pen<strong>de</strong>nt of the selected RTOS and any of them can be supported by<br />

simply writing the corresponding library <strong>for</strong> that replacement. Experimental<br />

results <strong>de</strong>monstrate that the minimum memory footprint is 53.2 Kb when the

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

Saved successfully!

Ooh no, something went wrong!