Dynamic Dataflow Modeling in Ptolemy II - Ptolemy Project ...
Dynamic Dataflow Modeling in Ptolemy II - Ptolemy Project ...
Dynamic Dataflow Modeling in Ptolemy II - Ptolemy Project ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
{ ( [ 1 ] , [ 0 ] , ⊥), ( [ 0 ] , ⊥, [ 1 ] ) , ( ⊥ , [ 1 ] , [ 0]<br />
) }<br />
A block<strong>in</strong>g read on any <strong>in</strong>put port would not give the desired behavior. An actor with this<br />
set of fir<strong>in</strong>g rules can not be used <strong>in</strong> the current DDF implementation.<br />
3.4 Performance Comparison: SDF, DDF and PN<br />
<strong>Dataflow</strong> process networks have been shown to be a special case of Kahn process<br />
networks. In dataflow process networks, each process consists of repeated fir<strong>in</strong>gs of a<br />
dataflow actor, which def<strong>in</strong>es a quantum of computation. Us<strong>in</strong>g this quantum avoids the<br />
complexities and context switch<strong>in</strong>g overhead of process suspension and resumption<br />
<strong>in</strong>curred <strong>in</strong> most implementations of Kahn process networks. Instead of context<br />
switch<strong>in</strong>g, dataflow process networks are executed by schedul<strong>in</strong>g the actor fir<strong>in</strong>gs. This<br />
schedul<strong>in</strong>g can be done at compile time or at run time. SDF is scheduled at compile time.<br />
After the static schedule of an SDF graph is computed, the actors can be fired accord<strong>in</strong>g<br />
to the predeterm<strong>in</strong>ed sequence specified by the schedule. DDF is scheduled at run time,<br />
which is much more expensive.<br />
To compare the performance of the SDF, DDF and PN doma<strong>in</strong>s, we simulated one SDF<br />
model under all three doma<strong>in</strong>s and plotted the runn<strong>in</strong>g time <strong>in</strong> each doma<strong>in</strong>. The model<br />
was slightly modified from ViterbiDecoder created by Rachel Zhou and Edward Lee so<br />
that we can better control the number of iterations <strong>in</strong> each doma<strong>in</strong>. We also replaced<br />
orig<strong>in</strong>al MonitorValue actors with Discard actors so that their graphical displays would<br />
not slow down the simulation. The f<strong>in</strong>al model conta<strong>in</strong>s 30 actors. As we can see from<br />
Figure 3.6, the simulation <strong>in</strong> the PN doma<strong>in</strong> takes about twice as long as that <strong>in</strong> the DDF<br />
doma<strong>in</strong>, and both are proportional to the number of iterations. SDF has an upfront cost<br />
40