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.

44 Chapter 4<br />

In summary‚ the rules are <strong>de</strong>fined as follows:<br />

For every test statement the test is repeated at the beginning of the target<br />

basic block of both the true and false clause. If the two versions of the<br />

test (the original and the newly introduced) produce different results‚ an<br />

error is signaled;<br />

A flag ctrl_branch is <strong>de</strong>fined in the program;<br />

An integer value kj is associated with any procedure j in the co<strong>de</strong>;<br />

At the beginning of every procedure‚ the value kj is assigned to ctrl_branch;<br />

a test on the value of ctrl_branch is introduced be<strong>for</strong>e and after any call<br />

to the procedure.<br />

2.1.4. Trans<strong>for</strong>mation tool – C2C Translator<br />

We built a prototype tool‚ called C2C Translator‚ able to automatically implement<br />

the above <strong>de</strong>scribed trans<strong>for</strong>mation rules. The main objective is to trans<strong>for</strong>m<br />

a program into a functionally equivalent one‚ but including capabilities<br />

to <strong>de</strong>tect upsets arising in the architecture’s sensitive area (internal registers‚<br />

internal or external memory area‚ cache memory . . .).<br />

The C2C Translator accepts as an input a C co<strong>de</strong> source producing as output<br />

the C co<strong>de</strong> corresponding to the har<strong>de</strong>ned program according to a set of<br />

options. In fact‚ these options correspond to each group of rules presented in<br />

Section 2 and they can be applied separately or together. Figure 4-5 shows<br />

the entire flow of C2C translator. From the resulting C co<strong>de</strong>‚ the assembly<br />

language co<strong>de</strong> <strong>for</strong> a targeted processor can be obtained‚ using an ad-hoc<br />

compiler.

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

Saved successfully!

Ooh no, something went wrong!