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.

144 Chapter 11<br />

5. CONVERSION OF SPECC DESCRIPTION<br />

This section discusses the conversion technique from a SpecC <strong>de</strong>scription to<br />

a <strong>de</strong>vice, a <strong>de</strong>vice driver and the interface in between. For the conversion of<br />

a <strong>de</strong>vice driver and interface, we use evaluation point (2) <strong>de</strong>scribed in section<br />

3. The partition of the software and the hardware is the byte channel. The<br />

<strong>de</strong>scription of the layer above the byte channel is converted into a <strong>de</strong>vice<br />

driver <strong>de</strong>scription in C-language program and the <strong>de</strong>scription of the layer<br />

below the byte channel is converted into a <strong>de</strong>vice <strong>de</strong>scription in VHDL and<br />

the byte channel is converted into an interface in between. The conversions<br />

are ma<strong>de</strong> mechanically where possible. The converted software part (<strong>de</strong>vice<br />

driver) in C-language is linked with<br />

specification real-time kernel.<br />

The converted hardware part (<strong>de</strong>vice) in VHDL is synthesized <strong>for</strong> FPGA. The<br />

behavior of the implementations are verified using a prototype system with<br />

processor and FPGA. The results show that the behaviors of the implementations<br />

are correct.<br />

5.1. Device driver<br />

In the SIO system, the object of <strong>de</strong>vice driver conversion is the <strong>de</strong>scription<br />

ranging from the PPP generation and analysis behavior to the byte transmit<br />

and receive behavior.<br />

The SpecC behaviors can be classified into two: parallel execution and used<br />

functionally. Behaviors executed in parallel are converted into tasks and the<br />

other behaviors are converted into functions. Specifically, behaviors that are<br />

executed in parallel according to the par statement, are converted to tasks. In<br />

or<strong>de</strong>r to suspend the behavior until all the other behaviors executed through<br />

the par statement have been completed, the parent task executing the par<br />

statement is moved to the waiting state until all child tasks have completed<br />

execution.<br />

The try-trap-interrupt statement is converted into a <strong>de</strong>scription that uses<br />

the task exception-handling function of<br />

The task corresponding<br />

to the behavior <strong>de</strong>scribed in the try statement block is generated and an<br />

exception <strong>de</strong>mand to a task realizes the event. The exception handling routine<br />

calls functions that are converted from the behavior <strong>de</strong>scribed in the trap<br />

statement block and the interrupt statement block. Other behaviors such as<br />

behaviors executed sequentially and behaviors within the fsm statement used<br />

to <strong>de</strong>scribe FSM are converted into functions. In the SIO system, the PPP<br />

generation and analysis behavior and the byte transmit and receive behavior<br />

are each converted to one task since they are executed in parallel and do not<br />

call any other behavior.<br />

A channel can be mechanically converted into a software by realizing the<br />

atomic executions of methods encapsulated in channels, event triggers (notify<br />

statement) and suspension of execution (wait statement) using semaphores<br />

and eventflags provi<strong>de</strong>d in However, since the provi<strong>de</strong>s

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

Saved successfully!

Ooh no, something went wrong!