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.

Interactive Ray Tracing on Reconfigurable SIMD Morphosys 157<br />

object merging. We will discuss these optimizations in more <strong>de</strong>tails in the next<br />

section.<br />

5. DATA STRUCTURE AND OPTIMIZATIONS<br />

We have <strong>de</strong>veloped a special data structure to support BSP mapping. This<br />

structure reduces data and contexts reload, as we <strong>de</strong>scribe in this section.<br />

Our data structure is created so that <strong>for</strong> each no<strong>de</strong> the objects un<strong>de</strong>r it are<br />

known immediately. The data structure is illustrated in Figure 12-5. In this<br />

figure, the item bit-length (e.g., 16 bits) is specified in parenthesis after each<br />

item. Child Address stands <strong>for</strong> the address of each child no<strong>de</strong> in FB. The<br />

objects <strong>de</strong>scending from this no<strong>de</strong> are grouped by object type. Sphere,<br />

cylin<strong>de</strong>r, rectangle and other objects stand <strong>for</strong> vectors where each bit indicates<br />

whether or not the object of this type specified by its positions belongs<br />

to this no<strong>de</strong>. Figure 12-5 gives one example <strong>for</strong> sphere case. We or<strong>de</strong>r all<br />

spheres as sphere 0, sphere 1, sphere 2, and so on. If any of these spheres<br />

belongs to the no<strong>de</strong>, the bit in<strong>de</strong>xed by its or<strong>de</strong>r is set to ‘1’ in the sphere<br />

vector. In this example, sphere 1, 3, 4 belong to the current no<strong>de</strong>. TinyRISC<br />

tests these vectors to know which geometrical data to operate on when<br />

incoherence happens. All the i<strong>de</strong>ntified objects un<strong>de</strong>r this no<strong>de</strong> are tested. In<br />

all the cases, the objects are tested only once. This is called “object merging”,<br />

or mailbox in [6]. If one object is tested, it is labeled as tested. The calculated<br />

value is retained in the FB. If one object to be tested has been labeled,<br />

this testing is cancelled, and the value is fetched from FB.<br />

This data structure automatically does “object test reor<strong>de</strong>ring”, which tests<br />

the same objects without context reload. For example, we check all the spheres<br />

be<strong>for</strong>e we continue with other object types. Moreover this data structure allows

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

Saved successfully!

Ooh no, something went wrong!