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.

60 Chapter 5<br />

Event handling in the RTOS mo<strong>de</strong>l sits on top of the basic SLDL synchronization<br />

events. Two system calls‚ enter_wait and wakeup_wait‚ are<br />

wrapped around each SpecC wait primitive. This allows the RTOS mo<strong>de</strong>l to<br />

update its internal task states (and to reschedule) whenever a task is about to<br />

get blocked on and later released from a SpecC event.<br />

During simulation of high-level system mo<strong>de</strong>ls‚ the logical time advances<br />

in discrete steps. SLDL primitives (such as wait<strong>for</strong> in SpecC) are used to<br />

mo<strong>de</strong>l <strong>de</strong>lays. For the RTOS mo<strong>de</strong>l‚ those <strong>de</strong>lay primitives are replaced by<br />

time_wait calls which mo<strong>de</strong>l task <strong>de</strong>lays in the RTOS while enabling support<br />

<strong>for</strong> mo<strong>de</strong>ling of task preemption.<br />

4.2. Mo<strong>de</strong>l refinement<br />

In this section‚ we will illustrate application mo<strong>de</strong>l refinement based on the<br />

RTOS interface presented in the previous section through a simple yet typical<br />

example of a single PE (Figure 5-4). In general‚ the same refinement steps<br />

are applied to all the PEs in a multi-processor system. The unscheduled mo<strong>de</strong>l<br />

(Figure 5-4(a)) executes behavior B1 followed by the parallel composition of

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

Saved successfully!

Ooh no, something went wrong!