add Gadgets.dispatch()
authormegacz <adam@megacz.com>
Thu, 12 Mar 2009 22:22:09 +0000 (15:22 -0700)
committermegacz <adam@megacz.com>
Thu, 12 Mar 2009 22:22:09 +0000 (15:22 -0700)
src/edu/berkeley/fleet/ir/Gadgets.java

index f45b63d..06246cd 100644 (file)
@@ -221,6 +221,14 @@ public class Gadgets {
         return merger.getDock("out");
     }
 
+    public static void dispatch(FleetProcess fp, Context ctx) {
+        ArrayList<Instruction> ai;
+        ctx.emit(ai = new ArrayList<Instruction>());
+        for(Instruction ins : ai) {
+            fp.sendInstruction(ins);
+        }
+    }
+
     public static void main(String[] s) throws Exception {
         Random random = new Random(System.currentTimeMillis());
         Fleet fleet = new Fpga();