at.dms.kjc.rstream
Class StrToRStream

java.lang.Object
  extended by at.dms.kjc.rstream.StrToRStream

public class StrToRStream
extends Object

The main driver class for the StreamIt to RStream backend. Used to house the run method that does all the work of translating the SIR into C code to be inputted to the RStream compiler.

Author:
Michael Gordon, Bill Thies, Jasper Lin

Field Summary
static boolean CONVERT_FOR_TO_DO_LOOPS
          look for do loops in the filter's code
static HashMap[] executionCounts
          The execution counts from the scheduler: [0] init, [1] steady
static boolean GENERATE_MIVS
          generate MIV buffer index expressions if possible
static boolean GENERATE_UNNECESSARY
          generate code for superfluous identites and splitter
static boolean HEADER_FOOTER_PEEK_RESTORE
          if true, generate a separate peek buffer for peeking filters before execution, restore the peek buffer to the pop buffer, after execution, backup the non-pop'ed items to the peek buffer If false, just move the un-pop'ed items from the end of the pop buffer to the beginning after the filter executes Please note that setting this to true is untested and produces unnecessary code, in fact I don't know why it is an option I guess I just want to keep around all the code I wrote.
static HashMap<FlatNode,Integer> initExecutionCounts
           
static HashMap<FlatNode,Integer> steadyExecutionCounts
           
static SIRStructure[] structures
          The structure defined in the application, see SIRStructure
 
Constructor Summary
StrToRStream()
           
 
Method Summary
static void addAll(HashSet<Object> set, Collection<Serializable> c)
          Helper function to add everything in a collection to the set
static void dumpExecutionCounts()
           
static int getMult(FlatNode node, boolean init)
           
static void run(SIRStream str, JInterfaceDeclaration[] interfaces, SIRInterfaceTable[] interfaceTables, SIRStructure[] structs, SIRHelper[] helpers, SIRGlobal global)
          The entry point of the RStream "backend" for the StreamIt Compiler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONVERT_FOR_TO_DO_LOOPS

public static final boolean CONVERT_FOR_TO_DO_LOOPS
look for do loops in the filter's code

See Also:
Constant Field Values

GENERATE_MIVS

public static final boolean GENERATE_MIVS
generate MIV buffer index expressions if possible

See Also:
Constant Field Values

GENERATE_UNNECESSARY

public static final boolean GENERATE_UNNECESSARY
generate code for superfluous identites and splitter

See Also:
Constant Field Values

HEADER_FOOTER_PEEK_RESTORE

public static final boolean HEADER_FOOTER_PEEK_RESTORE
if true, generate a separate peek buffer for peeking filters before execution, restore the peek buffer to the pop buffer, after execution, backup the non-pop'ed items to the peek buffer If false, just move the un-pop'ed items from the end of the pop buffer to the beginning after the filter executes Please note that setting this to true is untested and produces unnecessary code, in fact I don't know why it is an option I guess I just want to keep around all the code I wrote.

See Also:
Constant Field Values

executionCounts

public static HashMap[] executionCounts
The execution counts from the scheduler: [0] init, [1] steady


structures

public static SIRStructure[] structures
The structure defined in the application, see SIRStructure


initExecutionCounts

public static HashMap<FlatNode,Integer> initExecutionCounts

steadyExecutionCounts

public static HashMap<FlatNode,Integer> steadyExecutionCounts
Constructor Detail

StrToRStream

public StrToRStream()
Method Detail

run

public static void run(SIRStream str,
                       JInterfaceDeclaration[] interfaces,
                       SIRInterfaceTable[] interfaceTables,
                       SIRStructure[] structs,
                       SIRHelper[] helpers,
                       SIRGlobal global)
The entry point of the RStream "backend" for the StreamIt Compiler. Given the SIR representation of the application, this call will create the c code that will be accepted by the RStream compiler. The code will be placed in the current working directory.

Parameters:
str - The stream graph
interfaces - Not used
interfaceTables - Not used
structs - The structures used in this StreamIt application

addAll

public static void addAll(HashSet<Object> set,
                          Collection<Serializable> c)
Helper function to add everything in a collection to the set

Parameters:
set - The Hashset we want to add *c* to
c - The collection to add

getMult

public static int getMult(FlatNode node,
                          boolean init)

dumpExecutionCounts

public static void dumpExecutionCounts()