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.

268 Chapter 20<br />

Let<br />

be an acyclic path through PN no<strong>de</strong>s (places<br />

and transitions). The direction of edges in the path L <strong>de</strong>fines a sequence of<br />

the transitions of L, in the or<strong>de</strong>r that appears in the path. We say that L is<br />

fireable at a given marking if the sequence of transitions <strong>de</strong>fined in this way<br />

is fireable at the marking. We consi<strong>de</strong>r a sequence of markings of a path as<br />

follows.<br />

DEFINITION 2 (Marking sequence of a path). A marking sequence M(L) of<br />

a path<br />

is obtained by the consecutive application of<br />

marking equations <strong>for</strong> firing transitions<br />

starting from a marking<br />

where<br />

We call the intrinsic final marking of L.<br />

DEFINITION 3 (Consumption in<strong>de</strong>x of a path). A consumption in<strong>de</strong>x of a<br />

place p with respect to a path L is the maximum of over all that<br />

belong to a marking sequence M(L), i.e.<br />

The statement similar to Property 1 links consumption in<strong>de</strong>xes of a path<br />

with the path fireability.<br />

PROPERTY 2. A path L is fireable from a marking M if and only if<br />

The efficiency of the path-based compression strongly <strong>de</strong>pends upon the<br />

choice of the candidate paths. In general, a PN graph has too many paths to<br />

be consi<strong>de</strong>red exhaustively. However the specification style might favour some<br />

of the paths with respect to others. For example it is very common to encapsulate<br />

the conditional constructs within a single block. The good specification<br />

styles usually suggest entering such blocks through the head (mo<strong>de</strong>lled<br />

in PN by a choice place) and exiting them through the tail (mo<strong>de</strong>lled in PN<br />

by a merge place). These paths are clearly good candidates to try during<br />

compression. Another potential advantage of paths from conditional constructs<br />

is that several of them might start from the same place and end with the same<br />

place. If they have the same consumption in<strong>de</strong>xes and if their intrinsic final<br />

markings are the same, then only one of the paths needs to be stored because<br />

the conditions and final result of their firings are the same. Such alternative<br />

paths in PN are called schedule-equivalent.<br />

A simple example of a co<strong>de</strong> with conditional is shown in Figure 20-3, where<br />

the last parameter of each port access indicates the number of tokens to<br />

read or write.<br />

Paths and correspond to alternative<br />

branches of computation and, as it is easy to see, are schedule-equivalent<br />

because they both start from the same place end by the same place<br />

and consume the same number of tokens from input port IN with the same

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

Saved successfully!

Ooh no, something went wrong!