at.dms.kjc.spacetime
Class Rawify

java.lang.Object
  extended by at.dms.kjc.spacetime.Rawify

public class Rawify
extends Object

This class will rawify the SIR code and it creates the switch code. It does not rawify the compute code in place. This class will create the code necessary to execute the init schedule, the prime pump schedule, and the steady state schedule. It will cycle over the schedules and generate the code necessary.


Field Summary
static int SC_FILTER_THRESH
           
static int SC_INS_THRESH
           
static int SC_THRESHOLD
           
static boolean SWITCH_COMP
           
 
Constructor Summary
Rawify()
           
 
Method Summary
static boolean compressFilterSwitchIns(int mult, int pop, int push, boolean init)
          Return true if we should compress the switch instructions of the filter with mult, pop, and push.
static HashSet<RawComputeNode> getTilesUsedInSplit(OutputSliceNode traceNode, StreamingDram sourcePort)
          For a split outputtracenode, get the tiles used in the splitting, this includes all tiles whose switches have code on them.
static void processFilterSlices(Slice slice, SchedulingPhase whichPhase, RawProcElements rawChip)
          First generate the dram commands for input/output to/from the first/last filters of the trace.
static void processInputSliceNode(InputSliceNode traceNode, SchedulingPhase whichPhase, RawProcElements rawChip)
          Create dram commands and switch code to implement the joining described by the input trace node.
static void processOutputSliceNode(OutputSliceNode traceNode, SchedulingPhase whichPhase, RawProcElements rawChip)
          Create the dram commands and the switch code to implement the splitting described by the output trace node.
static void run(SpaceTimeSchedule schedule, RawChip rawChip, Layout<RawTile> layout)
          The entry of the rawify pass.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SWITCH_COMP

public static boolean SWITCH_COMP

SC_THRESHOLD

public static int SC_THRESHOLD

SC_INS_THRESH

public static int SC_INS_THRESH

SC_FILTER_THRESH

public static int SC_FILTER_THRESH
Constructor Detail

Rawify

public Rawify()
Method Detail

run

public static void run(SpaceTimeSchedule schedule,
                       RawChip rawChip,
                       Layout<RawTile> layout)
The entry of the rawify pass. This function iterates over the schedules for the 3 phases (init, priming, steady) and generates the compute code and communicate code necessary to execute the schedule!

Parameters:
schedule -
rawChip -
layout -

processFilterSlices

public static void processFilterSlices(Slice slice,
                                       SchedulingPhase whichPhase,
                                       RawProcElements rawChip)
First generate the dram commands for input/output to/from the first/last filters of the trace. Then iterate over the filters of the trace and generate computation and intra-trace communication (static net) code.

Parameters:
slice -
whichPhase - INIT / PRIMEPUMP / STEADY
rawChip -

processOutputSliceNode

public static void processOutputSliceNode(OutputSliceNode traceNode,
                                          SchedulingPhase whichPhase,
                                          RawProcElements rawChip)
Create the dram commands and the switch code to implement the splitting described by the output trace node.

Parameters:
traceNode -
whichPhase - INIT / PRIMEPUMP / STEADY
rawChip -

processInputSliceNode

public static void processInputSliceNode(InputSliceNode traceNode,
                                         SchedulingPhase whichPhase,
                                         RawProcElements rawChip)
Create dram commands and switch code to implement the joining described by the input trace node.

Parameters:
traceNode -
whichPhase - INIT / PRIMEPUMP / STEADY
rawChip -

getTilesUsedInSplit

public static HashSet<RawComputeNode> getTilesUsedInSplit(OutputSliceNode traceNode,
                                                          StreamingDram sourcePort)
For a split outputtracenode, get the tiles used in the splitting, this includes all tiles whose switches have code on them.

Parameters:
traceNode -
sourcePort -
Returns:
Set of tiles used in the splitting

compressFilterSwitchIns

public static boolean compressFilterSwitchIns(int mult,
                                              int pop,
                                              int push,
                                              boolean init)
Return true if we should compress the switch instructions of the filter with mult, pop, and push.

Parameters:
mult - The multiplicity.
pop - The pop rate.
push - The push rate.
init - Are we in the init stage?
Returns:
True if we should compress the switch instructions.