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.

446 Chapter 32<br />

downloa<strong>de</strong>d co<strong>de</strong> <strong>for</strong> the new environment. Furthermore, the remote robot<br />

monitor may want to conduct a different type of experiment which may not<br />

be programmed into the original co<strong>de</strong>. The exploration would be more flexible<br />

if the software can be sent from the base station. When the robot encounters<br />

a new environment, it can download co<strong>de</strong> to modify the robot’s real-time<br />

behavior. The new co<strong>de</strong> can be dynamically incorporated without reinitializing<br />

all functionality of the robot.<br />

In this application, we used the block streaming method to transmit the<br />

software to the robot. A binary application co<strong>de</strong> of size 10 MB was generated.<br />

The stream-enabled application was generated using our softstream co<strong>de</strong><br />

generation tool. There were three off-block branch instructions on average in<br />

each block. The software was streamed over a 128 Kbps transmission media.<br />

Table 32-1 shows average overheads of ad<strong>de</strong>d co<strong>de</strong> per block and load time<br />

<strong>for</strong> different block sizes. The average ad<strong>de</strong>d co<strong>de</strong> per block is 36 bytes (due<br />

an average in each block of three off-blocks branches each of which adds 12<br />

bytes). This overhead is insignificant (less than 0.5%) <strong>for</strong> block sizes larger<br />

than 1 KB. The load times were calculated using only transmission of the<br />

block and the streamed co<strong>de</strong>. We did not inclu<strong>de</strong> other overhead such as<br />

propagation <strong>de</strong>lay from the server to the client and processing.<br />

Without using the block streaming method, the application load time of this<br />

application would be over 10 minutes (approximately 655 seconds). If the<br />

robot has to adapt to the new environment within 120 seconds, downloading<br />

the entire application would miss the <strong>de</strong>adline by more than eight minutes.<br />

However, if the application were broken up into 1 MB or smaller blocks, the<br />

<strong>de</strong>adline could be met. Even the strict <strong>de</strong>adline is not crucial, the block<br />

streaming method reduces the application load time by 10× or more <strong>for</strong> the<br />

block sizes of 1 MB or less. The load time <strong>for</strong> a block size of 1 MB is<br />

approximately 65 seconds whereas just streaming the entire block as on<br />

10 MB whole results in an application load time of more than 655 seconds.<br />

If the software profiling predicts the software execution path correctly, the<br />

application will run without interruption due to missing blocks; the subsequently-nee<strong>de</strong>d<br />

blocks can be streaming in the background while the CPU is<br />

Table 32-1. Simulation result <strong>for</strong> block streaming of robot co<strong>de</strong>.<br />

Block size (bytes)<br />

Number of blocks<br />

Ad<strong>de</strong>d co<strong>de</strong>/block<br />

Load time (s)<br />

10 M<br />

5M<br />

2 M<br />

1 M<br />

0.5 M<br />

100 K<br />

10 K<br />

1 K<br />

512<br />

1<br />

2<br />

5<br />

10<br />

20<br />

103<br />

1024<br />

10240<br />

20480<br />

0.0003%<br />

0.0007%<br />

0.0017%<br />

0.0034%<br />

0.0069%<br />

0.0352%<br />

0.3516%<br />

3.5156%<br />

7.0313%<br />

655.36<br />

327.68<br />

131.07<br />

65.54<br />

32.77<br />

6.40<br />

0.64<br />

0.06<br />

0.03

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

Saved successfully!

Ooh no, something went wrong!