[Next] [Previous] [Top]

Automatic Code Generation for Heterogeneous Multiprocessors

Inter-CG Interface


To allow the use of heterogenous schedulers in an application, we implement something similar to the Wormhole construct in Ptolemy. The use of Wormholes in a simulation context is detailed in [1]. Here we use it as an interface between schedulers in a code generation context. For example, in our heterogeneous target we could use a BDF scheduler (which works only for a uniprocessor) on the control processor (workstation) and a loop scheduler on the DSP card(s). The user can choose the most appropriate scheduler for each processor.

A CGWormhole is constructed whenever there is a scheduler change from one level of the user-specified graph hierarchy to another, as in figure 1. From the outside, the CGWormhole appears to be a monolithic actor. This actor is constructed from send and receive actors for each arc leading into/out of the Wormhole. The inside interface is constructed by splicing two actors into the inner graph: a data source for all the receive actors and a sink for all the send actors.

The strength of this type of interface is clear: we are able to use the most appropriate scheduler for any part of the application. This advantage, however, comes at the possible loss of exploitable parallelism. Another potential problem is that we could introduce deadlock as shown in figure 2. In this figure, the dotted lines represent an arbitrary user-specified boundary. Here, the resultant top-level graph would be deadlocked, even though the original graph was not. This condition is returned to the user as an error at the time of scheduling.


Automatic Code Generation for Heterogeneous Multiprocessors

[Next] [Previous] [Top]