| | 85 | This chapter describes the DSX/L constructs used to define the Task & Communication Graph structure. |
| | 86 | The TCG is a bipartite graph: the two types of nodes are the tasks and the communication channels. |
| | 87 | The following figure describes the TCG corresponding to an MJPEG decoder application. The two TG & RAMDAC tasks will be implemented as hardware coprocessors : the TG component implements a wire-less receiver, and the RAMDAC component is a graphic display controller. The 5 other tasks can be implemented as ''software tasks'' or |
| | 88 | as ''hardware tasks''. In this example, all MWMR communication channels have one single producer, and one |
| | 89 | single consumer, which is frequent for stream oriented multi-media applications. |
| | 90 | |
| | 91 | === C1) Task Model definition === |
| | 92 | |
| | 93 | As a software application can instanciate several instances of the same task, we must distinguish the task, and the task model. A task model defines the code associated to the task, and the task interface (corresponding to the system resources used by the task : MWMR communications channels, synchronization barriers, locks, and memspaces). |
| | 94 | {{{ |
| | 95 | Task_model = Task( 'model_name', |
| | 96 | infifos = [ 'inport_name', ... ] , |
| | 97 | outfifos = [ 'outport_name', ... ] , |
| | 98 | locks = [ 'lock_name', ... ] , |
| | 99 | barriers = [ 'barrier_name', ... ] , |
| | 100 | memspaces = [ 'memspace_name', ... ] , |
| | 101 | signals = [ 'signal_name', ... ] , |
| | 102 | impls = [ SwTask( 'func', stack_size = 1024 , sources = [ 'func.c' ] ) |
| | 103 | }}} |
| | 104 | I a task does not use a given type of resource, the corresponding parameter can be skipped. |
| | 105 | |
| | 106 | === C2) MWMR communication channel definition === |
| | 107 | |
| | 108 | === C3) Synchronization barrier definition === |
| | 109 | |
| | 110 | === C4) Synchronization lock definition === |
| | 111 | |
| | 112 | === C5) Signal definition === |
| | 113 | |
| | 114 | === C6) Task instanciation === |