CGStar(the base class for all code generation stars), including all the stars in the CG domain, have the state procId. This state is used during manual partitioning to specify the processor that the star should be scheduled on. The default value of the state is
-1which specifies to the scheduler that automatic partitioning should be used. Processors are numbered 0,1,2,...; hence, if the state is set to
1, then the star will be scheduled on the second processor in the architecture. Note that the target parameter manualAssignment should be
YESfor this to work; if manualAssignment is
NO, then the value of procID will be ignored (due to a bug in the current implementation). If the user wants to specify a processor assignment for only a subset of the stars in the system, and do automatic assignment for the remaining stars, then this is currently not possible. It can be done in a roundabout manner using the resources parameter. This is done by defining a resources state in the star. The value of this state is a number that specifies the processor on which this star should go on. The target parameter resources is left empty. Then, the scheduler will interpret the value of the resources state as the processor on which the star should be scheduled; stars that do not specify any resources are mapped automatically by the scheduler.
The resources state just described is used mainly for specifying any special resources that the star might require in the system. For example, an A/D converter star might require an input port, and this port is accessible by only a subset of all the processors in the system; in this case, we would like the A/D star to be scheduled on a processor that has access to the input port. In order to specify this, the resources state in the star is defined and set to a string containing the name of the resource (e.g.,
input_port). Use commas to delimit multiple resources (e.g.,
input_port,output_port). The target parameter resources is specified using the same resource names (e.g.,
input_port) as explained in section
13.2.3 on page 13-3. The scheduler will then schedule stars that request certain resources on processors that have them. By default, stars do not have the resources state.
MultiInTakes multiple inputs and produces one output.
MultiInOutTakes multiple inputs and produces multiple outputs.
MultiOutTakes one input and produces multiple outputs.
RateChangeConsumes consume samples and produces produce samples.
SinkSwallows an input sample.
SourceGeneric code generator source star; produces a sample.
SwitchThis star requires a BDF scheduler. It switches input events to one of two outputs, depending on the value of the control input.
ThroughPasses data through. The run time can be set to reflect computation time.
TestMultirate(five icons) The
TestMultiratestars parallel those in the SDF domain. These stars are useful for testing schedulers. The number of tokens produced and consumed can be specified for each star, in addition to its execution time.