at.dms.kjc.spacedynamic
Class SimpleSimulator
java.lang.Object
at.dms.kjc.spacedynamic.Simulator
at.dms.kjc.spacedynamic.SimpleSimulator
public class SimpleSimulator
- extends Simulator
This class will create switch code (but not create the file) for a
layout that has no overlapping routes. It does not really simulate the
execution of the graph, it just dumps the switch code based the properties
of the filters and joiners.
- Author:
- mgordon
Fields inherited from class at.dms.kjc.spacedynamic.Simulator |
currentJoinerCode, initJoinerCode, initSchedules, initSimulation, joinerCode, joinerSimulator, layout, rawChip, ssg, steadyJoinerCode, steadySchedules, switchSchedules, toplevel |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleSimulator
public SimpleSimulator(SpdStaticStreamGraph ssg,
JoinerSimulator joinerSimulator)
isSimple
public static boolean isSimple(Layout layout)
- Parameters:
layout
- The layout.
- Returns:
- True if the layout is simple (meaning no overlapping routes
and no empty tiles involved in routing) and we can use the simple
simulator to generate switch code.
simulate
public void simulate()
- Specified by:
simulate
in class Simulator
canFire
public boolean canFire(FlatNode node,
HashMap<FlatNode,Integer> executionCounts,
SimulationCounter counters)
- Specified by:
canFire
in class Simulator
fireJoiner
protected int fireJoiner(FlatNode fire,
SimulationCounter counters,
HashMap<FlatNode,Integer> executionCounts)
- Description copied from class:
Simulator
- this method should fire a joiner, assuming the joiner can fire, and update the
simulation state
- Specified by:
fireJoiner
in class Simulator