update test 3007
authorAdam Megacz <adam.megacz@sun.com>
Mon, 17 Nov 2008 22:39:10 +0000 (22:39 +0000)
committerAdam Megacz <adam.megacz@sun.com>
Mon, 17 Nov 2008 22:39:10 +0000 (22:39 +0000)
testCode/com/sun/vlsi/chips/marina/test/MarinaTest.java

index 4f20136..ce4a953 100644 (file)
@@ -705,6 +705,34 @@ public class MarinaTest {
                              false                  /* tokenOut    */
                              );
 
+    private static final Instruction SEND_DATA =
+        new Instruction.Move(DOCK,
+                             false,                 /* requeueing  */
+                             Predicate.IgnoreOLC,   /* predicate   */
+                             false,                 /* torpedoable */
+                             null,                  /* path        */
+                             false,                 /* tokenIn     */
+                             false,                 /* dataIn      */
+                             false,                 /* latchData   */
+                             false,                 /* latchPath   */
+                             true,                  /* dataOut     */
+                             false                  /* tokenOut    */
+                             );
+
+    private static final Instruction REQUEUEING_SEND_DATA =
+        new Instruction.Move(DOCK,
+                             true,                  /* requeueing  */
+                             Predicate.IgnoreOLC,   /* predicate   */
+                             false,                 /* torpedoable */
+                             null,                  /* path        */
+                             false,                 /* tokenIn     */
+                             false,                 /* dataIn      */
+                             false,                 /* latchData   */
+                             false,                 /* latchPath   */
+                             true,                  /* dataOut     */
+                             false                  /* tokenOut    */
+                             );
+
     private void testRequeueStage0(Marina marina) {
         prln("Begin testRequeueStage0");
        adjustIndent(2);
@@ -730,6 +758,8 @@ public class MarinaTest {
     }
 
     private void testRequeueStage0to1to3(Marina marina) {
+        List<BitVector> dataItems;
+
         prln("Begin testRequeueStage0to1to3");
        adjustIndent(2);
 
@@ -740,46 +770,32 @@ public class MarinaTest {
        marina.instrIn.fill(new Instruction.Set(DOCK,false,Predicate.IgnoreOLC,SetDest.InnerLoopCounter, 1));
 
        prln("Executing Send Data (requeueable); this will cause 0->1 transition and be discarded");
-        marina.instrIn.fill(new Instruction.Move(DOCK,
-                                                 false,                 /* requeueing  */
-                                                 Predicate.IgnoreOLC,   /* predicate   */
-                                                 false,                 /* torpedoable */
-                                                 null,                  /* path        */
-                                                 false,                 /* tokenIn     */
-                                                 false,                 /* dataIn      */
-                                                 false,                 /* latchData   */
-                                                 false,                 /* latchPath   */
-                                                 true,                  /* dataOut     */
-                                                 false                  /* tokenOut    */
-                                                 ));
+        marina.instrIn.fill(REQUEUEING_SEND_DATA);
 
        prln("Executing Set ILC=1 (requeueable); this will be requeued once TAIL happens");
         marina.instrIn.fill(new Instruction.Set(DOCK,true,Predicate.IgnoreOLC,SetDest.InnerLoopCounter, 1));
 
        prln("Executing Send Data (requeueable); this will be recirculated");
-        marina.instrIn.fill(new Instruction.Move(DOCK,
-                                                 false,                 /* requeueing  */
-                                                 Predicate.IgnoreOLC,   /* predicate   */
-                                                 false,                 /* torpedoable */
-                                                 null,                  /* path        */
-                                                 false,                 /* tokenIn     */
-                                                 false,                 /* dataIn      */
-                                                 false,                 /* latchData   */
-                                                 false,                 /* latchPath   */
-                                                 true,                  /* dataOut     */
-                                                 false                  /* tokenOut    */
-                                                 ));
+        marina.instrIn.fill(SEND_DATA);
 
        prln("Executing Set ILC=1 (requeueable); this will be recirculated");
         marina.instrIn.fill(new Instruction.Set(DOCK,true,Predicate.IgnoreOLC,SetDest.InnerLoopCounter, 1));
 
-        List<BitVector> dataItems;
-
+        // at this point we have inserted two "move" instructions; we
+        // want to make sure that only the first one is executed
         dataItems = marina.data.drainMany(2);
         fatal(dataItems.size()!=1, "Expected exactly one data item to emerge but got: "+dataItems.size()+" data items");
 
-        // now we should be in state 1
-       prln("Executing Tail");
+        // by now we should be in state 1; we insert another
+        // REQUEUEING_SEND_DATA in order to be sure that the epi fifo
+        // is still accepting input
+       prln("Executing Send Data (requeueable); this will be recirculated");
+        marina.instrIn.fill(REQUEUEING_SEND_DATA);
+
+       prln("Executing Set ILC=1 (requeueable); this will be recirculated");
+        marina.instrIn.fill(new Instruction.Set(DOCK,true,Predicate.IgnoreOLC,SetDest.InnerLoopCounter, 1));
+
+       prln("Executing Tail; this will cause the 2->3 transition and be discarded");
         marina.instrIn.fill(new Instruction.Tail(DOCK));
 
         // now we should be in state 3