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.

Evaluation of Applying SpecC to the Integrated Design Method 143<br />

block in trap, a behavior needs to be <strong>de</strong>scribed so the dummy behavior which<br />

does nothing is used.<br />

Three kinds of channels are used <strong>for</strong> each <strong>de</strong>scription of the transmitter<br />

part and the receiver part. Since data is passed one byte at a time between<br />

tx_byte and tx_bit, and rx_byte and rx_bit, raw data is directly copied between<br />

these behaviors. However, pointers are used to pass IP packet and PPP packet<br />

between the application and tx_ppp, tx_ppp and tx_byte to avoid the data<br />

copy. The SpecC co<strong>de</strong> of a byte channel which <strong>de</strong>livers 1-byte data is shown<br />

in Figure 11-4. PPP packet channels (ppp_packet_channel) and IP packet<br />

channels (ip_packet_channel) also use same structure as a byte channel except<br />

<strong>for</strong> the type of data to be <strong>de</strong>livered.<br />

To confirm the SIO system <strong>de</strong>scription, the serial lines of the transmitter<br />

and the receiver are connected (loop back) and simulation is per<strong>for</strong>med using<br />

the test bench where tx_ppp transmits an IP packet to rx_ppp. SpecC reference<br />

compiler (SCRC 1.1) is used <strong>for</strong> the simulation environment. The results<br />

of the simulation show that the SIO system <strong>de</strong>scription operates correctly.<br />

Despite the redundancy in the <strong>de</strong>scription of the reset function, the SIO<br />

system has been <strong>de</strong>scribed using parallelism and synchronization and communication<br />

statements in SpecC. Thus, SpecC satisfies evaluation point (1)<br />

<strong>de</strong>scribed in section 3.<br />

4.1. SpecC <strong>de</strong>scription gui<strong>de</strong>lines<br />

In the SIO system <strong>de</strong>scription, system functions with equal execution timing<br />

are inclu<strong>de</strong>d in the same behavior. The system functions are grouped into<br />

behaviors according to their activation frequencies. The point where the<br />

execution frequency changes is consi<strong>de</strong>red as a suitable point <strong>for</strong> software and<br />

hardware partitioning so the behaviors in Figure 11-3 are arranged according<br />

their activation frequency, with the right most behavior having the highest<br />

frequency.<br />

The main purpose of introducing channels to SpecC is to make the functional<br />

<strong>de</strong>scriptions in<strong>de</strong>pen<strong>de</strong>nt from the <strong>de</strong>scription of synchronization and<br />

communication by collecting synchronization and communication mechanism<br />

to a channel. In the SpecC <strong>de</strong>scription of the SIO system, the <strong>de</strong>scriptiveness<br />

and readability of the behavior has improved since the behavior contains only<br />

its functionality. Describing the behaviors that needs to communicate with the<br />

upper and the lower layer, like tx_ppp and tx_byte, without using channels is<br />

difficult. Thus, synchronization and communication mechanism should be<br />

collected and <strong>de</strong>scribed in a channel where possible. Collecting synchronization<br />

and communication functionalities to a channel also makes the conversion<br />

of a software from a SpecC <strong>de</strong>scription efficient. This is further <strong>de</strong>scribed<br />

in Section 5.

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

Saved successfully!

Ooh no, something went wrong!