Top Up Prev Next Bottom Contents Index Search

17.3 Heterogeneous Support

In this section, we summarize the special routines to support heterogeneous targets. They are already explained in earlier chapters.

1. To specify the component targets , we first set childTypes state of the target class that must be derived from class CGMultiTarget. We may add special resources to the processors by setting resources state, a list of items separated by ';'. An item starts with the target index followed by a list of strings identifying resources. The relative computing speed of processors are specified by relTimeScales state.

2. An application program for a heterogeneous target uses wormholes. In pigi, all stars in a universe should be in the same domain. To overcome this restriction, we use wormhole representation to distinguish stars for different targets, or domains, but still in the same universe. Once the graph is read into the Ptolemy kernel, all wormholes of code generation domain are flattened to make a single universe: flattenWorm method of CGMultiTarget class. Currently, we manually partition the stars to different kinds of processors. For example, if we have three "default-CG96" targets and one "default-CG56" target, we partition the stars to two kinds: CG96 or CG56. This partitioning is based on the original wormhole representation. If we ignore this partitioning, we can apply an automatic scheduling with the flattened graph. This feature has not been tested yet even though no significant change is required in the current code.

3. When we schedule a star in the scheduling phase, we first obtain the list of processors that can schedule the star: candidateProcs method of CGMultiTarget class. The execution time of the star to a processor is computed in execTime method of CGMultiTarget class considering the relative speed of processors.

4. After scheduling is performed, we create sub-universes for child targets. In case manual partitioning is performed, we just clone the stars from the original graph in the sub-universes. In case we use automatic partitioning, we need to create a star in the current target with the same name as the corresponding star in the original graph: cloneStar private method of UniProcessor class. We assume that we use the same name for a star in all domains.

Top Up Prev Next Bottom Contents Index Search
Copyright © 1990-1997, University of California. All rights reserved.