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.

42 Chapter 4<br />

operand of an existing jump‚ or by trans<strong>for</strong>ming an instruction into a jump<br />

instruction) producing thus a faulty execution flow. To <strong>de</strong>tect this type of error‚<br />

we associate to each basic block in the program a boolean flag called<br />

status_block. This flag takes the value “0” if the basic block is active and<br />

“1” <strong>for</strong> the inactive state. At both the beginning and the end of each basic<br />

block‚ the value of the status_block is incremented modulo 2. In this way<br />

the value of the status_block is always “1” at the beginning of each basic<br />

block and “0” at the end of each block. If an error provokes a jump to the<br />

beginning of a wrong block (including an erroneous restarting of the currently<br />

executed block) the status_block will take the value “0” <strong>for</strong> an active block<br />

and “1” <strong>for</strong> an inactive state block. This abnormal situation is <strong>de</strong>tected at the<br />

first check pre<strong>for</strong>med on gef flag due to the inappropriate values taken by<br />

the control flow flags. The application of these rules is illustrated in Figure<br />

4-2.

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

Saved successfully!

Ooh no, something went wrong!