better debugging messages on ProperStopper
authorAdam Megacz <adam.megacz@sun.com>
Fri, 29 May 2009 06:30:21 +0000 (06:30 +0000)
committerAdam Megacz <adam.megacz@sun.com>
Fri, 29 May 2009 06:30:21 +0000 (06:30 +0000)
testCode/com/sun/vlsi/chips/marina/test/ProperStopper.java

index 8783725..484ac8e 100644 (file)
@@ -355,7 +355,6 @@ public class ProperStopper {
      * drainStopperMany() will stop cleanly.
      * exit state: stop */
     public List<BitVector> drainMany(int maxNbItems) {
-        prln("begin drainMany. stopper="+name);
         adjustIndent(2);
         
         stop();
@@ -372,15 +371,14 @@ public class ProperStopper {
             if (myState==StateWireState.EMPTY || cnt>=maxNbItems) break;
                 
             cnt++;
-            if (maxNbItems>1)
-                indenter.pr("  drainMany: reading word number: "+cnt+
-                            "/"+(maxNbItems==Integer.MAX_VALUE
-                                 ?"unlimited":(""+maxNbItems))+
-                            "... ");
+            indenter.pr("  drain"+(maxNbItems==0?"":"Many")+
+                        ": reading word"+(maxNbItems==0?":":" number "+cnt+
+                        "/"+(maxNbItems==Integer.MAX_VALUE
+                             ?"unlimited":("at-most-"+maxNbItems))+": "));
 
             BitVector d = drainNoCheck();
             if (maxNbItems>1)
-                prln("  done.");
+                prln("  got "+new MarinaPacket(d));
 
             ans.add(d);
         }