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.

<strong>Software</strong> Streaming Via Block Streaming 443<br />

inclu<strong>de</strong> CPU speed, connection speed, block size and the program execution<br />

path. Without knowledge about the environment <strong>for</strong> software streaming, the<br />

per<strong>for</strong>mance of the system can be suboptimal. For instance, if the block size<br />

is too small and the processor can finish executing the first block faster than<br />

the transmission time of the second block, the application must be suspen<strong>de</strong>d<br />

until the next block is loa<strong>de</strong>d. This would not per<strong>for</strong>m well in an interactive<br />

application. Increasing the block size of the first block will <strong>de</strong>lay the initial<br />

program execution, but the application may run more smoothly.<br />

4.1. Per<strong>for</strong>mance metrics<br />

4.1.1. Overheads<br />

The most obvious overhead is the co<strong>de</strong> ad<strong>de</strong>d during the stream-enabled co<strong>de</strong><br />

generation step <strong>for</strong> block streaming. For the current implementation, each offblock<br />

branch adds 12 bytes of extra co<strong>de</strong> to the original co<strong>de</strong>. The streamenabling<br />

co<strong>de</strong> (ad<strong>de</strong>d co<strong>de</strong>) <strong>for</strong> off-block branches consists of (i) the ID of<br />

the nee<strong>de</strong>d block, (ii) the original instruction of the branch, and (iii) the offset<br />

of the instruction. Since each field (i–iii) occupies four bytes, the total is 12<br />

extra bytes ad<strong>de</strong>d. The original co<strong>de</strong> and the stream-enabling co<strong>de</strong> are put<br />

together into a streamed unit. A streamed unit must be loa<strong>de</strong>d be<strong>for</strong>e the CPU<br />

can safely execute the co<strong>de</strong>. There<strong>for</strong>e, the ad<strong>de</strong>d stream-enabling co<strong>de</strong> incurs<br />

both transmission and memory overheads. Increasing the block size may<br />

reduce these overheads. However, a larger block size increases the application<br />

load time since the larger block takes longer to be transmitted.<br />

Runtime overheads are associated with co<strong>de</strong> checking, co<strong>de</strong> loading and<br />

co<strong>de</strong> modification. Co<strong>de</strong> loading occurs when the co<strong>de</strong> is not in the memory.<br />

Co<strong>de</strong> checking and co<strong>de</strong> modification occur when an off-block branch is first<br />

taken. There<strong>for</strong>e, these overheads from the runtime co<strong>de</strong> modifications<br />

eventually diminish.<br />

4.1.2. Application load time<br />

Application load time is the time between when the program is selected to<br />

run and when the CPU executes the first instruction of the selected program.<br />

The application load time is directly proportional to block size and is inversely<br />

proportional to the speed of the transmission media. The program can start<br />

running earlier if the application load time is lower. The application load<br />

time can be estimated as explained in <strong>de</strong>tail in [12].<br />

4.1.3. Application suspension time<br />

Application suspension occurs when the next instruction that would be<br />

executed in normal program execution is in a block yet to be loa<strong>de</strong>d or only<br />

partially loa<strong>de</strong>d into memory. The application must be suspen<strong>de</strong>d while the

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

Saved successfully!

Ooh no, something went wrong!