at.dms.kjc.spacedynamic
Class FineGrainSimulator

java.lang.Object
  extended by at.dms.kjc.spacedynamic.Simulator
      extended by at.dms.kjc.spacedynamic.FineGrainSimulator

public class FineGrainSimulator
extends Simulator

This class generates a schedule for the switch code by simulating the init schedule and one steady state execution of the schedule


Field Summary
 
Fields inherited from class at.dms.kjc.spacedynamic.Simulator
currentJoinerCode, initJoinerCode, initSchedules, initSimulation, joinerCode, joinerSimulator, layout, rawChip, ssg, steadyJoinerCode, steadySchedules, switchSchedules, toplevel
 
Constructor Summary
FineGrainSimulator(SpdStaticStreamGraph ssg, JoinerSimulator js)
           
 
Method Summary
 boolean canFire(FlatNode node, HashMap<FlatNode,Integer> executionCounts, SimulationCounter counters)
           
protected  int fireJoiner(FlatNode fire, SimulationCounter counters, HashMap<FlatNode,Integer> executionCounts)
          this method should fire a joiner, assuming the joiner can fire, and update the simulation state
 void simulate()
           
 
Methods inherited from class at.dms.kjc.spacedynamic.Simulator
addJoinerCode, asm, consumedItems, decrementExecutionCounts, fireMe, generateSwitchCode, itemsNeededToFire, needSimulator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FineGrainSimulator

public FineGrainSimulator(SpdStaticStreamGraph ssg,
                          JoinerSimulator js)
Method Detail

simulate

public void simulate()
Specified by:
simulate 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

canFire

public boolean canFire(FlatNode node,
                       HashMap<FlatNode,Integer> executionCounts,
                       SimulationCounter counters)
Specified by:
canFire in class Simulator