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.

State Space Compression in History 267<br />

Two questions need to be answered in applying the above compression<br />

technique.<br />

1.<br />

2.<br />

How to choose a sequence of transitions which should be fired at once<br />

How to <strong>de</strong>termine upfront that this sequence of transitions is fireable<br />

Let us first consi<strong>de</strong>r the second question, while the first question will be<br />

addressed in the Section 4.2. We use marking equations to check if a sequence<br />

of transitions is fireable. Since self-loops introduce inaccuracy in calculating<br />

the fireable transitions in the marking equations, let us assume in the rest of<br />

this section that a specification is provi<strong>de</strong>d as a PN without self-loops. 1 In<br />

the sequel, we may use a term trace to refer to a sequence of transitions.<br />

DEFINITION 1 (Consumption in<strong>de</strong>x of a trace). Let a trace S, firing from a<br />

marking produce a sequence of markings A<br />

consumption in<strong>de</strong>x of a place p with respect to is the maximum<br />

across all<br />

In<strong>for</strong>mally,<br />

shows how much the original token count <strong>for</strong><br />

a place p <strong>de</strong>viates while executing a trace S from a marking Applying<br />

the marking equations, the following is immediately implied:<br />

PROPERTY 1. A trace S, fireable from a marking<br />

marking if and only if<br />

is fireable from a<br />

Let us illustrate the application of this trace-based compression with the<br />

producer-consumer example in Figure 20-2. When a scheduler has executed<br />

a trace t3, t4 from a marking<br />

it could compute the consumption<br />

in<strong>de</strong>xes <strong>for</strong> that trace as:<br />

From this a scheduler can conclu<strong>de</strong> that t3, t4 is fireable from<br />

because according to Property 1 this marking has enough token resources <strong>for</strong><br />

executing the consi<strong>de</strong>red trace. Note that once a trace is known to be fireable<br />

at a given marking, the marking obtained after firing the trace can be<br />

analytically obtained by the marking equation. The scheduler can there<strong>for</strong>e<br />

fire the trace at once and compute the resulting marking, as shown in Figure<br />

20-2(c).<br />

4.2. Path-based compression<br />

The technique shown in the previous section relies on a scheduler to find<br />

candidate traces <strong>for</strong> compressing a schedule. This leaves the first question<br />

unanswered: how to find such candidate traces in the first place. This could<br />

be addressed through the analysis of the structure of the specification PN.

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

Saved successfully!

Ooh no, something went wrong!