Top Up Prev Next Bottom Contents Index Search

13.6 Stars

As mentioned earlier, stars in the CG domain are used only to test and debug schedulers. Thus the stars in the palette shown in figure 13-2 on page 13-15 act generate only comments, and allow the user to model star parameters that are relevant to schedulers such as the number of samples produced and consumed on each firing, and the execution time of the star. By default, any star that is derived from 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 -1 which 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 YES for 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.

The following gives an overview of CG domain stars.

MultiIn Takes multiple inputs and produces one output.
MultiInOut Takes multiple inputs and produces multiple outputs.
MultiOut Takes one input and produces multiple outputs.
RateChange Consumes consume samples and produces produce samples.
Sink Swallows an input sample.
Source Generic code generator source star; produces a sample.
Switch This star requires a BDF scheduler. It switches input events to one of two outputs, depending on the value of the control input.
Through Passes data through. The run time can be set to reflect computation time.
TestMultirate (five icons) The TestMultirate stars 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.


Top Up Prev Next Bottom Contents Index Search

Copyright © 1990-1997, University of California. All rights reserved.