putMemoryShipInDispatchMode() now puts both out and inCBD in infinite-recieve mode
[fleet.git] / src / edu / berkeley / fleet / loops / CodeBag.java
index e14ed17..6478802 100644 (file)
@@ -40,13 +40,14 @@ public class CodeBag {
      *  Memory ship memoryShip at the address given by baseAddress.
      */
     CodeBag(Program program, Instruction[] instructions, long baseAddress) {
+        int MAX_BAG_SIZE = (1<<7)-1;
+        if (instructions.length > MAX_BAG_SIZE)
+            throw new RuntimeException("warning: code bag size is "+instructions.length+
+                                       ", which exceeds maximum of "+MAX_BAG_SIZE+
+                                       "; breaking into multiple bags");
         this.program = program;
         this.instructions = instructions;
         this.baseAddress = baseAddress;
-
-        // FIXME
-        if (instructions.length >= (1<<7))
-            throw new RuntimeException("code bag size is "+instructions.length+", which exceeds maximum of "+((1<<7)-1));
     }
 
 }