The two steps in scheduling an SDF graph are:

- compute the repetitions vector which tells how many times to execute each actor to bring the graph back to its original state, and
- find an order of the firings using the repetitions vector that satisfies the data dependencies in the graph.

A ------> B ------> C 20 10 20 10When A executes, it produces 20 tokens. When B executes, it consumes 10 tokens and produces 20 tokens. When C executes, it consumes 10 tokens.

The repetitions vector is computed by the following linear-time algorithm :

- Pick a node at random
- Set the firing rate of that node to 1.
- Traverse the graph and set the appropriate firing rates based on the production and consumption on each arc.
- Normalize all fractional firings to integers by multiplying each firing rate by the least common multiple all of the denominators

For the SDF graph below,

--> A ------> B ---- | 4 20 10 20 | | | | | ----[4]---- C <---------- 2 10where [4] means a four-sample delay, a repetitions vector cannot be found. If the firing rate for A is set to 1, then the firing rate of B would be 2, and so the firing rate of C would be 4, and so the firing rate of A should be 2, which it is not. We can modify this graph as shown below to make it consistent:

--> A ------> B ---- | 4 20 10 20 | | | | | ----[4]---- C <---------- 1 10

FileRead ------> Median ------> FileWrite 1 1 1 1This is an example of homogeneous SDF:

- all actors produce and consume 1 token
- every directed loop must have at least one delay

-------- ----------- --------- -------- -->| filter |-->| down by 2 |-->| up by 2 |-->| filter |-- | -------- ----------- --------- -------- | 1 | 1 1 2 1 1 2 1 1 | ----- | ->| | ---| | + |--> | ->| | | | ----- | -------- ----------- --------- -------- | 1 1 -->| filter |-->| down by 2 |-->| up by 2 |-->| filter |-- -------- ----------- --------- -------- 1 1 2 1 1 2 1 1

----------- | first | -->| polyphase |---- | | filter | | 1 | ----------- | 1 ------------- | 1 1 | ------------ | |-- -->| | --->| Distributor | | Commutator |---> | |-- -->| | ------------- | ----------- | ------------ 2 1 | | second | | 1 2 -->| polyphase |---- | filter | ----------- 1 1

FileRead ------> FFT ------> FileWrite 1 16 16 1The Fast Fourier Transform takes N tokens as input and produces N tokens as output. Assuming that the tokens are scalars, the Fast Fourier Transform implements the equation

N-1 2 Pi k n --- - j -------- \ N X[k] = | x[n] e for k = 0, 1, ..., N - 1 / --- n=0In the above diagram, even though the system does not change sampling rates, the load balancing produces a repetitions vector [16 1 16] that seems as if the sampling rates are being changed.

---------------> Fork -------------> Add ----> | ^ -------\ /-------- X -------/ \-------- | v -----> Scale --> Fork --- Negate --> Add ---->

- Shuvra S. Bhattacharyya, Praveen K. Murthy, and Edward A. Lee,
*Software Synthesis from Dataflow Graphs*, Kluwer Academic Press, Norwell, MA, ISBN 0-7923-9722-3, 1996. - S. S. Bhattacharyya, P. K. Murthy, and E. A. Lee,
``APGAN
and RPMC: Complimentary Heuristics for Translating DSP Block Diagrams
into Efficient Software Implementations'',
*Design Automation for Embedded Systems Journal*, to appear.

Updated 02/08/00.