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.

RTOS Mo<strong>de</strong>ling <strong>for</strong> System Level Design 63<br />

4.2.2. Synchronization refinement<br />

In the specification mo<strong>de</strong>l‚ all synchronization in the application or insi<strong>de</strong><br />

communication channels is implemented using SLDL events. Synchronization<br />

refinement wraps corresponding event handling routines of the RTOS mo<strong>de</strong>l<br />

around the event-related primitives (Figure 5-7). Each wait statement in the<br />

co<strong>de</strong> is enclosed in a pair of enter_wait / wakeup_wait calls to notify the RTOS<br />

mo<strong>de</strong>l about corresponding task state changes. Note that there is no need to<br />

refine notify primitives as the state of the calling task is not influenced by<br />

those calls.<br />

After mo<strong>de</strong>l refinement‚ both task management and synchronization are<br />

implemented using the system calls of the RTOS mo<strong>de</strong>l. Thus‚ the dynamic<br />

system behavior is completely controlled by the RTOS mo<strong>de</strong>l layer.<br />

4.3. Implementation<br />

The RTOS mo<strong>de</strong>l library is implemented in approximately 2000 lines of SpecC<br />

channel co<strong>de</strong> [16]. The library contains mo<strong>de</strong>ls <strong>for</strong> different scheduling strategies<br />

typically found in RTOS implementations‚ e.g. round-robin or prioritybased<br />

scheduling [14]. In addition‚ the mo<strong>de</strong>ls are parametrizable in terms of<br />

task parameters‚ preemption‚ and so on.<br />

Task management in the RTOS mo<strong>de</strong>ls is implemented in a customary

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

Saved successfully!

Ooh no, something went wrong!