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.

Detecting Soft Errors by a Purely <strong>Software</strong> Approach 43<br />

According to these modifications‚ the studied rules become the following:<br />

A boolean flag status_block is associated to every basic block i in the co<strong>de</strong>;<br />

“1” <strong>for</strong> the inactive state and “0” <strong>for</strong> the active state;<br />

An integer value ki is associated with every basic block i in the co<strong>de</strong>;<br />

A global execution check flag (gef) variable is <strong>de</strong>fined;<br />

A statement assigning to gef the value of (ki & (status _block = status_block<br />

+ 1) mod2) is introduced at the beginning of every basic block i; a test on<br />

the value of gef is also introduced at the end of the basic block.<br />

2.1.3. Errors affecting control instructions<br />

These rules aim at <strong>de</strong>tecting faults affecting the control instructions (branch<br />

instructions). According to the branching type‚ the rules are classified as:<br />

Rules addressing errors affecting the conditional control instructions (i.e.<br />

test instructions‚ loops);<br />

Rules addressing errors affecting the unconditional control instructions (i.e.<br />

calls and returns from procedures).<br />

2.1.3.1. Rules targeting errors affecting the conditional control instructions<br />

The principle is to recheck the evaluation of the condition and the resulting<br />

jump. If the value of the condition remains unchanged after re-evaluation‚<br />

we assume that no error occurred. In the case of alteration of the condition<br />

an error procedure is called‚ as illustrated by the example in Figure 4-3.<br />

2.1.3.2. Rules targeting errors affecting the unconditional control instructions<br />

The i<strong>de</strong>a of these rules consists in the association of a control branch (called<br />

ctrl_branch) flag to every procedure in the program. At the beginning of each<br />

procedure a value is assigned to ctrl_branch. This flag is checked <strong>for</strong> consistency<br />

be<strong>for</strong>e and after any call to the procedure in or<strong>de</strong>r to <strong>de</strong>tected possible<br />

errors affecting this type of instructions. The application of these rules is<br />

illustrated in Figure 4-4.

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

Saved successfully!

Ooh no, something went wrong!