better error messages in LoopFactory
authorAdam Megacz <adam@megacz.com>
Sat, 22 Aug 2009 21:28:03 +0000 (14:28 -0700)
committerAdam Megacz <adam@megacz.com>
Sat, 22 Aug 2009 21:28:03 +0000 (14:28 -0700)
src/edu/berkeley/fleet/loops/LoopFactory.java

index 1e79135..769a6fc 100644 (file)
@@ -372,7 +372,8 @@ public class LoopFactory {
 
         if (!olc_loop) {
             if (numInstructionsNotIncludingNonblockingPrefix > capacity)
-                throw new RuntimeException("instruction sequence is too long for instruction fifo at " + dock);
+                throw new RuntimeException("instruction sequence is too long for instruction fifo at " +
+                                           dock + " ("+numInstructionsNotIncludingNonblockingPrefix+">"+capacity+")");
         } else {
             if (count != 0) {
                 ic.add(new Instruction.Set(dock, Predicate.Default, SetDest.OuterLoopCounter, SetSource.Decrement));
@@ -397,7 +398,8 @@ public class LoopFactory {
         if (olc_loop) {
             ic.add(new Instruction.Tail(dock));
             if (loopSize > capacity)
-                throw new RuntimeException("instruction loop is too long for instruction fifo at " + dock);
+                throw new RuntimeException("instruction loop is too long for instruction fifo at " +
+                                           dock + " ("+loopSize+">"+capacity+")");
         }
 
         if (next != null) {