An SDF graph consists of nodes and arcs.
Nodes represent operations which are called *actors*.
Arcs represent data values called *tokens* which stored in
first-in first-out (FIFO) queues.
The word token is used because each data values can represent any
data type (e.g. integer or real) or any data structure (e.g. matrix
or image).

SDF graphs obey the following rules:

- An actor is enabled for execution when enough tokens are available on all of the inputs, and source actors are always enabled.
- When an actor executes, it always produces and consumes the same fixed amount of tokens.
- The flow of data through the graph may not depend on values of the data.
- Delay is a property of an arc, and a delay of n samples means that n tokens are initially in the queue of that arc.

A ------> B ------> C 20 10 20 10The notation means that when 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 first step in scheduling an SDF graph for execution is that we must
figure out how many times to execute each actor so that all of the
intermediate tokens that are produced get consumed.
This process is known as *load balancing*.
Load balancing is implemented by an algorithm that is linear in time
and memory in the size of the SDF graph.
The size of an SDF graph, as we will discover in more detail later, is

where log_{2} gives the number of bits used to represent
the integer argument.

In the example SDF graph above, we must

- Fire A 1 time
- Fire B 2 times
- Fire C 4 times

The next step is to schedule the firings required by load balancing so as to resolve the data dependencies. Due to rate changes in the graph, the worst case for scheduling is a polynomial function of an exponential function of the size of the SDF graph. The polynomial function is shown next for two scheduling algorithms:

- list scheduling - quadratic algorithm
- looped scheduling - cubic algorithm

Possible schedules for the above SDF graph is ABCCBCC for the list scheduler and A (2 B(2 C)) for the looped scheduler. The generated code to execute the schedule A (2 B(2 C)) would be the following:

code block for A for (i = 0; i < 2; i++) { code block for B for (j = 0; j < 2; j++) { code block for C } }The schedule A (2 B(2 C)) is an example of a

The scheduling algorithms could actually return several different valid schedules, such as those shown below.

1. | List Scheduler | ABCBCCC | 50 |

2. | Looped Scheduler | A (2 B(2 C)) | 40 |

3. | Looped Scheduler | A(2 B)(4 C) | 60 |

4. | Looped Scheduler | A(2 BC)(2 C) | 50 |

- 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.