The Graph
Next: Scheduler - Dispatcher Up: C++ Environment for Synchronos Previous: Buffer as Connections Contents
Subsections
The Graph
A graph is a collection of operations connected by buffers. For this system a directed graph is used, which means an output of one operation points to one or more inputs of other operations, one input can be feed only by one output. There are operations without inputs (or not connected inputs) which are called sources and operations with no output or unconnected outputs which are called drains. (Actually the input points to a output in software implementation, but for constructing the DSP-Graph it is more easier to think the other way round.)
Here no recursion is allowed. There is a lot of discussion how to implement recursion in data-flow graphs, because it always implies a delay of at least one buffer length somewhere in the recursion loop, and it is often hard to decide where and therefore unpredictable behavior can occur. So this has been forbidden. If some ones needs recursion he can do it with a special pair of operations mostly called ''throw'' and ''catch'' to realize this and define the delay at this point.
insert,remove operation
If a new operation is needed, it must be created in the program with the new function, whereby parameter can be provided for creation. Then the operation can be inserted in the Graph with the function insert(SDFOperation *) . Anyway the operation can be removed with the function remove(SDFOperation *) , whereby all connections to and from this operation is deleted.
A pointer to the operation is returned on success or a NULL pointer on failure, whereby a only few failures are possible, which should appear more an creation of operations than on inserting.
connect, disconnect
An output of an operation can be connected and disconnected with the functions connect(SDFOperation* out,int o_n,SDFOperation* in,int i_n), disconnect(SDFConnection* ).
A connection is made if the in- and output to connect are compatible, which means, they need to be of the same type. The sample rate should also match, but this can only be detected at schedule time, when the data paths are tested and real buffers are assigned.
connect() returns the SDFConnection* and is NULL if an error is detected. disconnect() returns SDF_SUCCESS or SDF_FAIL.
navigate in operation list
There are several methods to navigate in the SDFGraph. First method is to go through the list of operations or connections or search a connection or operation in the list with its pointer. A second method is search the drains or sources and follow the connections. A better description how to do this is done in a later release of this manual.
Next: Scheduler - Dispatcher Up: C++ Environment for Synchronos Previous: Buffer as Connections Contents HAss.DI Winfried Ritsch - ritsch@algo.mur.at